@funhub/platform 0.1.160 → 0.1.162
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.
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/common/video-player/index.mjs +4 -4
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -1
- package/dist/components/common/video-player/style.module.mjs +0 -1
- package/dist/components/pages/login/reset-password.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -1
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gContentGetVideoDetail as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{buildVideoPlayerSrc as n}from"../../../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as r}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as i}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as a}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as o,use as s,useCallback as c,useEffect as l,useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useParams as f}from"next/navigation";const p=o(void 0),m=`funhub:video-detail-episode-sync`;function h(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function g(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function _(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(m,{detail:e}))}function v(e){return e.type===m&&e instanceof CustomEvent}function y(e,t){if(!(!e&&!t))return{information:e?.information??t?.information,currentSeriesNum:e?.currentSeriesNum??t?.currentSeriesNum,onEpisodeChange:e?.onEpisodeChange??t?.onEpisodeChange,onUpdateInformation:e?.onUpdateInformation??t?.onUpdateInformation,detailId:e?.detailId??t?.detailId,episodeIndex:e?.episodeIndex??t?.episodeIndex,resumeProgressSeconds:e?.resumeProgressSeconds??t?.resumeProgressSeconds,isShow:e?.isShow??t?.isShow,isWebView:e?.isWebView??t?.isWebView,isInformationLoading:e?.isInformationLoading??t?.isInformationLoading,isInformationResolved:e?.isInformationResolved??t?.isInformationResolved}}function b({value:e,children:t}){let n=s(p);return d(p,{value:u(()=>y(n,e)??e,[n,e]),children:t})}function x(){let e=s(p),t=S({enabled:e===void 0||e.onEpisodeChange===void 0||e.detailId===void 0||e.currentSeriesNum===void 0||e.episodeIndex===void 0||e.isInformationLoading===void 0||e.isInformationResolved===void 0,shouldRequestInformation
|
|
2
|
+
"use client";import{gContentGetVideoDetail as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{buildVideoPlayerSrc as n}from"../../../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as r}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as i}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as a}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as o,use as s,useCallback as c,useEffect as l,useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useParams as f}from"next/navigation";const p=o(void 0),m=`funhub:video-detail-episode-sync`;function h(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function g(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function _(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(m,{detail:e}))}function v(e){return e.type===m&&e instanceof CustomEvent}function y(e,t){if(!(!e&&!t))return{information:e?.information??t?.information,currentSeriesNum:e?.currentSeriesNum??t?.currentSeriesNum,onEpisodeChange:e?.onEpisodeChange??t?.onEpisodeChange,onUpdateInformation:e?.onUpdateInformation??t?.onUpdateInformation,detailId:e?.detailId??t?.detailId,episodeIndex:e?.episodeIndex??t?.episodeIndex,resumeProgressSeconds:e?.resumeProgressSeconds??t?.resumeProgressSeconds,isShow:e?.isShow??t?.isShow,isWebView:e?.isWebView??t?.isWebView,isInformationLoading:e?.isInformationLoading??t?.isInformationLoading,isInformationResolved:e?.isInformationResolved??t?.isInformationResolved}}function b({value:e,children:t}){let n=s(p);return d(p,{value:u(()=>y(n,e)??e,[n,e]),children:t})}function x(){let e=s(p),t=e!==void 0&&e.onEpisodeChange===void 0,n=S({enabled:e===void 0||e.onEpisodeChange===void 0||e.detailId===void 0||e.currentSeriesNum===void 0||e.episodeIndex===void 0||e.isInformationLoading===void 0||e.isInformationResolved===void 0,shouldRequestInformation:t||!e?.information});return u(()=>{let r=y(e,n);return r&&(e&&n&&t?{...r,information:n.information??r.information,currentSeriesNum:n.currentSeriesNum??r.currentSeriesNum,episodeIndex:n.episodeIndex??r.episodeIndex,onEpisodeChange:n.onEpisodeChange??r.onEpisodeChange,isInformationLoading:n.isInformationLoading??r.isInformationLoading,isInformationResolved:n.isInformationResolved??r.isInformationResolved}:r)},[e,n,t])}function S(o){let{enabled:s,shouldRequestInformation:d}=o,p=f(),y=t(),b=p.level,x=Array.isArray(b)?b:typeof b==`string`?[b]:[],S=x[0]||``,C=x.findIndex(e=>e===`episode`),w=C>=0?x[C+1]:x[2],T=Math.max(1,Number(w)||1),[E,D]=a(`video-detail-material-series-num-${S}`,T);l(()=>{D(T)},[T,D]),l(()=>{if(!S||typeof window>`u`)return;let e=e=>{if(!v(e))return;let t=e.detail;if(!t||t.detailId!==S)return;let n=g(t.seriesNum);D(e=>e===n?e:n)};return window.addEventListener(m,e),()=>{window.removeEventListener(m,e)}},[S,D]);let O=c(e=>{if(!S)return;let t=g(e);D(t),_({detailId:S,seriesNum:t})},[S,D]),k=Math.max(1,Number(E)||1),A=Math.max(0,k-1),j=x[1]||``,M=typeof window<`u`&&window.isWebView===!0,{data:N,isPending:P,isFetching:F,isError:I,isSuccess:L}=i([`video-detail`,S],async()=>S?await e({id:S}):null,{enabled:s&&d&&!!S}),R=u(()=>{let e=N?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:1,episode_cnt:e.links?.length||0}},[N?.data?.video]),z=c(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(!S||typeof window>`u`)return;let i=`/${M?`webview`:`video`}/${S}/${encodeURIComponent(j)}/episode/${t}`,{search:a,hash:o,pathname:s}=window.location,c=`${s}${a}${o}`,l=`${i}${a}${o}`,u=h(s,S);if(c!==l){if(M){let e=R?.links?.[Math.max(0,t-1)],i=n(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());r({poster:String(R?.img_y||R?.img_x||R?.preview_images?.[0]||``).trim(),src:i,title:String(R?.title||R?.name||``).trim(),contentId:S,episode:t}),k!==t&&O(t);return}u&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,l),O(t)):y.replace(l,{scroll:!1});return}k!==t&&O(t)},[k,S,R?.img_x,R?.img_y,R?.links,R?.name,R?.preview_images,R?.title,M,j,y,O]);if(l(()=>{let e=Array.isArray(R?.links)?R.links.length:0;e<=0||k<=e||z(1)},[k,R?.links,z]),s)return{information:R,currentSeriesNum:k,onEpisodeChange:z,detailId:S,episodeIndex:A,resumeProgressSeconds:0,isShow:!0,isWebView:M,isInformationLoading:d?!!S&&!R&&(P||F):!1,isInformationResolved:!S||!!R||!d||I||L}}export{b as VideoDetailMaterialRuntimeProvider,x as useVideoDetailMaterialRuntimeContext};
|
|
@@ -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{
|
|
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=`
|
|
3
3
|
background-color: rgba(0,0,0,${n.toFixed(3)});
|
|
4
4
|
will-change: background-color;
|
|
5
5
|
transform: translateZ(0);
|
|
6
|
-
`}function
|
|
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:
|
|
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:
|
|
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)]
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import e from"../../../utils/get-res-url.mjs";const t=10*1e3,n=process.env.NODE_ENV!==`production`,r=
|
|
2
|
+
import e from"../../../utils/get-res-url.mjs";const t=10*1e3,n=process.env.NODE_ENV!==`production`,r=new Map;function i(e){return/\.m3u8(?:$|[?#])/i.test(e)}function a(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:blob:|data:)/i.test(e)}function o(t){return`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${e()}/m3f/${t}`)}`}function s(e){if(!(!e||!e.startsWith(`blob:`)))try{URL.revokeObjectURL(e)}catch{}}function c(e){let t=r.get(e);t&&(s(t.objectUrl),r.delete(e))}function l(){for(;r.size>80;){let e=r.keys().next().value;if(!e)break;c(e)}}function u(e,t){r.delete(e),r.set(e,t)}function d(e){let t=r.get(e);return t?t.expiresAt<=Date.now()?(c(e),null):(u(e,t),t):null}async function f(e){let n=o(e);try{let t=await fetch(n,{method:`GET`,credentials:`omit`,cache:`no-store`});if(!t.ok)throw Error(`processM3u8 status ${t.status}`);let i=await t.text();if(!i.includes(`#EXTM3U`))throw Error(`processM3u8 invalid playlist`);let a=URL.createObjectURL(new Blob([i],{type:`application/vnd.apple.mpegurl`})),o=r.get(e);return o?(s(o.objectUrl),o.objectUrl=a,o.expiresAt=Date.now()+3e4,u(e,o),l(),a):(s(a),n)}catch{let i=r.get(e);return i&&(i.expiresAt=Date.now()+t,u(e,i)),n}}function p(e){let n=d(e);if(n)return n;let i={expiresAt:Date.now()+t,objectUrl:``,promise:Promise.resolve(``)};return i.promise=f(e),r.set(e,i),l(),i}function m(e){if(!e)return!1;let t=e.toLowerCase();return/(android|iphone|ipad|ipod|mobile|harmonyos|windows phone)/.test(t)?!0:/; wv\)|webview|micromessenger|qq\//.test(t)}function h(t){return t?a(t)?t:i(t)?o(t):`${e()}/${t}`:``}async function g(e){return e?!i(e)||typeof window>`u`||m(window.navigator?.userAgent||``)?h(e):await p(e).promise:``}function _(e){!e||!i(e)||typeof window>`u`||m(window.navigator?.userAgent||``)||p(e).promise}function v(){let e=(process.env.NEXT_PUBLIC_CDN||``).split(`,`).map(e=>e.trim()).find(Boolean);return e?e.replace(/\/+$/,``):``}function y(e){if(!e)return``;if(/^https?:\/\//i.test(e))return e;let t=v();if(!t)return``;let n=e.replace(/^\/+/,``);return n?n.startsWith(`m3f/`)?`${t}/${n}`:`${t}/m3f/${n}`:``}function b(e,t=1){let n=Number.isFinite(t)?Math.max(1,Math.floor(t)):1;if(typeof e==`number`)return Number.isFinite(e)?Math.max(1,Math.floor(e)):n;if(typeof e==`string`){let t=e.trim();if(!t)return n;let r=Number.parseInt(t,10);return Number.isNaN(r)?n:Math.max(1,r)}return n}function x(e,t){if(!Array.isArray(e)||e.length===0)return``;let n=b(t,1),r=e[Math.max(0,n-1)]||e[0];if(!r||typeof r!=`object`)return``;let i=r;return i.m3u8_url||i.m3u8url||``}function S(e){if(typeof e==`string`)return e;if(!e||typeof e!=`object`)return``;let t=e;return t.m3u8_url||t.m3u8url||``}function C(e,t){if(typeof e==`string`)return e?[e]:[];if(!Array.isArray(e)||e.length===0)return[];if(e.every(e=>typeof e==`string`))return Array.from(new Set(e.filter(Boolean)));let n=x(e,t);return n?[n]:Array.from(new Set(e.map(e=>S(e)).filter(Boolean)))}function w(e){return new Promise(t=>{setTimeout(()=>t(),e)})}function T(e){try{let t=new URL(e);return`${t.origin}${t.pathname}`}catch{return e}}function E(e,t){n&&console.warn(`[processM3u8-warmup] ${e}`,t)}async function D(e){let t=y(e);if(!t||typeof window<`u`)return;let n=T(t),r=Date.now();E(`start`,{url:n});let i=`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(t)}`,a=new AbortController,o=setTimeout(()=>a.abort(),3e3),s=fetch(i,{method:`GET`,credentials:`omit`,cache:`no-store`,signal:a.signal}).then(async e=>{if(!e.ok)throw Error(`processM3u8 status ${e.status}`);if(!(await e.text()).includes(`#EXTM3U`))throw Error(`processM3u8 invalid playlist`);return E(`done`,{url:n,costMs:Date.now()-r}),`done`}).catch(e=>(E(`fail`,{url:n,costMs:Date.now()-r,error:e instanceof Error?e.message:String(e||``)}),`fail`)).finally(()=>{clearTimeout(o)});await Promise.race([s,w(160).then(()=>`timeout`)])===`timeout`&&E(`detach`,{url:n,awaitMs:160})}async function O(e,t){let n=C(e,t);await Promise.all(n.map(e=>D(e)))}export{h as buildVideoPlayerSrc,i as isM3u8VideoUrl,b as normalizeEpisodeNumber,_ as prefetchVideoPlayerSrc,C as resolveM3u8Urls,g as resolveVideoPlayerSrc,O as warmupProcessM3u8Auto};
|
|
@@ -157,7 +157,6 @@ import e from"../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-
|
|
|
157
157
|
.style-module_videoBox__4Gmdw .xgplayer-error .xgplayer-error-text {
|
|
158
158
|
position: relative;
|
|
159
159
|
color: transparent;
|
|
160
|
-
width: 300px;
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
.style-module_videoBox__4Gmdw .xgplayer-error .xgplayer-error-text::after {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{pUserSendResetPasswordEmailCode as t,pUserVerifyResetPasswordEmailCode as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{useUserId as s,useUserInfo as c}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as l}from"../../../assets/icons/left-arrow-icon.mjs";import{useEffect as u,useMemo as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";function g(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function _(_){let v=h(`components.pages.login`),{onClose:y,onPassword:b}=_,x=s(),S=c(),{setVerifyStep:C}=o(),[w,T]=f(``),[E,D]=f(0),[O,k]=f(!1),[A,j]=f(!1),[M,N]=f(``),P=d(()=>{let e=S;return e?.email||e?.mail||``},[S]),F=d(()=>P?g(P):``,[P]);u(()=>{C(`reset-password`)},[C]),u(()=>{if(E<=0)return;let e=setInterval(()=>{D(e=>e-1)},1e3);return()=>clearInterval(e)},[E]);let I=d(()=>w.trim().length>=6&&!A,[w,A]);function L(e){T(e.replace(/\D/g,``))}function R(e){e.preventDefault(),B()}async function z(){if(!(!x||O||E>0))try{k(!0),N(``),await t({user_id:x}),D(60)}catch(e){N(e.message??v(`resetPassword.sendFailed`))}finally{k(!1)}}async function B(){if(!(!I||!x))try{j(!0),N(``),await n({user_id:x,email_code:w.trim()}),b?.(P)}catch(e){N(e.message??v(`resetPassword.verifyFailed`))}finally{j(!1)}}return m(r,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,children:[m(r,{className:`flex items-center h-[60px] px-[16px]`,children:[p(e,{type:`button`,onClick:y,"aria-label":v(`resetPassword.back`),className:`cursor-pointer bg-transparent !p-0 !px-0 !py-0`,children:p(l,{className:`w-[16px] h-[16px] text-text1/80`,"aria-hidden":`true`,focusable:`false`})}),p(a,{className:`flex-1 text-center text-[16px] font-semibold`,children:v(`resetPassword.title`)}),p(r,{className:`w-[16px]`,"aria-hidden":`true`})]}),m(r,{className:`px-[24px] flex flex-col mt-[24px]`,children:[m(a,{className:`text-[14px] leading-[22px] text-text1/80`,children:[v(`resetPassword.verifyViaEmail`),F?` ${F} `:` `,v(`resetPassword.verifyHint`)]}),p(a,{className:`mt-[8px] text-[12px] leading-[18px] text-text3`,children:v(`resetPassword.passwordRuleHint`)}),m(`form`,{className:`mt-[36px]`,autoComplete:`off`,onSubmit:R,children:[m(r,{className:`flex items-center justify-between px-[20px] rounded-[50px] h-[56px] bg-line1 border border-line1`,children:[p(i,{placeholder:v(`resetPassword.codePlaceholder`),type:`text`,name:`funhub-reset-password-code`,value:w,onChange:e=>L(e.target.value),inputMode:`numeric`,autoComplete:`one-time-code`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`flex-1 !bg-transparent !px-0 !py-0 !rounded-none !text-text1 placeholder:!text-text3 leading-[24px] text-[16px]`}),p(e,{type:`button`,onClick:z,disabled:O||E>0,className:`ml-[12px] cursor-pointer text-theme5 !p-0 !px-0 !py-0 disabled:text-text3`,children:E>0?`${v(`resetPassword.resend`)} (${E}s)`:v(`resetPassword.sendCode`)})]}),p(r,{className:`h-[22px] mt-[16px] mb-[22px] ml-[12px] text-[14px] text-theme5`,children:M}),p(e,{type:`submit`,disabled:!I,className:`w-full h-[60px] !rounded-[30px] !text-[18px] font-bold leading-[26px] bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:v(A?`resetPassword.verifying`:`resetPassword.verifyEmail`)})]})]})]})}export{_ as ResetPassword};
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{pUserSendResetPasswordEmailCode as t,pUserVerifyResetPasswordEmailCode as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{useUserId as s,useUserInfo as c}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as l}from"../../../assets/icons/left-arrow-icon.mjs";import{useEffect as u,useMemo as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";function g(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function _(_){let v=h(`components.pages.login`),{onClose:y,onPassword:b}=_,x=s(),S=c(),{setVerifyStep:C}=o(),[w,T]=f(``),[E,D]=f(0),[O,k]=f(!1),[A,j]=f(!1),[M,N]=f(``),P=d(()=>{let e=S;return e?.email||e?.mail||``},[S]),F=d(()=>P?g(P):``,[P]);u(()=>{C(`reset-password`)},[C]),u(()=>{if(E<=0)return;let e=setInterval(()=>{D(e=>e-1)},1e3);return()=>clearInterval(e)},[E]);let I=d(()=>w.trim().length>=6&&!A,[w,A]);function L(e){T(e.replace(/\D/g,``))}function R(e){e.preventDefault(),B()}async function z(){if(!(!x||O||E>0))try{k(!0),N(``),await t({user_id:x}),D(60)}catch(e){N(e.message??v(`resetPassword.sendFailed`))}finally{k(!1)}}async function B(){if(!(!I||!x))try{j(!0),N(``),await n({user_id:x,email_code:w.trim()}),b?.(P)}catch(e){N(e.message??v(`resetPassword.verifyFailed`))}finally{j(!1)}}return m(r,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,children:[m(r,{className:`flex items-center h-[60px] px-[16px]`,children:[p(e,{type:`button`,onClick:y,"aria-label":v(`resetPassword.back`),className:`cursor-pointer bg-transparent !p-0 !px-0 !py-0`,children:p(l,{className:`w-[16px] h-[16px] text-text1/80`,"aria-hidden":`true`,focusable:`false`})}),p(a,{className:`flex-1 text-center text-[16px] font-semibold`,children:v(`resetPassword.title`)}),p(r,{className:`w-[16px]`,"aria-hidden":`true`})]}),m(r,{className:`px-[24px] flex flex-col mt-[24px]`,children:[m(a,{className:`text-[14px] leading-[22px] text-text1/80`,children:[v(`resetPassword.verifyViaEmail`),F?` ${F} `:` `,v(`resetPassword.verifyHint`)]}),p(a,{className:`mt-[8px] text-[12px] leading-[18px] text-text3`,children:v(`resetPassword.passwordRuleHint`)}),m(`form`,{className:`mt-[36px]`,autoComplete:`off`,onSubmit:R,children:[m(r,{className:`flex items-center justify-between px-[20px] rounded-[50px] h-[56px] bg-line1 border border-line1`,children:[p(i,{placeholder:v(`resetPassword.codePlaceholder`),type:`text`,name:`funhub-reset-password-code`,value:w,onChange:e=>L(e.target.value),inputMode:`numeric`,autoComplete:`one-time-code`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`flex-1 !bg-transparent !px-0 !py-0 !rounded-none !text-text1 placeholder:!text-text3 leading-[24px] text-[16px] caret-transparent`}),p(e,{type:`button`,onClick:z,disabled:O||E>0,className:`ml-[12px] cursor-pointer text-theme5 !p-0 !px-0 !py-0 disabled:text-text3`,children:E>0?`${v(`resetPassword.resend`)} (${E}s)`:v(`resetPassword.sendCode`)})]}),p(r,{className:`h-[22px] mt-[16px] mb-[22px] ml-[12px] text-[14px] text-theme5`,children:M}),p(e,{type:`submit`,disabled:!I,className:`w-full h-[60px] !rounded-[30px] !text-[18px] font-bold leading-[26px] bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:v(A?`resetPassword.verifying`:`resetPassword.verifyEmail`)})]})]})]})}export{_ as ResetPassword};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{getCookie as t}from"../../../utils/common.mjs";import{pUserSendEmailCode as n,pUserSendResetPasswordEmailCode as r,pUserVerifyForgetEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../service/generated/client.mjs";import{pUserRegisterByVerifyEmailCodeCompat as o}from"../../../service/register-by-verify-email-code.mjs";import{Box as s}from"../../ui/box.mjs";import{Text as c}from"../../ui/text.mjs";import{useLoginModalStore as l}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as u}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as d,useUserId as f}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as p}from"../../../assets/icons/left-arrow-icon.mjs";import{useCallback as m,useEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as S}from"next-intl";function C(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function w(w){let T=S(`components.pages.login`),{email:E,onClose:D,onPassword:O}=w,{verifyStep:k,resolveLogin:A}=l(),[j,M]=v([,,,,,,].fill(``)),[N,P]=v(0),[F,I]=v(!1),[L,R]=v(60),[z,B]=v(!1),[V,H]=v(``),U=_(null),W=f(),G=d(),K=u(),q=g(()=>C(E),[E]),J=m(async()=>{if(k===`reset-password`)return await a({user_id:W,email_code:j.join(``)});if(k===`forgot-password`)return await i({email:E,email_code:j.join(``)});if(k===`register-verify`){let e=await t(`guestUserId`);return await o({email:E,email_code:j.join(``),user_id:e})}throw Error(T(`verify.invalidCode`))},[k,j,W,E,T]),Y=g(()=>j.every(e=>e!==``)&&!F,[j,F]);h(()=>{if(L<=0)return;let e=setInterval(()=>{R(e=>e-1)},1e3);return()=>clearInterval(e)},[L]),h(()=>{U.current?.focus()},[]);let X=m(e=>{let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...j],r=t.split(``),i=N;for(let e of r)i<6&&(n[i]=e,i++);M(n),P(Math.min(i,5)),H(``)},[j,N]),Z=m(e=>{if(e.key===`Backspace`){e.preventDefault();let t=[...j];j[N]?t[N]=``:N>0&&(t[N-1]=``,P(N-1)),M(t),H(``)}else e.key===`ArrowLeft`&&N>0?P(N-1):e.key===`ArrowRight`&&N<5&&P(N+1)},[j,N]),Q=m(e=>{P(e),U.current?.focus()},[]);async function $(){if(!(L>0||z))try{B(!0),k===`reset-password`?await r({user_id:W}):await n({email:E}),R(60),H(``)}finally{B(!1)}}async function ee(){if(Y)try{I(!0);let e=await J();if(k===`register-verify`){let t=e?.data;if(t?.user_id){G({token:t.token??``,expireTime:t.expire_time??0,userId:t.user_id}),x.success(T(`index.loginSuccess`)),K([`user-profile`,`mine`]),A(!0);return}}O?.(E)}catch(e){H(e.message??T(`verify.invalidCode`))}finally{I(!1)}}return b(s,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,children:[b(s,{className:`flex justify-between items-center h-[60px] px-[16px]`,children:[y(e,{type:`button`,onClick:D,"aria-label":T(`verify.back`),className:`cursor-pointer bg-transparent !p-0 !px-0 !py-0`,children:y(p,{className:`w-[16px] h-[16px] text-text1/80`,"aria-hidden":`true`,focusable:`false`})}),y(c,{className:`text-[14px] text-text2`})]}),b(s,{className:`px-[24px] flex flex-col mt-[15px]`,children:[b(s,{className:`flex flex-col`,children:[y(c,{className:`text-[24px] leading-[32px] font-bold`,children:T(`verify.title`)}),b(s,{className:`mt-[12px] flex items-center`,children:[b(c,{className:`text-[14px] leading-[14px] text-text1/80`,children:[T(`verify.sentTo`),` `,q]}),y(e,{type:`button`,onClick:$,disabled:L>0||z,className:`ml-[8px] rounded-[19px] !px-[8px] !py-[8px] text-[12px] leading-[12px] cursor-pointer bg-line1 text-text1/80 disabled:cursor-not-allowed`,children:L>0?`${T(`verify.resend`)} (${L}s)`:T(`verify.resend`)})]})]}),b(`form`,{className:`mt-[38px]`,onSubmit:e=>{e.preventDefault(),ee()},children:[b(s,{className:`h-14 sm:h-16 md:h-20 relative`,children:[y(`input`,{ref:U,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:X,onKeyDown:Z,className:`absolute opacity-0 pointer-events-none w-full h-full border-none outline-none bg-transparent text-base`,autoComplete:`one-time-code`}),y(s,{className:`w-full flex justify-between items-center`,children:j.map((e,t)=>y(s,{onClick:()=>Q(t),className:`
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{getCookie as t}from"../../../utils/common.mjs";import{pUserSendEmailCode as n,pUserSendResetPasswordEmailCode as r,pUserVerifyForgetEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../service/generated/client.mjs";import{pUserRegisterByVerifyEmailCodeCompat as o}from"../../../service/register-by-verify-email-code.mjs";import{Box as s}from"../../ui/box.mjs";import{Text as c}from"../../ui/text.mjs";import{useLoginModalStore as l}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as u}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as d,useUserId as f}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as p}from"../../../assets/icons/left-arrow-icon.mjs";import{useCallback as m,useEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as S}from"next-intl";function C(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function w(w){let T=S(`components.pages.login`),{email:E,onClose:D,onPassword:O}=w,{verifyStep:k,resolveLogin:A}=l(),[j,M]=v([,,,,,,].fill(``)),[N,P]=v(0),[F,I]=v(!1),[L,R]=v(60),[z,B]=v(!1),[V,H]=v(``),U=_(null),W=f(),G=d(),K=u(),q=g(()=>C(E),[E]),J=m(async()=>{if(k===`reset-password`)return await a({user_id:W,email_code:j.join(``)});if(k===`forgot-password`)return await i({email:E,email_code:j.join(``)});if(k===`register-verify`){let e=await t(`guestUserId`);return await o({email:E,email_code:j.join(``),user_id:e})}throw Error(T(`verify.invalidCode`))},[k,j,W,E,T]),Y=g(()=>j.every(e=>e!==``)&&!F,[j,F]);h(()=>{if(L<=0)return;let e=setInterval(()=>{R(e=>e-1)},1e3);return()=>clearInterval(e)},[L]),h(()=>{U.current?.focus()},[]);let X=m(e=>{let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...j],r=t.split(``),i=N;for(let e of r)i<6&&(n[i]=e,i++);M(n),P(Math.min(i,5)),H(``)},[j,N]),Z=m(e=>{if(e.key===`Backspace`){e.preventDefault();let t=[...j];j[N]?t[N]=``:N>0&&(t[N-1]=``,P(N-1)),M(t),H(``)}else e.key===`ArrowLeft`&&N>0?P(N-1):e.key===`ArrowRight`&&N<5&&P(N+1)},[j,N]),Q=m(e=>{P(e),U.current?.focus()},[]);async function $(){if(!(L>0||z))try{B(!0),k===`reset-password`?await r({user_id:W}):await n({email:E}),R(60),H(``)}finally{B(!1)}}async function ee(){if(Y)try{I(!0);let e=await J();if(k===`register-verify`){let t=e?.data;if(t?.user_id){G({token:t.token??``,expireTime:t.expire_time??0,userId:t.user_id}),x.success(T(`index.loginSuccess`)),K([`user-profile`,`mine`]),A(!0);return}}O?.(E)}catch(e){H(e.message??T(`verify.invalidCode`))}finally{I(!1)}}return b(s,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,children:[b(s,{className:`flex justify-between items-center h-[60px] px-[16px]`,children:[y(e,{type:`button`,onClick:D,"aria-label":T(`verify.back`),className:`cursor-pointer bg-transparent !p-0 !px-0 !py-0`,children:y(p,{className:`w-[16px] h-[16px] text-text1/80`,"aria-hidden":`true`,focusable:`false`})}),y(c,{className:`text-[14px] text-text2`})]}),b(s,{className:`px-[24px] flex flex-col mt-[15px]`,children:[b(s,{className:`flex flex-col`,children:[y(c,{className:`text-[24px] leading-[32px] font-bold`,children:T(`verify.title`)}),b(s,{className:`mt-[12px] flex items-center`,children:[b(c,{className:`text-[14px] leading-[14px] text-text1/80`,children:[T(`verify.sentTo`),` `,q]}),y(e,{type:`button`,onClick:$,disabled:L>0||z,className:`ml-[8px] rounded-[19px] !px-[8px] !py-[8px] text-[12px] leading-[12px] cursor-pointer bg-line1 text-text1/80 disabled:cursor-not-allowed`,children:L>0?`${T(`verify.resend`)} (${L}s)`:T(`verify.resend`)})]})]}),b(`form`,{className:`mt-[38px]`,onSubmit:e=>{e.preventDefault(),ee()},children:[b(s,{className:`h-14 sm:h-16 md:h-20 relative`,children:[y(`input`,{ref:U,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:X,onKeyDown:Z,className:`absolute opacity-0 pointer-events-none w-full h-full border-none outline-none bg-transparent text-base caret-transparent`,autoComplete:`one-time-code`}),y(s,{className:`w-full flex justify-between items-center`,children:j.map((e,t)=>y(s,{onClick:()=>Q(t),className:`
|
|
3
3
|
w-14 h-14 sm:w-16 sm:h-16 md:w-20 md:h-20 rounded-xl border-2 flex items-center justify-center cursor-pointer transition-all duration-200
|
|
4
4
|
${t===N?`border-theme3 bg-theme3`:`border-transparent bg-bg2`}
|
|
5
5
|
`,children:y(c,{className:`select-none font-semibold text-2xl sm:text-3xl leading-none text-text1`,children:e})},t))})]}),y(s,{className:`h-[22px] mt-[16px] mb-[22px] ml-[12px] text-[14px] text-theme5`,children:V}),y(e,{type:`submit`,disabled:!Y,className:`w-full h-[60px] !rounded-[30px] !text-[18px] font-bold leading-[26px] bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:T(F?`verify.verifying`:`verify.nextStep`)})]})]})]})}export{w as Verify};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../ui/button.mjs";import{hashPassword as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{pUserResetPassword as r,pUserSendResetPasswordEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../../service/generated/client.mjs";import{getPasswordValidationErrorText as o,validatePasswordPair as ee}from"../../../../utils/password-validator.mjs";import{Box as s}from"../../../ui/box.mjs";import{Drawer as c,DrawerContent as l,DrawerDescription as te,DrawerHeader as ne,DrawerTitle as u}from"../../../ui/drawer.mjs";import{Text as d}from"../../../ui/text.mjs";import f from"../../../ui/legacy/button.mjs";import{HeaderNav as re}from"../../../common/header-nav/client.mjs";import{EyeIcon as p}from"../../../../assets/icons/eye-icon.mjs";import{EyeOffIcon as m}from"../../../../assets/icons/eye-off-icon.mjs";import h from"../../../ui/legacy/input.mjs";import{useEffect as g,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{useTranslations as ie}from"next-intl";function ae(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function C(C){let w=ie(`components.pages.settings.components`),{open:oe,onOpenChange:T}=C,E=n(e=>e.userInfo),[D,O]=y([,,,,,,].fill(``)),[k,A]=y(0),j=v(null),M=D.includes(``),[N,P]=y(``),F=v(null),[se,I]=y(60),[L,R]=y(!1),z=_(()=>ae(E?.email||``),[E?.email]);async function B(){if(L)return;let e=S.loading(w(`resetPasswordDrawer.sending`));try{let t=await i({user_id:E?.user_id});t.code===0?(S.success(w(`resetPasswordDrawer.codeSentSuccess`),{id:e}),R(!0),I(60),P(``)):S.error(t.message||w(`resetPasswordDrawer.sendFailed`),{id:e})}catch(t){console.error(t),S.error(w(`resetPasswordDrawer.sendFailed`),{id:e})}}function V(){W(e=>e===1?e:e+1)}async function H(){let e=S.loading(w(`resetPasswordDrawer.verifying`));try{P(``);let t=await a({user_id:E?.user_id,email_code:D.join(``)});t.code===0?(S.success(w(`resetPasswordDrawer.verifySuccess`),{id:e}),V()):(P(t.message||w(`resetPasswordDrawer.verifyFailed`)),S.error(t.message||w(`resetPasswordDrawer.verifyFailed`),{id:e}))}catch(t){console.error(t),P(w(`resetPasswordDrawer.verifyFailed`)),S.error(w(`resetPasswordDrawer.verifyFailed`),{id:e})}}g(()=>{if(L)return F.current=setInterval(()=>{I(e=>e<=1?(F.current&&clearInterval(F.current),R(!1),60):e-1)},1e3),()=>{F.current&&clearInterval(F.current)}},[L]);let[U,W]=y(0);g(()=>{U===0&&j.current?.focus()},[U]);let[G,K]=y({password:``,confirmPassword:``}),[q,J]=y(!1),[Y,ce]=y(!1),[X,le]=y(!1),Z=_(()=>ee(G.password,G.confirmPassword),[G.password,G.confirmPassword]),Q=_(()=>o(Z),[Z]),$=_(()=>q||G.password.length===0||G.confirmPassword.length===0||Z.type!==`none`,[q,G.password.length,G.confirmPassword.length,Z.type]);async function ue(){if($)return;let e=S.loading(w(`resetPasswordDrawer.submitting`));try{J(!0);let n=await r({user_id:E?.user_id,password:t(G.password)});n.code===0?(S.success(w(`resetPasswordDrawer.passwordResetSuccess`),{id:e}),K({password:``,confirmPassword:``}),O([,,,,,,].fill(``)),A(0),T(!1)):S.error(n.message||w(`resetPasswordDrawer.resetFailed`),{id:e})}catch(t){console.error(t),S.error(w(`resetPasswordDrawer.resetFailed`),{id:e})}finally{J(!1)}}function de(e){let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...D],r=t.split(``),i=k;for(let e of r){if(i>=6)break;n[i]=e,i+=1}O(n),A(Math.min(i,5)),N&&P(``)}function fe(e){if(e.key===`Backspace`){e.preventDefault();let t=[...D];t[k]?t[k]=``:k>0&&(t[k-1]=``,A(k-1)),O(t),N&&P(``);return}e.key===`ArrowLeft`&&k>0&&A(k-1),e.key===`ArrowRight`&&k<5&&A(k+1)}function pe(e){A(e),j.current?.focus()}let me=x(s,{className:`p-6`,children:[x(s,{className:`space-y-[12px]`,children:[b(d,{className:`text-[24px] leading-[32px] font-bold text-text1`,children:`请输入验证码`}),x(s,{className:`flex items-center justify-between gap-[8px]`,children:[x(d,{className:`min-w-0 flex-1 truncate text-[12px] leading-[16px] text-text2`,children:[w(`resetPasswordDrawer.boundEmailNotice`),b(d,{className:`dark:text-white text-white`,children:z}),w(`resetPasswordDrawer.verifyHint`)]}),b(e,{variant:`link`,disabled:L,onClick:B,className:`h-auto shrink-0 rounded-[10px] bg-line1 px-[10px] py-[4px] text-[10px] leading-[12px] text-text1 no-underline hover:no-underline disabled:opacity-60`,children:L?`${w(`resetPasswordDrawer.sendCode`)} (${se}s)`:w(`resetPasswordDrawer.sendCode`)})]})]}),x(s,{className:`mt-[28px]`,children:[x(s,{className:`relative`,children:[b(`input`,{ref:j,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:de,onKeyDown:fe,className:`absolute inset-0 h-full w-full opacity-0 pointer-events-none`,autoComplete:`one-time-code`}),b(s,{className:`flex justify-between gap-[10px]`,children:D.map((e,t)=>b(s,{onClick:()=>pe(t),className:`
|
|
2
|
+
"use client";import{Button as e}from"../../../ui/button.mjs";import{hashPassword as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{pUserResetPassword as r,pUserSendResetPasswordEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../../service/generated/client.mjs";import{getPasswordValidationErrorText as o,validatePasswordPair as ee}from"../../../../utils/password-validator.mjs";import{Box as s}from"../../../ui/box.mjs";import{Drawer as c,DrawerContent as l,DrawerDescription as te,DrawerHeader as ne,DrawerTitle as u}from"../../../ui/drawer.mjs";import{Text as d}from"../../../ui/text.mjs";import f from"../../../ui/legacy/button.mjs";import{HeaderNav as re}from"../../../common/header-nav/client.mjs";import{EyeIcon as p}from"../../../../assets/icons/eye-icon.mjs";import{EyeOffIcon as m}from"../../../../assets/icons/eye-off-icon.mjs";import h from"../../../ui/legacy/input.mjs";import{useEffect as g,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{useTranslations as ie}from"next-intl";function ae(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function C(C){let w=ie(`components.pages.settings.components`),{open:oe,onOpenChange:T}=C,E=n(e=>e.userInfo),[D,O]=y([,,,,,,].fill(``)),[k,A]=y(0),j=v(null),M=D.includes(``),[N,P]=y(``),F=v(null),[se,I]=y(60),[L,R]=y(!1),z=_(()=>ae(E?.email||``),[E?.email]);async function B(){if(L)return;let e=S.loading(w(`resetPasswordDrawer.sending`));try{let t=await i({user_id:E?.user_id});t.code===0?(S.success(w(`resetPasswordDrawer.codeSentSuccess`),{id:e}),R(!0),I(60),P(``)):S.error(t.message||w(`resetPasswordDrawer.sendFailed`),{id:e})}catch(t){console.error(t),S.error(w(`resetPasswordDrawer.sendFailed`),{id:e})}}function V(){W(e=>e===1?e:e+1)}async function H(){let e=S.loading(w(`resetPasswordDrawer.verifying`));try{P(``);let t=await a({user_id:E?.user_id,email_code:D.join(``)});t.code===0?(S.success(w(`resetPasswordDrawer.verifySuccess`),{id:e}),V()):(P(t.message||w(`resetPasswordDrawer.verifyFailed`)),S.error(t.message||w(`resetPasswordDrawer.verifyFailed`),{id:e}))}catch(t){console.error(t),P(w(`resetPasswordDrawer.verifyFailed`)),S.error(w(`resetPasswordDrawer.verifyFailed`),{id:e})}}g(()=>{if(L)return F.current=setInterval(()=>{I(e=>e<=1?(F.current&&clearInterval(F.current),R(!1),60):e-1)},1e3),()=>{F.current&&clearInterval(F.current)}},[L]);let[U,W]=y(0);g(()=>{U===0&&j.current?.focus()},[U]);let[G,K]=y({password:``,confirmPassword:``}),[q,J]=y(!1),[Y,ce]=y(!1),[X,le]=y(!1),Z=_(()=>ee(G.password,G.confirmPassword),[G.password,G.confirmPassword]),Q=_(()=>o(Z),[Z]),$=_(()=>q||G.password.length===0||G.confirmPassword.length===0||Z.type!==`none`,[q,G.password.length,G.confirmPassword.length,Z.type]);async function ue(){if($)return;let e=S.loading(w(`resetPasswordDrawer.submitting`));try{J(!0);let n=await r({user_id:E?.user_id,password:t(G.password)});n.code===0?(S.success(w(`resetPasswordDrawer.passwordResetSuccess`),{id:e}),K({password:``,confirmPassword:``}),O([,,,,,,].fill(``)),A(0),T(!1)):S.error(n.message||w(`resetPasswordDrawer.resetFailed`),{id:e})}catch(t){console.error(t),S.error(w(`resetPasswordDrawer.resetFailed`),{id:e})}finally{J(!1)}}function de(e){let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...D],r=t.split(``),i=k;for(let e of r){if(i>=6)break;n[i]=e,i+=1}O(n),A(Math.min(i,5)),N&&P(``)}function fe(e){if(e.key===`Backspace`){e.preventDefault();let t=[...D];t[k]?t[k]=``:k>0&&(t[k-1]=``,A(k-1)),O(t),N&&P(``);return}e.key===`ArrowLeft`&&k>0&&A(k-1),e.key===`ArrowRight`&&k<5&&A(k+1)}function pe(e){A(e),j.current?.focus()}let me=x(s,{className:`p-6`,children:[x(s,{className:`space-y-[12px]`,children:[b(d,{className:`text-[24px] leading-[32px] font-bold text-text1`,children:`请输入验证码`}),x(s,{className:`flex items-center justify-between gap-[8px]`,children:[x(d,{className:`min-w-0 flex-1 truncate text-[12px] leading-[16px] text-text2`,children:[w(`resetPasswordDrawer.boundEmailNotice`),b(d,{className:`dark:text-white text-white`,children:z}),w(`resetPasswordDrawer.verifyHint`)]}),b(e,{variant:`link`,disabled:L,onClick:B,className:`h-auto shrink-0 rounded-[10px] bg-line1 px-[10px] py-[4px] text-[10px] leading-[12px] text-text1 no-underline hover:no-underline disabled:opacity-60`,children:L?`${w(`resetPasswordDrawer.sendCode`)} (${se}s)`:w(`resetPasswordDrawer.sendCode`)})]})]}),x(s,{className:`mt-[28px]`,children:[x(s,{className:`relative`,children:[b(`input`,{ref:j,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:de,onKeyDown:fe,className:`absolute inset-0 h-full w-full opacity-0 pointer-events-none caret-transparent`,autoComplete:`one-time-code`}),b(s,{className:`flex justify-between gap-[10px]`,children:D.map((e,t)=>b(s,{onClick:()=>pe(t),className:`
|
|
3
3
|
h-[48px] flex-1 rounded-[6px] border-2 flex items-center justify-center cursor-pointer transition-all duration-200
|
|
4
4
|
${N?`border-theme5 bg-line1`:t===k?`border-theme3 bg-theme3/10`:`border-transparent bg-line1`}
|
|
5
5
|
`,children:b(d,{className:`text-[24px] leading-none font-semibold text-text1 select-none`,children:e})},`${t}-${e||`empty`}`))})]}),b(s,{className:`min-h-[22px] pt-[8px]`,children:b(d,{className:`text-[12px] leading-[18px] text-theme5`,children:N})}),b(f,{onClick:H,disabled:M,className:`mt-[180px] w-full h-15 !rounded-[30px] !text-[18px] font-bold leading-6.5 bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:`提交`})]})]}),he=x(s,{className:`p-6`,children:[b(s,{children:b(d,{className:`text-text2`,children:w(`resetPasswordDrawer.setNewPasswordHint`)})}),x(s,{className:`mt-6 space-y-6`,children:[x(s,{className:`flex relative items-center px-2 rounded-[50px] h-16.5 bg-line1 border ${Q?`border-theme5`:`border-line1`}`,children:[b(h,{value:G.password,onChange:e=>K(t=>({...t,password:e})),placeholder:w(`resetPasswordDrawer.passwordPlaceholder`),type:Y?`text`:`password`,autoComplete:`new-password`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`pr-10`}),b(`button`,{type:`button`,onClick:()=>ce(!Y),className:`absolute right-4 top-1/2 -translate-y-1/2 text-text2 hover:text-text1 transition-colors`,children:b(Y?m:p,{className:`w-5 h-5`})})]}),x(s,{className:`flex relative items-center px-2 rounded-[50px] h-16.5 bg-line1 border ${Z.type===`not-match`?`border-theme5`:`border-line1`}`,children:[b(h,{value:G.confirmPassword,onChange:e=>K(t=>({...t,confirmPassword:e})),placeholder:w(`resetPasswordDrawer.confirmPasswordPlaceholder`),type:X?`text`:`password`,autoComplete:`new-password`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`pr-10`}),b(`button`,{type:`button`,onClick:()=>le(!X),className:`absolute right-4 top-1/2 -translate-y-1/2 text-text2 hover:text-text1 transition-colors`,children:b(X?m:p,{className:`w-5 h-5`})})]}),Q?b(s,{children:b(d,{className:`min-h-[22px] text-[14px] text-theme5 px-[12px]`,children:Q})}):null,b(f,{onClick:ue,disabled:$,className:`w-full h-15 !rounded-[30px] !text-[18px] font-bold leading-6.5 bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:w(q?`resetPasswordDrawer.submitting`:`resetPasswordDrawer.resetPassword`)})]})]});return x(c,{open:oe,onOpenChange:T,direction:`right`,handleOnly:!0,children:[x(ne,{className:`hidden`,children:[b(u,{children:w(`resetPasswordDrawer.title`)}),b(te,{children:w(`resetPasswordDrawer.title`)})]}),x(l,{className:`!w-full`,children:[b(re,{onBack:()=>T(!1),title:w(`resetPasswordDrawer.title`)}),U===0&&me,U===1&&he]})]})}export{C as ResetPasswordDrawer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{useRouter as i}from"../../../utils/use-compatible-router.mjs";import{EmptyState as a}from"../../ui/empty.mjs";import{buildVideoPlayerSrc as o}from"../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as s}from"../../../utils/login-modal-bridge.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{queryKey as l}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{VideoDetailMaterialRuntimeProvider as m}from"../../biz/business/detail/shared/runtime-context-provider.mjs";import{resolveMaterialProps as h,videoDetailMaterials as ee}from"../../biz/business/detail/shared/registry.mjs";import{DetailHero as te}from"../../biz/business/detail/shared/video-hero.mjs";import{Fragment as ne,useCallback as g,useEffect as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useParams as re,useSearchParams as ie}from"next/navigation";import{useTranslations as ae}from"next-intl";const S=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-info-title-tags-episodes`,componentName:`video-detail-info-title-tags-episodes`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{title:`猜你喜欢`,rows:2,columns:3,smartTagEnabled:!1,smartTagIds:[`腐剧`],showPlayCount:!0,playCountDelta:0,showEpisode:!0,enableInfinite:!1,items:[{contentId:`d6a35ba3279e6f0d`,contentName:`贺总的私宠罪妻`,titleMode:`custom`,title:`贺总的私宠罪妻`,description:`简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百`,coverMode:`upload`,coverUrl:`/truss/20260227/69a136457d10f.jpgxxx`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`b0f42fed731239a7`,contentName:`少年江湖物语`,titleMode:`custom`,title:`少年江湖物语`,description:`网剧《少年江湖物语》讲述了一个江湖中邪不压正,青春正好,有情有爱的温暖故事。剧中有魔教教主,有天下第一剑客,有身世成谜的江湖大夫,有忠心耿耿的小丫鬟,更有艳压秦淮的当红花魁,众多看似完全没有交集的人物纷纷亮相登场,搅乱江湖一池春水。`,coverMode:`content`,coverUrl:`/md-204/uploads/default/other/2024-08-26/14664d2c31e61c201a29cd4abba267c5.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c2304e94ec0ba208`,contentName:`王的男人`,titleMode:`custom`,title:`王的男人`,description:`朝鲜第十代王燕山王君时期,艺人长生(甘宇成饰)和孔吉(李俊基饰)因为不肯加入当地的艺人团,来到京城汉阳谋生。此时暴君燕山君(郑镇荣饰)沉迷于宠妾张绿水(姜成妍饰),朝纲混乱,民不聊生。长生与孔吉二人在街头开始表演讽刺君主的喜剧,大受欢迎,却遭逮捕。后要求到王面前表演,求得一笑。结果,多亏孔吉的急中生智,燕山君才笑了出来。两人随即被留在宫中取乐,孔吉更是因为美色令王倍加宠爱。他们不停表演,大臣们却各自心怀鬼胎,导致了杀戮局面。最终,君王和艺人的命运又将如何呢?`,coverMode:`content`,coverUrl:`/md-204/resource/8c/8cb28f46831558fbeb2f34b2076c3b4e.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c7ffc6a558ae8683`,contentName:`怒`,titleMode:`custom`,title:`怒`,description:`炎炎夏日,东京八王子郊外社区,一对夫妇惨遭杀害。事后凶手用血在墙上写下大大的“怒”字,随后逃亡,销声匿迹长达一年之久。而在此期间,三个身份不明的男子和身边的人相遇了。曾自甘堕落的爱子(宫崎葵饰)被父亲(渡边谦饰)领回海滨小镇,邂逅了不善言辞的哲也(松山研一饰)。在东京工作的同性恋优马(妻夫木聪饰)将柔情似水的直人(绫野刚饰)带回了家,他不相信对方,却又尝试去相信。随母亲搬到冲绳的小泉(广濑铃饰)跟着同学辰哉(佐久本宝饰)登上一座荒岛,在废墟中遇到了背包客田中(森山未来饰),他们短暂成为朋友,而可怕的命运突然降临泉的头上。不久之后,通缉令遍布全国,三个男子的真实身份引人生疑……本片根据吉田修一的同名原作改编。`,coverMode:`content`,coverUrl:`/md-204/resource/24/24ef267eef2c35b5e4cf12dac8b55c14.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`98217427ed96ec51`,contentName:`熔炉`,titleMode:`custom`,title:`熔炉`,description:`来自首尔的哑语美术老师仁浩(孔宥饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍(郑有美饰)。仁浩妻子早亡,8岁女儿天生哮喘由祖母照看,所以他不辞辛苦谋职养家。然而,双胞胎的校长与教导主任竟逼仁浩索贿5千万韩元。同时,仁浩逐渐发现学校笼罩着一种紧张压抑的气氛,令人窒息。有三个孩子引人关注:聪颖的金妍斗(金贤秀饰)、贪吃的陈宥利(郑仁絮饰)和弟弟自杀身亡的全民秀(白承焕饰),民秀总是满脸淤青。下课后,仁浩还听到女厕所中有呼喊与哭泣,在门卫的阻拦下他未深究。之后。他意外目睹了校长行贿警察,教导员毒打民秀,宿导溺罚妍斗的行径。一个惊天的隐秘被慢慢揭开,真相令韩国震惊……本片取材于2005年光州一所聋哑障碍人学校的真实事件,改编自韩国作家孔枝泳的同名小说。`,coverMode:`content`,coverUrl:`/md-204/resource/b4/b410ccdcd86936455b9460a9152aaa47.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`caa2b4eb4eb40de0`,contentName:`再次来寻我`,titleMode:`custom`,title:`再次来寻我`,description:`在宇回到曾经与初恋志勋相遇的303号房,这里即将被拆迁,他在房间里回忆和志勋的点点滴滴,突然被书桌上的电话所吸引,一拿起话筒听到的竟是志勋的声音!在房子主人的同意下,在宇带着电话离开了303室,在回家的途中他发现自己像走在一个陌生的地方,而对面走来的竟是已消失已久的志勋…`,coverMode:`content`,coverUrl:`/md-204/resource/2b/2b43375f2248c1a012847d4507fd21a3.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0}]}}];function C(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function w({detailId:f,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=ae(`components.pages.videoDetail`),O=i(),oe=re(),se=ie(),k=oe.level,A=Array.isArray(k)?k:typeof k==`string`?[k]:[],j=A.findIndex(e=>e===`episode`),ce=j>=0?A[j+1]:A[2],M=Math.max(1,Number(ce)||1),[le,N]=d(`detail-current-series-num-${f}`,M);_(()=>{N(M)},[M,N]);let P=Math.max(1,Number(le)||1),F=Math.max(0,P-1),{data:I,isPending:L,isFetching:R,isError:z,isSuccess:B}=c(v(()=>[`video-detail`,f],[f]),async()=>f?await r({id:f}):null,{enabled:!!f}),V=v(()=>{let e=I?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[I?.data?.video]),H=w??V??null,[U,W]=d(`detail-information-${f}`,H),ue=U?.links?.[F]?.id||``,G=!!f&&!U&&(L||R),K=!f||!!U||z||B,[de,fe]=d(`info-detail-active-tab-${f}`,`video`),[q,J]=d(`info-detail-comment-add-count-${f}`,0),[Y,pe]=d(`info-detail-comment-total-${f}`,void 0);_(()=>{!U&&V&&W(V)},[U,V,W]);let X=g(e=>{W(t=>t&&{...t,...e})},[W]);u(()=>{U?.id&&U.id},[U?.id],`detail-page-report-${f}`),_(()=>{!U||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:U.id||f,author_id:U.up_user,object_type:U.content_type,object_category:U.content_type,object_tags:U.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,U]),_(()=>{J(0)},[ue,J]),v(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let me=g(()=>{},[!1,fe]);g(()=>{J(e=>e+1)},[J]),_(()=>{},[!1,me,U?.id,se]);let Z=g(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(typeof window>`u`)return;let n=String(U?.id||f||``).trim();if(!n)return;let r=T||window.isWebView===!0,i=`/${r?`webview`:`video`}/${n}/${encodeURIComponent(U?.name||``)}/episode/${t}`,{search:a,hash:c,pathname:l}=window.location,u=`${i}${a}${c}`,d=`${l}${a}${c}`,p=C(l,n);if(d!==u){if(r){let e=U?.links?.[Math.max(0,t-1)],r=o(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());s({poster:String(U?.img_y||U?.img_x||U?.preview_images?.[0]||``).trim(),src:r,title:String(U?.title||U?.name||``).trim(),contentId:n,episode:t}),P!==t&&N(t);return}p&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,u),N(t)):O.replace(u,{scroll:!1});return}P!==t&&N(t)},[P,f,U?.id,U?.img_x,U?.img_y,U?.links,U?.name,U?.preview_images,U?.title,T,O,N]),Q=U?.status===`1`,{data:he}=c([l.CHANNEL],()=>n()),ge=e(he?.data),$=v(()=>{if(E!==void 0){let e=new Map(S.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return S},[E]),_e=v(()=>({information:U??void 0,currentSeriesNum:P,onEpisodeChange:Z,onUpdateInformation:X,detailId:f,episodeIndex:F,isShow:!0,isWebView:T,isInformationLoading:G,isInformationResolved:K}),[P,f,F,Z,X,U,G,K,T,!0]),ve=g(e=>{if(!U)return null;let t=ee[e.componentName];if(!t)return null;let n=t.clientComponent,r=h(t,e.props);return r.isValid?b(n,{...r.props}):b(`div`,{children:`组件配置错误`})},[U]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(p,{data:{list:ge}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[U&&!Q&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),U&&Q&&x(y,{children:[!T&&b(te,{isVideo:!0,information:U,episodeIndex:F}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[b(m,{value:_e,children:$.map(e=>b(ne,{children:ve(e)},e.id))}),!1]}),!1]}),!U&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w as default};
|
|
2
|
+
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{useRouter as i}from"../../../utils/use-compatible-router.mjs";import{EmptyState as a}from"../../ui/empty.mjs";import{buildVideoPlayerSrc as o}from"../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as s}from"../../../utils/login-modal-bridge.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{queryKey as l}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{VideoDetailMaterialRuntimeProvider as m}from"../../biz/business/detail/shared/runtime-context-provider.mjs";import{resolveMaterialProps as h,videoDetailMaterials as ee}from"../../biz/business/detail/shared/registry.mjs";import{DetailHero as te}from"../../biz/business/detail/shared/video-hero.mjs";import{Fragment as ne,useCallback as g,useEffect as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useParams as re,useSearchParams as ie}from"next/navigation";import{useTranslations as ae}from"next-intl";const S=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-info-title-tags-episodes`,componentName:`video-detail-info-title-tags-episodes`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{title:`猜你喜欢`,rows:2,columns:3,smartTagEnabled:!1,smartTagIds:[`腐剧`],showPlayCount:!0,playCountDelta:0,showEpisode:!0,enableInfinite:!1,items:[{contentId:`d6a35ba3279e6f0d`,contentName:`贺总的私宠罪妻`,titleMode:`custom`,title:`贺总的私宠罪妻`,description:`简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百`,coverMode:`upload`,coverUrl:`/truss/20260227/69a136457d10f.jpgxxx`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`b0f42fed731239a7`,contentName:`少年江湖物语`,titleMode:`custom`,title:`少年江湖物语`,description:`网剧《少年江湖物语》讲述了一个江湖中邪不压正,青春正好,有情有爱的温暖故事。剧中有魔教教主,有天下第一剑客,有身世成谜的江湖大夫,有忠心耿耿的小丫鬟,更有艳压秦淮的当红花魁,众多看似完全没有交集的人物纷纷亮相登场,搅乱江湖一池春水。`,coverMode:`content`,coverUrl:`/md-204/uploads/default/other/2024-08-26/14664d2c31e61c201a29cd4abba267c5.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c2304e94ec0ba208`,contentName:`王的男人`,titleMode:`custom`,title:`王的男人`,description:`朝鲜第十代王燕山王君时期,艺人长生(甘宇成饰)和孔吉(李俊基饰)因为不肯加入当地的艺人团,来到京城汉阳谋生。此时暴君燕山君(郑镇荣饰)沉迷于宠妾张绿水(姜成妍饰),朝纲混乱,民不聊生。长生与孔吉二人在街头开始表演讽刺君主的喜剧,大受欢迎,却遭逮捕。后要求到王面前表演,求得一笑。结果,多亏孔吉的急中生智,燕山君才笑了出来。两人随即被留在宫中取乐,孔吉更是因为美色令王倍加宠爱。他们不停表演,大臣们却各自心怀鬼胎,导致了杀戮局面。最终,君王和艺人的命运又将如何呢?`,coverMode:`content`,coverUrl:`/md-204/resource/8c/8cb28f46831558fbeb2f34b2076c3b4e.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c7ffc6a558ae8683`,contentName:`怒`,titleMode:`custom`,title:`怒`,description:`炎炎夏日,东京八王子郊外社区,一对夫妇惨遭杀害。事后凶手用血在墙上写下大大的“怒”字,随后逃亡,销声匿迹长达一年之久。而在此期间,三个身份不明的男子和身边的人相遇了。曾自甘堕落的爱子(宫崎葵饰)被父亲(渡边谦饰)领回海滨小镇,邂逅了不善言辞的哲也(松山研一饰)。在东京工作的同性恋优马(妻夫木聪饰)将柔情似水的直人(绫野刚饰)带回了家,他不相信对方,却又尝试去相信。随母亲搬到冲绳的小泉(广濑铃饰)跟着同学辰哉(佐久本宝饰)登上一座荒岛,在废墟中遇到了背包客田中(森山未来饰),他们短暂成为朋友,而可怕的命运突然降临泉的头上。不久之后,通缉令遍布全国,三个男子的真实身份引人生疑……本片根据吉田修一的同名原作改编。`,coverMode:`content`,coverUrl:`/md-204/resource/24/24ef267eef2c35b5e4cf12dac8b55c14.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`98217427ed96ec51`,contentName:`熔炉`,titleMode:`custom`,title:`熔炉`,description:`来自首尔的哑语美术老师仁浩(孔宥饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍(郑有美饰)。仁浩妻子早亡,8岁女儿天生哮喘由祖母照看,所以他不辞辛苦谋职养家。然而,双胞胎的校长与教导主任竟逼仁浩索贿5千万韩元。同时,仁浩逐渐发现学校笼罩着一种紧张压抑的气氛,令人窒息。有三个孩子引人关注:聪颖的金妍斗(金贤秀饰)、贪吃的陈宥利(郑仁絮饰)和弟弟自杀身亡的全民秀(白承焕饰),民秀总是满脸淤青。下课后,仁浩还听到女厕所中有呼喊与哭泣,在门卫的阻拦下他未深究。之后。他意外目睹了校长行贿警察,教导员毒打民秀,宿导溺罚妍斗的行径。一个惊天的隐秘被慢慢揭开,真相令韩国震惊……本片取材于2005年光州一所聋哑障碍人学校的真实事件,改编自韩国作家孔枝泳的同名小说。`,coverMode:`content`,coverUrl:`/md-204/resource/b4/b410ccdcd86936455b9460a9152aaa47.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`caa2b4eb4eb40de0`,contentName:`再次来寻我`,titleMode:`custom`,title:`再次来寻我`,description:`在宇回到曾经与初恋志勋相遇的303号房,这里即将被拆迁,他在房间里回忆和志勋的点点滴滴,突然被书桌上的电话所吸引,一拿起话筒听到的竟是志勋的声音!在房子主人的同意下,在宇带着电话离开了303室,在回家的途中他发现自己像走在一个陌生的地方,而对面走来的竟是已消失已久的志勋…`,coverMode:`content`,coverUrl:`/md-204/resource/2b/2b43375f2248c1a012847d4507fd21a3.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0}]}}];function C(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function w({detailId:f,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=ae(`components.pages.videoDetail`),O=i(),oe=re(),se=ie(),k=oe.level,A=Array.isArray(k)?k:typeof k==`string`?[k]:[],j=A.findIndex(e=>e===`episode`),ce=j>=0?A[j+1]:A[2],M=Math.max(1,Number(ce)||1),[le,N]=d(`detail-current-series-num-${f}`,M);_(()=>{N(M)},[M,N]);let P=Math.max(1,Number(le)||1),F=Math.max(0,P-1),{data:I,isPending:L,isFetching:R,isError:z,isSuccess:B}=c(v(()=>[`video-detail`,f],[f]),async()=>f?await r({id:f}):null,{enabled:!!f}),V=v(()=>{let e=I?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[I?.data?.video]),H=w??V??null,[U,W]=d(`detail-information-${f}`,H),ue=U?.links?.[F]?.id||``,G=!!f&&!U&&(L||R),K=!f||!!U||z||B,[de,fe]=d(`info-detail-active-tab-${f}`,`video`),[q,J]=d(`info-detail-comment-add-count-${f}`,0),[Y,pe]=d(`info-detail-comment-total-${f}`,void 0);_(()=>{!U&&V&&W(V)},[U,V,W]);let X=g(e=>{W(t=>t&&{...t,...e})},[W]);u(()=>{U?.id&&U.id},[U?.id],`detail-page-report-${f}`),_(()=>{!U||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:U.id||f,author_id:U.up_user,object_type:U.content_type,object_category:U.content_type,object_tags:U.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,U]),_(()=>{J(0)},[ue,J]),v(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let me=g(()=>{},[!1,fe]);g(()=>{J(e=>e+1)},[J]),_(()=>{},[!1,me,U?.id,se]);let Z=g(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(typeof window>`u`)return;let n=String(U?.id||f||``).trim();if(!n)return;let r=T||window.isWebView===!0,i=`/${r?`webview`:`video`}/${n}/${encodeURIComponent(U?.name||``)}/episode/${t}`,{search:a,hash:c,pathname:l}=window.location,u=`${i}${a}${c}`,d=`${l}${a}${c}`,p=C(l,n);if(d!==u){if(r){let e=U?.links?.[Math.max(0,t-1)],r=o(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());s({poster:String(U?.img_y||U?.img_x||U?.preview_images?.[0]||``).trim(),src:r,title:String(U?.title||U?.name||``).trim(),contentId:n,episode:t}),P!==t&&N(t);return}p&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,u),N(t)):O.replace(u,{scroll:!1});return}P!==t&&N(t)},[P,f,U?.id,U?.img_x,U?.img_y,U?.links,U?.name,U?.preview_images,U?.title,T,O,N]);_(()=>{let e=Array.isArray(U?.links)?U.links.length:0;e<=0||P<=e||Z(1)},[P,Z,U?.links]);let Q=U?.status===`1`,{data:he}=c([l.CHANNEL],()=>n()),ge=e(he?.data),$=v(()=>{if(E!==void 0){let e=new Map(S.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return S},[E]),_e=v(()=>({information:U??void 0,currentSeriesNum:P,onEpisodeChange:Z,onUpdateInformation:X,detailId:f,episodeIndex:F,isShow:!0,isWebView:T,isInformationLoading:G,isInformationResolved:K}),[P,f,F,Z,X,U,G,K,T,!0]),ve=g(e=>{if(!U)return null;let t=ee[e.componentName];if(!t)return null;let n=t.clientComponent,r=h(t,e.props);return r.isValid?b(n,{...r.props}):b(`div`,{children:`组件配置错误`})},[U]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(p,{data:{list:ge}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[U&&!Q&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),U&&Q&&x(y,{children:[!T&&b(te,{isVideo:!0,information:U,episodeIndex:F}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[b(m,{value:_e,children:$.map(e=>b(ne,{children:ve(e)},e.id))}),!1]}),!1]}),!U&&b(a,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import
|
|
4
|
+
import Image from "next/image";
|
|
5
5
|
|
|
6
6
|
//#region components/ui/image.d.ts
|
|
7
7
|
/** BaseImageProps 属性定义。 */
|
|
8
|
-
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof
|
|
8
|
+
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
|
|
9
9
|
type CommonImageProps = BaseImageProps & {
|
|
10
10
|
/** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
|
|
11
11
|
alt?: string; /** 图片类名。 */
|
|
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
|
|
|
27
27
|
/** ImageProps 属性定义。 */
|
|
28
28
|
type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
|
|
29
29
|
/** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
|
|
30
|
-
declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|