@funhub/platform 0.2.11 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/biz.d.mts +5 -5
  2. package/dist/biz.mjs +1 -1
  3. package/dist/components/biz/business/advertisement/ad-match.d.mts +4 -19
  4. package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
  5. package/dist/components/biz/business/advertisement/ad-provider.d.mts +0 -3
  6. package/dist/components/biz/business/advertisement/ad-provider.mjs +1 -1
  7. package/dist/components/biz/business/advertisement/ad-query.d.mts +0 -1
  8. package/dist/components/biz/business/advertisement/ad-query.mjs +1 -1
  9. package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +2 -4
  10. package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +1 -1
  11. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
  12. package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +3 -2
  13. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
  14. package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +6 -9
  15. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
  16. package/dist/components/biz/business/advertisement/banner-ad/server.mjs +1 -1
  17. package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +31 -1
  18. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
  19. package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +4 -4
  20. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
  21. package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +1 -1
  22. package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -5
  23. package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +10 -21
  24. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -1
  25. package/dist/components/biz/business/advertisement/floating-ad/server.mjs +1 -1
  26. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
  27. package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +2 -1
  28. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
  29. package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +2 -7
  30. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
  31. package/dist/components/biz/business/advertisement/icon-ad/server.mjs +1 -1
  32. package/dist/components/biz/business/advertisement/index.d.mts +4 -4
  33. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +3 -3
  34. package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
  35. package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
  36. package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +15 -14
  37. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
  38. package/dist/components/biz/business/advertisement/popup-ad/server.mjs +1 -1
  39. package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
  40. package/dist/components/biz/business/advertisement/text-ad/material.d.mts +2 -1
  41. package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
  42. package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +3 -5
  43. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
  44. package/dist/components/biz/business/advertisement/text-ad/server.mjs +1 -1
  45. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  46. package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
  47. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  48. package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
  49. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +1 -1
  50. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +24 -4
  51. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  52. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +22 -2
  53. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +1 -1
  54. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +1 -1
  55. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +24 -4
  56. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  57. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +22 -2
  58. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +1 -1
  59. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  60. package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +1 -1
  61. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  62. package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +1 -1
  63. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
  64. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +2 -0
  65. package/dist/components/biz/business/hot-recommend/client.mjs +1 -1
  66. package/dist/components/biz/business/hot-recommend/material.d.mts +1 -0
  67. package/dist/components/biz/business/hot-recommend/schema.d.mts +1 -0
  68. package/dist/components/biz/business/hot-recommend/schema.mjs +1 -1
  69. package/dist/components/biz/business/image-text-recommend/client.d.mts +1 -1
  70. package/dist/components/biz/business/image-text-recommend/client.mjs +1 -1
  71. package/dist/components/biz/business/image-text-recommend/material.d.mts +7 -7
  72. package/dist/components/biz/business/image-text-recommend/schema.d.mts +30 -25
  73. package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
  74. package/dist/components/biz/business/image-text-recommend/server.mjs +1 -1
  75. package/dist/components/biz/business/image-text-recommend/shared/query.mjs +1 -1
  76. package/dist/components/biz/business/index.d.mts +4 -4
  77. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  78. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  79. package/dist/components/biz/business/marquee/client.mjs +1 -1
  80. package/dist/components/biz/business/marquee/material.d.mts +5 -6
  81. package/dist/components/biz/business/marquee/schema.d.mts +5 -6
  82. package/dist/components/biz/business/marquee/schema.mjs +1 -1
  83. package/dist/components/biz/business/tab-bar/client.d.mts +2 -0
  84. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  85. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  86. package/dist/components/biz/business/text-recommend/material.d.mts +1 -0
  87. package/dist/components/biz/business/text-recommend/schema.d.mts +1 -0
  88. package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
  89. package/dist/components/common/video-player/index.d.mts +4 -1
  90. package/dist/components/common/video-player/index.mjs +3 -3
  91. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +2 -0
  92. package/dist/components/common/video-player/video-player-ref-context.mjs +2 -0
  93. package/dist/components/common/video-player/video-preroll-ad.mjs +2 -0
  94. package/dist/components/ui/badge.d.mts +1 -1
  95. package/dist/components/ui/button.d.mts +2 -2
  96. package/dist/hooks/use-is-client.d.mts +10 -0
  97. package/dist/hooks/use-is-client.mjs +2 -0
  98. package/dist/hooks.d.mts +2 -1
  99. package/dist/hooks.mjs +1 -1
  100. package/dist/service/advertisement.d.mts +1 -13
  101. package/dist/service/advertisement.mjs +1 -1
  102. package/dist/service/generated/client.d.mts +10 -2
  103. package/dist/service/generated/client.mjs +1 -1
  104. package/dist/service/generated/tanstack.d.mts +12 -2
  105. package/dist/service/generated/tanstack.mjs +1 -1
  106. package/dist/service.d.mts +3 -3
  107. package/dist/service.mjs +1 -1
  108. package/dist/store/modules/blind-spot-ad-store.d.mts +116 -0
  109. package/dist/store/modules/blind-spot-ad-store.mjs +2 -0
  110. package/dist/store/modules/user-store.d.mts +1 -1
  111. package/dist/store/modules/user-store.mjs +1 -1
  112. package/dist/store/modules/video-player-ref-store.d.mts +21 -0
  113. package/dist/store/modules/video-player-ref-store.mjs +2 -0
  114. package/dist/store.d.mts +3 -1
  115. package/dist/store.mjs +1 -1
  116. package/dist/types.d.mts +335 -32
  117. package/dist/utils/browser-fingerprint.d.mts +13 -0
  118. package/dist/utils/browser-fingerprint.mjs +2 -0
  119. package/dist/utils/device-id.d.mts +2 -2
  120. package/dist/utils/device-id.mjs +1 -1
  121. package/dist/utils/http.mjs +1 -1
  122. package/dist/utils/request-user-id.d.mts +12 -0
  123. package/dist/utils/request-user-id.mjs +2 -0
  124. package/dist/utils/schema/inspector.d.mts +2 -2
  125. package/dist/utils.d.mts +3 -1
  126. package/dist/utils.mjs +1 -1
  127. package/package.json +2 -1
  128. package/dist/assets/icons/search/video.mjs +0 -2
  129. package/dist/components/biz/business/marquee/marquee.module.mjs +0 -24
@@ -1,2 +1,2 @@
1
1
 
2
- import{pContentBatchGetVideoDetail as e,pContentGetPopularVideoList as t}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as n,pContentGetPopularVideoListKey as r}from"../../../../service/generated/tanstack.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as i,getImageTextRecommendFixedIds as a,getImageTextRecommendLayoutTags as o}from"../../../../hooks/image-text-recommend.mjs";import{HydrationBoundary as s}from"../../../../hooks/query/hydration-boundary.mjs";import{buildSmartPopularQuery as c,buildStableChosenTags as l}from"./shared/query.mjs";import{ImageTextRecommendClient as u}from"./client.mjs";import{jsx as d}from"react/jsx-runtime";const f=[];async function p(p){let{mode:m=`renderer`,...h}=p,g=h.items??f,_=h.layout,v=[],y=!!_?.enabled,b=a(g,y),x=o(_),S=g?.length??0;if(m===`renderer`&&g?.length)try{if(y){let e=c(l(x,S),S),n=await t(e);v.push({queryKey:r(e),queryFn:()=>Promise.resolve(n)})}else if(b.length>0){let t={ids:b.length<=i?b:b.slice(0,i)},r=await e(t);console.log(`res`,r),v.push({queryKey:n(t),queryFn:()=>Promise.resolve(r)})}}catch(e){console.warn(`[image-text-recommend] server prefetch failed:`,e)}return d(s,{prefetch:v,children:d(u,{...h,mode:m})})}export{p as ImageTextRecommendServer};
2
+ import{pContentBatchGetVideoDetail as e,pContentGetNewstVideoList as t,pContentGetPopularVideoList as n}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as r,pContentGetNewstVideoListKey as i,pContentGetPopularVideoListKey as a}from"../../../../service/generated/tanstack.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as o,getImageTextRecommendFixedIds as s}from"../../../../hooks/image-text-recommend.mjs";import{HydrationBoundary as c}from"../../../../hooks/query/hydration-boundary.mjs";import{normalizeHomeRecommendSmartLayout as l}from"../home-recommend/shared/home-recommend-smart-layout.mjs";import{buildImageTextSmartListBody as u,resolveImageTextSmartListKind as d}from"./shared/query.mjs";import{ImageTextRecommendClient as f}from"./client.mjs";import{jsx as p}from"react/jsx-runtime";const m=[];async function h(h){let{mode:g=`renderer`,..._}=h,v=_.items??m,y=[],b=l(_.layout),x=b?.enabled===!0,S=s(v,x),C=v?.length??0;if(g===`renderer`&&v?.length)try{if(x&&b){let e=d(b.sortRule),r=u(b,{targetCount:C}),o=e===`newest`?await t(r):await n(r);y.push({queryKey:e===`newest`?i(r):a(r),queryFn:()=>Promise.resolve(o)})}else if(S.length>0){let t={ids:S.length<=o?S:S.slice(0,o)},n=await e(t);y.push({queryKey:r(t),queryFn:()=>Promise.resolve(n)})}}catch(e){console.warn(`[image-text-recommend] server prefetch failed:`,e)}return p(c,{prefetch:y,children:p(f,{..._,mode:g})})}export{h as ImageTextRecommendServer};
@@ -1,2 +1,2 @@
1
1
 
2
- import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as e}from"../../../../../hooks/image-text-recommend.mjs";function t(e,t){let n=e.map(e=>String(e).trim()).filter(Boolean);if(!n.length||t<=0)return[];if(n.length>=t)return n.slice(0,t);let r=[...n];for(;r.length<t;)r.push(n[r.length%n.length]);return r}function n(t,n){return n>e?{page_size:e,tags:t.length?Array.from(new Set(t)):void 0}:{page_size:Math.max(20,n*10),tags:t.length?Array.from(new Set(t)):void 0}}export{n as buildSmartPopularQuery,t as buildStableChosenTags};
2
+ import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as e}from"../../../../../hooks/image-text-recommend.mjs";import{isHomeRecommendLatestSortRule as t}from"../../home-recommend/shared/home-recommend-smart-layout.mjs";function n(e){return t(e)?`newest`:`popular`}function r(t,n){let{targetCount:r,cursor:i,pageSize:a}=n,o=t.tagIds.length>0?t.tagIds:void 0,s=t.catIds.length>0?t.catIds:void 0,c;return c=a===void 0?r>e?e:Math.max(20,r*10):a,{cursor:i||void 0,page_size:c,tags:o,cat_ids:s}}export{r as buildImageTextSmartListBody,n as resolveImageTextSmartListKind};
@@ -3,24 +3,24 @@ import { defaultProps } from "../basics/fullscreen-feed/defaults/default-props.m
3
3
  import { FullscreenFeedClient } from "../basics/fullscreen-feed/runtime/client.mjs";
4
4
  import { schema } from "../basics/fullscreen-feed/schema/index.mjs";
5
5
  import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./advertisement/banner-ad/schema.mjs";
6
- import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./advertisement/floating-ad/schema.mjs";
6
+ import { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./advertisement/floating-ad/schema.mjs";
7
7
  import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./advertisement/icon-ad/schema.mjs";
8
8
  import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./advertisement/text-ad/schema.mjs";
9
- import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItem, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, getFirstMatchedMaterial, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./advertisement/ad-match.mjs";
9
+ import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItems, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, hasMatchedAds, parseAdsMatchExtData, sortAdsMatchMaterials } from "./advertisement/ad-match.mjs";
10
10
  import { AdProvider, AdProviderProps, AdProviderValue, useAdProvider } from "./advertisement/ad-provider.mjs";
11
11
  import { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey } from "./advertisement/ad-query.mjs";
12
12
  import { AdRuntimeProvider, AdRuntimeProviderProps } from "./advertisement/ad-runtime-provider.mjs";
13
13
  import { BannerAd } from "./advertisement/banner-ad/client.mjs";
14
14
  import { BannerAdServer } from "./advertisement/banner-ad/server.mjs";
15
15
  import { bannerAdMaterial } from "./advertisement/banner-ad/material.mjs";
