hamrahi-player-library 1.0.0

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 (115) hide show
  1. package/README.md +103 -0
  2. package/dist/hamrahi-player-library.css +7 -0
  3. package/dist/hamrahi-player-library.js +6 -0
  4. package/dist/hamrahi-player-library.umd.cjs +64 -0
  5. package/dist/index-2OVdYUgm.js +21871 -0
  6. package/dist/main.d.ts +1 -0
  7. package/dist/nonStaticVideoTag-CaUIINW6.js +137 -0
  8. package/dist/notActive-DokxPXmF.js +10 -0
  9. package/dist/staticPlayer-CqHC_NDw.js +13 -0
  10. package/dist/staticVideoTag-Bq3QUZG0.js +57 -0
  11. package/dist/touchVolumeBrightness-zJwzVg8P.js +131 -0
  12. package/dist/useHideSubtitle-xaoPFO2J.js +29 -0
  13. package/dist/user.actions-ChPfxQsM.js +29 -0
  14. package/dist/videoArea-B8winUaa.js +1379 -0
  15. package/dist/videoPlayerLibrary/components/custom-components/backwardForward/backwardForward.d.ts +3 -0
  16. package/dist/videoPlayerLibrary/components/custom-components/elapsedTime/elapsedTime.d.ts +2 -0
  17. package/dist/videoPlayerLibrary/components/custom-components/emoji/emoji.d.ts +3 -0
  18. package/dist/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbar.d.ts +2 -0
  19. package/dist/videoPlayerLibrary/components/custom-components/footer/controllbar/controllbarTooltip.d.ts +3 -0
  20. package/dist/videoPlayerLibrary/components/custom-components/footer/footer.d.ts +2 -0
  21. package/dist/videoPlayerLibrary/components/custom-components/footer/progressbar/markers/markers.d.ts +2 -0
  22. package/dist/videoPlayerLibrary/components/custom-components/footer/progressbar/progressbar.d.ts +2 -0
  23. package/dist/videoPlayerLibrary/components/custom-components/fullScreen/fullScreen.d.ts +2 -0
  24. package/dist/videoPlayerLibrary/components/custom-components/header/header.d.ts +2 -0
  25. package/dist/videoPlayerLibrary/components/custom-components/loader/loader.d.ts +2 -0
  26. package/dist/videoPlayerLibrary/components/custom-components/lockUnlock/lock.d.ts +2 -0
  27. package/dist/videoPlayerLibrary/components/custom-components/lockUnlock/unlock.d.ts +2 -0
  28. package/dist/videoPlayerLibrary/components/custom-components/main/main.d.ts +2 -0
  29. package/dist/videoPlayerLibrary/components/custom-components/markersList/markersList.d.ts +2 -0
  30. package/dist/videoPlayerLibrary/components/custom-components/markersList/markersListIcon.d.ts +3 -0
  31. package/dist/videoPlayerLibrary/components/custom-components/miniPlayer/miniPlayer.d.ts +4 -0
  32. package/dist/videoPlayerLibrary/components/custom-components/miniPlayer/videoTag/miniPlayerNonStaticVideoTag.d.ts +2 -0
  33. package/dist/videoPlayerLibrary/components/custom-components/miniPlayer/videoTag/miniPlayerStaticVideoTag.d.ts +2 -0
  34. package/dist/videoPlayerLibrary/components/custom-components/miniPlayer/videoTag/videoTag.d.ts +2 -0
  35. package/dist/videoPlayerLibrary/components/custom-components/notActive/notActive.d.ts +2 -0
  36. package/dist/videoPlayerLibrary/components/custom-components/pictureInPicture/pictureInPicture.d.ts +2 -0
  37. package/dist/videoPlayerLibrary/components/custom-components/playPause/miniPlayerPlayPause.d.ts +2 -0
  38. package/dist/videoPlayerLibrary/components/custom-components/playPause/playPause.d.ts +2 -0
  39. package/dist/videoPlayerLibrary/components/custom-components/popover/popover.d.ts +3 -0
  40. package/dist/videoPlayerLibrary/components/custom-components/qualityLevels/qualityLevels.d.ts +3 -0
  41. package/dist/videoPlayerLibrary/components/custom-components/settings/settings.d.ts +2 -0
  42. package/dist/videoPlayerLibrary/components/custom-components/soundVolume/soundVolume.d.ts +2 -0
  43. package/dist/videoPlayerLibrary/components/custom-components/speed/speed.d.ts +3 -0
  44. package/dist/videoPlayerLibrary/components/custom-components/subtitles/displaySubtitle.d.ts +2 -0
  45. package/dist/videoPlayerLibrary/components/custom-components/subtitles/subtitleIcon.d.ts +2 -0
  46. package/dist/videoPlayerLibrary/components/custom-components/subtitles/subtitleSettingMenu.d.ts +2 -0
  47. package/dist/videoPlayerLibrary/components/custom-components/title/title.d.ts +2 -0
  48. package/dist/videoPlayerLibrary/components/custom-components/toggle/toggle.d.ts +3 -0
  49. package/dist/videoPlayerLibrary/components/custom-components/tooltip/tooltip.d.ts +2 -0
  50. package/dist/videoPlayerLibrary/components/custom-components/touchVolumeBrightness/touchVolumeBrightness.d.ts +2 -0
  51. package/dist/videoPlayerLibrary/components/custom-components/videoArea/videoArea.d.ts +2 -0
  52. package/dist/videoPlayerLibrary/components/custom-components/videoAreaShadow.tsx/videoAreaShadow.d.ts +2 -0
  53. package/dist/videoPlayerLibrary/components/custom-components/videoTag/nonStaticVideoTag.d.ts +2 -0
  54. package/dist/videoPlayerLibrary/components/custom-components/videoTag/staticVideoTag.d.ts +2 -0
  55. package/dist/videoPlayerLibrary/components/custom-components/videoTag/videoTag.d.ts +2 -0
  56. package/dist/videoPlayerLibrary/components/icon-components/closeIcon.d.ts +3 -0
  57. package/dist/videoPlayerLibrary/components/icon-components/mute.d.ts +3 -0
  58. package/dist/videoPlayerLibrary/components/icon-components/speed.d.ts +3 -0
  59. package/dist/videoPlayerLibrary/components/icon-components/unMute.d.ts +3 -0
  60. package/dist/videoPlayerLibrary/components/videoPlayer/staticPlayer/staticPlayer.d.ts +2 -0
  61. package/dist/videoPlayerLibrary/components/videoPlayer/videoPlayer.d.ts +6 -0
  62. package/dist/videoPlayerLibrary/components/videoPlayer/vodPlayer/vodPlayer.d.ts +2 -0
  63. package/dist/videoPlayerLibrary/helpers/conditions/conditions.d.ts +1 -0
  64. package/dist/videoPlayerLibrary/helpers/configs/nextConfigs/env.d.ts +4 -0
  65. package/dist/videoPlayerLibrary/helpers/configs/npmPackage/npmPackage.d.ts +1 -0
  66. package/dist/videoPlayerLibrary/helpers/configs/npmPackage/npmPackage_lib.d.ts +1 -0
  67. package/dist/videoPlayerLibrary/helpers/configs/propsColors.d.ts +1 -0
  68. package/dist/videoPlayerLibrary/helpers/constants.d.ts +4 -0
  69. package/dist/videoPlayerLibrary/helpers/environment.d.ts +5 -0
  70. package/dist/videoPlayerLibrary/helpers/errorBoundary/errorBoundary.d.ts +14 -0
  71. package/dist/videoPlayerLibrary/helpers/errorBoundary/errorBoundaryFunctions.d.ts +6 -0
  72. package/dist/videoPlayerLibrary/helpers/getDetailsConfigs.d.ts +3 -0
  73. package/dist/videoPlayerLibrary/helpers/helpers.d.ts +27 -0
  74. package/dist/videoPlayerLibrary/helpers/hooks/useActiveInActive.d.ts +2 -0
  75. package/dist/videoPlayerLibrary/helpers/hooks/useBeforeUnload.d.ts +2 -0
  76. package/dist/videoPlayerLibrary/helpers/hooks/useContinuousPlaybackInterval.d.ts +2 -0
  77. package/dist/videoPlayerLibrary/helpers/hooks/useFullScreen.d.ts +2 -0
  78. package/dist/videoPlayerLibrary/helpers/hooks/useGetData/useGetData.d.ts +2 -0
  79. package/dist/videoPlayerLibrary/helpers/hooks/useGetData/useGetDetails.d.ts +2 -0
  80. package/dist/videoPlayerLibrary/helpers/hooks/useGetData/useGetMarkers.d.ts +2 -0
  81. package/dist/videoPlayerLibrary/helpers/hooks/useHandleKeyPress.d.ts +2 -0
  82. package/dist/videoPlayerLibrary/helpers/hooks/useHandleParams.d.ts +2 -0
  83. package/dist/videoPlayerLibrary/helpers/hooks/useHandleResize.d.ts +2 -0
  84. package/dist/videoPlayerLibrary/helpers/hooks/useHideSubtitle.d.ts +2 -0
  85. package/dist/videoPlayerLibrary/helpers/hooks/useJumpToCurrentTime.d.ts +2 -0
  86. package/dist/videoPlayerLibrary/helpers/hooks/useKeyPress.d.ts +2 -0
  87. package/dist/videoPlayerLibrary/helpers/hooks/useLongPress.d.ts +7 -0
  88. package/dist/videoPlayerLibrary/helpers/hooks/useOnClickOutside.d.ts +3 -0
  89. package/dist/videoPlayerLibrary/helpers/hooks/usePingPong.d.ts +2 -0
  90. package/dist/videoPlayerLibrary/helpers/hooks/useSetSubtitleFirstPlay.d.ts +2 -0
  91. package/dist/videoPlayerLibrary/helpers/interfaces/enums.d.ts +100 -0
  92. package/dist/videoPlayerLibrary/helpers/interfaces/interfaces.d.ts +252 -0
  93. package/dist/videoPlayerLibrary/helpers/logs/fluentdLogger.d.ts +1 -0
  94. package/dist/videoPlayerLibrary/helpers/logs/logs.d.ts +163 -0
  95. package/dist/videoPlayerLibrary/helpers/redux/actions/controller.actions.d.ts +12 -0
  96. package/dist/videoPlayerLibrary/helpers/redux/actions/playerCore.actions.d.ts +116 -0
  97. package/dist/videoPlayerLibrary/helpers/redux/actions/progressbar.actions.d.ts +15 -0
  98. package/dist/videoPlayerLibrary/helpers/redux/actions/user.actions.d.ts +2 -0
  99. package/dist/videoPlayerLibrary/helpers/redux/actions/videoData.actions.d.ts +7 -0
  100. package/dist/videoPlayerLibrary/helpers/redux/hooks.d.ts +4 -0
  101. package/dist/videoPlayerLibrary/helpers/redux/slices/controllerSlice.d.ts +26 -0
  102. package/dist/videoPlayerLibrary/helpers/redux/slices/miniPlayerSlice.d.ts +11 -0
  103. package/dist/videoPlayerLibrary/helpers/redux/slices/popoversSlice.d.ts +12 -0
  104. package/dist/videoPlayerLibrary/helpers/redux/slices/userSlice.d.ts +10 -0
  105. package/dist/videoPlayerLibrary/helpers/redux/slices/videoDataSlice.d.ts +20 -0
  106. package/dist/videoPlayerLibrary/helpers/redux/store.d.ts +18 -0
  107. package/dist/videoPlayerLibrary/helpers/services/apiCaller.d.ts +3 -0
  108. package/dist/videoPlayerLibrary/helpers/services/baseUrl.d.ts +3 -0
  109. package/dist/videoPlayerLibrary/helpers/services/services.d.ts +8 -0
  110. package/dist/videoPlayerLibrary/images/importImages.d.ts +2 -0
  111. package/dist/videoPlayerLibrary/index.d.ts +3 -0
  112. package/dist/videoPlayerLibrary/miniPlayerLibrary.d.ts +4 -0
  113. package/dist/videoPlayerLibrary/videoPlayerLibrary.d.ts +4 -0
  114. package/dist/vodPlayer-BZxT6vEI.js +24 -0
  115. package/package.json +63 -0
