cafe-video-player 3.0.12 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +2 -0
  2. package/VideoHighLighter-OBD2IGA6.js +2 -0
  3. package/VideoHighLighter-OBD2IGA6.js.map +1 -0
  4. package/VideoHighLighter-T2LVURER.mjs +2 -0
  5. package/VideoHighLighter-T2LVURER.mjs.map +1 -0
  6. package/backwardForward-S6ZHVC75.js +2 -0
  7. package/backwardForward-S6ZHVC75.js.map +1 -0
  8. package/backwardForward-ZUVULGGJ.mjs +2 -0
  9. package/backwardForward-ZUVULGGJ.mjs.map +1 -0
  10. package/chunk-2DV7FRU5.mjs +2 -0
  11. package/chunk-2DV7FRU5.mjs.map +1 -0
  12. package/chunk-4QMWBTB5.mjs +2 -0
  13. package/chunk-4QMWBTB5.mjs.map +1 -0
  14. package/chunk-4XKL6TLO.mjs +2 -0
  15. package/chunk-4XKL6TLO.mjs.map +1 -0
  16. package/chunk-73KLK4QU.mjs +2 -0
  17. package/chunk-73KLK4QU.mjs.map +1 -0
  18. package/chunk-AK5TFAW3.js +2 -0
  19. package/chunk-AK5TFAW3.js.map +1 -0
  20. package/chunk-AN6JAJSI.js +2 -0
  21. package/chunk-AN6JAJSI.js.map +1 -0
  22. package/chunk-BC4366GN.mjs +3 -0
  23. package/chunk-BC4366GN.mjs.map +1 -0
  24. package/chunk-BFE2RKVK.js +3 -0
  25. package/chunk-BFE2RKVK.js.map +1 -0
  26. package/chunk-BNVNO5NH.js +2 -0
  27. package/chunk-BNVNO5NH.js.map +1 -0
  28. package/chunk-CCO6GDG2.mjs +3 -0
  29. package/chunk-CCO6GDG2.mjs.map +1 -0
  30. package/chunk-COYFW7R4.js +3 -0
  31. package/chunk-COYFW7R4.js.map +1 -0
  32. package/chunk-DJ6KVZRK.js +2 -0
  33. package/chunk-DJ6KVZRK.js.map +1 -0
  34. package/chunk-FXAWDALE.mjs +2 -0
  35. package/chunk-FXAWDALE.mjs.map +1 -0
  36. package/chunk-GYUGYOVP.mjs +2 -0
  37. package/chunk-GYUGYOVP.mjs.map +1 -0
  38. package/chunk-IBV5SFIT.js +2 -0
  39. package/chunk-IBV5SFIT.js.map +1 -0
  40. package/chunk-OGCKLRYP.js +2 -0
  41. package/chunk-OGCKLRYP.js.map +1 -0
  42. package/chunk-PKXJEXKI.mjs +2 -0
  43. package/chunk-PKXJEXKI.mjs.map +1 -0
  44. package/chunk-QM3W7EYS.js +2 -0
  45. package/chunk-QM3W7EYS.js.map +1 -0
  46. package/chunk-SKRDEKL2.mjs +9 -0
  47. package/chunk-SKRDEKL2.mjs.map +1 -0
  48. package/chunk-U3VFRU6R.js +3 -0
  49. package/chunk-U3VFRU6R.js.map +1 -0
  50. package/chunk-WFHA2FPC.js +9 -0
  51. package/chunk-WFHA2FPC.js.map +1 -0
  52. package/chunk-WU4GN63P.mjs +2 -0
  53. package/chunk-WU4GN63P.mjs.map +1 -0
  54. package/chunk-XKRBXZUB.mjs +3 -0
  55. package/chunk-XKRBXZUB.mjs.map +1 -0
  56. package/chunk-Y7BIYTQP.mjs +2 -0
  57. package/chunk-Y7BIYTQP.mjs.map +1 -0
  58. package/chunk-ZSSCZTW3.js +2 -0
  59. package/chunk-ZSSCZTW3.js.map +1 -0
  60. package/chunk-ZWGZGWEB.js +2 -0
  61. package/chunk-ZWGZGWEB.js.map +1 -0
  62. package/index.js +1 -7307
  63. package/index.js.map +1 -1
  64. package/index.mjs +1 -7292
  65. package/index.mjs.map +1 -1
  66. package/nonStaticVideoTag-6OHMSJEH.js +2 -0
  67. package/nonStaticVideoTag-6OHMSJEH.js.map +1 -0
  68. package/nonStaticVideoTag-J6JNATM6.mjs +2 -0
  69. package/nonStaticVideoTag-J6JNATM6.mjs.map +1 -0
  70. package/notActive-DRH5BEL5.js +2 -0
  71. package/notActive-DRH5BEL5.js.map +1 -0
  72. package/notActive-DSDPVSW4.mjs +2 -0
  73. package/notActive-DSDPVSW4.mjs.map +1 -0
  74. package/package.json +52 -51
  75. package/staticPlayer-2IO6XEKM.mjs +2 -0
  76. package/staticPlayer-2IO6XEKM.mjs.map +1 -0
  77. package/staticPlayer-TNS4JFRP.js +2 -0
  78. package/staticPlayer-TNS4JFRP.js.map +1 -0
  79. package/staticVideoTag-2YYZBRPY.mjs +2 -0
  80. package/staticVideoTag-2YYZBRPY.mjs.map +1 -0
  81. package/staticVideoTag-VLNCYNKV.js +2 -0
  82. package/staticVideoTag-VLNCYNKV.js.map +1 -0
  83. package/videoArea-2F2NDD76.mjs +2 -0
  84. package/videoArea-2F2NDD76.mjs.map +1 -0
  85. package/videoArea-35ABV3CM.js +2 -0
  86. package/videoArea-35ABV3CM.js.map +1 -0
  87. package/videoPlayerStyles.css +0 -4
  88. package/vodPlayer-337TYSU4.js +2 -0
  89. package/vodPlayer-337TYSU4.js.map +1 -0
  90. package/vodPlayer-JTS4WVOB.mjs +2 -0
  91. package/vodPlayer-JTS4WVOB.mjs.map +1 -0
package/README.md CHANGED
@@ -168,6 +168,8 @@ export default function HomePage() {
168
168
  }