16
- import { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./advertisement/feed-ad/index.mjs";
16
+ import { FeedAdBadge, FeedAdItemLike, FeedAdPayloadLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./advertisement/feed-ad/index.mjs";
17
17
  import { FloatingAd } from "./advertisement/floating-ad/client.mjs";
18
18
  import { FloatingAdServer } from "./advertisement/floating-ad/server.mjs";
19
19
  import { floatingAdMaterial } from "./advertisement/floating-ad/material.mjs";
20
20
  import { IconAd } from "./advertisement/icon-ad/client.mjs";
21
21
  import { IconAdServer } from "./advertisement/icon-ad/server.mjs";
22
22
  import { iconAdMaterial } from "./advertisement/icon-ad/material.mjs";
23
- import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./advertisement/popup-ad/schema.mjs";
23
+ import { PopupAdBaseProps, PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./advertisement/popup-ad/schema.mjs";
24
24
  import { PopupAd } from "./advertisement/popup-ad/client.mjs";
25
25
  import { PopupAdServer } from "./advertisement/popup-ad/server.mjs";
26
26
  import { popupAdMaterial } from "./advertisement/popup-ad/material.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{isClient as e}from"../../../../utils/common.mjs";import{pContentBatchGetVideoDetail as t}from"../../../../service/generated/client.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import i from"../../../ui/loading.mjs";import a from"../../../ui/link.mjs";import{useSingleFirstRowHeight as o}from"../../../../hooks/use-first-row-height.mjs";import{useMinDurationLoading as s}from"../../../../hooks/use-min-duration-loading.mjs";import c from"../../../../assets/icons/common/right_arrow.mjs";import{isFeedAdItem as l}from"../advertisement/feed-ad/index.mjs";import{LargeGridItemClient as u}from"./card-item.mjs";import{largeFeatureGridInspectorDefaultProps as d}from"./schema.mjs";import{useEffect as f,useMemo as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=[],y=d.data??[];function b(e){return e==null}function x(e,t){return b(e)?t:e}function S(e){return typeof e==`string`?e.trim():``}function C(e){return S(e)}function w(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function T(e){let t=e,n=S(e.update_status)===`0`,r=(Array.isArray(t.episodes)?t.episodes.length:0)||(Array.isArray(e.video_episodes)?e.video_episodes.length:0)||(Array.isArray(e.links)?e.links.length:0)||(w(e.episode_cnt)??0);return!Number.isFinite(r)||r<=0?``:`${n?`更新至`:`全`}${Math.floor(r)}集`}function E(e,t){return t?{...e,...t,id:x(t.id,e.id),cover:x(t.cover,e.cover),title:x(t.title,e.title),desc:x(t.desc,e.desc),play_count:x(t.play_count,e.play_count),showPlayCount:t.showPlayCount??e.showPlayCount,episodeText:x(t.episodeText,e.episodeText),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:x(t.tagImageUrl,e.tagImageUrl)}:e}function D(e,t){if(!t)return e;let n=e.items;return{...e,...t,title:x(t.title,e.title),moreUrl:x(t.moreUrl,e.moreUrl),moreLinkType:t.moreLinkType??e.moreLinkType,items:n?E(n,t.items):t.items}}function O({mode:d=`renderer`,data:b=v}){let x=d===`editor`,S=b??v,E=Array.isArray(S)&&S.length>0,O=p(()=>E?[D(y[0],S[0])]:y,[E,S]),[k,A]=h(O),j=m(``),M=m(null),{isLoading:N,show:P,hide:F,cancel:I}=s(500);f(()=>{A(O)},[O]);let L=o({enabled:!x,containerRef:M,itemRef:M,deps:[k.length]}),R=p(()=>{if(x||!E)return``;let e=O.map(e=>C(e?.items?.id)).filter(Boolean);return Array.from(new Set(e)).join(`,`)},[E,x,O]);if(f(()=>{if(x||!e()||!R||j.current===R)return;j.current=R;let n=!1;async function r(){try{P();let e=await t({ids:R.split(`,`).filter(Boolean)},{cache:`no-store`}),r=Array.isArray(e.data?.videos)?e.data.videos:[],i=new Map;if(r.forEach(e=>{let t=C(e.video_id||e.id||e.mid);t&&i.set(t,e)}),n)return;A(e=>e.map(e=>{let t=e.items;if(!t||l(t))return e;let n=C(t.id),r=n?i.get(n):void 0;if(!r)return e;let a=w(r.play_count)??w(r.browse_count)??w(r.view_count),o=T(r);return{...e,items:{...t,play_count:a??t.play_count,episodeText:o||t.episodeText}}}))}catch(e){console.error(`大图推荐刷新首屏失败(client)`,e)}finally{n||F()}}return r(),()=>{n=!0,I()}},[I,R,F,x,P]),!k||k.length===0)return null;let z=k[0],B=z?.title,V=z?.moreUrl,H=L>0?L/2:160,U=!x&&N;return _(n,{className:x?`p-3 pointer-events-none`:`p-3`,children:[_(n,{className:`flex items-center justify-between mb-[10px] h-[24px]`,children:[B&&g(r,{as:`h2`,className:`text-[18px] font-bold text-text1 line-clamp-1 flex-1 min-w-0 mr-[12px]`,children:B}),V&&_(a,{href:V,className:`flex items-center text-[14px] text-text2 ml-auto`,children:[`更多`,g(c,{className:`ml-[2px] h-[12px] w-[12px] text-text2`})]})]}),_(n,{className:`relative`,children:[k.map((e,t)=>{let{items:r}=e;return r?g(n,{ref:t===0?M:void 0,className:t>0?`mt-3`:``,children:g(u,{data:r})},`large-feature-grid-items-${t}`):null}),U&&g(n,{className:`absolute inset-0 z-10 bg-black/15 backdrop-blur-[1px] dark:bg-white/10`,"aria-hidden":!0}),U&&g(n,{className:`absolute left-1/2 -translate-x-1/2 -translate-y-1/2 z-20 pointer-events-none`,style:{top:H},"aria-hidden":!0,children:g(i,{size:`large`,showLabel:!1,className:`text-theme5`})})]})]})}export{O as LargeFeatureGridClient};
2
+ "use client";import{isClient as e}from"../../../../utils/common.mjs";import{pContentBatchGetVideoDetail as t}from"../../../../service/generated/client.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import i from"../../../ui/loading.mjs";import a from"../../../ui/link.mjs";import{useSingleFirstRowHeight as o}from"../../../../hooks/use-first-row-height.mjs";import{useMinDurationLoading as s}from"../../../../hooks/use-min-duration-loading.mjs";import c from"../../../../assets/icons/common/right_arrow.mjs";import{isFeedAdItem as l}from"../advertisement/feed-ad/index.mjs";import{LargeGridItemClient as u}from"./card-item.mjs";import{largeFeatureGridInspectorDefaultProps as d}from"./schema.mjs";import{useEffect as f,useMemo as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=[],y=d.data??[];function b(e){return e==null}function x(e,t){return b(e)?t:e}function S(e){return typeof e==`string`?e.trim():``}function C(e){return S(e)}function w(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function T(e){let t=e,n=S(e.update_status)===`0`,r=(Array.isArray(t.episodes)?t.episodes.length:0)||(Array.isArray(e.video_episodes)?e.video_episodes.length:0)||(Array.isArray(e.links)?e.links.length:0)||(w(e.episode_cnt)??0);return!Number.isFinite(r)||r<=0?``:`${n?`更新至`:`全`}${Math.floor(r)}集`}function E(e,t){return t?{...e,...t,id:x(t.id,e.id),cover:x(t.cover,e.cover),title:x(t.title,e.title),desc:x(t.desc,e.desc),play_count:x(t.play_count,e.play_count),showPlayCount:t.showPlayCount??e.showPlayCount,episodeText:x(t.episodeText,e.episodeText),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:x(t.tagImageUrl,e.tagImageUrl)}:e}function D(e,t){if(!t)return e;let n=e.items;return{...e,...t,title:x(t.title,e.title),moreUrl:x(t.moreUrl,e.moreUrl),moreLinkType:t.moreLinkType??e.moreLinkType,items:n?E(n,t.items):t.items}}function O({mode:d=`renderer`,data:b=v}){let x=d===`editor`,E=b??v,O=Array.isArray(E)&&E.length>0,k=p(()=>O?[D(y[0],E[0])]:y,[O,E]),[A,j]=h(k),M=m(``),N=m(null),{isLoading:P,show:F,hide:I,cancel:L}=s(500);f(()=>{j(k)},[k]);let R=o({enabled:!x,containerRef:N,itemRef:N,deps:[A.length]}),z=p(()=>{if(x||!O)return``;let e=k.map(e=>C(e?.items?.id)).filter(Boolean);return Array.from(new Set(e)).join(`,`)},[O,x,k]);if(f(()=>{if(x||!e()||!z||M.current===z)return;M.current=z;let n=!1;async function r(){try{F();let e=await t({ids:z.split(`,`).filter(Boolean)},{cache:`no-store`}),r=Array.isArray(e.data?.videos)?e.data.videos:[],i=new Map;if(r.forEach(e=>{let t=C(e.video_id||e.id||e.mid);t&&i.set(t,e)}),n)return;j(e=>e.map(e=>{let t=e.items;if(!t||l(t))return e;let n=C(t.id),r=n?i.get(n):void 0;if(!r)return e;let a=w(r.play_count)??w(r.browse_count)??w(r.view_count),o=T(r),s=S(r.name),c=S(r.description||r.content_description),u=t.useContentCover?S(r.img_x||r.img_y):``;return{...e,items:{...t,title:s||t.title,desc:c||t.desc,...u?{cover:u}:{},play_count:a??t.play_count,episodeText:o||t.episodeText}}}))}catch(e){console.error(`大图推荐刷新首屏失败(client)`,e)}finally{n||I()}}return r(),()=>{n=!0,L()}},[L,z,I,x,F]),!A||A.length===0)return null;let B=A[0],V=B?.title,H=B?.moreUrl,U=R>0?R/2:160,W=!x&&P;return _(n,{className:x?`p-3 pointer-events-none`:`p-3`,children:[_(n,{className:`flex items-center justify-between mb-[10px] h-[24px]`,children:[V&&g(r,{as:`h2`,className:`text-[18px] font-bold text-text1 line-clamp-1 flex-1 min-w-0 mr-[12px]`,children:V}),H&&_(a,{href:H,className:`flex items-center text-[14px] text-text2 ml-auto`,children:[`更多`,g(c,{className:`ml-[2px] h-[12px] w-[12px] text-text2`})]})]}),_(n,{className:`relative`,children:[A.map((e,t)=>{let{items:r}=e;return r?g(n,{ref:t===0?N:void 0,className:t>0?`mt-3`:``,children:g(u,{data:r})},`large-feature-grid-items-${t}`):null}),W&&g(n,{className:`absolute inset-0 z-10 bg-black/15 backdrop-blur-[1px] dark:bg-white/10`,"aria-hidden":!0}),W&&g(n,{className:`absolute left-1/2 -translate-x-1/2 -translate-y-1/2 z-20 pointer-events-none`,style:{top:U},"aria-hidden":!0,children:g(i,{size:`large`,showLabel:!1,className:`text-theme5`})})]})]})}export{O as LargeFeatureGridClient};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({data:e.array(n.object({title:e.string(void 0,{label:`推荐位名称`,required:!1}),moreUrl:e.string(void 0,{label:`更多链接`,required:!1}),moreLinkType:e.string(`content-list`,{label:`更多链接类型`,required:!1}),items:e.object({id:e.string(void 0,{label:`内容ID`}),is_ad:e.boolean(!1,{fieldType:`switch`,label:`是否广告`,required:!1}),ad_advertise_url:e.string(void 0,{label:`广告跳转链接`,required:!1}),ad_advertise_icon:e.string(void 0,{label:`广告素材地址`,required:!1}),cover:e.string(void 0,{label:`封面`}),play_count:e.string(void 0,{label:`播放量`,required:!1}),showPlayCount:e.boolean(!0,{fieldType:`switch`,label:`展示播放量`,required:!1}),episodeText:e.string(void 0,{label:`集数文案`,required:!1}),showEpisode:e.boolean(!0,{fieldType:`switch`,label:`展示集数`,required:!1}),useContentCover:e.boolean(!0,{fieldType:`switch`,label:`沿用内容海报`,required:!1}),title:e.string(void 0,{label:`内容标题`}),desc:e.string(void 0,{label:`内容简介`,required:!1}),tagImageUrl:e.string(void 0,{label:`角标图`,required:!1})})}),{label:`大图推荐数据`,required:!1,defaultValue:[{title:`推荐位名称`,moreUrl:`/channel`,moreLinkType:`content-list`,items:{id:`22edc8693ebbdaf1`,cover:`https://base-resources.guadd.fun/md-204/dcc-file/f7/f70a9f9f0c17aa9aff6c3a3e03a822db-small.jpg`,play_count:`11111`,showPlayCount:!0,episodeText:`连载中`,showEpisode:!0,useContentCover:!0,title:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`,desc:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`}}]})})),i=t(r);export{i as largeFeatureGridInspectorDefaultProps,r as largeFeatureGridInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({data:e.array(n.object({title:e.string(void 0,{label:`推荐位名称`,required:!1}),moreUrl:e.string(void 0,{label:`更多链接`,required:!1}),moreLinkType:e.string(`content-list`,{label:`更多链接类型`,required:!1}),items:e.object({id:e.string(void 0,{label:`内容ID`}),is_ad:e.boolean(!1,{fieldType:`switch`,label:`是否广告`,required:!1}),ad:e.object({ad_code:e.string(void 0,{label:`广告业务编码`,required:!1}),ad_advertise_url:e.string(void 0,{label:`广告跳转链接`,required:!1}),ad_advertise_icon:e.string(void 0,{label:`广告素材地址`,required:!1}),ad_advertise_type:e.number(void 0,{label:`广告类型`,required:!1}),ad_advertise_desc:e.string(void 0,{label:`广告文案描述`,required:!1}),ad_ext_data:e.string(void 0,{label:`广告扩展信息`,required:!1})},{label:`广告对象`,required:!1}),ad_advertise_url:e.string(void 0,{label:`广告跳转链接`,required:!1}),ad_advertise_icon:e.string(void 0,{label:`广告素材地址`,required:!1}),cover:e.string(void 0,{label:`封面`}),play_count:e.string(void 0,{label:`播放量`,required:!1}),showPlayCount:e.boolean(!0,{fieldType:`switch`,label:`展示播放量`,required:!1}),episodeText:e.string(void 0,{label:`集数文案`,required:!1}),showEpisode:e.boolean(!0,{fieldType:`switch`,label:`展示集数`,required:!1}),useContentCover:e.boolean(!0,{fieldType:`switch`,label:`沿用内容海报`,required:!1}),title:e.string(void 0,{label:`内容标题`}),desc:e.string(void 0,{label:`内容简介`,required:!1}),tagImageUrl:e.string(void 0,{label:`角标图`,required:!1})})}),{label:`大图推荐数据`,required:!1,defaultValue:[{title:`推荐位名称`,moreUrl:`/channel`,moreLinkType:`content-list`,items:{id:`22edc8693ebbdaf1`,cover:`https://base-resources.guadd.fun/md-204/dcc-file/f7/f70a9f9f0c17aa9aff6c3a3e03a822db-small.jpg`,play_count:`11111`,showPlayCount:!0,episodeText:`连载中`,showEpisode:!0,useContentCover:!0,title:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`,desc:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`}}]})})),i=t(r);export{i as largeFeatureGridInspectorDefaultProps,r as largeFeatureGridInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../../assets/icons/marquee-close.mjs";import i from"../../../../assets/icons/marquee-speaker.mjs";import a from"./marquee.module.mjs";import{defaultMarqueePeriod as o}from"./schema.mjs";import{useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";const p=[],m=`marquee_list`;let h=null;function g(e,t=20){let n=Array.from(e);return n.length<=t?e:`${n.slice(0,t).join(``)}...`}function _(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function v(){if(h)return h;let e=localStorage.getItem(m);if(!e)return h={},{};try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return{};let n={};return Object.entries(t).forEach(([e,t])=>{if(!t||typeof t!=`object`)return;let r=t.closedAt;typeof r!=`number`||Number.isNaN(r)||(n[e]={closedAt:r})}),h=n,n}catch{return h={},{}}}function y(e){h=e,localStorage.setItem(m,JSON.stringify(e))}function b(e){return v()[e]??{}}function x(e,t){y({...v(),[e]:t})}function S(e,t){return _(e.closedAt,t)}function C(m){let{marqueeKey:h,contents:_=p,click:v,close:y,displayStrategy:C,mode:w=`renderer`}=m,T=w===`editor`,E=e(),D=l(!1),[O,k]=u(T),[A,j]=u(T),[M,N]=u(!1),[P,F]=u(0);s(()=>{N(!0)},[]);let I=c(()=>{let e=C?.period??o,t=e.start,n=e.end;if(!t&&!n)return!0;let r=Date.now(),i=t?new Date(t).getTime():0,a=n?new Date(n).getTime():2**53-1;return r>=i&&r<=a},[C?.period]),L=c(()=>(_??[]).map(e=>({...e,text:g(String(e?.text??``))})).filter(e=>!!e.text),[_]),R=h?.trim()??``;if(s(()=>{F(0)},[c(()=>L.map(e=>`${e.text??``}::${e.link??``}`).join(`|`),[L]),R]),s(()=>{T||R||D.current||process.env.NODE_ENV===`production`||(D.current=!0,console.warn(`[MarqueeClient] marqueeKey is required in renderer mode.`))},[T,R]),s(()=>{if(M){if(T){k(!0),j(!0);return}if(!C?.rule||!I||L.length===0){k(!1),j(!0);return}if(!R){k(!1),j(!0);return}k(!S(b(R),C.rule)),j(!0)}},[C?.rule,T,M,I,L.length,R]),!T&&(!M||!A||!O||!I)||L.length===0)return null;let z=L[P%L.length],B=v?.enabled===!0,V=v?.link||z.link,H=B&&!!V,U=y?.enabled===!0;function W(){!R||!C?.rule||L.length===0||x(R,{...b(R),closedAt:Date.now()})}let G=e=>{e.stopPropagation(),k(!1),W()};function K(e){if(typeof window>`u`){E.push(e);return}if(window.isWebView===!0)try{let t=new URL(e,window.location.href);if(t.origin===window.location.origin){let e=t.pathname.split(`/`).filter(Boolean),n=e.findIndex(e=>e===`video`);n>=0&&(e[n]=`webview`,t.pathname=`/${e.join(`/`)}`)}window.location.href=t.toString();return}catch{window.location.href=e;return}E.push(e)}function q(){T||H&&V&&(k(!1),W(),K(V))}let J=()=>{T||!O||L.length<=1||F(e=>(e+1)%L.length)},Y=T?a[`marquee-item-paused`]:L.length>1?a[`marquee-item-once`]:a[`marquee-item-loop`],X=U?d(`button`,{type:`button`,"aria-label":`关闭`,className:`flex size-6 shrink-0 items-center justify-center overflow-hidden p-0.5`,onClick:G,children:d(r,{className:`h-5 w-5`,"aria-hidden":!0})}):d(t,{className:`flex size-6 shrink-0 items-center justify-center overflow-hidden p-0.5`,"aria-hidden":!0});return f(t,{className:`grid h-8 w-full grid-cols-[20px_1fr_24px] items-center gap-2 bg-white/10 px-4 py-1 backdrop-blur-[2px] ${H?`cursor-pointer`:``} ${T?`pointer-events-none`:``}`,onClick:q,children:[d(i,{className:`h-5 w-5 shrink-0`,"aria-hidden":!0}),d(t,{className:`relative h-5 min-w-0 w-full overflow-hidden`,children:d(t,{className:`absolute inset-y-0 left-0 flex items-center whitespace-nowrap ${Y}`,onAnimationEnd:J,children:d(n,{className:`inline-block font-sans text-[14px] font-normal leading-[20px] not-italic text-white/90`,children:z.text})},`marquee-item-${P}`)}),X]})}export{C as MarqueeClient};
2
+ "use client";import{useRouter as e}from"../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../../assets/icons/marquee-close.mjs";import i from"../../../../assets/icons/marquee-speaker.mjs";import{defaultMarqueePeriod as a}from"./schema.mjs";import{useEffect as o,useLayoutEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";const p=[],m=`marquee_list`;let h=null;function g(e,t=20){let n=Array.from(e);return n.length<=t?e:`${n.slice(0,t).join(``)}...`}function _(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function v(){if(h)return h;let e=localStorage.getItem(m);if(!e)return h={},{};try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return{};let n={};return Object.entries(t).forEach(([e,t])=>{if(!t||typeof t!=`object`)return;let r=t.closedAt;typeof r!=`number`||Number.isNaN(r)||(n[e]={closedAt:r})}),h=n,n}catch{return h={},{}}}function y(e){h=e,localStorage.setItem(m,JSON.stringify(e))}function b(e){return v()[e]??{}}function x(e,t){y({...v(),[e]:t})}function S(e,t){return _(e.closedAt,t)}function C(m){let{marqueeKey:h,contents:_=p,close:v,displayStrategy:y,mode:C=`renderer`}=m,w=C===`editor`,T=e(),E=l(!1),D=l(null),O=l(null),[k,A]=u(w),[j,M]=u(w),[N,P]=u(!1),[F,I]=u(0);o(()=>{P(!0)},[]);let L=c(()=>{let e=y?.period??a,t=e.start,n=e.end;if(!t&&!n)return!0;let r=Date.now(),i=t?new Date(t).getTime():0,o=n?new Date(n).getTime():2**53-1;return r>=i&&r<=o},[y?.period]),R=c(()=>(_??[]).map(e=>({...e,text:g(String(e?.text??``))})).filter(e=>!!e.text),[_]),z=h?.trim()??``,B=c(()=>R.map(e=>`${e.text??``}::${e.link??``}`).join(`|`),[R]);if(o(()=>{I(0)},[B,z]),o(()=>{w||z||E.current||process.env.NODE_ENV===`production`||(E.current=!0,console.warn(`[MarqueeClient] marqueeKey is required in renderer mode.`))},[w,z]),o(()=>{if(N){if(w){A(!0),M(!0);return}if(!y?.rule||!L||R.length===0){A(!1),M(!0);return}if(!z){A(!0),M(!0);return}A(!S(b(z),y.rule)),M(!0)}},[y?.rule,w,N,L,R.length,z]),s(()=>{if(w)return;let e=D.current,t=O.current;if(!e||!t)return;let n=e.offsetWidth,r=t.scrollWidth,i=n+r,a=Math.max(i/80,3)*1e3,o=t.animate([{transform:`translateX(${n}px)`},{transform:`translateX(-${r}px)`}],{duration:a,iterations:R.length<=1?1/0:1,easing:`linear`,fill:`forwards`});return o.onfinish=()=>{R.length>1&&I(e=>(e+1)%R.length)},()=>o.cancel()},[F,B,w,k,R.length]),!w&&(!N||!j||!k||!L)||R.length===0)return null;let V=R[F%R.length],H=V?.click,U=H?.enabled===!0,W=H?.link,G=U&&!!W,K=v?.enabled===!0;function q(){!z||!y?.rule||R.length===0||x(z,{...b(z),closedAt:Date.now()})}let J=e=>{e.stopPropagation(),A(!1),q()};function Y(e){if(typeof window>`u`){T.push(e);return}if(window.isWebView===!0)try{let t=new URL(e,window.location.href);if(t.origin===window.location.origin){let e=t.pathname.split(`/`).filter(Boolean),n=e.findIndex(e=>e===`video`);n>=0&&(e[n]=`webview`,t.pathname=`/${e.join(`/`)}`)}window.location.href=t.toString();return}catch{window.location.href=e;return}T.push(e)}function X(){w||G&&W&&(A(!1),q(),Y(W))}let Z=K?d(`button`,{type:`button`,"aria-label":`关闭`,className:`flex size-6 shrink-0 items-center justify-center overflow-hidden p-0.5`,onClick:J,children:d(r,{className:`h-5 w-5`,"aria-hidden":!0})}):d(t,{className:`flex size-6 shrink-0 items-center justify-center overflow-hidden p-0.5`,"aria-hidden":!0});return f(t,{className:`grid h-8 w-full grid-cols-[20px_1fr_24px] items-center gap-2 bg-white/10 px-4 py-1 backdrop-blur-[2px] ${G?`cursor-pointer`:``} ${w?`pointer-events-none`:``}`,onClick:X,children:[d(i,{className:`h-5 w-5 shrink-0`,"aria-hidden":!0}),d(t,{ref:D,className:`relative h-5 min-w-0 w-full overflow-hidden`,children:d(t,{ref:O,className:`absolute inset-y-0 left-0 flex items-center whitespace-nowrap`,children:d(n,{className:`inline-block font-sans text-[14px] font-normal leading-[20px] not-italic text-white/90`,children:V.text})},`marquee-item-${F}`)}),Z]})}export{C as MarqueeClient};
@@ -15,13 +15,12 @@ declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof
15
15
  readonly marqueeKey: zod.ZodString & SchemaHasDefaultValue;
16
16
  readonly contents: zod.ZodArray<zod.ZodObject<{
17
17
  readonly text: zod.ZodString & SchemaHasDefaultValue;
18
- readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
18
+ readonly click: zod.ZodObject<{
19
+ readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
20
+ readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
21
+ readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
22
+ }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
19
23
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
20
- readonly click: zod.ZodObject<{
21
- readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
22
- readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
23
- readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
24
- }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
25
24
  readonly close: zod.ZodObject<{
26
25
  readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
27
26
  }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
@@ -20,13 +20,12 @@ declare const marqueeInspectorPropsSchema: zod.ZodObject<{
20
20
  readonly marqueeKey: zod.ZodString & SchemaHasDefaultValue;
21
21
  readonly contents: zod.ZodArray<zod.ZodObject<{
22
22
  readonly text: zod.ZodString & SchemaHasDefaultValue;
23
- readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
23
+ readonly click: zod.ZodObject<{
24
+ readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
25
+ readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
26
+ readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
27
+ }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
24
28
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
25
- readonly click: zod.ZodObject<{
26
- readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
27
- readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
28
- readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
29
- }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
30
29
  readonly close: zod.ZodObject<{
31
30
  readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
32
31
  }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";import t from"dayjs";function n(){return{start:t().startOf(`day`).format(`YYYY-MM-DD HH:mm:ss`),end:t().endOf(`day`).format(`YYYY-MM-DD HH:mm:ss`)}}const r=n(),i=e(e=>({marqueeKey:e.string(``,{label:`状态唯一标识`,required:!0,description:`外部传入唯一 marqueeKey,用于本地展示状态持久化`}),contents:e.array(e.object({text:e.string(``,{label:`文本内容`}),link:e.string(``,{label:`跳转链接`,required:!1})}),{label:`消息内容`,defaultValue:[{text:`请输入跑马灯内容`}],description:`支持多条消息循环播放`}),click:e.object({enabled:e.boolean(!0,{fieldType:`switch`,label:`支持点击`}),redirectType:e.enum([`content_list`,`content`,`link`],`link`,{label:`跳转指向`,required:!1}),link:e.string(``,{label:`跳转链接`,required:!1})},{label:`点击配置`,defaultValue:{enabled:!0,redirectType:`link`,link:``}}),close:e.object({enabled:e.boolean(!0,{fieldType:`switch`,label:`支持关闭`})},{label:`关闭配置`,defaultValue:{enabled:!0}}),displayStrategy:e.object({rule:e.enum([`once`,`daily`],`once`,{label:`展示规则`,description:`「只展示1次」即当前消息只展示1次;「每天展示1次」即当前消息每天展示1次,0点刷新`}),period:e.timeRange(r,{label:`展示周期`,required:!1})},{label:`展示策略`,defaultValue:{rule:`once`,period:r}})}));export{r as defaultMarqueePeriod,n as getDefaultMarqueePeriod,i as marqueeInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";import t from"dayjs";function n(){return{start:t().startOf(`day`).format(`YYYY-MM-DD HH:mm:ss`),end:t().endOf(`day`).format(`YYYY-MM-DD HH:mm:ss`)}}const r=n(),i=e(e=>({marqueeKey:e.string(``,{label:`状态唯一标识`,required:!0,description:`外部传入唯一 marqueeKey,用于本地展示状态持久化`}),contents:e.array(e.object({text:e.string(``,{label:`文本内容`}),click:e.object({enabled:e.boolean(!0,{fieldType:`switch`,label:`支持点击`}),redirectType:e.enum([`content_list`,`content`,`link`],`link`,{label:`跳转指向`,required:!1}),link:e.string(``,{label:`跳转链接`,required:!1})},{label:`点击配置`,defaultValue:{enabled:!0,redirectType:`link`,link:``}})}),{label:`消息内容`,defaultValue:[{text:`请输入跑马灯内容`,click:{enabled:!0,redirectType:`link`,link:``}}],description:`支持多条消息循环播放(1~5条),展示顺序与配置顺序一致`}),close:e.object({enabled:e.boolean(!0,{fieldType:`switch`,label:`支持关闭`})},{label:`关闭配置`,defaultValue:{enabled:!0}}),displayStrategy:e.object({rule:e.enum([`once`,`daily`],`once`,{label:`展示规则`,description:`「只展示1次」即当前消息只展示1次;「每天展示1次」即当前消息每天展示1次,0点刷新`}),period:e.timeRange(r,{label:`展示周期`,required:!1})},{label:`展示策略`,defaultValue:{rule:`once`,period:r}})}));export{r as defaultMarqueePeriod,n as getDefaultMarqueePeriod,i as marqueeInspectorPropsSchema};
@@ -8,6 +8,8 @@ interface TabBarItem {
8
8
  domainId: string;
9
9
  icon: string;
10
10
  activeIcon: string;
11
+ showNavName?: boolean;
12
+ show_nav_name?: boolean;
11
13
  configType: TabBarItemConfigType;
12
14
  functionPageType: string;
13
15
  selectData: unknown;
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{usePathname as o}from"next/navigation";import s from"next/link";const c=[],l={backgroundColor:`rgba(5, 1, 15, 0.9)`,backdropFilter:`blur(4px)`,WebkitBackdropFilter:`blur(4px)`,paddingBottom:`env(safe-area-inset-bottom, 0px)`},u={background:`rgba(1, 0, 2, 0.80)`,boxShadow:`0 12px 100px rgba(255, 255, 255, 0.20)`,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`};function d(e){return e.split(`?`)[0].replace(/\/+$/,``)||`/`}function f(e){if(e.configType===1)switch(e.functionPageType){case`搜索`:return`/search`;case`个人中心`:return`/user/mine`;case`内容列表`:return`/video-list?tags=${e.tags}&title=${e.title}`;default:return`/`}let t=(e.domainId??``).toString().trim();return t?`/domain/${t}`:`/`}function p(e,t){let n=d(t);if(e.configType===1){let t=d(f(e).split(`?`)[0]);return n===t||n.startsWith(`${t}/`)}let r=e.domainId.trim();if(!r)return n===`/`||n.startsWith(`/category/`);let i=`/domain/${r}`;return n===i||n.startsWith(`${i}/`)}function m(e,t){return e.findIndex(e=>p(e,t))}function h(d){let{items:p=c,mode:h=`renderer`}=d,g=o(),_=r(()=>{if(h===`editor`)return 0;let e=m(p??[],g);return e>=0?e:0},[p,g,h]),v=r(()=>(p??[]).some(e=>e.label.trim()!==``),[p]);if(!p?.length)return null;function y(e){h===`editor`&&e.preventDefault()}let b=`size-full rounded-[6px] bg-white/20`;return i(t,{as:`nav`,"aria-label":`Bottom navigation`,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col items-center`,style:l,children:i(t,{className:`my-[4px] flex h-[56px] w-[358px] items-center justify-between rounded-[100px] px-[40px]`,style:u,children:p.map((r,o)=>{let c=_===o,l=c?r.activeIcon:r.icon,u=r.label,d=f(r),p=v?c?`gap-[5px]`:`gap-[4px]`:``,m=c?`whitespace-nowrap text-center text-[12px] leading-[16px] font-normal text-[#C043E8]`:`whitespace-nowrap text-center text-[12px] leading-[16px] font-normal text-[#BFBFBF]`;return a(s,{href:d,className:`flex flex-col items-center justify-center ${p}`,"aria-current":c?`page`:void 0,"data-index":o,"data-webview-nav":`spa`,onClick:y,children:[i(t,{className:`relative size-5 shrink-0`,children:l?i(e,{src:l,alt:u,fill:!0,className:`object-contain`}):i(t,{className:c?`${b} bg-[#C043E8]`:b})}),v&&i(n,{className:m,children:u})]},o)})})})}export{h as TabBarClient};
2
+ "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{usePathname as o}from"next/navigation";import s from"next/link";const c=[],l={backgroundColor:`rgba(5, 1, 15, 0.9)`,backdropFilter:`blur(4px)`,WebkitBackdropFilter:`blur(4px)`,paddingBottom:`env(safe-area-inset-bottom, 0px)`},u={background:`rgba(1, 0, 2, 0.80)`,boxShadow:`0 12px 100px rgba(255, 255, 255, 0.20)`,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`};function d(e){return e.split(`?`)[0].replace(/\/+$/,``)||`/`}function f(e){if(e.configType===1)switch(e.functionPageType){case`搜索`:return`/search`;case`个人中心`:return`/user/mine`;case`内容列表`:return`/video-list?tags=${e.tags}&title=${e.title}`;default:return`/`}let t=(e.domainId??``).toString().trim();return t?`/domain/${t}`:`/`}function p(e,t){let n=d(t);if(e.configType===1){let t=d(f(e).split(`?`)[0]);return n===t||n.startsWith(`${t}/`)}let r=e.domainId.trim();if(!r)return n===`/`||n.startsWith(`/category/`);let i=`/domain/${r}`;return n===i||n.startsWith(`${i}/`)}function m(e,t){return e.findIndex(e=>p(e,t))}function h(e){return typeof e.show_nav_name==`boolean`?e.show_nav_name:typeof e.showNavName==`boolean`?e.showNavName:!0}function g(d){let{items:p=c,mode:g=`renderer`}=d,_=o(),v=r(()=>{if(g===`editor`)return 0;let e=m(p??[],_);return e>=0?e:0},[p,_,g]),y=r(()=>(p??[]).some(e=>h(e)&&e.label.trim()!==``),[p]);if(!p?.length)return null;function b(e){g===`editor`&&e.preventDefault()}let x=`size-full rounded-[6px] bg-white/20`;return i(t,{as:`nav`,"aria-label":`Bottom navigation`,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col items-center`,style:l,children:i(t,{className:`my-[4px] flex h-[56px] w-[358px] items-center justify-between rounded-[100px] px-[40px]`,style:u,children:p.map((r,o)=>{let c=v===o,l=c?r.activeIcon:r.icon,u=r.label,d=h(r)&&u.trim()!==``,p=f(r),m=y?c?`gap-[5px]`:`gap-[4px]`:``,g=c?`whitespace-nowrap text-center text-[12px] leading-[16px] font-normal text-[#C043E8]`:`whitespace-nowrap text-center text-[12px] leading-[16px] font-normal text-[#BFBFBF]`;return a(s,{href:p,className:`flex flex-col items-center justify-center ${m}`,"aria-current":c?`page`:void 0,"data-index":o,"data-webview-nav":`spa`,onClick:b,children:[i(t,{className:`relative size-5 shrink-0`,children:l?i(e,{src:l,alt:u,fill:!0,className:`object-contain`}):i(t,{className:c?`${x} bg-[#C043E8]`:x})}),y&&d?i(n,{"data-active":c,className:g,children:u}):null]},o)})})})}export{g as TabBarClient};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{usePathname as s,useSearchParams as c}from"next/navigation";const l=[];function u(e,t){if(e.length<=t)return[...e];let n=[...e];for(let e=0;e<t;e++){let t=e+Math.floor(Math.random()*(n.length-e));[n[e],n[t]]=[n[t],n[e]]}return n.slice(0,t)}function d(d){let{title:f,items:p=l,onItemClick:m,mode:h=`renderer`}=d,g=h===`editor`,_=e(),v=s(),y=c(),[b,x]=i(0),S=r(()=>u(p,6),[p,b]);if(p.length===0)return null;let C=e=>{if(m){m(e);return}let t=new URLSearchParams(y.toString());t.set(`q`,e);let n=v.includes(`/search-result`)?v:`/search-result`;_.push(`${n}?${t.toString()}`)};return o(t,{className:`bg-bg1 p-3 flex flex-col gap-3 w-full${g?` pointer-events-none`:``}`,children:[a(t,{className:`flex items-center justify-between w-full`,children:a(n,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:f})}),a(t,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:S.map((e,r)=>a(t,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>C(e.label),children:a(n,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:e.label})},`${b}-${r}`))})]})}export{d as TextRecommendClient};
2
+ "use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as t}from"../../../../service/generated/client.mjs";import{useRouter as n}from"../../../../utils/use-compatible-router.mjs";import{Box as r}from"../../../ui/box.mjs";import{Text as i}from"../../../ui/text.mjs";import{useRequest as a}from"../../../../hooks/query/use-query.mjs";import o from"../../../../assets/icons/refresh.mjs";import{useMemo as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{usePathname as d,useSearchParams as f}from"next/navigation";import{useShallow as p}from"zustand/react/shallow";function m(e,t){if(e.length<=t)return[...e];let n=[...e];for(let e=0;e<t;e++){let t=e+Math.floor(Math.random()*(n.length-e));[n[e],n[t]]=[n[t],n[e]]}return n.slice(0,t)}function h(h){let{title:g,displayCount:_=6,showRefresh:v=!1,onItemClick:y,mode:b=`renderer`}=h,x=b===`editor`,S=n(),C=d(),w=f(),[T,E]=c(0),{userInfo:D}=e(p(e=>({userInfo:e.userInfo}))),O=D?.user_id||`guest`,{data:k}=a([`text-recommend-keyword-list`,O],()=>t({user_id:O}),{enabled:!x}),A=s(()=>(k?.data?.recommend_list??[]).map(e=>({label:e.title??``})).filter(e=>e.label),[k]),j=_*2,M=s(()=>x?Array.from({length:j},(e,t)=>({label:`推荐搜索${t+1}`})):A,[x,A,j]),N=s(()=>m(M,j),[M,T,j]);if(!x&&A.length<2)return null;let P=e=>{e.stopPropagation(),E(e=>e+1)},F=e=>{if(y){y(e);return}let t=new URLSearchParams(w.toString());t.set(`q`,e);let n=C.includes(`/search-result`)?C:`/search-result`;S.push(`${n}?${t.toString()}`)};return u(r,{className:`bg-bg1 p-3 flex flex-col gap-3 w-full${x?` pointer-events-none`:``}`,children:[u(r,{className:`flex items-center justify-between w-full`,children:[l(i,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:g}),v&&u(r,{className:`flex items-center gap-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:P,children:[l(i,{className:`text-[14px] text-text3 leading-[22px]`,children:`换一批`}),l(o,{className:`w-3 h-3 text-text3`})]})]}),l(r,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:N.map((e,t)=>l(r,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>F(e.label),children:l(i,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:e.label})},`${T}-${t}`))})]})}export{h as TextRecommendClient};
@@ -11,6 +11,7 @@ import * as zod_v4_core0 from "zod/v4/core";
11
11
  declare const textRecommendMaterial: DefineMaterialOption<typeof TextRecommendServer, typeof TextRecommendClient, zod.ZodObject<{
12
12
  readonly title: zod.ZodString & SchemaHasDefaultValue;
13
13
  readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
14
+ readonly showRefresh: zod.ZodBoolean & SchemaHasDefaultValue;
14
15
  readonly items: zod.ZodArray<zod.ZodObject<{
15
16
  label: zod.ZodString & SchemaHasDefaultValue;
16
17
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
@@ -10,6 +10,7 @@ import { z } from "zod";
10
10
  declare const textRecommendInspectorPropsSchema: z.ZodObject<{
11
11
  readonly title: z.ZodString & SchemaHasDefaultValue;
12
12
  readonly displayCount: z.ZodNumber & SchemaHasDefaultValue;
13
+ readonly showRefresh: z.ZodBoolean & SchemaHasDefaultValue;
13
14
  readonly items: z.ZodArray<z.ZodObject<{
14
15
  label: z.ZodString & SchemaHasDefaultValue;
15
16
  }, z.core.$strip>> & SchemaHasDefaultValue;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";import{z as t}from"zod";const n=e(e=>({title:e.string(`文字推荐标题`,{label:`标题名称`,description:`支持输入,中/英/数/符,6个字符`}),displayCount:e.number(2,{label:`展示数`}),items:e.array(t.object({label:e.string(`推荐搜索1`,{label:`热词`})}),{label:`推荐位模块`,defaultValue:[{label:`推荐搜索2`},{label:`推荐搜索3`}]})}));export{n as textRecommendInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";import{z as t}from"zod";const n=e(e=>({title:e.string(`文字推荐标题`,{label:`标题名称`,description:`支持输入,中/英/数/符,6个字符`}),displayCount:e.number(2,{label:`展示数`}),showRefresh:e.boolean(!1,{label:`是否展示换一批`,fieldType:`switch`}),items:e.array(t.object({label:e.string(``,{label:`热词`})}),{label:`关键词列表`,defaultValue:[]})}));export{n as textRecommendInspectorPropsSchema};
@@ -1,12 +1,14 @@
1
1
 
2
2
  import { Ref } from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import { SimplePlayer } from "xgplayer";
4
5
 
5
6
  //#region components/common/video-player/index.d.ts
6
7
  interface CommonPlayerProps {
7
8
  parentId?: string;
8
9
  plyerId: string;
9
10
  resolution: string;
11
+ autoplay?: boolean;
10
12
  mergeConfig?: {
11
13
  startPercent?: number;
12
14
  startTimeSeconds?: number;
@@ -37,12 +39,13 @@ interface CommonPlayerRef {
37
39
  enterFullscreen: () => void;
38
40
  isFullscreen: () => boolean;
39
41
  isPlayerReady: () => boolean;
40
- getPlayer: () => any;
42
+ getPlayer: () => SimplePlayer;
41
43
  }
42
44
  declare function CommonPlayer({
43
45
  className,
44
46
  parentId,
45
47
  plyerId,
48
+ autoplay,
46
49
  videoUrl,
47
50
  poster,
48
51
  resolution,
@@ -1,8 +1,8 @@
1
1
 
2
- "use client";import{generateUUID as e,parseResolution as t}from"../../../utils/common.mjs";import{decryptImageUrl as n}from"../../../utils/decrypt-image-client.mjs";import{buildVideoPlayerSrc as r,isM3u8VideoUrl as i,resolveVideoPlayerSrc as a}from"./process-m3u8-cache.mjs";import{apiCollectCustom as o}from"../../../utils/api-collect.mjs";import{videoConfig as s}from"./create-video.mjs";import{RETRY_RESUME_END_GAP_SECONDS as c,pauseOtherVideos as l,prepareRetryResumeState as u,registerVideo as ee,shouldTriggerFpsStuckRecovery as d,unregisterVideo as f}from"./playing-videos.mjs";import p from"./style.module.mjs";import{useCallback as m,useEffect as h,useImperativeHandle as te,useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import y from"next/image";import{useLocale as ne}from"next-intl";async function re(){await import(`xgplayer/dist/index.min.css`)}const ie=[],ae={},b=10*1e3;function x({className:o=``,parentId:x=``,plyerId:S=``,videoUrl:C=``,poster:oe=``,resolution:w,hlsList:se=ie,mergeConfig:T=ae,onProgressUpdate:ce,onVideoEnded:le,onPlay:ue,onPause:de,onEnded:fe,onPlayerReady:E,onControlsVisibilityChange:pe,ref:me}){let he=ne()===`en`?`en`:`zh-cn`,D=g(e()).current,O=g(1),k=g(1),A=g(0),ge=g(0),j=g(null),_e=g(null),M=g(!1),ve=g(!1),ye=g(1),N=g(null),P=g(null),F=g(!1),I=g(0),L=g(null),R=g(null),z=g(!1),B=g(null),V=g(null),H=g(!1),be=g(!1),U=g(!1),W=g(!1),xe=g(T),G=m(()=>{P.current&&=(window.clearTimeout(P.current),null),N.current&&=(N.current.disconnect(),null)},[]),K=m(()=>{L.current&&=(window.clearTimeout(L.current),null)},[]),q=m(()=>{R.current&&=(window.clearTimeout(R.current),null)},[]),J=m(e=>{let t=z.current||R.current!==null;if(z.current=!1,q(),!(!t||!e))try{e.removeClass?.(`xgplayer-isloading`),e.getPlugin?.(`loading`)?.hide?.()}catch{}},[q]),Y=m(e=>{if(J(e),e)try{e.addClass?.(`xgplayer-is-error`),e.getPlugin?.(`error`)?.show?.()}catch{}},[J]),Se=m(e=>{if(e){z.current=!0,q();try{e.removeClass?.(`xgplayer-is-error`),e.addClass?.(`xgplayer-isloading`),e.getPlugin?.(`error`)?.hide?.(),e.getPlugin?.(`loading`)?.show?.()}catch{}R.current=window.setTimeout(()=>{R.current=null,!(H.current||!z.current)&&(K(),I.current=3,Y(j.current||e),console.warn(`~ 播放器加载超过 ${b}ms,已回退失败态,请手动刷新 ~`))},b)}},[q,K,Y]),Ce=m(()=>{G(),q(),z.current=!1,f(D),U.current=!1,j.current&&=(j.current.offAll(),j.current.destroy(),null)},[G,q,D]);te(me,()=>({enterFullscreen:()=>{j.current.getPlugin(`fullscreen`).handleFullscreen()},isFullscreen:()=>M.current,isPlayerReady:()=>U.current&&!!j.current,getPlayer:()=>j.current}),[]);let X=g(null),Z=g(null),we=g(null),Te=g(null),Ee=g(null),De=.3,Oe=.7,Q=.045,ke=()=>r(C);function Ae(e){return Math.min(4e3,500*2**(e-1))+Math.floor(Math.random()*200)}let je=async(e,o,f)=>{let p=ke();if(!p)return;let m=a(C),h=i(C)||(se?.length??0)>0;try{await re();let[i,a]=await Promise.all([import(`xgplayer`),h?import(`xgplayer-hls`):Promise.resolve(null),(async()=>{try{oe=await n(oe)}catch{console.warn(`解码post失败`)}})()]);if(e())return;let te=await m;if(e())return;let g=te||p,_=_e.current;if(!_||!_.isConnected)for(let t=0;t<10;t+=1){if(e())return;if(await new Promise(e=>{window.setTimeout(()=>e(),16)}),_=_e.current,_&&_.isConnected)break}if(!_||!_.isConnected||e())return;let v=i.default??i,y=i.Events,ne=a?a.default??a:null,ie=h&&ne?[...s.plugins,ne]:s.plugins,ae=h?{preloadTime:15,bufferBehind:5,keepStatusAfterSwitch:!0}:void 0;j.current=new v({...s,lang:he,el:_,videoFillMode:`contain`,url:g,poster:oe,playbackRate:{list:[.75,1,1.25,1.5,1.75,2]},plugins:ie,...ae?{hls:ae}:{},miniprogress:!0,definition:{list:se?.map(e=>({text:`${e.text}`,url:r(e.url),definition:`${e.definition}`}))},fullscreen:{useScreenOrientation:!0},...T}),j.current.on(y.REPLAY,()=>{be.current=!1}),j.current.on(y.WAITING,()=>{console.log(`~视频缓冲中,可能出现卡顿~`)}),j.current.on(y.STALLED,()=>{console.log(`~播放停滞,网络连接问题~`)}),j.current.on(y.LOADING,()=>{console.log(`~正在加载数据~`)}),j.current.on(y.LOADED_DATA,()=>{J(j.current)}),j.current.on(y.CANPLAY,()=>{J(j.current)}),j.current.on(y.PLAYING,()=>{J(j.current)});let b=t=>{let n=j.current;if(e()||!n||I.current>=3)return!1;if(L.current)return Se(n),!0;let r=u({failureType:t,player:n,renderedMediaTime:0});B.current=r.time,V.current=r.shouldPlay,I.current+=1;let i=I.current,a=Ae(i);Se(n);let o=t===`fps_stuck`?`画面卡顿`:`失败`;return console.warn(`~ 播放${o},${a}ms 后进行第 ${i} 次重试加载 ~`),L.current=window.setTimeout(()=>{L.current=null,!e()&&(Ce(),je(()=>H.current,()=>Ne.current?.(),e=>$.current?.(e)))},a),!0};j.current.on(y.FPS_STUCK,e=>{console.log(`~检测到帧率卡顿~`,e),d(e)&&(b(`fps_stuck`)||Y(j.current))}),j.current.on(y.BUFFER_CHANGE,e=>{console.log(`~缓冲区状态变化:~`,e)}),j.current.on(y.ERROR,t=>{let n=String(t&&(t.message||t.msg||t.error?.message)||t||``),r=j.current;if(r){if(h&&/SourceBuffer is full|QuotaExceeded/i.test(n)){if(e()||F.current)return;F.current=!0,window.setTimeout(()=>{F.current=!1},2e3);try{let e=Number(r?.currentTime||0);(r?.getPlugin?.(`hls`)?.core)?._bufferService?.removeBuffer?.(0,Math.max(0,e-5)).catch?.(()=>{});let t=r?.config?.url;if(typeof r?.switchURL==`function`&&typeof t==`string`&&t){Se(r),r.switchURL(t,{currentTime:e,seamless:!1}).catch(()=>{b(`error`)||Y(r)});return}}catch{}}b(`error`)||Y(r)}}),j.current.on(y.PLAY,()=>{K(),J(j.current),window.sensors?.track(`player_start`,{object_id:x||S||``,play_session_id:x||S,start_type:`播放`,start_position:0,duration:j.current.duration,definition:w,playback_rate:j.current.playbackRate}),l(D,j.current),be.current||=(Me(),!0),ue?.()}),j.current.on(y.FULLSCREEN_CHANGE,e=>{window.sensors?.track(`player_fullscreen_toggle`,{object_id:x||S||``,play_session_id:x||S||``,action:e?`全屏`:`退出全屏`}),M.current=e}),j.current.on(y.SEEKING,()=>{ve.current=!0}),j.current.on(y.SEEKED,()=>{ve.current=!1});let C=()=>{if(!ce||!j.current)return;let e=Number(j.current.currentTime||0);if(e<=0)return;let t=Number(j.current.duration||0);ce(e,t>0?t:0)};j.current.on(y.PAUSE,()=>{window.sensors?.track(`player_pause`,{object_id:x||S||``,play_session_id:x||S||``,pause_position:j.current.currentTime,cumulative_time:j.current.duration}),C(),de?.()}),j.current.on(y.ENDED,()=>{window.sensors?.track(`player_end`,{object_id:x||S||``,play_session_id:x||S||``,end_position:j.current.currentTime,cumulative_time:j.current.duration,end_type:`播放结束`,is_finish:j.current.currentTime===j.current.duration}),C(),fe?.(),le&&le()}),j.current.on(y.RATE_CHANGE,()=>{window.sensors?.track(`player_rate_change`,{object_id:x||S||``,play_session_id:x||S||``,old_rate:ye.current,new_rate:j.current.playbackRate}),ye.current=j.current.playbackRate}),j.current.on(y.DEFINITION_CHANGE,()=>{window.sensors?.track(`player_definition_change`,{object_id:x||S||``,play_session_id:x||S||``,old_def:w,new_def:j.current.definition})}),j.current.on(y.TIME_UPDATE,()=>{j.current&&C()});let E=()=>{if(!j.current)return;let e=xe.current||{},t=Number(j.current.duration||0);if(t<=0)return;let n=B.current;if(n!==null&&n>0){let e=Math.max(0,t-c),r=Math.min(e>0?e:t,n);j.current.currentTime=r,B.current=null;return}let r=Number(e.startTimeSeconds||0);if(r>0){let e=Math.min(t,r);j.current.currentTime=e;return}if(e.startPercent!==void 0&&e.startPercent>0){let n=e.startPercent/100*t;j.current.currentTime=Math.min(t,n)}};j.current.once(`loadedmetadata`,()=>{E()}),j.current.once(`ready`,()=>{U.current=!0,j.current&&j.current.duration>0&&E();let n=V.current;V.current=null,n===!0?j.current?.play?.().catch(()=>{}):n===!1&&j.current?.pause?.(),ee(D,j.current),o&&o(),f&&(G(),P.current=window.setTimeout(()=>{if(e())return;let t=j.current?.root;if(!t)return;let n=new MutationObserver(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`class`&&f(!e.target.classList.contains(`xgplayer-inactive`))})});N.current=n,n.observe(t,{attributes:!0,attributeFilter:[`class`]}),f(!t.classList.contains(`xgplayer-inactive`))},33));let r=j.current.root,i=0,a=j.current.root.querySelector(`.xgmask`),{width:s,height:c}=t(w),l=s<c?document.documentElement.clientWidth:document.documentElement.clientHeight,u=Ee.current;u&&j.current?.root&&!j.current.root.contains(u)&&j.current.root.appendChild(u),r.addEventListener(`touchstart`,e=>{if(!M.current)return;let t=e.touches[0];i=t.clientX,A.current=t.clientY,W.current=!1,k.current=j.current.volume;let n=window.getComputedStyle(a).backgroundColor;O.current=1-(Number.parseFloat(n.split(`,`)[3])||0)},{passive:!1}),r.addEventListener(`touchmove`,e=>{if(!M.current)return;e.preventDefault();let t=e.touches[0],n=t.clientX-i,r=t.clientY;if(Math.abs(n)>50||ve.current){W.current=!0,d();return}if(W.current){d();return}if(Math.abs(r-A.current)>6){let e=Date.now();if(e-ge.current<16)return;ge.current=e;let n=r<A.current;A.current=r;let a=t.clientX,o=i<l*De,s=i>l*Oe;if(!o&&!s){d();return}let c=a<l*De,u=a>l*Oe;if(o&&!c){W.current=!0,d();return}if(s&&!u){W.current=!0,d();return}o&&c?p(n):s&&u?m(n):d()}},{passive:!1});function d(){X.current&&(X.current.style.visibility=`hidden`),Z.current&&(Z.current.style.visibility=`hidden`)}function p(e){let t=e?Q:-Q;O.current=Math.max(0,Math.min(1,O.current+t)),X.current&&(X.current.style.visibility=`visible`),Z.current&&(Z.current.style.visibility=`hidden`),we.current&&(we.current.style.transform=`scaleY(${O.current})`);let n=1-O.current;a.style.cssText=`
2
+ "use client";import{generateUUID as e,parseResolution as t}from"../../../utils/common.mjs";import{decryptImageUrl as n}from"../../../utils/decrypt-image-client.mjs";import{buildVideoPlayerSrc as r,isM3u8VideoUrl as i,resolveVideoPlayerSrc as a}from"./process-m3u8-cache.mjs";import{apiCollectCustom as o}from"../../../utils/api-collect.mjs";import{videoConfig as s}from"./create-video.mjs";import{RETRY_RESUME_END_GAP_SECONDS as c,pauseOtherVideos as l,prepareRetryResumeState as u,registerVideo as ee,shouldTriggerFpsStuckRecovery as d,unregisterVideo as f}from"./playing-videos.mjs";import p from"./style.module.mjs";import{useCallback as m,useEffect as h,useImperativeHandle as te,useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import y from"next/image";import{useLocale as ne}from"next-intl";async function re(){await import(`xgplayer/dist/index.min.css`)}const ie=[],ae={},b=10*1e3;function x({className:o=``,parentId:x=``,plyerId:S=``,autoplay:oe,videoUrl:C=``,poster:se=``,resolution:w,hlsList:ce=ie,mergeConfig:T=ae,onProgressUpdate:le,onVideoEnded:ue,onPlay:de,onPause:fe,onEnded:pe,onPlayerReady:E,onControlsVisibilityChange:me,ref:he}){let ge=ne()===`en`?`en`:`zh-cn`,D=g(e()).current,O=g(1),k=g(1),A=g(0),_e=g(0),j=g(null),ve=g(null),M=g(!1),N=g(!1),ye=g(1),P=g(null),F=g(null),I=g(!1),L=g(0),R=g(null),z=g(null),B=g(!1),V=g(null),H=g(null),U=g(!1),be=g(!1),W=g(!1),G=g(!1),xe=g(T),K=m(()=>{F.current&&=(window.clearTimeout(F.current),null),P.current&&=(P.current.disconnect(),null)},[]),q=m(()=>{R.current&&=(window.clearTimeout(R.current),null)},[]),J=m(()=>{z.current&&=(window.clearTimeout(z.current),null)},[]),Y=m(e=>{let t=B.current||z.current!==null;if(B.current=!1,J(),!(!t||!e))try{e.removeClass?.(`xgplayer-isloading`),e.getPlugin?.(`loading`)?.hide?.()}catch{}},[J]),X=m(e=>{if(Y(e),e)try{e.addClass?.(`xgplayer-is-error`),e.getPlugin?.(`error`)?.show?.()}catch{}},[Y]),Se=m(e=>{if(e){B.current=!0,J();try{e.removeClass?.(`xgplayer-is-error`),e.addClass?.(`xgplayer-isloading`),e.getPlugin?.(`error`)?.hide?.(),e.getPlugin?.(`loading`)?.show?.()}catch{}z.current=window.setTimeout(()=>{z.current=null,!(U.current||!B.current)&&(q(),L.current=3,X(j.current||e),console.warn(`~ 播放器加载超过 ${b}ms,已回退失败态,请手动刷新 ~`))},b)}},[J,q,X]),Ce=m(()=>{K(),J(),B.current=!1,f(D),W.current=!1,j.current&&=(j.current.offAll(),j.current.destroy(),null)},[K,J,D]);te(he,()=>({enterFullscreen:()=>{j.current.getPlugin(`fullscreen`).handleFullscreen()},isFullscreen:()=>M.current,isPlayerReady:()=>W.current&&!!j.current,getPlayer:()=>j.current}),[]);let Z=g(null),Q=g(null),we=g(null),Te=g(null),Ee=g(null),De=.3,Oe=.7,$=.045,ke=()=>r(C);function Ae(e){return Math.min(4e3,500*2**(e-1))+Math.floor(Math.random()*200)}let je=async(e,o,f)=>{let p=ke();if(!p)return;let m=a(C),h=i(C)||(ce?.length??0)>0;try{await re();let[i,a]=await Promise.all([import(`xgplayer`),h?import(`xgplayer-hls`):Promise.resolve(null),(async()=>{try{se=await n(se)}catch{console.warn(`解码post失败`)}})()]);if(e())return;let te=await m;if(e())return;let g=te||p,_=ve.current;if(!_||!_.isConnected)for(let t=0;t<10;t+=1){if(e())return;if(await new Promise(e=>{window.setTimeout(()=>e(),16)}),_=ve.current,_&&_.isConnected)break}if(!_||!_.isConnected||e())return;let v=i.default??i,y=i.Events,ne=a?a.default??a:null,ie=h&&ne?[...s.plugins,ne]:s.plugins,ae=h?{preloadTime:15,bufferBehind:5,keepStatusAfterSwitch:!0}:void 0;j.current=new v({...s,...typeof oe==`boolean`?{autoplay:oe}:{},lang:ge,el:_,videoFillMode:`contain`,url:g,poster:se,playbackRate:{list:[.75,1,1.25,1.5,1.75,2]},plugins:ie,...ae?{hls:ae}:{},miniprogress:!0,definition:{list:ce?.map(e=>({text:`${e.text}`,url:r(e.url),definition:`${e.definition}`}))},fullscreen:{useScreenOrientation:!0},...T}),j.current.on(y.REPLAY,()=>{be.current=!1}),j.current.on(y.WAITING,()=>{console.log(`~视频缓冲中,可能出现卡顿~`)}),j.current.on(y.STALLED,()=>{console.log(`~播放停滞,网络连接问题~`)}),j.current.on(y.LOADING,()=>{console.log(`~正在加载数据~`)}),j.current.on(y.LOADED_DATA,()=>{Y(j.current)}),j.current.on(y.CANPLAY,()=>{Y(j.current)}),j.current.on(y.PLAYING,()=>{Y(j.current)});let b=t=>{let n=j.current;if(e()||!n||L.current>=3)return!1;if(R.current)return Se(n),!0;let r=u({failureType:t,player:n,renderedMediaTime:0});V.current=r.time,H.current=r.shouldPlay,L.current+=1;let i=L.current,a=Ae(i);Se(n);let o=t===`fps_stuck`?`画面卡顿`:`失败`;return console.warn(`~ 播放${o},${a}ms 后进行第 ${i} 次重试加载 ~`),R.current=window.setTimeout(()=>{R.current=null,!e()&&(Ce(),je(()=>U.current,()=>Ne.current?.(),e=>Pe.current?.(e)))},a),!0};j.current.on(y.FPS_STUCK,e=>{console.log(`~检测到帧率卡顿~`,e),d(e)&&(b(`fps_stuck`)||X(j.current))}),j.current.on(y.BUFFER_CHANGE,e=>{console.log(`~缓冲区状态变化:~`,e)}),j.current.on(y.ERROR,t=>{let n=String(t&&(t.message||t.msg||t.error?.message)||t||``),r=j.current;if(r){if(h&&/SourceBuffer is full|QuotaExceeded/i.test(n)){if(e()||I.current)return;I.current=!0,window.setTimeout(()=>{I.current=!1},2e3);try{let e=Number(r?.currentTime||0);(r?.getPlugin?.(`hls`)?.core)?._bufferService?.removeBuffer?.(0,Math.max(0,e-5)).catch?.(()=>{});let t=r?.config?.url;if(typeof r?.switchURL==`function`&&typeof t==`string`&&t){Se(r),r.switchURL(t,{currentTime:e,seamless:!1}).catch(()=>{b(`error`)||X(r)});return}}catch{}}b(`error`)||X(r)}}),j.current.on(y.PLAY,()=>{q(),Y(j.current),window.sensors?.track(`player_start`,{object_id:x||S||``,play_session_id:x||S,start_type:`播放`,start_position:0,duration:j.current.duration,definition:w,playback_rate:j.current.playbackRate}),l(D,j.current),be.current||=(Me(),!0),de?.()}),j.current.on(y.FULLSCREEN_CHANGE,e=>{window.sensors?.track(`player_fullscreen_toggle`,{object_id:x||S||``,play_session_id:x||S||``,action:e?`全屏`:`退出全屏`}),M.current=e}),j.current.on(y.SEEKING,()=>{N.current=!0}),j.current.on(y.SEEKED,()=>{N.current=!1});let C=()=>{if(!le||!j.current)return;let e=Number(j.current.currentTime||0);if(e<=0)return;let t=Number(j.current.duration||0);le(e,t>0?t:0)};j.current.on(y.PAUSE,()=>{window.sensors?.track(`player_pause`,{object_id:x||S||``,play_session_id:x||S||``,pause_position:j.current.currentTime,cumulative_time:j.current.duration}),C(),fe?.()}),j.current.on(y.ENDED,()=>{window.sensors?.track(`player_end`,{object_id:x||S||``,play_session_id:x||S||``,end_position:j.current.currentTime,cumulative_time:j.current.duration,end_type:`播放结束`,is_finish:j.current.currentTime===j.current.duration}),C(),pe?.(),ue&&ue()}),j.current.on(y.RATE_CHANGE,()=>{window.sensors?.track(`player_rate_change`,{object_id:x||S||``,play_session_id:x||S||``,old_rate:ye.current,new_rate:j.current.playbackRate}),ye.current=j.current.playbackRate}),j.current.on(y.DEFINITION_CHANGE,()=>{window.sensors?.track(`player_definition_change`,{object_id:x||S||``,play_session_id:x||S||``,old_def:w,new_def:j.current.definition})}),j.current.on(y.TIME_UPDATE,()=>{j.current&&C()});let E=()=>{if(!j.current)return;let e=xe.current||{},t=Number(j.current.duration||0);if(t<=0)return;let n=V.current;if(n!==null&&n>0){let e=Math.max(0,t-c),r=Math.min(e>0?e:t,n);j.current.currentTime=r,V.current=null;return}let r=Number(e.startTimeSeconds||0);if(r>0){let e=Math.min(t,r);j.current.currentTime=e;return}if(e.startPercent!==void 0&&e.startPercent>0){let n=e.startPercent/100*t;j.current.currentTime=Math.min(t,n)}};j.current.once(`loadedmetadata`,()=>{E()}),j.current.once(`ready`,()=>{W.current=!0,j.current&&j.current.duration>0&&E();let n=H.current;H.current=null,n===!0?j.current?.play?.().catch(()=>{}):n===!1&&j.current?.pause?.(),ee(D,j.current),o&&o(),f&&(K(),F.current=window.setTimeout(()=>{if(e())return;let t=j.current?.root;if(!t)return;let n=new MutationObserver(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`class`&&f(!e.target.classList.contains(`xgplayer-inactive`))})});P.current=n,n.observe(t,{attributes:!0,attributeFilter:[`class`]}),f(!t.classList.contains(`xgplayer-inactive`))},33));let r=j.current.root,i=0,a=j.current.root.querySelector(`.xgmask`),{width:s,height:c}=t(w),l=s<c?document.documentElement.clientWidth:document.documentElement.clientHeight,u=Ee.current;u&&j.current?.root&&!j.current.root.contains(u)&&j.current.root.appendChild(u),r.addEventListener(`touchstart`,e=>{if(!M.current)return;let t=e.touches[0];i=t.clientX,A.current=t.clientY,G.current=!1,k.current=j.current.volume;let n=window.getComputedStyle(a).backgroundColor;O.current=1-(Number.parseFloat(n.split(`,`)[3])||0)},{passive:!1}),r.addEventListener(`touchmove`,e=>{if(!M.current)return;e.preventDefault();let t=e.touches[0],n=t.clientX-i,r=t.clientY;if(Math.abs(n)>50||N.current){G.current=!0,d();return}if(G.current){d();return}if(Math.abs(r-A.current)>6){let e=Date.now();if(e-_e.current<16)return;_e.current=e;let n=r<A.current;A.current=r;let a=t.clientX,o=i<l*De,s=i>l*Oe;if(!o&&!s){d();return}let c=a<l*De,u=a>l*Oe;if(o&&!c){G.current=!0,d();return}if(s&&!u){G.current=!0,d();return}o&&c?p(n):s&&u?m(n):d()}},{passive:!1});function d(){Z.current&&(Z.current.style.visibility=`hidden`),Q.current&&(Q.current.style.visibility=`hidden`)}function p(e){let t=e?$:-$;O.current=Math.max(0,Math.min(1,O.current+t)),Z.current&&(Z.current.style.visibility=`visible`),Q.current&&(Q.current.style.visibility=`hidden`),we.current&&(we.current.style.transform=`scaleY(${O.current})`);let n=1-O.current;a.style.cssText=`
3
3
  background-color: rgba(0,0,0,${n.toFixed(3)});
4
4
  will-change: background-color;
5
5
  transform: translateZ(0);
6
- `}function m(e){let t=e?Q:-Q;k.current=Math.max(0,Math.min(1,k.current+t)),j.current.volume=k.current,Z.current&&(Z.current.style.visibility=`visible`),X.current&&(X.current.style.visibility=`hidden`),Te.current&&(Te.current.style.transform=`scaleY(${k.current})`)}r.addEventListener(`touchend`,()=>{M.current&&setTimeout(()=>{d()},800)})})}catch(t){e()||console.error(`初始化播放器失败`,t)}},Me=m(()=>{},[x,S]),Ne=g(E),$=g(pe);return Ne.current=E,$.current=pe,xe.current=T,h(()=>(H.current=!1,I.current=0,B.current=null,V.current=null,z.current=!1,K(),q(),je(()=>H.current,()=>Ne.current?.(),e=>$.current?.(e)),window.webViewVideoData={resolution:w},()=>{H.current=!0,B.current=null,V.current=null,K(),q(),G(),Ce()}),[he,S,D,C]),h(()=>{let e=Number(T?.startTimeSeconds||0),t=T?.startPercent;if(!U.current||!j.current)return;let n=Number(j.current.duration||0);if(n<=0)return;let r=0;if(e>0)r=Math.min(n,e);else if(t!==void 0&&t>0)r=Math.min(n,t/100*n);else return;let i=j.current.currentTime;Math.abs(i-r)>1&&(j.current.currentTime=r)},[T?.startPercent,T?.startTimeSeconds]),ke()?v(`div`,{className:`w-full h-full relative ${p.videoBox} ${o}`,children:[_(`div`,{ref:_e,className:`w-full h-full`}),v(`div`,{ref:Ee,children:[v(`div`,{ref:X,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
7
- absolute left-[18px] top-[50%] translate-y-[-50%] flex flex-col items-center justify-center gap-[12px] z-50`,style:{visibility:`hidden`},children:[_(y,{src:`/svg/icon_jiazai_zhong.svg`,alt:`Icon`,width:20,height:20}),v(`div`,{className:`relative`,children:[_(`div`,{className:`h-[92px] w-[4px] bg-[#000000] rounded-[8px]`}),_(`div`,{ref:we,className:`h-[92px] w-[4px] bg-[#fff] rounded-[8px] absolute bottom-0`,style:{transformOrigin:`bottom`,transform:`scaleY(1)`,willChange:`transform`,backfaceVisibility:`hidden`,transition:`none`}})]})]}),v(`div`,{ref:Z,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
6
+ `}function m(e){let t=e?$:-$;k.current=Math.max(0,Math.min(1,k.current+t)),j.current.volume=k.current,Q.current&&(Q.current.style.visibility=`visible`),Z.current&&(Z.current.style.visibility=`hidden`),Te.current&&(Te.current.style.transform=`scaleY(${k.current})`)}r.addEventListener(`touchend`,()=>{M.current&&setTimeout(()=>{d()},800)})})}catch(t){e()||console.error(`初始化播放器失败`,t)}},Me=m(()=>{},[x,S]),Ne=g(E),Pe=g(me);return Ne.current=E,Pe.current=me,xe.current=T,h(()=>(U.current=!1,L.current=0,V.current=null,H.current=null,B.current=!1,q(),J(),je(()=>U.current,()=>Ne.current?.(),e=>Pe.current?.(e)),window.webViewVideoData={resolution:w},()=>{U.current=!0,V.current=null,H.current=null,q(),J(),K(),Ce()}),[oe,ge,S,D,C]),h(()=>{let e=Number(T?.startTimeSeconds||0),t=T?.startPercent;if(!W.current||!j.current)return;let n=Number(j.current.duration||0);if(n<=0)return;let r=0;if(e>0)r=Math.min(n,e);else if(t!==void 0&&t>0)r=Math.min(n,t/100*n);else return;let i=j.current.currentTime;Math.abs(i-r)>1&&(j.current.currentTime=r)},[T?.startPercent,T?.startTimeSeconds]),ke()?v(`div`,{className:`w-full h-full relative ${p.videoBox} ${o}`,children:[_(`div`,{ref:ve,className:`w-full h-full`}),v(`div`,{ref:Ee,children:[v(`div`,{ref:Z,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
7
+ absolute left-[18px] top-[50%] translate-y-[-50%] flex flex-col items-center justify-center gap-[12px] z-50`,style:{visibility:`hidden`},children:[_(y,{src:`/svg/icon_jiazai_zhong.svg`,alt:`Icon`,width:20,height:20}),v(`div`,{className:`relative`,children:[_(`div`,{className:`h-[92px] w-[4px] bg-[#000000] rounded-[8px]`}),_(`div`,{ref:we,className:`h-[92px] w-[4px] bg-[#fff] rounded-[8px] absolute bottom-0`,style:{transformOrigin:`bottom`,transform:`scaleY(1)`,willChange:`transform`,backfaceVisibility:`hidden`,transition:`none`}})]})]}),v(`div`,{ref:Q,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
8
8
  absolute right-[18px] top-[50%] translate-y-[-50%] flex flex-col items-center justify-center gap-[12px] z-50`,style:{visibility:`hidden`},children:[_(y,{src:`/svg/icon_shengyin_di.svg`,alt:`Icon`,width:20,height:20}),v(`div`,{className:`relative`,children:[_(`div`,{className:`h-[92px] w-[4px] bg-[#000000] rounded-[8px]`}),_(`div`,{ref:Te,className:`h-[92px] w-[4px] bg-[#fff] rounded-[8px] absolute bottom-0`,style:{transformOrigin:`bottom`,transform:`scaleY(1)`,willChange:`transform`,backfaceVisibility:`hidden`,transition:`none`}})]})]})]})]}):null}export{x as default};
@@ -0,0 +1,2 @@
1
+
2
+ "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pContentMatchAds as t}from"../../../service/generated/client.mjs";import{pContentMatchAdsKey as n}from"../../../service/generated/tanstack.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{useVideoPlayerRef as i}from"./video-player-ref-context.mjs";import{useIsClient as a}from"foxact/use-is-client";import{useEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";import{create as u}from"zustand";import{createJSONStorage as d,persist as f}from"zustand/middleware";import{createPortal as p}from"react-dom";const m=u()(f((e,t)=>({shownVideoIds:new Set,hasShown:e=>t().shownVideoIds.has(e),markAsShown:n=>{let r=t().shownVideoIds;if(!r.has(n)){let t=new Set(r);t.add(n),e({shownVideoIds:t})}}}),{name:`video-blind-ad-storage`,storage:typeof window<`u`?d(()=>sessionStorage):void 0,partialize:e=>({shownVideoIds:Array.from(e.shownVideoIds)}),merge:(e,t)=>({...t,shownVideoIds:new Set(e.shownVideoIds||[])})}));function h({videoId:u}){let d=i(),f=a(),h=e(e=>e.userId),{hasShown:g,markAsShown:_}=m(),v=s(0),y=s(null),[b,x]=c(!1),S=s(!1),C={user_id:h,ad_type:`blind`},{data:w,isLoading:T}=r(n(C),()=>t(C)),E=g(u);o(()=>{let e=d?.current?.getPlayer();if(!e||!w||E)return;let t=w.data?.settings?.trigger_video_progress_min??0;function n(r){if(S.current){e?.off(`timeupdate`,n);return}let i=r?.currentTime;if(y.current!==null){let e=i-y.current;e>0&&e<2&&(v.current+=e,!S.current&&v.current/60>=t&&(S.current=!0,x(!0)))}y.current=i}return e.on(`timeupdate`,n),()=>{e.off(`timeupdate`,n)}},[d,w,E]);let D=!E&&b;o(()=>{if(D)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=``}},[D]);function O(){E||(_(u),window.open(w?.data.materials?.[0].advertise_url))}return!f||typeof document>`u`||T||w?.data?.hit===!1||E||!b?null:p(l(`div`,{className:`blind-ad-overlay fixed inset-0 h-screen w-screen z-[99999]`,onClick:O}),document.body)}export{h as VideoBlindAdOverlay};
@@ -0,0 +1,2 @@
1
+
2
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);function r(){return t(n)}export{n as VideoPlayerRefContext,r as useVideoPlayerRef};
@@ -0,0 +1,2 @@
1
+
2
+ "use client";import e from"../../../utils/get-res-url.mjs";import{useIsClient as t}from"../../../hooks/use-is-client.mjs";import n from"../../../assets/icons/detail/video_play.mjs";import{useEffect as r,useImperativeHandle as i,useMemo as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({ref:u,adData:d=null,visible:f=!1,autoStart:p=!1,sessionKey:m=`default`,onAutoplayBlocked:h,onFinish:g,onSkip:_,onOpenLink:v}){let y=o(null),[b,x]=s(0),[S,C]=s(!1),w=t(),T=o(!1),E=Number(d?.settings?.skip_seconds||0),D=a(()=>d?.materials?.[0],[d?.materials]),O=String(D?.advertise_video||``).trim(),k=a(()=>O?O.startsWith(`/m3f`)?`${e()}/${O}`:`${e()}/m3f${O}`:``,[O]),A=!!O,j=A?S:f,M=b<=0;r(()=>{C(!1),x(E),T.current=!1;let e=y.current;if(e)try{e.pause(),e.currentTime=0,e.load()}catch(e){console.warn(`重置前贴片播放状态失败:`,e)}},[k,m,E]),r(()=>{if(!f||!D)return;if(E<=0){x(0);return}if(!j)return;let e=window.setInterval(()=>{x(t=>t<=1?(window.clearInterval(e),0):t-1)},1e3);return()=>{window.clearInterval(e)}},[D,j,m,E,f]),r(()=>{!f||!p||!A||!y.current||T.current||(T.current=!0,y.current.play().catch(e=>{console.warn(`自动启动前贴片播放失败:`,e),h?.()}))},[p,A,h,m,f]),i(u,()=>({async play(){if(!y.current)return!1;try{return await y.current.play(),!0}catch(e){return console.warn(`手动启动前贴片播放失败:`,e),!1}}}),[]);function N(){M&&_?.()}function P(){if(A&&!S){let e=y.current;if(!e)return;e.play().catch(e=>{console.warn(`手动启动前贴片播放失败:`,e)});return}let e=D?.advertise_url;e&&(v?.(e),window.open(e,`_blank`,`noopener,noreferrer`))}if(!w||typeof window>`u`||!d?.hit||!D||!A)return null;let F=c(`video`,{ref:y,src:k,poster:D?.advertise_icon||``,className:`pointer-events-none w-full h-full object-cover bg-black`,autoPlay:p,muted:!0,playsInline:!0,preload:`none`,onEnded:()=>{g?.()},onPlaying:()=>{C(!0)},onError:e=>{console.warn(`[video-preroll-ad][error]`,{sessionKey:m,error:e.currentTarget?.error})}});return l(`div`,{className:`video-preroll-ad absolute top-0 left-0 w-full h-full z-[9999] ${f?``:`pointer-events-none opacity-0`}`,"aria-hidden":!f,children:[c(`button`,{type:`button`,disabled:!M,onClick:N,className:`absolute z-[10] text-sm top-6 right-6 bg-black/30 text-white rounded-full px-6 py-1.5 flex items-center justify-center disabled:opacity-60 disabled:cursor-not-allowed`,children:M?`跳过`:`跳过 ${b}s`}),l(`div`,{role:`button`,tabIndex:0,onClick:P,className:`relative block w-full h-full`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P())},children:[F,A&&!S&&c(`div`,{className:`absolute inset-0 z-[2] flex items-center justify-center bg-black/20 pointer-events-none`,children:c(`div`,{className:`flex items-center justify-center w-12 h-12 rounded-full bg-[rgba(0,0,0,0.45)]`,children:c(n,{className:`w-[16px] h-[22px] text-white`})})})]})]})}export{u as VideoPrerollAd};
@@ -6,7 +6,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
6
6
  //#region components/ui/badge.d.ts
7
7
  /** badgeVariants 工具定义。 */
8
8
  declare const badgeVariants: (props?: ({
9
- variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
9
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  /** Badge 组件。 */
12
12
  declare function Badge({
@@ -7,8 +7,8 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
7
7
  //#region components/ui/button.d.ts
8
8
  /** buttonVariants 工具定义。 */
9
9
  declare const buttonVariants: (props?: ({
10
- variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
11
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
14
14
  type ButtonProps = Button.Props & VariantProps<typeof buttonVariants> & {
@@ -0,0 +1,10 @@
1
+
2
+ //#region hooks/use-is-client.d.ts
3
+ /**
4
+ * 判断当前是否在客户端环境
5
+ *
6
+ * 用于处理 SSR/CSR 兼容性问题
7
+ */
8
+ declare function useIsClient(): boolean;
9
+ //#endregion
10
+ export { useIsClient };
@@ -0,0 +1,2 @@
1
+
2
+ "use client";import{useEffect as e,useState as t}from"react";function n(){let[n,r]=t(!1);return e(()=>{r(!0)},[]),n}export{n as useIsClient};
package/dist/hooks.d.mts CHANGED
@@ -7,10 +7,11 @@ import { UseBrowseReportOptions, useBrowseReport } from "./hooks/use-browse-repo
7
7
  import { useGridFirstRowHeight, useSingleFirstRowHeight, useWaterfallFirstRowHeight } from "./hooks/use-first-row-height.mjs";
8
8
  import { useFollow } from "./hooks/use-follow.mjs";
9
9
  import { useFullscreenGestures } from "./hooks/use-fullscreen-gestures.mjs";
10
+ import { useIsClient } from "./hooks/use-is-client.mjs";
10
11
  import { useKeyboardOpen } from "./hooks/use-keyboard-open.mjs";
11
12
  import { LikeableItem, useLikeDislike } from "./hooks/use-like-dislike.mjs";
12
13
  import { useMinDurationLoading } from "./hooks/use-min-duration-loading.mjs";
13
14
  import { useSearchHistory } from "./hooks/use-search-history.mjs";
14
15
  import { useSticky } from "./hooks/use-sticky.mjs";
15
16
  import { useKeepAliveEffect, useKeepAliveState } from "./components/common/keep-scroll-position/index.mjs";
16
- export { AuthFields, HydrationBoundary, IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE, ImageTextRecommendAnyVideo, LikeableItem, PrefetchInfiniteItem, PrefetchItem, PrefetchQueryItem, UseBrowseReportOptions, buildImageTextRecommendChosenTags, buildImageTextRecommendRemoteMap, buildImageTextRecommendSmartPicked, getImageTextRecommendFixedIds, getImageTextRecommendLayoutTags, resolveImageTextRecommendVideoId, useAuth, useBrowseReport, useCloseLogin, useDeleteRequest, useExpireTime, useFollow, useFullscreenGestures, useGridFirstRowHeight, useIsLoggedIn, useKeepAliveEffect, useKeepAliveState, useKeyboardOpen, useLikeDislike, useLoginModalOpen, useLogout, useMinDurationLoading, useMutation, useOpenLogin, useOpenLoginAsync, useOpenResetPassword, usePaginated, usePrefetchQuery, useRefetchQuery, useRequest, useRequireLogin, useSearchHistory, useSetAuthFields, useSingleFirstRowHeight, useSticky, useToken, useUpdateRequest, useUserId, useUserInfo, useWaterfallFirstRowHeight };
17
+ export { AuthFields, HydrationBoundary, IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE, ImageTextRecommendAnyVideo, LikeableItem, PrefetchInfiniteItem, PrefetchItem, PrefetchQueryItem, UseBrowseReportOptions, buildImageTextRecommendChosenTags, buildImageTextRecommendRemoteMap, buildImageTextRecommendSmartPicked, getImageTextRecommendFixedIds, getImageTextRecommendLayoutTags, resolveImageTextRecommendVideoId, useAuth, useBrowseReport, useCloseLogin, useDeleteRequest, useExpireTime, useFollow, useFullscreenGestures, useGridFirstRowHeight, useIsClient, useIsLoggedIn, useKeepAliveEffect, useKeepAliveState, useKeyboardOpen, useLikeDislike, useLoginModalOpen, useLogout, useMinDurationLoading, useMutation, useOpenLogin, useOpenLoginAsync, useOpenResetPassword, usePaginated, usePrefetchQuery, useRefetchQuery, useRequest, useRequireLogin, useSearchHistory, useSetAuthFields, useSingleFirstRowHeight, useSticky, useToken, useUpdateRequest, useUserId, useUserInfo, useWaterfallFirstRowHeight };
package/dist/hooks.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as e,buildImageTextRecommendChosenTags as t,buildImageTextRecommendRemoteMap as n,buildImageTextRecommendSmartPicked as r,getImageTextRecommendFixedIds as i,getImageTextRecommendLayoutTags as a,resolveImageTextRecommendVideoId as o}from"./hooks/image-text-recommend.mjs";import{HydrationBoundary as s}from"./hooks/query/hydration-boundary.mjs";import{useDeleteRequest as c,useMutation as l,usePaginated as u,usePrefetchQuery as d,useRefetchQuery as f,useRequest as p,useUpdateRequest as m}from"./hooks/query/use-query.mjs";import{useAuth as h,useCloseLogin as g,useExpireTime as _,useIsLoggedIn as v,useLoginModalOpen as y,useLogout as b,useOpenLogin as x,useOpenLoginAsync as S,useOpenResetPassword as C,useRequireLogin as w,useSetAuthFields as T,useToken as E,useUserId as D,useUserInfo as O}from"./hooks/use-auth.mjs";import{useBrowseReport as k}from"./hooks/use-browse-report.mjs";import{useGridFirstRowHeight as A,useSingleFirstRowHeight as j,useWaterfallFirstRowHeight as M}from"./hooks/use-first-row-height.mjs";import{useFollow as N}from"./hooks/use-follow.mjs";import{useFullscreenGestures as P}from"./hooks/use-fullscreen-gestures.mjs";import{useKeyboardOpen as F}from"./hooks/use-keyboard-open.mjs";import{useLikeDislike as I}from"./hooks/use-like-dislike.mjs";import{useMinDurationLoading as L}from"./hooks/use-min-duration-loading.mjs";import{useSearchHistory as R}from"./hooks/use-search-history.mjs";import{useSticky as z}from"./hooks/use-sticky.mjs";import{useKeepAliveEffect as B,useKeepAliveState as V}from"./components/common/keep-scroll-position/index.mjs";export{s as HydrationBoundary,e as IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE,t as buildImageTextRecommendChosenTags,n as buildImageTextRecommendRemoteMap,r as buildImageTextRecommendSmartPicked,i as getImageTextRecommendFixedIds,a as getImageTextRecommendLayoutTags,o as resolveImageTextRecommendVideoId,h as useAuth,k as useBrowseReport,g as useCloseLogin,c as useDeleteRequest,_ as useExpireTime,N as useFollow,P as useFullscreenGestures,A as useGridFirstRowHeight,v as useIsLoggedIn,B as useKeepAliveEffect,V as useKeepAliveState,F as useKeyboardOpen,I as useLikeDislike,y as useLoginModalOpen,b as useLogout,L as useMinDurationLoading,l as useMutation,x as useOpenLogin,S as useOpenLoginAsync,C as useOpenResetPassword,u as usePaginated,d as usePrefetchQuery,f as useRefetchQuery,p as useRequest,w as useRequireLogin,R as useSearchHistory,T as useSetAuthFields,j as useSingleFirstRowHeight,z as useSticky,E as useToken,m as useUpdateRequest,D as useUserId,O as useUserInfo,M as useWaterfallFirstRowHeight};
2
+ import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as e,buildImageTextRecommendChosenTags as t,buildImageTextRecommendRemoteMap as n,buildImageTextRecommendSmartPicked as r,getImageTextRecommendFixedIds as i,getImageTextRecommendLayoutTags as a,resolveImageTextRecommendVideoId as o}from"./hooks/image-text-recommend.mjs";import{HydrationBoundary as s}from"./hooks/query/hydration-boundary.mjs";import{useDeleteRequest as c,useMutation as l,usePaginated as u,usePrefetchQuery as d,useRefetchQuery as f,useRequest as p,useUpdateRequest as m}from"./hooks/query/use-query.mjs";import{useAuth as h,useCloseLogin as g,useExpireTime as _,useIsLoggedIn as v,useLoginModalOpen as y,useLogout as b,useOpenLogin as x,useOpenLoginAsync as S,useOpenResetPassword as C,useRequireLogin as w,useSetAuthFields as T,useToken as E,useUserId as D,useUserInfo as O}from"./hooks/use-auth.mjs";import{useBrowseReport as k}from"./hooks/use-browse-report.mjs";import{useGridFirstRowHeight as A,useSingleFirstRowHeight as j,useWaterfallFirstRowHeight as M}from"./hooks/use-first-row-height.mjs";import{useFollow as N}from"./hooks/use-follow.mjs";import{useFullscreenGestures as P}from"./hooks/use-fullscreen-gestures.mjs";import{useIsClient as F}from"./hooks/use-is-client.mjs";import{useKeyboardOpen as I}from"./hooks/use-keyboard-open.mjs";import{useLikeDislike as L}from"./hooks/use-like-dislike.mjs";import{useMinDurationLoading as R}from"./hooks/use-min-duration-loading.mjs";import{useSearchHistory as z}from"./hooks/use-search-history.mjs";import{useSticky as B}from"./hooks/use-sticky.mjs";import{useKeepAliveEffect as V,useKeepAliveState as H}from"./components/common/keep-scroll-position/index.mjs";export{s as HydrationBoundary,e as IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE,t as buildImageTextRecommendChosenTags,n as buildImageTextRecommendRemoteMap,r as buildImageTextRecommendSmartPicked,i as getImageTextRecommendFixedIds,a as getImageTextRecommendLayoutTags,o as resolveImageTextRecommendVideoId,h as useAuth,k as useBrowseReport,g as useCloseLogin,c as useDeleteRequest,_ as useExpireTime,N as useFollow,P as useFullscreenGestures,A as useGridFirstRowHeight,F as useIsClient,v as useIsLoggedIn,V as useKeepAliveEffect,H as useKeepAliveState,I as useKeyboardOpen,L as useLikeDislike,y as useLoginModalOpen,b as useLogout,R as useMinDurationLoading,l as useMutation,x as useOpenLogin,S as useOpenLoginAsync,C as useOpenResetPassword,u as usePaginated,d as usePrefetchQuery,f as useRefetchQuery,p as useRequest,w as useRequireLogin,z as useSearchHistory,T as useSetAuthFields,j as useSingleFirstRowHeight,B as useSticky,E as useToken,m as useUpdateRequest,D as useUserId,O as useUserInfo,M as useWaterfallFirstRowHeight};
@@ -36,22 +36,10 @@ interface AdsMatchRequest {
36
36
  * 广告类型。
37
37
  */
38
38
  adType: AdsMatchAdType;
39
- /**
40
- * 登录用户 ID,已登录时优先传。
41
- */
42
- userId?: string;
43
- /**
44
- * 设备 ID,游客场景建议传。
45
- */
46
- deviceId?: string;
47
39
  /**
48
40
  * 组件唯一标识。
49
41
  */
50
42
  componentId?: string;
51
- /**
52
- * 应用 code。
53
- */
54
- appCode: string;
55
43
  /**
56
44
  * 场景上下文。
57
45
  */
@@ -171,6 +159,6 @@ declare function pContentAdsMatch(data: AdsMatchRequest, config?: ExtraRequestCo
171
159
  /**
172
160
  * 广告匹配接口缓存 key。
173
161
  */
174
- declare function pContentAdsMatchKey(data: Pick<AdsMatchRequest, 'adType' | 'appCode' | 'componentId' | 'sceneContext'>): (string | AdsMatchSceneContext)[];
162
+ declare function pContentAdsMatchKey(data: Pick<AdsMatchRequest, 'adType' | 'componentId' | 'sceneContext'>): (string | AdsMatchSceneContext)[];
175
163
  //#endregion
176
164
  export { AdsMatchAdType, AdsMatchConfig, AdsMatchMaterial, AdsMatchRequest, AdsMatchResponseData, AdsMatchSceneContext, pContentAdsMatch, pContentAdsMatchKey };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"../utils/http.mjs";async function t(t,n){let a=await e.request({...n??{},url:`/api/content/matchAds`,method:`POST`,data:i(t)});return{...a,data:r(a.data)??{}}}function n(e){return[`content-ads-match`,e.adType,e.appCode,e.componentId??``,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:o(e.config),materials:e.materials?.map(s)??[]}}function i(e){return{ad_type:e.adType,user_id:e.userId??`69b268b9ba530cd3d98c8b7e`,device_id:e.deviceId,component_id:e.componentId??`111111`,app_code:e.appCode,scene_context:a(e.sceneContext)??{}}}function a(e){if(e)return{startup_type:e.startupType,is_startup_hot:e.isStartupHot,background_durationMin:e.backgroundDurationMin,video_played_seconds:e.videoPlayedSeconds}}function o(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function s(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};
2
+ import e from"../utils/http.mjs";async function t(t,n){let a=await e.request({...n??{},url:`/api/content/matchAds`,method:`POST`,data:i(t)});return{...a,data:r(a.data)??{}}}function n(e){return[`content-ads-match`,e.adType,e.componentId??``,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:o(e.config),materials:e.materials?.map(s)??[]}}function i(e){let t=a(e.sceneContext);return{ad_type:e.adType,component_id:e.componentId??`111111`,...t?{scene_context:t}:{}}}function a(e){if(e)return{startup_type:e.startupType,is_startup_hot:e.isStartupHot,background_durationMin:e.backgroundDurationMin,video_played_seconds:e.videoPlayedSeconds}}function o(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function s(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};
@@ -1,5 +1,5 @@
1
1
 
2
- import { GetApiCommerceQueryOrderResultQuery, GetApiCommerceQueryOrderResultRes, GetApiCommunityGetCollectionInfoQuery, GetApiCommunityGetCollectionInfoRes, GetApiCommunityGetCommentsQuery, GetApiCommunityGetCommentsRes, GetApiCommunityGetContentInfoQuery, GetApiCommunityGetContentInfoRes, GetApiCommunityGetContentListQuery, GetApiCommunityGetContentListRes, GetApiCommunityGetHotContentListQuery, GetApiCommunityGetHotContentListRes, GetApiCommunityGetSubscribedCollectionsQuery, GetApiCommunityGetSubscribedCollectionsRes, GetApiCommunityGetUserCollectionsQuery, GetApiCommunityGetUserCollectionsRes, GetApiContentGetAdvertiseByCodeQuery, GetApiContentGetAdvertiseByCodeRes, GetApiContentGetAppChannelBlockDataQuery, GetApiContentGetAppChannelBlockDataRes, GetApiContentGetAppChannelBlockQuery, GetApiContentGetAppChannelBlockRes, GetApiContentGetAppChannelsQuery, GetApiContentGetAppChannelsRes, GetApiContentGetAppComponentRes, GetApiContentGetGuessYouLikeVideosQuery, GetApiContentGetGuessYouLikeVideosRes, GetApiContentGetHotVideoListQuery, GetApiContentGetHotVideoListRes, GetApiContentGetRecommendSearchListQuery, GetApiContentGetRecommendSearchListRes, GetApiContentGetRecommendVideoListQuery, GetApiContentGetRecommendVideoListRes, GetApiContentGetSeoConfigQuery, GetApiContentGetSeoConfigRes, GetApiContentGetVideoDetailByApiQuery, GetApiContentGetVideoDetailByApiRes, GetApiContentGetVideoDetailQuery, GetApiContentGetVideoDetailRes, GetApiContentListVisibleFloatingBallQuery, GetApiContentListVisibleFloatingBallRes, GetApiContentProcessM3u8Query, GetApiContentProcessM3u8Res, GetApiInteractionCheckMutualFollowQuery, GetApiInteractionCheckMutualFollowRes, GetApiInteractionGetBrowseListQuery, GetApiInteractionGetBrowseListRes, GetApiInteractionGetContentDislikeListQuery, GetApiInteractionGetContentDislikeListRes, GetApiInteractionGetContentLikeListQuery, GetApiInteractionGetContentLikeListRes, GetApiInteractionGetDislikeListQuery, GetApiInteractionGetDislikeListRes, GetApiInteractionGetFolderQuery, GetApiInteractionGetFolderRes, GetApiInteractionGetFolderStatsQuery, GetApiInteractionGetFolderStatsRes, GetApiInteractionGetFollowStatsQuery, GetApiInteractionGetFollowStatsRes, GetApiInteractionGetFollowerListQuery, GetApiInteractionGetFollowerListRes, GetApiInteractionGetFollowingContentListQuery, GetApiInteractionGetFollowingContentListRes, GetApiInteractionGetFollowingListQuery, GetApiInteractionGetFollowingListRes, GetApiInteractionGetFollowingUserUpdatesQuery, GetApiInteractionGetFollowingUserUpdatesRes, GetApiInteractionGetLikeListQuery, GetApiInteractionGetLikeListRes, GetApiInteractionListCollectsQuery, GetApiInteractionListCollectsRes, GetApiInteractionListFoldersQuery, GetApiInteractionListFoldersRes, GetApiUserGetGuestIdentityQuery, GetApiUserGetGuestIdentityRes, GetApiUserGetUserEditInfoQuery, GetApiUserGetUserEditInfoRes, GetApiUserGetUserInfoQuery, GetApiUserGetUserInfoRes, GetApiUserGetUserPrivacySettingsQuery, GetApiUserGetUserPrivacySettingsRes, GetApiUserViewUserInfoQuery, GetApiUserViewUserInfoRes, PostApiCommerceCreatePaymentReqBody, PostApiCommerceCreatePaymentRes, PostApiCommerceGetPaymentMethodsReqBody, PostApiCommerceGetPaymentMethodsRes, PostApiCommercePaymentSuccessCallbackReqBody, PostApiCommercePaymentSuccessCallbackRes, PostApiCommerceRefundCallbackReqBody, PostApiCommerceRefundCallbackRes, PostApiCommunityAddContentToCollectionReqBody, PostApiCommunityAddContentToCollectionRes, PostApiCommunityBatchDeleteCollectionReqBody, PostApiCommunityBatchDeleteCollectionRes, PostApiCommunityCreateCollectionReqBody, PostApiCommunityCreateCollectionRes, PostApiCommunityCreateCommentReqBody, PostApiCommunityCreateCommentRes, PostApiCommunityDeleteCollectionReqBody, PostApiCommunityDeleteCollectionRes, PostApiCommunityDeleteCommentReqBody, PostApiCommunityDeleteCommentRes, PostApiCommunityDeleteContentReqBody, PostApiCommunityDeleteContentRes, PostApiCommunityDislikeCommentReqBody, PostApiCommunityDislikeCommentRes, PostApiCommunityGetUploadPresignedURLReqBody, PostApiCommunityGetUploadPresignedURLRes, PostApiCommunityLikeCommentReqBody, PostApiCommunityLikeCommentRes, PostApiCommunityMoveCollectionContentReqBody, PostApiCommunityMoveCollectionContentRes, PostApiCommunityPublishContentReqBody, PostApiCommunityPublishContentRes, PostApiCommunityRemoveContentFromCollectionReqBody, PostApiCommunityRemoveContentFromCollectionRes, PostApiCommunitySearchCurAccountFollowingUsersInfoReqBody, PostApiCommunitySearchCurAccountFollowingUsersInfoRes, PostApiCommunityShareContentReqBody, PostApiCommunityShareContentRes, PostApiCommunitySubscribeCollectionReqBody, PostApiCommunitySubscribeCollectionRes, PostApiCommunityUpdateCollectionReqBody, PostApiCommunityUpdateCollectionRes, PostApiCommunityUpdateContentReqBody, PostApiCommunityUpdateContentRes, PostApiCommunityUploadMediaReqBody, PostApiCommunityUploadMediaRes, PostApiContentBatchGetVideoDetailReqBody, PostApiContentBatchGetVideoDetailRes, PostApiContentGetNewstVideoListReqBody, PostApiContentGetNewstVideoListRes, PostApiContentGetPopularVideoListReqBody, PostApiContentGetPopularVideoListRes, PostApiContentGetTopRatedVideoListReqBody, PostApiContentGetTopRatedVideoListRes, PostApiContentMatchAdsReqBody, PostApiContentMatchAdsRes, PostApiInteractionAddCollectReqBody, PostApiInteractionAddCollectRes, PostApiInteractionBatchClearBrowseReqBody, PostApiInteractionBatchClearBrowseRes, PostApiInteractionBatchDeleteCollectsReqBody, PostApiInteractionBatchDeleteCollectsRes, PostApiInteractionBatchDeleteFoldersReqBody, PostApiInteractionBatchDeleteFoldersRes, PostApiInteractionBatchGetCommentLikeStatusReqBody, PostApiInteractionBatchGetCommentLikeStatusRes, PostApiInteractionBatchGetFollowStatsReqBody, PostApiInteractionBatchGetFollowStatsRes, PostApiInteractionBatchGetLikeStatusReqBody, PostApiInteractionBatchGetLikeStatusRes, PostApiInteractionBatchQueryContentInteractionsReqBody, PostApiInteractionBatchQueryContentInteractionsRes, PostApiInteractionBrowseReqBody, PostApiInteractionBrowseRes, PostApiInteractionCancelDislikeReqBody, PostApiInteractionCancelDislikeRes, PostApiInteractionCancelLikeReqBody, PostApiInteractionCancelLikeRes, PostApiInteractionCheckCollectReqBody, PostApiInteractionCheckCollectRes, PostApiInteractionCheckFollowReqBody, PostApiInteractionCheckFollowRes, PostApiInteractionClearBrowseHistoryReqBody, PostApiInteractionClearBrowseHistoryRes, PostApiInteractionCreateFolderReqBody, PostApiInteractionCreateFolderRes, PostApiInteractionDeleteBrowseRecordReqBody, PostApiInteractionDeleteBrowseRecordRes, PostApiInteractionDeleteFolderReqBody, PostApiInteractionDeleteFolderRes, PostApiInteractionDislikeCommentReqBody, PostApiInteractionDislikeCommentRes, PostApiInteractionDislikeReqBody, PostApiInteractionDislikeRes, PostApiInteractionFollowReqBody, PostApiInteractionFollowRes, PostApiInteractionLikeCommentReqBody, PostApiInteractionLikeCommentRes, PostApiInteractionLikeReqBody, PostApiInteractionLikeRes, PostApiInteractionMoveCollectsReqBody, PostApiInteractionMoveCollectsRes, PostApiInteractionRemoveCollectReqBody, PostApiInteractionRemoveCollectRes, PostApiInteractionTrackEventsBatchReqBody, PostApiInteractionTrackEventsBatchRes, PostApiInteractionUnfollowReqBody, PostApiInteractionUnfollowRes, PostApiInteractionUnifiedBatchLikeDislikeReqBody, PostApiInteractionUnifiedBatchLikeDislikeRes, PostApiInteractionUpdateFolderReqBody, PostApiInteractionUpdateFolderRes, PostApiInteractionUpdateFollowingContentUpdateTimeReqBody, PostApiInteractionUpdateFollowingContentUpdateTimeRes, PostApiUserEditUserInfoReqBody, PostApiUserEditUserInfoRes, PostApiUserLoginReqBody, PostApiUserLoginRes, PostApiUserRegisterByVerifyEmailCodeReqBody, PostApiUserRegisterByVerifyEmailCodeRes, PostApiUserRegisterReqBody, PostApiUserRegisterRes, PostApiUserResetForgetPasswordReqBody, PostApiUserResetForgetPasswordRes, PostApiUserResetPasswordReqBody, PostApiUserResetPasswordRes, PostApiUserSendEmailCodeReqBody, PostApiUserSendEmailCodeRes, PostApiUserSendForgetEmailCodeReqBody, PostApiUserSendForgetEmailCodeRes, PostApiUserSendResetPasswordEmailCodeReqBody, PostApiUserSendResetPasswordEmailCodeRes, PostApiUserUploadUserBgImageReqBody, PostApiUserUploadUserBgImageRes, PostApiUserUserFeedbackReqBody, PostApiUserUserFeedbackRes, PostApiUserUserPrivacySettingsReqBody, PostApiUserUserPrivacySettingsRes, PostApiUserVerifyEmailCodeReqBody, PostApiUserVerifyEmailCodeRes, PostApiUserVerifyForgetEmailCodeReqBody, PostApiUserVerifyForgetEmailCodeRes, PostApiUserVerifyResetPasswordEmailCodeReqBody, PostApiUserVerifyResetPasswordEmailCodeRes } from "../../types.mjs";
2
+ import { GetApiCommerceQueryOrderResultQuery, GetApiCommerceQueryOrderResultRes, GetApiCommunityGetCollectionInfoQuery, GetApiCommunityGetCollectionInfoRes, GetApiCommunityGetCommentsQuery, GetApiCommunityGetCommentsRes, GetApiCommunityGetContentInfoQuery, GetApiCommunityGetContentInfoRes, GetApiCommunityGetContentListQuery, GetApiCommunityGetContentListRes, GetApiCommunityGetHotContentListQuery, GetApiCommunityGetHotContentListRes, GetApiCommunityGetSubscribedCollectionsQuery, GetApiCommunityGetSubscribedCollectionsRes, GetApiCommunityGetUserCollectionsQuery, GetApiCommunityGetUserCollectionsRes, GetApiContentGetAdvertiseByCodeQuery, GetApiContentGetAdvertiseByCodeRes, GetApiContentGetAppChannelBlockDataQuery, GetApiContentGetAppChannelBlockDataRes, GetApiContentGetAppChannelBlockQuery, GetApiContentGetAppChannelBlockRes, GetApiContentGetAppChannelsQuery, GetApiContentGetAppChannelsRes, GetApiContentGetAppComponentRes, GetApiContentGetGuessYouLikeVideosQuery, GetApiContentGetGuessYouLikeVideosRes, GetApiContentGetHotVideoListQuery, GetApiContentGetHotVideoListRes, GetApiContentGetRecommendSearchListQuery, GetApiContentGetRecommendSearchListRes, GetApiContentGetRecommendVideoListQuery, GetApiContentGetRecommendVideoListRes, GetApiContentGetSeoConfigQuery, GetApiContentGetSeoConfigRes, GetApiContentGetVideoDetailByApiQuery, GetApiContentGetVideoDetailByApiRes, GetApiContentGetVideoDetailQuery, GetApiContentGetVideoDetailRes, GetApiContentListVisibleFloatingBallQuery, GetApiContentListVisibleFloatingBallRes, GetApiContentProcessM3u8Query, GetApiContentProcessM3u8Res, GetApiInteractionCheckMutualFollowQuery, GetApiInteractionCheckMutualFollowRes, GetApiInteractionGetBrowseListQuery, GetApiInteractionGetBrowseListRes, GetApiInteractionGetContentDislikeListQuery, GetApiInteractionGetContentDislikeListRes, GetApiInteractionGetContentLikeListQuery, GetApiInteractionGetContentLikeListRes, GetApiInteractionGetDislikeListQuery, GetApiInteractionGetDislikeListRes, GetApiInteractionGetFolderQuery, GetApiInteractionGetFolderRes, GetApiInteractionGetFolderStatsQuery, GetApiInteractionGetFolderStatsRes, GetApiInteractionGetFollowStatsQuery, GetApiInteractionGetFollowStatsRes, GetApiInteractionGetFollowerListQuery, GetApiInteractionGetFollowerListRes, GetApiInteractionGetFollowingContentListQuery, GetApiInteractionGetFollowingContentListRes, GetApiInteractionGetFollowingListQuery, GetApiInteractionGetFollowingListRes, GetApiInteractionGetFollowingUserUpdatesQuery, GetApiInteractionGetFollowingUserUpdatesRes, GetApiInteractionGetLikeListQuery, GetApiInteractionGetLikeListRes, GetApiInteractionListCollectsQuery, GetApiInteractionListCollectsRes, GetApiInteractionListFoldersQuery, GetApiInteractionListFoldersRes, GetApiUserGetGuestIdentityQuery, GetApiUserGetGuestIdentityRes, GetApiUserGetUserEditInfoQuery, GetApiUserGetUserEditInfoRes, GetApiUserGetUserInfoQuery, GetApiUserGetUserInfoRes, GetApiUserGetUserPrivacySettingsQuery, GetApiUserGetUserPrivacySettingsRes, GetApiUserGetVisitorPermissionConfigQuery, GetApiUserGetVisitorPermissionConfigRes, GetApiUserViewUserInfoQuery, GetApiUserViewUserInfoRes, PostApiCommerceCreatePaymentReqBody, PostApiCommerceCreatePaymentRes, PostApiCommerceGetPaymentMethodsReqBody, PostApiCommerceGetPaymentMethodsRes, PostApiCommercePaymentSuccessCallbackReqBody, PostApiCommercePaymentSuccessCallbackRes, PostApiCommerceRefundCallbackReqBody, PostApiCommerceRefundCallbackRes, PostApiCommunityAddContentToCollectionReqBody, PostApiCommunityAddContentToCollectionRes, PostApiCommunityBatchDeleteCollectionReqBody, PostApiCommunityBatchDeleteCollectionRes, PostApiCommunityCreateCollectionReqBody, PostApiCommunityCreateCollectionRes, PostApiCommunityCreateCommentReqBody, PostApiCommunityCreateCommentRes, PostApiCommunityDeleteCollectionReqBody, PostApiCommunityDeleteCollectionRes, PostApiCommunityDeleteCommentReqBody, PostApiCommunityDeleteCommentRes, PostApiCommunityDeleteContentReqBody, PostApiCommunityDeleteContentRes, PostApiCommunityDislikeCommentReqBody, PostApiCommunityDislikeCommentRes, PostApiCommunityGetUploadPresignedURLReqBody, PostApiCommunityGetUploadPresignedURLRes, PostApiCommunityLikeCommentReqBody, PostApiCommunityLikeCommentRes, PostApiCommunityMoveCollectionContentReqBody, PostApiCommunityMoveCollectionContentRes, PostApiCommunityPublishContentReqBody, PostApiCommunityPublishContentRes, PostApiCommunityRemoveContentFromCollectionReqBody, PostApiCommunityRemoveContentFromCollectionRes, PostApiCommunitySearchCurAccountFollowingUsersInfoReqBody, PostApiCommunitySearchCurAccountFollowingUsersInfoRes, PostApiCommunityShareContentReqBody, PostApiCommunityShareContentRes, PostApiCommunitySubscribeCollectionReqBody, PostApiCommunitySubscribeCollectionRes, PostApiCommunityUpdateCollectionReqBody, PostApiCommunityUpdateCollectionRes, PostApiCommunityUpdateContentReqBody, PostApiCommunityUpdateContentRes, PostApiCommunityUploadMediaReqBody, PostApiCommunityUploadMediaRes, PostApiContentBatchGetVideoDetailReqBody, PostApiContentBatchGetVideoDetailRes, PostApiContentGetMostPlayedVideoListReqBody, PostApiContentGetMostPlayedVideoListRes, PostApiContentGetNewstVideoListReqBody, PostApiContentGetNewstVideoListRes, PostApiContentGetPopularVideoListReqBody, PostApiContentGetPopularVideoListRes, PostApiContentGetTopRatedVideoListReqBody, PostApiContentGetTopRatedVideoListRes, PostApiContentMatchAdsReqBody, PostApiContentMatchAdsRes, PostApiInteractionAddCollectReqBody, PostApiInteractionAddCollectRes, PostApiInteractionBatchClearBrowseReqBody, PostApiInteractionBatchClearBrowseRes, PostApiInteractionBatchDeleteCollectsReqBody, PostApiInteractionBatchDeleteCollectsRes, PostApiInteractionBatchDeleteFoldersReqBody, PostApiInteractionBatchDeleteFoldersRes, PostApiInteractionBatchGetCommentLikeStatusReqBody, PostApiInteractionBatchGetCommentLikeStatusRes, PostApiInteractionBatchGetFollowStatsReqBody, PostApiInteractionBatchGetFollowStatsRes, PostApiInteractionBatchGetLikeStatusReqBody, PostApiInteractionBatchGetLikeStatusRes, PostApiInteractionBatchQueryContentInteractionsReqBody, PostApiInteractionBatchQueryContentInteractionsRes, PostApiInteractionBrowseReqBody, PostApiInteractionBrowseRes, PostApiInteractionCancelDislikeReqBody, PostApiInteractionCancelDislikeRes, PostApiInteractionCancelLikeReqBody, PostApiInteractionCancelLikeRes, PostApiInteractionCheckCollectReqBody, PostApiInteractionCheckCollectRes, PostApiInteractionCheckFollowReqBody, PostApiInteractionCheckFollowRes, PostApiInteractionClearBrowseHistoryReqBody, PostApiInteractionClearBrowseHistoryRes, PostApiInteractionCreateFolderReqBody, PostApiInteractionCreateFolderRes, PostApiInteractionDeleteBrowseRecordReqBody, PostApiInteractionDeleteBrowseRecordRes, PostApiInteractionDeleteFolderReqBody, PostApiInteractionDeleteFolderRes, PostApiInteractionDislikeCommentReqBody, PostApiInteractionDislikeCommentRes, PostApiInteractionDislikeReqBody, PostApiInteractionDislikeRes, PostApiInteractionFollowReqBody, PostApiInteractionFollowRes, PostApiInteractionLikeCommentReqBody, PostApiInteractionLikeCommentRes, PostApiInteractionLikeReqBody, PostApiInteractionLikeRes, PostApiInteractionMoveCollectsReqBody, PostApiInteractionMoveCollectsRes, PostApiInteractionRemoveCollectReqBody, PostApiInteractionRemoveCollectRes, PostApiInteractionTrackEventsBatchReqBody, PostApiInteractionTrackEventsBatchRes, PostApiInteractionUnfollowReqBody, PostApiInteractionUnfollowRes, PostApiInteractionUnifiedBatchLikeDislikeReqBody, PostApiInteractionUnifiedBatchLikeDislikeRes, PostApiInteractionUpdateFolderReqBody, PostApiInteractionUpdateFolderRes, PostApiInteractionUpdateFollowingContentUpdateTimeReqBody, PostApiInteractionUpdateFollowingContentUpdateTimeRes, PostApiUserEditUserInfoReqBody, PostApiUserEditUserInfoRes, PostApiUserLoginReqBody, PostApiUserLoginRes, PostApiUserRegisterByVerifyEmailCodeReqBody, PostApiUserRegisterByVerifyEmailCodeRes, PostApiUserRegisterReqBody, PostApiUserRegisterRes, PostApiUserResetForgetPasswordReqBody, PostApiUserResetForgetPasswordRes, PostApiUserResetPasswordReqBody, PostApiUserResetPasswordRes, PostApiUserSendEmailCodeReqBody, PostApiUserSendEmailCodeRes, PostApiUserSendForgetEmailCodeReqBody, PostApiUserSendForgetEmailCodeRes, PostApiUserSendResetPasswordEmailCodeReqBody, PostApiUserSendResetPasswordEmailCodeRes, PostApiUserUploadUserBgImageReqBody, PostApiUserUploadUserBgImageRes, PostApiUserUserFeedbackReqBody, PostApiUserUserFeedbackRes, PostApiUserUserPrivacySettingsReqBody, PostApiUserUserPrivacySettingsRes, PostApiUserVerifyEmailCodeReqBody, PostApiUserVerifyEmailCodeRes, PostApiUserVerifyForgetEmailCodeReqBody, PostApiUserVerifyForgetEmailCodeRes, PostApiUserVerifyResetPasswordEmailCodeReqBody, PostApiUserVerifyResetPasswordEmailCodeRes } from "../../types.mjs";
3
3
  import { RequestConfig, ResponseData } from "../../utils/http.mjs";
4
4
 
5
5
  //#region service/generated/client.d.ts
@@ -180,6 +180,10 @@ declare function gContentGetSeoConfig(query?: GetApiContentGetSeoConfigQuery, co
180
180
  * 广告匹配(不包含信息流广告)
181
181
  */
182
182
  declare function pContentMatchAds(data: PostApiContentMatchAdsReqBody, config?: ExtraRequestConfig): Promise<ResponseData<PostApiContentMatchAdsRes>>;
183
+ /**
184
+ * 最热视频列表(按play_count排序,游标分页)
185
+ */
186
+ declare function pContentGetMostPlayedVideoList(data: PostApiContentGetMostPlayedVideoListReqBody, config?: ExtraRequestConfig): Promise<ResponseData<PostApiContentGetMostPlayedVideoListRes>>;
183
187
  /**
184
188
  * 处理 M3U8 文件。底层调用 gRPC ContentService.ProcessM3u8 方法。返回处理后的 M3U8 文件内容。
185
189
  */
@@ -440,6 +444,10 @@ declare function gUserViewUserInfo(query?: GetApiUserViewUserInfoQuery, config?:
440
444
  * 注册通过验证注册邮箱验证码
441
445
  */
442
446
  declare function pUserRegisterByVerifyEmailCode(data: PostApiUserRegisterByVerifyEmailCodeReqBody, config?: ExtraRequestConfig): Promise<ResponseData<PostApiUserRegisterByVerifyEmailCodeRes>>;
447
+ /**
448
+ * 获取访客权限配置
449
+ */
450
+ declare function gUserGetVisitorPermissionConfig(query?: GetApiUserGetVisitorPermissionConfigQuery, config?: ExtraRequestConfig): Promise<ResponseData<GetApiUserGetVisitorPermissionConfigRes>>;
443
451
  /**
444
452
  * 发起支付
445
453
  */
@@ -461,4 +469,4 @@ declare function pCommercePaymentSuccessCallback(data: PostApiCommercePaymentSuc
461
469
  */
462
470
  declare function pCommerceRefundCallback(data: PostApiCommerceRefundCallbackReqBody, config?: ExtraRequestConfig): Promise<ResponseData<PostApiCommerceRefundCallbackRes>>;
463
471
  //#endregion
464
- export { gCommerceQueryOrderResult, gCommunityGetCollectionInfo, gCommunityGetComments, gCommunityGetContentInfo, gCommunityGetContentList, gCommunityGetHotContentList, gCommunityGetSubscribedCollections, gCommunityGetUserCollections, gContentGetAdvertiseByCode, gContentGetAppChannelBlock, gContentGetAppChannelBlockData, gContentGetAppChannels, gContentGetAppComponent, gContentGetGuessYouLikeVideos, gContentGetHotVideoList, gContentGetRecommendSearchList, gContentGetRecommendVideoList, gContentGetSeoConfig, gContentGetVideoDetail, gContentGetVideoDetailByApi, gContentListVisibleFloatingBall, gContentProcessM3u8, gInteractionCheckMutualFollow, gInteractionGetBrowseList, gInteractionGetContentDislikeList, gInteractionGetContentLikeList, gInteractionGetDislikeList, gInteractionGetFolder, gInteractionGetFolderStats, gInteractionGetFollowStats, gInteractionGetFollowerList, gInteractionGetFollowingContentList, gInteractionGetFollowingList, gInteractionGetFollowingUserUpdates, gInteractionGetLikeList, gInteractionListCollects, gInteractionListFolders, gUserGetGuestIdentity, gUserGetUserEditInfo, gUserGetUserInfo, gUserGetUserPrivacySettings, gUserViewUserInfo, pCommerceCreatePayment, pCommerceGetPaymentMethods, pCommercePaymentSuccessCallback, pCommerceRefundCallback, pCommunityAddContentToCollection, pCommunityBatchDeleteCollection, pCommunityCreateCollection, pCommunityCreateComment, pCommunityDeleteCollection, pCommunityDeleteComment, pCommunityDeleteContent, pCommunityDislikeComment, pCommunityGetUploadPresignedURL, pCommunityLikeComment, pCommunityMoveCollectionContent, pCommunityPublishContent, pCommunityRemoveContentFromCollection, pCommunitySearchCurAccountFollowingUsersInfo, pCommunityShareContent, pCommunitySubscribeCollection, pCommunityUpdateCollection, pCommunityUpdateContent, pCommunityUploadMedia, pContentBatchGetVideoDetail, pContentGetNewstVideoList, pContentGetPopularVideoList, pContentGetTopRatedVideoList, pContentMatchAds, pInteractionAddCollect, pInteractionBatchClearBrowse, pInteractionBatchDeleteCollects, pInteractionBatchDeleteFolders, pInteractionBatchGetCommentLikeStatus, pInteractionBatchGetFollowStats, pInteractionBatchGetLikeStatus, pInteractionBatchQueryContentInteractions, pInteractionBrowse, pInteractionCancelDislike, pInteractionCancelLike, pInteractionCheckCollect, pInteractionCheckFollow, pInteractionClearBrowseHistory, pInteractionCreateFolder, pInteractionDeleteBrowseRecord, pInteractionDeleteFolder, pInteractionDislike, pInteractionDislikeComment, pInteractionFollow, pInteractionLike, pInteractionLikeComment, pInteractionMoveCollects, pInteractionRemoveCollect, pInteractionTrackEventsBatch, pInteractionUnfollow, pInteractionUnifiedBatchLikeDislike, pInteractionUpdateFolder, pInteractionUpdateFollowingContentUpdateTime, pUserEditUserInfo, pUserLogin, pUserRegister, pUserRegisterByVerifyEmailCode, pUserResetForgetPassword, pUserResetPassword, pUserSendEmailCode, pUserSendForgetEmailCode, pUserSendResetPasswordEmailCode, pUserUploadUserBgImage, pUserUserFeedback, pUserUserPrivacySettings, pUserVerifyEmailCode, pUserVerifyForgetEmailCode, pUserVerifyResetPasswordEmailCode };
472
+ export { gCommerceQueryOrderResult, gCommunityGetCollectionInfo, gCommunityGetComments, gCommunityGetContentInfo, gCommunityGetContentList, gCommunityGetHotContentList, gCommunityGetSubscribedCollections, gCommunityGetUserCollections, gContentGetAdvertiseByCode, gContentGetAppChannelBlock, gContentGetAppChannelBlockData, gContentGetAppChannels, gContentGetAppComponent, gContentGetGuessYouLikeVideos, gContentGetHotVideoList, gContentGetRecommendSearchList, gContentGetRecommendVideoList, gContentGetSeoConfig, gContentGetVideoDetail, gContentGetVideoDetailByApi, gContentListVisibleFloatingBall, gContentProcessM3u8, gInteractionCheckMutualFollow, gInteractionGetBrowseList, gInteractionGetContentDislikeList, gInteractionGetContentLikeList, gInteractionGetDislikeList, gInteractionGetFolder, gInteractionGetFolderStats, gInteractionGetFollowStats, gInteractionGetFollowerList, gInteractionGetFollowingContentList, gInteractionGetFollowingList, gInteractionGetFollowingUserUpdates, gInteractionGetLikeList, gInteractionListCollects, gInteractionListFolders, gUserGetGuestIdentity, gUserGetUserEditInfo, gUserGetUserInfo, gUserGetUserPrivacySettings, gUserGetVisitorPermissionConfig, gUserViewUserInfo, pCommerceCreatePayment, pCommerceGetPaymentMethods, pCommercePaymentSuccessCallback, pCommerceRefundCallback, pCommunityAddContentToCollection, pCommunityBatchDeleteCollection, pCommunityCreateCollection, pCommunityCreateComment, pCommunityDeleteCollection, pCommunityDeleteComment, pCommunityDeleteContent, pCommunityDislikeComment, pCommunityGetUploadPresignedURL, pCommunityLikeComment, pCommunityMoveCollectionContent, pCommunityPublishContent, pCommunityRemoveContentFromCollection, pCommunitySearchCurAccountFollowingUsersInfo, pCommunityShareContent, pCommunitySubscribeCollection, pCommunityUpdateCollection, pCommunityUpdateContent, pCommunityUploadMedia, pContentBatchGetVideoDetail, pContentGetMostPlayedVideoList, pContentGetNewstVideoList, pContentGetPopularVideoList, pContentGetTopRatedVideoList, pContentMatchAds, pInteractionAddCollect, pInteractionBatchClearBrowse, pInteractionBatchDeleteCollects, pInteractionBatchDeleteFolders, pInteractionBatchGetCommentLikeStatus, pInteractionBatchGetFollowStats, pInteractionBatchGetLikeStatus, pInteractionBatchQueryContentInteractions, pInteractionBrowse, pInteractionCancelDislike, pInteractionCancelLike, pInteractionCheckCollect, pInteractionCheckFollow, pInteractionClearBrowseHistory, pInteractionCreateFolder, pInteractionDeleteBrowseRecord, pInteractionDeleteFolder, pInteractionDislike, pInteractionDislikeComment, pInteractionFollow, pInteractionLike, pInteractionLikeComment, pInteractionMoveCollects, pInteractionRemoveCollect, pInteractionTrackEventsBatch, pInteractionUnfollow, pInteractionUnifiedBatchLikeDislike, pInteractionUpdateFolder, pInteractionUpdateFollowingContentUpdateTime, pUserEditUserInfo, pUserLogin, pUserRegister, pUserRegisterByVerifyEmailCode, pUserResetForgetPassword, pUserResetPassword, pUserSendEmailCode, pUserSendForgetEmailCode, pUserSendResetPasswordEmailCode, pUserUploadUserBgImage, pUserUserFeedback, pUserUserPrivacySettings, pUserVerifyEmailCode, pUserVerifyForgetEmailCode, pUserVerifyResetPasswordEmailCode };