cafe-video-player 2.0.29 → 2.0.31
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/backwardForward-5I5ZGR75.js +13 -0
- package/backwardForward-LB7I7YQE.mjs +7 -0
- package/chunk-27ZHIMPA.mjs +26 -0
- package/chunk-27ZHIMPA.mjs.map +1 -0
- package/{chunk-SXHBEMO7.js → chunk-3RUZL5R4.js} +3 -3
- package/chunk-4R5EOGY4.js +33 -0
- package/chunk-4R5EOGY4.js.map +1 -0
- package/chunk-5L555EFO.mjs +11 -0
- package/chunk-5L555EFO.mjs.map +1 -0
- package/{chunk-6C2MHUO4.mjs → chunk-6ZLJ7FBO.mjs} +3 -3
- package/{chunk-VRF4MCLQ.mjs → chunk-B2QODDI6.mjs} +3 -3
- package/chunk-D35TX3CS.js +40 -0
- package/chunk-D4F2JSZK.mjs +7 -0
- package/{chunk-RJCZ5H4S.mjs.map → chunk-D4F2JSZK.mjs.map} +1 -1
- package/chunk-EMXH6Q4Z.js +16 -0
- package/chunk-GRNAJCNU.js +100 -0
- package/chunk-GRNAJCNU.js.map +1 -0
- package/{chunk-KZQGJKXL.mjs → chunk-J3SBBZNG.mjs} +5 -5
- package/chunk-J5GP267B.mjs +8 -0
- package/{chunk-JDUQL7C3.js → chunk-LTW2QMJR.js} +5 -5
- package/chunk-SZGMQYKO.js +11 -0
- package/chunk-TZF6GALV.js +9 -0
- package/{chunk-PARGBSKY.js.map → chunk-TZF6GALV.js.map} +1 -1
- package/{chunk-NEVXHFEL.mjs → chunk-VIHKTSKV.mjs} +3 -3
- package/chunk-VLW5XE53.js +20 -0
- package/{chunk-A23QI3PW.mjs → chunk-XYOTI6UW.mjs} +4 -4
- package/index.js +6 -6
- package/index.mjs +6 -6
- package/nonStaticVideoTag-5EEMZCJN.js +25 -0
- package/{nonStaticVideoTag-TORC4NGH.mjs → nonStaticVideoTag-RXV57YCY.mjs} +7 -7
- package/{notActive-O7U5EEL2.js → notActive-IHUUVVM7.js} +3 -3
- package/{notActive-RKVMBB4J.mjs → notActive-RPTBQQGW.mjs} +2 -2
- package/package.json +1 -1
- package/staticPlayer-2XCZ7OQX.js +18 -0
- package/staticPlayer-F23NQA75.mjs +16 -0
- package/staticVideoTag-FQB344QO.js +21 -0
- package/{staticVideoTag-5IOUWUKG.mjs → staticVideoTag-YGLH53GJ.mjs} +6 -6
- package/{touchVolumeBrightness-I7EXKWOR.mjs → touchVolumeBrightness-G45JEEWY.mjs} +4 -4
- package/{touchVolumeBrightness-6PPZ5DFH.js → touchVolumeBrightness-KFTHNDTL.js} +4 -4
- package/videoArea-3FD5GNF7.js +17 -0
- package/videoArea-YRNFASGM.mjs +11 -0
- package/videoPlayerStyles.css +44 -34
- package/vodPlayer-T4XSJ7T6.mjs +14 -0
- package/vodPlayer-Z6ET27DE.js +20 -0
- package/backwardForward-PPIGAYY3.mjs +0 -7
- package/backwardForward-TZ62Q3P5.js +0 -13
- package/chunk-EB32BB52.js +0 -40
- package/chunk-K54H7FH6.js +0 -97
- package/chunk-K54H7FH6.js.map +0 -1
- package/chunk-KKHKNMKM.mjs +0 -26
- package/chunk-KKHKNMKM.mjs.map +0 -1
- package/chunk-KLSQCKN5.js +0 -16
- package/chunk-KWJFCQAD.mjs +0 -10
- package/chunk-KWJFCQAD.mjs.map +0 -1
- package/chunk-PARGBSKY.js +0 -9
- package/chunk-RJCZ5H4S.mjs +0 -7
- package/chunk-T5ACBKB6.js +0 -33
- package/chunk-T5ACBKB6.js.map +0 -1
- package/chunk-VCKYDQQV.js +0 -11
- package/chunk-VZ63CL52.js +0 -20
- package/chunk-Z2WKCQSL.mjs +0 -8
- package/nonStaticVideoTag-3UVTETYV.js +0 -25
- package/staticPlayer-2WB2C4NT.mjs +0 -16
- package/staticPlayer-JCWYXBCJ.js +0 -18
- package/staticVideoTag-XBWNWEQQ.js +0 -21
- package/videoArea-DTO2ADQQ.js +0 -17
- package/videoArea-TBZUGGHP.mjs +0 -11
- package/vodPlayer-4VWPKINJ.mjs +0 -14
- package/vodPlayer-AOQNFLZE.js +0 -20
- /package/{backwardForward-PPIGAYY3.mjs.map → backwardForward-5I5ZGR75.js.map} +0 -0
- /package/{backwardForward-TZ62Q3P5.js.map → backwardForward-LB7I7YQE.mjs.map} +0 -0
- /package/{chunk-SXHBEMO7.js.map → chunk-3RUZL5R4.js.map} +0 -0
- /package/{chunk-6C2MHUO4.mjs.map → chunk-6ZLJ7FBO.mjs.map} +0 -0
- /package/{chunk-VRF4MCLQ.mjs.map → chunk-B2QODDI6.mjs.map} +0 -0
- /package/{chunk-EB32BB52.js.map → chunk-D35TX3CS.js.map} +0 -0
- /package/{chunk-KLSQCKN5.js.map → chunk-EMXH6Q4Z.js.map} +0 -0
- /package/{chunk-KZQGJKXL.mjs.map → chunk-J3SBBZNG.mjs.map} +0 -0
- /package/{chunk-Z2WKCQSL.mjs.map → chunk-J5GP267B.mjs.map} +0 -0
- /package/{chunk-JDUQL7C3.js.map → chunk-LTW2QMJR.js.map} +0 -0
- /package/{chunk-VCKYDQQV.js.map → chunk-SZGMQYKO.js.map} +0 -0
- /package/{chunk-NEVXHFEL.mjs.map → chunk-VIHKTSKV.mjs.map} +0 -0
- /package/{chunk-VZ63CL52.js.map → chunk-VLW5XE53.js.map} +0 -0
- /package/{chunk-A23QI3PW.mjs.map → chunk-XYOTI6UW.mjs.map} +0 -0
- /package/{nonStaticVideoTag-3UVTETYV.js.map → nonStaticVideoTag-5EEMZCJN.js.map} +0 -0
- /package/{nonStaticVideoTag-TORC4NGH.mjs.map → nonStaticVideoTag-RXV57YCY.mjs.map} +0 -0
- /package/{notActive-O7U5EEL2.js.map → notActive-IHUUVVM7.js.map} +0 -0
- /package/{notActive-RKVMBB4J.mjs.map → notActive-RPTBQQGW.mjs.map} +0 -0
- /package/{staticPlayer-JCWYXBCJ.js.map → staticPlayer-2XCZ7OQX.js.map} +0 -0
- /package/{staticPlayer-2WB2C4NT.mjs.map → staticPlayer-F23NQA75.mjs.map} +0 -0
- /package/{staticVideoTag-XBWNWEQQ.js.map → staticVideoTag-FQB344QO.js.map} +0 -0
- /package/{staticVideoTag-5IOUWUKG.mjs.map → staticVideoTag-YGLH53GJ.mjs.map} +0 -0
- /package/{touchVolumeBrightness-I7EXKWOR.mjs.map → touchVolumeBrightness-G45JEEWY.mjs.map} +0 -0
- /package/{touchVolumeBrightness-6PPZ5DFH.js.map → touchVolumeBrightness-KFTHNDTL.js.map} +0 -0
- /package/{videoArea-DTO2ADQQ.js.map → videoArea-3FD5GNF7.js.map} +0 -0
- /package/{videoArea-TBZUGGHP.mjs.map → videoArea-YRNFASGM.mjs.map} +0 -0
- /package/{vodPlayer-4VWPKINJ.mjs.map → vodPlayer-T4XSJ7T6.mjs.map} +0 -0
- /package/{vodPlayer-AOQNFLZE.js.map → vodPlayer-Z6ET27DE.js.map} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkLTW2QMJR_js = require('./chunk-LTW2QMJR.js');
|
|
4
|
+
require('./chunk-VLW5XE53.js');
|
|
5
|
+
require('./chunk-GRNAJCNU.js');
|
|
6
|
+
require('./chunk-TZF6GALV.js');
|
|
7
|
+
require('./chunk-SPUHJYDE.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module.exports = chunkLTW2QMJR_js.a;
|
|
12
|
+
//# sourceMappingURL=out.js.map
|
|
13
|
+
//# sourceMappingURL=backwardForward-5I5ZGR75.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { a as default } from './chunk-J3SBBZNG.mjs';
|
|
2
|
+
import './chunk-J5GP267B.mjs';
|
|
3
|
+
import './chunk-5L555EFO.mjs';
|
|
4
|
+
import './chunk-D4F2JSZK.mjs';
|
|
5
|
+
import './chunk-DBPGS72Q.mjs';
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=backwardForward-LB7I7YQE.mjs.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as a$3 } from './chunk-LL37OGJG.mjs';
|
|
2
|
+
import { b } from './chunk-VIHKTSKV.mjs';
|
|
3
|
+
import { a as a$4 } from './chunk-J3SBBZNG.mjs';
|
|
4
|
+
import { b as b$1, a as a$5 } from './chunk-6R7UYUPZ.mjs';
|
|
5
|
+
import { i, a as a$1, k, f as f$1, g, d, h, j } from './chunk-J5GP267B.mjs';
|
|
6
|
+
import { ea, ca, da, aa, la, na, f, B, D, G, A, fa, z as z$1, Aa, M as M$1, r, ia, ha, Ba, ja, a as a$2, C, ma, P, E, q, sa, h as h$1, qa, O, R, $, ba, k as k$1, l, oa } from './chunk-5L555EFO.mjs';
|
|
7
|
+
import { a } from './chunk-D4F2JSZK.mjs';
|
|
8
|
+
import { e } from './chunk-DBPGS72Q.mjs';
|
|
9
|
+
import { memo, forwardRef, useState, useRef, useEffect } from 'react';
|
|
10
|
+
import { shallowEqual } from 'react-redux';
|
|
11
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
12
|
+
import ge from 'next/legacy/image';
|
|
13
|
+
import { createPortal } from 'react-dom';
|
|
14
|
+
import Bo from 'next/dynamic';
|
|
15
|
+
|
|
16
|
+
e();e();e();var Jo=()=>{let{details:e,params:o}=ea(({videoData:{details:l,params:r}})=>({details:l,params:r}),shallowEqual);return jsx("div",{className:`pl-w-full pl-max-w-[80%] pl-truncate pl-text-left pl-ml-4 pl-text-[16px] pl-font-normal pl-text-white pl-break-words pl-self-start animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-opacity-100":"pl-opacity-0 animate__fadeOut"}`,children:ca("hasTitle")?e.title:o.id})},Ct=Jo;e();var el=()=>jsxs("div",{className:`pl-relative animate__animated animate__faster ${ca("isActiveElements")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[jsx(ge,{src:a.lock,alt:"lock-icon",width:20,height:20,onClick:()=>h("unlock")}),!localStorage.getItem("unlock-click")&&jsx("p",{className:"pl-text-[10px] pl-text-black/[0.87] pl-bg-[#F7F7F7] pl-absolute pl-left-0 pl-px-4 pl-py-3 pl-rounded-[8px] pl-w-max",children:"\u0628\u0631\u0627\u06CC \u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0642\u0641\u0644\u060C \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F"})]}),kt=el;var ll=()=>(ea(({controller:{lock:e,activeElements:o}})=>({lock:e,activeElements:o}),shallowEqual),jsxs("div",{className:`pl-flex pl-items-start pl-justify-end pl-mx-8 pl-mt-8 ${ca("isTouchScreenPortrait")?"pl-h-[16px]":"pl-h-[60px]"}`,children:[ca("showTitle")&&jsx(Ct,{}),ca("isLock")&&jsx(kt,{})]})),It=ll;e();e();var nl=()=>(ea(({controller:{play:e}})=>({play:e}),shallowEqual),ea(({videoData:{videoElementSizeInfo:e,params:o}})=>({videoElementSizeInfo:e,params:o}),shallowEqual),jsx("div",{className:`${!ca("isTouchScreen")&&"hover:pl-scale-125"} pl-transition-transform pl-ease-in-out pl-cursor-pointer`,onContextMenu:e=>e.preventDefault(),children:jsx(ge,{alt:"",src:ca("isPlay")?a.bigPause:a.bigPlay,width:40,height:40,onClick:e=>a$1(e),onDoubleClick:e=>e.stopPropagation(),className:`${ca("isPlay")?"pl-big-play-icon":"pl-big-pause-icon"}`})})),At=nl;var pl=()=>{let[e,o]=useState(!1),[l,r]=useState(!1),{firstPlay:i}=ea(({controller:{lock:a,firstPlay:f}})=>({lock:a,firstPlay:f}),shallowEqual),{activeElements:s,isLoading:u}=ea(({controller:{activeElements:a,isLoading:f}})=>({activeElements:a,isLoading:f}),shallowEqual);return useEffect(()=>{let a=null;return ca("isFirstPlay")||ca("isActiveElements")?a=setTimeout(()=>r(!0),100):r(!1),()=>clearTimeout(a)},[s]),useEffect(()=>{let a;return ca("isLoading")?a=setTimeout(()=>o(!0),ca("isFirstPlay")?0:b$1):o(!1),()=>{clearTimeout(a),o(!1);}},[u,i]),jsx("main",{className:"pl-flex-1 pl-mt-1",children:e?jsx(a$3,{}):jsx(Fragment,{children:l&&!ca("isLock")&&jsx("div",{id:"main-content",className:`pl-h-full pl-flex pl-justify-center pl-items-center pl-text-center pl-relative ${ca("isActiveElements")?"pl-pointer-events-auto":"pl-pointer-events-none"}`,children:jsxs("div",{onClick:a=>a.stopPropagation(),className:"pl-flex pl-justify-center pl-gap-8 pl-items-center pl-w-max",style:{zIndex:4},children:[!ca("isFirstPlay")&&jsx(a$4,{type:"forward"}),jsx(At,{}),!ca("isFirstPlay")&&jsx(a$4,{type:"backward"})]})})})})},_t=pl;e();e();e();e();var He=e=>{let{videoElementSizeInfo:o}=M$1.getState().videoData,{duration:l}=M$1.getState().controller,r=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(r<=o.right&&r>0)return (r-o.left)/o.width*l},Y=e=>{let{videoElementSizeInfo:o}=M$1.getState().videoData,l=e.clientX!==void 0?e.clientX:e.touches[0].clientX;if(l<=o.right&&l>0)return l-o.left},Bt=e=>{let{duration:o}=M$1.getState().controller;return e*ia()/o},ue=e=>{e&&(e.style.opacity="0.0",e.style.pointerEvents="none",e.style.zIndex=-2);},ml=e=>{e.style.display="block",e.style.zIndex=5,e.style.opacity=M$1.getState().videoData.details.vtt?"1.0":"0.6",e.style.pointerEvents="auto",e.style.transition="opacity 1s ease-out";},cl=(e,o)=>{let{videoElementSizeInfo:l}=M$1.getState().videoData,r=document.getElementsByClassName("pl-progressTooltip")[0],i=document.getElementById("parent-player");r&&i&&(Y(e)>r.getBoundingClientRect().width/2&&Y(e)<l.right-l.left-r.getBoundingClientRect().width/2?o.style.left=`${Y(e)-r.offsetWidth/2}px`:Y(e)<(i.offsetLeft===0?r.offsetWidth:i.offsetLeft)?o.style.left="0px":fa().offsetLeft+fa().offsetWidth<Y(e)+r.offsetWidth&&(o.style.left=`${fa().offsetWidth-r.offsetWidth}px`));},dl=(e,o,l)=>{o&&ml(o),M$1.getState().videoData.details.vtt?cl(e,o):o.style.left=`${Y(e)-30}px`,M$1.dispatch(q(Number(He(e)))),l.textContent=`${P(He(e))}`;},fe=(e,o=!1)=>{let{videoElementSizeInfo:l}=M$1.getState().videoData,r=document.querySelector(".pl-progressTooltip"),i=document.querySelector(".pl-progressTimeTooltip"),s=e.clientX!==void 0?e.clientX:e.touches[0].clientX;r&&i&&s<=l.right&&s>l.left?(dl(e,r,i),o&&setTimeout(()=>ue(r),2e3)):ue(r);},zt=e=>{let o=e.clientX!==void 0?e.clientX:e.touches[0].clientX;ha()&&(o<=e.view.innerWidth&&o>0?ha().style.width=`${Y(e)}px`:o<=e.view.innerWidth?ha().style.width=0:o>0&&(ha().style.width="100%"));},Vt=(e,o,l$1)=>{e.preventDefault(),e.stopPropagation(),l$1(!0);let r=M$1.dispatch,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX;i<=e.view.innerWidth&&i>0&&(r(k$1(!0)),r(l(!0)),sessionStorage.setItem("previousVideoTime",String(fa().currentTime)),e.target.setPointerCapture(e.pointerId),o.length>0&&o.map(s=>clearTimeout(s)));},Ue=e=>{e.preventDefault(),e.stopPropagation();let o=M$1.dispatch,{activePointerProgressBar:l$1}=M$1.getState().controller,{left:r}=M$1.getState().videoData.videoElementSizeInfo,i=e.clientX!==void 0?e.clientX:e.touches[0].clientX,s=document.querySelector(".pl-progressTooltip");i>r?(s&&(s.style.display="block !important",s.style.pointerEvents="auto"),l$1&&(o(l(!0)),fe(e),zt(e),fa().pause())):s&&(s.style.display="none !important",s.style.pointerEvents="none");},qt=(e,o,l$1,r)=>{r(!1),e.preventDefault(),e.stopPropagation();let i$1=M$1.dispatch,{duration:s}=M$1.getState().controller,{left:u,right:a}=M$1.getState().videoData.videoElementSizeInfo,f=M$1.getState().videoData.params;e.target.removeEventListener("pointermove",Ue);let c=e.clientX!==void 0?e.clientX:e.touches[0].clientX,S=0;c>u&&c<a?S=He(e):c<u?S=0:c>0&&(S=s),ca("isStaticFormat")||i(fa().currentTime,S),fa().currentTime=S,ca("hasOnChangeCurrentTime")&&f.onChangeCurrentTime(S),M$1.getState().controller.activePointerProgressBar&&(i$1(k$1(!1)),i$1(l(!1)),fa().play(),fe(e,!0),sessionStorage.setItem("current-time",String(S)),zt(e),ul(e,i$1,o,l$1));},ul=(e,o,l,r)=>{let i=r,s=setTimeout(()=>{let{settingPopover:u}=M$1.getState().popovers,{delayTurnOffControlbar:a}=M$1.getState().controller;e.pointerType==="touch"&&!u&&a&&o(f(!1));},a$5);i.push(s),l(i);},Rt=()=>{let e=Date.now();fa().play().then(()=>la(oa(Date.now()-e)));},Xt=e=>fe(e),Ht=()=>{let e=document.querySelector(".pl-progressTooltip");ue(e);},fl=e=>{let o=e.split("."),r=o[0].split(":");return {milliseconds:parseInt(o[1],10)||0,seconds:parseInt(r.pop(),10)||0,minutes:parseInt(r.pop(),10)||0,hours:parseInt(r.pop(),10)||0}},Ot=e=>{let o=fl(e);return parseInt(o.hours*(60*60)+o.minutes*60+o.seconds+o.milliseconds/1e3,10)},hl=e=>{let o=e.split(/#xywh=/i),l=o[0],i=o[1].match(/[0-9]+/gi);return {x:i[0],y:i[1],w:i[2],h:i[3],image:l}},vl=(e,o)=>e.indexOf("//")>=0?e:o.indexOf("//")===0?[o.replace(/\/$/gi,""),e.trim()].join("/"):o.indexOf("//")>0?[o.trim(),e.trim()].join("/"):e,gl=(e,o)=>{let l={},r=o.split(/\/\w+\.vtt\s?/)[0];if(e=vl(e,r),!e.match(/#xywh=/i))return l.background='url("'+e+o.split(/\/\w+\.vtt\s?/)[1]+'")',l;let i=hl(e);return l.background='url("'+i.image+o.split(/\/\w+\.vtt\s?/)[1]+'") no-repeat -'+i.x+"px -"+i.y+"px",l.width=i.w+"px",l.height=i.h+"px",l.url=i.image,l},Ut=(e,o)=>{fetch(e).then(l=>{if(!l.ok)throw M$1.dispatch(r({...M$1.getState().videoData.details,vtt:void 0,vtt_mobile:void 0})),new Error("Network response was not ok");return l.text()}).then(l=>{let r=[];l.split(/[\r\n][\r\n]/i).forEach(s=>{if(s.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)){let u=s.split(/[\r\n]/i),f=u[0].split(/ ?--> ?/i),c=f[0],S=f[1],d=u[1],b=gl(d,e);r.push({start:Ot(c),end:Ot(S),css:b});}}),o(r);}).catch(l=>{console.error("Error fetching file:",l);});},Wt=(e,o,l)=>{for(let r=0;r<o.length;++r){let i=o[r];if(e>=i.start&&e<i.end){if(i.css.url&&!l[i.css.url]){let s={background:i.css.background,width:i.css.width,height:i.css.height};return l[i.css.url]=s,s}else if(i.css.url)return l[i.css.url]}}};var Sl=()=>{let{details:e}=ea(({videoData:{details:a}})=>({details:a}),shallowEqual),{tooltipTime:o}=ea(({controller:{tooltipTime:a,activeElements:f,isFullScreen:c}})=>({tooltipTime:a,activeElements:f,isFullScreen:c}),shallowEqual),l={},[r,i]=useState(void 0),[s,u]=useState(ca("isTouchScreen")?e.vtt_mobile:e.vtt);return useEffect(()=>{u(e.vtt_mobile);},[e.vtt_mobile]),useEffect(()=>{s&&Ut(e.vtt_mobile,i);},[s]),ca("isActiveElements")?jsxs("div",{className:`pl-flex pl-flex-col pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-px-[10px] pl-pt-[5px] pl-mr-[-25px] pl-text-white pl-text-[14px] ${s&&r?"":"pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,children:[s&&!!r&&jsx("div",{className:"pl-flex-1 pl-border pl-border-white pl-rounded-[8px] pl-mb-2",children:jsx("div",{className:"pl-rounded-[8px]",style:Wt(o,r,l)})}),jsx("div",{className:"pl-flex pl-items-center pl-justify-center pl-progressTimeTooltip pl-text-white !pl-opacity-100"})]}):jsx(Fragment,{})},Yt=memo(Sl);e();e();var Tl=(e,o)=>{useEffect(()=>{let l=r=>{!e.current||e.current.contains(r.target)||o(r);};return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l);}},[e,o]);},z=Tl;e();var Pl=({name:e,className:o,dataMarker:l})=>jsx("img",{"data-marker":l,src:`${ja()}/${e}.png`,alt:e,className:o}),he=Pl;var Nl=()=>{da();let {duration:o,activeElements:l}=ea(({controller:{duration:m,activeElements:T,isFullScreen:H}})=>({duration:m,activeElements:T,isFullScreen:H}),shallowEqual),{markers:r}=ea(({videoData:{markers:m,videoElementSizeInfo:T}})=>({markers:m,videoElementSizeInfo:T}),shallowEqual),[i$1,s]=useState(void 0),[u,a]=useState([]),[f,c]=useState({}),[S,d]=useState(!1),b=m=>o?ia()*m/o:0,F=(m,T,H,pe,K,U,se,Oe)=>{m.stopPropagation();let D=24*T/(ia()+5),j=[],Zo=0;Oe.map(xe=>{xe.time>T-D&&xe.time<T+D&&(j.push(xe),Zo+=xe.time);}),j.length>1?a(j):(j=[],a([]),h(m,T,H,pe,K,U,se));},h=(m,T,H,pe,K,U,se)=>{m.stopPropagation(),fe(m,se),i(fa().currentTime,T),fa().currentTime=T,ha()&&(ha().style.width=b(T)),la(Ba(H,T,pe,K,U));};useEffect(()=>{ca("isActiveElements")||a([]);},[l]);let k=useRef(null);z(k,()=>a([])),useEffect(()=>{if(u.length>0){let m=aa(document.getElementsByClassName("pl-overlapMarkers")[0]);if(m==="inViewport")return d(!0),c({left:b(u[0].time)});if(m==="OutViewPortFromLeft")return d(!1),c({left:0});if(m==="OutViewPortFromRight")return d(!1),c({right:0})}},[u,document.getElementsByClassName("pl-overlapMarkers")[0]]);let L=m=>{m.preventDefault(),ca("isTouchScreen")&&s(Number(m.target.getAttribute("data-marker")));};return jsxs(Fragment,{children:[r.map(m=>jsx("div",{onContextMenu:L,"data-marker":m.time,onClick:T=>F(T,m.time,m.id,m.title,m.description,m.sticker,!0,r),onDoubleClick:T=>T.stopPropagation(),children:jsxs("div",{className:`pl-emoji-image pl-absolute pl-bottom-[200%] pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-p-1 ${ca("isTouchScreenPortrait"),"pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,style:{left:b(m.time),zIndex:6},"data-marker":m.time,children:[m.isPersonal!==null&&m.isPersonal!==void 0&&jsx("div",{className:"pl-absolute pl-rounded-full pl-top-[-2px] pl-right-[-1px] pl-bg-main pl-w-2 pl-h-2"}),jsx(he,{dataMarker:m.time,name:m.sticker,className:"pl-w-[16px] pl-h-[16px] !pl-max-w-max"})]})},m.id)),u.length>0&&jsx("div",{className:`pl-overlapMarkers ${S?"pl-overlayMarkersInViewport":"pl-overlayMarkersOutViewport"} pl-absolute pl-bottom-[45px] pl-px-1 pl-py-2 pl-flex pl-gap-3 pl-flex-row-reverse pl-justify-end pl-bg-z-gray-700/[0.4] pl-rounded-[6px] pl-ml-[-10px] animate__animated animate__fadeInUp pl-opacity-100`,ref:k,style:f,children:u.map(m=>jsx("div",{className:"pl-emoji-image pl-rounded-[6px] pl-cursor-pointer","data-marker":m.time,onClick:T=>h(T,m.time,m.id,m.title,m.description,m.sticker,!0),onDoubleClick:T=>T.stopPropagation(),children:jsx(he,{dataMarker:m.time,name:m.sticker,className:"pl-w-[24px] pl-h-[24px] !pl-max-w-max"})},m.id))})]})},eo=memo(Nl);var Ml=()=>{let[e,o]=useState(!1);useEffect(()=>{ue(document.querySelector(".progressTooltip"));},[]);let{duration:l,currentTime:r,bufferedTimeWidth:i}=ea(({controller:{duration:a,currentTime:f,bufferedTimeWidth:c}})=>({duration:a,currentTime:f,bufferedTimeWidth:c}),shallowEqual);ea(({videoData:{params:a,videoElementSizeInfo:f}})=>({params:a,videoElementSizeInfo:f}),shallowEqual);let[s,u]=useState([]);return jsxs("div",{className:`${ca("isTouchScreenPortrait")?"pl-order-1":"pl-order-none"} pl-relative`,children:[jsxs("div",{className:"pl-relative",children:[jsx(Yt,{}),jsx(eo,{})]}),jsx("div",{className:"pl-w-full pl-flex pl-items-end",onPointerDown:a=>Vt(a,s,o),onPointerMove:Ue,onPointerUp:a=>qt(a,u,s,o),onMouseMove:Xt,onMouseOut:Ht,onClick:Rt,onDoubleClick:a=>a.stopPropagation(),children:jsxs("div",{id:"progress-area",className:"pl-w-full pl-absolute",children:[jsx("div",{className:"pl-w-full pl-h-[40px]"}),jsxs("div",{id:"time-progress-area",className:"!pl-w-full !pl-h-[5px] pl-transition-transform pl-duration-300 pl-m-auto pl-cursor-pointer !pl-bg-gray-highLight pl-rounded",style:{transform:e?"scaleY(1.8)":"unset"},children:[jsx("div",{id:"time-progress-buffer",className:"pl-absolute pl-h-[5px] pl-bg-z-gray-400/[0.7] pl-rounded",style:{width:`${i}%`}}),jsx("div",{id:"time-progress-bar",className:`pl-h-[5px] pl-rounded pl-relative pl-cursor-pointer pl-bg-primary before:pl-bg-primary before:pl-inline-block before:pl-w-4 before:pl-h-4 ${e&&"before:pl-w-7 before:pl-h-3"}`,style:{width:`${r/l*ia()}px`}})]})]})})]})},lo=Ml;e();e();e();var Al=({title:e,className:o})=>jsx("span",{className:`pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${ca("isFullScreen")?"pl-bottom-[300%]":"pl-bottom-[270%]"} pl-rounded-[8px] pl-text-[10px] pl-px-4 pl-py-[13px] pl-font-normal ${o}`,children:e}),M=Al;var Bl=()=>{let{isFullScreen:e}=ea(({controller:{firstPlay:i,isFullScreen:s}})=>({firstPlay:i,isFullScreen:s}),shallowEqual),[o,l]=useState(!1),r=da();return useEffect(()=>{ca("isFirstPlay")||r(f(!1));},[e]),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(ge,{src:ca("isFullScreen")?a.nonFullScreen:a.fullScreen,alt:"fullScreen-icon",className:"pl-cursor-pointer",width:20,height:20,onMouseOver:()=>!ca("isTouchScreen")&&l(!0),onMouseLeave:()=>!ca("isTouchScreen")&&l(!1),onClick:()=>{f$1(),g();}}),o&&jsx(M,{title:`${ca("isFullScreen")?"\u062E\u0631\u0648\u062C \u0627\u0632":""} \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647`})]})},io=Bl;e();var Xl=()=>{let[e,o]=useState(!1),l=da(),{params:r,details:i}=ea(({videoData:{params:s,details:u}})=>({params:s,details:u}),shallowEqual);return jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(ge,{alt:"",onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1),src:a.pictureInPicture,width:20,height:20,className:"pl-flex pl-cursor-pointer",onClick:()=>{r.onClickMiniPlayerIcon&&(localStorage.removeItem("close-miniPlayer"),fa().pause(),l(a$2(!1)),r.onClickMiniPlayerIcon({video:i||void 0,id:r.type==="vod"?r.id:window.btoa(r.id),type:r.type,currentTime:fa().currentTime}));}}),e&&jsx(M,{title:"\u062A\u0635\u0648\u06CC\u0631 \u062F\u0631 \u062A\u0635\u0648\u06CC\u0631 "})]})},po=Xl;e();var Zl=()=>{let[e,o]=useState(!1),l=da(),{settings:r}=ea(({user:{settings:a}})=>({settings:a}),shallowEqual),i=useRef(r.volume),s=()=>{if(i.current!==r.volume){let{settings:a}=M$1.getState().user;la(sa(i.current,a.volume)),i.current=a.volume,l(G({...a,volume:a.volume}));}},u=a=>{let{settings:f}=M$1.getState().user;a==="mute"?(d(0),la(sa(f.volume,0))):(la(sa(f.volume,100)),d(100));};return jsxs("div",{className:"pl-relative pl-inline-flex pl-items-center pl-gap-2 pl-sound-icon",children:[!ca("isTouchScreen")&&jsx("input",{onMouseUp:s,type:"range",min:"0",max:"100",value:r.volume,onChange:a=>d(+a.target.value),className:"pl-soundVolume pl-cursor-pointer rounded-full",style:{background:`linear-gradient(to right, white ${r.volume}%, rgba(255,255,255,0.3) 0)`}}),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(ge,{src:ca("hasSound")?a.unMute:a.mute,alt:ca("hasSound")?"unmute-icon":"mute-icon",className:"pl-flex pl-items-center pl-cursor-pointer",width:20,height:20,onClick:()=>ca("hasSound")?u("mute"):u("unmute"),onDoubleClick:a=>a.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(M,{className:"pl-left-0",title:ca("hasSound")?"\u0635\u062F\u0627":"\u0628\u06CC\u200C\u0635\u062F\u0627"})]})]})},ao=Zl;e();e();var co=forwardRef(({children:e,status:o,onClose:l,type:r,classNames:i,parentClassNames:s,styles:u,isBlurBackground:a,isFullHeight:f=!1,isHeader:c,isHasCatchUpLineOnTop:S=!1,animation:d,scrollbar:b=!1,isFocusOnInput:F=!1},h)=>{let[k,L]=useState(o),[m,T]=useState(0),[H,pe]=useState(0),{videoElementSizeInfo:K}=ea(({videoData:{videoElementSizeInfo:D}})=>({videoElementSizeInfo:D}),shallowEqual),U=useRef(0);useEffect(()=>{let D;return o?L(!0):D=setTimeout(()=>{l(!1),T(0),L(!1);},500),()=>clearTimeout(D)},[o]);let se=D=>{let j=document.getElementById("popover-content");U.current||(U.current=window.innerHeight-K.top-j?.getBoundingClientRect().top),D.stopPropagation(),window.innerHeight-K.top-D.touches[0].clientY<U.current&&T(window.innerHeight-D.touches[0].clientY),pe(1000005);},Oe=()=>{l();},Be=jsxs(Fragment,{children:[a&&jsx("div",{className:`pl-bg-black/[0.5] pl-w-screen pl-h-screen pl-fixed pl-top-0 pl-right-0 animate__animated animate__faster ${o?"animate__fadeIn":"animate__fadeOut"}`,style:{zIndex:1000001}}),jsx("div",{className:`${r==="modal"&&"pl-fixed pl-top-0 pl-left-0 pl-flex pl-w-full pl-h-full pl-justify-center pl-items-end sm:pl-items-center"} ${s}`,style:{zIndex:f&&!F?H:1000004},children:jsx("div",{className:`pl-flex pl-flex-col pl-rounded-[8px] animate__animated animate__faster pl-bg-white/[0.9]
|
|
17
|
+
${f&&"pl-h-full"}
|
|
18
|
+
${d||(window.innerWidth>768&&r==="modal"?o?"animate__fadeIn":"animate__fadeOut":o?"animate__fadeInUp":"animate__fadeOutDown")}
|
|
19
|
+
${ca("isTouchScreenPortrait")?"!pl-fixed !pl-right-0 !pl-left-0 !pl-bottom-0 !pl-w-full !pl-mb-0 pl-rounded-[12px] !pl-rounded-b-none !pl-bg-white":"before:pl-hidden"}
|
|
20
|
+
${r!=="modal"&&"pl-absolute pl-bottom-[130%] pl-overflow-auto no-scrollbar"}
|
|
21
|
+
${i}
|
|
22
|
+
`,style:{height:m||"max-content",maxHeight:"80vh",zIndex:1000004,...u},ref:h,id:"popover-content",children:jsxs(Fragment,{children:[c&&jsx("div",{onTouchMove:S?se:()=>{},onTouchEndCapture:S?Oe:()=>{},className:"pl-py-4",children:S&&jsx("div",{className:"pl-absolute pl-top-[10px] pl-right-[50%] pl-mr-[-25px] pl-text-center pl-w-8 pl-h-1 pl-rounded-[20px] pl-bg-gray-highLight"})}),jsx("div",{className:`pl-overflow-y-auto pl-h-full pl-w-full ${!b&&"no-scrollbar"}`,onTouchMove:D=>D.stopPropagation(),children:e})]})})})]});return jsx(Fragment,{children:k&&jsx(Fragment,{children:r==="modal"?createPortal(jsx(Fragment,{children:Be}),document.getElementById("dialog-react-root-videoPlayer")):jsx("div",{id:"player-popover",children:Be})})})});co.displayName="popover";var X=co;e();var rr=({setSection:e,showQualityLevelsIcon:o})=>{let l=da(),{qualityLevels:r}=ea(({controller:{qualityLevels:d,manualQuality:b,autoQuality:F}})=>({qualityLevels:d,manualQuality:b,autoQuality:F}),shallowEqual),{settings:i}=ea(({user:{settings:d}})=>({settings:d}),shallowEqual),{qualityLevelsPopover:s}=ea(({popovers:{qualityLevelsPopover:d}})=>({qualityLevelsPopover:d}),shallowEqual);ea(({videoData:{params:d,videoElementSizeInfo:b}})=>({params:d,videoElementSizeInfo:b}),shallowEqual);let[u,a$1]=useState(!1);r=[-1,...r];let f$1=(d,b)=>ca("isAutoQuality")&&b===-1?!0:!ca("isAutoQuality")&&i.quality===d,c=useRef(null);z(c,()=>l(D(!1)));let S=jsx("div",{id:"qualityLevels",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:r.map((d,b)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${f$1(b-1,d)&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:f$1(b-1,d)?()=>{}:()=>{la(na(d===-1?"auto":`${d}P`)),l(f(!1)),l(B(!1)),l(D(!1)),l(G({...i,quality:d===-1?-1:b-1})),e&&e("main");},children:[!ca("isTouchScreen")&&f$1(b-1,d)&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(ge,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${f$1(b-1,d)&&"pl-border-primary"}`,children:f$1(b-1,d)&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("span",{className:`pl-w-full pl-text-[14px] pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:d===-1?jsxs("span",{children:[jsx("span",{children:"\u062E\u0648\u062F\u06A9\u0627\u0631 "}),jsx("span",{className:"pl-text-[10px] pl-font-normal pl-text-black/[0.5]",children:"(\u0628\u0631 \u0627\u0633\u0627\u0633 \u0633\u0631\u0639\u062A \u0627\u06CC\u0646\u062A\u0631\u0646\u062A \u0634\u0645\u0627)"})]}):`${d}p`})]},b))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:c,children:[jsx(ge,{src:a.qualitySetting1,alt:"speed-icon",width:20,height:20,onClick:()=>l(D(!s)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showQualityLevelsPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1),className:"pl-cursor-pointer"}),u&&jsx(M,{title:"\u06A9\u06CC\u0641\u06CC\u062A"}),jsx(X,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:pl-max-w-[440px]"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:s,onClose:()=>l(D(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?c:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:S})]}):jsx(Fragment,{children:S})})},Me=memo(rr);e();e();var ir=({className:e,onClick:o,onMouseOver:l,onMouseLeave:r})=>jsxs("svg",{width:"18",height:"15",viewBox:"0 0 18 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,onClick:o,onMouseOver:l,onMouseLeave:r,children:[jsx("path",{d:"M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z"}),jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"})]}),Ae=ir;var cr=[.5,.75,1,1.25,1.5,1.75,2],dr=({setSection:e,showSpeedIcon:o})=>{let l=da();ea(({videoData:{videoElementSizeInfo:c,params:S}})=>({videoElementSizeInfo:c,params:S}),shallowEqual);let{speedPopover:r}=ea(({popovers:{speedPopover:c}})=>({speedPopover:c}),shallowEqual),{settings:i}=ea(({user:{settings:c}})=>({settings:c}),shallowEqual),s=useRef(null),[u,a$1]=useState(!1);z(s,()=>l(C(!1))),useEffect(()=>{fa()&&(fa().playbackRate=i.speed);},[]);let f$1=jsx("div",{id:"speed",className:"animate__animated animate__fadeIn pl-py-2",children:jsx("ul",{className:"pl-flex pl-flex-col pl-gap-2",children:cr.map((c,S)=>jsxs("li",{className:`pl-flex pl-items-center pl-ps-[24.2px] pl-text-[14px] pl-font-medium pl-rounded-[4px] pl-relative pl-cursor-pointer ${i.speed===c&&"pl-bg-primary/[0.12] !pl-cursor-default"} ${ca("isTouchScreen")?"pl-py-[13.5px]":"pl-py-[9.5px]"}`,onClick:i.speed===c?()=>{}:()=>{ca("isStaticFormat")||la(ma(c)),l(f(!1)),l(B(!1)),l(C(!1)),l(G({...i,speed:c})),fa().playbackRate=c,e&&e("main");},children:[!ca("isTouchScreen")&&i.speed===c&&jsx("div",{className:"pl-absolute pl-right-[11.8px]",children:jsx(ge,{src:a.tick,alt:"",width:12,height:9})}),ca("isTouchScreen")&&jsx("div",{className:`pl-w-5 pl-h-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${i.speed===c&&"pl-border-primary"}`,children:i.speed===c&&jsx("div",{className:"pl-w-full pl-h-full pl-rounded-full pl-bg-primary"})}),jsx("p",{className:`pl-w-full pl-flex pl-items-center pl-gap-2 pl-text-black/[0.87] ${ca("isTouchScreen")?"pl-pr-[21px]":"pl-pr-[10px]"}`,children:c})]},S))})});return jsx(Fragment,{children:o?jsxs("div",{className:"pl-relative pl-flex pl-items-center",ref:s,children:[jsx(Ae,{className:"pl-size-5 pl-cursor-pointer size-5 pl-fill-white",onClick:()=>l(C(!r)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSpeedPopover")&&a$1(!0),onMouseLeave:()=>!ca("isTouchScreen")&&a$1(!1)}),u&&jsx(M,{title:"\u0633\u0631\u0639\u062A"}),jsx(X,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[440px]"}`,status:r,onClose:()=>l(C(!1)),type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?s:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:f$1})]}):jsx(Fragment,{children:f$1})})},Fe=dr;e();var ur=({enabled:e,setEnabled:o})=>jsx("div",{className:`pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e?"pl-bg-primary pl-border pl-border-transparent":"pl-bg-secondary-200 pl-border pl-border-gray-highLight"}`,onClick:o,children:jsx("div",{className:`pl-absolute pl-left-1 pl-top-[2px] pl-w-[16px] pl-h-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e?"pl-bg-white pl-translate-x-[13px]":"pl-bg-black/[0.16] -pl-translate-x-0.5"}`})}),go=ur;e();var vr=({setSection:e})=>{let o=da(),{subtitles:l,selectedSubtitle:r}=ea(({videoData:{subtitles:i,selectedSubtitle:s}})=>({subtitles:i,selectedSubtitle:s}),shallowEqual);return jsx("div",{id:"subtitles",className:"animate__animated animate__fadeIn pl-p-[14px]",children:jsxs("ul",{className:"pl-flex pl-flex-col pl-p-0 pl-m-0",children:[jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${!r&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(void 0)),e("main");let i=Object.values(fa().textTracks).find(s=>s.mode==="showing");i&&(i.mode="disabled"),o(z$1("")),la(Aa("empty"));},children:"\u0628\u062F\u0648\u0646 \u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),l.map((i,s)=>jsx("li",{className:`pl-flex pl-items-center pl-text-[14px] pl-rounded-[4px] pl-relative pl-cursor-pointer pl-leading-6 hover:pl-bg-main/[0.1] hover:dark:pl-bg-white/[0.25] pl-p-1 pl-pr-2 ${r&&r.language===i.language&&"pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,onClick:()=>{o(f(!1)),o(B(!1)),o(A(i)),fa().textTracks[s].mode="showing",e("main"),la(Aa(i.language));},children:jsx("span",{children:i.label})},s))]})})},xo=memo(vr);var br=()=>{let e=da(),{selectedSubtitle:o}=ea(({videoData:{params:f,subtitles:c,selectedSubtitle:S}})=>({params:f,subtitles:c,selectedSubtitle:S}),shallowEqual),{settingPopover:l}=ea(({popovers:{settingPopover:f}})=>({settingPopover:f}),shallowEqual),[r,i]=useState("main"),[s,u]=useState(!1),a$1=useRef(null);return z(a$1,()=>{e(B(!1)),setTimeout(()=>i("main"),500);}),jsxs("div",{className:`pl-inline-flex ${ca("isLandscape")&&"pl-relative"}`,ref:a$1,children:[jsxs("div",{className:"pl-flex pl-items-center pl-relative pl-cursor-pointer",onClick:()=>e(B(!l)),onMouseOver:()=>!ca("isTouchScreen")&&!ca("showSettingPopover")&&u(!0),onMouseLeave:()=>!ca("isTouchScreen")&&u(!1),children:[jsx(ge,{src:a.settings,alt:"",width:20,height:20}),s&&jsx(M,{title:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A "})]}),jsx(X,{classNames:`!pl-p-0 pl-overflow-hidden !pl-bg-white ${ca("isTouchScreen")?"!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none":"!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${ca("isTouchScreenPortrait")&&"!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${ca("isTouchScreenLandscape")&&"pl-w-full pl-max-w-[285px]"}`,status:l,onClose:()=>{e(B(!1)),setTimeout(()=>i("main"),500);},type:ca("isTouchScreen")?"modal":"popover",isBlurBackground:ca("isTouchScreenPortrait"),ref:ca("isTouchScreenPortrait")?a$1:void 0,isHeader:ca("isTouchScreen"),customHeader:jsx(Fragment,{}),isHasCatchUpLineOnTop:ca("isTouchScreen"),children:jsxs(Fragment,{children:[r==="main"&&jsxs("div",{id:"main",className:"pl-p-4 pl-rounded-[10px] pl-flex pl-flex-col pl-gap-5 animate__animated animate__fadeIn",children:[!ca("isStaticFormat")&&jsx(Fragment,{children:jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>i("qualityLevels"),children:[jsx(ge,{src:a.qualitySetting,alt:"",width:16,height:16}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u06A9\u06CC\u0641\u06CC\u062A \u067E\u062E\u0634"}),jsx(ge,{src:a.chevronLeft,alt:"",width:16,height:16})]})}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",onClick:()=>i("speed"),children:[jsx(Ae,{className:"size-5 pl-fill-black/[0.5]"}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0633\u0631\u0639\u062A"}),jsx(ge,{src:a.chevronLeft,alt:"",width:16,height:16})]}),ca("hasSubtitles")&&ca("isTouchScreenPortrait")&&jsxs("div",{className:"pl-flex pl-items-center pl-gap-[10px] pl-cursor-pointer",children:[jsx(ge,{src:a.subtitleOutlineGray,alt:"subtitle-icon",width:20,height:20}),jsx("p",{className:"pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]",children:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"}),jsx(go,{enabled:!!o,setEnabled:b})]})]}),r==="qualityLevels"&&jsx(Me,{setSection:i}),r==="speed"&&jsx(Fe,{setSection:i}),r==="subtitles"&&jsx(xo,{setSection:i})]})})]})},yo=memo(br);e();var yr=()=>{let{duration:e,currentTime:o}=ea(({controller:{duration:l,currentTime:r}})=>({duration:l,currentTime:r}),shallowEqual);return ea(({videoData:{videoElementSizeInfo:l,params:r}})=>({videoElementSizeInfo:l,params:r}),shallowEqual),jsx(Fragment,{children:jsxs("div",{className:`pl-mr-auto !pl-text-white pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold ${ca("isFullScreen")?"pl-ml-8":"pl-ml-4"} ${ca("isTouchScreenPortrait")?"!pl-ml-0":"pl-absolute pl-left-0 pl-bottom-full pl-mb-[33px]"}`,children:[jsx("span",{children:P(e)}),jsx("span",{children:" / "}),jsx("span",{children:P(o)})]})})},_e=yr;e();var Cr=()=>jsx(ge,{src:a.unlock,alt:"unlock-icon",width:20,height:20,onClick:()=>h("lock")}),To=Cr;e();var Lr=()=>{let[e,o]=useState(!1);return ea(({videoData:{selectedSubtitle:l,videoElementSizeInfo:r,params:i}})=>({selectedSubtitle:l,videoElementSizeInfo:r,params:i}),shallowEqual),jsxs("div",{className:"pl-relative pl-flex pl-items-center",children:[jsx(ge,{alt:"subtitle-icon",src:ca("isSelectedSubtitle")?a.subtitleFill:a.subtitleOutline,className:"pl-cursor-pointer",width:20,height:20,onClick:b,onDoubleClick:l=>l.stopPropagation(),onMouseOver:()=>!ca("isTouchScreen")&&o(!0),onMouseLeave:()=>!ca("isTouchScreen")&&o(!1)}),e&&jsx(M,{title:"\u0632\u06CC\u0631\u0646\u0648\u06CC\u0633"})]})},Co=Lr;e();e();var Fr=e=>(ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual),jsxs("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("rect",{x:"3",y:"3",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"9",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"3",y:"15",width:"4",height:"4",rx:"1.5"}),jsx("rect",{x:"8",y:"16",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"10",width:"11",height:"2",rx:"1"}),jsx("rect",{x:"8",y:"4",width:"11",height:"2",rx:"1"})]})),Eo=Fr;var Or=()=>{useState(0);useState(void 0);let [i$1,s]=useState(!1),{markers:u,params:a}=ea(({videoData:{markers:h,params:k,videoElementSizeInfo:L}})=>({markers:h,params:k,videoElementSizeInfo:L}),shallowEqual),{markersListPopover:f}=ea(({popovers:{markersListPopover:h}})=>({markersListPopover:h}),shallowEqual),c=useRef(null),S=da();z(c,()=>S(E(!1)));let b=(h,k,L,m,T)=>{ha()&&(ha().style.width=`${Bt(h)}px`),i(fa().currentTime,h),fa().currentTime=h,S(E(!1)),la(Ba(k,h,L,m,T));},F=()=>{S(E(!f));};return jsxs("div",{className:`pl-flex pl-items-center pl-p-1 pl-relative ${ca("showMarkerListPopover")&&"pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,ref:c,children:[jsx(Eo,{className:"pl-cursor-pointer pl-fill-dark-5",onClick:F,onMouseOver:()=>!ca("isTouchScreen")&&s(!0),onMouseLeave:()=>!ca("isTouchScreen")&&s(!1)}),i$1&&jsx(M,{title:"\u0644\u06CC\u0633\u062A \u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627 (e)",className:"!pl-bottom-[180%] !pl-right-[-48px]"}),jsx(X,{classNames:"!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",status:ca("showMarkerListPopover"),onClose:()=>{S(E(!1));},headerTitle:"\u0646\u0634\u0627\u0646\u06AF\u0631\u0647\u0627",isHeader:!0,type:"popover",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-6 pl-mx-2 pl-mt-2",children:jsx("div",{className:"pl-flex pl-flex-col pl-gap-2 pl-pb-2",children:u.map(h=>jsx("div",{onClick:()=>b(h.time,h.id,h.title,h.description,h.sticker),className:"odd:dark:pl-bg-dark-1 odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px]",children:jsxs("div",{className:"pl-flex pl-item-center pl-gap-2 pl-cursor-pointer pl-rounded-[4px] pl-relative pl-p-2 pl-mx-2",children:[h.banner||!h.sticker?jsx(ge,{src:h.banner?h.banner:"IMAGES.defaultMarkersListItemIcon",width:40,height:40,alt:h.title}):jsx("div",{className:"pl-w-[40px] pl-h-[40px] pl-bg-secondary dark:pl-bg-secondary-50 pl-rounded-[6px] pl-flex pl-items-center",children:jsx(he,{name:h.sticker,className:"pl-w-[20px] pl-h-[20px] pl-mx-auto"})}),jsxs("div",{className:"pl-text-gray-800 dark:pl-text-white",children:[jsx("p",{className:"pl-flex pl-items-center pl-mb-1 pl-text-[14px] pl-font-bold pl-w-[130px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:jsx("div",{children:h.title})}),jsx("p",{className:"pl-text-[13px] pl-font-normal pl-w-[200px] pl-whitespace-nowrap pl-overflow-hidden pl-text-ellipsis",children:h.description})]}),jsx("span",{className:"pl-absolute pl-left-9 pl-top-2 pl-text-[12px] pl-font-bold pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-text-gray-800 dark:pl-text-white pl-rounded-[4px] pl-p-[3px]",children:P(h.time)})]})},h.id))})})})]})},No=Or;var zr=()=>{ea(({controller:{isFullScreen:o}})=>({isFullScreen:o}),shallowEqual),ea(({videoData:{videoElementSizeInfo:o,params:l}})=>({videoElementSizeInfo:o,params:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-mx-4 tablet:pl-mx-6":e="pl-mx-4":ca("isFullScreen")?e="pl-mx-8":e="pl-mx-4",jsxs("div",{id:"player-controllbar",className:`pl-flex pl-justify-between pl-items-center ${e}`,children:[jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[jsx(io,{}),ca("isTouchScreenLandscape")&&jsx(To,{}),ca("showPictureInPicture")&&jsx(po,{}),ca("showSettingIcon")&&jsx(yo,{}),ca("isFullScreen")&&!ca("isStaticFormat")&&jsx(Me,{showQualityLevelsIcon:!0}),(ca("isFullScreen")||ca("isStaticFormat"))&&jsx(Fe,{showSpeedIcon:!0}),ca("hasSubtitles")&&!ca("isTouchScreenPortrait")&&jsx(Co,{})]}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-5",children:[ca("isTouchScreenPortrait")&&jsx(_e,{}),!ca("isIOS")&&jsx(ao,{}),ca("hasMarkers")&&jsx(No,{})]})]})},Lo=memo(zr);e();var Vr=()=>{let{subtitleText:e}=ea(({videoData:{subtitleText:l,selectedSubtitle:r}})=>({subtitleText:l,selectedSubtitle:r}),shallowEqual);return ea(({controller:{isFullScreen:l}})=>({isFullScreen:l}),shallowEqual),jsx("div",{id:"subtitle-id",style:{direction:"ltr"},className:`pl-z-0 pl-absolute pl-w-full pl-text-center pl-text-[18px] pl-px-4 pl-text-white pl-font-medium ${(()=>{let l="";return ca("isLock")?l="pl-bottom-4":ca("isActiveElements")?ca("isTouchScreenPortrait")?l="pl-bottom-4 tablet:pl-bottom-[65px]":ca("isFullScreen")?l="pl-bottom-[104px] tablet:pl-bottom-[137px] desktop:pl-bottom-[146px]":l="pl-bottom-[120px]":ca("isActiveElements")||(l="pl-bottom-4"),l})()}`,children:$(e).map((l,r)=>jsx("p",{className:`pl-mx-auto pl-bg-Common-black-overlay-2 ${ca("isTouchScreen")&&ca("isActiveElements")&&"pl-opacity-50 tablet:pl-opacity-100"} pl-text-wrap pl-max-w-full pl-w-max pl-px-1`,children:ba(l)},r))})},Fo=Vr;var qr=()=>{ea(({controller:{lock:o,isFullScreen:l,isLoading:r,activeElements:i}})=>({lock:o,isFullScreen:l,isLoading:r,activeElements:i}),shallowEqual),ea(({videoData:{subtitles:o,selectedSubtitle:l}})=>({subtitles:o,selectedSubtitle:l}),shallowEqual);let e="";return ca("isTouchScreen")?ca("isFullScreen")?e="pl-gap-4 table:pl-gap-6 pl-mb-4 tablet:pl-mb-6 ":e="pl-gap-6 pl-mb-0":ca("isFullScreen")?e="pl-gap-6 pl-mb-8":e="pl-gap-4 pl-mb-3",jsx("div",{id:"footer",className:"pl-relative",style:{zIndex:3},onClick:o=>o.stopPropagation(),children:jsxs(Fragment,{children:[ca("showSubtitle")&&jsx(Fo,{}),!ca("isLock")&&jsx(Fragment,{children:jsxs("div",{className:`pl-flex pl-flex-col pl-w-full pl-mx-auto animate__animated animate__faster ${e} ${ca("isActiveElements")&&!ca("isLoading")?"animate__fadeIn pl-pointer-events-auto":"animate__fadeOut pl-pointer-events-none"}`,children:[!ca("isTouchScreenPortrait")&&jsx(_e,{}),ca("showProgressbar")&&jsx(lo,{}),jsx(Lo,{})]})})]})})},Oo=qr;e();var Rr=Bo(()=>import('./staticVideoTag-YGLH53GJ.mjs')),Xr=Bo(()=>import('./nonStaticVideoTag-RXV57YCY.mjs')),Hr=()=>jsx(Fragment,{children:ca("isStaticFormat")?jsx(Rr,{}):jsx(Xr,{})}),zo=Hr;e();var Qr=()=>{let e=da();ea(({videoData:{params:o}})=>({params:o}),shallowEqual),useEffect(()=>{let o=()=>{document.fullscreenElement?e(h$1(!0)):(e(h$1(!1)),j(),la(qa("exitFullScreen")));};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("fullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1));},[]);},Vo=Qr;e();var Yr=(e,o)=>{let l=da(),{activeElements:r}=ea(({controller:{activeElements:a}})=>({activeElements:a}),shallowEqual),i=useRef(null),s=useRef(e),u=useRef(o);useEffect(()=>{s.current=e;},[e]),useEffect(()=>{u.current=o;},[o]),useEffect(()=>{let a=!1,f$1=d=>{let{activeElements:b,isEnded:F}=M$1.getState().controller;F?l(f(!0)):d.pointerType==="mouse"&&(clearTimeout(i.current),b?["player-tag","main-content","player-controllbar","video-opacity","playerElements","touchBackward","touchForward"].includes(d.target.id)&&(a=!0):l(f(!0)),i.current=setTimeout(()=>{let{settingPopover:h,speedPopover:k,qualityLevelsPopover:L}=M$1.getState().popovers,{play:m}=M$1.getState().controller;!h&&!k&&!L&&m&&a&&l(f(!1));},a$5));},c=d=>{setTimeout(()=>{let{activeElements:b,isEnded:F,firstPlay:h}=M$1.getState().controller;if(clearTimeout(i.current),F)return l(f(!0));O()&&!h&&!s.current&&!u.current&&(["player-tag","main-content","video-opacity","touchBackward","touchForward"].includes(d.target.id)||R(d,"playerElements")?(l(f(!b)),i.current=setTimeout(()=>{let{settingPopover:k,speedPopover:L,qualityLevelsPopover:m}=M$1.getState().popovers;!k&&!L&&!m&&l(f(!1));},a$5)):i.current=setTimeout(()=>{let{settingPopover:k,speedPopover:L,qualityLevelsPopover:m}=M$1.getState().popovers;!k&&!L&&!m&&l(f(!1));},a$5));},200);},S=()=>{clearTimeout(i.current),i.current=setTimeout(()=>{let{activeElements:d,isEnded:b}=M$1.getState().controller,{settingPopover:F,speedPopover:h,qualityLevelsPopover:k}=M$1.getState().popovers;b?l(f(!0)):!F&&!h&&!k&&d&&!b&&l(f(!d));},a$5);};return document.getElementById("video-area").addEventListener("touchstart",c),document.getElementById("video-area").addEventListener("touchmove",S),document.getElementById("video-area").addEventListener("pointermove",f$1),()=>{let d=document.getElementById("video-area");d&&(d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",S),d.removeEventListener("pointermove",f$1));}},[r,e,o]);},qo=Yr;e();var jr=()=>{let{firstPlay:e,isFullScreen:o}=ea(({controller:{firstPlay:l,isFullScreen:r}})=>({firstPlay:l,isFullScreen:r}),shallowEqual);useEffect(()=>{if(fa()){let l,r=()=>{l=setTimeout(()=>{j();},O()?0:300);};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),clearTimeout(l);}}},[e,o,fa()]);},Ro=jr;e();var ti=()=>{let{firstPlay:e}=ea(({controller:{firstPlay:o}})=>({firstPlay:o}),shallowEqual);ea(({videoData:{details:o}})=>({details:o}),shallowEqual),useEffect(()=>{ca("setSubtitleFirstPlay")&&b();},[e]);},Ho=ti;var oi=Bo(()=>import('./touchVolumeBrightness-G45JEEWY.mjs')),Go=Bo(()=>import('./backwardForward-LB7I7YQE.mjs')),li=()=>{let[e,o]=useState(!1),[l,r]=useState(!1);return ea(({videoData:{details:i,params:s,videoElementSizeInfo:u}})=>({details:i,params:s,videoElementSizeInfo:u}),shallowEqual),ea(({controller:{firstPlay:i,isFullScreen:s,isLoading:u,canPlayVideo:a}})=>({firstPlay:i,isFullScreen:s,isLoading:u,canPlayVideo:a}),shallowEqual),Vo(),Ro(),qo(e,l),Ho(),jsx(Fragment,{children:jsxs("div",{id:"video-area",style:{zIndex:ca("isFullScreen")?1e6:"unset"},onClick:i=>{let s=document.getElementById("player-popover");(ca("isFirstPlay")||!ca("isTouchScreen")&&!s)&&a$1(i);},onDoubleClick:i=>k(i),className:`!pl-bg-contain !pl-bg-center !pl-bg-no-repeat pl-h-full pl-bg-black pl-max-h-screen pl-aspect-video pl-flex pl-items-center ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isFullScreen")&&"!pl-fixed !pl-w-screen dvh"} pl-w-full pl-relative ${!ca("isActiveElements")&&"pl-cursor-none"}`,children:[jsx("div",{id:"video-opacity",className:`pl-absolute pl-w-full pl-aspect-video pl-transition-all pl-duration-500 pl-bg-black ${!ca("isTouchScreen")&&!ca("isFullScreen")&&"!pl-rounded-[12px]"} ${ca("isActiveElements")?"pl-bg-opacity-50":"pl-bg-opacity-0"}`}),ca("showTouchVolumeBrightness")&&jsx(oi,{}),ca("showBackwardForward")&&jsxs("div",{className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full pl-overflow-hidden pl-flex pl-items-center",style:{zIndex:l||e?1000002:1},children:[jsx(Go,{type:"touchForward",isRightDoubleTouched:e,setIsRightDoubleTouched:o}),jsx(Go,{type:"touchBackward",isLeftDoubleTouched:l,setIsLeftDoubleTouched:r})]}),jsx(zo,{}),jsx("div",{id:"playerElements",className:"pl-absolute pl-top-0 pl-right-0 pl-w-full pl-h-full",children:jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-w-full pl-h-full",children:[ca("showHeader")&&jsx(It,{}),ca("showMain")&&jsx(_t,{}),ca("showFooter")&&jsx(Oo,{})]})})]})})},ud=li;
|
|
23
|
+
|
|
24
|
+
export { ud as a };
|
|
25
|
+
//# sourceMappingURL=out.js.map
|
|
26
|
+
//# sourceMappingURL=chunk-27ZHIMPA.mjs.map
|