shadow-plyr 1.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Simrndeep Singh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,388 @@
1
+ # ๐ŸŽฌ Shadow Plyr
2
+
3
+ > A fully customizable, production-grade Web Component video player built with TypeScript, Shadow DOM and zero framework dependency.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/shadow-plyr.svg)](https://www.npmjs.com/package/shadow-plyr)
6
+ [![license](https://img.shields.io/npm/l/shadow-plyr.svg)](LICENSE)
7
+ [![bundle size](https://img.shields.io/bundlephobia/minzip/shadow-plyr)](https://bundlephobia.com/package/shadow-plyr)
8
+
9
+ ---
10
+
11
+ ## โœจ Features
12
+
13
+ - ๐ŸŽฏ Native Web Component `<shadow-plyr>`
14
+ - โšก Lazy loading + smart visibility pause
15
+ - ๐Ÿ“ฑ Mobile optimized
16
+ - ๐Ÿ‘† Double tap seek (YouTube style)
17
+ - ๐Ÿ‘†๐Ÿ‘†๐Ÿ‘† Triple tap seek (30s skip)
18
+ - ๐ŸŒŠ Tap ripple animation
19
+ - ๐ŸŽ› Custom controls
20
+ - ๐ŸŽจ Fully themeable via CSS variables
21
+ - ๐Ÿ” Secure SVG sanitization
22
+ - ๐Ÿงต Virtual playback mode (only one video plays)
23
+ - ๐Ÿ“ฆ Framework agnostic (React / Vue / Angular / Vanilla)
24
+
25
+ ---
26
+
27
+ # ๐Ÿ“ฆ Installation
28
+
29
+ ## Using npm
30
+
31
+ ```bash
32
+ npm install shadow-plyr
33
+ ```
34
+
35
+ Then import:
36
+
37
+ ```ts
38
+ import 'shadow-plyr';
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Using CDN
44
+
45
+ ```html
46
+ <script type="module" src="https://unpkg.com/shadow-plyr/dist/shadow-plyr.js"></script>
47
+ ```
48
+
49
+ ---
50
+
51
+ # ๐Ÿš€ Basic Usage
52
+
53
+ ```html
54
+ <shadow-plyr
55
+ desktop-video="video.mp4"
56
+ desktop-poster="poster.jpg"
57
+ show-controls="true"
58
+ show-center-play="true">
59
+ </shadow-plyr>
60
+ ```
61
+
62
+ ---
63
+
64
+ # ๐Ÿ“ฑ Mobile Gestures
65
+
66
+ | Gesture | Action |
67
+ |----------|--------|
68
+ | Double tap left | -10 seconds |
69
+ | Double tap right | +10 seconds |
70
+ | Triple tap left | -30 seconds |
71
+ | Triple tap right | +30 seconds |
72
+ | Drag seekbar | Scrub |
73
+ | Tap ripple | Visual animation |
74
+
75
+ ---
76
+
77
+ # โš™๏ธ Full Configuration Reference
78
+
79
+ ## ๐ŸŽฌ Video Settings
80
+
81
+ ```html
82
+ <shadow-plyr
83
+ desktop-video="video.mp4"
84
+ mobile-video="video-mobile.mp4"
85
+ desktop-poster="poster.jpg"
86
+ mobile-poster="poster-mobile.jpg"
87
+ video-type="video/mp4"
88
+ preload="metadata"
89
+ autoplay="true"
90
+ muted="true"
91
+ loop="true"
92
+ playsinline="true">
93
+ </shadow-plyr>
94
+ ```
95
+
96
+ ---
97
+
98
+ ## ๐ŸŽ› Controls Configuration
99
+
100
+ ```html
101
+ <shadow-plyr
102
+ show-controls="true"
103
+ show-play-pause="true"
104
+ show-seekbar="true"
105
+ show-volume="true"
106
+ show-fullscreen="true"
107
+ show-speed="true"
108
+ speed-options="0.5,0.75,1,1.25,1.5,2">
109
+ </shadow-plyr>
110
+ ```
111
+
112
+ ---
113
+
114
+ ## ๐Ÿ‘† Double & Triple Tap
115
+
116
+ ```html
117
+ <shadow-plyr
118
+ double-tap-seek="true"
119
+ double-tap-seek-seconds="10"
120
+ triple-tap-seek="true"
121
+ triple-tap-seconds="30"
122
+ enable-tap-ripple="true">
123
+ </shadow-plyr>
124
+ ```
125
+
126
+ Disable triple tap:
127
+
128
+ ```html
129
+ <shadow-plyr triple-tap-seek="false"></shadow-plyr>
130
+ ```
131
+
132
+ ---
133
+
134
+ ## ๐Ÿ”˜ Overlay Seek Buttons
135
+
136
+ ```html
137
+ <shadow-plyr
138
+ show-seek-buttons="true"
139
+ seek-button-seconds="15">
140
+ </shadow-plyr>
141
+ ```
142
+
143
+ ---
144
+
145
+ ## โšก Performance Mode
146
+
147
+ ```html
148
+ <shadow-plyr performance-mode="true"></shadow-plyr>
149
+ ```
150
+
151
+ Optimized for pages with many videos.
152
+
153
+ ---
154
+
155
+ ## ๐Ÿง  Smart Visibility
156
+
157
+ ```html
158
+ <shadow-plyr
159
+ lazy="true"
160
+ pause-on-out-of-view="true"
161
+ pause-on-tab-hide="true"
162
+ lazy-threshold="0.5"
163
+ pause-threshold="0.3">
164
+ </shadow-plyr>
165
+ ```
166
+
167
+ ---
168
+
169
+ ## ๐Ÿ” Virtual Playback Mode
170
+
171
+ ```html
172
+ <shadow-plyr virtual-playback="true"></shadow-plyr>
173
+ ```
174
+
175
+ Only one video plays at a time.
176
+
177
+ ---
178
+
179
+ # ๐ŸŽจ Theming
180
+
181
+ ## Dark Theme
182
+
183
+ ```html
184
+ <shadow-plyr
185
+ theme="dark"
186
+ accent-color="#ff3b30"
187
+ controls-background="rgba(0,0,0,0.9)"
188
+ center-play-background="rgba(0,0,0,0.8)"
189
+ center-play-size="100">
190
+ </shadow-plyr>
191
+ ```
192
+
193
+ ## Light Theme
194
+
195
+ ```html
196
+ <shadow-plyr theme="light"></shadow-plyr>
197
+ ```
198
+
199
+ ---
200
+
201
+ ## ๐ŸŽจ CSS Custom Properties
202
+
203
+ You can override styles externally:
204
+
205
+ ```css
206
+ shadow-plyr {
207
+ --accent-color: #00ffcc;
208
+ --controls-bg: rgba(0,0,0,0.95);
209
+ --center-play-size: 90px;
210
+ }
211
+ ```
212
+
213
+ ---
214
+
215
+ # ๐Ÿงฉ Custom SVG Icons
216
+
217
+ ```html
218
+ <shadow-plyr
219
+ play-icon="<svg>...</svg>"
220
+ pause-icon="<svg>...</svg>"
221
+ volume-icon="<svg>...</svg>"
222
+ muted-icon="<svg>...</svg>"
223
+ fullscreen-icon="<svg>...</svg>"
224
+ exit-fullscreen-icon="<svg>...</svg>"
225
+ speed-icon="<svg>...</svg>">
226
+ </shadow-plyr>
227
+ ```
228
+
229
+ Icons are sanitized automatically.
230
+
231
+ ---
232
+
233
+ # ๐Ÿง‘โ€๐Ÿ’ป JavaScript API
234
+
235
+ ```ts
236
+ const player = document.querySelector('shadow-plyr');
237
+
238
+ player.play();
239
+ player.pause();
240
+ player.mute();
241
+ player.unmute();
242
+ player.seek(120);
243
+ ```
244
+
245
+ ---
246
+
247
+ # ๐Ÿ“ก Events
248
+
249
+ ```ts
250
+ player.addEventListener('video-playing', (e) => {
251
+ console.log('Playing', e.detail);
252
+ });
253
+ ```
254
+
255
+ ### Available Events
256
+
257
+ | Event | Description |
258
+ |--------|-------------|
259
+ | video-ready | Metadata loaded |
260
+ | video-playing | Playback started |
261
+ | video-paused | Playback paused |
262
+ | video-ended | Playback ended |
263
+ | video-seeking | Seeking started |
264
+ | video-seeked | Seeking finished |
265
+ | video-volume-change | Volume changed |
266
+ | video-error | Load error |
267
+ | video-fullscreen-enter | Enter fullscreen |
268
+ | video-fullscreen-exit | Exit fullscreen |
269
+
270
+ ---
271
+
272
+ # ๐Ÿงช Real World Presets
273
+
274
+ ---
275
+
276
+ ## ๐ŸŽฌ Netflix Style
277
+
278
+ ```html
279
+ <shadow-plyr
280
+ show-controls="true"
281
+ show-center-play="true"
282
+ double-tap-seek="true"
283
+ triple-tap-seek="true"
284
+ enable-tap-ripple="true"
285
+ theme="dark"
286
+ accent-color="#e50914">
287
+ </shadow-plyr>
288
+ ```
289
+
290
+ ---
291
+
292
+ ## ๐Ÿ“ฑ Minimal Mobile Player
293
+
294
+ ```html
295
+ <shadow-plyr
296
+ show-controls="false"
297
+ show-center-play="true"
298
+ double-tap-seek="true"
299
+ triple-tap-seek="false">
300
+ </shadow-plyr>
301
+ ```
302
+
303
+ ---
304
+
305
+ ## ๐ŸŽจ Brand Custom Player
306
+
307
+ ```html
308
+ <shadow-plyr
309
+ theme="light"
310
+ accent-color="#6c5ce7"
311
+ controls-background="rgba(255,255,255,0.95)"
312
+ center-play-background="rgba(255,255,255,0.8)">
313
+ </shadow-plyr>
314
+ ```
315
+
316
+ ---
317
+
318
+ # ๐ŸŒ Browser Support
319
+
320
+ | Browser | Supported |
321
+ |----------|-----------|
322
+ | Chrome | โœ… |
323
+ | Edge | โœ… |
324
+ | Safari | โœ… |
325
+ | iOS Safari | โœ… |
326
+ | Android Chrome | โœ… |
327
+ | Firefox | โœ… |
328
+
329
+ ---
330
+
331
+ # ๐Ÿ— Built With
332
+
333
+ - Web Components
334
+ - Shadow DOM
335
+ - TypeScript
336
+ - Constructable Stylesheets
337
+ - DOMPurify
338
+
339
+ ---
340
+
341
+ ## ๐ŸŒณ Branch Strategy (Git Flow)
342
+
343
+ This project follows a structured Git workflow:
344
+
345
+ ### Branches
346
+
347
+ - `master` โ†’ Stable production releases
348
+ - `develop` โ†’ Integration branch (active development)
349
+ - `feature/*` โ†’ New features
350
+ - `fix/*` โ†’ Bug fixes
351
+ - `release/*` โ†’ Release preparation
352
+ - `hotfix/*` โ†’ Emergency production fixes
353
+
354
+ ### Contribution Flow
355
+
356
+ 1. Fork the repository
357
+ 2. Create a feature branch:
358
+ ```bash
359
+ git checkout -b feature/your-feature-name
360
+
361
+ ---
362
+
363
+ # ๐Ÿค Contributing
364
+
365
+ 1. Fork repository
366
+ 2. Create feature branch
367
+ 3. Commit changes
368
+ 4. Open PR
369
+
370
+ ---
371
+
372
+ # ๐Ÿ“„ License
373
+
374
+ MIT
375
+
376
+ ---
377
+
378
+ # โญ Why Shadow Plyr?
379
+
380
+ Native `<video controls>` is limited.
381
+
382
+ Shadow Plyr provides:
383
+
384
+ - Full customization
385
+ - Modern mobile gestures
386
+ - Performance optimization
387
+ - Clean architecture
388
+ - Production-ready UX
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ function e(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function t(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(e,n):o?o.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError;const n='<svg viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>',i='<svg viewBox="0 0 24 24"><path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/></svg>',o='<svg viewBox="0 0 24 24"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>',s='<svg viewBox="0 0 24 24"><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/></svg>',a='<svg viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>',r='<svg viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>',l='<svg viewBox="0 0 24 24"><path d="M20.38 8.57l-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83z"/></svg>',c=new Map;
2
+ /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
3
+ const{entries:d,setPrototypeOf:p,isFrozen:u,getPrototypeOf:h,getOwnPropertyDescriptor:m}=Object;let{freeze:f,seal:v,create:b}=Object,{apply:g,construct:y}="undefined"!=typeof Reflect&&Reflect;f||(f=function(e){return e}),v||(v=function(e){return e}),g||(g=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return e.apply(t,i)}),y||(y=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});const w=D(Array.prototype.forEach),E=D(Array.prototype.lastIndexOf),k=D(Array.prototype.pop),A=D(Array.prototype.push),T=D(Array.prototype.splice),x=D(String.prototype.toLowerCase),S=D(String.prototype.toString),C=D(String.prototype.match),N=D(String.prototype.replace),L=D(String.prototype.indexOf),M=D(String.prototype.trim),_=D(Object.prototype.hasOwnProperty),O=D(RegExp.prototype.test),R=(P=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y(P,t)});var P;function D(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return g(e,t,i)}}function z(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;p&&p(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(u(t)||(t[i]=e),o=e)}e[o]=!0}return e}function I(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function F(e){const t=b(null);for(const[n,i]of d(e)){_(e,n)&&(Array.isArray(i)?t[n]=I(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=F(i):t[n]=i)}return t}function W(e,t){for(;null!==e;){const n=m(e,t);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}e=h(e)}return function(){return null}}const U=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),H=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=f(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),q=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),G=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=f(["#text"]),j=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),X=f(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=f(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=v(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J=v(/<%[\w\W]*|[\w\W]*%>/gm),Q=v(/\$\{[\w\W]*/gm),ee=v(/^data-[\-\w.\u00B7-\uFFFF]+$/),te=v(/^aria-[\-\w]+$/),ne=v(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=v(/^(?:\w+script|data):/i),oe=v(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),se=v(/^html$/i),ae=v(/^[a-z][.\w]*(-[.\w]+)+$/i);var re=Object.freeze({__proto__:null,ARIA_ATTR:te,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:ae,DATA_ATTR:ee,DOCTYPE_NAME:se,ERB_EXPR:J,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:Z,TMPLIT_EXPR:Q});const le=1,ce=3,de=7,pe=8,ue=9,he=function(){return"undefined"==typeof window?null:window};var me,fe,ve,be,ge,ye,we,Ee,ke,Ae,Te,xe,Se,Ce,Ne,Le,Me,_e,Oe,Re,Pe,De,ze,Ie,Fe,We,Ue,Be,He,Ve,qe,Ge,Ye,je,Xe,$e,Ke,Ze,Je,Qe,et,tt,nt,it,ot,st,at,rt,lt,ct,dt,pt,ut,ht,mt,ft,vt,bt,gt,yt,wt,Et,kt,At,Tt,xt,St,Ct,Nt,Lt,Mt,_t,Ot,Rt,Pt,Dt,zt,It,Ft,Wt,Ut,Bt,Ht,Vt,qt,Gt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||t.document.nodeType!==ue||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const o=i,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:p,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:v}=t,g=c.prototype,y=W(g,"cloneNode"),P=W(g,"remove"),D=W(g,"nextSibling"),I=W(g,"childNodes"),Z=W(g,"parentNode");if("function"==typeof r){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ie,getElementsByTagName:oe}=i,{importNode:ae}=o;let me={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof d&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:ve,TMPLIT_EXPR:be,DATA_ATTR:ge,ARIA_ATTR:ye,IS_SCRIPT_OR_DATA:we,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:ke}=re;let{IS_ALLOWED_URI:Ae}=re,Te=null;const xe=z({},[...U,...B,...H,...q,...Y]);let Se=null;const Ce=z({},[...j,...X,...$,...K]);let Ne=Object.seal(b(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Me=null;const _e=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,Re=!0,Pe=!1,De=!0,ze=!1,Ie=!0,Fe=!1,We=!1,Ue=!1,Be=!1,He=!1,Ve=!1,qe=!0,Ge=!1,Ye=!0,je=!1,Xe={},$e=null;const Ke=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=z({},["audio","video","img","source","image","track"]);let Qe=null;const et=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let ot=it,st=!1,at=null;const rt=z({},[tt,nt,it],S);let lt=z({},["mi","mo","mn","ms","mtext"]),ct=z({},["annotation-xml"]);const dt=z({},["title","style","font","a","script"]);let pt=null;const ut=["application/xhtml+xml","text/html"];let ht=null,mt=null;const ft=i.createElement("form"),vt=function(e){return e instanceof RegExp||e instanceof Function},bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=F(e),pt=-1===ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ht="application/xhtml+xml"===pt?S:x,Te=_(e,"ALLOWED_TAGS")?z({},e.ALLOWED_TAGS,ht):xe,Se=_(e,"ALLOWED_ATTR")?z({},e.ALLOWED_ATTR,ht):Ce,at=_(e,"ALLOWED_NAMESPACES")?z({},e.ALLOWED_NAMESPACES,S):rt,Qe=_(e,"ADD_URI_SAFE_ATTR")?z(F(et),e.ADD_URI_SAFE_ATTR,ht):et,Ze=_(e,"ADD_DATA_URI_TAGS")?z(F(Je),e.ADD_DATA_URI_TAGS,ht):Je,$e=_(e,"FORBID_CONTENTS")?z({},e.FORBID_CONTENTS,ht):Ke,Le=_(e,"FORBID_TAGS")?z({},e.FORBID_TAGS,ht):F({}),Me=_(e,"FORBID_ATTR")?z({},e.FORBID_ATTR,ht):F({}),Xe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,Pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ze=e.SAFE_FOR_TEMPLATES||!1,Ie=!1!==e.SAFE_FOR_XML,Fe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Ve=e.RETURN_TRUSTED_TYPE||!1,Ue=e.FORCE_BODY||!1,qe=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||ne,ot=e.NAMESPACE||it,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ne=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&vt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&vt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&(Re=!1),He&&(Be=!0),Xe&&(Te=z({},Y),Se=[],!0===Xe.html&&(z(Te,U),z(Se,j)),!0===Xe.svg&&(z(Te,B),z(Se,X),z(Se,K)),!0===Xe.svgFilters&&(z(Te,H),z(Se,X),z(Se,K)),!0===Xe.mathMl&&(z(Te,q),z(Se,$),z(Se,K))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?_e.tagCheck=e.ADD_TAGS:(Te===xe&&(Te=F(Te)),z(Te,e.ADD_TAGS,ht))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?_e.attributeCheck=e.ADD_ATTR:(Se===Ce&&(Se=F(Se)),z(Se,e.ADD_ATTR,ht))),e.ADD_URI_SAFE_ATTR&&z(Qe,e.ADD_URI_SAFE_ATTR,ht),e.FORBID_CONTENTS&&($e===Ke&&($e=F($e)),z($e,e.FORBID_CONTENTS,ht)),e.ADD_FORBID_CONTENTS&&($e===Ke&&($e=F($e)),z($e,e.ADD_FORBID_CONTENTS,ht)),Ye&&(Te["#text"]=!0),Fe&&z(Te,["html","head","body"]),Te.table&&(z(Te,["tbody"]),delete Le.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw R('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw R('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(v,s)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));f&&f(e),mt=e}},gt=z({},[...B,...H,...V]),yt=z({},[...q,...G]),wt=function(e){A(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){P(e)}},Et=function(e,t){try{A(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||He)try{wt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,n=null;if(Ue)e="<remove></remove>"+e;else{const t=C(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===pt&&ot===it&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(ot===it)try{t=(new m).parseFromString(o,pt)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(ot,"template",null);try{t.documentElement.innerHTML=st?Q:o}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ot===it?oe.call(t,Fe?"html":"body")[0]:Fe?t.documentElement:s},At=function(e){return te.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Tt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof l&&e instanceof l};function St(e,t,i){w(e,e=>{e.call(n,t,i,mt)})}const Ct=function(e){let t=null;if(St(me.beforeSanitizeElements,e,null),Tt(e))return wt(e),!0;const i=ht(e.nodeName);if(St(me.uponSanitizeElement,e,{tagName:i,allowedTags:Te}),Ie&&e.hasChildNodes()&&!xt(e.firstElementChild)&&O(/<[/\w!]/g,e.innerHTML)&&O(/<[/\w!]/g,e.textContent))return wt(e),!0;if(e.nodeType===de)return wt(e),!0;if(Ie&&e.nodeType===pe&&O(/<[/\w]/g,e.data))return wt(e),!0;if(!(_e.tagCheck instanceof Function&&_e.tagCheck(i))&&(!Te[i]||Le[i])){if(!Le[i]&&Lt(i)){if(Ne.tagNameCheck instanceof RegExp&&O(Ne.tagNameCheck,i))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(i))return!1}if(Ye&&!$e[i]){const t=Z(e)||e.parentNode,n=I(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const o=y(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,D(e))}}}return wt(e),!0}return e instanceof c&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=x(e.tagName),i=x(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===it?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===i||lt[i]):Boolean(gt[n]):e.namespaceURI===tt?t.namespaceURI===it?"math"===n:t.namespaceURI===nt?"math"===n&&ct[i]:Boolean(yt[n]):e.namespaceURI===it?!(t.namespaceURI===nt&&!ct[i])&&!(t.namespaceURI===tt&&!lt[i])&&!yt[n]&&(dt[n]||!gt[n]):!("application/xhtml+xml"!==pt||!at[e.namespaceURI]))}(e)?(wt(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!O(/<\/no(script|embed|frames)/i,e.innerHTML)?(ze&&e.nodeType===ce&&(t=e.textContent,w([fe,ve,be],e=>{t=N(t,e," ")}),e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)),St(me.afterSanitizeElements,e,null),!1):(wt(e),!0)},Nt=function(e,t,n){if(qe&&("id"===t||"name"===t)&&(n in i||n in ft))return!1;if(Re&&!Me[t]&&O(ge,t));else if(Oe&&O(ye,t));else if(_e.attributeCheck instanceof Function&&_e.attributeCheck(t,e));else if(!Se[t]||Me[t]){if(!(Lt(e)&&(Ne.tagNameCheck instanceof RegExp&&O(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&O(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t,e))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&O(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Qe[t]);else if(O(Ae,N(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==L(n,"data:")||!Ze[e]){if(Pe&&!O(we,N(n,Ee,"")));else if(n)return!1}else;return!0},Lt=function(e){return"annotation-xml"!==e&&C(e,ke)},Mt=function(e){St(me.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Tt(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se,forceKeepAttr:void 0};let o=t.length;for(;o--;){const s=t[o],{name:a,namespaceURI:r,value:l}=s,c=ht(a),d=l;let p="value"===a?d:M(d);if(i.attrName=c,i.attrValue=p,i.keepAttr=!0,i.forceKeepAttr=void 0,St(me.uponSanitizeAttribute,e,i),p=i.attrValue,!Ge||"id"!==c&&"name"!==c||(Et(a,e),p="user-content-"+p),Ie&&O(/((--!?|])>)|<\/(style|title|textarea)/i,p)){Et(a,e);continue}if("attributename"===c&&C(p,"href")){Et(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Et(a,e);continue}if(!De&&O(/\/>/i,p)){Et(a,e);continue}ze&&w([fe,ve,be],e=>{p=N(p,e," ")});const u=ht(e.nodeName);if(Nt(u,c,p)){if(J&&"object"==typeof v&&"function"==typeof v.getAttributeType)if(r);else switch(v.getAttributeType(u,c)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}if(p!==d)try{r?e.setAttributeNS(r,a,p):e.setAttribute(a,p),Tt(e)?wt(e):k(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}St(me.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null;const i=At(t);for(St(me.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)St(me.uponSanitizeShadowNode,n,null),Ct(n),Mt(n),n.content instanceof a&&e(n.content);St(me.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,r=null,c=null;if(st=!e,st&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw R("toString is not a function");if("string"!=typeof(e=e.toString()))throw R("dirty is not a string, aborting")}if(!n.isSupported)return e;if(We||bt(t),n.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=ht(e.nodeName);if(!Te[t]||Le[t])throw R("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=kt("\x3c!----\x3e"),s=i.ownerDocument.importNode(e,!0),s.nodeType===le&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!Be&&!ze&&!Fe&&-1===e.indexOf("<"))return J&&Ve?J.createHTML(e):e;if(i=kt(e),!i)return Be?null:Ve?Q:""}i&&Ue&&wt(i.firstChild);const d=At(je?e:i);for(;r=d.nextNode();)Ct(r),Mt(r),r.content instanceof a&&_t(r.content);if(je)return e;if(Be){if(He)for(c=ie.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(Se.shadowroot||Se.shadowrootmode)&&(c=ae.call(o,c,!0)),c}let p=Fe?i.outerHTML:i.innerHTML;return Fe&&Te["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(se,i.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+p),ze&&w([fe,ve,be],e=>{p=N(p,e," ")}),J&&Ve?J.createHTML(p):p},n.setConfig=function(){bt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),We=!0},n.clearConfig=function(){mt=null,We=!1},n.isValidAttribute=function(e,t,n){mt||bt({});const i=ht(e),o=ht(t);return Nt(i,o,n)},n.addHook=function(e,t){"function"==typeof t&&A(me[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=E(me[e],t);return-1===n?void 0:T(me[e],n,1)[0]}return k(me[e])},n.removeHooks=function(e){me[e]=[]},n.removeAllHooks=function(){me={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Yt=new CSSStyleSheet;Yt.replaceSync("\n :host { display: block; position: relative; width: 100%; max-width: 100%; height:100%; }\n * { box-sizing: border-box; }\n .video-container {\n position: relative; width: 100%; aspect-ratio:var(--aspect-ratio,16:9); background: #000;\n overflow: hidden;\n height:100%;\n }\n .shadow-plyr-wrapper {\n position: absolute; top: 0; left: 0; width: 100%; height: 100%;\n display: flex; align-items: center; justify-content: center; outline: none;\n }\n video {\n position: absolute; top: 0; left: 0; width: 100%; height: 100%;\n object-fit: contain !important; display: block; pointer-events: auto !important;\n opacity: 0; transition: opacity .3s ease; will-change: opacity;\n }\n .video-loaded.is-playing video,\n .video-loaded:not(.poster-visible) video { opacity: 1 !important; }\n video::-webkit-media-controls { display: none !important; }\n picture {\n position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block;\n z-index: 5; opacity: 0; transition: opacity .3s ease; pointer-events: none;\n cursor: pointer;\n }\n picture img { width: 100%; height: 100%; object-fit: contain !important; display: block; }\n .poster-visible picture { opacity: 1 !important; pointer-events: auto !important; }\n .video-loading::after {\n content: ''; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px;\n margin: -20px 0 0 -20px; border: 3px solid rgba(255,255,255,.3);\n border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;\n z-index: 10;\n }\n @keyframes spin { to { transform: rotate(360deg); } }\n /* ----- CSS CUSTOM PROPERTIES (allows external styling) ----- */\n .video-center-play {\n position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);\n width: var(--center-play-size, 80px); height: var(--center-play-size, 80px);\n border-radius: 50%; display: flex; align-items: center; justify-content: center;\n cursor: pointer; transition: all .3s ease; z-index: 20; opacity: 0;\n pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,.3);\n background: var(--center-play-bg, rgba(0,0,0,.7)); will-change: transform,opacity;\n }\n .video-center-play svg {\n width: calc(var(--center-play-size, 80px) * 0.5);\n height: calc(var(--center-play-size, 80px) * 0.5);\n fill: var(--accent-color, #fff);\n color:var(--accent-color, #fff);\n }\n .video-loaded .video-center-play { opacity: .8; pointer-events: auto; }\n .video-loaded.is-playing .video-center-play { opacity: 0; pointer-events: none; }\n .video-loaded.is-playing:hover .video-center-play { opacity: .8; pointer-events: auto; }\n .video-center-play:hover { transform: translate(-50%,-50%) scale(1.1); }\n .video-controls-bar {\n position: absolute; bottom: 0; left: 0; right: 0;\n padding: 40px 15px 15px; display: flex; flex-direction: column; gap: 10px;\n transition: opacity .3s ease, transform .3s ease; z-index: 25; opacity: 0;\n transform: translateY(100%); pointer-events: none; will-change: transform,opacity;\n background: var(--controls-bg, linear-gradient(to top, rgba(0,0,0,.8), transparent));\n }\n .video-loaded:not(.is-playing) .video-controls-bar,\n .video-loaded:hover .video-controls-bar,\n .video-loaded.show-controls .video-controls-bar,\n .video-loaded.is-playing:hover .video-controls-bar {\n opacity: 1; transform: translateY(0); pointer-events: auto;\n }\n .video-loaded.is-playing .video-controls-bar { opacity: 0; transform: translateY(100%); pointer-events: none; }\n .video-seekbar {\n width: 100%; height: var(--seekbar-height, 5px); background: rgba(255,255,255,.3);\n border-radius: 3px; cursor: pointer; position: relative; margin-bottom: 5px;\n }\n .video-seekbar-progress {\n height: 100%; border-radius: 3px; width: 0%; position: relative;\n transition: width .1s linear; background: var(--accent-color, #fff); will-change: width;\n }\n .video-seekbar-handle {\n position: absolute; right: -6px; top: 50%; transform: translateY(-50%);\n width: 12px; height: 12px; border-radius: 50%; background: var(--accent-color, #fff);\n opacity: 0; transition: opacity .2s;\n }\n .video-seekbar:hover .video-seekbar-handle { opacity: 1; }\n .video-controls-row { display: flex; align-items: center; gap: 15px; }\n .video-control-btn {\n background: none; border: none; cursor: pointer; padding: 5px;\n display: flex; align-items: center; justify-content: center; transition: transform .2s;\n }\n .video-control-btn:hover { transform: scale(1.1); background: rgba(255,255,255,.1); }\n .video-control-btn svg { width: 24px; height: 24px; fill: var(--accent-color, #fff); color:var(--accent-color,#fff); }\n .video-control-btn.play-pause svg { width: 28px; height: 28px; }\n .video-volume-control { display: flex; align-items: center; gap: 8px; }\n .video-volume-slider {\n width: 0; height: 3px; background: rgba(255,255,255,.3); border-radius: 3px;\n cursor: pointer; position: relative; overflow: hidden; transition: width .3s ease;\n }\n .video-volume-control:hover .video-volume-slider { width: 60px; }\n .video-volume-progress {\n height: 100%; width: 100%; transition: width .1s;\n background: var(--accent-color, #fff); will-change: width;\n }\n .video-controls-spacer { flex: 1; }\n .video-time-display {\n font-size: 13px; font-family: monospace; user-select: none;\n color: var(--accent-color, #fff);\n }\n .video-speed-control { position: relative; }\n .video-speed-btn { min-width: 45px; font-size: 13px; font-weight: 600; color:var(--accent-color,#fff) }\n .video-speed-menu {\n position: absolute; bottom: 100%; right: 0; border-radius: 4px; padding: 5px 0;\n margin-bottom: 10px; min-width: 80px; opacity: 0; visibility: hidden;\n transform: translateY(10px); transition: all .2s ease; z-index: 100;\n background: var(--controls-bg, rgba(0,0,0,.8));\n }\n .video-speed-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }\n .video-speed-option {\n display: block; width: 100%; padding: 8px 15px; background: none; border: none;\n font-size: 13px; text-align: left; cursor: pointer; transition: background .2s;\n color: var(--accent-color, #fff);\n }\n .video-speed-option:hover { background: rgba(255,255,255,.1); }\n .video-speed-option.active { background: rgba(255,255,255,.2); font-weight: 600; }\n .video-control-btn:focus-visible,\n .video-seekbar:focus-visible,\n .video-volume-slider:focus-visible { outline: 2px solid var(--accent-color, #fff); outline-offset: 2px; }\n .sr-only {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;\n }\n /* ----- Tooltip styles ----- */\n .tooltip {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: 8px;\n padding: 4px 8px;\n background: var(--tooltip-bg,rgba(0,0,0,0.8));\n color: var(--tooltip-color,#fff);\n font-size: var(--tooltip-font-size,12px);\n white-space: nowrap;\n border-radius: 4px;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s;\n z-index: 30;\n }\n .video-control-btn:hover .tooltip,\n .video-center-play:hover .tooltip {\n opacity: 1;\n }\n @media (max-width: 768px) {\n .video-center-play { width: 60px; height: 60px; }\n .video-center-play svg { width: 30px; height: 30px; }\n .video-controls-bar { padding: 30px 10px 10px; }\n .video-control-btn svg { width: 20px; height: 20px; }\n .video-volume-slider { display: none; }\n .video-time-display { font-size: 11px; }\n }\n\n .tap-ripple {\n position: absolute;\n width: 20px;\n height: 20px;\n background: rgba(255,255,255,0.4);\n border-radius: 50%;\n transform: translate(-50%, -50%);\n animation: ripple-expand 0.6s ease-out forwards;\n pointer-events: none;\n z-index: 50;\n}\n\n@keyframes ripple-expand {\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(8);\n }\n}\n\n.video-seek-buttons {\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n pointer-events: none;\n}\n\n.video-seek-buttons button {\n pointer-events: auto;\n width: 30%;\n height: 60%;\n background: transparent;\n border: none;\n color: #fff;\n font-size: 20px;\n font-weight: bold;\n opacity: 0.6;\n}\n.seek-overlay {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%,-50%);\n font-size: 32px;\n color: white;\n font-weight: bold;\n pointer-events: none;\n animation: fadeOut 0.6s forwards;\n}\n\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n");const jt=(()=>{const e=new Set;let t=null;return{register(t){e.add(t)},unregister(n){e.delete(n),t===n&&(t=null)},requestPlay(e){t&&t!==e&&t.pauseVideo(!0),t=e}}})();class Xt extends HTMLElement{constructor(){super(),me.add(this),fe.set(this,void 0),ve.set(this,null),be.set(this,0),ge.set(this,1e4),ye.set(this,null),we.set(this,!1),Ee.set(this,null),ke.set(this,!1),Ae.set(this,!1),Te.set(this,!1),xe.set(this,1),Se.set(this,!1),Ce.set(this,!1),Ne.set(this,!1),Le.set(this,!1),Me.set(this,!1),_e.set(this,!0),Oe.set(this,null),Re.set(this,null),Pe.set(this,null),De.set(this,null),ze.set(this,null),Ie.set(this,null),Fe.set(this,null),We.set(this,null),Ue.set(this,0),Be.set(this,null),He.set(this,t=>{if(!e(this,Ee,"f"))return;const n=t.key.toLowerCase();e(this,me,"m",mt).call(this);let i=!1;const o={" ":()=>e(this,Ve,"f").call(this),k:()=>e(this,Ve,"f").call(this),arrowleft:()=>e(this,me,"m",Ft).call(this),arrowright:()=>e(this,me,"m",Wt).call(this),arrowup:()=>e(this,me,"m",Ut).call(this,.1),arrowdown:()=>e(this,me,"m",Ut).call(this,-.1),m:()=>e(this,qe,"f").call(this),f:()=>e(this,Ge,"f").call(this),home:()=>{e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=0)},end:()=>{e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=e(this,Ee,"f").duration)}};o[n]?(t.preventDefault(),o[n](),i=!0):n>="0"&&n<="9"&&e(this,Ee,"f").duration&&(t.preventDefault(),e(this,Ee,"f").currentTime=e(this,Ee,"f").duration*(parseInt(n)/10),i=!0),i&&e(this,Re,"f")&&e(this,Re,"f").classList.add("show-controls")}),Ve.set(this,t=>{t&&t.stopPropagation(),e(this,Ee,"f")&&(e(this,ke,"f")?this.pauseVideo():this.playVideo())}),qe.set(this,t=>{t&&t.stopPropagation(),e(this,Ee,"f")&&(e(this,Ee,"f").muted=!e(this,Ee,"f").muted)}),Ge.set(this,t=>{t&&t.stopPropagation();const n=e(this,fe,"f").querySelector(".video-container");document.fullscreenElement||document.webkitFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(null==n?void 0:n.requestFullscreen)?n.requestFullscreen():n&&"webkitRequestFullscreen"in n&&n.webkitRequestFullscreen()}),Ye.set(this,t=>{var n;(null===(n=e(this,Ee,"f"))||void 0===n?void 0:n.duration)&&(e(this,Ee,"f").currentTime=e(this,Ee,"f").duration*t)}),je.set(this,t=>{if(e(this,Ee,"f")){const n=Math.max(0,Math.min(1,t));e(this,Ee,"f").volume=n,e(this,Ee,"f").muted=0===n}}),Xe.set(this,(n,i)=>{e(this,Ee,"f")&&(e(this,Ee,"f").playbackRate=n,t(this,xe,n,"f"),null==i||i.querySelectorAll(".video-speed-option").forEach(e=>{e.classList.toggle("active",parseFloat(e.getAttribute("data-speed"))===n)}),e(this,We,"f")&&(e(this,We,"f").textContent=n+"x"))}),$e.set(this,()=>{e(this,Se,"f")&&e(this,Ee,"f")&&(document.hidden?e(this,ke,"f")&&(t(this,Me,!0,"f"),this.pauseVideo()):e(this,Me,"f")&&!e(this,ke,"f")&&(this.playVideo(),t(this,Me,!1,"f")))}),Ke.set(this,()=>{e(this,ke,"f")&&(t(this,Me,!0,"f"),this.pauseVideo())}),Ze.set(this,()=>{e(this,Me,"f")&&!e(this,ke,"f")&&(this.playVideo(),t(this,Me,!1,"f"))}),Je.set(this,()=>{e(this,me,"m",mt).call(this).posterClickPlay&&e(this,Ee,"f")&&!e(this,Le,"f")&&this.playVideo()}),Qe.set(this,n=>{n.preventDefault(),t(this,Ae,!0,"f");const i=n.currentTarget,o=i.getBoundingClientRect();e(this,Ye,"f").call(this,(n.clientX-o.left)/o.width);const s=t=>{if(!e(this,Ae,"f"))return;t.preventDefault();const n=i.getBoundingClientRect();e(this,Ye,"f").call(this,(t.clientX-n.left)/n.width)},a=()=>{t(this,Ae,!1,"f"),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}),et.set(this,n=>{if(!e(this,Ee,"f"))return;t(this,Ae,!0,"f");const i=n.currentTarget,o=t=>{const n=i.getBoundingClientRect(),o=(t.clientX-n.left)/n.width;e(this,Ye,"f").call(this,o)};o(n.touches[0]);const s=t=>{e(this,Ae,"f")&&o(t.touches[0])},a=()=>{t(this,Ae,!1,"f"),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",a)};document.addEventListener("touchmove",s,{passive:!0}),document.addEventListener("touchend",a)}),tt.set(this,n=>{n.preventDefault(),t(this,Te,!0,"f");const i=n.currentTarget,o=i.getBoundingClientRect();e(this,je,"f").call(this,(n.clientX-o.left)/o.width);const s=t=>{if(!e(this,Te,"f"))return;t.preventDefault();const n=i.getBoundingClientRect();e(this,je,"f").call(this,(t.clientX-n.left)/n.width)},a=()=>{t(this,Te,!1,"f"),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}),nt.set(this,(n,i)=>{e(this,Ee,"f")&&(n.classList.remove("video-loading"),n.classList.add("video-loaded"),t(this,we,!0,"f"),t(this,Se,!0,"f"),i.showControls&&e(this,me,"m",Ct).call(this,n),i.autoplay||(t(this,Le,!1,"f"),t(this,Ne,!0,"f"),n.classList.add("poster-visible")),e(this,me,"m",Pt).call(this,!1,n),e(this,me,"m",qt).call(this,"video-ready",{duration:e(this,Ee,"f").duration}))}),it.set(this,n=>{e(this,me,"m",qt).call(this,"video-playing",{src:e(this,Ee,"f").currentSrc,currentTime:e(this,Ee,"f").currentTime,duration:e(this,Ee,"f").duration}),n.classList.add("is-playing"),n.classList.remove("poster-visible"),t(this,ke,!0,"f"),t(this,Le,!0,"f"),t(this,Ne,!1,"f"),e(this,me,"m",Ot).call(this,!0,n)}),ot.set(this,n=>{e(this,me,"m",qt).call(this,"video-paused",{currentTime:e(this,Ee,"f").currentTime}),n.classList.remove("is-playing"),t(this,ke,!1,"f"),e(this,me,"m",Ot).call(this,!1,n)}),st.set(this,(n,i)=>{e(this,me,"m",qt).call(this,"video-ended",{duration:e(this,Ee,"f").duration}),n.classList.remove("is-playing"),t(this,ke,!1,"f"),e(this,me,"m",Ot).call(this,!1,n),i.loop||(i.resetOnEnded&&(e(this,Ee,"f").currentTime=0),i.showPosterOnEnded&&e(this,Ce,"f")&&(n.classList.add("poster-visible"),t(this,Ne,!0,"f")))}),at.set(this,t=>{const n=e(this,Ee,"f");e(this,me,"m",Rt).call(this,n.muted||0===n.volume,t),e(this,me,"m",Dt).call(this,n.volume,t),e(this,me,"m",qt).call(this,"video-volume-change",{volume:n.volume,muted:n.muted})}),rt.set(this,n=>{var i,o;console.error("Video load error"),n.classList.remove("video-loading","video-loaded"),t(this,Se,!1,"f"),e(this,me,"m",qt).call(this,"video-error",{code:null===(o=null===(i=e(this,Ee,"f"))||void 0===i?void 0:i.error)||void 0===o?void 0:o.code})}),lt.set(this,()=>{const t=document.fullscreenElement===e(this,fe,"f").querySelector(".video-container");e(this,me,"m",Pt).call(this,t),e(this,me,"m",qt).call(this,t?"video-fullscreen-enter":"video-fullscreen-exit")}),ct.set(this,n=>{var i;const o=e(this,me,"m",mt).call(this);if(!e(this,Ee,"f"))return;const s=e(this,Re,"f").getBoundingClientRect(),a=n.changedTouches[0].clientX<s.left+s.width/2;o.enableTapRipple&&e(this,me,"m",ut).call(this,n.changedTouches[0].clientX,n.changedTouches[0].clientY),t(this,Ue,(i=e(this,Ue,"f"),++i),"f"),e(this,Be,"f")&&clearTimeout(e(this,Be,"f")),t(this,Be,window.setTimeout(()=>{const n=o.doubleTapSeekSeconds,i=o.tripleTapSeconds;2===e(this,Ue,"f")&&o.doubleTapSeek&&e(this,me,"m",pt).call(this,a?-n:n),e(this,Ue,"f")>=3&&o.tripleTapSeek&&e(this,me,"m",pt).call(this,a?-i:i),t(this,Ue,0,"f")},300),"f")}),ht.set(this,void 0),t(this,fe,this.attachShadow({mode:"open"}),"f"),e(this,fe,"f").adoptedStyleSheets=[Yt],t(this,ht,function(e,t){let n;return function(...i){n||(e.apply(this,i),n=!0,setTimeout(()=>n=!1,t))}}(e(this,me,"m",Lt).bind(this),100),"f")}static get observedAttributes(){return["lazy","pause-on-out-of-view","autoplay","loop","muted","playsinline","desktop-poster","mobile-poster","desktop-video","mobile-video","show-controls","controls-type","show-center-play","show-play-pause","show-seekbar","show-volume","show-fullscreen","show-speed","theme","accent-color","controls-background","center-play-background","center-play-size","play-icon","pause-icon","volume-icon","muted-icon","fullscreen-icon","exit-fullscreen-icon","speed-icon","video-type","preload","speed-options","controls-hide-delay","seek-step","lazy-threshold","pause-threshold","pause-on-tab-hide","show-poster-on-ended","reset-on-ended","poster-click-play","performance-mode","show-tooltips","tooltip-play","tooltip-pause","tooltip-mute","tooltip-unmute","tooltip-fullscreen","tooltip-exit-fullscreen","tooltip-speed","tooltip-center-play","double-tap-seek","double-tap-seek-seconds","show-seek-buttons","seek-button-seconds","triple-tap-seek","triple-tap-seconds","enable-tap-ripple"]}connectedCallback(){e(this,me,"m",vt).call(this),e(this,me,"m",kt).call(this),e(this,me,"m",At).call(this),"true"===this.getAttribute("virtual-playback")&&jt.register(this)}disconnectedCallback(){e(this,me,"m",Vt).call(this),e(this,me,"m",Tt).call(this),e(this,Oe,"f")&&cancelAnimationFrame(e(this,Oe,"f")),jt.unregister(this)}attributeChangedCallback(n,i,o){if(i===o)return;if(t(this,ve,null,"f"),!e(this,we,"f"))return;const s=e(this,me,"m",mt).call(this);switch(n){case"muted":e(this,Ee,"f")&&(e(this,Ee,"f").muted=s.muted);break;case"loop":e(this,Ee,"f")&&(e(this,Ee,"f").loop=s.loop);break;case"accent-color":case"theme":case"controls-background":case"center-play-background":case"center-play-size":e(this,me,"m",Et).call(this,s);break;default:e(this,me,"m",Ht).call(this)}}play(){this.playVideo()}pause(){this.pauseVideo()}mute(){e(this,Ee,"f")&&(e(this,Ee,"f").muted=!0)}unmute(){e(this,Ee,"f")&&(e(this,Ee,"f").muted=!1)}seek(t){e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=t)}playVideo(){if(!e(this,Ee,"f"))return;e(this,me,"m",mt).call(this).autoplay&&(e(this,Ee,"f").muted=!0),"true"===this.getAttribute("virtual-playback")&&jt.requestPlay(this);const n=e(this,Ee,"f").play();n&&n.catch(()=>{t(this,Ne,!0,"f"),e(this,Re,"f")&&e(this,Re,"f").classList.add("poster-visible")})}pauseVideo(t){e(this,Ee,"f")&&(e(this,Ee,"f").pause(),t||e(this,me,"m",qt).call(this,"video-paused"))}}fe=new WeakMap,ve=new WeakMap,be=new WeakMap,ge=new WeakMap,ye=new WeakMap,we=new WeakMap,Ee=new WeakMap,ke=new WeakMap,Ae=new WeakMap,Te=new WeakMap,xe=new WeakMap,Se=new WeakMap,Ce=new WeakMap,Ne=new WeakMap,Le=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Pe=new WeakMap,De=new WeakMap,ze=new WeakMap,Ie=new WeakMap,Fe=new WeakMap,We=new WeakMap,Ue=new WeakMap,Be=new WeakMap,He=new WeakMap,Ve=new WeakMap,qe=new WeakMap,Ge=new WeakMap,Ye=new WeakMap,je=new WeakMap,Xe=new WeakMap,$e=new WeakMap,Ke=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,it=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ht=new WeakMap,me=new WeakSet,dt=function(t){var n;const i=document.createElement("div");i.className="seek-overlay",i.textContent=(t>0?"+":"")+t+"s",null===(n=e(this,Re,"f"))||void 0===n||n.appendChild(i),setTimeout(()=>i.remove(),600)},pt=function(t){if(!e(this,Ee,"f"))return;const n=Math.min(Math.max(0,e(this,Ee,"f").currentTime+t),e(this,Ee,"f").duration);e(this,Ee,"f").currentTime=n,e(this,me,"m",dt).call(this,t)},ut=function(t,n){if(!e(this,Re,"f"))return;const i=e(this,Re,"f").getBoundingClientRect(),o=document.createElement("div");o.className="tap-ripple",o.style.left=t-i.left+"px",o.style.top=n-i.top+"px",e(this,Re,"f").appendChild(o),setTimeout(()=>o.remove(),600)},mt=function(){const n=Date.now();if(e(this,ve,"f")&&n-e(this,be,"f")<e(this,ge,"f"))return e(this,ve,"f");const i={lazy:"true"===this.getAttribute("lazy"),pauseOnOutOfView:"true"===this.getAttribute("pause-on-out-of-view"),pauseOnTabHide:"false"!==this.getAttribute("pause-on-tab-hide"),autoplay:"true"===this.getAttribute("autoplay"),loop:"true"===this.getAttribute("loop"),muted:"true"===this.getAttribute("muted"),playsinline:"true"===this.getAttribute("playsinline"),preload:this.getAttribute("preload")||"metadata",desktopPoster:this.getAttribute("desktop-poster")||"",mobilePoster:this.getAttribute("mobile-poster")||"",desktopVideo:this.getAttribute("desktop-video")||"",mobileVideo:this.getAttribute("mobile-video")||"",videoType:this.getAttribute("video-type")||"video/mp4",showControls:"true"===this.getAttribute("show-controls"),controlsType:this.getAttribute("controls-type")||"full",showPlayPause:"false"!==this.getAttribute("show-play-pause"),showSeekbar:"true"===this.getAttribute("show-seekbar"),showVolume:"true"===this.getAttribute("show-volume"),showFullscreen:"true"===this.getAttribute("show-fullscreen"),showCenterPlay:"true"===this.getAttribute("show-center-play"),showSpeed:"true"===this.getAttribute("show-speed"),speedOptions:e(this,me,"m",ft).call(this),controlsHideDelay:parseInt(this.getAttribute("controls-hide-delay")||"3000"),seekStep:parseInt(this.getAttribute("seek-step")||"5"),lazyThreshold:parseFloat(this.getAttribute("lazy-threshold")||"0.5"),pauseThreshold:parseFloat(this.getAttribute("pause-threshold")||"0.3"),theme:this.getAttribute("theme")||"dark",accentColor:this.getAttribute("accent-color")||"#ffffff",controlsBackground:this.getAttribute("controls-background")||"rgba(0, 0, 0, 0.8)",centerPlayBackground:this.getAttribute("center-play-background")||"rgba(0, 0, 0, 0.7)",centerPlaySize:parseInt(this.getAttribute("center-play-size")||"80"),showPosterOnEnded:"true"===this.getAttribute("show-poster-on-ended"),resetOnEnded:"true"===this.getAttribute("reset-on-ended"),posterClickPlay:"false"!==this.getAttribute("poster-click-play"),performanceMode:"true"===this.getAttribute("performance-mode"),showTooltips:"true"===this.getAttribute("show-tooltips"),tooltipPlay:this.getAttribute("tooltip-play")||"Play",tooltipPause:this.getAttribute("tooltip-pause")||"Pause",tooltipMute:this.getAttribute("tooltip-mute")||"Mute",tooltipUnmute:this.getAttribute("tooltip-unmute")||"Unmute",tooltipFullscreen:this.getAttribute("tooltip-fullscreen")||"Fullscreen",tooltipExitFullscreen:this.getAttribute("tooltip-exit-fullscreen")||"Exit fullscreen",tooltipSpeed:this.getAttribute("tooltip-speed")||"Playback speed",tooltipCenterPlay:this.getAttribute("tooltip-center-play")||"Play",doubleTapSeek:"false"!==this.getAttribute("double-tap-seek"),doubleTapSeekSeconds:parseInt(this.getAttribute("double-tap-seek-seconds")||"10"),showSeekButtons:"true"===this.getAttribute("show-seek-buttons"),seekButtonSeconds:parseInt(this.getAttribute("seek-button-seconds")||"10"),tripleTapSeek:"false"!==this.getAttribute("triple-tap-seek"),tripleTapSeconds:parseInt(this.getAttribute("triple-tap-seconds")||"30"),enableTapRipple:"false"!==this.getAttribute("enable-tap-ripple")};return t(this,ve,i,"f"),t(this,be,n,"f"),i},ft=function(){const e=this.getAttribute("speed-options");if(!e)return[.5,.75,1,1.25,1.5,2];try{return e.split(",").map(e=>parseFloat(e.trim())).filter(e=>!isNaN(e))}catch{return[.5,.75,1,1.25,1.5,2]}},vt=function(){const n=e(this,me,"m",mt).call(this);t(this,Ce,!(!n.desktopPoster&&!n.mobilePoster),"f"),t(this,Ne,e(this,Ce,"f")&&!e(this,Le,"f"),"f");const i=document.createElement("div");if(i.className="shadow-plyr-wrapper",i.setAttribute("tabindex","0"),i.setAttribute("role","application"),i.setAttribute("aria-label","Video player"),i.setAttribute("part","shadow-plyr-wrapper"),n.desktopPoster||n.mobilePoster){const e=document.createElement("picture");if(n.mobilePoster){const t=document.createElement("source");t.media="(max-width: 768px)",t.srcset=n.mobilePoster,e.appendChild(t)}const t=document.createElement("img");t.src=n.desktopPoster,t.alt="Video thumbnail",t.loading="lazy",e.appendChild(t),i.appendChild(e)}const o=document.createElement("div");if(o.className="video-placeholder",i.appendChild(o),n.showCenterPlay){const t=e(this,me,"m",yt).call(this),o=document.createElement("div");o.className="video-center-play",o.setAttribute("role","button"),o.tabIndex=0,o.setAttribute("aria-label","Play video");const s=document.createElement("span");s.className="play-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,me,"m",bt).call(this,t.play));const a=document.createElement("span");if(a.className="pause-icon",a.style.display="none",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,me,"m",bt).call(this,t.pause)),o.appendChild(s),o.appendChild(a),n.showTooltips){const e=document.createElement("span");e.className="tooltip center-play-tooltip",e.textContent=n.tooltipCenterPlay,o.appendChild(e)}const r=document.createElement("span");r.className="sr-only",r.textContent="Play",o.appendChild(r),i.appendChild(o)}n.showControls&&"none"!==n.controlsType&&i.appendChild(e(this,me,"m",wt).call(this,n)),n.showSeekButtons&&i.appendChild(e(this,me,"m",gt).call(this,n));const s=document.createElement("div");s.className="video-container",s.setAttribute("part","video-container"),s.appendChild(i),e(this,fe,"f").innerHTML="",e(this,fe,"f").appendChild(s),t(this,Re,i,"f"),t(this,Pe,i.querySelector(".video-seekbar"),"f"),t(this,De,i.querySelector(".video-seekbar-progress"),"f"),t(this,ze,i.querySelector(".video-time-display"),"f"),t(this,Ie,i.querySelector(".video-volume-progress"),"f"),t(this,Fe,i.querySelector(".video-speed-menu"),"f"),t(this,We,i.querySelector(".speed-text"),"f")},bt=function(e){const t=document.createElement("div");t.innerHTML=e.trim();const n=t.firstElementChild;if(!n||"svg"!==n.tagName.toLowerCase()){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox","0 0 24 24"),e}return n},gt=function(t){const n=document.createElement("div");n.className="video-seek-buttons";const i=document.createElement("button");i.className="seek-left",i.textContent=`-${t.seekButtonSeconds}s`;const o=document.createElement("button");return o.className="seek-right",o.textContent=`+${t.seekButtonSeconds}s`,i.addEventListener("click",()=>{e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=Math.max(0,e(this,Ee,"f").currentTime-t.seekButtonSeconds))}),o.addEventListener("click",()=>{e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=Math.min(e(this,Ee,"f").duration,e(this,Ee,"f").currentTime+t.seekButtonSeconds))}),n.appendChild(i),n.appendChild(o),n},yt=function(){const e=`${this.getAttribute("play-icon")||""}-${this.getAttribute("pause-icon")||""}`;if(c.has(e))return c.get(e);const t={play:Gt.sanitize(this.getAttribute("play-icon")||n,{USE_PROFILES:{svg:!0}}),pause:Gt.sanitize(this.getAttribute("pause-icon")||i,{USE_PROFILES:{svg:!0}}),volume:Gt.sanitize(this.getAttribute("volume-icon")||o,{USE_PROFILES:{svg:!0}}),muted:Gt.sanitize(this.getAttribute("muted-icon")||s,{USE_PROFILES:{svg:!0}}),fullscreen:Gt.sanitize(this.getAttribute("fullscreen-icon")||a,{USE_PROFILES:{svg:!0}}),exitFullscreen:Gt.sanitize(this.getAttribute("exit-fullscreen-icon")||r,{USE_PROFILES:{svg:!0}}),speed:Gt.sanitize(this.getAttribute("speed-icon")||l,{USE_PROFILES:{svg:!0}})};return c.set(e,t),t},wt=function(t){const n=e(this,me,"m",yt).call(this),i=document.createDocumentFragment(),o=document.createElement("div");if(o.className="video-controls-bar",o.setAttribute("role","region"),o.setAttribute("aria-label","Video controls"),o.setAttribute("part","controls"),t.showSeekbar){const e=document.createElement("div");e.className="video-seekbar",e.setAttribute("role","slider"),e.tabIndex=0,e.setAttribute("aria-label","Seek"),e.setAttribute("aria-valuemin","0"),e.setAttribute("aria-valuemax","100"),e.setAttribute("aria-valuenow","0");const t=document.createElement("div");t.className="video-seekbar-progress";const n=document.createElement("div");n.className="video-seekbar-handle",t.appendChild(n),e.appendChild(t),o.appendChild(e)}const s=document.createElement("div");if(s.className="video-controls-row",t.showPlayPause){const i=document.createElement("button");i.className="video-control-btn play-pause",i.setAttribute("aria-label","Play"),i.tabIndex=0;const o=document.createElement("span");o.className="play-icon",o.setAttribute("aria-hidden","true"),o.appendChild(e(this,me,"m",bt).call(this,n.play));const a=document.createElement("span");if(a.className="pause-icon",a.style.display="none",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,me,"m",bt).call(this,n.pause)),i.appendChild(o),i.appendChild(a),t.showTooltips){const e=document.createElement("span");e.className="tooltip play-tooltip",e.textContent=t.tooltipPlay;const n=document.createElement("span");n.className="tooltip pause-tooltip",n.style.display="none",n.textContent=t.tooltipPause,i.appendChild(e),i.appendChild(n)}s.appendChild(i)}if(t.showVolume){const i=document.createElement("div");i.className="video-volume-control";const o=document.createElement("button");o.className="video-control-btn volume-btn",o.setAttribute("aria-label","Mute"),o.tabIndex=0;const a=document.createElement("span");a.className="volume-icon",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,me,"m",bt).call(this,n.volume));const r=document.createElement("span");if(r.className="muted-icon",r.style.display="none",r.setAttribute("aria-hidden","true"),r.appendChild(e(this,me,"m",bt).call(this,n.muted)),o.appendChild(a),o.appendChild(r),t.showTooltips){const e=document.createElement("span");e.className="tooltip volume-tooltip",e.textContent=t.tooltipMute;const n=document.createElement("span");n.className="tooltip muted-tooltip",n.style.display="none",n.textContent=t.tooltipUnmute,o.appendChild(e),o.appendChild(n)}i.appendChild(o);const l=document.createElement("div");l.className="video-volume-slider",l.setAttribute("role","slider"),l.tabIndex=0,l.setAttribute("aria-label","Volume"),l.setAttribute("aria-valuemin","0"),l.setAttribute("aria-valuemax","100"),l.setAttribute("aria-valuenow","100");const c=document.createElement("div");c.className="video-volume-progress",l.appendChild(c),i.appendChild(l),s.appendChild(i)}const a=document.createElement("div");a.className="video-time-display",a.textContent="0:00 / 0:00",s.appendChild(a);const r=document.createElement("div");if(r.className="video-controls-spacer",s.appendChild(r),t.showSpeed){const i=document.createElement("div");i.className="video-speed-control";const o=document.createElement("button");o.className="video-control-btn video-speed-btn",o.setAttribute("aria-label","Playback speed"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false"),o.tabIndex=0;const a=document.createElement("span");a.className="speed-text",a.textContent="1x";const r=document.createElement("span");if(r.setAttribute("aria-hidden","true"),r.appendChild(e(this,me,"m",bt).call(this,n.speed)),o.appendChild(r),o.appendChild(a),t.showTooltips){const e=document.createElement("span");e.className="tooltip speed-tooltip",e.textContent=t.tooltipSpeed,o.appendChild(e)}i.appendChild(o);const l=document.createElement("div");l.className="video-speed-menu",l.setAttribute("role","menu"),t.speedOptions.forEach(e=>{const t=document.createElement("button");t.className="video-speed-option "+(1===e?"active":""),t.setAttribute("role","menuitem"),t.tabIndex=-1,t.setAttribute("data-speed",e.toString()),t.textContent=e+"x",l.appendChild(t)}),i.appendChild(l),s.appendChild(i)}if(t.showFullscreen){const i=document.createElement("button");i.className="video-control-btn fullscreen-btn",i.setAttribute("aria-label","Fullscreen"),i.tabIndex=0;const o=document.createElement("span");o.className="fullscreen-icon",o.setAttribute("aria-hidden","true"),o.appendChild(e(this,me,"m",bt).call(this,n.fullscreen));const a=document.createElement("span");if(a.className="exit-fullscreen-icon",a.style.display="none",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,me,"m",bt).call(this,n.exitFullscreen)),i.appendChild(o),i.appendChild(a),t.showTooltips){const e=document.createElement("span");e.className="tooltip fullscreen-tooltip",e.textContent=t.tooltipFullscreen;const n=document.createElement("span");n.className="tooltip exit-fullscreen-tooltip",n.style.display="none",n.textContent=t.tooltipExitFullscreen,i.appendChild(e),i.appendChild(n)}s.appendChild(i)}return o.appendChild(s),i.appendChild(o),i},Et=function(e){const t="light"===e.theme?{accent:"#ffffff"!==e.accentColor?e.accentColor:"#000000",controlsBg:"rgba(0,0,0,0.8)"!==e.controlsBackground?e.controlsBackground:"rgba(255,255,255,0.9)",centerPlayBg:"rgba(0,0,0,0.7)"!==e.centerPlayBackground?e.centerPlayBackground:"rgba(255,255,255,0.8)"}:{accent:e.accentColor,controlsBg:e.controlsBackground,centerPlayBg:e.centerPlayBackground};this.style.setProperty("--accent-color",t.accent),this.style.setProperty("--controls-bg",t.controlsBg),this.style.setProperty("--center-play-bg",t.centerPlayBg),e.centerPlaySize&&this.style.setProperty("--center-play-size",e.centerPlaySize+"px")},kt=function(){const t=e(this,me,"m",mt).call(this);t.lazy||t.pauseOnOutOfView?e(this,me,"m",xt).call(this,e(this,Re,"f"),t):e(this,me,"m",St).call(this,e(this,Re,"f"),t),t.performanceMode&&e(this,me,"m",Bt).call(this),e(this,me,"m",Et).call(this,t)},At=function(){e(this,me,"m",mt).call(this).pauseOnTabHide&&(document.addEventListener("visibilitychange",e(this,$e,"f"),{passive:!0}),window.addEventListener("pagehide",e(this,Ke,"f"),{passive:!0}),window.addEventListener("pageshow",e(this,Ze,"f"),{passive:!0}))},Tt=function(){document.removeEventListener("visibilitychange",e(this,$e,"f")),window.removeEventListener("pagehide",e(this,Ke,"f")),window.removeEventListener("pageshow",e(this,Ze,"f"))},xt=function(n,i){if(!("IntersectionObserver"in window))return e(this,me,"m",St).call(this,n,i);const o={root:null,rootMargin:"50px",threshold:i.lazyThreshold};t(this,ye,new IntersectionObserver(o=>{o.forEach(o=>{i.lazy&&!e(this,we,"f")&&o.isIntersecting&&o.intersectionRatio>=i.lazyThreshold&&e(this,me,"m",St).call(this,n,i),i.pauseOnOutOfView&&e(this,Ee,"f")&&e(this,Se,"f")&&(!o.isIntersecting||o.intersectionRatio<i.pauseThreshold?e(this,ke,"f")&&(t(this,Me,!0,"f"),this.pauseVideo()):e(this,Me,"f")&&!e(this,ke,"f")&&(this.playVideo(),t(this,Me,!1,"f")))})},o),"f"),e(this,ye,"f").observe(n),i.lazy||!i.pauseOnOutOfView||e(this,we,"f")||e(this,me,"m",St).call(this,n,i)},St=function(n,i){if(e(this,we,"f"))return;n.classList.add("video-loading");const o=document.createElement("video");t(this,Ee,o,"f");const s={preload:i.preload,disablepictureinpicture:"","webkit-playsinline":"",...i.loop&&{loop:""},...i.muted&&{muted:""},...i.playsinline&&{playsinline:""}};if(Object.entries(s).forEach(([e,t])=>o.setAttribute(e,t)),o.setAttribute("part","video"),i.desktopVideo){const e=document.createElement("source");e.src=i.desktopVideo,e.type=i.videoType,e.media="(min-width: 769px)",o.appendChild(e)}if(i.mobileVideo){const e=document.createElement("source");e.src=i.mobileVideo,e.type=i.videoType,e.media="(max-width: 768px)",o.appendChild(e)}const a=window.matchMedia("(max-width: 768px)").matches;o.src=a&&i.mobileVideo?i.mobileVideo:i.desktopVideo,o.addEventListener("loadeddata",e(this,nt,"f").bind(this,n,i),{once:!0}),o.addEventListener("playing",e(this,it,"f").bind(this,n)),o.addEventListener("pause",e(this,ot,"f").bind(this,n)),o.addEventListener("ended",e(this,st,"f").bind(this,n,i)),o.addEventListener("seeked",()=>e(this,me,"m",qt).call(this,"video-seeked",{currentTime:o.currentTime})),o.addEventListener("seeking",()=>e(this,me,"m",qt).call(this,"video-seeking",{currentTime:o.currentTime})),o.addEventListener("timeupdate",e(this,ht,"f"),{passive:!0}),o.addEventListener("volumechange",e(this,at,"f").bind(this,n)),o.addEventListener("error",e(this,rt,"f").bind(this,n)),document.addEventListener("fullscreenchange",e(this,lt,"f"));const r=n.querySelector(".video-placeholder");r&&r.replaceWith(o),o.style.pointerEvents="auto";const l=n.querySelector("picture");l&&(l.removeEventListener("click",e(this,Je,"f")),l.addEventListener("click",e(this,Je,"f"))),i.autoplay&&i.muted&&this.playVideo()},Ct=function(t){t.addEventListener("click",n=>{const i=n.target,o=i.closest(".video-seekbar");if(o){const t=o.getBoundingClientRect();return e(this,Ye,"f").call(this,(n.clientX-t.left)/t.width),void n.stopPropagation()}const s=i.closest(".video-volume-slider");if(s){const t=s.getBoundingClientRect();return e(this,je,"f").call(this,(n.clientX-t.left)/t.width),void n.stopPropagation()}const a=i.closest('[class*="video-"]');if(a)if(n.stopPropagation(),a.classList.contains("play-pause")||a.classList.contains("video-center-play"))e(this,Ve,"f").call(this,n);else if(a.classList.contains("volume-btn"))e(this,qe,"f").call(this,n);else if(a.classList.contains("fullscreen-btn"))e(this,Ge,"f").call(this,n);else if(a.classList.contains("video-speed-btn"))e(this,me,"m",zt).call(this,t);else if(a.classList.contains("video-speed-option")){const n=parseFloat(a.getAttribute("data-speed"));e(this,Xe,"f").call(this,n,t),e(this,me,"m",It).call(this,t)}});const n=t.querySelector(".video-seekbar");n&&(n.addEventListener("mousedown",e(this,Qe,"f")),n.addEventListener("touchstart",e(this,et,"f"),{passive:!0}));const i=t.querySelector(".video-volume-slider");i&&i.addEventListener("mousedown",e(this,tt,"f")),e(this,Ee,"f")&&e(this,Ee,"f").addEventListener("click",e(this,Ve,"f")),e(this,me,"m",Nt).call(this,t)},Nt=function(t){t.addEventListener("keydown",e(this,He,"f")),t.addEventListener("mouseenter",()=>{e(this,Se,"f")&&t.classList.add("show-controls")},{passive:!0}),t.addEventListener("mouseleave",()=>{t.classList.remove("show-controls")},{passive:!0}),t.addEventListener("touchend",e(this,ct,"f"))},Lt=function(){const t=e(this,Ee,"f");if(!t||!t.duration)return;const n=t.currentTime/t.duration*100;e(this,De,"f")&&(e(this,De,"f").style.width=n+"%"),e(this,Pe,"f")&&e(this,Pe,"f").setAttribute("aria-valuenow",Math.round(n).toString()),e(this,me,"m",Mt).call(this)},Mt=function(){if(!e(this,ze,"f")||!e(this,Ee,"f"))return;const t=e(this,me,"m",_t).call(this,e(this,Ee,"f").currentTime),n=e(this,me,"m",_t).call(this,e(this,Ee,"f").duration);e(this,ze,"f").textContent=`${t} / ${n}`},_t=function(e){if(isNaN(e)||!isFinite(e))return"0:00";return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`},Ot=function(t,n){n||(n=e(this,Re,"f")),n.querySelectorAll(".play-pause, .video-center-play").forEach(e=>{const n=e.querySelector(".play-icon"),i=e.querySelector(".pause-icon");n&&(n.style.display=t?"none":"block"),i&&(i.style.display=t?"block":"none"),e.setAttribute("aria-label",t?"Pause":"Play");const o=e.querySelector(".play-tooltip"),s=e.querySelector(".pause-tooltip");o&&(o.style.display=t?"none":"block"),s&&(s.style.display=t?"block":"none")})},Rt=function(t,n){n||(n=e(this,Re,"f"));const i=n.querySelector(".volume-btn");if(i){const e=i.querySelector(".volume-icon"),n=i.querySelector(".muted-icon");e&&(e.style.display=t?"none":"block"),n&&(n.style.display=t?"block":"none"),i.setAttribute("aria-label",t?"Unmute":"Mute");const o=i.querySelector(".volume-tooltip"),s=i.querySelector(".muted-tooltip");o&&(o.style.display=t?"none":"block"),s&&(s.style.display=t?"block":"none")}},Pt=function(t,n){n||(n=e(this,Re,"f"));const i=n.querySelector(".fullscreen-btn");if(i){const e=i.querySelector(".fullscreen-icon"),n=i.querySelector(".exit-fullscreen-icon");e&&(e.style.display=t?"none":"block"),n&&(n.style.display=t?"block":"none"),i.setAttribute("aria-label",t?"Exit fullscreen":"Fullscreen");const o=i.querySelector(".fullscreen-tooltip"),s=i.querySelector(".exit-fullscreen-tooltip");o&&(o.style.display=t?"none":"block"),s&&(s.style.display=t?"block":"none")}},Dt=function(t,n){e(this,Ie,"f")&&(e(this,Ie,"f").style.width=100*t+"%")},zt=function(t){var n;null===(n=e(this,Fe,"f"))||void 0===n||n.classList.toggle("active")},It=function(t){var n;null===(n=e(this,Fe,"f"))||void 0===n||n.classList.remove("active")},Ft=function(){e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=Math.max(0,e(this,Ee,"f").currentTime-e(this,me,"m",mt).call(this).seekStep))},Wt=function(){e(this,Ee,"f")&&(e(this,Ee,"f").currentTime=Math.min(e(this,Ee,"f").duration,e(this,Ee,"f").currentTime+e(this,me,"m",mt).call(this).seekStep))},Ut=function(t){e(this,Ee,"f")&&e(this,je,"f").call(this,e(this,Ee,"f").volume+t)},Bt=function(){e(this,Re,"f")&&e(this,Re,"f").classList.add("perf-mode")},Ht=function(){e(this,me,"m",Vt).call(this),e(this,me,"m",vt).call(this),requestAnimationFrame(()=>{e(this,me,"m",kt).call(this),e(this,me,"m",At).call(this)})},Vt=function(){e(this,me,"m",Tt).call(this),e(this,ye,"f")&&(e(this,ye,"f").disconnect(),t(this,ye,null,"f")),e(this,Re,"f")&&e(this,Re,"f").removeEventListener("keydown",e(this,He,"f")),e(this,Ee,"f")&&(e(this,Ee,"f").pause(),e(this,Ee,"f").removeEventListener("click",e(this,Ve,"f")),e(this,Ee,"f").src="",e(this,Ee,"f").load(),t(this,Ee,null,"f")),e(this,Oe,"f")&&cancelAnimationFrame(e(this,Oe,"f")),t(this,we,!1,"f"),t(this,ke,!1,"f"),t(this,Se,!1,"f"),t(this,Me,!1,"f"),t(this,Le,!1,"f"),t(this,Ne,e(this,Ce,"f"),"f"),t(this,xe,1,"f"),t(this,Re,null,"f"),t(this,Pe,null,"f"),t(this,De,null,"f"),t(this,ze,null,"f"),t(this,Ie,null,"f"),t(this,Fe,null,"f"),t(this,We,null,"f"),t(this,ve,null,"f")},qt=function(e,t={}){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))},customElements.get("shadow-plyr")||customElements.define("shadow-plyr",Xt),customElements.get("shadow-plyr")||customElements.define("shadow-plyr",Xt);export{Xt as ShadowPlyr};
4
+ //# sourceMappingURL=index.js.map