169
169
  ```
170
170
 
171
+ ⚠️ Disable React StrictMode, as it may cause duplicate executions of effects and unexpected behavior during development.
172
+
171
173
  For the modals to work correctly, you need to add the following tag to the end of the body tag in the \_document file.
172
174
 
173
175
  ```jsx
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkIBV5SFIT_js=require('./chunk-IBV5SFIT.js'),chunkOGCKLRYP_js=require('./chunk-OGCKLRYP.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),reactRedux=require('react-redux'),jsxRuntime=require('react/jsx-runtime'),reactCircularProgressbar=require('react-circular-progressbar'),r=require('next/image');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var h=()=>jsxRuntime.jsx("div",{role:"status",className:`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!chunkU3VFRU6R_js.t("isTouchScreen")&&"pl-rounded-lg"} pl-animate-pulse dark:pl-bg-gray-700`,children:jsxRuntime.jsx("span",{className:"pl-sr-only",children:"Loading..."})}),f=h;var y=()=>{let{params:e}=chunkAN6JAJSI_js.A(({videoData:{params:u}})=>({params:u}),reactRedux.shallowEqual);return chunkIBV5SFIT_js.a(),jsxRuntime.jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${chunkU3VFRU6R_js.t("isTouchScreen")&&"!pl-rounded-none"} ${chunkU3VFRU6R_js.t("isFullScreen")&&"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 !pl-w-screen !pl-h-screen !pl-rounded-none"}`,children:[e.vhl_status&&e.vhl_status!=="skeleton"&&jsxRuntime.jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full",children:[e.banner&&jsxRuntime.jsxs("div",{className:"pl-w-full pl-aspect-video pl-absolute",children:[jsxRuntime.jsx(r__default.default,{src:e.banner,alt:"banner",fill:true,style:{objectFit:"cover"},className:"pl-w-full pl-aspect-video"}),jsxRuntime.jsx("div",{className:"pl-absolute pl-inset-0 pl-bg-black/50"})]}),jsxRuntime.jsx("div",{}),e.vhl_status==="download_start"&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2",children:[jsxRuntime.jsx("svg",{style:{height:0,position:"absolute"},children:jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:"gradientColor",x1:"0",y1:"0",x2:"1",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"#FF649D"}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"#A50C4B"})]})})}),jsxRuntime.jsx(reactCircularProgressbar.CircularProgressbarWithChildren,{value:e.vhl_progress,className:"pl-size-[50px]",styles:reactCircularProgressbar.buildStyles({trailColor:"rgba(0, 0, 0, 0.1)",pathColor:"url(#gradientColor)"}),children:jsxRuntime.jsxs("p",{className:"pl-text-text-primary pl-text-[14px] pl-font-medium",children:["%",e.vhl_progress]})}),jsxRuntime.jsx("p",{className:"pl-text-text-primary pl-text-[10px] pl-font-normal",children:e.vhl_statusText})]})}),e.vhl_status==="download_error"&&jsxRuntime.jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2",children:[jsxRuntime.jsx(r__default.default,{alt:"info-circle-icon",src:chunkCOYFW7R4_js.a.infoCircle,width:32,height:32}),jsxRuntime.jsx("p",{className:"pl-text-[10px] pl-font-normal pl-text-text-primary",children:e.vhl_statusText}),jsxRuntime.jsxs("button",{className:"pl-flex pl-items-center pl-gap-2",onClick:()=>e.vhl_onRetry(),children:[jsxRuntime.jsx(r__default.default,{alt:"rotate-red-icon",src:chunkCOYFW7R4_js.a.rotateRed,width:14,height:14}),jsxRuntime.jsx("span",{className:"pl-text-primary pl-text-[10px] pl-font-normal",children:"\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647"})]})]}),jsxRuntime.jsxs("div",{className:`pl-flex ${chunkU3VFRU6R_js.t("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${chunkU3VFRU6R_js.t("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxRuntime.jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${chunkU3VFRU6R_js.t("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsxRuntime.jsx(chunkOGCKLRYP_js.c,{width:20,height:20}),jsxRuntime.jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14.58px]",children:[e.vhl_duration&&jsxRuntime.jsxs("div",{className:"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative",children:[jsxRuntime.jsx("span",{children:chunkU3VFRU6R_js.ia(0)}),jsxRuntime.jsx("span",{children:"/"}),jsxRuntime.jsx("span",{children:chunkU3VFRU6R_js.ia(e.vhl_duration)})]}),jsxRuntime.jsx(chunkOGCKLRYP_js.b,{width:20,height:20})]})]}),jsxRuntime.jsx("div",{className:"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse"})]})]}),e.vhl_status==="skeleton"&&jsxRuntime.jsx(f,{})]})},M=y;module.exports=M;//# sourceMappingURL=VideoHighLighter-OBD2IGA6.js.map
2
+ //# sourceMappingURL=VideoHighLighter-OBD2IGA6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/videoHighLighter/VideoHighLighter.tsx","../src/videoPlayerLibrary/components/custom-components/skeleton/Skeleton.tsx"],"names":["init_cjs_shims","Skeleton","jsx","conditions","Skeleton_default","VideoHighLighter","params","useAppSelector","shallowEqual","useFullScreen_default","jsxs","Image","Fragment","CircularProgressbarWithChildren","buildStyles","importImages_default","fullScreen_default","secondsToHMS","soundVolume_default","VideoHighLighter_default"],"mappings":"khBAAAA,kBAAAA,EAAAA,CCAAA,kBAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,cAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,kCAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,cAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CA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Oe,CAAAA,CAAQd","file":"VideoHighLighter-OBD2IGA6.js","sourcesContent":["import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport Skeleton from \"../../custom-components/skeleton/Skeleton\";\r\nimport FullScreen from \"../../custom-components/fullScreen/fullScreen\";\r\nimport SoundVolume from \"../../custom-components/soundVolume/soundVolume\";\r\nimport { secondsToHMS } from \"../../../helpers/helpers\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { buildStyles, CircularProgressbarWithChildren } from \"react-circular-progressbar\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/image\";\r\nimport useFullScreen from \"../../../helpers/hooks/useFullScreen\";\r\n\r\nconst VideoHighLighter = () => {\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useFullScreen();\r\n\r\n return (\r\n <div\r\n id=\"video-area\"\r\n className={`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${\r\n conditions(ConditionName.isTouchScreen) && \"!pl-rounded-none\"\r\n } ${conditions(ConditionName.isFullScreen) && \"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 !pl-w-screen !pl-h-screen !pl-rounded-none\"}`}\r\n >\r\n {params.vhl_status && params.vhl_status !== \"skeleton\" && (\r\n <div className=\"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full\">\r\n {params.banner && (\r\n <div className=\"pl-w-full pl-aspect-video pl-absolute\">\r\n <Image src={params.banner} alt=\"banner\" fill style={{ objectFit: \"cover\" }} className=\"pl-w-full pl-aspect-video\" />\r\n <div className=\"pl-absolute pl-inset-0 pl-bg-black/50\" />\r\n </div>\r\n )}\r\n <div />\r\n {params.vhl_status === \"download_start\" && (\r\n <>\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2\">\r\n <svg style={{ height: 0, position: \"absolute\" }}>\r\n <defs>\r\n <linearGradient id=\"gradientColor\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\r\n <stop offset=\"0%\" stopColor=\"#FF649D\" />\r\n <stop offset=\"100%\" stopColor=\"#A50C4B\" />\r\n </linearGradient>\r\n </defs>\r\n </svg>\r\n <CircularProgressbarWithChildren\r\n value={params.vhl_progress!}\r\n className=\"pl-size-[50px]\"\r\n styles={buildStyles({\r\n trailColor: \"rgba(0, 0, 0, 0.1)\",\r\n pathColor: \"url(#gradientColor)\",\r\n })}\r\n >\r\n <p className=\"pl-text-text-primary pl-text-[14px] pl-font-medium\">%{params.vhl_progress}</p>\r\n </CircularProgressbarWithChildren>\r\n <p className=\"pl-text-text-primary pl-text-[10px] pl-font-normal\">{params.vhl_statusText}</p>\r\n </div>\r\n </>\r\n )}\r\n {params.vhl_status === \"download_error\" && (\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2\">\r\n <Image alt=\"info-circle-icon\" src={IMAGES.infoCircle} width={32} height={32} />\r\n <p className=\"pl-text-[10px] pl-font-normal pl-text-text-primary\">{params.vhl_statusText}</p>\r\n <button className=\"pl-flex pl-items-center pl-gap-2\" onClick={() => params.vhl_onRetry!()}>\r\n <Image alt=\"rotate-red-icon\" src={IMAGES.rotateRed} width={14} height={14} />\r\n <span className=\"pl-text-primary pl-text-[10px] pl-font-normal\">تلاش دوباره</span>\r\n </button>\r\n </div>\r\n )}\r\n <div\r\n className={`pl-flex ${\r\n !conditions(ConditionName.isTouchScreenPortrait)\r\n ? `pl-flex-col-reverse pl-mb-3 ${conditions(ConditionName.isFullScreen) && \"pl-mb-8\"}`\r\n : \"pl-flex-col\"\r\n } pl-gap-[14.58px]`}\r\n >\r\n <div className={`pl-flex pl-items-center pl-justify-between ${conditions(ConditionName.isFullScreen) ? \"pl-mx-8\" : \"pl-mx-[14.58px]\"}`}>\r\n <FullScreen width={20} height={20} />\r\n <div className={`pl-flex pl-items-center pl-gap-[14.58px]`}>\r\n {params.vhl_duration && (\r\n <div className=\"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative\">\r\n <span>{secondsToHMS(0)}</span>\r\n <span>/</span>\r\n <span>{secondsToHMS(params.vhl_duration)}</span>\r\n </div>\r\n )}\r\n <SoundVolume width={20} height={20} />\r\n </div>\r\n </div>\r\n <div className=\"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse\" />\r\n </div>\r\n </div>\r\n )}\r\n {params.vhl_status === \"skeleton\" && <Skeleton />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default VideoHighLighter;\r\n","import { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\n"]}
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-GYUGYOVP.mjs';import {c,b}from'./chunk-WU4GN63P.mjs';import {a as a$1}from'./chunk-XKRBXZUB.mjs';import {ia,t}from'./chunk-BC4366GN.mjs';import {e,A}from'./chunk-4QMWBTB5.mjs';import {shallowEqual}from'react-redux';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {CircularProgressbarWithChildren,buildStyles}from'react-circular-progressbar';import r from'next/image';e();e();var g=()=>jsx("div",{role:"status",className:`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${!t("isTouchScreen")&&"pl-rounded-lg"} pl-animate-pulse dark:pl-bg-gray-700`,children:jsx("span",{className:"pl-sr-only",children:"Loading..."})}),f=g;var N=()=>{let{params:e}=A(({videoData:{params:u}})=>({params:u}),shallowEqual);return a(),jsxs("div",{id:"video-area",className:`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${t("isTouchScreen")&&"!pl-rounded-none"} ${t("isFullScreen")&&"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 !pl-w-screen !pl-h-screen !pl-rounded-none"}`,children:[e.vhl_status&&e.vhl_status!=="skeleton"&&jsxs("div",{className:"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full",children:[e.banner&&jsxs("div",{className:"pl-w-full pl-aspect-video pl-absolute",children:[jsx(r,{src:e.banner,alt:"banner",fill:true,style:{objectFit:"cover"},className:"pl-w-full pl-aspect-video"}),jsx("div",{className:"pl-absolute pl-inset-0 pl-bg-black/50"})]}),jsx("div",{}),e.vhl_status==="download_start"&&jsx(Fragment,{children:jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2",children:[jsx("svg",{style:{height:0,position:"absolute"},children:jsx("defs",{children:jsxs("linearGradient",{id:"gradientColor",x1:"0",y1:"0",x2:"1",y2:"1",children:[jsx("stop",{offset:"0%",stopColor:"#FF649D"}),jsx("stop",{offset:"100%",stopColor:"#A50C4B"})]})})}),jsx(CircularProgressbarWithChildren,{value:e.vhl_progress,className:"pl-size-[50px]",styles:buildStyles({trailColor:"rgba(0, 0, 0, 0.1)",pathColor:"url(#gradientColor)"}),children:jsxs("p",{className:"pl-text-text-primary pl-text-[14px] pl-font-medium",children:["%",e.vhl_progress]})}),jsx("p",{className:"pl-text-text-primary pl-text-[10px] pl-font-normal",children:e.vhl_statusText})]})}),e.vhl_status==="download_error"&&jsxs("div",{className:"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2",children:[jsx(r,{alt:"info-circle-icon",src:a$1.infoCircle,width:32,height:32}),jsx("p",{className:"pl-text-[10px] pl-font-normal pl-text-text-primary",children:e.vhl_statusText}),jsxs("button",{className:"pl-flex pl-items-center pl-gap-2",onClick:()=>e.vhl_onRetry(),children:[jsx(r,{alt:"rotate-red-icon",src:a$1.rotateRed,width:14,height:14}),jsx("span",{className:"pl-text-primary pl-text-[10px] pl-font-normal",children:"\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647"})]})]}),jsxs("div",{className:`pl-flex ${t("isTouchScreenPortrait")?"pl-flex-col":`pl-flex-col-reverse pl-mb-3 ${t("isFullScreen")&&"pl-mb-8"}`} pl-gap-[14.58px]`,children:[jsxs("div",{className:`pl-flex pl-items-center pl-justify-between ${t("isFullScreen")?"pl-mx-8":"pl-mx-[14.58px]"}`,children:[jsx(c,{width:20,height:20}),jsxs("div",{className:"pl-flex pl-items-center pl-gap-[14.58px]",children:[e.vhl_duration&&jsxs("div",{className:"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative",children:[jsx("span",{children:ia(0)}),jsx("span",{children:"/"}),jsx("span",{children:ia(e.vhl_duration)})]}),jsx(b,{width:20,height:20})]})]}),jsx("div",{className:"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse"})]})]}),e.vhl_status==="skeleton"&&jsx(f,{})]})},R=N;export{R as default};//# sourceMappingURL=VideoHighLighter-T2LVURER.mjs.map
2
+ //# sourceMappingURL=VideoHighLighter-T2LVURER.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/videoPlayer/videoHighLighter/VideoHighLighter.tsx","../src/videoPlayerLibrary/components/custom-components/skeleton/Skeleton.tsx"],"names":["init_esm_shims","Skeleton","jsx","conditions","Skeleton_default","VideoHighLighter","params","useAppSelector","shallowEqual","useFullScreen_default","jsxs","Image","Fragment","CircularProgressbarWithChildren","buildStyles","importImages_default","fullScreen_default","secondsToHMS","soundVolume_default","VideoHighLighter_default"],"mappings":"+YAAAA,CAAAA,EAAAA,CCAAA,CAAAA,EAAAA,CAGA,IAAMC,EAAW,IAEbC,GAAAA,CAAC,OACC,IAAA,CAAK,QAAA,CACL,UAAW,CAAA,sEAAA,EACT,CAACC,iBAAsC,CAAA,EAAK,eAC9C,wCAEA,QAAA,CAAAD,GAAAA,CAAC,QAAK,SAAA,CAAU,YAAA,CAAa,sBAAU,CAAA,CACzC,CAAA,CAIGE,EAAQH,CAAAA,CDHf,IAAMI,CAAAA,CAAmB,IAAM,CAC7B,GAAM,CAAE,MAAA,CAAAC,CAAO,EAAIC,CAAAA,CAAe,CAAC,CAAE,SAAA,CAAW,CAAE,OAAAD,CAAO,CAAE,KAAO,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAA,CAAIE,YAAY,EAC3F,OAAAC,CAAAA,GAGEC,IAAAA,CAAC,KAAA,CAAA,CACC,GAAG,YAAA,CACH,SAAA,CAAW,yFACTP,CAAAA,CAAAA,eAAsC,CAAA,EAAK,kBAC7C,CAAA,CAAA,EAAIA,CAAAA,CAAAA,cAAqC,GAAK,6FAA6F,CAAA,CAAA,CAE1I,UAAAG,CAAAA,CAAO,UAAA,EAAcA,CAAAA,CAAO,UAAA,GAAe,YAC1CI,IAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,8DAAA,CACZ,QAAA,CAAA,CAAAJ,EAAO,MAAA,EACNI,IAAAA,CAAC,OAAI,SAAA,CAAU,uCAAA,CACb,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NI,IAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,mEAAA,CACb,QAAA,CAAA,CAAAR,IAAC,MAAA,CAAA,CAAM,QAAA,CAAAe,GAAa,CAAC,CAAA,CAAE,EACvBf,GAAAA,CAAC,MAAA,CAAA,CAAK,aAAC,CAAA,CACPA,GAAAA,CAAC,QAAM,QAAA,CAAAe,EAAAA,CAAaX,EAAO,YAAY,CAAA,CAAE,GAC3C,CAAA,CAEFJ,GAAAA,CAACgB,EAAA,CAAY,KAAA,CAAO,GAAI,MAAA,CAAQ,EAAA,CAAI,GACtC,CAAA,CAAA,CACF,CAAA,CACAhB,IAAC,KAAA,CAAA,CAAI,SAAA,CAAU,gEAAgE,CAAA,CAAA,CACjF,CAAA,CAAA,CACF,EAEDI,CAAAA,CAAO,UAAA,GAAe,YAAcJ,GAAAA,CAACE,CAAAA,CAAA,EAAS,CAAA,CAAA,CACjD,CAEJ,EAEOe,CAAAA,CAAQd","file":"VideoHighLighter-T2LVURER.mjs","sourcesContent":["import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport Skeleton from \"../../custom-components/skeleton/Skeleton\";\r\nimport FullScreen from \"../../custom-components/fullScreen/fullScreen\";\r\nimport SoundVolume from \"../../custom-components/soundVolume/soundVolume\";\r\nimport { secondsToHMS } from \"../../../helpers/helpers\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { buildStyles, CircularProgressbarWithChildren } from \"react-circular-progressbar\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/image\";\r\nimport useFullScreen from \"../../../helpers/hooks/useFullScreen\";\r\n\r\nconst VideoHighLighter = () => {\r\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\r\n useFullScreen();\r\n\r\n return (\r\n <div\r\n id=\"video-area\"\r\n className={`pl-relative pl-rounded-[12px] pl-w-full pl-h-full pl-aspect-video !pl-overflow-hidden ${\r\n conditions(ConditionName.isTouchScreen) && \"!pl-rounded-none\"\r\n } ${conditions(ConditionName.isFullScreen) && \"!pl-overflow-hidden pl-fixed pl-top-0 pl-right-0 !pl-w-screen !pl-h-screen !pl-rounded-none\"}`}\r\n >\r\n {params.vhl_status && params.vhl_status !== \"skeleton\" && (\r\n <div className=\"pl-flex pl-flex-col pl-justify-between pl-gap-2 pl-size-full\">\r\n {params.banner && (\r\n <div className=\"pl-w-full pl-aspect-video pl-absolute\">\r\n <Image src={params.banner} alt=\"banner\" fill style={{ objectFit: \"cover\" }} className=\"pl-w-full pl-aspect-video\" />\r\n <div className=\"pl-absolute pl-inset-0 pl-bg-black/50\" />\r\n </div>\r\n )}\r\n <div />\r\n {params.vhl_status === \"download_start\" && (\r\n <>\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] tablet:!pl-max-w-[305px] desktop:!pl-max-w-[198px] pl-mx-auto pl-py-2 tablet:pl-py-[12.32px] desktop:pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2 tablet:pl-gap-[12.32px] desktop:pl-gap-2\">\r\n <svg style={{ height: 0, position: \"absolute\" }}>\r\n <defs>\r\n <linearGradient id=\"gradientColor\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\r\n <stop offset=\"0%\" stopColor=\"#FF649D\" />\r\n <stop offset=\"100%\" stopColor=\"#A50C4B\" />\r\n </linearGradient>\r\n </defs>\r\n </svg>\r\n <CircularProgressbarWithChildren\r\n value={params.vhl_progress!}\r\n className=\"pl-size-[50px]\"\r\n styles={buildStyles({\r\n trailColor: \"rgba(0, 0, 0, 0.1)\",\r\n pathColor: \"url(#gradientColor)\",\r\n })}\r\n >\r\n <p className=\"pl-text-text-primary pl-text-[14px] pl-font-medium\">%{params.vhl_progress}</p>\r\n </CircularProgressbarWithChildren>\r\n <p className=\"pl-text-text-primary pl-text-[10px] pl-font-normal\">{params.vhl_statusText}</p>\r\n </div>\r\n </>\r\n )}\r\n {params.vhl_status === \"download_error\" && (\r\n <div className=\"pl-relative pl-z-[1000000] pl-bg-Common-white-overlay-1 pl-w-full pl-max-w-[198px] pl-mx-auto pl-py-2 pl-rounded-[8px] pl-flex pl-flex-col pl-items-center pl-gap-2\">\r\n <Image alt=\"info-circle-icon\" src={IMAGES.infoCircle} width={32} height={32} />\r\n <p className=\"pl-text-[10px] pl-font-normal pl-text-text-primary\">{params.vhl_statusText}</p>\r\n <button className=\"pl-flex pl-items-center pl-gap-2\" onClick={() => params.vhl_onRetry!()}>\r\n <Image alt=\"rotate-red-icon\" src={IMAGES.rotateRed} width={14} height={14} />\r\n <span className=\"pl-text-primary pl-text-[10px] pl-font-normal\">تلاش دوباره</span>\r\n </button>\r\n </div>\r\n )}\r\n <div\r\n className={`pl-flex ${\r\n !conditions(ConditionName.isTouchScreenPortrait)\r\n ? `pl-flex-col-reverse pl-mb-3 ${conditions(ConditionName.isFullScreen) && \"pl-mb-8\"}`\r\n : \"pl-flex-col\"\r\n } pl-gap-[14.58px]`}\r\n >\r\n <div className={`pl-flex pl-items-center pl-justify-between ${conditions(ConditionName.isFullScreen) ? \"pl-mx-8\" : \"pl-mx-[14.58px]\"}`}>\r\n <FullScreen width={20} height={20} />\r\n <div className={`pl-flex pl-items-center pl-gap-[14.58px]`}>\r\n {params.vhl_duration && (\r\n <div className=\"pl-text-Common-white pl-text-[10.93px] pl-font-normal pl-relative\">\r\n <span>{secondsToHMS(0)}</span>\r\n <span>/</span>\r\n <span>{secondsToHMS(params.vhl_duration)}</span>\r\n </div>\r\n )}\r\n <SoundVolume width={20} height={20} />\r\n </div>\r\n </div>\r\n <div className=\"pl-w-full pl-h-[3.64px] pl-bg-gray-highLight pl-animate-pulse\" />\r\n </div>\r\n </div>\r\n )}\r\n {params.vhl_status === \"skeleton\" && <Skeleton />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default VideoHighLighter;\r\n","import { conditions } from \"../../../helpers/conditions/conditions\";\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\n\nconst Skeleton = () => {\n return (\n <div\n role=\"status\"\n className={`pl-size-full pl-flex pl-items-center pl-justify-center pl-bg-gray-300 ${\n !conditions(ConditionName.isTouchScreen) && \"pl-rounded-lg\"\n } pl-animate-pulse dark:pl-bg-gray-700`}\n >\n <span className=\"pl-sr-only\">Loading...</span>\n </div>\n );\n};\n\nexport default Skeleton;\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkBNVNO5NH_js=require('./chunk-BNVNO5NH.js'),chunkCOYFW7R4_js=require('./chunk-COYFW7R4.js'),chunkU3VFRU6R_js=require('./chunk-U3VFRU6R.js'),chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),react=require('react'),reactRedux=require('react-redux'),useDoubleTap=require('use-double-tap'),J=require('next/image'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);chunkAN6JAJSI_js.e();var w=1e3,x=10,v=chunkU3VFRU6R_js.t("isTouchScreen")?x:0,R=({type:e,isRightForward:g,isLeftBackward:P,setIsRightForward:c,setIsLeftBackward:i})=>{let[m,u]=react.useState(v),[A,n]=react.useState(false),a=react.useRef(m),o=react.useRef(null),f=chunkAN6JAJSI_js.z();chunkAN6JAJSI_js.A(({controller:{currentTime:r,duration:t}})=>({currentTime:r,duration:t}),reactRedux.shallowEqual);let {videoElementSizeInfo:N}=chunkAN6JAJSI_js.A(({videoData:{videoElementSizeInfo:r,params:t}})=>({videoElementSizeInfo:r,params:t}),reactRedux.shallowEqual),h=["touchBackward","backward"];react.useEffect(()=>{a.current=m;},[m]);let C;C=useDoubleTap.useDoubleTap(r=>{["touchBackward","touchForward"].includes(e)&&(r.stopPropagation(),e==="touchBackward"&&i?(i(true),f(chunkAN6JAJSI_js.k(false))):e==="touchForward"&&c&&(c(true),f(chunkAN6JAJSI_js.k(false))),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));},200),react.useEffect(()=>{A&&(n(false),g&&c?(c(false),chunkU3VFRU6R_js.x().duration-chunkU3VFRU6R_js.x().currentTime<=a.current?chunkU3VFRU6R_js.Z(e,chunkU3VFRU6R_js.x().duration):chunkU3VFRU6R_js.Z(e,a.current),u(v)):P&&i&&(i(false),chunkU3VFRU6R_js.x().currentTime<=a.current?chunkU3VFRU6R_js.Z(e,0):chunkU3VFRU6R_js.Z(e,a.current),u(v)));},[A,e]);let G=r=>{u(t=>t+x),chunkU3VFRU6R_js.t("isTouchScreenLandscape")&&chunkU3VFRU6R_js.ma(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(chunkBNVNO5NH_js.a("ArrowRight",r=>{chunkU3VFRU6R_js.t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u(t=>t+x),f(chunkAN6JAJSI_js.k(true)),c&&c(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),chunkBNVNO5NH_js.a("ArrowLeft",r=>{chunkU3VFRU6R_js.t("isPressKeyArrowLeft")&&e==="backward"&&(r.stopPropagation(),u(t=>t+x),f(chunkAN6JAJSI_js.k(true)),i&&i(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),e)return jsxRuntime.jsx("div",{id:e,className:`pl-relative pl-flex pl-flex-col pl-justify-center ${chunkU3VFRU6R_js.t("isTouchScreen")?"pl-px-[24px]":"pl-px-[48px]"} ${h.includes(e)?"pl-items-end":"pl-items-start"} pl-gap-2 pl-overflow-hidden`,style:{width:N.width,height:N.width},...C,children:(g||P)&&jsxRuntime.jsxs("div",{className:chunkU3VFRU6R_js.ea(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${h.includes(e)?"":"pl-flex-row-reverse"}`,{desktop:"pl-gap-2",desktopFullScreen:"pl-gap-1",touch:"pl-gap-1",touchFullScreen:"pl-gap-1.5"}),onTouchStart:chunkU3VFRU6R_js.t("isTouchScreen")?G:void 0,children:[jsxRuntime.jsxs("p",{className:chunkU3VFRU6R_js.ea("pl-text-center pl-text-white ",{desktop:"pl-text-[16px] pl-font-extrabold pl-mt-0.5",desktopFullScreen:"pl-text-[32px] pl-font-bold",touch:"pl-text-base pl-font-extrabold pl-mt-0.5",touchFullScreen:"pl-text-[20px] pl-font-bold"}),children:[m,h.includes(e)?" - ":" + "]}),jsxRuntime.jsx("div",{className:"pl-flex pl-justify-center pl-items-center",children:jsxRuntime.jsx(J__default.default,{src:chunkCOYFW7R4_js.a.chevronLeft,width:chunkU3VFRU6R_js.fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:chunkU3VFRU6R_js.fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),alt:"",className:` pl-object-cover ${h.includes(e)?"":"pl-rotate-180"}`})})]})})},le=R;module.exports=le;//# sourceMappingURL=backwardForward-S6ZHVC75.js.map
2
+ //# sourceMappingURL=backwardForward-S6ZHVC75.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_cjs_shims","hideTime","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"ieAAAA,kBAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,kBAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,CAAA,CAE/DG,CAAAA,CAAkB,CAAC,CAAE,IAAA,CAAAC,CA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CAAA,CAAI,SAAA,CAAW,2CAAA,CACd,QAAA,CAAAA,cAAAA,CAACG,kBAAAA,CAAA,CACC,GAAA,CAAKC,kBAAAA,CAAO,WAAA,CACZ,KAAA,CAAOC,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,mBAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-S6ZHVC75.js","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-FXAWDALE.mjs';import {a as a$1}from'./chunk-XKRBXZUB.mjs';import {t,x as x$1,Z,ea,fa,ma}from'./chunk-BC4366GN.mjs';import {e,z,A,k}from'./chunk-4QMWBTB5.mjs';import {useState,useRef,useEffect}from'react';import {shallowEqual}from'react-redux';import {useDoubleTap}from'use-double-tap';import J from'next/image';import {jsx,jsxs}from'react/jsx-runtime';e();var w=1e3,x=10,v=t("isTouchScreen")?x:0,R=({type:e,isRightForward:g,isLeftBackward:P,setIsRightForward:c,setIsLeftBackward:i})=>{let[m,u]=useState(v),[A$1,n]=useState(false),a$2=useRef(m),o=useRef(null),f=z();A(({controller:{currentTime:r,duration:t}})=>({currentTime:r,duration:t}),shallowEqual);let {videoElementSizeInfo:N}=A(({videoData:{videoElementSizeInfo:r,params:t}})=>({videoElementSizeInfo:r,params:t}),shallowEqual),h=["touchBackward","backward"];useEffect(()=>{a$2.current=m;},[m]);let C;C=useDoubleTap(r=>{["touchBackward","touchForward"].includes(e)&&(r.stopPropagation(),e==="touchBackward"&&i?(i(true),f(k(false))):e==="touchForward"&&c&&(c(true),f(k(false))),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));},200),useEffect(()=>{A$1&&(n(false),g&&c?(c(false),x$1().duration-x$1().currentTime<=a$2.current?Z(e,x$1().duration):Z(e,a$2.current),u(v)):P&&i&&(i(false),x$1().currentTime<=a$2.current?Z(e,0):Z(e,a$2.current),u(v)));},[A$1,e]);let G=r=>{u(t=>t+x),t("isTouchScreenLandscape")&&ma(r,e),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w);};if(a("ArrowRight",r=>{t("isPressKeyArrowRight")&&e==="forward"&&(r.stopPropagation(),u(t=>t+x),f(k(true)),c&&c(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),a("ArrowLeft",r=>{t("isPressKeyArrowLeft")&&e==="backward"&&(r.stopPropagation(),u(t=>t+x),f(k(true)),i&&i(true),clearTimeout(o.current),o.current=setTimeout(()=>n(true),w));}),e)return jsx("div",{id:e,className:`pl-relative pl-flex pl-flex-col pl-justify-center ${t("isTouchScreen")?"pl-px-[24px]":"pl-px-[48px]"} ${h.includes(e)?"pl-items-end":"pl-items-start"} pl-gap-2 pl-overflow-hidden`,style:{width:N.width,height:N.width},...C,children:(g||P)&&jsxs("div",{className:ea(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${h.includes(e)?"":"pl-flex-row-reverse"}`,{desktop:"pl-gap-2",desktopFullScreen:"pl-gap-1",touch:"pl-gap-1",touchFullScreen:"pl-gap-1.5"}),onTouchStart:t("isTouchScreen")?G:void 0,children:[jsxs("p",{className:ea("pl-text-center pl-text-white ",{desktop:"pl-text-[16px] pl-font-extrabold pl-mt-0.5",desktopFullScreen:"pl-text-[32px] pl-font-bold",touch:"pl-text-base pl-font-extrabold pl-mt-0.5",touchFullScreen:"pl-text-[20px] pl-font-bold"}),children:[m,h.includes(e)?" - ":" + "]}),jsx("div",{className:"pl-flex pl-justify-center pl-items-center",children:jsx(J,{src:a$1.chevronLeft,width:fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),height:fa({desktop:20,desktopFullScreen:40,touch:16,touchFullScreen:20}),alt:"",className:` pl-object-cover ${h.includes(e)?"":"pl-rotate-180"}`})})]})})},ce=R;export{ce as default};//# sourceMappingURL=backwardForward-ZUVULGGJ.mjs.map
2
+ //# sourceMappingURL=backwardForward-ZUVULGGJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.tsx"],"names":["init_esm_shims","hideTime","jump","initialJump","conditions","BackwardForward","type","isRightForward","isLeftBackward","setIsRightForward","setIsLeftBackward","backwardForwardCount","setBackwardForwardCount","useState","hide","setHide","backwardForwardCountRef","useRef","timeoutRef","dispatch","useAppDispatch","useAppSelector","currentTime","duration","shallowEqual","videoElementSizeInfo","params","isLeft","useEffect","doubleTouch","useDoubleTap","event","setActiveElements","mainPlayerVideoTag","handleBackwardForward","handleTouchStart","prev","handleRippleCircle","useKeyPress_default","jsx","jsxs","tw","Image","importImages_default","styleMerge","backwardForward_default"],"mappings":"uXAAAA,CAAAA,EAAAA,CAeA,IAAMC,CAAAA,CAAW,GAAA,CACXC,CAAAA,CAAO,EAAA,CACPC,CAAAA,CAAcC,CAAAA,CAAAA,eAAsC,CAAA,CAAIF,CAAAA,CAAO,CAAA,CAE/DG,CAAAA,CAAkB,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,cAAA,CAAAC,CAAAA,CAAgB,cAAA,CAAAC,CAAAA,CAAgB,iBAAA,CAAAC,CAAAA,CAAmB,iBAAA,CAAAC,CAAkB,CAAA,GAA6B,CACjI,GAAM,CAACC,CAAAA,CAAsBC,CAAuB,CAAA,CAAIC,QAAAA,CAAiBV,CAAW,CAAA,CAC9E,CAACW,GAAAA,CAAMC,CAAO,CAAA,CAAIF,QAAAA,CAAkB,KAAK,CAAA,CAEzCG,GAAAA,CAA0BC,MAAAA,CAAeN,CAAoB,CAAA,CAC7DO,CAAAA,CAAaD,MAAAA,CAAY,IAAI,CAAA,CAE7BE,CAAAA,CAAWC,CAAAA,EAAe,CAEhCC,CAAAA,CAAe,CAAC,CAAE,UAAA,CAAY,CAAE,WAAA,CAAAC,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAE,CAAA,IAAO,CAAE,WAAA,CAAAD,CAAAA,CAAa,QAAA,CAAAC,CAAS,CAAA,CAAA,CAAIC,YAAY,CAAA,CAEvG,IAAM,CAAE,oBAAA,CAAAC,CAAqB,CAAA,CAAIJ,CAAAA,CAC/B,CAAC,CAAE,SAAA,CA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AA,CAAO,UAAA,CACP,eAAA,CAAiB,YACnB,CAAC,CAAA,CACD,YAAA,CAAcF,CAAAA,CAAAA,eAAsC,CAAA,CAAI+B,CAAAA,CAAmB,MAAA,CAE3E,QAAA,CAAA,CAAAK,IAAAA,CAAC,GAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CAAG,gCAAA,CAAkC,CAC9C,OAAA,CAAS,4CAAA,CACT,iBAAA,CAAmB,6BAAA,CACnB,KAAA,CAAO,0CAAA,CACP,eAAA,CAAiB,6BACnB,CAAC,CAAA,CAEA,QAAA,CAAA,CAAA9B,CAAAA,CACAgB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,KAAA,CAAQ,KAAA,CAAA,CACnC,CAAA,CACAiC,GAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAW,2CAAA,CACd,QAAA,CAAAA,GAAAA,CAACG,CAAAA,CAAA,CACC,GAAA,CAAKC,GAAAA,CAAO,WAAA,CACZ,KAAA,CAAOC,EAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,EAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,iBAAA,CAAmB,EAAA,CAAI,KAAA,CAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,GAAA,CAAI,EAAA,CACJ,SAAA,CAAW,CAAA,iBAAA,EAAoBjB,CAAAA,CAAO,QAAA,CAASrB,CAAI,CAAA,CAAI,EAAA,CAAK,eAAe,CAAA,CAAA,CAC7E,CAAA,CAuBF,CAAA,CAAA,CACF,CAAA,CAEJ,CAEN,CAAA,CAEOuC,EAAAA,CAAQxC","file":"backwardForward-ZUVULGGJ.mjs","sourcesContent":["import { useEffect, useRef, useState } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nimport { useDoubleTap } from \"use-double-tap\";\r\nimport { useAppDispatch, useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { IBackwardForwardProps } from \"../../../helpers/interfaces/interfaces\";\r\nimport { setActiveElements } from \"../../../helpers/redux/slices/controllerSlice\";\r\nimport { handleBackwardForward } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { handleRippleCircle, styleMerge, tw } from \"../../../helpers/helpers\";\r\nimport { mainPlayerVideoTag } from \"../../../helpers/constants\";\r\nimport useKeyPress from \"../../../helpers/hooks/useKeyPress\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport Image from \"next/image\";\r\n\r\nconst hideTime = 1000;\r\nconst jump = 10;\r\nconst initialJump = conditions(ConditionName.isTouchScreen) ? jump : 0;\r\n\r\nconst BackwardForward = ({ type, isRightForward, isLeftBackward, setIsRightForward, setIsLeftBackward }: IBackwardForwardProps) => {\r\n const [backwardForwardCount, setBackwardForwardCount] = useState<number>(initialJump);\r\n const [hide, setHide] = useState<boolean>(false);\r\n\r\n const backwardForwardCountRef = useRef<number>(backwardForwardCount);\r\n const timeoutRef = useRef<any>(null);\r\n\r\n const dispatch = useAppDispatch();\r\n\r\n useAppSelector(({ controller: { currentTime, duration } }) => ({ currentTime, duration }), shallowEqual);\r\n\r\n const { videoElementSizeInfo } = useAppSelector(\r\n ({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }),\r\n shallowEqual\r\n );\r\n\r\n const isRight = [\"touchForward\", \"forward\"];\r\n const isLeft = [\"touchBackward\", \"backward\"];\r\n\r\n useEffect(() => {\r\n backwardForwardCountRef.current = backwardForwardCount;\r\n }, [backwardForwardCount]);\r\n\r\n let doubleTouch: any = undefined;\r\n\r\n doubleTouch = useDoubleTap((event) => {\r\n if ([\"touchBackward\", \"touchForward\"].includes(type)) {\r\n event.stopPropagation();\r\n if (type === \"touchBackward\" && setIsLeftBackward) {\r\n setIsLeftBackward(true);\r\n dispatch(setActiveElements(false));\r\n } else if (type === \"touchForward\" && setIsRightForward) {\r\n setIsRightForward(true);\r\n dispatch(setActiveElements(false));\r\n }\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n }, 200);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(() => {\r\n if (hide) {\r\n setHide(false);\r\n if (isRightForward && setIsRightForward) {\r\n setIsRightForward(false);\r\n if (mainPlayerVideoTag().duration - mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current)\r\n handleBackwardForward(type, mainPlayerVideoTag().duration);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n } else if (isLeftBackward && setIsLeftBackward) {\r\n setIsLeftBackward(false);\r\n if (mainPlayerVideoTag().currentTime <= backwardForwardCountRef.current) handleBackwardForward(type, 0);\r\n else handleBackwardForward(type, backwardForwardCountRef.current);\r\n setBackwardForwardCount(initialJump);\r\n }\r\n }\r\n }, [hide, type]);\r\n\r\n const handleTouchStart = (event: any) => {\r\n setBackwardForwardCount((prev) => prev + jump);\r\n if (conditions(ConditionName.isTouchScreenLandscape)) handleRippleCircle(event, type);\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n };\r\n\r\n useKeyPress(\"ArrowRight\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowRight) && type === \"forward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsRightForward) setIsRightForward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n useKeyPress(\"ArrowLeft\", (event: any) => {\r\n if (conditions(ConditionName.isPressKeyArrowLeft) && type === \"backward\") {\r\n event.stopPropagation();\r\n setBackwardForwardCount((prev) => prev + jump);\r\n dispatch(setActiveElements(true));\r\n if (setIsLeftBackward) setIsLeftBackward(true);\r\n\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(() => setHide(true), hideTime);\r\n }\r\n });\r\n\r\n if (type)\r\n return (\r\n <div\r\n id={type}\r\n className={`pl-relative pl-flex pl-flex-col pl-justify-center ${conditions(ConditionName.isTouchScreen) ? \"pl-px-[24px]\" : \"pl-px-[48px]\"} ${\r\n isLeft.includes(type) ? \"pl-items-end\" : \"pl-items-start\"\r\n } pl-gap-2 pl-overflow-hidden`}\r\n style={{ width: videoElementSizeInfo.width, height: videoElementSizeInfo.width }}\r\n {...doubleTouch}\r\n >\r\n {(isRightForward || isLeftBackward) && (\r\n <div\r\n className={tw(`pl-rounded-full pl-flex pl-justify-center pl-items-center ${isLeft.includes(type) ? \"\" : \"pl-flex-row-reverse\"}`, {\r\n desktop: \"pl-gap-2\",\r\n desktopFullScreen: \"pl-gap-1\",\r\n touch: \"pl-gap-1\",\r\n touchFullScreen: \"pl-gap-1.5\",\r\n })}\r\n onTouchStart={conditions(ConditionName.isTouchScreen) ? handleTouchStart : undefined}\r\n >\r\n <p\r\n className={tw(`pl-text-center pl-text-white `, {\r\n desktop: \"pl-text-[16px] pl-font-extrabold pl-mt-0.5\",\r\n desktopFullScreen: \"pl-text-[32px] pl-font-bold\",\r\n touch: \"pl-text-base pl-font-extrabold pl-mt-0.5\",\r\n touchFullScreen: \"pl-text-[20px] pl-font-bold\",\r\n })}\r\n >\r\n {backwardForwardCount}\r\n {isLeft.includes(type) ? \" - \" : \" + \"}\r\n </p>\r\n <div className={`pl-flex pl-justify-center pl-items-center`}>\r\n <Image\r\n src={IMAGES.chevronLeft}\r\n width={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n height={styleMerge({ desktop: 20, desktopFullScreen: 40, touch: 16, touchFullScreen: 20 })}\r\n alt=\"\"\r\n className={` pl-object-cover ${isLeft.includes(type) ? \"\" : \"pl-rotate-180\"}`}\r\n />\r\n\r\n {/* <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n />\r\n <Image\r\n alt=\"arrow-icon\"\r\n src={IMAGES.arrowLeft}\r\n className={`pl-shrink-0 ${isLeft.includes(type) && \"pl-rotate-180\"}`}\r\n width={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n height={conditions(ConditionName.isFullScreen) ? 22 : 12}\r\n /> */}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default BackwardForward;\r\n"]}
@@ -0,0 +1,2 @@
1
+ import {e}from'./chunk-4QMWBTB5.mjs';e();var n=1e3,r=3e3,i=6e4;export{n as a,r as b,i as c};//# sourceMappingURL=chunk-2DV7FRU5.mjs.map
2
+ //# sourceMappingURL=chunk-2DV7FRU5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/environment.ts"],"names":["init_esm_shims","activeElementsTime","showLoaderTime","continuousePlaybackIntervalTime"],"mappings":"qCAAAA,CAAAA,EAAAA,CAMO,IAAMC,CAAAA,CAAqB,GAAA,CAErBC,CAAAA,CAAiB,IAEjBC,CAAAA,CAAkC","file":"chunk-2DV7FRU5.mjs","sourcesContent":["import { IEnvironment } from \"./interfaces/interfaces\";\n\nexport const ENVIRONMENT: IEnvironment = {\n reduxDevTool: true\n};\n\nexport const activeElementsTime = 1000;\n\nexport const showLoaderTime = 3000;\n\nexport const continuousePlaybackIntervalTime = 60000;\n"]}
@@ -0,0 +1,2 @@
1
+ import'path';import'url';import {createSlice}from'@reduxjs/toolkit';import {useSelector,useDispatch}from'react-redux';var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),S=(t,e)=>{for(var l in e)i(t,l,{get:e[l],enumerable:true});},p=(t,e,l,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of y(e))!u.call(t,a)&&a!==l&&i(t,a,{get:()=>e[a],enumerable:!(n=d(e,a))||n.enumerable});return t};var C=t=>p(i({},"__esModule",{value:true}),t);var o=c(()=>{});o();var r={play:false,isAutoPlay:true,duration:0,currentTime:0,qualityLevels:[],manualQuality:void 0,autoQuality:void 0,activeElements:true,isLoading:true,isFullScreen:false,bufferedTimeWidth:0,firstPlay:true,activePointerProgressBar:false,delayTurnOffControlbar:false,canPlayVideo:false,lock:false,isEnded:false,tooltipTime:0,firstMute:false},s=createSlice({name:"controller",initialState:r,reducers:{setPlay:(t,e)=>{t.play=e.payload;},setIsAutoPlay:(t,e)=>{t.isAutoPlay=e.payload;},setDuration:(t,e)=>{t.duration=e.payload;},setCurrentTime:(t,e)=>{t.currentTime=e.payload;},setManualQuality:(t,e)=>{t.manualQuality=e.payload;},setAutoQuality:(t,e)=>{t.autoQuality=e.payload;},setQualityLevels:(t,e)=>{t.qualityLevels=e.payload;},setActiveElements:(t,e)=>{t.activeElements=e.payload;},setIsLoading:(t,e)=>{t.isLoading=e.payload;},setIsFullScreen:(t,e)=>{t.isFullScreen=e.payload;},setBufferedTimeWidth:(t,e)=>{t.bufferedTimeWidth=e.payload;},setFirstPlay:(t,e)=>{t.firstPlay=e.payload;},setActivePointerProgressBar:(t,e)=>{t.activePointerProgressBar=e.payload;},setDelayTurnOffControlbar:(t,e)=>{t.delayTurnOffControlbar=e.payload;},setCanPlayVideo:(t,e)=>{t.canPlayVideo=e.payload;},setLock:(t,e)=>{t.lock=e.payload;},setIsEnded:(t,e)=>{t.isEnded=e.payload;},setTooltipTime:(t,e)=>{t.tooltipTime=e.payload;},setFirstMute:(t,e)=>{t.firstMute=e.payload;},setClearControllerSlice:()=>r}}),{setPlay:E,setIsAutoPlay:x,setDuration:k,setCurrentTime:B,setQualityLevels:M,setAutoQuality:O,setActiveElements:V,setIsLoading:W,setIsFullScreen:_,setBufferedTimeWidth:R,setFirstPlay:U,setActivePointerProgressBar:q,setDelayTurnOffControlbar:H,setManualQuality:j,setCanPlayVideo:w,setLock:z,setIsEnded:G,setTooltipTime:J,setClearControllerSlice:K,setFirstMute:N}=s.actions,X=s.reducer;o();var te=()=>useDispatch(),ae=useSelector;export{ae as A,c as a,T as b,S as c,C as d,o as e,E as f,k as g,B as h,M as i,O as j,V as k,W as l,_ as m,R as n,U as o,q as p,H as q,j as r,w as s,z as t,G as u,J as v,K as w,N as x,X as y,te as z};//# sourceMappingURL=chunk-4QMWBTB5.mjs.map
2
+ //# sourceMappingURL=chunk-4QMWBTB5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/tsup/assets/esm_shims.js","../src/videoPlayerLibrary/helpers/redux/slices/controllerSlice.ts","../src/videoPlayerLibrary/helpers/redux/hooks.ts"],"names":["init_esm_shims","__esmMin","ControllerSliceState","controllerSlice","createSlice","state","action","setPlay","setIsAutoPlay","setDuration","setCurrentTime","setQualityLevels","setAutoQuality","setActiveElements","setIsLoading","setIsFullScreen","setBufferedTimeWidth","setFirstPlay","setActivePointerProgressBar","setDelayTurnOffControlbar","setManualQuality","setCanPlayVideo","setLock","setIsEnded","setTooltipTime","setClearControllerSlice","setFirstMute","controllerSlice_default","useAppDispatch","useDispatch","useAppSelector","useSelector"],"mappings":"sHACA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,M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,CAAAA,GAAkC,CACxDD,CAAAA,CAAM,WAAA,CAAcC,EAAO,QAC7B,CAAA,CACA,YAAA,CAAc,CAACD,EAAOC,CAAAA,GAAmC,CACvDD,CAAAA,CAAM,SAAA,CAAYC,EAAO,QAC3B,CAAA,CACA,uBAAA,CAAyB,IAChBJ,CAEX,CACF,CAAC,CAAA,CAEY,CACX,QAAAK,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,EACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAAC,CAAAA,CACA,iBAAA,CAAAC,EACA,YAAA,CAAAC,CAAAA,CACA,gBAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,EACA,2BAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,CAAAA,CACA,iBAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,EACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,wBAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CAAIvB,EAAgB,OAAA,CACbwB,CAAAA,CAAQxB,CAAAA,CAAgB,QClH/BH,IAGO,IAAM4B,GAAsB,IAAMC,WAAAA,GAC5BC,EAAAA,CAAkDC","file":"chunk-4QMWBTB5.mjs","sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\nimport { IControllerSlice } from \"../../interfaces/interfaces\";\n\nconst ControllerSliceState: IControllerSlice = {\n play: false,\n isAutoPlay: true,\n duration: 0,\n currentTime: 0,\n qualityLevels: [],\n manualQuality: undefined,\n autoQuality: undefined,\n activeElements: true,\n isLoading: true,\n isFullScreen: false,\n bufferedTimeWidth: 0,\n firstPlay: true,\n activePointerProgressBar: false,\n delayTurnOffControlbar: false,\n canPlayVideo: false,\n lock: false,\n isEnded: false,\n tooltipTime: 0,\n firstMute: false,\n};\n\nexport const controllerSlice = createSlice({\n name: \"controller\",\n initialState: ControllerSliceState,\n reducers: {\n setPlay: (state, action: PayloadAction<boolean>) => {\n state.play = action.payload;\n },\n setIsAutoPlay: (state, action: PayloadAction<boolean>) => {\n state.isAutoPlay = action.payload;\n },\n setDuration: (state, action: PayloadAction<number>) => {\n state.duration = action.payload;\n },\n setCurrentTime: (state, action: PayloadAction<number>) => {\n state.currentTime = action.payload;\n },\n setManualQuality: (state, action: PayloadAction<number | undefined>) => {\n state.manualQuality = action.payload;\n },\n setAutoQuality: (state, action: PayloadAction<number | undefined>) => {\n state.autoQuality = action.payload;\n },\n setQualityLevels: (state, action: PayloadAction<any[]>) => {\n state.qualityLevels = action.payload;\n },\n setActiveElements: (state, action: PayloadAction<boolean>) => {\n state.activeElements = action.payload;\n },\n setIsLoading: (state, action: PayloadAction<boolean>) => {\n state.isLoading = action.payload;\n },\n setIsFullScreen: (state, action: PayloadAction<boolean>) => {\n state.isFullScreen = action.payload;\n },\n setBufferedTimeWidth: (state, action: PayloadAction<number>) => {\n state.bufferedTimeWidth = action.payload;\n },\n setFirstPlay: (state, action: PayloadAction<boolean>) => {\n state.firstPlay = action.payload;\n },\n setActivePointerProgressBar: (state, action: PayloadAction<boolean>) => {\n state.activePointerProgressBar = action.payload;\n },\n setDelayTurnOffControlbar: (state, action: PayloadAction<boolean>) => {\n state.delayTurnOffControlbar = action.payload;\n },\n setCanPlayVideo: (state, action: PayloadAction<boolean>) => {\n state.canPlayVideo = action.payload;\n },\n setLock: (state, action: PayloadAction<boolean>) => {\n state.lock = action.payload;\n },\n setIsEnded: (state, action: PayloadAction<boolean>) => {\n state.isEnded = action.payload;\n },\n setTooltipTime: (state, action: PayloadAction<number>) => {\n state.tooltipTime = action.payload;\n },\n setFirstMute: (state, action: PayloadAction<boolean>) => {\n state.firstMute = action.payload;\n },\n setClearControllerSlice: () => {\n return ControllerSliceState;\n },\n },\n});\n\nexport const {\n setPlay,\n setIsAutoPlay,\n setDuration,\n setCurrentTime,\n setQualityLevels,\n setAutoQuality,\n setActiveElements,\n setIsLoading,\n setIsFullScreen,\n setBufferedTimeWidth,\n setFirstPlay,\n setActivePointerProgressBar,\n setDelayTurnOffControlbar,\n setManualQuality,\n setCanPlayVideo,\n setLock,\n setIsEnded,\n setTooltipTime,\n setClearControllerSlice,\n setFirstMute,\n} = controllerSlice.actions;\nexport default controllerSlice.reducer;\n","import { AppDispatch, RootState } from \"./store\";\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \"react-redux\";\n\nexport const useAppDispatch: any = () => useDispatch<AppDispatch>();\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\n"]}
@@ -0,0 +1,2 @@
1
+ import {b as b$1}from'./chunk-CCO6GDG2.mjs';import {t,x,sa,ta,i}from'./chunk-BC4366GN.mjs';import {e,z as z$1,A,h}from'./chunk-4QMWBTB5.mjs';import {useEffect}from'react';import {shallowEqual}from'react-redux';e();var b=()=>{let a=z$1(),{params:r}=A(({videoData:{params:o}})=>({params:o}),shallowEqual);useEffect(()=>{t("hasCurrentTimeParams")&&(x().currentTime=r.currentTime,a(h(r.currentTime)));},[r.currentTime]);},z=b;e();var q=()=>{let{rawSubtitles:a}=A(({videoData:{rawSubtitles:r}})=>({rawSubtitles:r}),shallowEqual);useEffect(()=>{let r=x().getElementsByTagName("track");for(let o=0;o<r.length;o++)r[o].addEventListener("cuechange",u=>{let c=u.target.track,l;c.activeCues&&(l=c.activeCues[0]),l&&(setTimeout(()=>{let n=document.getElementById("subtitle-id");n&&(n.style.display="block");},300),l.onexit=()=>{let n=document.getElementById("subtitle-id");n&&(n.style.display="none");});});},[a]);},U=q;e();var I=()=>{let a=z$1(),{rawSubtitles:r}=A(({videoData:{rawSubtitles:o}})=>({rawSubtitles:o}),shallowEqual);useEffect(()=>{let o=x();if(!o)return;let u=sa(r||[]),c=Array.from(o.querySelectorAll("track")),l=new Map(c.map(t=>[t.srclang,t]));c.forEach(t=>{!u.some(e=>e.lang===t.srclang)&&t.isConnected&&t.remove();}),u.forEach(t=>{let p=l.get(t.lang);if(!p){let e=document.createElement("track");e.kind="subtitles",e.src=t.url,e.srclang=t.lang,e.label=t.title||ta(t.lang),e.default=!!t.is_default,o.appendChild(e);return}if(p.src!==t.url){let e=document.createElement("track");e.kind="subtitles",e.src=t.url,e.srclang=t.lang,e.label=t.title||ta(t.lang),e.default=!!t.is_default,p.replaceWith(e);}});let n=setTimeout(()=>{let t=Array.from(o.textTracks);a(i(t));},200);return ()=>clearTimeout(n)},[r,a]);},at=I;e();var N=()=>{let{activeSubtitle:a}=A(({videoData:r})=>({activeSubtitle:r.params?.activeSubtitle}),shallowEqual);useEffect(()=>{t("hasActiveSubtitleInParams")&&setTimeout(()=>b$1(a),500);},[a]);},ft=N;export{z as a,U as b,at as c,ft as d};//# sourceMappingURL=chunk-4XKL6TLO.mjs.map
2
+ //# sourceMappingURL=chunk-4XKL6TLO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.tsx","../src/videoPlayerLibrary/helpers/hooks/useHideSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useAppendSubtitle.tsx","../src/videoPlayerLibrary/helpers/hooks/useActiveSubtitleAutomatic.tsx"],"names":["init_esm_shims","useJumpToCurrentTime","dispatch","useAppDispatch","params","useAppSelector","shallowEqual","useEffect","conditions","mainPlayerVideoTag","setCurrentTime","useJumpToCurrentTime_default","useHideSubtitle","rawSubtitles","tracks","i","event","track","activeCue","el","useHideSubtitle_default","useAppendSubtitle","videoEl","newSubtitles","sortLanguages","existingTracks","existingMap","s","subtitle","existing","trackEl","getSubtitleLabel","newTrack","timeoutId","setSubtitles","useAppendSubtitle_default","useActiveSubtitleAutomat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A,CAC5CpB,CAAAA,CAASgC,CAAAA,CAAapB,CAAM,CAAC,EAC/B,CAAA,CAAG,GAAG,CAAA,CAEN,OAAO,IAAM,YAAA,CAAamB,CAAS,CACrC,CAAA,CAAG,CAACpB,CAAAA,CAAcX,CAAQ,CAAC,EAC7B,CAAA,CAEOiC,EAAAA,CAAQd,EC3DfrB,CAAAA,EAAAA,KAOMoC,CAAAA,CAA6B,IAAM,CACvC,GAAM,CAAE,cAAA,CAAAC,CAAe,CAAA,CAAIhC,CAAAA,CACzB,CAAC,CAAE,SAAA,CAAAiC,CAAU,KAAO,CAClB,cAAA,CAAgBA,CAAAA,CAAU,MAAA,EAAQ,cACpC,CAAA,CAAA,CACAhC,YACF,CAAA,CAEAC,SAAAA,CAAU,IAAM,CACVC,CAAAA,CAAAA,2BAAkD,CAAA,EACpD,WAAW,IAAM+B,GAAAA,CAAeF,CAAc,CAAA,CAAG,GAAG,EACxD,CAAA,CAAG,CAACA,CAAc,CAAC,EACrB,CAAA,CAEOG,EAAAA,CAAQJ","file":"chunk-4XKL6TLO.mjs","sourcesContent":["import { useEffect } from \"react\";\nimport { conditions } from \"../conditions/conditions\";\nimport { ConditionName } from \"../interfaces/enums\";\nimport { mainPlayerVideoTag } from \"../constants\";\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\nimport { setCurrentTime } from \"../redux/slices/controllerSlice\";\nimport { shallowEqual } from \"react-redux\";\n\nconst useJumpToCurrentTime = () => {\n const dispatch = useAppDispatch();\n const { params } = useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (conditions(ConditionName.hasCurrentTimeParams)) {\n mainPlayerVideoTag().currentTime = params.currentTime!;\n dispatch(setCurrentTime(params.currentTime!));\n }\n }, [params.currentTime]);\n}\n\nexport default useJumpToCurrentTime;","import { useEffect } from \"react\";\nimport { useAppSelector } from \"../redux/hooks\";\nimport { shallowEqual } from \"react-redux\";\nimport { mainPlayerVideoTag } from \"../constants\";\n\nconst useHideSubtitle = () => {\n const { rawSubtitles } = useAppSelector(\n ({ videoData: { rawSubtitles } }) => ({ rawSubtitles }),\n shallowEqual\n );\n\n useEffect(() => {\n const tracks = mainPlayerVideoTag().getElementsByTagName(\"track\");\n for (let i = 0; i < tracks.length; i++) {\n tracks[i].addEventListener(\"cuechange\", (event) => {\n const track = (event.target! as any).track;\n let activeCue: any;\n if (track.activeCues) activeCue = track.activeCues[0];\n if (activeCue) {\n setTimeout(() => {\n const el = document.getElementById(\"subtitle-id\");\n if (el) el.style.display = \"block\";\n }, 300);\n\n activeCue.onexit = () => {\n const el = document.getElementById(\"subtitle-id\");\n if (el) el.style.display = \"none\";\n };\n }\n });\n }\n }, [rawSubtitles]);\n};\n\nexport default useHideSubtitle;\n","import { useEffect } from \"react\";\nimport { mainPlayerVideoTag } from \"../constants\";\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\nimport { shallowEqual } from \"react-redux\";\nimport { getSubtitleLabel, sortLanguages } from \"../helpers\";\nimport { setSubtitles } from \"../redux/slices/videoDataSlice\";\n\nconst useAppendSubtitle = () => {\n const dispatch = useAppDispatch();\n const { rawSubtitles } = useAppSelector(({ videoData: { rawSubtitles } }) => ({ rawSubtitles }), shallowEqual);\n\n useEffect(() => {\n const videoEl = mainPlayerVideoTag();\n if (!videoEl) return;\n\n const newSubtitles = sortLanguages(rawSubtitles || []);\n const existingTracks = Array.from(videoEl.querySelectorAll(\"track\"));\n const existingMap = new Map(existingTracks.map((t) => [t.srclang, t]));\n existingTracks.forEach((track) => {\n const stillExists = newSubtitles.some((s: any) => s.lang === track.srclang);\n if (!stillExists && track.isConnected) track.remove();\n });\n\n newSubtitles.forEach((subtitle: any) => {\n const existing = existingMap.get(subtitle.lang);\n\n if (!existing) {\n const trackEl = document.createElement(\"track\");\n trackEl.kind = \"subtitles\";\n trackEl.src = subtitle.url;\n trackEl.srclang = subtitle.lang;\n trackEl.label = subtitle.title || (getSubtitleLabel(subtitle.lang) as any);\n trackEl.default = !!subtitle.is_default;\n videoEl.appendChild(trackEl);\n return;\n }\n\n if (existing.src !== subtitle.url) {\n const newTrack = document.createElement(\"track\");\n newTrack.kind = \"subtitles\";\n newTrack.src = subtitle.url;\n newTrack.srclang = subtitle.lang;\n\n newTrack.label = subtitle.title || (getSubtitleLabel(subtitle.lang) as any);\n newTrack.default = !!subtitle.is_default;\n\n existing.replaceWith(newTrack);\n }\n });\n\n const timeoutId = setTimeout(() => {\n const tracks = Array.from(videoEl.textTracks);\n dispatch(setSubtitles(tracks));\n }, 200);\n\n return () => clearTimeout(timeoutId);\n }, [rawSubtitles, dispatch]);\n};\n\nexport default useAppendSubtitle;\n","import { useEffect } from \"react\";\nimport { useAppSelector } from \"../redux/hooks\";\nimport { shallowEqual } from \"react-redux\";\nimport { handleSubtitle } from \"../redux/actions/videoData.actions\";\nimport { conditions } from \"../conditions/conditions\";\nimport { ConditionName } from \"../interfaces/enums\";\n\nconst useActiveSubtitleAutomatic = () => {\n const { activeSubtitle } = useAppSelector(\n ({ videoData }) => ({\n activeSubtitle: videoData.params?.activeSubtitle,\n }),\n shallowEqual\n );\n\n useEffect(() => {\n if (conditions(ConditionName.hasActiveSubtitleInParams))\n setTimeout(() => handleSubtitle(activeSubtitle), 500);\n }, [activeSubtitle]);\n};\n\nexport default useActiveSubtitleAutomatic;\n"]}
@@ -0,0 +1,2 @@
1
+ import {b}from'./chunk-CCO6GDG2.mjs';import {x,y,P,ga,la,Aa,ra,t,l,$,f as f$1,w,K,j,L,M,ba,ya,s as s$1}from'./chunk-BC4366GN.mjs';import {e,i,n,l as l$1,f,h,o,s,g,u,k,j as j$1,r,m}from'./chunk-4QMWBTB5.mjs';e();var ge=e=>{e.preventDefault();let t=(x()||y()).error;if(t)switch(t.code){case t.MEDIA_ERR_ABORTED:P({type:"videoTagError",message:"You aborted the video playback."});break;case t.MEDIA_ERR_NETWORK:P({type:"videoTagError",message:"A network error caused the video download to fail part-way."});break;case t.MEDIA_ERR_DECODE:P({type:"videoTagError",message:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support."});break;case t.MEDIA_ERR_SRC_NOT_SUPPORTED:P({type:"videoTagError",message:"The video could not be loaded, either because the server or network failed or because the format is not supported."});break;default:P({type:"videoTagError",message:"An unknown error occurred."});break}else P({type:"videoTagError",message:"An error occurred, but the error object is not available."});},G=()=>{let e=Aa.dispatch,{params:t}=Aa.getState().videoData,a=n=>{n.requestFullScreen?n.requestFullScreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen&&n.webkitRequestFullScreen();};e(s$1()),a(document.documentElement),e(m(t.fullscreen==="true"));},Te=()=>{let e=".ts",t=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){arguments[1].endsWith(e)&&(arguments[1]=arguments[1]+"?uuid="+ga()),t.apply(this,arguments);};},Z=(e,t)=>{let a=Aa.dispatch;t.current=setInterval(()=>{if(e.buffered.length>0&&e.duration>0){let o=e.buffered.end(e.buffered.length-1)/e.duration*100;a(n(o));}else a(n(0));},500);},xe=()=>{let e=la("mainPlayer");return {xhrSetup:(t,a)=>{a?.split("m3u8")[1]||(a=`${a}${e}`),t.open("GET",a,true);},startLevel:-1,debug:false,enableWorker:true,abrBandWidthUpFactor:.7,abrBandWidthFactor:.95,backBufferLength:1/0,maxBufferLength:30,maxMaxBufferLength:60,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4},errorRetry:{maxNumRetry:10,retryDelayMs:5e3,maxRetryDelayMs:1e4}}}}},Se=()=>{let e=la("miniPlayer");return {xhrSetup:(t,a)=>{a=`${a}${e}`,t.open("GET",a,true);},startLevel:1,debug:false,maxMaxBufferLength:60,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1e3,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1e3,retryDelayMs:1e3,maxRetryDelayMs:1e3}}}}},De=(e,t$1)=>{let a=Aa.dispatch,n=[],o=[];if(e.levels.map(i=>{n.push(i.attrs.RESOLUTION?.split("x")[1].trim()),o.push(i.attrs.RESOLUTION);}),e.autoLevelCapping=ra(o,window.innerWidth,window.innerHeight),a(i(n)),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(i=>document.addEventListener(i,()=>{t("isAutoQuality")&&(e.autoLevelCapping=ra(o,window.innerWidth,window.innerHeight),e.nextLevel=-1);},false)),t$1.audioTracks.length>0){let i=t$1.audioTracks.sort(l=>l.default===true?-1:1);a(l(i));}},X=(e,t$1,a)=>{if(t$1.frag.type!=="audio"){let n=Aa.dispatch,{settings:o}=Aa.getState().user,{qualityLevels:i,manualQuality:l,autoQuality:h}=Aa.getState().controller;t("isAutoQuality")?t("isAutoQuality")&&h===void 0?(e.nextLevel=-1,a(i[t$1.frag.level]),n(j$1(t$1.frag.level))):t("isAutoQuality")&&(a(i[t$1.frag.level]),h!==t$1.frag.level&&n(j$1(t$1.frag.level))):(t$1.frag.level!==l&&(e.nextLevel=i[o.quality]?o.quality:-1),i[o.quality]?(n(r(o.quality)),n(j$1(void 0))):(a(i[t$1.frag.level]),n(j$1(t$1.frag.level)),n(ya({...o,quality:-1}))));}},ve=(e,t)=>{let a=Aa.dispatch,o=e.mainForwardBufferInfo?.end/t.duration*100;a(n(o));},Pe=(e,t,a)=>{let{params:n,multiAudio:o,selectedAudioId:i}=Aa.getState().videoData;o&&i!==void 0&&i!==e.audioTrack&&(e.audioTrack=i),n.type&&X(e,t,a);},Le=(e,t,a)=>{let{type:n}=Aa.getState().videoData.params;n&&X(e,t,a);},Me=e=>{if(e.event!=="hlsAudioTrackLoading")return {type:"HLS_"+e.type,message:e.error.message}},be=(e,t)=>{let a=Aa.dispatch;e.preventDefault(),t.current=Date.now(),a(l$1(true));},Ee=(e,t$1)=>{if(t("isIOS")&&t("isFirstPlay"))return;let a=Aa.dispatch;e.preventDefault(),t$1.current=0,a(l$1(true));},Re=(e,t$1,a)=>{let n=Aa.dispatch,{videoSettings:o}=Aa.getState().user,{params:i}=Aa.getState().videoData,{currentTime:l}=Aa.getState().controller;e.preventDefault(),t$1.current=Date.now(),n(f(true)),t("hasOnPlayParams")&&i.onPlay(l),t("isFirstPlay")&&(t("hasCurrentTimeParams")||(a.currentTime=o.time,n(h(o.time))),t("hasFullScreenParams")&&G(),t("isFullScreen")&&$(),n(f$1([Math.floor(a.currentTime)])),t("hasRawSubtitles")&&b()),w(K(true)),n(j(""));},Ve=(e,t,a,n,o$1,i,l,h,j)=>{let K=Aa.dispatch,{autoQuality:w$1,canPlayVideo:Y,firstPlay:J,qualityLevels:C}=Aa.getState().controller,{settings:k}=Aa.getState().user,A=k.quality===-1&&w$1?C[w$1]:C[k.quality],g=0;l.current&&(g=Date.now()-l.current),J&&j.played&&w(L(t.current,Date.now()-a.current,n.current-a.current,Date.now()-o$1.current,o$1)),K(o(false)),Y&&g>0&&A!==void 0&&(i.current=g,l.current=0,w(M(g,A,o$1,e,h.current)),e.current=e.current+1,o$1.current=Date.now());},Fe=e=>{let t$1=Aa.dispatch,{params:a}=Aa.getState().videoData;e.preventDefault(),w(K(false)),t$1(f(false)),t("hasOnPauseParams")&&a.onPause();},we=e=>{let t$1=Aa.dispatch,{onChangeCurrentTime:a}=Aa.getState().videoData.params,{selectedSubtitle:n}=Aa.getState().videoData;e.preventDefault(),t$1(h(e.target.currentTime)),t("hasOnChangeCurrentTime")&&a(e.target.currentTime),t("hasActiveCue")&&t$1(j(n.activeCues[0].text));},Ce=e=>{let t=Aa.dispatch,{settings:a}=Aa.getState().user;t(l$1(false)),t(s(true)),e.volume=a.volume/100,t(g(e.duration));},ke=(e,t$1)=>{let a=Aa.dispatch,{params:n}=Aa.getState().videoData;e.preventDefault(),a(u(true)),a(k(true)),ba(t$1.duration),t("hasOnFinishedParams")&&n.onFinished();},Ae=(e,t)=>{e.preventDefault(),t.current=Date.now();},Oe=()=>{let e=Aa.dispatch;e(l$1(false)),e(o(false));},Ie=e=>{let{onChangeCurrentTime:t$1}=Aa.getState().videoData.params,a=Aa.dispatch;e.preventDefault(),t("hasOnChangeCurrentTime")&&t$1(e.target.currentTime),a(h(e.target.currentTime));},qe=()=>{let e=Aa.dispatch,{params:t$1}=Aa.getState().videoData;e(u(true)),e(k(true)),t("hasOnFinishedParams")&&t$1.onFinished();},He=e=>{let t=Aa.dispatch;e.preventDefault(),t(f(false));},Be=(e,t$1)=>{let a=Aa.dispatch,{params:n}=Aa.getState().videoData,{currentTime:o}=Aa.getState().controller;e.preventDefault(),a(f(true)),t$1.current=Date.now(),a(j("")),t("hasOnPlayParams")&&n.onPlay(o),t("isFirstPlay")&&(t("hasRawSubtitles")&&b(),t("hasFullScreenParams")&&(G(),t("isFullScreen")&&$()));},Ne=(e,t,a,n)=>{let o$1=Aa.dispatch,{firstPlay:i}=Aa.getState().controller;o$1(l$1(false)),i&&n.played&&w(L(Math.round(e.current),Date.now()-t.current,0,Date.now()-a.current,a)),o$1(o(false));},_e=e=>{let{onChangeCurrentTime:t$1}=Aa.getState().videoData.params,a=Aa.dispatch,{selectedSubtitle:n}=Aa.getState().videoData;e.preventDefault(),a(h(e.target.currentTime)),a(g(e.target.duration)),t("hasOnChangeCurrentTime")&&t$1(e.target.currentTime),t("hasActiveCue")&&a(j(n.activeCues[0].text));},Qe=()=>{let e=Aa.dispatch;e(l$1(false)),e(s(true));},Ue=(e,t)=>Z(t,e),We=e=>{let t$1=Aa.dispatch,{params:a}=Aa.getState().videoData;t$1(u(true)),t$1(k(true)),t("hasOnFinishedParams")&&a.onFinished(),e.preventDefault();},$e=async e=>{let{stream_link:t}=Aa.getState().miniPlayer.details;e.loadSource(t);},ze=e=>ba(e.currentTime);export{Ue as A,We as B,$e as C,ze as D,ge as a,Te as b,xe as c,Se as d,De as e,ve as f,Pe as g,Le as h,Me as i,be as j,Ee as k,Re as l,Ve as m,Fe as n,we as o,Ce as p,ke as q,Ae as r,Oe as s,Ie as t,qe as u,He as v,Be as w,Ne as x,_e as y,Qe as z};//# sourceMappingURL=chunk-73KLK4QU.mjs.map
2
+ //# sourceMappingURL=chunk-73KLK4QU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/playerCore.actions.ts"],"names":["init_esm_shims","handleVideoError","event","error","mainPlayerVideoTag","miniPlayerVideoTag","errorLogProvider","handleAutoFullScreen","dispatch","store_default","params","launchFullScreen","element","setClearPopoversSlice","setIsFullScreen","appendQueryParamsToChunksIOS","fragmentExtension","originalOpen","getUUID","handleBufferedTime","video","intervalRef","bufferedTimeWidth","setBufferedTimeWidth","handleHlsConfig","streamLinkParams","splitQueryParamsFromStreamLink","xhr","url","handleMiniPlayerHlsConfig","handleManifestParsed","hls","data","qualityLevels","resolutions","level","highestResolutionSupported","setQualityLevels","eventType","conditions","sortedAudioTracks","a","setMultiAudio","handleLevels","setQualityLevel","settings","manualQuality","autoQuality","setAutoQuality","setManualQuality","setUserSettings","handleFragBuffered","handleFragChanged","multiAudio","selectedAudioId","handleFragParsed","type","handleHlsErrors","handleVideoWaiting","waitingTimerRef","setIsLoading","handleVideoSeeking","handleVideoPlay","timerRef","videoSettings","currentTime","setPlay","setCurrentTime","handleLockOrientation","setVideoTimelines","handleSubtitle","sendFluentLog","pausePlayLog","setSubtitleText","handleVideoPlaying","loadingCounterRef","loadingDurationRef","initialWaitingDurationRef","bannerLoadingDurationRef","waitingDurationRef","videoEntranceTimeRef","canPlayVideo","firstPlay","qualityLevel","waitingDuration","initLog","setFirstPlay","loadingLog","handleVideoPause","handleVideoTimeUpdate","onChangeCurrentTime","selectedSubtitle","handleVideoCanPlay","setCanPlayVideo","setDuration","handleVideoEnded","setIsEnded","setActiveElements","handleVideoTimeline","handleIosVideoPlay","handleIosVideoPlaying","handleIosVideoTimeUpdate","handleIosVideoEnded","handleStaticVideoPause","handleStaticVideoPlay","handleStaticVideoPlaying","handleStaticVideoTimeUpdate","handleStaticVideoCanPlay","handleStaticVideoLoadedData","handleStaticVideoEnded","handleMiniPlayerMediaAttached","stream_link","handleVideoVisibilityChange"],"mappings":"+MAAAA,CAAAA,EAAAA,CA6BO,IAAMC,GAAoBC,CAAAA,EAAe,CAC9CA,EAAM,cAAA,EAAe,CAErB,IAAIC,CAAAA,CAAAA,CAASC,CAAAA,IAAwBC,CAAAA,EAAmB,EAAG,MAC3D,GAAIF,CAAAA,CACF,OAAQA,CAAAA,CAAM,IAAA,EACZ,KAAKA,CAAAA,CAAM,kBACTG,CAAAA,CAAiB,CACf,KAAM,eAAA,CACN,OAAA,CAAS,iCACX,CAAC,CAAA,CACD,MACF,KAAKH,CAAAA,CAAM,kBACTG,CAAAA,CAAiB,CACf,KAAM,eAAA,CACN,OAAA,CAAS,6DACX,CAAC,CAAA,CACD,MACF,KAAKH,CAAAA,CAAM,gBAAA,CACTG,EAAiB,CACf,IAAA,CAAM,gBACN,OAAA,CAAS,6HACX,CAAC,CAAA,CACD,MACF,KAAKH,CAAAA,CAAM,2BAAA,CACTG,EAAiB,CACf,IAAA,CAAM,gBACN,OAAA,CAAS,oHACX,CAAC,CAAA,CACD,MACF,QACEA,CAAAA,CAAiB,CACf,IAAA,CAAM,gBACN,OAAA,CAAS,4BACX,CAAC,CAAA,CACD,KACJ,MAEAA,CAAAA,CAAiB,CACf,KAAM,eAAA,CACN,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IAAI,CAAC,CAAA,CACzBxF,GAAAA,CAASyF,EAAkB,IAAI,CAAC,EAC5B1D,CAAAA,CAAAA,qBAA4C,CAAA,EAAG7B,EAAO,UAAA,EAAY,CACtER,CAAAA,CAAM,cAAA,GACR,CAAA,CAEa4G,GAAgC,MAAO/E,CAAAA,EAAa,CAC/D,GAAM,CAAE,YAAAgF,CAAY,CAAA,CAAItG,GAAM,QAAA,EAAS,CAAE,WAAW,OAAA,CACpDsB,CAAAA,CAAI,WAAWgF,CAAW,EAC5B,EAEaC,EAAAA,CAA+B5F,CAAAA,EAA4B8E,EAAAA,CAAoB9E,CAAAA,CAAM,WAAW","file":"chunk-73KLK4QU.mjs","sourcesContent":["import { conditions } from \"../../conditions/conditions\";\nimport { mainPlayerVideoTag, miniPlayerVideoTag } from \"../../constants\";\nimport { errorLogProvider } from \"../../errorBoundary/errorBoundaryFunctions\";\nimport { getUUID, highestResolutionSupported, splitQueryParamsFromStreamLink } from \"../../helpers\";\nimport { ConditionName } from \"../../interfaces/enums\";\nimport { sendFluentLog } from \"../../logs/fluentdLogger\";\nimport { initLog, loadingLog, pausePlayLog } from \"../../logs/logs\";\nimport {\n setActiveElements,\n setAutoQuality,\n setBufferedTimeWidth,\n setCanPlayVideo,\n setCurrentTime,\n setDuration,\n setFirstPlay,\n setIsEnded,\n setIsFullScreen,\n setIsLoading,\n setManualQuality,\n setPlay,\n setQualityLevels,\n} from \"../slices/controllerSlice\";\nimport { setClearPopoversSlice } from \"../slices/popoversSlice\";\nimport { setUserSettings } from \"../slices/userSlice\";\nimport { setMultiAudio, setSubtitleText, setVideoTimelines } from \"../slices/videoDataSlice\";\nimport store from \"../store\";\nimport { handleLockOrientation, handleVideoTimeline } from \"./controller.actions\";\nimport { handleSubtitle } from \"./videoData.actions\";\n\nexport const handleVideoError = (event: any) => {\n event.preventDefault();\n // Access the error property from the video element\n let error = (mainPlayerVideoTag() || miniPlayerVideoTag()).error;\n if (error) {\n switch (error.code) {\n case error.MEDIA_ERR_ABORTED:\n errorLogProvider({\n type: \"videoTagError\",\n message: \"You aborted the video playback.\",\n });\n break;\n case error.MEDIA_ERR_NETWORK:\n errorLogProvider({\n type: \"videoTagError\",\n message: \"A network error caused the video download to fail part-way.\",\n });\n break;\n case error.MEDIA_ERR_DECODE:\n errorLogProvider({\n type: \"videoTagError\",\n message: \"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.\",\n });\n break;\n case error.MEDIA_ERR_SRC_NOT_SUPPORTED:\n errorLogProvider({\n type: \"videoTagError\",\n message: \"The video could not be loaded, either because the server or network failed or because the format is not supported.\",\n });\n break;\n default:\n errorLogProvider({\n type: \"videoTagError\",\n message: \"An unknown error occurred.\",\n });\n break;\n }\n } else {\n errorLogProvider({\n type: \"videoTagError\",\n message: \"An error occurred, but the error object is not available.\",\n });\n }\n};\n\nexport const handleAutoFullScreen = () => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n const launchFullScreen = (element: any) => {\n if (element.requestFullScreen) element.requestFullScreen();\n else if (element.mozRequestFullScreen) element.mozRequestFullScreen();\n else if (element.webkitRequestFullScreen) element.webkitRequestFullScreen();\n };\n dispatch(setClearPopoversSlice());\n launchFullScreen(document.documentElement);\n dispatch(setIsFullScreen(params.fullscreen === \"true\"));\n};\n\nexport const appendQueryParamsToChunksIOS = () => {\n let fragmentExtension = \".ts\";\n let originalOpen = XMLHttpRequest.prototype.open;\n XMLHttpRequest.prototype.open = function () {\n if (arguments[1].endsWith(fragmentExtension)) arguments[1] = arguments[1] + \"?uuid=\" + getUUID!();\n originalOpen.apply(this, arguments as any);\n };\n};\n\nexport const handleBufferedTime = (video: any, intervalRef: any) => {\n const dispatch = store.dispatch;\n\n intervalRef.current = setInterval(() => {\n // چک کردن طول buffered قبل از دسترسی\n if (video.buffered.length > 0 && video.duration > 0) {\n const bufferedTime = video.buffered.end(video.buffered.length - 1); // استفاده از آخرین index برای ایمنی\n const bufferedTimeWidth = (bufferedTime / video.duration) * 100;\n dispatch(setBufferedTimeWidth(bufferedTimeWidth));\n } else {\n dispatch(setBufferedTimeWidth(0));\n }\n }, 500);\n};\n\n// ************* Hls Config Handlers ************* //\nexport const handleHlsConfig = () => {\n const streamLinkParams = splitQueryParamsFromStreamLink(\"mainPlayer\");\n\n return {\n xhrSetup: (xhr: any, url: any) => {\n if (!url?.split(\"m3u8\")[1]) url = `${url}${streamLinkParams}`;\n xhr.open(\"GET\", url, true);\n },\n startLevel: -1,\n debug: false,\n enableWorker: true,\n abrBandWidthUpFactor: 0.7,\n abrBandWidthFactor: 0.95,\n backBufferLength: Infinity,\n maxBufferLength: 30,\n maxMaxBufferLength: 60,\n manifestLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: Infinity,\n maxLoadTimeMs: 20000,\n timeoutRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n errorRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n },\n },\n fragLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 10000,\n maxLoadTimeMs: 120000,\n timeoutRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n errorRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n },\n },\n playlistLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 10000,\n maxLoadTimeMs: 20000,\n timeoutRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n errorRetry: {\n maxNumRetry: 10,\n retryDelayMs: 5000,\n maxRetryDelayMs: 10000,\n },\n },\n },\n };\n};\n\nexport const handleMiniPlayerHlsConfig = () => {\n const streamLinkParams = splitQueryParamsFromStreamLink(\"miniPlayer\");\n return {\n xhrSetup: (xhr: any, url: any) => {\n url = `${url}${streamLinkParams}`;\n xhr.open(\"GET\", url, true);\n },\n startLevel: 1,\n debug: false,\n maxMaxBufferLength: 60,\n playlistLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 10000,\n maxLoadTimeMs: 20000,\n timeoutRetry: {\n maxNumRetry: 1000,\n retryDelayMs: 0,\n maxRetryDelayMs: 0,\n },\n errorRetry: {\n maxNumRetry: 1000,\n retryDelayMs: 1000,\n maxRetryDelayMs: 1000,\n },\n },\n },\n };\n};\n\n// ************* Manifest Handlers ************* //\n\nexport const handleManifestParsed = (hls: any, data: any) => {\n const dispatch = store.dispatch;\n let qualityLevels: any[] = [];\n let resolutions: any[] = [];\n hls.levels.map((level: any) => {\n qualityLevels.push(level.attrs.RESOLUTION?.split(\"x\")[1].trim());\n resolutions.push(level.attrs.RESOLUTION!);\n });\n hls.autoLevelCapping = highestResolutionSupported(resolutions, window.innerWidth, window.innerHeight);\n dispatch(setQualityLevels(qualityLevels));\n [\"fullscreenchange\", \"webkitfullscreenchange\", \"mozfullscreenchange\", \"msfullscreenchange\"].forEach((eventType) =>\n document.addEventListener(\n eventType,\n () => {\n if (conditions(ConditionName.isAutoQuality)) {\n hls.autoLevelCapping = highestResolutionSupported(resolutions, window.innerWidth, window.innerHeight);\n hls.nextLevel = -1;\n }\n },\n false,\n ),\n );\n if (data.audioTracks.length > 0) {\n const sortedAudioTracks = data.audioTracks.sort((a: any) => (a.default === true ? -1 : 1));\n dispatch(setMultiAudio(sortedAudioTracks));\n }\n};\n\n// ************* Level Handlers ************* //\n\nexport const handleLevels = (hls: any, data: any, setQualityLevel: any) => {\n if (data.frag.type !== \"audio\") {\n const dispatch = store.dispatch;\n const { settings } = store.getState().user;\n const { qualityLevels, manualQuality, autoQuality } = store.getState().controller;\n if (!conditions(ConditionName.isAutoQuality)) {\n if (data.frag.level !== manualQuality) hls.nextLevel = qualityLevels[settings.quality!] ? settings.quality : -1;\n if (qualityLevels[settings.quality!]) {\n dispatch(setManualQuality(settings.quality!));\n dispatch(setAutoQuality(undefined));\n } else {\n setQualityLevel(qualityLevels[data.frag.level]);\n dispatch(setAutoQuality(data.frag.level));\n dispatch(setUserSettings({ ...settings, quality: -1 }));\n }\n } else if (conditions(ConditionName.isAutoQuality) && autoQuality === undefined) {\n hls.nextLevel = -1;\n setQualityLevel(qualityLevels[data.frag.level]);\n dispatch(setAutoQuality(data.frag.level));\n } else if (conditions(ConditionName.isAutoQuality)) {\n setQualityLevel(qualityLevels[data.frag.level]);\n if (autoQuality !== data.frag.level) dispatch(setAutoQuality(data.frag.level));\n }\n }\n};\n\n// ************* Fragment Handlers ************* //\n\nexport const handleFragBuffered = (hls: any, video: HTMLVideoElement) => {\n const dispatch = store.dispatch;\n const bufferedTime = hls.mainForwardBufferInfo?.end;\n const bufferedTimeWidth = (bufferedTime! / video.duration) * 100;\n dispatch(setBufferedTimeWidth(bufferedTimeWidth));\n};\n\nexport const handleFragChanged = (hls: any, data: any, setQualityLevel: any) => {\n const { params, multiAudio, selectedAudioId } = store.getState().videoData;\n\n if (multiAudio && selectedAudioId !== undefined && selectedAudioId !== hls.audioTrack) hls.audioTrack = selectedAudioId;\n if (params.type) handleLevels(hls, data, setQualityLevel);\n};\n\nexport const handleFragParsed = (hls: any, data: any, setQualityLevel: any) => {\n const { type } = store.getState().videoData.params;\n if (type) handleLevels(hls, data, setQualityLevel);\n};\n\n// ************* HLS Error Handlers ************* //\n\nexport const handleHlsErrors = (data: any) => {\n if (data.event !== \"hlsAudioTrackLoading\") return { type: \"HLS_\" + data.type, message: data.error.message };\n return undefined;\n};\n\n// ************* Video Tag Handlers ************* //\n\nexport const handleVideoWaiting = (event: any, waitingTimerRef: any) => {\n const dispatch = store.dispatch;\n event.preventDefault();\n waitingTimerRef.current = Date.now();\n dispatch(setIsLoading(true));\n};\n\nexport const handleVideoSeeking = (event: any, waitingTimerRef: any) => {\n if (conditions(ConditionName.isIOS) && conditions(ConditionName.isFirstPlay)) return;\n const dispatch = store.dispatch;\n event.preventDefault();\n waitingTimerRef.current = 0;\n dispatch(setIsLoading(true));\n};\n\nexport const handleVideoPlay = (event: any, timerRef: any, video: HTMLVideoElement) => {\n const dispatch = store.dispatch;\n const { videoSettings } = store.getState().user;\n const { params } = store.getState().videoData;\n const { currentTime } = store.getState().controller;\n event.preventDefault();\n timerRef.current = Date.now();\n dispatch(setPlay(true));\n if (conditions(ConditionName.hasOnPlayParams)) params.onPlay!(currentTime);\n if (conditions(ConditionName.isFirstPlay)) {\n if (!conditions(ConditionName.hasCurrentTimeParams)) {\n video.currentTime = videoSettings.time;\n dispatch(setCurrentTime(videoSettings.time));\n }\n if (conditions(ConditionName.hasFullScreenParams)) handleAutoFullScreen();\n if (conditions(ConditionName.isFullScreen)) handleLockOrientation();\n dispatch(setVideoTimelines([Math.floor(video.currentTime)]));\n if (conditions(ConditionName.hasRawSubtitles)) handleSubtitle();\n }\n sendFluentLog(pausePlayLog(true));\n dispatch(setSubtitleText(\"\"));\n};\n\nexport const handleVideoPlaying = (\n loadingCounterRef: any,\n loadingDurationRef: any,\n initialWaitingDurationRef: any,\n bannerLoadingDurationRef: any,\n timerRef: any,\n waitingDurationRef: any,\n waitingTimerRef: any,\n videoEntranceTimeRef: any,\n video: HTMLVideoElement,\n) => {\n const dispatch = store.dispatch;\n const { autoQuality, canPlayVideo, firstPlay, qualityLevels } = store.getState().controller;\n const { settings } = store.getState().user;\n const qualityLevel = settings.quality === -1 && autoQuality ? qualityLevels[autoQuality] : qualityLevels[settings.quality!];\n let waitingDuration = 0;\n if (!!waitingTimerRef.current) waitingDuration = Date.now() - waitingTimerRef.current;\n if (firstPlay && !!video.played) {\n sendFluentLog(\n initLog(\n loadingDurationRef.current,\n Date.now() - initialWaitingDurationRef.current,\n bannerLoadingDurationRef.current - initialWaitingDurationRef.current,\n Date.now() - timerRef.current,\n timerRef,\n ),\n );\n }\n dispatch(setFirstPlay(false));\n\n if (canPlayVideo && waitingDuration > 0 && qualityLevel !== undefined) {\n waitingDurationRef.current = waitingDuration;\n waitingTimerRef.current = 0;\n sendFluentLog(loadingLog(waitingDuration, qualityLevel, timerRef, loadingCounterRef, videoEntranceTimeRef.current));\n loadingCounterRef.current = loadingCounterRef.current + 1;\n timerRef.current = Date.now();\n }\n};\n\nexport const handleVideoPause = (event: any) => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n event.preventDefault();\n sendFluentLog(pausePlayLog(false));\n dispatch(setPlay(false));\n if (conditions(ConditionName.hasOnPauseParams)) params.onPause!();\n};\n\nexport const handleVideoTimeUpdate = (event: any) => {\n const dispatch = store.dispatch;\n const { onChangeCurrentTime } = store.getState().videoData.params;\n const { selectedSubtitle } = store.getState().videoData;\n event.preventDefault();\n dispatch(setCurrentTime(event.target.currentTime));\n if (conditions(ConditionName.hasOnChangeCurrentTime)) onChangeCurrentTime!(event.target.currentTime);\n if (conditions(ConditionName.hasActiveCue)) dispatch(setSubtitleText((selectedSubtitle!.activeCues![0] as any).text));\n};\n\nexport const handleVideoCanPlay = (video: HTMLVideoElement) => {\n const dispatch = store.dispatch;\n const { settings } = store.getState().user;\n dispatch(setIsLoading(false));\n dispatch(setCanPlayVideo(true));\n video.volume = settings.volume / 100;\n dispatch(setDuration(video.duration));\n};\n\nexport const handleVideoEnded = (event: any, video: HTMLVideoElement) => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n event.preventDefault();\n dispatch(setIsEnded(true));\n dispatch(setActiveElements(true));\n handleVideoTimeline(video.duration);\n if (conditions(ConditionName.hasOnFinishedParams)) params.onFinished!();\n};\n\n// ************* IOS Video Tag Handlers ************* //\n\nexport const handleIosVideoPlay = (event: any, timerRef: any) => {\n event.preventDefault();\n timerRef.current = Date.now();\n};\n\nexport const handleIosVideoPlaying = () => {\n const dispatch = store.dispatch;\n dispatch(setIsLoading(false));\n dispatch(setFirstPlay(false));\n};\n\nexport const handleIosVideoTimeUpdate = (event: any) => {\n const { onChangeCurrentTime } = store.getState().videoData.params;\n const dispatch = store.dispatch;\n event.preventDefault();\n if (conditions(ConditionName.hasOnChangeCurrentTime)) onChangeCurrentTime!(event.target.currentTime);\n dispatch(setCurrentTime(event.target.currentTime));\n};\n\nexport const handleIosVideoEnded = () => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n dispatch(setIsEnded(true));\n dispatch(setActiveElements(true));\n if (conditions(ConditionName.hasOnFinishedParams)) params.onFinished!();\n};\n\n// ************* Static Video Tag Handlers ************* //\n\nexport const handleStaticVideoPause = (event: any) => {\n const dispatch = store.dispatch;\n event.preventDefault();\n dispatch(setPlay(false));\n};\n\nexport const handleStaticVideoPlay = (event: any, timerRef: any) => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n const { currentTime } = store.getState().controller;\n event.preventDefault();\n dispatch(setPlay(true));\n timerRef.current = Date.now();\n dispatch(setSubtitleText(\"\"));\n if (conditions(ConditionName.hasOnPlayParams)) params.onPlay!(currentTime);\n\n if (conditions(ConditionName.isFirstPlay)) {\n if (conditions(ConditionName.hasRawSubtitles)) handleSubtitle();\n if (conditions(ConditionName.hasFullScreenParams)) {\n handleAutoFullScreen();\n if (conditions(ConditionName.isFullScreen)) handleLockOrientation();\n }\n }\n};\n\nexport const handleStaticVideoPlaying = (loadingDurationRef: any, initialWaitingDurationRef: any, timerRef: any, video: HTMLVideoElement) => {\n const dispatch = store.dispatch;\n const { firstPlay } = store.getState().controller;\n dispatch(setIsLoading(false));\n if (firstPlay && !!video.played) {\n sendFluentLog(\n initLog(Math.round(loadingDurationRef.current), Date.now() - initialWaitingDurationRef.current, 0, Date.now() - timerRef.current, timerRef),\n );\n }\n dispatch(setFirstPlay(false));\n};\n\nexport const handleStaticVideoTimeUpdate = (event: any) => {\n const { onChangeCurrentTime } = store.getState().videoData.params;\n const dispatch = store.dispatch;\n const { selectedSubtitle } = store.getState().videoData;\n event.preventDefault();\n dispatch(setCurrentTime(event.target.currentTime));\n dispatch(setDuration(event.target.duration));\n if (conditions(ConditionName.hasOnChangeCurrentTime)) onChangeCurrentTime!(event.target.currentTime);\n if (conditions(ConditionName.hasActiveCue)) dispatch(setSubtitleText((selectedSubtitle!.activeCues![0] as any).text));\n};\n\nexport const handleStaticVideoCanPlay = () => {\n const dispatch = store.dispatch;\n dispatch(setIsLoading(false));\n dispatch(setCanPlayVideo(true));\n};\n\nexport const handleStaticVideoLoadedData = (intervalRef: any, video: HTMLVideoElement) => handleBufferedTime(video, intervalRef);\n\nexport const handleStaticVideoEnded = (event: any) => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n dispatch(setIsEnded(true));\n dispatch(setActiveElements(true));\n if (conditions(ConditionName.hasOnFinishedParams)) params.onFinished!();\n event.preventDefault();\n};\n\nexport const handleMiniPlayerMediaAttached = async (hls: any) => {\n const { stream_link } = store.getState().miniPlayer.details;\n hls.loadSource(stream_link);\n};\n\nexport const handleVideoVisibilityChange = (video: HTMLVideoElement) => handleVideoTimeline(video.currentTime);\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js');chunkAN6JAJSI_js.e();var t=1e3,n=3e3,r=6e4;exports.a=t;exports.b=n;exports.c=r;//# sourceMappingURL=chunk-AK5TFAW3.js.map
2
+ //# sourceMappingURL=chunk-AK5TFAW3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/environment.ts"],"names":["init_cjs_shims","activeElementsTime","showLoaderTime","continuousePlaybackIntervalTime"],"mappings":"iEAAAA,kBAAAA,EAAAA,CAMO,IAAMC,CAAAA,CAAqB,GAAA,CAErBC,CAAAA,CAAiB,IAEjBC,CAAAA,CAAkC","file":"chunk-AK5TFAW3.js","sourcesContent":["import { IEnvironment } from \"./interfaces/interfaces\";\n\nexport const ENVIRONMENT: IEnvironment = {\n reduxDevTool: true\n};\n\nexport const activeElementsTime = 1000;\n\nexport const showLoaderTime = 3000;\n\nexport const continuousePlaybackIntervalTime = 60000;\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var toolkit=require('@reduxjs/toolkit'),reactRedux=require('react-redux');var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(t&&(e=t(t=0)),e);var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),S=(t,e)=>{for(var l in e)n(t,l,{get:e[l],enumerable:true});},p=(t,e,l,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of c(e))!u.call(t,a)&&a!==l&&n(t,a,{get:()=>e[a],enumerable:!(r=d(e,a))||r.enumerable});return t};var T=t=>p(n({},"__esModule",{value:true}),t);var o=y(()=>{});o();var i={play:false,isAutoPlay:true,duration:0,currentTime:0,qualityLevels:[],manualQuality:void 0,autoQuality:void 0,activeElements:true,isLoading:true,isFullScreen:false,bufferedTimeWidth:0,firstPlay:true,activePointerProgressBar:false,delayTurnOffControlbar:false,canPlayVideo:false,lock:false,isEnded:false,tooltipTime:0,firstMute:false},s=toolkit.createSlice({name:"controller",initialState:i,reducers:{setPlay:(t,e)=>{t.play=e.payload;},setIsAutoPlay:(t,e)=>{t.isAutoPlay=e.payload;},setDuration:(t,e)=>{t.duration=e.payload;},setCurrentTime:(t,e)=>{t.currentTime=e.payload;},setManualQuality:(t,e)=>{t.manualQuality=e.payload;},setAutoQuality:(t,e)=>{t.autoQuality=e.payload;},setQualityLevels:(t,e)=>{t.qualityLevels=e.payload;},setActiveElements:(t,e)=>{t.activeElements=e.payload;},setIsLoading:(t,e)=>{t.isLoading=e.payload;},setIsFullScreen:(t,e)=>{t.isFullScreen=e.payload;},setBufferedTimeWidth:(t,e)=>{t.bufferedTimeWidth=e.payload;},setFirstPlay:(t,e)=>{t.firstPlay=e.payload;},setActivePointerProgressBar:(t,e)=>{t.activePointerProgressBar=e.payload;},setDelayTurnOffControlbar:(t,e)=>{t.delayTurnOffControlbar=e.payload;},setCanPlayVideo:(t,e)=>{t.canPlayVideo=e.payload;},setLock:(t,e)=>{t.lock=e.payload;},setIsEnded:(t,e)=>{t.isEnded=e.payload;},setTooltipTime:(t,e)=>{t.tooltipTime=e.payload;},setFirstMute:(t,e)=>{t.firstMute=e.payload;},setClearControllerSlice:()=>i}}),{setPlay:g,setIsAutoPlay:h,setDuration:Q,setCurrentTime:D,setQualityLevels:E,setAutoQuality:F,setActiveElements:M,setIsLoading:U,setIsFullScreen:k,setBufferedTimeWidth:x,setFirstPlay:B,setActivePointerProgressBar:R,setDelayTurnOffControlbar:O,setManualQuality:V,setCanPlayVideo:W,setLock:q,setIsEnded:w,setTooltipTime:H,setClearControllerSlice:_,setFirstMute:j}=s.actions,N=s.reducer;o();var K=()=>reactRedux.useDispatch(),X=reactRedux.useSelector;exports.A=X;exports.a=y;exports.b=b;exports.c=S;exports.d=T;exports.e=o;exports.f=g;exports.g=Q;exports.h=D;exports.i=E;exports.j=F;exports.k=M;exports.l=U;exports.m=k;exports.n=x;exports.o=B;exports.p=R;exports.q=O;exports.r=V;exports.s=W;exports.t=q;exports.u=w;exports.v=H;exports.w=_;exports.x=j;exports.y=N;exports.z=K;//# sourceMappingURL=chunk-AN6JAJSI.js.map
2
+ //# sourceMappingURL=chunk-AN6JAJSI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/tsup/assets/cjs_shims.js","../src/videoPlayerLibrary/helpers/redux/slices/controllerSlice.ts","../src/videoPlayerLibrary/helpers/redux/hooks.ts"],"names":["init_cjs_shims","__esmMin","ControllerSliceState","controllerSlice","createSlice","state","action","setPlay","setIsAutoPlay","setDuration","setCurrentTime","setQualityLevels","setAutoQuality","setActiveElements","setIsLoading","setIsFullScreen","setBufferedTimeWidth","setFirstPlay","setActivePointerProgressBar","setDelayTurnOffControlbar","setManualQuality","setCanPlayVideo","setLock","setIsEnded","setTooltipTime","setClearControllerSlice","setFirstMute","controllerSlice_default","useAppDispatch","useDispatch","useAppSelector","useSelector"],"mappings":"uFAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,wBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,mB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B,CAACD,CAAAA,CAAOC,CAAAA,GAAkC,CACxDD,CAAAA,CAAM,WAAA,CAAcC,CAAAA,CAAO,QAC7B,EACA,YAAA,CAAc,CAACD,CAAAA,CAAOC,CAAAA,GAAmC,CACvDD,CAAAA,CAAM,SAAA,CAAYC,CAAAA,CAAO,QAC3B,EACA,uBAAA,CAAyB,IAChBJ,CAEX,CACF,CAAC,CAAA,CAEY,CACX,OAAA,CAAAK,CAAAA,CACA,cAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,kBAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,EACA,oBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,4BAAAC,CAAAA,CACA,yBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,EACA,eAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,EACA,YAAA,CAAAC,CACF,CAAA,CAAIvB,CAAAA,CAAgB,QACbwB,CAAAA,CAAQxB,CAAAA,CAAgB,QClH/BH,CAAAA,EAAAA,CAGO,IAAM4B,CAAAA,CAAsB,IAAMC,sBAAAA,GAC5BC,CAAAA,CAAkDC","file":"chunk-AN6JAJSI.js","sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\nimport { IControllerSlice } from \"../../interfaces/interfaces\";\n\nconst ControllerSliceState: IControllerSlice = {\n play: false,\n isAutoPlay: true,\n duration: 0,\n currentTime: 0,\n qualityLevels: [],\n manualQuality: undefined,\n autoQuality: undefined,\n activeElements: true,\n isLoading: true,\n isFullScreen: false,\n bufferedTimeWidth: 0,\n firstPlay: true,\n activePointerProgressBar: false,\n delayTurnOffControlbar: false,\n canPlayVideo: false,\n lock: false,\n isEnded: false,\n tooltipTime: 0,\n firstMute: false,\n};\n\nexport const controllerSlice = createSlice({\n name: \"controller\",\n initialState: ControllerSliceState,\n reducers: {\n setPlay: (state, action: PayloadAction<boolean>) => {\n state.play = action.payload;\n },\n setIsAutoPlay: (state, action: PayloadAction<boolean>) => {\n state.isAutoPlay = action.payload;\n },\n setDuration: (state, action: PayloadAction<number>) => {\n state.duration = action.payload;\n },\n setCurrentTime: (state, action: PayloadAction<number>) => {\n state.currentTime = action.payload;\n },\n setManualQuality: (state, action: PayloadAction<number | undefined>) => {\n state.manualQuality = action.payload;\n },\n setAutoQuality: (state, action: PayloadAction<number | undefined>) => {\n state.autoQuality = action.payload;\n },\n setQualityLevels: (state, action: PayloadAction<any[]>) => {\n state.qualityLevels = action.payload;\n },\n setActiveElements: (state, action: PayloadAction<boolean>) => {\n state.activeElements = action.payload;\n },\n setIsLoading: (state, action: PayloadAction<boolean>) => {\n state.isLoading = action.payload;\n },\n setIsFullScreen: (state, action: PayloadAction<boolean>) => {\n state.isFullScreen = action.payload;\n },\n setBufferedTimeWidth: (state, action: PayloadAction<number>) => {\n state.bufferedTimeWidth = action.payload;\n },\n setFirstPlay: (state, action: PayloadAction<boolean>) => {\n state.firstPlay = action.payload;\n },\n setActivePointerProgressBar: (state, action: PayloadAction<boolean>) => {\n state.activePointerProgressBar = action.payload;\n },\n setDelayTurnOffControlbar: (state, action: PayloadAction<boolean>) => {\n state.delayTurnOffControlbar = action.payload;\n },\n setCanPlayVideo: (state, action: PayloadAction<boolean>) => {\n state.canPlayVideo = action.payload;\n },\n setLock: (state, action: PayloadAction<boolean>) => {\n state.lock = action.payload;\n },\n setIsEnded: (state, action: PayloadAction<boolean>) => {\n state.isEnded = action.payload;\n },\n setTooltipTime: (state, action: PayloadAction<number>) => {\n state.tooltipTime = action.payload;\n },\n setFirstMute: (state, action: PayloadAction<boolean>) => {\n state.firstMute = action.payload;\n },\n setClearControllerSlice: () => {\n return ControllerSliceState;\n },\n },\n});\n\nexport const {\n setPlay,\n setIsAutoPlay,\n setDuration,\n setCurrentTime,\n setQualityLevels,\n setAutoQuality,\n setActiveElements,\n setIsLoading,\n setIsFullScreen,\n setBufferedTimeWidth,\n setFirstPlay,\n setActivePointerProgressBar,\n setDelayTurnOffControlbar,\n setManualQuality,\n setCanPlayVideo,\n setLock,\n setIsEnded,\n setTooltipTime,\n setClearControllerSlice,\n setFirstMute,\n} = controllerSlice.actions;\nexport default controllerSlice.reducer;\n","import { AppDispatch, RootState } from \"./store\";\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \"react-redux\";\n\nexport const useAppDispatch: any = () => useDispatch<AppDispatch>();\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\n"]}
@@ -0,0 +1,3 @@
1
+ import {b as b$1,e,c as c$1,a as a$1,y,d,f,x as x$1,m,t,w as w$1}from'./chunk-4QMWBTB5.mjs';import {createSlice,configureStore}from'@reduxjs/toolkit';import Ge,{AxiosError}from'axios';import {twMerge}from'tailwind-merge';var Se=b$1((Zt,fe)=>{e();fe.exports={baseUrl:"https://hamrahi.cloud",fluentdUrl:"https://hamrahi.cloud"};});var Pe={};c$1(Pe,{isNpmPackage:()=>Ye});var Ye,ve=a$1(()=>{e();Ye=false;});e();var te={details:{stream_link:"",type:"",banner:"",id:void 0,title:void 0,vtt:void 0,vtt_mobile:void 0,user_id:null,content_id:void 0,content_type:null,duration:0,subtitles:void 0},params:{type:"",id:"",bannerAlt:"",fullscreen:"",autoplay:"",banner:"",provider:"cafevdo",onFinished:void 0,onPlay:void 0,onPause:void 0,playStatus:void 0,currentTime:void 0,daaniHashCode:void 0,advertisement:void 0,activeSubtitle:"fa",vhl_progress:0},markers:[],videoElementSizeInfo:{bottom:0,top:0,right:0,left:0,width:0,height:0},isFetchDetails:false,isValidAddress:false,videoTimelines:[],isReady:false,rawSubtitles:void 0,subtitles:[],selectedSubtitle:void 0,subtitleText:void 0,multiAudio:[],selectedAudioId:0,hiddenAd:false},re=createSlice({name:"videoData",initialState:te,reducers:{setInfo:(e,t)=>{e.details=t.payload;},setPlayerParams:(e,t)=>{e.params=t.payload;},setMarkers:(e,t)=>{e.markers=t.payload;},setVideoElementSizeInfo:(e,t)=>{e.videoElementSizeInfo=t.payload;},setIsFetchDetails:(e,t)=>{e.isFetchDetails=t.payload;},setIsValidAddress:(e,t)=>{e.isValidAddress=t.payload;},setVideoTimelines:(e,t)=>{e.videoTimelines=t.payload;},setIsReady:(e,t)=>{e.isReady=t.payload;},setRawSubtitles:(e,t)=>{e.rawSubtitles=t.payload;},setSubtitles:(e,t)=>{e.subtitles=t.payload;},setSelectedSubtitle:(e,t)=>{e.selectedSubtitle=t.payload;},setSubtitleText:(e,t)=>{e.subtitleText=t.payload;},setMultiAudio:(e,t)=>{e.multiAudio=JSON.parse(JSON.stringify(t.payload));},setSelectedAudioId:(e,t)=>{e.selectedAudioId=t.payload;},setHiddenAd:(e,t)=>{e.hiddenAd=t.payload;},setClearVideoDataSlice:e=>te}}),{setInfo:st,setPlayerParams:at,setVideoElementSizeInfo:se,setMarkers:it,setIsFetchDetails:ot,setIsValidAddress:nt,setVideoTimelines:F,setIsReady:lt,setRawSubtitles:ut,setSubtitles:ct,setSubtitleText:dt,setSelectedSubtitle:pt,setMultiAudio:mt,setSelectedAudioId:gt,setHiddenAd:ht,setClearVideoDataSlice:ae}=re.actions,ie=re.reducer;e();e();e();e();e();var qe={settingPopover:false,speedPopover:false,qualityLevelsPopover:false,markersListPopover:false,multiAudioPopover:false},oe=createSlice({name:"popover",initialState:qe,reducers:{setSettingPopover:(e,t)=>{e.settingPopover=t.payload;},setSpeedPopover:(e,t)=>{e.speedPopover=t.payload;},setQualityLevelsPopover:(e,t)=>{e.qualityLevelsPopover=t.payload;},setMarkersListPopover:(e,t)=>{e.markersListPopover=t.payload;},setMultiAudioPopover:(e,t)=>{e.multiAudioPopover=t.payload;},setClearPopoversSlice:e=>{e.settingPopover=false,e.speedPopover=false,e.qualityLevelsPopover=false,e.markersListPopover=false,e.multiAudioPopover=false;}}}),{setSettingPopover:wt,setSpeedPopover:At,setQualityLevelsPopover:Lt,setMarkersListPopover:kt,setMultiAudioPopover:xt,setClearPopoversSlice:x}=oe.actions,ne=oe.reducer;e();var le={settings:{quality:ue?0:-1,brightness:100,volume:100,speed:1},videoSettings:{time:0}},ce=createSlice({name:"user",initialState:le,reducers:{setUserSettings:(e,t)=>{e.settings=t.payload;},setVideoSettings:(e,t)=>{e.videoSettings=t.payload;},setClearUserSlice:()=>le}}),{setUserSettings:de,setVideoSettings:Vt,setClearUserSlice:pe}=ce.actions,me=ce.reducer;e();var ge={params:{id:"0",type:"",currentTime:0,autoPlay:false,onClose:()=>{}},details:{},play:false},he=createSlice({name:"user",initialState:ge,reducers:{setMiniPlayerInfo:(e,t)=>{e.params={...t.payload,id:t.payload.type==="static"?window.atob(t.payload.id):t.payload.id,banner:t.payload.banner?t.payload.banner:void 0};},setDetailsMiniPlayer:(e,t)=>{e.details=t.payload;},setPlayMiniPlayer:(e,t)=>{e.play=t.payload;},setClearMiniPlayerSlice:e=>ge}}),{setMiniPlayerInfo:_t,setDetailsMiniPlayer:Qt,setPlayMiniPlayer:O,setClearMiniPlayerSlice:$t}=he.actions,ye=he.reducer;var Xe=configureStore({reducer:{controller:y,videoData:ie,popovers:ne,user:me,miniPlayer:ye},devTools:true,middleware:e=>e({serializableCheck:false})}),a=Xe;e();e();e();e();e();e();var _=Se(),Q=(ve(),d(Pe)),$=()=>(Q?_.baseUrl:process.env.baseUrl)+"/live/api",K=()=>Q?_.fluentdUrl:process.env.fluentdUrl,er=()=>(Q?_.baseUrl:process.env.baseUrl)+"/emoji";var V=()=>({vod:{getVodUrl:`${$()}/v1/live/details/vod/`,getMarkerUrl:e=>`${$()}/v1/live/list-event/vod/${e}/`},videoTimelineLog:`${K()}/video-timeline.log`,logs:`${K()}/cafevideo-endpoint.log`});var w=e=>{let{details:t,params:r}=a.getState().videoData,s={...e,timestamp:Date.now(),clientUUID:v(),uuid:v(),link:window.location.href,user_id:t.user_id,live_id:null,format:void 0,content_type:t.content_type,content_id:t.content_id,daaniHashCode:r.daaniHashCode};T({url:V().logs,method:"post",data:s});};e();e();var c=()=>document.getElementById("player-tag"),b=()=>document.getElementById("mini-player-video-tag");var mr=()=>document.getElementById("time-progress-bar"),gr=()=>document.getElementById("progress-area");var hr=()=>a.getState().videoData.videoElementSizeInfo.width,yr=()=>document.getElementById("time-progress-area");var Lr=e=>{let{params:t,details:r}=a.getState().videoData,{settings:s}=a.getState().user;return {category:"speedChange",previousSelectedSpeed:s.speed,selectedSpeed:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id,provider:t.provider}},kr=e=>{let{params:t,details:r}=a.getState().videoData,{qualityLevels:s,manualQuality:i,autoQuality:o}=a.getState().controller;return {category:"qualityChangeRequest",currentPlayingQuality:`${s[l("isAutoQuality")?o??i:i]}P`,previousSelectedQuality:l("isAutoQuality")?"auto":`${s[i]}P`,selectedQuality:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id,provider:t.provider}},xr=e=>{let{params:t,details:r}=a.getState().videoData,{qualityLevels:s,autoQuality:i}=a.getState().controller,{settings:o}=a.getState().user;return {category:"catchUpLoading",previousVideoTime:Number(sessionStorage.getItem("previousVideoTime")),currentVideoTime:c().currentTime,duration:e,quality:`${l("isAutoQuality")?s[i]:s[o.quality]}P`,isAutoQuality:l("isAutoQuality"),id:Number(t.id),type:t.type,src:l("streamLink")||t.id,provider:t.provider}},be=e=>{let{params:t,details:r}=a.getState().videoData;return {category:e==="backward"?"backward":"forward",id:Number(t.id),type:t.type,src:l("streamLink")||t.id,provider:t.provider}},H=e=>{let{params:t,details:r}=a.getState().videoData;return {category:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id}};var Tr=(e,t)=>{let{params:r,details:s}=a.getState().videoData;return {category:"volumeChange",source:e,target:t,id:Number(r.id),type:r.type,src:l("streamLink")||r.id}},we=e=>{let{params:t,details:r}=a.getState().videoData;return {category:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id}},Ae=(e,t,r,s)=>({category:"player-error",type:e,message:t,statusCode:r,url:s}),Le=(e,t)=>{let{params:r,details:s}=a.getState().videoData,{duration:i}=a.getState().controller;return {category:"video-timeline",video_id:+r.id,video_type:r.type,start:e,end:t,watchedDuration:t-e,video_duration:Math.floor(i),clientUUID:v(),user_id:s.user_id,content_type:s.content_type,content_id:s.content_id}},Mr=(e,t,r)=>{let{params:s,details:i}=a.getState().videoData;return {category:"autoQualityChange",sourceQuality:e,targetQuality:t,diffQuality:r,id:Number(s.id),type:s.type,src:l("streamLink")||s.id,provider:s.provider}},Ir=(e,t)=>{let{params:r,details:s}=a.getState().videoData;return {category:"pingpong",id:Number(r.id),type:r.type,src:l("streamLink")||r.id,PingPongDuration:Number((new Date().getTime()-e).toFixed(2)),PingPongSourceQuality:`${t[0]}P`,PingPongTargetQuality:`${t[1]}P`,provider:r.provider}},Dr=e=>{let{params:t,details:r}=a.getState().videoData;return {category:e?"playVideo":"pauseVideo",id:Number(t.id),type:t.type,src:l("streamLink")||t.id,provider:t.provider}},Fr=(e,t,r,s,i)=>{let{params:o,details:S}=a.getState().videoData,n=Date.now()-i.current+e+t,f=window.performance.memory,A=JSON.parse(JSON.stringify(window.performance.timing));return {category:"initLog",id:Number(o.id),type:o.type,origin:new URL(l("streamLink")||o.id).origin,src:l("streamLink")||o.id,loading:e,bannerLoading:!l("hasBanner")||r<0?0:r,waiting:t,firstChunkPlaying:s<0?0:s,totalTime:n,provider:o.provider,performance:j({memory:f,timing:A},"performance"),userAgent:window.navigator.userAgent}},Vr=(e,t,r,s,i)=>{let{params:o,details:S}=a.getState().videoData,{settings:n}=a.getState().user,f=Date.now()-r.current;return {category:"loading",id:Number(o.id),type:o.type,src:l("streamLink")||o.id,duration:e,quality:`${t}P`,isAutoQuality:l("isAutoQuality"),previousLoaderDiff:f,counter:s.current,loadingPercentile:Number((e/f).toFixed(2)),videoTime:c().currentTime,videoEntranceTime:i,speed:n.speed,provider:o.provider}},Er=e=>{let{params:t,details:r}=a.getState().videoData;return {category:"subtitle",language:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id}},Rr=(e,t,r,s,i)=>{let{params:o,details:S}=a.getState().videoData;return {category:"eventMarkerClick",video_id:Number(o.id),markerId:e,markerTime:t,markerTitle:r,markerDescription:s,markerSticker:i,type:o.type,src:l("streamLink")||o.id,provider:o.provider}};var ke=e=>{e&&w(Ae(e.type,e.message,e.statusCode,e.url));};var T=async({url:e,method:t="GET",data:r,headers:s,retryCount:i=1,maxRetryCount:o=0,errorMessage:S,retryPolicy:n,errorCallback:f,timeoutCount:A})=>{let P={url:e,method:t,headers:{...s,"Content-Type":"application/json"},timeout:A?A*1e3:void 0};r?t==="GET"?P={...P,params:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider,...r}}:P={...P,data:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider,...r}}:t==="GET"?P={...P,params:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider}}:P={...P,data:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider}};try{return await Ge(P)}catch(d){if(d instanceof AxiosError&&d.code!=="ERR_NETWORK"&&ke({type:"API-ERROR",message:d.message?d.message:"",statusCode:d.response&&d.response.status?d.response.status:void 0,url:e}),!(d&&d.response&&d.response.status===401)){f&&f(d.response.status,d.response.message);let p=0,m=0;if(n!==void 0){for(let g=0;g<n.length;g++)if((n[g].codeAbove&&d.response.status>=n[g].codeAbove||n[g].codeBelow&&d.response.status<=n[g].codeBelow)&&(n[g].excludeCodes.length===0||!n[g].excludeCodes.includes(d.response.status))||n[g].includeCodes.length===0||n[g].includeCodes.includes(d.response.status)){m=n[g].count,p=n[g].delay;break}}else m=o,p=i+1;if(i<m)return await xe(p),T({url:e,method:t,data:r,headers:s,retryCount:i+1,errorMessage:S,retryPolicy:n,errorCallback:f});if(d.response)return {data:d.response.data?d.response.data:{detail:"\u0639\u0645\u0644\u06CC\u0627\u062A \u0628\u0627 \u062E\u0637\u0627 \u0645\u0648\u0627\u062C\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A."},status:d.response.status}}}};var os=e=>{if(e===null||e.target.nodeName!=="INPUT"){let t=a.dispatch;e!==null&&(e.stopPropagation(),e.preventDefault()),c()?.paused?c().play():c()?.pause(),t(f(!c()?.paused)),b()&&b().played&&(b()?.pause(),t(O(false)));}},ns=e=>{if(e===null||e.target.nodeName!=="INPUT"){let t=a.dispatch;b().paused?b().play():b()?.pause(),t(O(!b().paused)),c()&&c().played&&(c()?.pause(),t(f(false)));}},Ze=()=>{let e=a.dispatch;e(x$1(false)),l("isIOS")&&(c().currentTime=c().currentTime-.001);},E=(e,t)=>{let r=a.dispatch,{settings:s}=a.getState().user,{firstMute:i}=a.getState().controller,o=t||c();r(de({...s,volume:e})),o&&(i&&e&&Ze(),l("isIOS")?o.muted=!e:o.volume=e/100);},ls=(e,t=15,r)=>{if(e==="touchBackward"?e="backward":e==="touchForward"&&(e="forward"),r&&r.target.nodeName==="INPUT"||e==="backward"&&c().currentTime<15||e==="forward"&&c().duration-c().currentTime<15)return;w(be(e));let s=0;e==="backward"?t===0?s=0:s=c().currentTime-t:e==="forward"&&(t===c().duration?s=t:s=c().currentTime+t),c().currentTime=s;},Ne=()=>{let e=a.dispatch,t=document.fullscreenElement;l("isIOS")?c().webkitEnterFullScreen?(e(f(false)),c().webkitEnterFullScreen()):(e(x()),w(H("fullScreen"))):t?(e(m(false)),document.exitFullscreen().then(()=>document.body.style.overflow="auto")):(e(x()),document.documentElement.requestFullscreen().then(()=>document.body.style.overflow="hidden"),e(m(true)),w(H("fullScreen")));},us=()=>{l("isTouchScreen")&&!l("isIOS")&&(l("isLandscape")&&!l("isFullScreen")?window.screen.orientation.lock("portrait"):window.screen.orientation.lock("landscape"));},cs=e=>{let t$1=a.dispatch;t$1(t(e==="lock")),w(we(e)),e==="unlock"&&localStorage.setItem("unlock-click","true");},ds=(e,t)=>{if(l("isSendTimelineLog")){let r=a.dispatch,{videoTimelines:s}=a.getState().videoData,i=Math.floor(e),o=Math.floor(t);s.length===0?r(F([i>=c()?.duration?o:i])):(s[0]<i&&T({url:V().videoTimelineLog,method:"post",data:Le(s[0],i)}),o&&o>=c()?.duration?r(F([])):r(F([o])));}},ps=()=>{let e=a.dispatch,t=document.getElementById("video-area")?.getBoundingClientRect();t.height=t.width*9/16,t&&e(se(t));},ms=e=>{!l("isTouchScreen")&&e.target.nodeName!=="INPUT"&&Ne();};var M="pl-",Te=(...e)=>{let t=e.flat(1).filter(Boolean).join(" ").trim();if(!t)return "";let r=t?.split(/\s+/),s=new Set(r.filter(n=>n.startsWith(M)).map(n=>n.slice(M.length))),i=r.map(n=>n.startsWith(M)?n.slice(M.length):n);return (twMerge(i.join(" "))?.split(" ")).map(n=>s.has(n)?M+n:n).join(" ").trim()},ks=(e,t)=>{let r=t||{},s=l("isTouchScreen"),i=l("isFullScreen");return s?Te(e,r.touch,i?r.touchFullScreen:void 0):Te(e,r.desktop,i?r.desktopFullScreen:void 0)},xs=e=>{let t=l("isTouchScreen"),r=l("isFullScreen"),s;return t?s=r?e.touchFullScreen??e.touch:e.touch:s=r?e.desktopFullScreen??e.desktop:e.desktop,s},xe=e=>new Promise(t=>setTimeout(t,e*1e3)),v=()=>{let e=localStorage.getItem("hamrahiUUID");return e||(e=et(),localStorage.setItem("hamrahiUUID",e)),e.toString()},et=()=>{let e="xxxxxxxx-xxxx-Mxxx-Nxxx-x".replace(/[xMN]/g,t=>{let r;return t==="M"?r=Math.floor(1+Math.random()*5):t==="N"?r=Math.floor(8+Math.random()*4):r=Math.floor(Math.random()*16),r.toString(16)});return e+=Date.now().toString(16),e},k=()=>typeof window<"u"&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),W=()=>{let{isFullScreen:e}=a.getState().controller;return k()&&e},Me=()=>{let{isFullScreen:e}=a.getState().controller;return k()&&!e},R=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,I=e=>(e<10?"0":"")+e,Ts=e=>{let t=Math.floor(e/3600),r=Math.floor(e%3600/60),s=Math.floor(e%3600%60);return t<1?`${I(r)}:${I(s)}`:`${I(t)}:${I(r)}:${I(s)}`},Ms=e=>{let t=new URL(e),r=e;return t.search.length?r+=`&uuid=${v()}`:r+=`?uuid=${v()}`},Is=(e,t)=>{try{return [e.target.id,e.target.parentNode.id,e.target.parentNode.parentNode.id,e.target.parentNode.parentNode.parentNode.id,e.target.parentNode.parentNode.parentNode.parentNode.id].includes(t)}catch{return false}},Ds=e=>{let{params:t}=a.getState().videoData,r="";!t.id&&t.stream_link?r=t.stream_link:e==="mainPlayer"?r=a.getState().videoData.details.stream_link:r=a.getState().miniPlayer.details.stream_link;let s="";return r&&(s=r?.split("m3u8")[1]),s?s=`${s}&uuid=${v()}`:s=`?uuid=${v()}`,s},Fs=(e,t)=>{let r=document.getElementById(t),s=document.createElement("span");s.style.width=s.style.height="50px",s.style.left=`${e.touches[0].clientX-r.offsetLeft-25}px`,s.style.top=`${e.touches[0].clientY-r.offsetTop-25}px`,s.classList.add("pl-ripple");let i=r.getElementsByClassName("pl-ripple")[0];i&&i.remove(),r.appendChild(s);};var Vs=e=>e>=200&&e<300,Es=()=>{let e=a.dispatch;e(ae()),e(w$1()),e(pe()),e(x());},Rs=e=>{let t,r=[];for(t=0;t<e.length;t++)r[t]=e[t].weight+(r[t-1]||0);let s=Math.random()*r[r.length-1];for(t=0;t<r.length&&!(r[t]>s);t++);return e[t].domain},Us=e=>{let t=0;performance&&performance.getEntriesByType("navigation")&&(t=performance.getEntriesByType("navigation")[0].duration),e.current=t;},Bs=(e,t,r)=>{let s=t*window.devicePixelRatio,i=r*window.devicePixelRatio,o=[];return l("isTouchScreenPortrait")?o=e.filter(S=>Number(S?.split("x")[0].trim())<=s):o=e.filter(S=>Number(S?.split("x")[0].trim())<=i||Number(S?.split("x")[1].trim())<=s),o.indexOf(o[o.length-1])},j=(e,t)=>{let r={};for(let s in e){let i=t?`${t}_${s}`:s;typeof e[s]=="object"&&!Array.isArray(e[s])?r={...r,...j(e[s],i)}:r[i]=e[s];}return r},Os=e=>{let t={fa:1,en:2};return e.slice().sort((r,s)=>{let i=t[r.lang]||999,o=t[s.lang]||999;return i-o})},_s=e=>{let t;switch(e){case "fa":t="\u0641\u0627\u0631\u0633\u06CC";break;case "en":t="\u0627\u0646\u06AF\u0644\u06CC\u0633\u06CC";break;case "ar":t="\u0639\u0631\u0628\u06CC";break;case "tr":t="\u062A\u0631\u06A9\u06CC";break;}return t},Qs=e=>e?.split(/\r?\n|\r|\n/g),$s=e=>{if(e){let t=e.offsetLeft-e.offsetWidth/2,r=window.innerWidth-(e.offsetLeft+e.offsetWidth);if(t>=0&&r>=0)return "inViewport";if(t<0)return "OutViewPortFromLeft";if(r<0)return "OutViewPortFromRight"}};var Ks=e=>(e=e.replace(/\d{2}:\d{2}:\d{2}\.\d{3} --> \d{2}:\d{2}:\d{2}\.\d{3}.*\n/g,""),e=e.replace(/<[^>]+>/g,""),e=e.replace(/\n+/g,`
2
+ `),e=e.trim(),e),ue=process.env.NODE_ENV==="development",qs=e=>{let t=a.dispatch,{params:r}=a.getState().videoData;if(r.autoplay==="true"||r.advertisement){let s=e.play();t(f(true)),E(100,e),s!==void 0&&s.then(()=>{E(100,e);}).catch(()=>{E(0,e),t(x$1(true)),e.play();});}};var l=e=>{let{params:t,details:r,isValidAddress:s,isFetchDetails:i,isReady:o,rawSubtitles:S,subtitles:n,selectedSubtitle:f,markers:A,multiAudio:P,hiddenAd:d}=a.getState().videoData,{firstPlay:p,lock:m,canPlayVideo:g,manualQuality:C,activeElements:Ie,isLoading:De,isEnded:X,isAutoPlay:Fe,play:Ve,isFullScreen:Y,firstMute:G}=a.getState().controller,{settingPopover:J,speedPopover:Ee,qualityLevelsPopover:Re,markersListPopover:Ue}=a.getState().popovers,{settings:Z}=a.getState().user,U=a.getState().miniPlayer;switch(e){case "showHeader":return !p&&g;case "showMain":return !m||p;case "showFooter":return k()?g&&!p:g;case "showTouchVolumeBrightness":return !p&&W()&&!m&&!X;case "showBackwardForward":return !p&&!m;case "showTitle":return t.type!=="static"&&Y&&!m;case "showSettingPopover":return J;case "showSpeedPopover":return Ee;case "showQualityLevelsPopover":return Re;case "showSettingIcon":return !R();case "showBanner":return p&&(r.banner||t.banner);case "showProgressbar":return true;case "showPictureInPicture":return !R()&&!k();case "showSubtitle":return !!f;case "showMarkerListPopover":return Ue;case "hidePopovers":return !J;case "isLandscape":return window.innerHeight<=window.innerWidth;case "isTouchScreen":return k();case "isTouchScreenPortrait":return Me();case "isTouchScreenLandscape":return W();case "isActiveElements":return Ie;case "isPlay":return Ve;case "isPlayMiniPlayer":return U.play;case "isFirstPlay":return p;case "isLock":return m;case "isFirstMutePlay":return G;case "isIOS":return R();case "isLoading":return De;case "isStaticFormat":return t.type==="static";case "isEnded":return X;case "isAutoPlay":return Fe;case "isFullScreen":return Y;case "isValidAddress":return t.id?s:!!t.stream_link;case "isFetchDetails":return t.id?i:!!t.stream_link;case "isAutoQuality":return Z.quality===-1;case "isPressKeySpace":return !m;case "isPressKeyI":return !m&&!p;case "isPressKeyF":return !m&&!p||!!t.vhl_status;case "isPressKeyS":return !m&&!p;case "isPressKeyArrowRight":return !p&&!m;case "isPressKeyArrowLeft":return !p&&!m;case "isPressKeyM":return !p&&!m;case "isPressKeyC":return !m&&!p&&!!n&&n.length>0;case "isSendTimelineLog":return t.type!=="static";case "isReady":return o;case "isSelectedSubtitle":return !!n&&n.length>0&&f;case "isMiniPlayerAndMainPlayerSame":return t.id===U.params.id;case "isVideoHighLighter":return !!t.vhl_status;case "hasTitle":return r.title;case "hasBanner":return r.banner;case "streamLink":return r.stream_link||t.stream_link;case "hasManualQuality":return C!=null;case "hasSound":return !!Z.volume;case "hasAutoPlay":return t.autoplay==="true";case "hasFullScreenParams":return t.fullscreen==="true";case "hasOnFinishedParams":return !!t.onFinished;case "hasSubtitles":return !!n&&n.length>0;case "hasMultipleSubtitles":return !!n&&n.length>1;case "hasActiveCue":return f&&f.activeCues&&f.activeCues.length>0;case "hasOnPlayParams":return !!t.onPlay;case "hasOnPauseParams":return !!t.onPause;case "hasMiniPlayer":return U.params.id;case "hasCurrentTimeParams":return t.currentTime!==void 0;case "hasMarkers":return A.length!==0;case "hasSubtitlesInParams":return t.subtitles&&t.subtitles.length;case "hasOnChangeCurrentTime":return !!t.onChangeCurrentTime;case "hasMultiAudio":return P&&!!P.length;case "hasAdvertisement":return !!t.advertisement&&!!t.advertisement.videoUrl&&!d;case "hasActiveSubtitleInParams":return !!t.activeSubtitle;case "hasRawSubtitles":return !!S&&!!S.length;case "skeletonStatusInVhl":return t.vhl_status==="skeleton";case "getDetails":return !!t.type&&t.id;case "getMarkers":return String(t.type)==="vod"&&t.id&&i;case "canPlayVideo":return g;case "showSoundVolumeAlert":return G;case "setSubtitleFirstPlay":return (t.type==="vod"&&r.subtitles&&r.subtitles.length>0||t.type==="static"&&t.subtitles&&t.subtitles.length)&&!p;}};export{us as $,gr as A,a as Aa,hr as B,yr as C,Lr as D,kr as E,xr as F,H as G,Tr as H,Mr as I,Ir as J,Dr as K,Fr as L,Vr as M,Er as N,Rr as O,ke as P,T as Q,_t as R,Qt as S,O as T,$t as U,os as V,ns as W,Ze as X,E as Y,ls as Z,Ne as _,st as a,cs as aa,at as b,ds as ba,se as c,ps as ca,ot as d,ms as da,nt as e,ks as ea,F as f,xs as fa,lt as g,v as ga,ut as h,k as ha,ct as i,Ts as ia,dt as j,Ms as ja,pt as k,Is as ka,mt as l,Ds as la,gt as m,Fs as ma,ht as n,Vs as na,wt as o,Es as oa,At as p,Rs as pa,Lt as q,Us as qa,xt as r,Bs as ra,x as s,Os as sa,l as t,_s as ta,er as u,Qs as ua,V as v,$s as va,w,Ks as wa,c as x,qs as xa,b as y,de as ya,mr as z,Vt as za};//# sourceMappingURL=chunk-BC4366GN.mjs.map
3
+ //# sourceMappingURL=chunk-BC4366GN.mjs.map