cafe-video-player 3.0.13 → 3.0.14

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 (74) hide show
  1. package/{VideoHighLighter-OBD2IGA6.js → VideoHighLighter-DUJF47R3.js} +2 -2
  2. package/{VideoHighLighter-OBD2IGA6.js.map → VideoHighLighter-DUJF47R3.js.map} +1 -1
  3. package/{VideoHighLighter-T2LVURER.mjs → VideoHighLighter-ZDZ7LZVD.mjs} +2 -2
  4. package/{VideoHighLighter-T2LVURER.mjs.map → VideoHighLighter-ZDZ7LZVD.mjs.map} +1 -1
  5. package/{backwardForward-ZUVULGGJ.mjs → backwardForward-3X63XNNJ.mjs} +2 -2
  6. package/{backwardForward-ZUVULGGJ.mjs.map → backwardForward-3X63XNNJ.mjs.map} +1 -1
  7. package/{backwardForward-S6ZHVC75.js → backwardForward-HTLSZBXC.js} +2 -2
  8. package/{backwardForward-S6ZHVC75.js.map → backwardForward-HTLSZBXC.js.map} +1 -1
  9. package/chunk-3TPEXSZV.js +2 -0
  10. package/{chunk-ZWGZGWEB.js.map → chunk-3TPEXSZV.js.map} +1 -1
  11. package/chunk-5UGSCO4K.js +3 -0
  12. package/{chunk-BFE2RKVK.js.map → chunk-5UGSCO4K.js.map} +1 -1
  13. package/{chunk-4XKL6TLO.mjs → chunk-6LGS5W4B.mjs} +2 -2
  14. package/{chunk-4XKL6TLO.mjs.map → chunk-6LGS5W4B.mjs.map} +1 -1
  15. package/{chunk-WU4GN63P.mjs → chunk-B2LB3L3X.mjs} +2 -2
  16. package/{chunk-WU4GN63P.mjs.map → chunk-B2LB3L3X.mjs.map} +1 -1
  17. package/{chunk-SKRDEKL2.mjs → chunk-EPUUJE7V.mjs} +4 -4
  18. package/{chunk-SKRDEKL2.mjs.map → chunk-EPUUJE7V.mjs.map} +1 -1
  19. package/{chunk-CCO6GDG2.mjs → chunk-HOAJ3EFI.mjs} +3 -3
  20. package/{chunk-CCO6GDG2.mjs.map → chunk-HOAJ3EFI.mjs.map} +1 -1
  21. package/chunk-HZASW2B2.js +2 -0
  22. package/{chunk-DJ6KVZRK.js.map → chunk-HZASW2B2.js.map} +1 -1
  23. package/{chunk-OGCKLRYP.js → chunk-ISVY5ION.js} +2 -2
  24. package/{chunk-OGCKLRYP.js.map → chunk-ISVY5ION.js.map} +1 -1
  25. package/{chunk-IBV5SFIT.js → chunk-K4YPVDEE.js} +2 -2
  26. package/{chunk-IBV5SFIT.js.map → chunk-K4YPVDEE.js.map} +1 -1
  27. package/{chunk-QM3W7EYS.js → chunk-KSZ35TPK.js} +2 -2
  28. package/{chunk-QM3W7EYS.js.map → chunk-KSZ35TPK.js.map} +1 -1
  29. package/{chunk-WFHA2FPC.js → chunk-MVNOUM3G.js} +5 -5
  30. package/{chunk-WFHA2FPC.js.map → chunk-MVNOUM3G.js.map} +1 -1
  31. package/{chunk-BC4366GN.mjs → chunk-NLCBOGTI.mjs} +2 -2
  32. package/{chunk-BC4366GN.mjs.map → chunk-NLCBOGTI.mjs.map} +1 -1
  33. package/{chunk-Y7BIYTQP.mjs → chunk-P46UX5ND.mjs} +2 -2
  34. package/{chunk-Y7BIYTQP.mjs.map → chunk-P46UX5ND.mjs.map} +1 -1
  35. package/{chunk-GYUGYOVP.mjs → chunk-P4O3IKAQ.mjs} +2 -2
  36. package/{chunk-GYUGYOVP.mjs.map → chunk-P4O3IKAQ.mjs.map} +1 -1
  37. package/{chunk-73KLK4QU.mjs → chunk-QFADUEGX.mjs} +2 -2
  38. package/{chunk-73KLK4QU.mjs.map → chunk-QFADUEGX.mjs.map} +1 -1
  39. package/{chunk-PKXJEXKI.mjs → chunk-UL5LQB3G.mjs} +2 -2
  40. package/{chunk-PKXJEXKI.mjs.map → chunk-UL5LQB3G.mjs.map} +1 -1
  41. package/{chunk-U3VFRU6R.js → chunk-VUHZVVMS.js} +2 -2
  42. package/{chunk-U3VFRU6R.js.map → chunk-VUHZVVMS.js.map} +1 -1
  43. package/{chunk-ZSSCZTW3.js → chunk-W5NVHMWX.js} +2 -2
  44. package/{chunk-ZSSCZTW3.js.map → chunk-W5NVHMWX.js.map} +1 -1
  45. package/index.js +1 -1
  46. package/index.mjs +1 -1
  47. package/{nonStaticVideoTag-6OHMSJEH.js → nonStaticVideoTag-5HEUBWAN.js} +2 -2
  48. package/{nonStaticVideoTag-6OHMSJEH.js.map → nonStaticVideoTag-5HEUBWAN.js.map} +1 -1
  49. package/{nonStaticVideoTag-J6JNATM6.mjs → nonStaticVideoTag-P47FI6UV.mjs} +2 -2
  50. package/{nonStaticVideoTag-J6JNATM6.mjs.map → nonStaticVideoTag-P47FI6UV.mjs.map} +1 -1
  51. package/package.json +1 -1
  52. package/staticPlayer-7LS2DPUR.js +2 -0
  53. package/{staticPlayer-TNS4JFRP.js.map → staticPlayer-7LS2DPUR.js.map} +1 -1
  54. package/{staticPlayer-2IO6XEKM.mjs → staticPlayer-J7Q3JXQ2.mjs} +2 -2
  55. package/{staticPlayer-2IO6XEKM.mjs.map → staticPlayer-J7Q3JXQ2.mjs.map} +1 -1
  56. package/{staticVideoTag-2YYZBRPY.mjs → staticVideoTag-JOPHGL3R.mjs} +2 -2
  57. package/{staticVideoTag-2YYZBRPY.mjs.map → staticVideoTag-JOPHGL3R.mjs.map} +1 -1
  58. package/{staticVideoTag-VLNCYNKV.js → staticVideoTag-OZZU5MWF.js} +2 -2
  59. package/{staticVideoTag-VLNCYNKV.js.map → staticVideoTag-OZZU5MWF.js.map} +1 -1
  60. package/videoArea-BVYEZUSL.mjs +2 -0
  61. package/{videoArea-2F2NDD76.mjs.map → videoArea-BVYEZUSL.mjs.map} +1 -1
  62. package/videoArea-M6ZAWJQW.js +2 -0
  63. package/{videoArea-35ABV3CM.js.map → videoArea-M6ZAWJQW.js.map} +1 -1
  64. package/videoPlayerStyles.css +4 -4
  65. package/{vodPlayer-337TYSU4.js → vodPlayer-B5JRKEU3.js} +2 -2
  66. package/{vodPlayer-337TYSU4.js.map → vodPlayer-B5JRKEU3.js.map} +1 -1
  67. package/{vodPlayer-JTS4WVOB.mjs → vodPlayer-GQETGYFT.mjs} +2 -2
  68. package/{vodPlayer-JTS4WVOB.mjs.map → vodPlayer-GQETGYFT.mjs.map} +1 -1
  69. package/chunk-BFE2RKVK.js +0 -3
  70. package/chunk-DJ6KVZRK.js +0 -2
  71. package/chunk-ZWGZGWEB.js +0 -2
  72. package/staticPlayer-TNS4JFRP.js +0 -2
  73. package/videoArea-2F2NDD76.mjs +0 -2
  74. package/videoArea-35ABV3CM.js +0 -2