@@ -0,0 +1,1379 @@
1
+ import { jsx as t, jsxs as u, Fragment as P } from "react/jsx-runtime";
2
+ import { useRef as _, useCallback as je, useState as k, useEffect as C, memo as U, forwardRef as Xe, lazy as ne, Suspense as me } from "react";
3
+ import { u as g, s as v, c as s, C as o, I as T, a1 as Ee, a as B, h as E, m as y, a2 as G, a3 as Ve, a4 as $e, a5 as F, d as b, a6 as Ae, a7 as ie, a8 as Re, a9 as se, aa as Ie, ab as ve, ac as xe, e as z, ad as qe, ae as j, af as He, ag as We, ah as Me, ai as Ue, aj as Qe, ak as de, v as ue, i as we, al as ee, am as N, an as Ze, ao as A, ap as Te, aq as Ge, ar as ke, as as Ye, at as te, au as be, av as le, aw as Je, ax as Ke, ay as Pe, az as _e, aA as et, aB as Fe, b as tt, aC as lt } from "./index-2OVdYUgm.js";
4
+ import { createPortal as it } from "react-dom";
5
+ const st = () => {
6
+ const { details: e, params: l } = g(({ videoData: { details: i, params: n } }) => ({ details: i, params: n }), v);
7
+ return /* @__PURE__ */ t(
8
+ "div",
9
+ {
10
+ className: `animate__animated animate__faster pl-ml-4 pl-w-full pl-max-w-[80%] pl-self-start pl-truncate pl-break-words pl-text-left pl-text-[16px] pl-font-normal pl-text-white ${s(o.isActiveElements) ? "animate__fadeIn pl-opacity-100" : "animate__fadeOut pl-opacity-0"}`,
11
+ children: s(o.hasTitle) ? e.title : l.id
12
+ }
13
+ );
14
+ }, ot = () => /* @__PURE__ */ u(
15
+ "div",
16
+ {
17
+ className: `animate__animated animate__faster pl-relative ${s(o.isActiveElements) ? "animate__fadeIn pl-pointer-events-auto" : "animate__fadeOut pl-pointer-events-none"}`,
18
+ children: [
19
+ /* @__PURE__ */ t("img", { src: T.lock, alt: "lock-icon", width: 20, height: 20, onClick: () => Ee("unlock") }),
20
+ !localStorage.getItem("unlock-click") && /* @__PURE__ */ t("p", { className: "pl-absolute pl-left-0 pl-w-max pl-rounded-[8px] pl-bg-[#F7F7F7] pl-px-4 pl-py-3 pl-text-[10px] pl-text-black/[0.87]", children: "برای باز کردن قفل، کلیک کنید" })
21
+ ]
22
+ }
23
+ ), nt = () => (g(({ controller: { lock: e, activeElements: l } }) => ({ lock: e, activeElements: l }), v), /* @__PURE__ */ u(
24
+ "div",
25
+ {
26
+ className: `pl-mx-4 pl-mt-5 pl-flex pl-items-start pl-justify-end ${s(o.isTouchScreenPortrait) ? "pl-h-[16px]" : "pl-h-[60px]"}`,
27
+ children: [
28
+ s(o.showTitle) && /* @__PURE__ */ t(st, {}),
29
+ s(o.isLock) && /* @__PURE__ */ t(ot, {})
30
+ ]
31
+ }
32
+ ));
33
+ function rt(e, l = 300, i = {}) {
34
+ const n = _(null), r = je(
35
+ (a) => {
36
+ n.current ? (clearTimeout(n.current), n.current = null, e && e(a)) : n.current = setTimeout(() => {
37
+ i.onSingleTap && i.onSingleTap(a), n.current = null;
38
+ }, l);
39
+ },
40
+ // eslint-disable-next-line react-hooks/exhaustive-deps
41
+ [e, l, i.onSingleTap]
42
+ );
43
+ return e ? {
44
+ onClick: r
45
+ } : {};
46
+ }
47
+ const Ne = 1e3, he = ({
48
+ type: e,
49
+ isRightDoubleTouched: l,
50
+ isLeftDoubleTouched: i,
51
+ setIsRightDoubleTouched: n,
52
+ setIsLeftDoubleTouched: r
53
+ }) => {
54
+ const [a, m] = k(15), [c, p] = k(!1), h = _(a), S = B(), { duration: f } = g(({ controller: { currentTime: x, duration: M } }) => ({ currentTime: x, duration: M }), v), { videoElementSizeInfo: w } = g(
55
+ ({ videoData: { videoElementSizeInfo: x, params: M } }) => ({ videoElementSizeInfo: x, params: M }),
56
+ v
57
+ ), L = _(null);
58
+ C(() => {
59
+ h.current = a;
60
+ }, [a]);
61
+ let I;
62
+ I = rt((x) => {
63
+ ["touchBackward", "touchForward"].includes(e) && (x.stopPropagation(), e === "touchBackward" && r ? r(!0) : e === "touchForward" && n && n(!0), clearTimeout(L.current), L.current = setTimeout(() => p(!0), Ne));
64
+ }, 200), C(() => {
65
+ c && (p(!1), S(E(!1)), l && n ? (n(!1), y().duration - y().currentTime <= h.current ? G(e, y().duration) : G(e, h.current), m(15)) : i && r && (r(!1), y().currentTime <= h.current ? G(e, 0) : G(e, h.current), m(15)));
66
+ }, [c]);
67
+ const $ = (x) => {
68
+ m((M) => M + 15), s(o.isTouchScreenLandscape) && Ve(x, e), clearTimeout(L.current), L.current = setTimeout(() => p(!0), Ne);
69
+ };
70
+ let d;
71
+ return ["backward", "forward"].includes(e) ? d = /* @__PURE__ */ t(
72
+ "div",
73
+ {
74
+ className: `${s(o.isTouchScreen) ? "pl-flex pl-size-8 pl-items-center pl-justify-center pl-rounded-full pl-bg-black/50" : "hover:pl-scale-125"} pl-cursor-pointer pl-transition-transform pl-ease-in-out ${e === "backward" && (y().currentTime >= 15 ? "pl-opacity-100" : "pl-cursor-default pl-opacity-30 hover:pl-scale-100")} ${e === "forward" && (f - y().currentTime >= 15 ? "pl-opacity-100" : "pl-cursor-default pl-opacity-30 hover:pl-scale-100")}}`,
75
+ onContextMenu: (x) => x.preventDefault(),
76
+ children: /* @__PURE__ */ t(
77
+ "img",
78
+ {
79
+ alt: e === "backward" ? "backward-icon" : "forward-icon",
80
+ src: e === "backward" ? T.backward15 : T.forward15,
81
+ onClick: () => G(e, a),
82
+ onDoubleClick: (x) => x.stopPropagation(),
83
+ className: "pl-size-6"
84
+ }
85
+ )
86
+ }
87
+ ) : ["touchBackward", "touchForward"].includes(e) && (d = /* @__PURE__ */ t(
88
+ "div",
89
+ {
90
+ id: e,
91
+ className: `pl-relative pl-flex pl-flex-col pl-items-center pl-justify-center pl-gap-2 pl-overflow-hidden ${e === "touchBackward" ? "pl-rounded-r-full" : "pl-rounded-l-full"}`,
92
+ style: { width: w.width, height: w.width },
93
+ ...I,
94
+ children: (l || i) && /* @__PURE__ */ u(
95
+ "div",
96
+ {
97
+ className: "pl-flex pl-h-full pl-w-full pl-flex-col pl-items-center pl-justify-center pl-gap-2 pl-bg-secondary-100/[0.3] pl-p-5",
98
+ onTouchStart: $,
99
+ children: [
100
+ /* @__PURE__ */ u(
101
+ "div",
102
+ {
103
+ className: `${e === "touchBackward" ? "pl-arrow-left" : "pl-arrow-right pl-gap-2"} pl-flex pl-items-center pl-justify-center`,
104
+ children: [
105
+ /* @__PURE__ */ t(
106
+ "img",
107
+ {
108
+ alt: "arrow-left-icon",
109
+ src: T.arrowLeft,
110
+ className: `pl-size-6 ${e === "touchForward" && "pl-rotate-180"}`
111
+ }
112
+ ),
113
+ /* @__PURE__ */ t(
114
+ "img",
115
+ {
116
+ alt: "arrow-left-icon",
117
+ src: T.arrowLeft,
118
+ className: `pl-size-6 ${e === "touchForward" && "pl-rotate-180"}`
119
+ }
120
+ ),
121
+ /* @__PURE__ */ t(
122
+ "img",
123
+ {
124
+ alt: "arrow-left-icon",
125
+ src: T.arrowLeft,
126
+ className: `pl-size-6 ${e === "touchForward" && "pl-rotate-180"}`
127
+ }
128
+ )
129
+ ]
130
+ }
131
+ ),
132
+ /* @__PURE__ */ u("p", { className: "pl-text-center pl-text-[14px] pl-font-normal pl-text-white", children: [
133
+ a,
134
+ " ثانیه"
135
+ ] })
136
+ ]
137
+ }
138
+ )
139
+ }
140
+ )), /* @__PURE__ */ t(P, { children: d });
141
+ }, at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ __proto__: null,
143
+ default: he
144
+ }, Symbol.toStringTag, { value: "Module" })), pt = () => (g(({ controller: { play: e } }) => ({ play: e }), v), g(({ videoData: { videoElementSizeInfo: e, params: l } }) => ({ videoElementSizeInfo: e, params: l }), v), /* @__PURE__ */ t(
145
+ "div",
146
+ {
147
+ className: `${s(o.isTouchScreen) ? "pl-flex pl-size-14 pl-items-center pl-justify-center pl-rounded-full pl-bg-black/50" : "hover:pl-scale-125"} pl-cursor-pointer pl-transition-transform pl-ease-in-out`,
148
+ onContextMenu: (e) => e.preventDefault(),
149
+ children: /* @__PURE__ */ t(
150
+ "img",
151
+ {
152
+ alt: s(o.isPlay) ? "pause" : "play",
153
+ src: s(o.isPlay) ? T.bigPause : T.bigPlay,
154
+ onClick: (e) => $e(e),
155
+ onDoubleClick: (e) => e.stopPropagation(),
156
+ className: `pl-size-8 desktop:pl-size-10 ${s(o.isPlay) ? "pl-big-play-icon" : "pl-big-pause-icon"}`
157
+ }
158
+ )
159
+ }
160
+ )), ct = () => /* @__PURE__ */ u(
161
+ "div",
162
+ {
163
+ className: "loader-spinner pl-absolute pl-left-[50%] pl-top-[50%] pl-ml-[-42px] pl-mt-[-50px] pl-h-full pl-w-screen pl-overflow-hidden",
164
+ children: [
165
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
166
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
167
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
168
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
169
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
170
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
171
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
172
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
173
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
174
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
175
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" }),
176
+ /* @__PURE__ */ t("div", { className: "pl-bg-white" })
177
+ ]
178
+ }
179
+ ), Y = 1e3, dt = 3e3, hl = 6e4, ut = () => {
180
+ const [e, l] = k(!1), [i, n] = k(!1);
181
+ g(({ controller: { lock: m, firstPlay: c } }) => ({ lock: m, firstPlay: c }), v);
182
+ const { activeElements: r, isLoading: a } = g(
183
+ ({ controller: { activeElements: m, isLoading: c } }) => ({ activeElements: m, isLoading: c }),
184
+ v
185
+ );
186
+ return C(() => {
187
+ let m = null;
188
+ return s(o.isFirstPlay) || s(o.isActiveElements) ? m = setTimeout(() => n(!0), 100) : n(!1), () => clearTimeout(m);
189
+ }, [r]), C(() => {
190
+ let m;
191
+ return s(o.isLoading) ? m = setTimeout(() => l(!0), s(o.isFirstPlay) ? 0 : dt) : l(!1), () => {
192
+ clearTimeout(m), l(!1);
193
+ };
194
+ }, [a]), /* @__PURE__ */ t("main", { className: "pl-mt-1 pl-flex-1", children: e ? /* @__PURE__ */ t(ct, {}) : /* @__PURE__ */ t(P, { children: i && !s(o.isLock) && /* @__PURE__ */ t(
195
+ "div",
196
+ {
197
+ id: "main-content",
198
+ className: `pl-relative pl-flex pl-h-full pl-items-center pl-justify-center pl-text-center ${s(o.isActiveElements) ? "pl-pointer-events-auto" : "pl-pointer-events-none"}`,
199
+ children: /* @__PURE__ */ u(
200
+ "div",
201
+ {
202
+ className: "pl-flex pl-w-max pl-items-center pl-justify-center pl-gap-8",
203
+ style: { zIndex: F.mainIcons },
204
+ children: [
205
+ !s(o.isFirstPlay) && /* @__PURE__ */ t(he, { type: "forward" }),
206
+ /* @__PURE__ */ t(pt, {}),
207
+ !s(o.isFirstPlay) && /* @__PURE__ */ t(he, { type: "backward" })
208
+ ]
209
+ }
210
+ )
211
+ }
212
+ ) }) });
213
+ }, fe = (e) => {
214
+ const { videoElementSizeInfo: l } = b.getState().videoData, { duration: i } = b.getState().controller, n = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
215
+ if (n <= l.right && n > 0)
216
+ return (n - l.left) / l.width * i;
217
+ }, V = (e) => {
218
+ const { videoElementSizeInfo: l } = b.getState().videoData, i = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
219
+ if (i <= l.right && i > 0)
220
+ return i - l.left;
221
+ }, mt = (e) => {
222
+ const { duration: l } = b.getState().controller;
223
+ return e * ie() / l;
224
+ }, oe = (e) => {
225
+ e && (e.style.opacity = "0.0", e.style.pointerEvents = "none", e.style.zIndex = F.vttDisable);
226
+ }, ht = (e) => {
227
+ e.style.display = "block", e.style.zIndex = F.vtt, e.style.opacity = b.getState().videoData.details.vtt ? "1.0" : "0.6", e.style.pointerEvents = "auto", e.style.transition = "opacity 1s ease-out";
228
+ }, ft = (e, l) => {
229
+ const { videoElementSizeInfo: i } = b.getState().videoData, n = document.getElementsByClassName("pl-progressTooltip")[0], r = document.getElementById("parent-player");
230
+ n && r && (V(e) > n.getBoundingClientRect().width / 2 && V(e) < i.right - i.left - n.getBoundingClientRect().width / 2 ? l.style.left = `${V(e) - n.offsetWidth / 2}px` : V(e) < (r.offsetLeft === 0 ? n.offsetWidth : r.offsetLeft) ? l.style.left = "0px" : y().offsetLeft + y().offsetWidth < V(e) + n.offsetWidth && (l.style.left = `${y().offsetWidth - n.offsetWidth}px`));
231
+ }, gt = (e, l, i) => {
232
+ l && ht(l), b.getState().videoData.details.vtt ? ft(e, l) : l.style.left = `${V(e) - 30}px`, b.dispatch(Re(Number(fe(e)))), i.textContent = `${se(fe(e))}`;
233
+ }, re = (e, l = !1) => {
234
+ const { videoElementSizeInfo: i } = b.getState().videoData, n = document.querySelector(".pl-progressTooltip"), r = document.querySelector(".pl-progressTimeTooltip"), a = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
235
+ n && r && a <= i.right && a > i.left ? (gt(e, n, r), l && setTimeout(() => oe(n), 2e3)) : oe(n);
236
+ }, ze = (e) => {
237
+ const l = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
238
+ j() && (l <= e.view.innerWidth && l > 0 ? j().style.width = `${V(e)}px` : l <= e.view.innerWidth ? j().style.width = 0 : l > 0 && (j().style.width = "100%"));
239
+ }, vt = (e, l, i) => {
240
+ e.preventDefault(), e.stopPropagation(), i(!0);
241
+ const n = b.dispatch, r = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
242
+ r <= e.view.innerWidth && r > 0 && (n(Ie(!0)), n(ve(!0)), sessionStorage.setItem("previousVideoTime", String(y().currentTime)), e.target.setPointerCapture(e.pointerId), l.length > 0 && l.map((a) => clearTimeout(a)));
243
+ }, De = (e) => {
244
+ e.preventDefault(), e.stopPropagation();
245
+ const l = b.dispatch, { activePointerProgressBar: i } = b.getState().controller, { left: n } = b.getState().videoData.videoElementSizeInfo, r = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX, a = document.querySelector(".pl-progressTooltip");
246
+ r > n ? (a && (a.style.display = "block !important", a.style.pointerEvents = "auto"), i && (l(ve(!0)), re(e), ze(e), y().pause())) : a && (a.style.display = "none !important", a.style.pointerEvents = "none");
247
+ }, xt = (e, l, i, n) => {
248
+ n(!1), e.preventDefault(), e.stopPropagation();
249
+ const r = b.dispatch, { duration: a } = b.getState().controller, { left: m, right: c } = b.getState().videoData.videoElementSizeInfo;
250
+ e.target.removeEventListener("pointermove", De);
251
+ const p = e.clientX !== void 0 ? e.clientX : e.touches[0].clientX;
252
+ let h = 0;
253
+ p > m && p < c ? h = fe(e) : p < m ? h = 0 : p > 0 && (h = a), s(o.isStaticFormat) || xe(y().currentTime, h), y().currentTime = h, b.getState().controller.activePointerProgressBar && (r(Ie(!1)), r(ve(!1)), y().play(), re(e, !0), sessionStorage.setItem("current-time", String(h)), ze(e), wt(e, r, l, i));
254
+ }, wt = (e, l, i, n) => {
255
+ const r = n;
256
+ let a = setTimeout(() => {
257
+ const { settingPopover: m } = b.getState().popovers, { delayTurnOffControlbar: c } = b.getState().controller;
258
+ e.pointerType === "touch" && !m && c && l(E(!1));
259
+ }, Y);
260
+ r.push(a), i(r);
261
+ }, bt = () => {
262
+ const e = Date.now();
263
+ y().play().then(() => z(qe(Date.now() - e)));
264
+ }, St = (e) => re(e), yt = () => {
265
+ const e = document.querySelector(".pl-progressTooltip");
266
+ oe(e);
267
+ }, Tt = (e) => {
268
+ const l = e.split("."), n = l[0].split(":");
269
+ return {
270
+ milliseconds: parseInt(l[1], 10) || 0,
271
+ seconds: parseInt(n.pop(), 10) || 0,
272
+ minutes: parseInt(n.pop(), 10) || 0,
273
+ hours: parseInt(n.pop(), 10) || 0
274
+ };
275
+ }, Ce = (e) => {
276
+ const l = Tt(e);
277
+ return parseInt(
278
+ l.hours * (60 * 60) + l.minutes * 60 + l.seconds + l.milliseconds / 1e3,
279
+ 10
280
+ );
281
+ }, kt = (e) => {
282
+ const l = e.split(/#xywh=/i), i = l[0], r = l[1].match(/[0-9]+/gi);
283
+ return {
284
+ x: r[0],
285
+ y: r[1],
286
+ w: r[2],
287
+ h: r[3],
288
+ image: i
289
+ };
290
+ }, Pt = (e, l) => e.indexOf("//") >= 0 ? e : l.indexOf("//") === 0 ? [l.replace(/\/$/gi, ""), e.trim()].join("/") : l.indexOf("//") > 0 ? [l.trim(), e.trim()].join("/") : e, Nt = (e, l) => {
291
+ const i = {};
292
+ let n = l.split(/\/\w+\.vtt\s?/)[0];
293
+ if (e = Pt(e, n), !e.match(/#xywh=/i))
294
+ return i.background = 'url("' + e + l.split(/\/\w+\.vtt\s?/)[1] + '")', i;
295
+ const r = kt(e);
296
+ return i.background = 'url("' + r.image + l.split(/\/\w+\.vtt\s?/)[1] + '") no-repeat -' + r.x + "px -" + r.y + "px", i.width = r.w + "px", i.height = r.h + "px", i.url = r.image, i;
297
+ }, Ct = (e, l) => {
298
+ fetch(e).then((i) => {
299
+ if (!i.ok)
300
+ throw b.dispatch(
301
+ Ae({
302
+ ...b.getState().videoData.details,
303
+ vtt: void 0,
304
+ vtt_mobile: void 0
305
+ })
306
+ ), new Error("Network response was not ok");
307
+ return i.text();
308
+ }).then((i) => {
309
+ const n = [];
310
+ i.split(/[\r\n][\r\n]/i).forEach((a) => {
311
+ if (a.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3}).*/gi)) {
312
+ const m = a.split(/[\r\n]/i), p = m[0].split(/ ?--> ?/i), h = p[0], S = p[1], f = m[1], w = Nt(f, e);
313
+ n.push({
314
+ start: Ce(h),
315
+ end: Ce(S),
316
+ css: w
317
+ });
318
+ }
319
+ }), l(n);
320
+ }).catch((i) => {
321
+ console.error("Error fetching file:", i);
322
+ });
323
+ }, Lt = (e, l, i) => {
324
+ for (let n = 0; n < l.length; ++n) {
325
+ const r = l[n];
326
+ if (e >= r.start && e < r.end) {
327
+ if (r.css.url && !i[r.css.url]) {
328
+ const a = {
329
+ background: r.css.background,
330
+ width: r.css.width,
331
+ height: r.css.height
332
+ };
333
+ return i[r.css.url] = a, a;
334
+ } else if (r.css.url) return i[r.css.url];
335
+ }
336
+ }
337
+ }, Et = () => {
338
+ const { details: e } = g(({ videoData: { details: c } }) => ({ details: c }), v), { tooltipTime: l } = g(
339
+ ({ controller: { tooltipTime: c, activeElements: p, isFullScreen: h } }) => ({ tooltipTime: c, activeElements: p, isFullScreen: h }),
340
+ v
341
+ ), i = {}, [n, r] = k(void 0), [a, m] = k(s(o.isTouchScreen) ? e.vtt_mobile : e.vtt);
342
+ return C(() => {
343
+ m(e.vtt_mobile);
344
+ }, [e.vtt_mobile]), C(() => {
345
+ a && Ct(e.vtt_mobile, r);
346
+ }, [a]), s(o.isActiveElements) ? /* @__PURE__ */ u(
347
+ "div",
348
+ {
349
+ className: `pl-progressTooltip pl-absolute pl-bottom-[calc(100%+10px)] pl-mr-[-25px] pl-flex pl-flex-col pl-px-[10px] pl-pt-[5px] pl-text-[14px] pl-text-white ${a && n ? "" : "pl-bg-z-gray-700"} pl-rounded-[6px] pl-opacity-0`,
350
+ children: [
351
+ a && !!n && /* @__PURE__ */ t("div", { className: "pl-mb-2 pl-flex-1 pl-rounded-[8px] pl-border pl-border-white", children: /* @__PURE__ */ t("div", { className: "pl-rounded-[8px]", style: Lt(l, n, i) }) }),
352
+ /* @__PURE__ */ t("div", { className: "pl-progressTimeTooltip pl-flex pl-items-center pl-justify-center pl-text-white !pl-opacity-100" })
353
+ ]
354
+ }
355
+ ) : /* @__PURE__ */ t(P, {});
356
+ }, $t = U(Et), J = (e, l) => {
357
+ C(() => {
358
+ const i = (n) => {
359
+ !e.current || e.current.contains(n.target) || l(n);
360
+ };
361
+ return document.addEventListener("mousedown", i), document.addEventListener("touchstart", i), () => {
362
+ document.removeEventListener("mousedown", i), document.removeEventListener("touchstart", i);
363
+ };
364
+ }, [e, l]);
365
+ }, ge = ({ name: e, className: l, dataMarker: i }) => /* @__PURE__ */ t("img", { "data-marker": i, src: `${He()}/${e}.png`, alt: e, className: l }), It = () => {
366
+ const { duration: e, activeElements: l } = g(
367
+ ({ controller: { duration: d, activeElements: x, isFullScreen: M } }) => ({
368
+ duration: d,
369
+ activeElements: x,
370
+ isFullScreen: M
371
+ }),
372
+ v
373
+ ), { markers: i } = g(
374
+ ({ videoData: { markers: d, videoElementSizeInfo: x } }) => ({ markers: d, videoElementSizeInfo: x }),
375
+ v
376
+ ), [n, r] = k(void 0), [a, m] = k([]), [c, p] = k({}), [h, S] = k(!1), f = (d) => e ? ie() * d / e : 0, w = (d, x, M, Q, R, q, H, ae) => {
377
+ d.stopPropagation();
378
+ const Z = 24 * x / (ie() + 5);
379
+ let O = [], pe = 0;
380
+ ae.map((W) => {
381
+ W.time > x - Z && W.time < x + Z && (O.push(W), pe += W.time);
382
+ }), O.length > 1 ? m(O) : (O = [], m([]), L(d, x, M, Q, R, q, H));
383
+ }, L = (d, x, M, Q, R, q, H) => {
384
+ d.stopPropagation(), re(d, H), xe(y().currentTime, x), y().currentTime = x, j() && (j().style.width = f(x)), z(Me(M, x, Q, R, q));
385
+ };
386
+ C(() => {
387
+ s(o.isActiveElements) || m([]);
388
+ }, [l]);
389
+ const I = _(null);
390
+ J(I, () => m([])), C(() => {
391
+ if (a.length > 0) {
392
+ const d = We(document.getElementsByClassName("pl-overlapMarkers")[0]);
393
+ if (d === "inViewport")
394
+ return S(!0), p({ left: f(a[0].time) });
395
+ if (d === "OutViewPortFromLeft")
396
+ return S(!1), p({ left: 0 });
397
+ if (d === "OutViewPortFromRight")
398
+ return S(!1), p({ right: 0 });
399
+ }
400
+ }, [a, document.getElementsByClassName("pl-overlapMarkers")[0]]);
401
+ const $ = (d) => {
402
+ d.preventDefault(), s(o.isTouchScreen) && r(Number(d.target.getAttribute("data-marker")));
403
+ };
404
+ return /* @__PURE__ */ u(P, { children: [
405
+ i.map((d) => /* @__PURE__ */ t(
406
+ "div",
407
+ {
408
+ onContextMenu: $,
409
+ "data-marker": d.time,
410
+ onClick: (x) => w(x, d.time, d.id, d.title, d.description, d.sticker, !0, i),
411
+ onDoubleClick: (x) => x.stopPropagation(),
412
+ children: /* @__PURE__ */ u(
413
+ "div",
414
+ {
415
+ className: `pl-emoji-image pl-absolute pl-bottom-[200%] pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-p-1 ${s(o.isTouchScreenPortrait), "pl-mb-5"} pl-ml-[-12px] pl-cursor-pointer`,
416
+ style: { left: f(d.time), zIndex: F.markers },
417
+ "data-marker": d.time,
418
+ children: [
419
+ d.isPersonal !== null && d.isPersonal !== void 0 && /* @__PURE__ */ t("div", { className: "pl-bg-main pl-absolute pl-right-[-1px] pl-top-[-2px] pl-h-2 pl-w-2 pl-rounded-full" }),
420
+ /* @__PURE__ */ t(ge, { dataMarker: d.time, name: d.sticker, className: "pl-h-[16px] pl-w-[16px] !pl-max-w-max" })
421
+ ]
422
+ }
423
+ )
424
+ },
425
+ d.id
426
+ )),
427
+ a.length > 0 && /* @__PURE__ */ t(
428
+ "div",
429
+ {
430
+ className: `pl-overlapMarkers ${h ? "pl-overlayMarkersInViewport" : "pl-overlayMarkersOutViewport"} animate__animated animate__fadeInUp pl-absolute pl-bottom-[45px] pl-ml-[-10px] pl-flex pl-flex-row-reverse pl-justify-end pl-gap-3 pl-rounded-[6px] pl-bg-z-gray-700/[0.4] pl-px-1 pl-py-2 pl-opacity-100`,
431
+ ref: I,
432
+ style: c,
433
+ children: a.map((d) => /* @__PURE__ */ t(
434
+ "div",
435
+ {
436
+ className: "pl-emoji-image pl-cursor-pointer pl-rounded-[6px]",
437
+ "data-marker": d.time,
438
+ onClick: (x) => L(
439
+ x,
440
+ d.time,
441
+ d.id,
442
+ d.title,
443
+ d.description,
444
+ d.sticker,
445
+ !0
446
+ ),
447
+ onDoubleClick: (x) => x.stopPropagation(),
448
+ children: /* @__PURE__ */ t(
449
+ ge,
450
+ {
451
+ dataMarker: d.time,
452
+ name: d.sticker,
453
+ className: "pl-h-[24px] pl-w-[24px] !pl-max-w-max"
454
+ }
455
+ )
456
+ },
457
+ d.id
458
+ ))
459
+ }
460
+ )
461
+ ] });
462
+ }, Mt = U(It), _t = () => {
463
+ const [e, l] = k(!1);
464
+ C(() => {
465
+ oe(document.querySelector(".progressTooltip"));
466
+ }, []);
467
+ const { duration: i, currentTime: n, bufferedTimeWidth: r } = g(
468
+ ({ controller: { duration: c, currentTime: p, bufferedTimeWidth: h } }) => ({
469
+ duration: c,
470
+ currentTime: p,
471
+ bufferedTimeWidth: h
472
+ }),
473
+ v
474
+ );
475
+ g(
476
+ ({ videoData: { params: c, videoElementSizeInfo: p } }) => ({
477
+ params: c,
478
+ videoElementSizeInfo: p
479
+ }),
480
+ v
481
+ );
482
+ const [a, m] = k([]);
483
+ return /* @__PURE__ */ u("div", { className: "pl-relative", children: [
484
+ /* @__PURE__ */ u("div", { className: "pl-relative", children: [
485
+ /* @__PURE__ */ t($t, {}),
486
+ /* @__PURE__ */ t(Mt, {})
487
+ ] }),
488
+ /* @__PURE__ */ t(
489
+ "div",
490
+ {
491
+ className: "pl-flex pl-w-full pl-items-end",
492
+ onPointerDown: (c) => vt(c, a, l),
493
+ onPointerMove: De,
494
+ onPointerUp: (c) => xt(c, m, a, l),
495
+ onMouseMove: St,
496
+ onMouseOut: yt,
497
+ onClick: bt,
498
+ onDoubleClick: (c) => c.stopPropagation(),
499
+ children: /* @__PURE__ */ u("div", { id: "progress-area", className: "pl-absolute pl-w-full", children: [
500
+ /* @__PURE__ */ t("div", { className: "pl-h-[40px] pl-w-full" }),
501
+ /* @__PURE__ */ u(
502
+ "div",
503
+ {
504
+ id: "time-progress-area",
505
+ className: "pl-m-auto !pl-h-[5px] !pl-w-full pl-cursor-pointer pl-rounded !pl-bg-gray-highLight pl-transition-transform pl-duration-300",
506
+ style: { transform: e ? "scaleY(1.8)" : "unset" },
507
+ children: [
508
+ /* @__PURE__ */ t(
509
+ "div",
510
+ {
511
+ id: "time-progress-buffer",
512
+ className: "pl-absolute pl-h-[5px] pl-rounded pl-bg-z-gray-400/[0.7]",
513
+ style: { width: `${r}%` }
514
+ }
515
+ ),
516
+ /* @__PURE__ */ t(
517
+ "div",
518
+ {
519
+ id: "time-progress-bar",
520
+ className: `pl-relative pl-h-[5px] pl-cursor-pointer pl-rounded pl-bg-primary before:pl-inline-block before:pl-h-4 before:pl-w-4 before:pl-bg-primary ${e && "before:pl-h-3 before:pl-w-7"}`,
521
+ style: { width: `${n / i * ie()}px` }
522
+ }
523
+ )
524
+ ]
525
+ }
526
+ )
527
+ ] })
528
+ }
529
+ )
530
+ ] });
531
+ }, X = ({ title: e, className: l }) => /* @__PURE__ */ t(
532
+ "span",
533
+ {
534
+ className: `pl-absolute pl-w-max pl-bg-paper pl-text-white/[0.9] ${s(o.isFullScreen) ? "pl-bottom-[300%]" : "pl-bottom-[270%]"} pl-rounded-[8px] pl-px-4 pl-py-[13px] pl-text-[10px] pl-font-normal ${l}`,
535
+ children: e
536
+ }
537
+ ), Ft = () => {
538
+ const { isFullScreen: e } = g(({ controller: { firstPlay: r, isFullScreen: a } }) => ({ firstPlay: r, isFullScreen: a }), v), [l, i] = k(!1), n = B();
539
+ return C(() => {
540
+ s(o.isFirstPlay) || n(E(!1));
541
+ }, [e]), /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", children: [
542
+ /* @__PURE__ */ t(
543
+ "img",
544
+ {
545
+ src: s(o.isFullScreen) ? T.nonFullScreen : T.fullScreen,
546
+ alt: "fullScreen-icon",
547
+ className: "pl-size-5 pl-cursor-pointer",
548
+ onMouseOver: () => !s(o.isTouchScreen) && i(!0),
549
+ onMouseLeave: () => !s(o.isTouchScreen) && i(!1),
550
+ onClick: () => {
551
+ Ue(), Qe();
552
+ }
553
+ }
554
+ ),
555
+ l && /* @__PURE__ */ t(X, { title: `${s(o.isFullScreen) ? "خروج از" : ""} تمام صفحه` })
556
+ ] });
557
+ }, zt = () => {
558
+ const [e, l] = k(!1);
559
+ return /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", children: [
560
+ /* @__PURE__ */ t(
561
+ "img",
562
+ {
563
+ alt: "pictureInPicture",
564
+ onMouseOver: () => !s(o.isTouchScreen) && l(!0),
565
+ onMouseLeave: () => !s(o.isTouchScreen) && l(!1),
566
+ src: T.pictureInPicture,
567
+ className: "pl-flex pl-size-5 pl-cursor-pointer",
568
+ onClick: () => y().requestPictureInPicture()
569
+ }
570
+ ),
571
+ e && /* @__PURE__ */ t(X, { title: "تصویر در تصویر" })
572
+ ] });
573
+ }, Dt = () => {
574
+ const [e, l] = k(!1), i = B(), { settings: n } = g(({ user: { settings: c } }) => ({ settings: c }), v), r = _(n.volume), a = () => {
575
+ if (r.current !== n.volume) {
576
+ const { settings: c } = b.getState().user;
577
+ z(ue(r.current, c.volume)), r.current = c.volume, i(we({ ...c, volume: c.volume }));
578
+ }
579
+ }, m = (c) => {
580
+ const { settings: p } = b.getState().user;
581
+ c === "mute" ? (de(0), z(ue(p.volume, 0))) : (z(ue(p.volume, 100)), de(100));
582
+ };
583
+ return /* @__PURE__ */ u("div", { className: "pl-sound-icon pl-relative pl-inline-flex pl-items-center pl-gap-2", children: [
584
+ !s(o.isTouchScreen) && /* @__PURE__ */ t(
585
+ "input",
586
+ {
587
+ onMouseUp: a,
588
+ type: "range",
589
+ min: "0",
590
+ max: "100",
591
+ value: n.volume,
592
+ onChange: (c) => de(+c.target.value),
593
+ className: "pl-soundVolume rounded-full pl-cursor-pointer",
594
+ style: { background: `linear-gradient(to right, white ${n.volume}%, rgba(255,255,255,0.3) 0)` }
595
+ }
596
+ ),
597
+ /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", children: [
598
+ /* @__PURE__ */ t(
599
+ "img",
600
+ {
601
+ src: s(o.hasSound) ? T.unMute : T.mute,
602
+ alt: s(o.hasSound) ? "unmute-icon" : "mute-icon",
603
+ className: "pl-flex pl-size-5 pl-cursor-pointer pl-items-center",
604
+ onClick: () => s(o.hasSound) ? m("mute") : m("unmute"),
605
+ onDoubleClick: (c) => c.stopPropagation(),
606
+ onMouseOver: () => !s(o.isTouchScreen) && l(!0),
607
+ onMouseLeave: () => !s(o.isTouchScreen) && l(!1)
608
+ }
609
+ ),
610
+ e && /* @__PURE__ */ t(X, { className: "pl-left-0", title: "صدا" })
611
+ ] })
612
+ ] });
613
+ }, Bt = ({ className: e, onClick: l }) => /* @__PURE__ */ u(
614
+ "svg",
615
+ {
616
+ width: "24",
617
+ height: "24",
618
+ viewBox: "0 0 24 24",
619
+ fill: "none",
620
+ xmlns: "http://www.w3.org/2000/svg",
621
+ className: e,
622
+ onClick: l,
623
+ children: [
624
+ /* @__PURE__ */ t("path", { d: "M6 6L18.7742 18.7742", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
625
+ /* @__PURE__ */ t("path", { d: "M6 18.7744L18.7742 6.00022", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
626
+ ]
627
+ }
628
+ ), K = Xe(
629
+ ({
630
+ children: e,
631
+ status: l,
632
+ onClose: i,
633
+ type: n,
634
+ classNames: r,
635
+ parentClassNames: a,
636
+ styles: m,
637
+ isBlurBackground: c,
638
+ isFullHeight: p = !1,
639
+ isHeader: h,
640
+ isHasCatchUpLineOnTop: S = !1,
641
+ animation: f,
642
+ scrollbar: w = !1,
643
+ isFocusOnInput: L = !1,
644
+ headerTitle: I = "",
645
+ customHeader: $,
646
+ headerClassName: d,
647
+ showCloseIcon: x = !0
648
+ }, M) => {
649
+ const [Q, R] = k(l), [q, H] = k(0), [ae, Se] = k(0), { videoElementSizeInfo: Z } = g(
650
+ ({ videoData: { videoElementSizeInfo: D } }) => ({ videoElementSizeInfo: D }),
651
+ v
652
+ ), O = _(0);
653
+ C(() => {
654
+ let D;
655
+ return l ? R(!0) : D = setTimeout(() => {
656
+ i(!1), H(0), R(!1);
657
+ }, 500), () => clearTimeout(D);
658
+ }, [l]);
659
+ const pe = (D) => {
660
+ const ce = document.getElementById("popover-content");
661
+ O.current || (O.current = window.innerHeight - Z.top - (ce == null ? void 0 : ce.getBoundingClientRect().top)), D.stopPropagation(), window.innerHeight - Z.top - D.touches[0].clientY < O.current && H(window.innerHeight - D.touches[0].clientY), Se(F.maxPopover);
662
+ }, W = () => {
663
+ i();
664
+ }, ye = /* @__PURE__ */ u(P, { children: [
665
+ c && /* @__PURE__ */ t(
666
+ "div",
667
+ {
668
+ className: `animate__animated animate__faster pl-fixed pl-right-0 pl-top-0 pl-h-screen pl-w-screen pl-bg-black/[0.5] ${l ? "animate__fadeIn" : "animate__fadeOut"}`,
669
+ style: { zIndex: F.popoverBlurBackground }
670
+ }
671
+ ),
672
+ /* @__PURE__ */ t(
673
+ "div",
674
+ {
675
+ className: `${n === "modal" && "pl-fixed pl-left-0 pl-top-0 pl-flex pl-h-full pl-w-full pl-items-end pl-justify-center sm:pl-items-center"} ${a}`,
676
+ style: { zIndex: p && !L ? ae : F.popoverContent },
677
+ children: /* @__PURE__ */ t(
678
+ "div",
679
+ {
680
+ className: `animate__animated animate__faster pl-flex pl-flex-col pl-rounded-lg pl-bg-new-net_1-9 pl-text-white ${p && "pl-h-full"} ${f || (window.innerWidth > 768 && n === "modal" ? l ? "animate__fadeIn" : "animate__fadeOut" : l ? "animate__fadeInUp" : "animate__fadeOutDown")} ${s(o.isTouchScreenPortrait) ? "!pl-fixed !pl-bottom-0 !pl-left-0 !pl-right-0 !pl-mb-0 !pl-w-full pl-rounded-[12px] !pl-rounded-b-none !pl-bg-bg-primary" : "before:pl-hidden"} ${n !== "modal" && "no-scrollbar pl-absolute pl-bottom-[130%] pl-overflow-auto"} ${r} `,
681
+ style: {
682
+ height: q || "max-content",
683
+ maxHeight: "80vh",
684
+ zIndex: F.popoverContent,
685
+ ...m
686
+ },
687
+ ref: M,
688
+ id: "popover-content",
689
+ children: /* @__PURE__ */ u(P, { children: [
690
+ h && /* @__PURE__ */ u(
691
+ "div",
692
+ {
693
+ onTouchMove: S ? pe : () => {
694
+ },
695
+ onTouchEndCapture: S ? W : () => {
696
+ },
697
+ className: "pl-flex pl-flex-col pl-pt-4",
698
+ children: [
699
+ S && /* @__PURE__ */ t("div", { className: "pl-absolute pl-mb-4 pl-h-1 pl-w-8 pl-self-center pl-rounded-[20px] pl-bg-new-net_1-7" }),
700
+ /* @__PURE__ */ t("div", { className: `pl-mx-4 pl-mb-4 ${d}`, children: $ || /* @__PURE__ */ u("div", { className: "pl-flex pl-items-center pl-justify-between pl-py-[19px]", children: [
701
+ /* @__PURE__ */ t("p", { className: "pl-text-[18px] pl-font-bold pl-text-black dark:pl-text-white", children: I }),
702
+ x && /* @__PURE__ */ t(
703
+ Bt,
704
+ {
705
+ className: "pl-stroke-secondary-400 dark:pl-stroke-dark-5 pl-cursor-pointer",
706
+ onClick: i
707
+ }
708
+ )
709
+ ] }) })
710
+ ]
711
+ }
712
+ ),
713
+ /* @__PURE__ */ t(
714
+ "div",
715
+ {
716
+ className: `pl-h-full pl-w-full pl-overflow-y-auto ${!w && "no-scrollbar"}`,
717
+ onTouchMove: (D) => D.stopPropagation(),
718
+ children: e
719
+ }
720
+ )
721
+ ] })
722
+ }
723
+ )
724
+ }
725
+ )
726
+ ] });
727
+ return /* @__PURE__ */ t(P, { children: Q && /* @__PURE__ */ t(P, { children: n === "modal" ? it(/* @__PURE__ */ t(P, { children: ye }), document.getElementById("dialog-react-root-videoPlayer")) : /* @__PURE__ */ t("div", { children: ye }) }) });
728
+ }
729
+ );
730
+ K.displayName = "popover";
731
+ const Ot = ({ className: e, onClick: l, onMouseOver: i, onMouseLeave: n }) => /* @__PURE__ */ u(
732
+ "svg",
733
+ {
734
+ width: "18",
735
+ height: "15",
736
+ viewBox: "0 0 18 15",
737
+ fill: "none",
738
+ xmlns: "http://www.w3.org/2000/svg",
739
+ className: e,
740
+ onClick: l,
741
+ onMouseOver: i,
742
+ onMouseLeave: n,
743
+ children: [
744
+ /* @__PURE__ */ t("path", { d: "M10.5488 1.53559C8.20532 1.02852 5.66339 1.68608 3.84359 3.50588C1.15649 6.19298 1.00481 10.4572 3.39041 13.3215C3.55135 13.5148 3.8176 13.6347 4.13036 13.6347H13.8687C14.1816 13.6347 14.4476 13.5149 14.6085 13.3217C16.0815 11.5533 16.5884 9.25027 16.1258 7.11249C16.0528 6.77512 16.2671 6.44245 16.6045 6.36945C16.9418 6.29645 17.2745 6.51077 17.3475 6.84814C17.8886 9.34866 17.2968 12.0474 15.569 14.1217C15.1326 14.6455 14.489 14.8847 13.8687 14.8847H4.13036C3.50995 14.8847 2.86616 14.6453 2.42991 14.1215C-0.36559 10.765 -0.188583 5.77029 2.95971 2.622C5.09241 0.489299 8.07189 -0.279272 10.8132 0.31386C11.1505 0.386857 11.3648 0.719527 11.2918 1.0569C11.2188 1.39427 10.8862 1.60859 10.5488 1.53559Z" }),
745
+ /* @__PURE__ */ t(
746
+ "path",
747
+ {
748
+ "fill-rule": "evenodd",
749
+ "clip-rule": "evenodd",
750
+ d: "M14.9976 2.66523C15.2417 2.9093 15.2417 3.30503 14.9976 3.54911L10.7129 7.83399C10.8469 8.09798 10.9225 8.39667 10.9225 8.713C10.9225 9.78688 10.0519 10.6574 8.97805 10.6574C7.90417 10.6574 7.03362 9.78688 7.03362 8.713C7.03362 7.63912 7.90417 6.76856 8.97805 6.76856C9.27953 6.76856 9.56498 6.83718 9.81965 6.95963C9.82222 6.95697 9.82483 6.95432 9.82746 6.95168L14.1137 2.66525C14.3578 2.42116 14.7535 2.42115 14.9976 2.66523ZM9.67249 8.713C9.67249 9.09652 9.36158 9.40743 8.97805 9.40743C8.59453 9.40743 8.28362 9.09652 8.28362 8.713C8.28362 8.32947 8.59453 8.01856 8.97805 8.01856C9.36158 8.01856 9.67249 8.32947 9.67249 8.713Z"
751
+ }
752
+ )
753
+ ]
754
+ }
755
+ ), jt = [0.5, 1, 1.5, 2], Xt = ({ setSection: e, showSpeedIcon: l }) => {
756
+ const i = B();
757
+ g(({ videoData: { videoElementSizeInfo: h, params: S } }) => ({ videoElementSizeInfo: h, params: S }), v);
758
+ const { speedPopover: n } = g(({ popovers: { speedPopover: h } }) => ({ speedPopover: h }), v), { settings: r } = g(({ user: { settings: h } }) => ({ settings: h }), v), a = _(null), [m, c] = k(!1);
759
+ J(a, () => i(ee(!1))), C(() => {
760
+ y() && (y().playbackRate = r.speed);
761
+ }, []);
762
+ const p = /* @__PURE__ */ u("div", { id: N.speed, className: "animate__animated animate__fadeIn pl-flex pl-flex-col pl-gap-4 pl-pb-4 pl-text-white", children: [
763
+ /* @__PURE__ */ u("div", { className: "pl-flex pl-items-center pl-gap-3 pl-px-4", children: [
764
+ /* @__PURE__ */ t(
765
+ "img",
766
+ {
767
+ src: T.chevronRight,
768
+ alt: "chevronRight",
769
+ onClick: () => {
770
+ e && e(N.main);
771
+ },
772
+ className: "pl-size-4 pl-cursor-pointer"
773
+ }
774
+ ),
775
+ /* @__PURE__ */ t("p", { className: "pl-text-[15px] pl-font-medium", children: "سرعت پخش" })
776
+ ] }),
777
+ /* @__PURE__ */ t("ul", { className: "pl-flex pl-flex-col pl-gap-2", children: jt.map((h, S) => /* @__PURE__ */ u(
778
+ "li",
779
+ {
780
+ className: `pl-relative pl-flex pl-cursor-pointer pl-items-center pl-gap-4 pl-rounded-[4px] pl-px-4 pl-text-sm pl-font-medium desktop:pl-gap-3 ${r.speed === h && "!pl-cursor-default pl-bg-primary"} ${s(o.isTouchScreen) ? "pl-py-1.5" : "pl-py-[9.5px]"}`,
781
+ onClick: r.speed === h ? () => {
782
+ } : () => {
783
+ s(o.isStaticFormat) || z(Ze(h)), i(E(!1)), i(A(!1)), i(ee(!1)), i(we({ ...r, speed: h })), y().playbackRate = h, e && e(N.main);
784
+ },
785
+ children: [
786
+ /* @__PURE__ */ t(
787
+ "img",
788
+ {
789
+ src: T.tick,
790
+ alt: "tick",
791
+ className: `pl-h-auto pl-w-[15px] pl-opacity-0 ${r.speed === h && "pl-opacity-100"}`
792
+ }
793
+ ),
794
+ /* @__PURE__ */ u("p", { className: "pl-flex pl-w-full pl-items-center pl-gap-1", children: [
795
+ h === 1 ? "معمولی" : h,
796
+ " ",
797
+ h !== 1 && /* @__PURE__ */ t("img", { src: T.close, alt: "x", className: "pl-size-[14px]" })
798
+ ] })
799
+ ]
800
+ },
801
+ S
802
+ )) })
803
+ ] });
804
+ return /* @__PURE__ */ t(P, { children: l ? /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", ref: a, children: [
805
+ /* @__PURE__ */ t(
806
+ Ot,
807
+ {
808
+ className: "size-5 pl-size-5 pl-cursor-pointer pl-fill-white",
809
+ onClick: () => i(ee(!n)),
810
+ onMouseOver: () => !s(o.isTouchScreen) && !s(o.showSpeedPopover) && c(!0),
811
+ onMouseLeave: () => !s(o.isTouchScreen) && c(!1)
812
+ }
813
+ ),
814
+ m && /* @__PURE__ */ t(X, { title: "سرعت" }),
815
+ /* @__PURE__ */ t(
816
+ K,
817
+ {
818
+ classNames: `!pl-p-0 pl-overflow-hidden !pl-bg-white ${s(o.isTouchScreen) ? "!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none" : "!pl-w-[230px] pl-right-0 pl-mb-[33px] !pl-rounded-[12px]"} ${s(o.isTouchScreenPortrait) && "!pl-w-screen tablet:!pl-max-w-[440px] tablet:!pl-mx-auto"} ${s(o.isTouchScreenLandscape) && "pl-w-full pl-max-w-[440px]"}`,
819
+ status: n,
820
+ onClose: () => i(ee(!1)),
821
+ type: s(o.isTouchScreen) ? "modal" : "popover",
822
+ isBlurBackground: s(o.isTouchScreenPortrait),
823
+ ref: s(o.isTouchScreenPortrait) ? a : void 0,
824
+ isHeader: s(o.isTouchScreen),
825
+ customHeader: /* @__PURE__ */ t(P, {}),
826
+ isHasCatchUpLineOnTop: s(o.isTouchScreen),
827
+ children: p
828
+ }
829
+ )
830
+ ] }) : /* @__PURE__ */ t(P, { children: p }) });
831
+ }, Vt = ({ enabled: e, setEnabled: l }) => /* @__PURE__ */ t(
832
+ "div",
833
+ {
834
+ className: `pl-relative pl-h-[22px] pl-w-[37px] pl-cursor-pointer pl-rounded-[15px] pl-transition-colors pl-duration-150 pl-ease-linear ${e ? "pl-border pl-border-transparent pl-bg-primary" : "pl-border pl-border-gray-highLight pl-bg-secondary-200"}`,
835
+ onClick: l,
836
+ children: /* @__PURE__ */ t(
837
+ "div",
838
+ {
839
+ className: `pl-absolute pl-left-1 pl-top-[2px] pl-h-[16px] pl-w-[16px] pl-rounded-full pl-transition-transform pl-duration-150 pl-ease-linear ${e ? "pl-translate-x-[13px] pl-bg-white" : "-pl-translate-x-0.5 pl-bg-black/[0.16]"}`
840
+ }
841
+ )
842
+ }
843
+ ), At = ({ setSection: e }) => {
844
+ const l = B(), { subtitles: i, selectedSubtitle: n } = g(
845
+ ({ videoData: { subtitles: r, selectedSubtitle: a } }) => ({ subtitles: r, selectedSubtitle: a }),
846
+ v
847
+ );
848
+ return /* @__PURE__ */ t("div", { id: N.subtitles, className: "animate__animated animate__fadeIn pl-p-[14px]", children: /* @__PURE__ */ u("ul", { className: "pl-m-0 pl-flex pl-flex-col pl-p-0", children: [
849
+ /* @__PURE__ */ t(
850
+ "li",
851
+ {
852
+ className: `hover:pl-bg-main/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${!n && "pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,
853
+ onClick: () => {
854
+ l(E(!1)), l(A(!1)), l(Te(void 0)), e(N.main);
855
+ const r = Object.values(y().textTracks).find(
856
+ (a) => a.mode === "showing"
857
+ );
858
+ r && (r.mode = "disabled"), l(Ge("")), z(ke("empty"));
859
+ },
860
+ children: "بدون زیرنویس"
861
+ }
862
+ ),
863
+ i.map((r, a) => /* @__PURE__ */ t(
864
+ "li",
865
+ {
866
+ className: `hover:pl-bg-main/[0.1] pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-p-1 pl-pr-2 pl-text-[14px] pl-leading-6 hover:dark:pl-bg-white/[0.25] ${n && n.language === r.language && "pl-bg-main-light hover:!pl-bg-main-light pl-text-dark-5"}`,
867
+ onClick: () => {
868
+ l(E(!1)), l(A(!1)), l(Te(r)), y().textTracks[a].mode = "showing", e(N.main), z(ke(r.language));
869
+ },
870
+ children: /* @__PURE__ */ t("span", { children: r.label })
871
+ },
872
+ a
873
+ ))
874
+ ] }) });
875
+ }, Rt = U(At), qt = ({ setSection: e, showQualityLevelsIcon: l }) => {
876
+ const i = B();
877
+ let { qualityLevels: n } = g(
878
+ ({ controller: { qualityLevels: f, manualQuality: w, autoQuality: L } }) => ({
879
+ qualityLevels: f,
880
+ manualQuality: w,
881
+ autoQuality: L
882
+ }),
883
+ v
884
+ );
885
+ const { settings: r } = g(({ user: { settings: f } }) => ({ settings: f }), v), { qualityLevelsPopover: a } = g(({ popovers: { qualityLevelsPopover: f } }) => ({ qualityLevelsPopover: f }), v);
886
+ g(({ videoData: { params: f, videoElementSizeInfo: w } }) => ({ params: f, videoElementSizeInfo: w }), v);
887
+ const [m, c] = k(!1);
888
+ n = [-1, ...n];
889
+ const p = (f, w) => s(o.isAutoQuality) && w === -1 ? !0 : !s(o.isAutoQuality) && r.quality === f, h = _(null);
890
+ J(h, () => i(te(!1)));
891
+ const S = /* @__PURE__ */ t("div", { id: N.qualityLevels, className: "animate__animated animate__fadeIn pl-py-2", children: /* @__PURE__ */ t("ul", { className: "pl-flex pl-flex-col pl-gap-2", children: n.map((f, w) => /* @__PURE__ */ u(
892
+ "li",
893
+ {
894
+ className: `pl-relative pl-flex pl-cursor-pointer pl-items-center pl-rounded-[4px] pl-ps-[24.2px] pl-text-[14px] pl-font-medium ${p(w - 1, f) && "!pl-cursor-default pl-bg-primary/[0.12]"} ${s(o.isTouchScreen) ? "pl-py-[13.5px]" : "pl-py-[9.5px]"}`,
895
+ onClick: p(w - 1, f) ? () => {
896
+ } : () => {
897
+ z(Ye(f === -1 ? "auto" : `${f}P`)), i(E(!1)), i(A(!1)), i(te(!1)), i(we({ ...r, quality: f === -1 ? -1 : w - 1 })), e && e(N.main);
898
+ },
899
+ children: [
900
+ !s(o.isTouchScreen) && p(w - 1, f) && /* @__PURE__ */ t("div", { className: "pl-absolute pl-right-[11.8px]", children: /* @__PURE__ */ t("img", { src: T.tick, alt: "", width: 12, height: 9 }) }),
901
+ s(o.isTouchScreen) && /* @__PURE__ */ t(
902
+ "div",
903
+ {
904
+ className: `pl-h-5 pl-w-5 pl-rounded-full pl-border pl-border-black/[0.5] pl-p-0.5 ${p(w - 1, f) && "pl-border-primary"}`,
905
+ children: p(w - 1, f) && /* @__PURE__ */ t("div", { className: "pl-h-full pl-w-full pl-rounded-full pl-bg-primary" })
906
+ }
907
+ ),
908
+ /* @__PURE__ */ t(
909
+ "span",
910
+ {
911
+ className: `pl-w-full pl-text-[14px] pl-text-black/[0.87] ${s(o.isTouchScreen) ? "pl-pr-[21px]" : "pl-pr-[10px]"}`,
912
+ children: f === -1 ? /* @__PURE__ */ u("span", { children: [
913
+ /* @__PURE__ */ t("span", { children: "خودکار " }),
914
+ /* @__PURE__ */ t("span", { className: "pl-text-[10px] pl-font-normal pl-text-black/[0.5]", children: "(بر اساس سرعت اینترنت شما)" })
915
+ ] }) : `${f}p`
916
+ }
917
+ )
918
+ ]
919
+ },
920
+ w
921
+ )) }) });
922
+ return /* @__PURE__ */ t(P, { children: l ? /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", ref: h, children: [
923
+ /* @__PURE__ */ t(
924
+ "img",
925
+ {
926
+ src: T.qualitySetting1,
927
+ alt: "speed-icon",
928
+ onClick: () => i(te(!a)),
929
+ onMouseOver: () => !s(o.isTouchScreen) && !s(o.showQualityLevelsPopover) && c(!0),
930
+ onMouseLeave: () => !s(o.isTouchScreen) && c(!1),
931
+ className: "pl-size-5 pl-cursor-pointer"
932
+ }
933
+ ),
934
+ m && /* @__PURE__ */ t(X, { title: "کیفیت" }),
935
+ /* @__PURE__ */ t(
936
+ K,
937
+ {
938
+ classNames: `!pl-p-0 pl-overflow-hidden !pl-bg-white ${s(o.isTouchScreen) ? "!pl-fixed !pl-bottom-0 !pl-rounded-t-[20px] pl-rounded-b-none" : "pl-right-0 pl-mb-[33px] !pl-rounded-[12px] pl-w-[230px]"} ${s(o.isTouchScreenPortrait) && "!pl-w-screen tablet:pl-max-w-[440px]"} ${s(o.isTouchScreenLandscape) && "pl-w-full pl-max-w-[440px]"}`,
939
+ status: a,
940
+ onClose: () => i(te(!1)),
941
+ type: s(o.isTouchScreen) ? "modal" : "popover",
942
+ isBlurBackground: s(o.isTouchScreenPortrait),
943
+ ref: s(o.isTouchScreenPortrait) ? h : void 0,
944
+ isHeader: s(o.isTouchScreen),
945
+ customHeader: /* @__PURE__ */ t(P, {}),
946
+ isHasCatchUpLineOnTop: s(o.isTouchScreen),
947
+ children: S
948
+ }
949
+ )
950
+ ] }) : /* @__PURE__ */ t(P, { children: S }) });
951
+ }, Be = U(qt), Ht = () => {
952
+ const e = B(), { selectedSubtitle: l } = g(
953
+ ({ videoData: { params: p, subtitles: h, selectedSubtitle: S } }) => ({ params: p, subtitles: h, selectedSubtitle: S }),
954
+ v
955
+ ), { settingPopover: i } = g(({ popovers: { settingPopover: p } }) => ({ settingPopover: p }), v);
956
+ g(({ user: { settings: p } }) => ({ settings: p }), v);
957
+ const [n, r] = k(N.main), [a, m] = k(!1), c = _(null);
958
+ return J(c, () => {
959
+ e(A(!1)), setTimeout(() => r(N.main), 500);
960
+ }), /* @__PURE__ */ u("div", { className: `pl-inline-flex ${s(o.isLandscape) && "pl-relative"}`, ref: c, children: [
961
+ /* @__PURE__ */ u(
962
+ "div",
963
+ {
964
+ className: "pl-relative pl-flex pl-cursor-pointer pl-items-center",
965
+ onClick: () => e(A(!i)),
966
+ onMouseOver: () => !s(o.isTouchScreen) && !s(o.showSettingPopover) && m(!0),
967
+ onMouseLeave: () => !s(o.isTouchScreen) && m(!1),
968
+ children: [
969
+ /* @__PURE__ */ t("img", { src: T.settings, alt: "settings", className: "pl-size-5" }),
970
+ a && /* @__PURE__ */ t(X, { title: "تنظیمات" })
971
+ ]
972
+ }
973
+ ),
974
+ /* @__PURE__ */ t(
975
+ K,
976
+ {
977
+ classNames: `!pl-p-0 pl-overflow-hidden ${s(o.isTouchScreen) ? "!pl-fixed !pl-bottom-0 !pl-rounded-t-[28px] pl-rounded-b-none" : "!pl-w-[230px] pl-right-0 pl-mb-[33px]"} ${s(o.isTouchScreenPortrait) && "!pl-w-screen tablet:!pl-max-w-[285px] tablet:!pl-mx-auto"} ${s(o.isTouchScreenLandscape) && "pl-w-full pl-max-w-[285px]"}`,
978
+ status: i,
979
+ onClose: () => {
980
+ e(A(!1)), setTimeout(() => r(N.main), 500);
981
+ },
982
+ type: s(o.isTouchScreen) ? "modal" : "popover",
983
+ isBlurBackground: s(o.isTouchScreenPortrait),
984
+ ref: s(o.isTouchScreenPortrait) ? c : void 0,
985
+ isHeader: s(o.isTouchScreen),
986
+ customHeader: /* @__PURE__ */ t(P, {}),
987
+ isHasCatchUpLineOnTop: s(o.isTouchScreen),
988
+ children: /* @__PURE__ */ u(P, { children: [
989
+ n === N.main && /* @__PURE__ */ u(
990
+ "div",
991
+ {
992
+ id: N.main,
993
+ className: "animate__animated animate__fadeIn pl-flex pl-flex-col pl-gap-5 pl-rounded-[10px] pl-p-4 pl-pt-0",
994
+ children: [
995
+ !s(o.isStaticFormat) && /* @__PURE__ */ t(P, { children: /* @__PURE__ */ u(
996
+ "div",
997
+ {
998
+ className: "pl-flex pl-cursor-pointer pl-items-center pl-gap-[10px]",
999
+ onClick: () => r(N.qualityLevels),
1000
+ children: [
1001
+ /* @__PURE__ */ t("img", { src: T.qualitySetting, alt: "qualitySetting", width: 16, height: 16 }),
1002
+ /* @__PURE__ */ t("p", { className: "pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]", children: "کیفیت پخش" }),
1003
+ /* @__PURE__ */ t("img", { src: T.chevronRight, alt: "chevronRight", className: "pl-size-4" })
1004
+ ]
1005
+ }
1006
+ ) }),
1007
+ s(o.hasNoSpeed) && /* @__PURE__ */ u(
1008
+ "div",
1009
+ {
1010
+ className: "pl-flex pl-cursor-pointer pl-items-center pl-justify-between pl-gap-[10px] pl-text-white",
1011
+ onClick: () => r(N.speed),
1012
+ children: [
1013
+ /* @__PURE__ */ t("p", { className: "pl-text-sm pl-font-medium", children: "سرعت پخش" }),
1014
+ /* @__PURE__ */ t(
1015
+ "img",
1016
+ {
1017
+ src: T.chevronRight,
1018
+ alt: "chevronRight",
1019
+ onClick: () => {
1020
+ r && r(N.main);
1021
+ },
1022
+ className: "pl-size-4 pl-rotate-180 pl-cursor-pointer"
1023
+ }
1024
+ )
1025
+ ]
1026
+ }
1027
+ ),
1028
+ s(o.hasSubtitles) && s(o.isTouchScreenPortrait) && /* @__PURE__ */ u("div", { className: "pl-flex pl-cursor-pointer pl-items-center pl-gap-[10px]", children: [
1029
+ /* @__PURE__ */ t("img", { src: T.subtitleOutlineGray, alt: "subtitle-icon", className: "pl-size-5" }),
1030
+ /* @__PURE__ */ t("p", { className: "pl-ml-auto pl-text-[12px] pl-font-medium pl-text-black/[0.87]", children: "زیرنویس" }),
1031
+ /* @__PURE__ */ t(Vt, { enabled: !!l, setEnabled: be })
1032
+ ] })
1033
+ ]
1034
+ }
1035
+ ),
1036
+ n === N.qualityLevels && /* @__PURE__ */ t(Be, { setSection: r }),
1037
+ n === N.speed && /* @__PURE__ */ t(Xt, { setSection: r }),
1038
+ n === N.subtitles && /* @__PURE__ */ t(Rt, { setSection: r })
1039
+ ] })
1040
+ }
1041
+ )
1042
+ ] });
1043
+ }, Wt = U(Ht), Oe = () => {
1044
+ const { duration: e, currentTime: l } = g(
1045
+ ({ controller: { duration: i, currentTime: n } }) => ({ duration: i, currentTime: n }),
1046
+ v
1047
+ );
1048
+ return g(({ videoData: { videoElementSizeInfo: i, params: n } }) => ({ videoElementSizeInfo: i, params: n }), v), /* @__PURE__ */ t(P, { children: /* @__PURE__ */ u(
1049
+ "div",
1050
+ {
1051
+ className: `pl-mr-auto pl-w-full pl-max-w-max pl-text-[12px] pl-font-bold !pl-text-white ${s(o.isFullScreen) ? "pl-ml-8" : "pl-ml-4"} ${s(o.isTouchScreenPortrait) ? "!pl-ml-0" : "pl-absolute pl-bottom-full pl-left-0 pl-mb-[33px]"}`,
1052
+ children: [
1053
+ /* @__PURE__ */ t("span", { children: se(e) }),
1054
+ /* @__PURE__ */ t("span", { children: " / " }),
1055
+ /* @__PURE__ */ t("span", { children: se(l) })
1056
+ ]
1057
+ }
1058
+ ) });
1059
+ }, Ut = () => /* @__PURE__ */ t("img", { src: T.unlock, alt: "unlock-icon", onClick: () => Ee("lock"), className: "pl-size-5" }), Qt = () => {
1060
+ const [e, l] = k(!1);
1061
+ return g(
1062
+ ({ videoData: { selectedSubtitle: i, videoElementSizeInfo: n, params: r } }) => ({ selectedSubtitle: i, videoElementSizeInfo: n, params: r }),
1063
+ v
1064
+ ), /* @__PURE__ */ u("div", { className: "pl-relative pl-flex pl-items-center", children: [
1065
+ /* @__PURE__ */ t(
1066
+ "img",
1067
+ {
1068
+ alt: "subtitle-icon",
1069
+ src: s(o.isSelectedSubtitle) ? T.subtitleFill : T.subtitleOutline,
1070
+ className: "pl-size-5 pl-cursor-pointer",
1071
+ onClick: be,
1072
+ onDoubleClick: (i) => i.stopPropagation(),
1073
+ onMouseOver: () => !s(o.isTouchScreen) && l(!0),
1074
+ onMouseLeave: () => !s(o.isTouchScreen) && l(!1)
1075
+ }
1076
+ ),
1077
+ e && /* @__PURE__ */ t(X, { title: "زیرنویس" })
1078
+ ] });
1079
+ }, Zt = (e) => (g(({ videoData: { videoElementSizeInfo: l, params: i } }) => ({ videoElementSizeInfo: l, params: i }), v), /* @__PURE__ */ u("svg", { width: 20, height: 20, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
1080
+ /* @__PURE__ */ t("rect", { x: "3", y: "3", width: "4", height: "4", rx: "1.5" }),
1081
+ /* @__PURE__ */ t("rect", { x: "3", y: "9", width: "4", height: "4", rx: "1.5" }),
1082
+ /* @__PURE__ */ t("rect", { x: "3", y: "15", width: "4", height: "4", rx: "1.5" }),
1083
+ /* @__PURE__ */ t("rect", { x: "8", y: "16", width: "11", height: "2", rx: "1" }),
1084
+ /* @__PURE__ */ t("rect", { x: "8", y: "10", width: "11", height: "2", rx: "1" }),
1085
+ /* @__PURE__ */ t("rect", { x: "8", y: "4", width: "11", height: "2", rx: "1" })
1086
+ ] })), Gt = () => {
1087
+ const [e, l] = k(!1), { markers: i } = g(
1088
+ ({ videoData: { markers: p, params: h, videoElementSizeInfo: S } }) => ({
1089
+ markers: p,
1090
+ params: h,
1091
+ videoElementSizeInfo: S
1092
+ }),
1093
+ v
1094
+ ), { markersListPopover: n } = g(({ popovers: { markersListPopover: p } }) => ({ markersListPopover: p }), v), r = _(null), a = B();
1095
+ J(r, () => a(le(!1)));
1096
+ const m = (p, h, S, f, w) => {
1097
+ j() && (j().style.width = `${mt(p)}px`), xe(y().currentTime, p), y().currentTime = p, a(le(!1)), z(Me(h, p, S, f, w));
1098
+ }, c = () => {
1099
+ a(le(!n));
1100
+ };
1101
+ return /* @__PURE__ */ u(
1102
+ "div",
1103
+ {
1104
+ className: `pl-relative pl-flex pl-items-center pl-p-1 ${s(o.showMarkerListPopover) && "pl-bg-secondary-50/[0.4] pl-rounded-[4px]"}`,
1105
+ ref: r,
1106
+ children: [
1107
+ /* @__PURE__ */ t(
1108
+ Zt,
1109
+ {
1110
+ className: "pl-fill-dark-5 pl-cursor-pointer",
1111
+ onClick: c,
1112
+ onMouseOver: () => !s(o.isTouchScreen) && l(!0),
1113
+ onMouseLeave: () => !s(o.isTouchScreen) && l(!1)
1114
+ }
1115
+ ),
1116
+ e && /* @__PURE__ */ t(X, { title: "لیست نشانگرها (e)", className: "!pl-bottom-[180%] !pl-right-[-48px]" }),
1117
+ /* @__PURE__ */ t(
1118
+ K,
1119
+ {
1120
+ classNames: "!pl-p-0 pl-left-0 !pl-bg-white dark:!pl-bg-dark-13 !pl-rounded-[4px] pl-mb-[33px]",
1121
+ status: s(o.showMarkerListPopover),
1122
+ onClose: () => {
1123
+ a(le(!1));
1124
+ },
1125
+ headerTitle: "نشانگرها",
1126
+ isHeader: !0,
1127
+ type: "popover",
1128
+ children: /* @__PURE__ */ t("div", { className: "pl-mx-2 pl-mt-2 pl-flex pl-flex-col pl-gap-6", children: /* @__PURE__ */ t("div", { className: "pl-flex pl-flex-col pl-gap-2 pl-pb-2", children: i.map((p) => /* @__PURE__ */ t(
1129
+ "div",
1130
+ {
1131
+ onClick: () => m(p.time, p.id, p.title, p.description, p.sticker),
1132
+ className: "odd:pl-bg-main/[0.1] hover:pl-bg-main/[0.1] hover:dark:bg-white/[0.25] pl-rounded-[8px] odd:dark:pl-bg-dark-1",
1133
+ children: /* @__PURE__ */ u("div", { className: "pl-item-center pl-relative pl-mx-2 pl-flex pl-cursor-pointer pl-gap-2 pl-rounded-[4px] pl-p-2", children: [
1134
+ p.banner || !p.sticker ? /* @__PURE__ */ t(
1135
+ "img",
1136
+ {
1137
+ src: p.banner ? p.banner : "IMAGES.defaultMarkersListItemIcon",
1138
+ width: 40,
1139
+ height: 40,
1140
+ alt: p.title
1141
+ }
1142
+ ) : /* @__PURE__ */ t("div", { className: "pl-bg-secondary dark:pl-bg-secondary-50 pl-flex pl-h-[40px] pl-w-[40px] pl-items-center pl-rounded-[6px]", children: /* @__PURE__ */ t(ge, { name: p.sticker, className: "pl-mx-auto pl-h-[20px] pl-w-[20px]" }) }),
1143
+ /* @__PURE__ */ u("div", { className: "pl-text-gray-800 dark:pl-text-white", children: [
1144
+ /* @__PURE__ */ t("p", { className: "pl-mb-1 pl-flex pl-w-[130px] pl-items-center pl-overflow-hidden pl-text-ellipsis pl-whitespace-nowrap pl-text-[14px] pl-font-bold", children: /* @__PURE__ */ t("div", { children: p.title }) }),
1145
+ /* @__PURE__ */ t("p", { className: "pl-w-[200px] pl-overflow-hidden pl-text-ellipsis pl-whitespace-nowrap pl-text-[13px] pl-font-normal", children: p.description })
1146
+ ] }),
1147
+ /* @__PURE__ */ t(
1148
+ "span",
1149
+ {
1150
+ className: "pl-bg-secondary/[0.3] dark:pl-bg-secondary/[0.6] pl-absolute pl-left-9 pl-top-2 pl-rounded-[4px] pl-p-[3px] pl-text-[12px] pl-font-bold pl-text-gray-800 dark:pl-text-white",
1151
+ children: se(p.time)
1152
+ }
1153
+ )
1154
+ ] })
1155
+ },
1156
+ p.id
1157
+ )) }) })
1158
+ }
1159
+ )
1160
+ ]
1161
+ }
1162
+ );
1163
+ }, Yt = () => {
1164
+ g(({ controller: { isFullScreen: l } }) => ({ isFullScreen: l }), v), g(({ videoData: { videoElementSizeInfo: l, params: i } }) => ({ videoElementSizeInfo: l, params: i }), v);
1165
+ let e = "";
1166
+ return s(o.isTouchScreen) ? s(o.isFullScreen) && (e = "pl-mx-6") : s(o.isFullScreen) ? e = "pl-mx-8" : e = "pl-mx-4", /* @__PURE__ */ u("div", { id: "player-controllbar", className: `pl-flex pl-items-center pl-justify-between ${e}`, children: [
1167
+ /* @__PURE__ */ u("div", { className: "pl-flex pl-items-center pl-gap-4", children: [
1168
+ /* @__PURE__ */ t(Ft, {}),
1169
+ s(o.isTouchScreenLandscape) && /* @__PURE__ */ t(Ut, {}),
1170
+ s(o.showPictureInPicture) && /* @__PURE__ */ t(zt, {}),
1171
+ s(o.showSettingIcon) && /* @__PURE__ */ t(Wt, {}),
1172
+ s(o.isFullScreen) && !s(o.isStaticFormat) && /* @__PURE__ */ t(Be, { showQualityLevelsIcon: !0 }),
1173
+ s(o.hasSubtitles) && !s(o.isTouchScreenPortrait) && /* @__PURE__ */ t(Qt, {})
1174
+ ] }),
1175
+ /* @__PURE__ */ u("div", { className: "pl-flex pl-items-center pl-gap-4", children: [
1176
+ s(o.isTouchScreenPortrait) && /* @__PURE__ */ t(Oe, {}),
1177
+ !s(o.isIOS) && /* @__PURE__ */ t(Dt, {}),
1178
+ s(o.hasMarkers) && /* @__PURE__ */ t(Gt, {})
1179
+ ] })
1180
+ ] });
1181
+ }, Jt = U(Yt), Kt = () => {
1182
+ const { subtitleText: e } = g(
1183
+ ({ videoData: { subtitleText: i, selectedSubtitle: n } }) => ({ subtitleText: i, selectedSubtitle: n }),
1184
+ v
1185
+ );
1186
+ g(({ controller: { isFullScreen: i } }) => ({ isFullScreen: i }), v);
1187
+ const l = () => {
1188
+ let i = "";
1189
+ return s(o.isLock) ? i = "pl-bottom-3" : s(o.isActiveElements) ? s(o.isTouchScreenPortrait) ? i = "pl-bottom-[45px]" : s(o.isFullScreen) ? i = "pl-bottom-[120px]" : i = "pl-bottom-[85px]" : s(o.isActiveElements) || (i = "pl-bottom-3"), i;
1190
+ };
1191
+ return /* @__PURE__ */ t(
1192
+ "div",
1193
+ {
1194
+ id: "subtitle-id",
1195
+ style: { direction: "ltr" },
1196
+ className: `pl-absolute pl-w-full pl-px-6 pl-text-center pl-text-[14px] ${s(o.isFullScreen) && "pl-text-[16px]"} pl-font-normal pl-text-white ${l()}`,
1197
+ children: Je(e).map((i, n) => /* @__PURE__ */ t("p", { className: "pl-mx-auto", style: { textShadow: "0 0 4px #000000" }, children: Ke(i) }, n))
1198
+ }
1199
+ );
1200
+ }, el = () => {
1201
+ g(
1202
+ ({ controller: { lock: l, isFullScreen: i, isLoading: n, activeElements: r } }) => ({ lock: l, isFullScreen: i, isLoading: n, activeElements: r }),
1203
+ v
1204
+ ), g(({ videoData: { subtitles: l, selectedSubtitle: i } }) => ({ subtitles: l, selectedSubtitle: i }), v);
1205
+ let e = "";
1206
+ return s(o.isTouchScreen) ? s(o.isFullScreen) ? e = "pl-gap-6 pl-mb-6" : e = "pl-gap-3 pl-mb-0" : s(o.isFullScreen) ? e = "pl-gap-6 pl-mb-8" : e = "pl-gap-4 pl-mb-3", /* @__PURE__ */ t("div", { id: "footer", className: "pl-relative", style: { zIndex: F.footer }, children: /* @__PURE__ */ u(P, { children: [
1207
+ s(o.showSubtitle) && /* @__PURE__ */ t(Kt, {}),
1208
+ !s(o.isLock) && /* @__PURE__ */ t(P, { children: /* @__PURE__ */ u(
1209
+ "div",
1210
+ {
1211
+ className: `animate__animated animate__faster pl-mx-auto pl-flex pl-w-full pl-flex-col pl-px-4 pl-py-3 desktop:pl-px-0 desktop:pl-py-0 ${e} ${s(o.isActiveElements) && !s(o.isLoading) ? "animate__fadeIn pl-pointer-events-auto" : "animate__fadeOut pl-pointer-events-none"}`,
1212
+ children: [
1213
+ !s(o.isTouchScreenPortrait) && /* @__PURE__ */ t(Oe, {}),
1214
+ s(o.showProgressbar) && /* @__PURE__ */ t(_t, {}),
1215
+ /* @__PURE__ */ t(Jt, {})
1216
+ ]
1217
+ }
1218
+ ) })
1219
+ ] }) });
1220
+ }, tl = ne(() => import("./staticVideoTag-Bq3QUZG0.js")), ll = ne(() => import("./nonStaticVideoTag-CaUIINW6.js")), il = () => /* @__PURE__ */ t(me, { fallback: "", children: s(o.isStaticFormat) ? /* @__PURE__ */ t(tl, {}) : /* @__PURE__ */ t(ll, {}) }), sl = () => {
1221
+ const e = B();
1222
+ g(({ videoData: { params: l } }) => ({ params: l }), v), C(() => {
1223
+ const l = () => {
1224
+ document.fullscreenElement ? e(Pe(!0)) : (e(Pe(!1)), _e(), z(et("exitFullScreen")));
1225
+ };
1226
+ document.addEventListener && (document.addEventListener("webkitfullscreenchange", l, !1), document.addEventListener("mozfullscreenchange", l, !1), document.addEventListener("fullscreenchange", l, !1), document.addEventListener("MSFullscreenChange", l, !1));
1227
+ }, []);
1228
+ }, ol = (e, l) => {
1229
+ const i = B(), { activeElements: n } = g(({ controller: { activeElements: c } }) => ({ activeElements: c }), v), r = _(null), a = _(e), m = _(l);
1230
+ C(() => {
1231
+ a.current = e;
1232
+ }, [e]), C(() => {
1233
+ m.current = l;
1234
+ }, [l]), C(() => {
1235
+ let c = !1;
1236
+ const p = (f) => {
1237
+ const { activeElements: w, isEnded: L } = b.getState().controller;
1238
+ L ? i(E(!0)) : f.pointerType === "mouse" && (clearTimeout(r.current), w ? [
1239
+ "player-tag",
1240
+ "main-content",
1241
+ "player-controllbar",
1242
+ "video-opacity",
1243
+ "playerElements",
1244
+ "touchBackward",
1245
+ "touchForward"
1246
+ ].includes(f.target.id) && (c = !0) : i(E(!0)), r.current = setTimeout(() => {
1247
+ const { settingPopover: I, speedPopover: $, qualityLevelsPopover: d } = b.getState().popovers, { play: x } = b.getState().controller;
1248
+ !I && !$ && !d && x && c && i(E(!1));
1249
+ }, Y));
1250
+ }, h = (f) => {
1251
+ setTimeout(() => {
1252
+ const { activeElements: w, isEnded: L, firstPlay: I } = b.getState().controller;
1253
+ if (clearTimeout(r.current), L) return i(E(!0));
1254
+ Fe() && !I && !a.current && !m.current && (["player-tag", "main-content", "video-opacity", "touchBackward", "touchForward"].includes(f.target.id) || tt(f, "playerElements") ? (i(E(!w)), r.current = setTimeout(() => {
1255
+ const { settingPopover: $, speedPopover: d, qualityLevelsPopover: x } = b.getState().popovers;
1256
+ !$ && !d && !x && i(E(!1));
1257
+ }, Y)) : r.current = setTimeout(() => {
1258
+ const { settingPopover: $, speedPopover: d, qualityLevelsPopover: x } = b.getState().popovers;
1259
+ !$ && !d && !x && i(E(!1));
1260
+ }, Y));
1261
+ }, 200);
1262
+ }, S = () => {
1263
+ clearTimeout(r.current), r.current = setTimeout(() => {
1264
+ const { activeElements: f, isEnded: w } = b.getState().controller, { settingPopover: L, speedPopover: I, qualityLevelsPopover: $ } = b.getState().popovers;
1265
+ w ? i(E(!0)) : !L && !I && !$ && f && !w && i(E(!f));
1266
+ }, Y);
1267
+ };
1268
+ return document.getElementById("video-area").addEventListener("touchstart", h), document.getElementById("video-area").addEventListener("touchmove", S), document.getElementById("video-area").addEventListener("pointermove", p), () => {
1269
+ const f = document.getElementById("video-area");
1270
+ f && (f.removeEventListener("touchstart", h), f.removeEventListener("touchmove", S), f.removeEventListener("pointermove", p));
1271
+ };
1272
+ }, [n, e, l]);
1273
+ }, nl = () => {
1274
+ const { firstPlay: e, isFullScreen: l } = g(
1275
+ ({ controller: { firstPlay: i, isFullScreen: n } }) => ({ firstPlay: i, isFullScreen: n }),
1276
+ v
1277
+ );
1278
+ C(() => {
1279
+ if (y()) {
1280
+ let i;
1281
+ const n = () => {
1282
+ i = setTimeout(
1283
+ () => {
1284
+ _e();
1285
+ },
1286
+ Fe() ? 0 : 300
1287
+ );
1288
+ };
1289
+ return n(), window.addEventListener("resize", n), () => {
1290
+ window.removeEventListener("resize", n), clearTimeout(i);
1291
+ };
1292
+ }
1293
+ }, [e, l, y()]);
1294
+ }, rl = () => {
1295
+ const { firstPlay: e } = g(({ controller: { firstPlay: l } }) => ({ firstPlay: l }), v);
1296
+ g(({ videoData: { details: l } }) => ({ details: l }), v), C(() => {
1297
+ s(o.setSubtitleFirstPlay) && be();
1298
+ }, [e]);
1299
+ }, al = ne(() => import("./touchVolumeBrightness-zJwzVg8P.js")), Le = ne(() => Promise.resolve().then(() => at)), pl = () => {
1300
+ const [e, l] = k(!1), [i, n] = k(!1);
1301
+ return g(
1302
+ ({ videoData: { details: r, params: a, videoElementSizeInfo: m } }) => ({
1303
+ details: r,
1304
+ params: a,
1305
+ videoElementSizeInfo: m
1306
+ }),
1307
+ v
1308
+ ), g(
1309
+ ({ controller: { firstPlay: r, isFullScreen: a, isLoading: m, canPlayVideo: c } }) => ({
1310
+ firstPlay: r,
1311
+ isFullScreen: a,
1312
+ isLoading: m,
1313
+ canPlayVideo: c
1314
+ }),
1315
+ v
1316
+ ), sl(), nl(), ol(e, i), rl(), /* @__PURE__ */ t(P, { children: /* @__PURE__ */ u(
1317
+ "div",
1318
+ {
1319
+ id: "video-area",
1320
+ style: {
1321
+ zIndex: s(o.isFullScreen) ? F.videoPlayerInFullScreen : "unset"
1322
+ },
1323
+ onClick: (r) => s(o.isFirstPlay) && $e(r),
1324
+ onDoubleClick: (r) => lt(r),
1325
+ className: `pl-flex pl-h-full pl-max-h-screen pl-items-center pl-bg-black !pl-bg-contain !pl-bg-center !pl-bg-no-repeat desktop:pl-aspect-video ${!s(o.isTouchScreen) && !s(o.isFullScreen) && "!pl-rounded-[12px]"} ${s(o.isFullScreen) && "dvh !pl-fixed !pl-w-screen"} pl-relative pl-w-full ${!s(o.isActiveElements) && "pl-cursor-none"}`,
1326
+ children: [
1327
+ /* @__PURE__ */ t(
1328
+ "div",
1329
+ {
1330
+ id: "video-opacity",
1331
+ className: `pl-absolute pl-h-full pl-w-full pl-bg-black pl-transition-all pl-duration-500 desktop:pl-aspect-video ${!s(o.isTouchScreen) && !s(o.isFullScreen) && "!pl-rounded-[12px]"} ${s(o.isActiveElements) ? "pl-bg-opacity-50" : "pl-bg-opacity-0"}`
1332
+ }
1333
+ ),
1334
+ /* @__PURE__ */ t(me, { fallback: "", children: s(o.showTouchVolumeBrightness) && /* @__PURE__ */ t(al, {}) }),
1335
+ s(o.showBackwardForward) && /* @__PURE__ */ t(me, { fallback: "", children: /* @__PURE__ */ u(
1336
+ "div",
1337
+ {
1338
+ className: "pl-absolute pl-right-0 pl-top-0 pl-flex pl-h-full pl-w-full pl-items-center pl-overflow-hidden",
1339
+ style: {
1340
+ zIndex: i || e ? F.backwardForwardActive : F.backwardForwardInActive
1341
+ },
1342
+ children: [
1343
+ /* @__PURE__ */ t(
1344
+ Le,
1345
+ {
1346
+ type: "touchForward",
1347
+ isRightDoubleTouched: e,
1348
+ setIsRightDoubleTouched: l
1349
+ }
1350
+ ),
1351
+ /* @__PURE__ */ t(
1352
+ Le,
1353
+ {
1354
+ type: "touchBackward",
1355
+ isLeftDoubleTouched: i,
1356
+ setIsLeftDoubleTouched: n
1357
+ }
1358
+ )
1359
+ ]
1360
+ }
1361
+ ) }),
1362
+ /* @__PURE__ */ t(il, {}),
1363
+ /* @__PURE__ */ t("div", { id: "playerElements", className: "pl-absolute pl-right-0 pl-top-0 pl-h-full pl-w-full", children: /* @__PURE__ */ u("div", { className: "pl-flex pl-h-full pl-w-full pl-flex-col pl-justify-between", children: [
1364
+ s(o.showHeader) && /* @__PURE__ */ t(nt, {}),
1365
+ s(o.showMain) && /* @__PURE__ */ t(ut, {}),
1366
+ s(o.showFooter) && /* @__PURE__ */ t(el, {})
1367
+ ] }) })
1368
+ ]
1369
+ }
1370
+ ) });
1371
+ }, fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1372
+ __proto__: null,
1373
+ default: pl
1374
+ }, Symbol.toStringTag, { value: "Module" }));
1375
+ export {
1376
+ pl as V,
1377
+ hl as c,
1378
+ fl as v
1379
+ };