@@ -1,2 +1,2 @@
1
- import {a as a$1}from'./chunk-WU4GN63P.mjs';import {a}from'./chunk-XKRBXZUB.mjs';import {fa,ea,t,Y,X,V}from'./chunk-BC4366GN.mjs';import {e,A}from'./chunk-4QMWBTB5.mjs';import z from'next/image';import {jsxs,jsx}from'react/jsx-runtime';import {shallowEqual}from'react-redux';import {useState}from'react';e();var E=({className:s})=>jsxs("div",{className:ea(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${s}`,{desktop:"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] ",desktopFullScreen:"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]",touch:"pl-gap-1.5 pl-h-6 pl-px-2",touchFullScreen:"pl-gap-2 pl-h-[36px] pl-px-2"}),children:[jsx(z,{alt:"mute",width:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),height:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),src:a.mute2,className:"pl-cursor-pointer"}),jsx("p",{className:ea("pl-font-medium pl-whitespace-nowrap pl-text-black",{desktopFullScreen:"pl-text-[14px]",desktop:"pl-text-[12px]",touch:"pl-text-[10px]",touchFullScreen:"pl-text-[12px]"}),children:"\u0628\u0631\u0627\u06CC \u067E\u062E\u0634 \u0635\u062F\u0627 \u0631\u0648\u06CC \u0648\u06CC\u062F\u06CC\u0648 \u0628\u0632\u0646\u06CC\u062F"})]}),q=E;e();var T=()=>jsx("div",{className:"pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden",children:jsx("div",{className:ea("loader-spinner",{desktop:"loader-spinner-desktop",desktopFullScreen:"loader-spinner-fullscreen",touch:"loader-spinner-touch",touchFullScreen:"loader-spinner-touchFullscreen"})})}),j=T;e();var D=({width:s,height:F,disableTooltip:n,disableScale:w,className:y,inverse:N,normalStyle:r})=>{let{firstMute:M}=A(({controller:{play:e,firstMute:a}})=>({play:e,firstMute:a}),shallowEqual);A(({videoData:{videoElementSizeInfo:e,params:a}})=>({videoElementSizeInfo:e,params:a}),shallowEqual);let[C,m]=useState(false),i=N?!t("isPlay"):t("isPlay");return jsxs("div",{onClick:e=>{M?(Y(50),X()):V(e);},onDoubleClick:e=>e.stopPropagation(),onMouseOver:n?void 0:()=>!t("isTouchScreen")&&m(true),onMouseLeave:n?void 0:()=>!t("isTouchScreen")&&m(false),onContextMenu:e=>e.preventDefault(),className:ea(`pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${r?"":"pl-bg-black/75 pl-rounded-full pl-group"} ${y}`,r?void 0:{desktop:"pl-size-[34px]",desktopFullScreen:"pl-size-[48px]"}),children:[jsx("div",{className:ea(`pl-flex pl-items-center pl-justify-center pl-transition-all ${r?"":"pl-rounded-full group-hover:pl-bg-[#5E5E5E]"}`,r?void 0:{desktop:"pl-size-[26px]",desktopFullScreen:"pl-size-[36px]"}),children:jsx(z,{alt:"",src:i?a.bigPause:a.bigPlay,width:s,height:F,className:`pl-transition-transform pl-ease-in-out ${i?"pl-big-play-icon":"pl-big-pause-icon"} ${!t("isTouchScreen")&&!w&&"hover:pl-"}`})}),C&&!n&&jsx(a$1,{className:"pl-left-0",title:i?"\u067E\u062E\u0634 (K)":"\u062A\u0648\u0642\u0641 (K)"})]})},se=D;export{j as a,se as b,q as c};//# sourceMappingURL=chunk-Y7BIYTQP.mjs.map
2
- //# sourceMappingURL=chunk-Y7BIYTQP.mjs.map
1
+ import {a as a$1}from'./chunk-B2LB3L3X.mjs';import {a}from'./chunk-XKRBXZUB.mjs';import {fa,ea,t,Y,X,V}from'./chunk-NLCBOGTI.mjs';import {e,A}from'./chunk-4QMWBTB5.mjs';import z from'next/image';import {jsxs,jsx}from'react/jsx-runtime';import {shallowEqual}from'react-redux';import {useState}from'react';e();var E=({className:s})=>jsxs("div",{className:ea(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${s}`,{desktop:"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] ",desktopFullScreen:"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]",touch:"pl-gap-1.5 pl-h-6 pl-px-2",touchFullScreen:"pl-gap-2 pl-h-[36px] pl-px-2"}),children:[jsx(z,{alt:"mute",width:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),height:fa({desktop:24,desktopFullScreen:32,touch:16,touchFullScreen:24}),src:a.mute2,className:"pl-cursor-pointer"}),jsx("p",{className:ea("pl-font-medium pl-whitespace-nowrap pl-text-black",{desktopFullScreen:"pl-text-[14px]",desktop:"pl-text-[12px]",touch:"pl-text-[10px]",touchFullScreen:"pl-text-[12px]"}),children:"\u0628\u0631\u0627\u06CC \u067E\u062E\u0634 \u0635\u062F\u0627 \u0631\u0648\u06CC \u0648\u06CC\u062F\u06CC\u0648 \u0628\u0632\u0646\u06CC\u062F"})]}),q=E;e();var T=()=>jsx("div",{className:"pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden",children:jsx("div",{className:ea("loader-spinner",{desktop:"loader-spinner-desktop",desktopFullScreen:"loader-spinner-fullscreen",touch:"loader-spinner-touch",touchFullScreen:"loader-spinner-touchFullscreen"})})}),j=T;e();var D=({width:s,height:F,disableTooltip:n,disableScale:w,className:y,inverse:N,normalStyle:r})=>{let{firstMute:M}=A(({controller:{play:e,firstMute:a}})=>({play:e,firstMute:a}),shallowEqual);A(({videoData:{videoElementSizeInfo:e,params:a}})=>({videoElementSizeInfo:e,params:a}),shallowEqual);let[C,m]=useState(false),i=N?!t("isPlay"):t("isPlay");return jsxs("div",{onClick:e=>{M?(Y(50),X()):V(e);},onDoubleClick:e=>e.stopPropagation(),onMouseOver:n?void 0:()=>!t("isTouchScreen")&&m(true),onMouseLeave:n?void 0:()=>!t("isTouchScreen")&&m(false),onContextMenu:e=>e.preventDefault(),className:ea(`pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${r?"":"pl-bg-black/75 pl-rounded-full pl-group"} ${y}`,r?void 0:{desktop:"pl-size-[34px]",desktopFullScreen:"pl-size-[48px]"}),children:[jsx("div",{className:ea(`pl-flex pl-items-center pl-justify-center pl-transition-all ${r?"":"pl-rounded-full group-hover:pl-bg-[#5E5E5E]"}`,r?void 0:{desktop:"pl-size-[26px]",desktopFullScreen:"pl-size-[36px]"}),children:jsx(z,{alt:"",src:i?a.bigPause:a.bigPlay,width:s,height:F,className:`pl-transition-transform pl-ease-in-out ${i?"pl-big-play-icon":"pl-big-pause-icon"} ${!t("isTouchScreen")&&!w&&"hover:pl-"}`})}),C&&!n&&jsx(a$1,{className:"pl-left-0",title:i?"\u067E\u062E\u0634 (K)":"\u062A\u0648\u0642\u0641 (K)"})]})},se=D;export{j as a,se as b,q as c};//# sourceMappingURL=chunk-P46UX5ND.mjs.map
2
+ //# sourceMappingURL=chunk-P46UX5ND.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolumeAlert/SoundVolumeAlert.tsx","../src/videoPlayerLibrary/components/custom-components/loader/loader.tsx","../src/videoPlayerLibrary/components/custom-components/playPause/playPause.tsx"],"names":["init_esm_shims","SoundVolumeAlert","className","jsxs","tw","jsx","Image","styleMerge","importImages_default","SoundVolumeAlert_default","Loader","loader_default","PlayPause","width","height","disableTooltip","disableScale","inverse","normalStyle","firstMute","useAppSelector","play","shallowEqual","videoElementSizeInfo","params","showTooltip","setShowTooltip","useState","isPlay","conditions","event","handleChangeSoundVolume","firstUnMuteHandler","handlePlayPause","controllbarTooltip_default","playPause_default"],"mappings":"gTAAAA,CAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAmB,CAAC,CAAE,SAAA,CAAAC,CAAU,CAAA,GAElCC,IAAAA,CAAC,OACC,SAAA,CAAWC,EAAAA,CAAG,CAAA,uEAAA,EAA0EF,CAAS,GAAI,CACnG,OAAA,CAAS,6EACT,iBAAA,CAAmB,+CAAA,CACnB,MAAO,2BAAA,CACP,eAAA,CAAiB,8BACnB,CAAC,EAED,QAAA,CAAA,CAAAG,GAAAA,CAACC,EAAA,CACC,GAAA,CAAI,OACJ,KAAA,CAAOC,EAAAA,CAAW,CAAE,OAAA,CAAS,GAAI,iBAAA,CAAmB,EAAA,CAAI,MAAO,EAAA,CAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACxF,MAAA,CAAQA,EAAAA,CAAW,CAAE,OAAA,CAAS,EAAA,CAAI,kBAAmB,EAAA,CAAI,KAAA,CAAO,GAAI,eAAA,CAAiB,EAAG,CAAC,CAAA,CACzF,IAAKC,CAAAA,CAAO,KAAA,CACZ,UAAW,mBAAA,CACb,CAAA,CACAH,IAAC,GAAA,CAAA,CACC,SAAA,CAAWD,EAAAA,CAAG,mDAAA,CAAqD,CACjE,iBAAA,CAAmB,gBAAA,CACnB,QAAS,gBAAA,CACT,KAAA,CAAO,iBACP,eAAA,CAAiB,gBACnB,CAAC,CAAA,CACF,2JAED,CAAA,CAAA,CACF,CAAA,CAIGK,EAAQR,ECnCfD,CAAAA,EAAAA,CAEA,IAAMU,CAAAA,CAAS,IAEXL,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAW,oHAAA,CACd,QAAA,CAAAA,IAAC,KAAA,CAAA,CACC,SAAA,CAAWD,EAAAA,CAAG,gBAAA,CAAkB,CAC9B,OAAA,CAAS,wBAAA,CACT,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AAe,IAAI,CAAA,CAC/G,YAAA,CAAcX,CAAAA,CAAiB,OAAY,IAAM,CAACc,iBAAsC,CAAA,EAAKH,CAAAA,CAAe,KAAK,CAAA,CACjH,aAAA,CAAgBI,CAAAA,EAAUA,CAAAA,CAAM,gBAAe,CAC/C,SAAA,CAAW1B,GACT,CAAA,2EAAA,EACEc,CAAAA,CAAc,GAAK,2CACrB,CAAA,CAAA,EAAIhB,CAAS,CAAA,CAAA,CACbgB,EAAc,MAAA,CAAY,CAAE,QAAS,gBAAA,CAAkB,iBAAA,CAAmB,gBAAiB,CAC7F,CAAA,CAEA,QAAA,CAAA,CAAAb,GAAAA,CAAC,OACC,SAAA,CAAWD,EAAAA,CACT,+DAA+Dc,CAAAA,CAAc,EAAA,CAAK,6CAA6C,CAAA,CAAA,CAC/HA,CAAAA,CACI,MAAA,CACA,CACE,QAAS,gBAAA,CACT,iBAAA,CAAmB,gBACrB,CACN,CAAA,CAEA,SAAAb,GAAAA,CAACC,CAAAA,CAAA,CACC,GAAA,CAAI,GACJ,GAAA,CAAKsB,CAAAA,CAASpB,EAAO,QAAA,CAAWA,CAAAA,CAAO,QACvC,KAAA,CAAOK,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACR,UAAW,CAAA,uCAAA,EAA0Cc,CAAAA,CAAS,mBAAqB,mBAAmB,CAAA,CAAA,EACpG,CAACC,CAAAA,CAAAA,eAAsC,CAAA,EAAK,CAACb,CAAAA,EAAgB,WAC/D,CAAA,CAAA,CACF,CAAA,CACF,EAECS,CAAAA,EAAe,CAACV,GAAkBV,GAAAA,CAAC6B,GAAAA,CAAA,CAAmB,SAAA,CAAU,WAAA,CAAY,MAAON,CAAAA,CAAS,wBAAA,CAAY,+BAAY,CAAA,CAAA,CACvH,CAEJ,EAEOO,EAAAA,CAAQvB","file":"chunk-Y7BIYTQP.mjs","sourcesContent":["import Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { styleMerge, tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolumeAlert = ({ className }: { className?: string }) => {\r\n return (\r\n <div\r\n className={tw(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${className}`, {\r\n desktop: \"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] \",\r\n desktopFullScreen: \"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]\",\r\n touch: \"pl-gap-1.5 pl-h-6 pl-px-2\",\r\n touchFullScreen: \"pl-gap-2 pl-h-[36px] pl-px-2\",\r\n })}\r\n >\r\n <Image\r\n alt=\"mute\"\r\n width={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n height={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n src={IMAGES.mute2}\r\n className={\"pl-cursor-pointer\"}\r\n />\r\n <p\r\n className={tw(\"pl-font-medium pl-whitespace-nowrap pl-text-black\", {\r\n desktopFullScreen: \"pl-text-[14px]\",\r\n desktop: \"pl-text-[12px]\",\r\n touch: \"pl-text-[10px]\",\r\n touchFullScreen: \"pl-text-[12px]\",\r\n })}\r\n >\r\n برای پخش صدا روی ویدیو بزنید\r\n </p>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolumeAlert;\r\n","import { tw } from \"../../../helpers/helpers\";\n\nconst Loader = () => {\n return (\n <div className={`pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden`}>\n <div\n className={tw(\"loader-spinner\", {\n desktop: \"loader-spinner-desktop\",\n desktopFullScreen: \"loader-spinner-fullscreen\",\n touch: \"loader-spinner-touch\",\n touchFullScreen: \"loader-spinner-touchFullscreen\",\n })}\n ></div>\n </div>\n );\n};\n\nexport default Loader;\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { firstUnMuteHandler, handleChangeSoundVolume, handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useState } from \"react\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\ninterface PlayPauseProps {\r\n width?: number;\r\n height?: number;\r\n disableTooltip?: boolean;\r\n disableScale?: boolean;\r\n className?: string;\r\n normalStyle?: boolean;\r\n inverse?: boolean;\r\n}\r\n\r\nconst PlayPause: React.FC<PlayPauseProps> = ({ width, height, disableTooltip, disableScale, className, inverse, normalStyle }) => {\r\n const { firstMute } = useAppSelector(({ controller: { play, firstMute } }) => ({ play, firstMute }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const isPlay = inverse ? !conditions(ConditionName.isPlay) : conditions(ConditionName.isPlay);\r\n\r\n return (\r\n <div\r\n onClick={(event: any) => {\r\n if (firstMute) {\r\n handleChangeSoundVolume(50);\r\n firstUnMuteHandler();\r\n } else handlePlayPause(event);\r\n }}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onContextMenu={(event) => event.preventDefault()}\r\n className={tw(\r\n `pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${\r\n normalStyle ? \"\" : \"pl-bg-black/75 pl-rounded-full pl-group\"\r\n } ${className}`,\r\n normalStyle ? undefined : { desktop: \"pl-size-[34px]\", desktopFullScreen: \"pl-size-[48px]\" }\r\n )}\r\n >\r\n <div\r\n className={tw(\r\n `pl-flex pl-items-center pl-justify-center pl-transition-all ${normalStyle ? \"\" : \"pl-rounded-full group-hover:pl-bg-[#5E5E5E]\"}`,\r\n normalStyle\r\n ? undefined\r\n : {\r\n desktop: \"pl-size-[26px]\",\r\n desktopFullScreen: \"pl-size-[36px]\",\r\n }\r\n )}\r\n >\r\n <Image\r\n alt=\"\"\r\n src={isPlay ? IMAGES.bigPause : IMAGES.bigPlay}\r\n width={width}\r\n height={height}\r\n className={`pl-transition-transform pl-ease-in-out ${isPlay ? \"pl-big-play-icon\" : \"pl-big-pause-icon\"} ${\r\n !conditions(ConditionName.isTouchScreen) && !disableScale && \"hover:pl-\"\r\n }`}\r\n />\r\n </div>\r\n\r\n {showTooltip && !disableTooltip && <ControllbarTooltip className=\"pl-left-0\" title={isPlay ? \"پخش (K)\" : \"توقف (K)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default PlayPause;\r\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/components/custom-components/soundVolumeAlert/SoundVolumeAlert.tsx","../src/videoPlayerLibrary/components/custom-components/loader/loader.tsx","../src/videoPlayerLibrary/components/custom-components/playPause/playPause.tsx"],"names":["init_esm_shims","SoundVolumeAlert","className","jsxs","tw","jsx","Image","styleMerge","importImages_default","SoundVolumeAlert_default","Loader","loader_default","PlayPause","width","height","disableTooltip","disableScale","inverse","normalStyle","firstMute","useAppSelector","play","shallowEqual","videoElementSizeInfo","params","showTooltip","setShowTooltip","useState","isPlay","conditions","event","handleChangeSoundVolume","firstUnMuteHandler","handlePlayPause","controllbarTooltip_default","playPause_default"],"mappings":"gTAAAA,CAAAA,EAAAA,CAIA,IAAMC,CAAAA,CAAmB,CAAC,CAAE,SAAA,CAAAC,CAAU,CAAA,GAElCC,IAAAA,CAAC,OACC,SAAA,CAAWC,EAAAA,CAAG,CAAA,uEAAA,EAA0EF,CAAS,GAAI,CACnG,OAAA,CAAS,6EACT,iBAAA,CAAmB,+CAAA,CACnB,MAAO,2BAA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QAAA,CAAA,CAAAb,GAAAA,CAAC,OACC,SAAA,CAAWD,EAAAA,CACT,+DAA+Dc,CAAAA,CAAc,EAAA,CAAK,6CAA6C,CAAA,CAAA,CAC/HA,CAAAA,CACI,MAAA,CACA,CACE,QAAS,gBAAA,CACT,iBAAA,CAAmB,gBACrB,CACN,CAAA,CAEA,SAAAb,GAAAA,CAACC,CAAAA,CAAA,CACC,GAAA,CAAI,GACJ,GAAA,CAAKsB,CAAAA,CAASpB,EAAO,QAAA,CAAWA,CAAAA,CAAO,QACvC,KAAA,CAAOK,CAAAA,CACP,MAAA,CAAQC,CAAAA,CACR,UAAW,CAAA,uCAAA,EAA0Cc,CAAAA,CAAS,mBAAqB,mBAAmB,CAAA,CAAA,EACpG,CAACC,CAAAA,CAAAA,eAAsC,CAAA,EAAK,CAACb,CAAAA,EAAgB,WAC/D,CAAA,CAAA,CACF,CAAA,CACF,EAECS,CAAAA,EAAe,CAACV,GAAkBV,GAAAA,CAAC6B,GAAAA,CAAA,CAAmB,SAAA,CAAU,WAAA,CAAY,MAAON,CAAAA,CAAS,wBAAA,CAAY,+BAAY,CAAA,CAAA,CACvH,CAEJ,EAEOO,EAAAA,CAAQvB","file":"chunk-P46UX5ND.mjs","sourcesContent":["import Image from \"next/image\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { styleMerge, tw } from \"../../../helpers/helpers\";\r\n\r\nconst SoundVolumeAlert = ({ className }: { className?: string }) => {\r\n return (\r\n <div\r\n className={tw(`pl-cursor-default pl-flex pl-items-center pl-bg-white pl-rounded-[4px] ${className}`, {\r\n desktop: \"pl-gap-2 pl-absolute pl-z-10 pl-h-9 pl-px-2 pl-top-[28px] pl-right-[18px] \",\r\n desktopFullScreen: \"pl-h-12 pl-px-3 pl-top-[46px] pl-right-[29px]\",\r\n touch: \"pl-gap-1.5 pl-h-6 pl-px-2\",\r\n touchFullScreen: \"pl-gap-2 pl-h-[36px] pl-px-2\",\r\n })}\r\n >\r\n <Image\r\n alt=\"mute\"\r\n width={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n height={styleMerge({ desktop: 24, desktopFullScreen: 32, touch: 16, touchFullScreen: 24 })}\r\n src={IMAGES.mute2}\r\n className={\"pl-cursor-pointer\"}\r\n />\r\n <p\r\n className={tw(\"pl-font-medium pl-whitespace-nowrap pl-text-black\", {\r\n desktopFullScreen: \"pl-text-[14px]\",\r\n desktop: \"pl-text-[12px]\",\r\n touch: \"pl-text-[10px]\",\r\n touchFullScreen: \"pl-text-[12px]\",\r\n })}\r\n >\r\n برای پخش صدا روی ویدیو بزنید\r\n </p>\r\n </div>\r\n );\r\n};\r\n\r\nexport default SoundVolumeAlert;\r\n","import { tw } from \"../../../helpers/helpers\";\n\nconst Loader = () => {\n return (\n <div className={`pl-absolute pl-inset-0 pl-rounded-[12px] pl-flex pl-items-center pl-justify-center pl-size-full pl-overflow-hidden`}>\n <div\n className={tw(\"loader-spinner\", {\n desktop: \"loader-spinner-desktop\",\n desktopFullScreen: \"loader-spinner-fullscreen\",\n touch: \"loader-spinner-touch\",\n touchFullScreen: \"loader-spinner-touchFullscreen\",\n })}\n ></div>\n </div>\n );\n};\n\nexport default Loader;\n","import { shallowEqual } from \"react-redux\";\r\nimport { useAppSelector } from \"../../../helpers/redux/hooks\";\r\nimport { conditions } from \"../../../helpers/conditions/conditions\";\r\nimport { ConditionName } from \"../../../helpers/interfaces/enums\";\r\nimport IMAGES from \"../../../images/importImages\";\r\nimport { firstUnMuteHandler, handleChangeSoundVolume, handlePlayPause } from \"../../../helpers/redux/actions/controller.actions\";\r\nimport Image from \"next/image\";\r\nimport ControllbarTooltip from \"../footer/controllbar/controllbarTooltip\";\r\nimport { useState } from \"react\";\r\nimport { tw } from \"../../../helpers/helpers\";\r\n\r\ninterface PlayPauseProps {\r\n width?: number;\r\n height?: number;\r\n disableTooltip?: boolean;\r\n disableScale?: boolean;\r\n className?: string;\r\n normalStyle?: boolean;\r\n inverse?: boolean;\r\n}\r\n\r\nconst PlayPause: React.FC<PlayPauseProps> = ({ width, height, disableTooltip, disableScale, className, inverse, normalStyle }) => {\r\n const { firstMute } = useAppSelector(({ controller: { play, firstMute } }) => ({ play, firstMute }), shallowEqual);\r\n useAppSelector(({ videoData: { videoElementSizeInfo, params } }) => ({ videoElementSizeInfo, params }), shallowEqual);\r\n\r\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n const isPlay = inverse ? !conditions(ConditionName.isPlay) : conditions(ConditionName.isPlay);\r\n\r\n return (\r\n <div\r\n onClick={(event: any) => {\r\n if (firstMute) {\r\n handleChangeSoundVolume(50);\r\n firstUnMuteHandler();\r\n } else handlePlayPause(event);\r\n }}\r\n onDoubleClick={(event: any) => event.stopPropagation()}\r\n onMouseOver={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n onMouseLeave={disableTooltip ? undefined : () => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n onContextMenu={(event) => event.preventDefault()}\r\n className={tw(\r\n `pl-relative pl-flex pl-items-center pl-justify-center pl-cursor-pointer ${\r\n normalStyle ? \"\" : \"pl-bg-black/75 pl-rounded-full pl-group\"\r\n } ${className}`,\r\n normalStyle ? undefined : { desktop: \"pl-size-[34px]\", desktopFullScreen: \"pl-size-[48px]\" }\r\n )}\r\n >\r\n <div\r\n className={tw(\r\n `pl-flex pl-items-center pl-justify-center pl-transition-all ${normalStyle ? \"\" : \"pl-rounded-full group-hover:pl-bg-[#5E5E5E]\"}`,\r\n normalStyle\r\n ? undefined\r\n : {\r\n desktop: \"pl-size-[26px]\",\r\n desktopFullScreen: \"pl-size-[36px]\",\r\n }\r\n )}\r\n >\r\n <Image\r\n alt=\"\"\r\n src={isPlay ? IMAGES.bigPause : IMAGES.bigPlay}\r\n width={width}\r\n height={height}\r\n className={`pl-transition-transform pl-ease-in-out ${isPlay ? \"pl-big-play-icon\" : \"pl-big-pause-icon\"} ${\r\n !conditions(ConditionName.isTouchScreen) && !disableScale && \"hover:pl-\"\r\n }`}\r\n />\r\n </div>\r\n\r\n {showTooltip && !disableTooltip && <ControllbarTooltip className=\"pl-left-0\" title={isPlay ? \"پخش (K)\" : \"توقف (K)\"} />}\r\n </div>\r\n );\r\n};\r\n\r\nexport default PlayPause;\r\n"]}
@@ -1,2 +1,2 @@
1
- import {Aa,ca,w,G}from'./chunk-BC4366GN.mjs';import {e,z as z$1,A,m}from'./chunk-4QMWBTB5.mjs';import {useEffect}from'react';import {shallowEqual}from'react-redux';e();var p=()=>{let t=z$1();A(({videoData:{params:e}})=>({params:e}),shallowEqual),useEffect(()=>{let e=()=>{let l=document.fullscreenElement,{params:f}=Aa.getState().videoData;f.onFullscreenChange?.(!!l),l?t(m(true)):(t(m(false)),ca(),w(G("exitFullScreen")),document.body.style.overflow="auto");};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",e,false),document.addEventListener("mozfullscreenchange",e,false),document.addEventListener("fullscreenchange",e,false),document.addEventListener("MSFullscreenChange",e,false));},[]);},z=p;export{z as a};//# sourceMappingURL=chunk-GYUGYOVP.mjs.map
2
- //# sourceMappingURL=chunk-GYUGYOVP.mjs.map
1
+ import {Aa,ca,w,G}from'./chunk-NLCBOGTI.mjs';import {e,z as z$1,A,m}from'./chunk-4QMWBTB5.mjs';import {useEffect}from'react';import {shallowEqual}from'react-redux';e();var p=()=>{let t=z$1();A(({videoData:{params:e}})=>({params:e}),shallowEqual),useEffect(()=>{let e=()=>{let l=document.fullscreenElement,{params:f}=Aa.getState().videoData;f.onFullscreenChange?.(!!l),l?t(m(true)):(t(m(false)),ca(),w(G("exitFullScreen")),document.body.style.overflow="auto");};document.addEventListener&&(document.addEventListener("webkitfullscreenchange",e,false),document.addEventListener("mozfullscreenchange",e,false),document.addEventListener("fullscreenchange",e,false),document.addEventListener("MSFullscreenChange",e,false));},[]);},z=p;export{z as a};//# sourceMappingURL=chunk-P4O3IKAQ.mjs.map
2
+ //# sourceMappingURL=chunk-P4O3IKAQ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useFullScreen.tsx"],"names":["init_esm_shims","useFullScreen","dispatch","useAppDispatch","useAppSelector","params","shallowEqual","useEffect","handleChangeFullScreen","isFullScreen","store_default","setIsFullScreen","handleVideoElementSizeInfo","sendFluentLog","fullscreenLog","useFullScreen_default"],"mappings":"oKAAAA,CAAAA,EAAAA,CASA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,IAAMC,CAAAA,CAAWC,GAAAA,EAAe,CAChCC,CAAAA,CAAe,CAAC,CAAE,UAAW,CAAE,MAAA,CAAAC,CAAO,CAAE,CAAA,IAAO,CAAE,OAAAA,CAAO,CAAA,CAAA,CAAIC,YAAY,CAAA,CAGxEC,SAAAA,CAAU,IAAM,CACd,IAAMC,CAAAA,CAAyB,IAAM,CACnC,IAAMC,CAAAA,CAAe,SAAS,iBAAA,CACxB,CAAE,MAAA,CAAAJ,CAAO,CAAA,CAAIK,EAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CACpCL,CAAAA,CAAO,kBAAA,GAAqB,CAAC,CAACI,CAAY,EAEtCA,CAAAA,CAAcP,CAAAA,CAASS,CAAAA,CAAgB,IAAI,CAAC,CAAA,EAE9CT,EAASS,CAAAA,CAAgB,KAAK,CAAC,CAAA,CAC/BC,EAAAA,EAA2B,CAC3BC,EAAcC,CAAAA,CAAc,gBAAgB,CAAC,CAAA,CAC7C,QAAA,CAAS,IAAA,CAAK,KAAA,CAAM,QAAA,CAAW,MAAA,EAEnC,CAAA,CAEI,QAAA,CAAS,gBAAA,GACX,QAAA,CAAS,gBAAA,CAAiB,yBAA0BN,CAAAA,CAAwB,KAAK,CAAA,CACjF,QAAA,CAAS,gBAAA,CAAiB,qBAAA,CAAuBA,EAAwB,KAAK,CAAA,CAC9E,QAAA,CAAS,gBAAA,CAAiB,kBAAA,CAAoBA,CAAAA,CAAwB,KAAK,CAAA,CAC3E,QAAA,CAAS,gBAAA,CAAiB,oBAAA,CAAsBA,CAAAA,CAAwB,KAAK,CAAA,EASjF,CAAA,CAAG,EAAE,EACP,CAAA,CAEOO,CAAAA,CAAQd","file":"chunk-GYUGYOVP.mjs","sourcesContent":["import { useEffect } from \"react\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\nimport { setIsFullScreen } from \"../redux/slices/controllerSlice\";\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\nimport { fullscreenLog } from \"../logs/logs\";\nimport { sendFluentLog } from \"../logs/fluentdLogger\";\nimport store from \"../redux/store\";\n\nconst useFullScreen = () => {\n const dispatch = useAppDispatch();\n useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const handleChangeFullScreen = () => {\n const isFullScreen = document.fullscreenElement;\n const { params } = store.getState().videoData;\n params.onFullscreenChange?.(!!isFullScreen);\n\n if (isFullScreen) dispatch(setIsFullScreen(true));\n else {\n dispatch(setIsFullScreen(false));\n handleVideoElementSizeInfo();\n sendFluentLog(fullscreenLog(\"exitFullScreen\"));\n document.body.style.overflow = \"auto\";\n }\n };\n\n if (document.addEventListener) {\n document.addEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\n }\n\n () => {\n document.removeEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\n };\n }, []);\n};\n\nexport default useFullScreen;\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/hooks/useFullScreen.tsx"],"names":["init_esm_shims","useFullScreen","dispatch","useAppDispatch","useAppSelector","params","shallowEqual","useEffect","handleChangeFullScreen","isFullScreen","store_default","setIsFullScreen","handleVideoElementSizeInfo","sendFluentLog","fullscreenLog","useFullScreen_default"],"mappings":"oKAAAA,CAAAA,EAAAA,CASA,IAAMC,CAAAA,CAAgB,IAAM,CAC1B,IAAMC,CAAAA,CAAWC,GAAAA,EAAe,CAChCC,CAAAA,CAAe,CAAC,CAAE,UAAW,CAAE,MAAA,CAAAC,CAAO,CAAE,CAAA,IAAO,CAAE,OAAAA,CAAO,CAAA,CAAA,CAAIC,YAAY,CAAA,CAGxEC,SAAAA,CAAU,IAAM,CACd,IAAMC,CAAAA,CAAyB,IAAM,CACnC,IAAMC,CAAAA,CAAe,SAAS,iBAAA,CACxB,CAAE,MAAA,CAAAJ,CAAO,CAAA,CAAIK,EAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CACpCL,CAAAA,CAAO,kBAAA,GAAqB,CAAC,CAACI,CAAY,EAEtCA,CAAAA,CAAcP,CAAAA,CAASS,CAAAA,CAAgB,IAAI,CAAC,CAAA,EAE9CT,EAASS,CAAAA,CAAgB,KAAK,CAAC,CAAA,CAC/BC,EAAAA,EAA2B,CAC3BC,EAAcC,CAAAA,CAAc,gBAAgB,CAAC,CAAA,CAC7C,QAAA,CAAS,IAAA,CAAK,KAAA,CAAM,QAAA,CAAW,MAAA,EAEnC,CAAA,CAEI,QAAA,CAAS,gBAAA,GACX,QAAA,CAAS,gBAAA,CAAiB,yBAA0BN,CAAAA,CAAwB,KAAK,CAAA,CACjF,QAAA,CAAS,gBAAA,CAAiB,qBAAA,CAAuBA,EAAwB,KAAK,CAAA,CAC9E,QAAA,CAAS,gBAAA,CAAiB,kBAAA,CAAoBA,CAAAA,CAAwB,KAAK,CAAA,CAC3E,QAAA,CAAS,gBAAA,CAAiB,oBAAA,CAAsBA,CAAAA,CAAwB,KAAK,CAAA,EASjF,CAAA,CAAG,EAAE,EACP,CAAA,CAEOO,CAAAA,CAAQd","file":"chunk-P4O3IKAQ.mjs","sourcesContent":["import { useEffect } from \"react\";\nimport { shallowEqual } from \"react-redux\";\nimport { useAppDispatch, useAppSelector } from \"../redux/hooks\";\nimport { setIsFullScreen } from \"../redux/slices/controllerSlice\";\nimport { handleVideoElementSizeInfo } from \"../redux/actions/controller.actions\";\nimport { fullscreenLog } from \"../logs/logs\";\nimport { sendFluentLog } from \"../logs/fluentdLogger\";\nimport store from \"../redux/store\";\n\nconst useFullScreen = () => {\n const dispatch = useAppDispatch();\n useAppSelector(({ videoData: { params } }) => ({ params }), shallowEqual);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const handleChangeFullScreen = () => {\n const isFullScreen = document.fullscreenElement;\n const { params } = store.getState().videoData;\n params.onFullscreenChange?.(!!isFullScreen);\n\n if (isFullScreen) dispatch(setIsFullScreen(true));\n else {\n dispatch(setIsFullScreen(false));\n handleVideoElementSizeInfo();\n sendFluentLog(fullscreenLog(\"exitFullScreen\"));\n document.body.style.overflow = \"auto\";\n }\n };\n\n if (document.addEventListener) {\n document.addEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\n document.addEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\n }\n\n () => {\n document.removeEventListener(\"webkitfullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"mozfullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"fullscreenchange\", handleChangeFullScreen, false);\n document.removeEventListener(\"MSFullscreenChange\", handleChangeFullScreen, false);\n };\n }, []);\n};\n\nexport default useFullScreen;\n"]}
@@ -1,2 +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
1
+ import {b}from'./chunk-HOAJ3EFI.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-NLCBOGTI.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-QFADUEGX.mjs.map
2
+ //# sourceMappingURL=chunk-QFADUEGX.mjs.map
@@ -1 +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,OAAA,CAAS,2DACX,CAAC,EAEL,EAEaC,CAAAA,CAAuB,IAAM,CACxC,IAAMC,CAAAA,CAAWC,EAAAA,CAAM,QAAA,CACjB,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAID,EAAAA,CA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AA,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"]}
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,OAAA,CAAS,2DACX,CAAC,EAEL,EAEaC,CAAAA,CAAuB,IAAM,CACxC,IAAMC,CAAAA,CAAWC,EAAAA,CAAM,QAAA,CACjB,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAID,EAAAA,CAAM,UAAS,CAAE,SAAA,CAC9BE,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AAA,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-QFADUEGX.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"]}
@@ -1,2 +1,2 @@
1
- import {Aa,x,za}from'./chunk-BC4366GN.mjs';import {e}from'./chunk-4QMWBTB5.mjs';e();var f=()=>{let{params:r}=Aa.getState().videoData,t=x().currentTime;if(t!==0){let d=x().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(x().currentTime)},o=localStorage.getItem("viewedVideos");if(o){let e=JSON.parse(o);e=e.filter(n=>n.video_id!==i.video_id||n.video_type!==i.video_type),e.length<10||e.shift(),e.push(i),localStorage.setItem("viewedVideos",JSON.stringify(e));}else localStorage.setItem("viewedVideos",JSON.stringify([i]));}},g=()=>{let r=Aa.dispatch,{params:t}=Aa.getState().videoData,d=localStorage.getItem("viewedVideos");if(d){let o=JSON.parse(d).find(e=>e.video_id===Number(t.id)&&e.video_type===2);o&&r(za({time:o.time}));}};export{f as a,g as b};//# sourceMappingURL=chunk-PKXJEXKI.mjs.map
2
- //# sourceMappingURL=chunk-PKXJEXKI.mjs.map
1
+ import {Aa,x,za}from'./chunk-NLCBOGTI.mjs';import {e}from'./chunk-4QMWBTB5.mjs';e();var f=()=>{let{params:r}=Aa.getState().videoData,t=x().currentTime;if(t!==0){let d=x().duration,i={video_id:+r.id,video_type:2,time:t===d?0:Math.floor(x().currentTime)},o=localStorage.getItem("viewedVideos");if(o){let e=JSON.parse(o);e=e.filter(n=>n.video_id!==i.video_id||n.video_type!==i.video_type),e.length<10||e.shift(),e.push(i),localStorage.setItem("viewedVideos",JSON.stringify(e));}else localStorage.setItem("viewedVideos",JSON.stringify([i]));}},g=()=>{let r=Aa.dispatch,{params:t}=Aa.getState().videoData,d=localStorage.getItem("viewedVideos");if(d){let o=JSON.parse(d).find(e=>e.video_id===Number(t.id)&&e.video_type===2);o&&r(za({time:o.time}));}};export{f as a,g as b};//# sourceMappingURL=chunk-UL5LQB3G.mjs.map
2
+ //# sourceMappingURL=chunk-UL5LQB3G.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_esm_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","viewedVideos","video","handleApplyContinuousPlayback","dispatch","setVideoSettings"],"mappings":"gFAAAA,CAAAA,EAAAA,CAKO,IAAMC,CAAAA,CAA2B,IAAM,CAC1C,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,GAAM,QAAA,EAAS,CAAE,SAAA,CAC9BC,CAAAA,CAAcC,GAAmB,CAAE,WAAA,CACzC,GAAID,CAAAA,GAAgB,EAAG,CACnB,IAAME,CAAAA,CAAWD,CAAAA,GAAqB,QAAA,CAChCE,CAAAA,CAA4B,CAC9B,QAAA,CAAU,CAACL,CAAAA,CAAO,EAAA,CAClB,UAAA,CAAY,CAAA,CACZ,KAAME,CAAAA,GAAgBE,CAAAA,CAAW,CAAA,CAAI,IAAA,CAAK,MAAMD,CAAAA,EAAmB,CAAE,WAAW,CACpF,EACIG,CAAAA,CAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,EACpE,GAAIA,CAAAA,CAA4B,CAC5B,IAAIC,EAA+B,IAAA,CAAK,KAAA,CAAMD,CAA0B,CAAA,CACxEC,EAAeA,CAAAA,CAAa,MAAA,CACvBC,CAAAA,EAAwBA,CAAAA,CAAM,WAAaH,CAAAA,CAAY,QAAA,EAAYG,CAAAA,CAAM,UAAA,GAAeH,EAAY,UACzG,CAAA,CACIE,CAAAA,CAAa,MAAA,CAAS,IAEtBA,CAAAA,CAAa,KAAA,EAAM,CACnBA,CAAAA,CAAa,IAAA,CAAKF,CAAW,CAAA,CAEjC,YAAA,CAAa,QAAQ,cAAA,CAAgB,IAAA,CAAK,SAAA,CAAUE,CAAY,CAAC,EACrE,CAAA,KAAO,YAAA,CAAa,OAAA,CAAQ,eAAgB,IAAA,CAAK,SAAA,CAAU,CAACF,CAAW,CAAC,CAAC,EAC7E,CACJ,CAAA,CAEaI,EAAgC,IAAM,CAC/C,IAAMC,CAAAA,CAAWT,GAAM,QAAA,CACjB,CAAE,MAAA,CAAAD,CAAO,EAAIC,EAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CAChCK,EAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,CAAA,CACpE,GAAIA,CAAAA,CAA4B,CAE5B,IAAMD,CAAAA,CAD+B,KAAK,KAAA,CAAMC,CAA0B,CAAA,CACzC,IAAA,CAC5BE,GAAwBA,CAAAA,CAAM,QAAA,GAAa,MAAA,CAAOR,CAAAA,CAAO,EAAE,CAAA,EAAKQ,CAAAA,CAAM,UAAA,GAAe,CAC1F,EAEIH,CAAAA,EAAaK,CAAAA,CAASC,EAAAA,CAAiB,CAAE,KAAMN,CAAAA,CAAY,IAAK,CAAC,CAAC,EAC1E,CACJ","file":"chunk-PKXJEXKI.mjs","sourcesContent":["import { IViewedVideo } from \"../../interfaces/interfaces\";\nimport store from \"../store\";\nimport { setVideoSettings } from \"../slices/userSlice\";\nimport { mainPlayerVideoTag } from \"../../constants\";\n\nexport const handleContinuousPlayback = () => {\n const { params } = store.getState().videoData;\n const currentTime = mainPlayerVideoTag().currentTime;\n if (currentTime !== 0) {\n const duration = mainPlayerVideoTag().duration;\n const viewedVideo: IViewedVideo = {\n video_id: +params.id!,\n video_type: 2,\n time: currentTime === duration ? 0 : Math.floor(mainPlayerVideoTag().currentTime),\n };\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n let viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n viewedVideos = viewedVideos.filter(\n (video: IViewedVideo) => video.video_id !== viewedVideo.video_id || video.video_type !== viewedVideo.video_type\n );\n if (viewedVideos.length < 10) viewedVideos.push(viewedVideo);\n else {\n viewedVideos.shift();\n viewedVideos.push(viewedVideo);\n }\n localStorage.setItem(\"viewedVideos\", JSON.stringify(viewedVideos));\n } else localStorage.setItem(\"viewedVideos\", JSON.stringify([viewedVideo]));\n }\n};\n\nexport const handleApplyContinuousPlayback = () => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n const viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n const viewedVideo = viewedVideos.find(\n (video: IViewedVideo) => video.video_id === Number(params.id) && video.video_type === 2\n );\n\n if (viewedVideo) dispatch(setVideoSettings({ time: viewedVideo.time }));\n }\n};\n\n"]}
1
+ {"version":3,"sources":["../src/videoPlayerLibrary/helpers/redux/actions/user.actions.ts"],"names":["init_esm_shims","handleContinuousPlayback","params","store_default","currentTime","mainPlayerVideoTag","duration","viewedVideo","viewedVideosInLocalStorage","viewedVideos","video","handleApplyContinuousPlayback","dispatch","setVideoSettings"],"mappings":"gFAAAA,CAAAA,EAAAA,CAKO,IAAMC,CAAAA,CAA2B,IAAM,CAC1C,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAA,CAAIC,GAAM,QAAA,EAAS,CAAE,SAAA,CAC9BC,CAAAA,CAAcC,GAAmB,CAAE,WAAA,CACzC,GAAID,CAAAA,GAAgB,EAAG,CACnB,IAAME,CAAAA,CAAWD,CAAAA,GAAqB,QAAA,CAChCE,CAAAA,CAA4B,CAC9B,QAAA,CAAU,CAACL,CAAAA,CAAO,EAAA,CAClB,UAAA,CAAY,CAAA,CACZ,KAAME,CAAAA,GAAgBE,CAAAA,CAAW,CAAA,CAAI,IAAA,CAAK,MAAMD,CAAAA,EAAmB,CAAE,WAAW,CACpF,EACIG,CAAAA,CAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,EACpE,GAAIA,CAAAA,CAA4B,CAC5B,IAAIC,EAA+B,IAAA,CAAK,KAAA,CAAMD,CAA0B,CAAA,CACxEC,EAAeA,CAAAA,CAAa,MAAA,CACvBC,CAAAA,EAAwBA,CAAAA,CAAM,WAAaH,CAAAA,CAAY,QAAA,EAAYG,CAAAA,CAAM,UAAA,GAAeH,EAAY,UACzG,CAAA,CACIE,CAAAA,CAAa,MAAA,CAAS,IAEtBA,CAAAA,CAAa,KAAA,EAAM,CACnBA,CAAAA,CAAa,IAAA,CAAKF,CAAW,CAAA,CAEjC,YAAA,CAAa,QAAQ,cAAA,CAAgB,IAAA,CAAK,SAAA,CAAUE,CAAY,CAAC,EACrE,CAAA,KAAO,YAAA,CAAa,OAAA,CAAQ,eAAgB,IAAA,CAAK,SAAA,CAAU,CAACF,CAAW,CAAC,CAAC,EAC7E,CACJ,CAAA,CAEaI,EAAgC,IAAM,CAC/C,IAAMC,CAAAA,CAAWT,GAAM,QAAA,CACjB,CAAE,MAAA,CAAAD,CAAO,EAAIC,EAAAA,CAAM,QAAA,EAAS,CAAE,SAAA,CAChCK,EAA6B,YAAA,CAAa,OAAA,CAAQ,cAAc,CAAA,CACpE,GAAIA,CAAAA,CAA4B,CAE5B,IAAMD,CAAAA,CAD+B,KAAK,KAAA,CAAMC,CAA0B,CAAA,CACzC,IAAA,CAC5BE,GAAwBA,CAAAA,CAAM,QAAA,GAAa,MAAA,CAAOR,CAAAA,CAAO,EAAE,CAAA,EAAKQ,CAAAA,CAAM,UAAA,GAAe,CAC1F,EAEIH,CAAAA,EAAaK,CAAAA,CAASC,EAAAA,CAAiB,CAAE,KAAMN,CAAAA,CAAY,IAAK,CAAC,CAAC,EAC1E,CACJ","file":"chunk-UL5LQB3G.mjs","sourcesContent":["import { IViewedVideo } from \"../../interfaces/interfaces\";\nimport store from \"../store\";\nimport { setVideoSettings } from \"../slices/userSlice\";\nimport { mainPlayerVideoTag } from \"../../constants\";\n\nexport const handleContinuousPlayback = () => {\n const { params } = store.getState().videoData;\n const currentTime = mainPlayerVideoTag().currentTime;\n if (currentTime !== 0) {\n const duration = mainPlayerVideoTag().duration;\n const viewedVideo: IViewedVideo = {\n video_id: +params.id!,\n video_type: 2,\n time: currentTime === duration ? 0 : Math.floor(mainPlayerVideoTag().currentTime),\n };\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n let viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n viewedVideos = viewedVideos.filter(\n (video: IViewedVideo) => video.video_id !== viewedVideo.video_id || video.video_type !== viewedVideo.video_type\n );\n if (viewedVideos.length < 10) viewedVideos.push(viewedVideo);\n else {\n viewedVideos.shift();\n viewedVideos.push(viewedVideo);\n }\n localStorage.setItem(\"viewedVideos\", JSON.stringify(viewedVideos));\n } else localStorage.setItem(\"viewedVideos\", JSON.stringify([viewedVideo]));\n }\n};\n\nexport const handleApplyContinuousPlayback = () => {\n const dispatch = store.dispatch;\n const { params } = store.getState().videoData;\n let viewedVideosInLocalStorage = localStorage.getItem(\"viewedVideos\");\n if (viewedVideosInLocalStorage) {\n const viewedVideos: IViewedVideo[] = JSON.parse(viewedVideosInLocalStorage);\n const viewedVideo = viewedVideos.find(\n (video: IViewedVideo) => video.video_id === Number(params.id) && video.video_type === 2\n );\n\n if (viewedVideo) dispatch(setVideoSettings({ time: viewedVideo.time }));\n }\n};\n\n"]}
@@ -1,3 +1,3 @@
1
1
  'use strict';var chunkAN6JAJSI_js=require('./chunk-AN6JAJSI.js'),toolkit=require('@reduxjs/toolkit'),Ye=require('axios'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ye__default=/*#__PURE__*/_interopDefault(Ye);var fe=chunkAN6JAJSI_js.b((Jt,ye)=>{chunkAN6JAJSI_js.e();ye.exports={baseUrl:"https://hamrahi.cloud",fluentdUrl:"https://hamrahi.cloud"};});var Se={};chunkAN6JAJSI_js.c(Se,{isNpmPackage:()=>Xe});var Xe,Pe=chunkAN6JAJSI_js.a(()=>{chunkAN6JAJSI_js.e();Xe=false;});chunkAN6JAJSI_js.e();var ee={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},te=toolkit.createSlice({name:"videoData",initialState:ee,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=>ee}}),{setInfo:rt,setPlayerParams:st,setVideoElementSizeInfo:re,setMarkers:at,setIsFetchDetails:it,setIsValidAddress:ot,setVideoTimelines:D,setIsReady:nt,setRawSubtitles:lt,setSubtitles:ut,setSubtitleText:ct,setSelectedSubtitle:dt,setMultiAudio:pt,setSelectedAudioId:mt,setHiddenAd:gt,setClearVideoDataSlice:se}=te.actions,ae=te.reducer;chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var Ke={settingPopover:false,speedPopover:false,qualityLevelsPopover:false,markersListPopover:false,multiAudioPopover:false},ie=toolkit.createSlice({name:"popover",initialState:Ke,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:bt,setSpeedPopover:wt,setQualityLevelsPopover:At,setMarkersListPopover:Lt,setMultiAudioPopover:kt,setClearPopoversSlice:k}=ie.actions,oe=ie.reducer;chunkAN6JAJSI_js.e();var ne={settings:{quality:le?0:-1,brightness:100,volume:100,speed:1},videoSettings:{time:0}},ue=toolkit.createSlice({name:"user",initialState:ne,reducers:{setUserSettings:(e,t)=>{e.settings=t.payload;},setVideoSettings:(e,t)=>{e.videoSettings=t.payload;},setClearUserSlice:()=>ne}}),{setUserSettings:ce,setVideoSettings:Ft,setClearUserSlice:de}=ue.actions,pe=ue.reducer;chunkAN6JAJSI_js.e();var me={params:{id:"0",type:"",currentTime:0,autoPlay:false,onClose:()=>{}},details:{},play:false},ge=toolkit.createSlice({name:"user",initialState:me,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=>me}}),{setMiniPlayerInfo:Ot,setDetailsMiniPlayer:_t,setPlayMiniPlayer:B,setClearMiniPlayerSlice:Qt}=ge.actions,he=ge.reducer;var Ce=toolkit.configureStore({reducer:{controller:chunkAN6JAJSI_js.y,videoData:ae,popovers:oe,user:pe,miniPlayer:he},devTools:true,middleware:e=>e({serializableCheck:false})}),a=Ce;chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var O=fe(),_=(Pe(),chunkAN6JAJSI_js.d(Se)),Q=()=>(_?O.baseUrl:process.env.baseUrl)+"/live/api",$=()=>_?O.fluentdUrl:process.env.fluentdUrl,zt=()=>(_?O.baseUrl:process.env.baseUrl)+"/emoji";var F=()=>({vod:{getVodUrl:`${Q()}/v1/live/details/vod/`,getMarkerUrl:e=>`${Q()}/v1/live/list-event/vod/${e}/`},videoTimelineLog:`${$()}/video-timeline.log`,logs:`${$()}/cafevideo-endpoint.log`});var b=e=>{let{details:t,params:r}=a.getState().videoData,s={...e,timestamp:Date.now(),clientUUID:P(),uuid:P(),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};x({url:F().logs,method:"post",data:s});};chunkAN6JAJSI_js.e();chunkAN6JAJSI_js.e();var c=()=>document.getElementById("player-tag"),v=()=>document.getElementById("mini-player-video-tag");var pr=()=>document.getElementById("time-progress-bar"),mr=()=>document.getElementById("progress-area");var gr=()=>a.getState().videoData.videoElementSizeInfo.width,hr=()=>document.getElementById("time-progress-area");var Ar=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}},Lr=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}},kr=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}},ve=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}},q=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 xr=(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}},be=e=>{let{params:t,details:r}=a.getState().videoData;return {category:e,id:Number(t.id),type:t.type,src:l("streamLink")||t.id}},we=(e,t,r,s)=>({category:"player-error",type:e,message:t,statusCode:r,url:s}),Ae=(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:P(),user_id:s.user_id,content_type:s.content_type,content_id:s.content_id}},Tr=(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}},Mr=(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}},Ir=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}},Dr=(e,t,r,s,i)=>{let{params:o,details:f}=a.getState().videoData,n=Date.now()-i.current+e+t,y=window.performance.memory,w=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:H({memory:y,timing:w},"performance"),userAgent:window.navigator.userAgent}},Fr=(e,t,r,s,i)=>{let{params:o,details:f}=a.getState().videoData,{settings:n}=a.getState().user,y=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:y,counter:s.current,loadingPercentile:Number((e/y).toFixed(2)),videoTime:c().currentTime,videoEntranceTime:i,speed:n.speed,provider:o.provider}},Vr=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}},Er=(e,t,r,s,i)=>{let{params:o,details:f}=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 Le=e=>{e&&b(we(e.type,e.message,e.statusCode,e.url));};var x=async({url:e,method:t="GET",data:r,headers:s,retryCount:i=1,maxRetryCount:o=0,errorMessage:f,retryPolicy:n,errorCallback:y,timeoutCount:w})=>{let S={url:e,method:t,headers:{...s,"Content-Type":"application/json"},timeout:w?w*1e3:void 0};r?t==="GET"?S={...S,params:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider,...r}}:S={...S,data:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider,...r}}:t==="GET"?S={...S,params:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider}}:S={...S,data:{uuid:a.getState().videoData.params.uuid,provider:a.getState().videoData.params.provider==="unknown"?void 0:a.getState().videoData.params.provider}};try{return await Ye__default.default(S)}catch(d){if(d instanceof Ye.AxiosError&&d.code!=="ERR_NETWORK"&&Le({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)){y&&y(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 ke(p),x({url:e,method:t,data:r,headers:s,retryCount:i+1,errorMessage:f,retryPolicy:n,errorCallback:y});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 is=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(chunkAN6JAJSI_js.f(!c()?.paused)),v()&&v().played&&(v()?.pause(),t(B(false)));}},os=e=>{if(e===null||e.target.nodeName!=="INPUT"){let t=a.dispatch;v().paused?v().play():v()?.pause(),t(B(!v().paused)),c()&&c().played&&(c()?.pause(),t(chunkAN6JAJSI_js.f(false)));}},Je=()=>{let e=a.dispatch;e(chunkAN6JAJSI_js.x(false)),l("isIOS")&&(c().currentTime=c().currentTime-.001);},V=(e,t)=>{let r=a.dispatch,{settings:s}=a.getState().user,{firstMute:i}=a.getState().controller,o=t||c();r(ce({...s,volume:e})),o&&(i&&e&&Je(),l("isIOS")?o.muted=!e:o.volume=e/100);},ns=(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;b(ve(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;},Ze=()=>{let e=a.dispatch,t=document.fullscreenElement;l("isIOS")?c().webkitEnterFullScreen?(e(chunkAN6JAJSI_js.f(false)),c().webkitEnterFullScreen()):(e(k()),b(q("fullScreen"))):t?(e(chunkAN6JAJSI_js.m(false)),document.exitFullscreen().then(()=>document.body.style.overflow="auto")):(e(k()),document.documentElement.requestFullscreen().then(()=>document.body.style.overflow="hidden"),e(chunkAN6JAJSI_js.m(true)),b(q("fullScreen")));},ls=()=>{l("isTouchScreen")&&!l("isIOS")&&(l("isLandscape")&&!l("isFullScreen")?window.screen.orientation.lock("portrait"):window.screen.orientation.lock("landscape"));},us=e=>{let t=a.dispatch;t(chunkAN6JAJSI_js.t(e==="lock")),b(be(e)),e==="unlock"&&localStorage.setItem("unlock-click","true");},cs=(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(D([i>=c()?.duration?o:i])):(s[0]<i&&x({url:F().videoTimelineLog,method:"post",data:Ae(s[0],i)}),o&&o>=c()?.duration?r(D([])):r(D([o])));}},ds=()=>{let e=a.dispatch,t=document.getElementById("video-area")?.getBoundingClientRect();t.height=t.width*9/16,t&&e(re(t));},ps=e=>{!l("isTouchScreen")&&e.target.nodeName!=="INPUT"&&Ze();};var T="pl-",xe=(...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(T)).map(n=>n.slice(T.length))),i=r.map(n=>n.startsWith(T)?n.slice(T.length):n);return (tailwindMerge.twMerge(i.join(" "))?.split(" ")).map(n=>s.has(n)?T+n:n).join(" ").trim()},Ls=(e,t)=>{let r=t||{},s=l("isTouchScreen"),i=l("isFullScreen");return s?xe(e,r.touch,i?r.touchFullScreen:void 0):xe(e,r.desktop,i?r.desktopFullScreen:void 0)},ks=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},ke=e=>new Promise(t=>setTimeout(t,e*1e3)),P=()=>{let e=localStorage.getItem("hamrahiUUID");return e||(e=ze(),localStorage.setItem("hamrahiUUID",e)),e.toString()},ze=()=>{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},L=()=>typeof window<"u"&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),j=()=>{let{isFullScreen:e}=a.getState().controller;return L()&&e},Te=()=>{let{isFullScreen:e}=a.getState().controller;return L()&&!e},E=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,M=e=>(e<10?"0":"")+e,xs=e=>{let t=Math.floor(e/3600),r=Math.floor(e%3600/60),s=Math.floor(e%3600%60);return t<1?`${M(r)}:${M(s)}`:`${M(t)}:${M(r)}:${M(s)}`},Ts=e=>{let t=new URL(e),r=e;return t.search.length?r+=`&uuid=${P()}`:r+=`?uuid=${P()}`},Ms=(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}},Is=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=${P()}`:s=`?uuid=${P()}`,s},Ds=(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 Fs=e=>e>=200&&e<300,Vs=()=>{let e=a.dispatch;e(se()),e(chunkAN6JAJSI_js.w()),e(de()),e(k());},Es=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},Rs=e=>{let t=0;performance&&performance.getEntriesByType("navigation")&&(t=performance.getEntriesByType("navigation")[0].duration),e.current=t;},Us=(e,t,r)=>{let s=t*window.devicePixelRatio,i=r*window.devicePixelRatio,o=[];return l("isTouchScreenPortrait")?o=e.filter(f=>Number(f?.split("x")[0].trim())<=s):o=e.filter(f=>Number(f?.split("x")[0].trim())<=i||Number(f?.split("x")[1].trim())<=s),o.indexOf(o[o.length-1])},H=(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,...H(e[s],i)}:r[i]=e[s];}return r},Bs=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})},Os=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},_s=e=>e?.split(/\r?\n|\r|\n/g),Qs=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 $s=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),le=process.env.NODE_ENV==="development",Ks=e=>{let t=a.dispatch,{params:r}=a.getState().videoData;if(r.autoplay==="true"||r.advertisement){let s=e.play();t(chunkAN6JAJSI_js.f(true)),V(100,e),s!==void 0&&s.then(()=>{V(100,e);}).catch(()=>{V(0,e),t(chunkAN6JAJSI_js.x(true)),e.play();});}};var l=e=>{let{params:t,details:r,isValidAddress:s,isFetchDetails:i,isReady:o,rawSubtitles:f,subtitles:n,selectedSubtitle:y,markers:w,multiAudio:S,hiddenAd:d}=a.getState().videoData,{firstPlay:p,lock:m,canPlayVideo:g,manualQuality:W,activeElements:Me,isLoading:Ie,isEnded:C,isAutoPlay:De,play:Fe,isFullScreen:X,firstMute:Y}=a.getState().controller,{settingPopover:G,speedPopover:Ve,qualityLevelsPopover:Ee,markersListPopover:Re}=a.getState().popovers,{settings:J}=a.getState().user,R=a.getState().miniPlayer;switch(e){case "showHeader":return !p&&g;case "showMain":return !m||p;case "showFooter":return L()?g&&!p:g;case "showTouchVolumeBrightness":return !p&&j()&&!m&&!C;case "showBackwardForward":return !p&&!m;case "showTitle":return t.type!=="static"&&X&&!m;case "showSettingPopover":return G;case "showSpeedPopover":return Ve;case "showQualityLevelsPopover":return Ee;case "showSettingIcon":return !E();case "showBanner":return p&&(r.banner||t.banner);case "showProgressbar":return true;case "showPictureInPicture":return !E()&&!L();case "showSubtitle":return !!y;case "showMarkerListPopover":return Re;case "hidePopovers":return !G;case "isLandscape":return window.innerHeight<=window.innerWidth;case "isTouchScreen":return L();case "isTouchScreenPortrait":return Te();case "isTouchScreenLandscape":return j();case "isActiveElements":return Me;case "isPlay":return Fe;case "isPlayMiniPlayer":return R.play;case "isFirstPlay":return p;case "isLock":return m;case "isFirstMutePlay":return Y;case "isIOS":return E();case "isLoading":return Ie;case "isStaticFormat":return t.type==="static";case "isEnded":return C;case "isAutoPlay":return De;case "isFullScreen":return X;case "isValidAddress":return t.id?s:!!t.stream_link;case "isFetchDetails":return t.id?i:!!t.stream_link;case "isAutoQuality":return J.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&&y;case "isMiniPlayerAndMainPlayerSame":return t.id===R.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 W!=null;case "hasSound":return !!J.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 y&&y.activeCues&&y.activeCues.length>0;case "hasOnPlayParams":return !!t.onPlay;case "hasOnPauseParams":return !!t.onPause;case "hasMiniPlayer":return R.params.id;case "hasCurrentTimeParams":return t.currentTime!==void 0;case "hasMarkers":return w.length!==0;case "hasSubtitlesInParams":return t.subtitles&&t.subtitles.length;case "hasOnChangeCurrentTime":return !!t.onChangeCurrentTime;case "hasMultiAudio":return S&&!!S.length;case "hasAdvertisement":return !!t.advertisement&&!!t.advertisement.videoUrl&&!d;case "hasActiveSubtitleInParams":return !!t.activeSubtitle;case "hasRawSubtitles":return !!f&&!!f.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 Y;case "setSubtitleFirstPlay":return (t.type==="vod"&&r.subtitles&&r.subtitles.length>0||t.type==="static"&&t.subtitles&&t.subtitles.length)&&!p;}};exports.$=ls;exports.A=mr;exports.Aa=a;exports.B=gr;exports.C=hr;exports.D=Ar;exports.E=Lr;exports.F=kr;exports.G=q;exports.H=xr;exports.I=Tr;exports.J=Mr;exports.K=Ir;exports.L=Dr;exports.M=Fr;exports.N=Vr;exports.O=Er;exports.P=Le;exports.Q=x;exports.R=Ot;exports.S=_t;exports.T=B;exports.U=Qt;exports.V=is;exports.W=os;exports.X=Je;exports.Y=V;exports.Z=ns;exports._=Ze;exports.a=rt;exports.aa=us;exports.b=st;exports.ba=cs;exports.c=re;exports.ca=ds;exports.d=it;exports.da=ps;exports.e=ot;exports.ea=Ls;exports.f=D;exports.fa=ks;exports.g=nt;exports.ga=P;exports.h=lt;exports.ha=L;exports.i=ut;exports.ia=xs;exports.j=ct;exports.ja=Ts;exports.k=dt;exports.ka=Ms;exports.l=pt;exports.la=Is;exports.m=mt;exports.ma=Ds;exports.n=gt;exports.na=Fs;exports.o=bt;exports.oa=Vs;exports.p=wt;exports.pa=Es;exports.q=At;exports.qa=Rs;exports.r=kt;exports.ra=Us;exports.s=k;exports.sa=Bs;exports.t=l;exports.ta=Os;exports.u=zt;exports.ua=_s;exports.v=F;exports.va=Qs;exports.w=b;exports.wa=$s;exports.x=c;exports.xa=Ks;exports.y=v;exports.ya=ce;exports.z=pr;exports.za=Ft;//# sourceMappingURL=chunk-U3VFRU6R.js.map
3
- //# sourceMappingURL=chunk-U3VFRU6R.js.map
2
+ `),e=e.trim(),e),le=process.env.NODE_ENV==="development",Ks=e=>{let t=a.dispatch,{params:r}=a.getState().videoData;if(r.autoplay==="true"||r.advertisement){let s=e.play();t(chunkAN6JAJSI_js.f(true)),V(100,e),s!==void 0&&s.then(()=>{V(100,e);}).catch(()=>{V(0,e),t(chunkAN6JAJSI_js.x(true)),e.play();});}};var l=e=>{let{params:t,details:r,isValidAddress:s,isFetchDetails:i,isReady:o,rawSubtitles:f,subtitles:n,selectedSubtitle:y,markers:w,multiAudio:S,hiddenAd:d}=a.getState().videoData,{firstPlay:p,lock:m,canPlayVideo:g,manualQuality:W,activeElements:Me,isLoading:Ie,isEnded:C,isAutoPlay:De,play:Fe,isFullScreen:X,firstMute:Y}=a.getState().controller,{settingPopover:G,speedPopover:Ve,qualityLevelsPopover:Ee,markersListPopover:Re}=a.getState().popovers,{settings:J}=a.getState().user,R=a.getState().miniPlayer;switch(e){case "showHeader":return g;case "showMain":return !m||p;case "showFooter":return L()?g&&!p:g;case "showTouchVolumeBrightness":return !p&&j()&&!m&&!C;case "showBackwardForward":return !p&&!m;case "showTitle":return t.type!=="static"&&X&&!m;case "showSettingPopover":return G;case "showSpeedPopover":return Ve;case "showQualityLevelsPopover":return Ee;case "showSettingIcon":return !E();case "showBanner":return p&&(r.banner||t.banner);case "showProgressbar":return true;case "showPictureInPicture":return !E()&&!L();case "showSubtitle":return !!y;case "showMarkerListPopover":return Re;case "hidePopovers":return !G;case "isLandscape":return window.innerHeight<=window.innerWidth;case "isTouchScreen":return L();case "isTouchScreenPortrait":return Te();case "isTouchScreenLandscape":return j();case "isActiveElements":return Me;case "isPlay":return Fe;case "isPlayMiniPlayer":return R.play;case "isFirstPlay":return p;case "isLock":return m;case "isFirstMutePlay":return Y;case "isIOS":return E();case "isLoading":return Ie;case "isStaticFormat":return t.type==="static";case "isEnded":return C;case "isAutoPlay":return De;case "isFullScreen":return X;case "isValidAddress":return t.id?s:!!t.stream_link;case "isFetchDetails":return t.id?i:!!t.stream_link;case "isAutoQuality":return J.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&&y;case "isMiniPlayerAndMainPlayerSame":return t.id===R.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 W!=null;case "hasSound":return !!J.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 y&&y.activeCues&&y.activeCues.length>0;case "hasOnPlayParams":return !!t.onPlay;case "hasOnPauseParams":return !!t.onPause;case "hasMiniPlayer":return R.params.id;case "hasCurrentTimeParams":return t.currentTime!==void 0;case "hasMarkers":return w.length!==0;case "hasSubtitlesInParams":return t.subtitles&&t.subtitles.length;case "hasOnChangeCurrentTime":return !!t.onChangeCurrentTime;case "hasMultiAudio":return S&&!!S.length;case "hasAdvertisement":return !!t.advertisement&&!!t.advertisement.videoUrl&&!d;case "hasActiveSubtitleInParams":return !!t.activeSubtitle;case "hasRawSubtitles":return !!f&&!!f.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 Y;case "setSubtitleFirstPlay":return (t.type==="vod"&&r.subtitles&&r.subtitles.length>0||t.type==="static"&&t.subtitles&&t.subtitles.length)&&!p;}};exports.$=ls;exports.A=mr;exports.Aa=a;exports.B=gr;exports.C=hr;exports.D=Ar;exports.E=Lr;exports.F=kr;exports.G=q;exports.H=xr;exports.I=Tr;exports.J=Mr;exports.K=Ir;exports.L=Dr;exports.M=Fr;exports.N=Vr;exports.O=Er;exports.P=Le;exports.Q=x;exports.R=Ot;exports.S=_t;exports.T=B;exports.U=Qt;exports.V=is;exports.W=os;exports.X=Je;exports.Y=V;exports.Z=ns;exports._=Ze;exports.a=rt;exports.aa=us;exports.b=st;exports.ba=cs;exports.c=re;exports.ca=ds;exports.d=it;exports.da=ps;exports.e=ot;exports.ea=Ls;exports.f=D;exports.fa=ks;exports.g=nt;exports.ga=P;exports.h=lt;exports.ha=L;exports.i=ut;exports.ia=xs;exports.j=ct;exports.ja=Ts;exports.k=dt;exports.ka=Ms;exports.l=pt;exports.la=Is;exports.m=mt;exports.ma=Ds;exports.n=gt;exports.na=Fs;exports.o=bt;exports.oa=Vs;exports.p=wt;exports.pa=Es;exports.q=At;exports.qa=Rs;exports.r=kt;exports.ra=Us;exports.s=k;exports.sa=Bs;exports.t=l;exports.ta=Os;exports.u=zt;exports.ua=_s;exports.v=F;exports.va=Qs;exports.w=b;exports.wa=$s;exports.x=c;exports.xa=Ks;exports.y=v;exports.ya=ce;exports.z=pr;exports.za=Ft;//# sourceMappingURL=chunk-VUHZVVMS.js.map
3
+ //# sourceMappingURL=chunk-VUHZVVMS.js.map