@elementmints/shadow-plyr 1.0.7 → 1.2.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/README.md +180 -204
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/{types/types.d.ts → types.d.ts} +26 -3
- package/package.json +24 -3
- /package/dist/{types/icons.d.ts → icons.d.ts} +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/shadow-plyr.d.ts → shadow-plyr.d.ts} +0 -0
- /package/dist/{types/utils.d.ts → utils.d.ts} +0 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
!function(e
|
|
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:p,setPrototypeOf:u,isFrozen:h,getPrototypeOf:m,getOwnPropertyDescriptor:f}=Object;let{freeze:v,seal:b,create:g}=Object,{apply:y,construct:w}="undefined"!=typeof Reflect&&Reflect;v||(v=function(e){return e}),b||(b=function(e){return e}),y||(y=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)}),w||(w=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 E=z(Array.prototype.forEach),k=z(Array.prototype.lastIndexOf),A=z(Array.prototype.pop),T=z(Array.prototype.push),x=z(Array.prototype.splice),S=z(String.prototype.toLowerCase),C=z(String.prototype.toString),N=z(String.prototype.match),L=z(String.prototype.replace),M=z(String.prototype.indexOf),_=z(String.prototype.trim),O=z(Object.prototype.hasOwnProperty),R=z(RegExp.prototype.test),P=(D=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return w(D,t)});var D;function z(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 y(e,t,i)}}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;u&&u(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(h(t)||(t[i]=e),o=e)}e[o]=!0}return e}function F(e){for(let t=0;t<e.length;t++){O(e,t)||(e[t]=null)}return e}function W(e){const t=g(null);for(const[n,i]of p(e)){O(e,n)&&(Array.isArray(i)?t[n]=F(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=W(i):t[n]=i)}return t}function U(e,t){for(;null!==e;){const n=f(e,t);if(n){if(n.get)return z(n.get);if("function"==typeof n.value)return z(n.value)}e=m(e)}return function(){return null}}const B=v(["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"]),H=v(["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"]),V=v(["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"]),q=v(["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"]),G=v(["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"]),j=v(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=v(["#text"]),X=v(["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"]),$=v(["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"]),K=v(["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"]),Z=v(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=b(/<%[\w\W]*|[\w\W]*%>/gm),ee=b(/\$\{[\w\W]*/gm),te=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),ne=b(/^aria-[\-\w]+$/),ie=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oe=b(/^(?:\w+script|data):/i),se=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ae=b(/^html$/i),re=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var le=Object.freeze({__proto__:null,ARIA_ATTR:ne,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:re,DATA_ATTR:te,DOCTYPE_NAME:ae,ERB_EXPR:Q,IS_ALLOWED_URI:ie,IS_SCRIPT_OR_DATA:oe,MUSTACHE_EXPR:J,TMPLIT_EXPR:ee});const ce=1,de=3,pe=7,ue=8,he=9,me=function(){return"undefined"==typeof window?null:window};var 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,je,Ye,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,jt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||t.document.nodeType!==he||!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:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:f}=t,b=c.prototype,y=U(b,"cloneNode"),w=U(b,"remove"),D=U(b,"nextSibling"),z=U(b,"childNodes"),F=U(b,"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:ne,getElementsByTagName:oe}=i,{importNode:se}=o;let re={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof p&&"function"==typeof F&&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}=le;let{IS_ALLOWED_URI:Ae}=le,Te=null;const xe=I({},[...B,...H,...V,...G,...Y]);let Se=null;const Ce=I({},[...X,...$,...K,...Z]);let Ne=Object.seal(g(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(g(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,je=!0,Ye=!1,Xe={},$e=null;const Ke=I({},["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=I({},["audio","video","img","source","image","track"]);let Qe=null;const et=I({},["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=I({},[tt,nt,it],C);let lt=I({},["mi","mo","mn","ms","mtext"]),ct=I({},["annotation-xml"]);const dt=I({},["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=W(e),pt=-1===ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ht="application/xhtml+xml"===pt?C:S,Te=O(e,"ALLOWED_TAGS")?I({},e.ALLOWED_TAGS,ht):xe,Se=O(e,"ALLOWED_ATTR")?I({},e.ALLOWED_ATTR,ht):Ce,at=O(e,"ALLOWED_NAMESPACES")?I({},e.ALLOWED_NAMESPACES,C):rt,Qe=O(e,"ADD_URI_SAFE_ATTR")?I(W(et),e.ADD_URI_SAFE_ATTR,ht):et,Ze=O(e,"ADD_DATA_URI_TAGS")?I(W(Je),e.ADD_DATA_URI_TAGS,ht):Je,$e=O(e,"FORBID_CONTENTS")?I({},e.FORBID_CONTENTS,ht):Ke,Le=O(e,"FORBID_TAGS")?I({},e.FORBID_TAGS,ht):W({}),Me=O(e,"FORBID_ATTR")?I({},e.FORBID_ATTR,ht):W({}),Xe=!!O(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,je=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||ie,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=I({},Y),Se=[],!0===Xe.html&&(I(Te,B),I(Se,X)),!0===Xe.svg&&(I(Te,H),I(Se,$),I(Se,Z)),!0===Xe.svgFilters&&(I(Te,V),I(Se,$),I(Se,Z)),!0===Xe.mathMl&&(I(Te,G),I(Se,K),I(Se,Z))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?_e.tagCheck=e.ADD_TAGS:(Te===xe&&(Te=W(Te)),I(Te,e.ADD_TAGS,ht))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?_e.attributeCheck=e.ADD_ATTR:(Se===Ce&&(Se=W(Se)),I(Se,e.ADD_ATTR,ht))),e.ADD_URI_SAFE_ATTR&&I(Qe,e.ADD_URI_SAFE_ATTR,ht),e.FORBID_CONTENTS&&($e===Ke&&($e=W($e)),I($e,e.FORBID_CONTENTS,ht)),e.ADD_FORBID_CONTENTS&&($e===Ke&&($e=W($e)),I($e,e.ADD_FORBID_CONTENTS,ht)),je&&(Te["#text"]=!0),Fe&&I(Te,["html","head","body"]),Te.table&&(I(Te,["tbody"]),delete Le.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw P('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}}(f,s)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));v&&v(e),mt=e}},gt=I({},[...H,...V,...q]),yt=I({},[...G,...j]),wt=function(e){T(n.removed,{element:e});try{F(e).removeChild(e)}catch(t){w(e)}},Et=function(e,t){try{T(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(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=N(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,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.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){E(e,e=>{e.call(n,t,i,mt)})}const Ct=function(e){let t=null;if(St(re.beforeSanitizeElements,e,null),Tt(e))return wt(e),!0;const i=ht(e.nodeName);if(St(re.uponSanitizeElement,e,{tagName:i,allowedTags:Te}),Ie&&e.hasChildNodes()&&!xt(e.firstElementChild)&&R(/<[/\w!]/g,e.innerHTML)&&R(/<[/\w!]/g,e.textContent))return wt(e),!0;if(e.nodeType===pe)return wt(e),!0;if(Ie&&e.nodeType===ue&&R(/<[/\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&&R(Ne.tagNameCheck,i))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(i))return!1}if(je&&!$e[i]){const t=F(e)||e.parentNode,n=z(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=F(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=S(e.tagName),i=S(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||!R(/<\/no(script|embed|frames)/i,e.innerHTML)?(ze&&e.nodeType===de&&(t=e.textContent,E([fe,ve,be],e=>{t=L(t,e," ")}),e.textContent!==t&&(T(n.removed,{element:e.cloneNode()}),e.textContent=t)),St(re.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]&&R(ge,t));else if(Oe&&R(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&&R(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&R(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t,e))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&R(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(Qe[t]);else if(R(Ae,L(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==M(n,"data:")||!Ze[e]){if(Pe&&!R(we,L(n,Ee,"")));else if(n)return!1}else;return!0},Lt=function(e){return"annotation-xml"!==e&&N(e,ke)},Mt=function(e){St(re.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:_(d);if(i.attrName=c,i.attrValue=p,i.keepAttr=!0,i.forceKeepAttr=void 0,St(re.uponSanitizeAttribute,e,i),p=i.attrValue,!Ge||"id"!==c&&"name"!==c||(Et(a,e),p="user-content-"+p),Ie&&R(/((--!?|])>)|<\/(style|title|textarea)/i,p)){Et(a,e);continue}if("attributename"===c&&N(p,"href")){Et(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Et(a,e);continue}if(!De&&R(/\/>/i,p)){Et(a,e);continue}ze&&E([fe,ve,be],e=>{p=L(p,e," ")});const u=ht(e.nodeName);if(Nt(u,c,p)){if(J&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(r);else switch(f.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):A(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}St(re.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null;const i=At(t);for(St(re.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)St(re.uponSanitizeShadowNode,n,null),Ct(n),Mt(n),n.content instanceof a&&e(n.content);St(re.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 P("toString is not a function");if("string"!=typeof(e=e.toString()))throw P("dirty is not a string, aborting")}if(!n.isSupported)return e;if(We||bt(t),n.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ht(e.nodeName);if(!Te[t]||Le[t])throw P("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===ce&&"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(Ye?e:i);for(;r=d.nextNode();)Ct(r),Mt(r),r.content instanceof a&&_t(r.content);if(Ye)return e;if(Be){if(He)for(c=ne.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(Se.shadowroot||Se.shadowrootmode)&&(c=se.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&&R(ae,i.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+p),ze&&E([fe,ve,be],e=>{p=L(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&&T(re[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=k(re[e],t);return-1===n?void 0:x(re[e],n,1)[0]}return A(re[e])},n.removeHooks=function(e){re[e]=[]},n.removeAllHooks=function(){re={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 Xt=(()=>{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 $t extends HTMLElement{constructor(){super(),fe.add(this),ve.set(this,void 0),be.set(this,null),ge.set(this,0),ye.set(this,1e4),we.set(this,null),Ee.set(this,!1),ke.set(this,null),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,!1),Oe.set(this,!0),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,null),Be.set(this,0),He.set(this,null),Ve.set(this,e=>{if(!t(this,ke,"f"))return;const n=e.key.toLowerCase();t(this,fe,"m",ft).call(this);let i=!1;const o={" ":()=>t(this,qe,"f").call(this),k:()=>t(this,qe,"f").call(this),arrowleft:()=>t(this,fe,"m",Wt).call(this),arrowright:()=>t(this,fe,"m",Ut).call(this),arrowup:()=>t(this,fe,"m",Bt).call(this,.1),arrowdown:()=>t(this,fe,"m",Bt).call(this,-.1),m:()=>t(this,Ge,"f").call(this),f:()=>t(this,je,"f").call(this),home:()=>{t(this,ke,"f")&&(t(this,ke,"f").currentTime=0)},end:()=>{t(this,ke,"f")&&(t(this,ke,"f").currentTime=t(this,ke,"f").duration)}};o[n]?(e.preventDefault(),o[n](),i=!0):n>="0"&&n<="9"&&t(this,ke,"f").duration&&(e.preventDefault(),t(this,ke,"f").currentTime=t(this,ke,"f").duration*(parseInt(n)/10),i=!0),i&&t(this,Pe,"f")&&t(this,Pe,"f").classList.add("show-controls")}),qe.set(this,e=>{e&&e.stopPropagation(),t(this,ke,"f")&&(t(this,Ae,"f")?this.pauseVideo():this.playVideo())}),Ge.set(this,e=>{e&&e.stopPropagation(),t(this,ke,"f")&&(t(this,ke,"f").muted=!t(this,ke,"f").muted)}),je.set(this,e=>{e&&e.stopPropagation();const n=t(this,ve,"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,e=>{var n;(null===(n=t(this,ke,"f"))||void 0===n?void 0:n.duration)&&(t(this,ke,"f").currentTime=t(this,ke,"f").duration*e)}),Xe.set(this,e=>{if(t(this,ke,"f")){const n=Math.max(0,Math.min(1,e));t(this,ke,"f").volume=n,t(this,ke,"f").muted=0===n}}),$e.set(this,(e,i)=>{t(this,ke,"f")&&(t(this,ke,"f").playbackRate=e,n(this,Se,e,"f"),null==i||i.querySelectorAll(".video-speed-option").forEach(t=>{t.classList.toggle("active",parseFloat(t.getAttribute("data-speed"))===e)}),t(this,Ue,"f")&&(t(this,Ue,"f").textContent=e+"x"))}),Ke.set(this,()=>{t(this,Ce,"f")&&t(this,ke,"f")&&(document.hidden?t(this,Ae,"f")&&(n(this,_e,!0,"f"),this.pauseVideo()):t(this,_e,"f")&&!t(this,Ae,"f")&&(this.playVideo(),n(this,_e,!1,"f")))}),Ze.set(this,()=>{t(this,Ae,"f")&&(n(this,_e,!0,"f"),this.pauseVideo())}),Je.set(this,()=>{t(this,_e,"f")&&!t(this,Ae,"f")&&(this.playVideo(),n(this,_e,!1,"f"))}),Qe.set(this,()=>{t(this,fe,"m",ft).call(this).posterClickPlay&&t(this,ke,"f")&&!t(this,Me,"f")&&this.playVideo()}),et.set(this,e=>{e.preventDefault(),n(this,Te,!0,"f");const i=e.currentTarget,o=i.getBoundingClientRect();t(this,Ye,"f").call(this,(e.clientX-o.left)/o.width);const s=e=>{if(!t(this,Te,"f"))return;e.preventDefault();const n=i.getBoundingClientRect();t(this,Ye,"f").call(this,(e.clientX-n.left)/n.width)},a=()=>{n(this,Te,!1,"f"),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}),tt.set(this,e=>{if(!t(this,ke,"f"))return;n(this,Te,!0,"f");const i=e.currentTarget,o=e=>{const n=i.getBoundingClientRect(),o=(e.clientX-n.left)/n.width;t(this,Ye,"f").call(this,o)};o(e.touches[0]);const s=e=>{t(this,Te,"f")&&o(e.touches[0])},a=()=>{n(this,Te,!1,"f"),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",a)};document.addEventListener("touchmove",s,{passive:!0}),document.addEventListener("touchend",a)}),nt.set(this,e=>{e.preventDefault(),n(this,xe,!0,"f");const i=e.currentTarget,o=i.getBoundingClientRect();t(this,Xe,"f").call(this,(e.clientX-o.left)/o.width);const s=e=>{if(!t(this,xe,"f"))return;e.preventDefault();const n=i.getBoundingClientRect();t(this,Xe,"f").call(this,(e.clientX-n.left)/n.width)},a=()=>{n(this,xe,!1,"f"),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}),it.set(this,(e,i)=>{t(this,ke,"f")&&(e.classList.remove("video-loading"),e.classList.add("video-loaded"),n(this,Ee,!0,"f"),n(this,Ce,!0,"f"),i.showControls&&t(this,fe,"m",Nt).call(this,e),i.autoplay||(n(this,Me,!1,"f"),n(this,Le,!0,"f"),e.classList.add("poster-visible")),t(this,fe,"m",Dt).call(this,!1,e),t(this,fe,"m",Gt).call(this,"video-ready",{duration:t(this,ke,"f").duration}))}),ot.set(this,e=>{t(this,fe,"m",Gt).call(this,"video-playing",{src:t(this,ke,"f").currentSrc,currentTime:t(this,ke,"f").currentTime,duration:t(this,ke,"f").duration}),e.classList.add("is-playing"),e.classList.remove("poster-visible"),n(this,Ae,!0,"f"),n(this,Me,!0,"f"),n(this,Le,!1,"f"),t(this,fe,"m",Rt).call(this,!0,e)}),st.set(this,e=>{t(this,fe,"m",Gt).call(this,"video-paused",{currentTime:t(this,ke,"f").currentTime}),e.classList.remove("is-playing"),n(this,Ae,!1,"f"),t(this,fe,"m",Rt).call(this,!1,e)}),at.set(this,(e,i)=>{t(this,fe,"m",Gt).call(this,"video-ended",{duration:t(this,ke,"f").duration}),e.classList.remove("is-playing"),n(this,Ae,!1,"f"),t(this,fe,"m",Rt).call(this,!1,e),i.loop||(i.resetOnEnded&&(t(this,ke,"f").currentTime=0),i.showPosterOnEnded&&t(this,Ne,"f")&&(e.classList.add("poster-visible"),n(this,Le,!0,"f")))}),rt.set(this,e=>{const n=t(this,ke,"f");t(this,fe,"m",Pt).call(this,n.muted||0===n.volume,e),t(this,fe,"m",zt).call(this,n.volume,e),t(this,fe,"m",Gt).call(this,"video-volume-change",{volume:n.volume,muted:n.muted})}),lt.set(this,e=>{var i,o;console.error("Video load error"),e.classList.remove("video-loading","video-loaded"),n(this,Ce,!1,"f"),t(this,fe,"m",Gt).call(this,"video-error",{code:null===(o=null===(i=t(this,ke,"f"))||void 0===i?void 0:i.error)||void 0===o?void 0:o.code})}),ct.set(this,()=>{const e=document.fullscreenElement===t(this,ve,"f").querySelector(".video-container");t(this,fe,"m",Dt).call(this,e),t(this,fe,"m",Gt).call(this,e?"video-fullscreen-enter":"video-fullscreen-exit")}),dt.set(this,e=>{var i;const o=t(this,fe,"m",ft).call(this);if(!t(this,ke,"f"))return;const s=t(this,Pe,"f").getBoundingClientRect(),a=e.changedTouches[0].clientX<s.left+s.width/2;o.enableTapRipple&&t(this,fe,"m",ht).call(this,e.changedTouches[0].clientX,e.changedTouches[0].clientY),n(this,Be,(i=t(this,Be,"f"),++i),"f"),t(this,He,"f")&&clearTimeout(t(this,He,"f")),n(this,He,window.setTimeout(()=>{const e=o.doubleTapSeekSeconds,i=o.tripleTapSeconds;2===t(this,Be,"f")&&o.doubleTapSeek&&t(this,fe,"m",ut).call(this,a?-e:e),t(this,Be,"f")>=3&&o.tripleTapSeek&&t(this,fe,"m",ut).call(this,a?-i:i),n(this,Be,0,"f")},300),"f")}),mt.set(this,void 0),n(this,ve,this.attachShadow({mode:"open"}),"f"),t(this,ve,"f").adoptedStyleSheets=[Yt],n(this,mt,function(e,t){let n;return function(...i){n||(e.apply(this,i),n=!0,setTimeout(()=>n=!1,t))}}(t(this,fe,"m",Mt).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(){t(this,fe,"m",bt).call(this),t(this,fe,"m",At).call(this),t(this,fe,"m",Tt).call(this),"true"===this.getAttribute("virtual-playback")&&Xt.register(this)}disconnectedCallback(){t(this,fe,"m",qt).call(this),t(this,fe,"m",xt).call(this),t(this,Re,"f")&&cancelAnimationFrame(t(this,Re,"f")),Xt.unregister(this)}attributeChangedCallback(e,i,o){if(i===o)return;if(n(this,be,null,"f"),!t(this,Ee,"f"))return;const s=t(this,fe,"m",ft).call(this);switch(e){case"muted":t(this,ke,"f")&&(t(this,ke,"f").muted=s.muted);break;case"loop":t(this,ke,"f")&&(t(this,ke,"f").loop=s.loop);break;case"accent-color":case"theme":case"controls-background":case"center-play-background":case"center-play-size":t(this,fe,"m",kt).call(this,s);break;default:t(this,fe,"m",Vt).call(this)}}play(){this.playVideo()}pause(){this.pauseVideo()}mute(){t(this,ke,"f")&&(t(this,ke,"f").muted=!0)}unmute(){t(this,ke,"f")&&(t(this,ke,"f").muted=!1)}seek(e){t(this,ke,"f")&&(t(this,ke,"f").currentTime=e)}playVideo(){if(!t(this,ke,"f"))return;t(this,fe,"m",ft).call(this).autoplay&&(t(this,ke,"f").muted=!0),"true"===this.getAttribute("virtual-playback")&&Xt.requestPlay(this);const e=t(this,ke,"f").play();e&&e.catch(()=>{n(this,Le,!0,"f"),t(this,Pe,"f")&&t(this,Pe,"f").classList.add("poster-visible")})}pauseVideo(e){t(this,ke,"f")&&(t(this,ke,"f").pause(),e||t(this,fe,"m",Gt).call(this,"video-paused"))}}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,je=new WeakMap,Ye=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,dt=new WeakMap,mt=new WeakMap,fe=new WeakSet,pt=function(e){var n;const i=document.createElement("div");i.className="seek-overlay",i.textContent=(e>0?"+":"")+e+"s",null===(n=t(this,Pe,"f"))||void 0===n||n.appendChild(i),setTimeout(()=>i.remove(),600)},ut=function(e){if(!t(this,ke,"f"))return;const n=Math.min(Math.max(0,t(this,ke,"f").currentTime+e),t(this,ke,"f").duration);t(this,ke,"f").currentTime=n,t(this,fe,"m",pt).call(this,e)},ht=function(e,n){if(!t(this,Pe,"f"))return;const i=t(this,Pe,"f").getBoundingClientRect(),o=document.createElement("div");o.className="tap-ripple",o.style.left=e-i.left+"px",o.style.top=n-i.top+"px",t(this,Pe,"f").appendChild(o),setTimeout(()=>o.remove(),600)},ft=function(){const e=Date.now();if(t(this,be,"f")&&e-t(this,ge,"f")<t(this,ye,"f"))return t(this,be,"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:t(this,fe,"m",vt).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 n(this,be,i,"f"),n(this,ge,e,"f"),i},vt=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]}},bt=function(){const e=t(this,fe,"m",ft).call(this);n(this,Ne,!(!e.desktopPoster&&!e.mobilePoster),"f"),n(this,Le,t(this,Ne,"f")&&!t(this,Me,"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"),e.desktopPoster||e.mobilePoster){const t=document.createElement("picture");if(e.mobilePoster){const n=document.createElement("source");n.media="(max-width: 768px)",n.srcset=e.mobilePoster,t.appendChild(n)}const n=document.createElement("img");n.src=e.desktopPoster,n.alt="Video thumbnail",n.loading="lazy",t.appendChild(n),i.appendChild(t)}const o=document.createElement("div");if(o.className="video-placeholder",i.appendChild(o),e.showCenterPlay){const n=t(this,fe,"m",wt).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(t(this,fe,"m",gt).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(t(this,fe,"m",gt).call(this,n.pause)),o.appendChild(s),o.appendChild(a),e.showTooltips){const t=document.createElement("span");t.className="tooltip center-play-tooltip",t.textContent=e.tooltipCenterPlay,o.appendChild(t)}const r=document.createElement("span");r.className="sr-only",r.textContent="Play",o.appendChild(r),i.appendChild(o)}e.showControls&&"none"!==e.controlsType&&i.appendChild(t(this,fe,"m",Et).call(this,e)),e.showSeekButtons&&i.appendChild(t(this,fe,"m",yt).call(this,e));const s=document.createElement("div");s.className="video-container",s.setAttribute("part","video-container"),s.appendChild(i),t(this,ve,"f").innerHTML="",t(this,ve,"f").appendChild(s),n(this,Pe,i,"f"),n(this,De,i.querySelector(".video-seekbar"),"f"),n(this,ze,i.querySelector(".video-seekbar-progress"),"f"),n(this,Ie,i.querySelector(".video-time-display"),"f"),n(this,Fe,i.querySelector(".video-volume-progress"),"f"),n(this,We,i.querySelector(".video-speed-menu"),"f"),n(this,Ue,i.querySelector(".speed-text"),"f")},gt=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},yt=function(e){const n=document.createElement("div");n.className="video-seek-buttons";const i=document.createElement("button");i.className="seek-left",i.textContent=`-${e.seekButtonSeconds}s`;const o=document.createElement("button");return o.className="seek-right",o.textContent=`+${e.seekButtonSeconds}s`,i.addEventListener("click",()=>{t(this,ke,"f")&&(t(this,ke,"f").currentTime=Math.max(0,t(this,ke,"f").currentTime-e.seekButtonSeconds))}),o.addEventListener("click",()=>{t(this,ke,"f")&&(t(this,ke,"f").currentTime=Math.min(t(this,ke,"f").duration,t(this,ke,"f").currentTime+e.seekButtonSeconds))}),n.appendChild(i),n.appendChild(o),n},wt=function(){const e=`${this.getAttribute("play-icon")||""}-${this.getAttribute("pause-icon")||""}`;if(d.has(e))return d.get(e);const t={play:jt.sanitize(this.getAttribute("play-icon")||i,{USE_PROFILES:{svg:!0}}),pause:jt.sanitize(this.getAttribute("pause-icon")||o,{USE_PROFILES:{svg:!0}}),volume:jt.sanitize(this.getAttribute("volume-icon")||s,{USE_PROFILES:{svg:!0}}),muted:jt.sanitize(this.getAttribute("muted-icon")||a,{USE_PROFILES:{svg:!0}}),fullscreen:jt.sanitize(this.getAttribute("fullscreen-icon")||r,{USE_PROFILES:{svg:!0}}),exitFullscreen:jt.sanitize(this.getAttribute("exit-fullscreen-icon")||l,{USE_PROFILES:{svg:!0}}),speed:jt.sanitize(this.getAttribute("speed-icon")||c,{USE_PROFILES:{svg:!0}})};return d.set(e,t),t},Et=function(e){const n=t(this,fe,"m",wt).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"),e.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",e.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(t(this,fe,"m",gt).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(t(this,fe,"m",gt).call(this,n.pause)),i.appendChild(o),i.appendChild(a),e.showTooltips){const t=document.createElement("span");t.className="tooltip play-tooltip",t.textContent=e.tooltipPlay;const n=document.createElement("span");n.className="tooltip pause-tooltip",n.style.display="none",n.textContent=e.tooltipPause,i.appendChild(t),i.appendChild(n)}s.appendChild(i)}if(e.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(t(this,fe,"m",gt).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(t(this,fe,"m",gt).call(this,n.muted)),o.appendChild(a),o.appendChild(r),e.showTooltips){const t=document.createElement("span");t.className="tooltip volume-tooltip",t.textContent=e.tooltipMute;const n=document.createElement("span");n.className="tooltip muted-tooltip",n.style.display="none",n.textContent=e.tooltipUnmute,o.appendChild(t),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),e.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(t(this,fe,"m",gt).call(this,n.speed)),o.appendChild(r),o.appendChild(a),e.showTooltips){const t=document.createElement("span");t.className="tooltip speed-tooltip",t.textContent=e.tooltipSpeed,o.appendChild(t)}i.appendChild(o);const l=document.createElement("div");l.className="video-speed-menu",l.setAttribute("role","menu"),e.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(e.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(t(this,fe,"m",gt).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(t(this,fe,"m",gt).call(this,n.exitFullscreen)),i.appendChild(o),i.appendChild(a),e.showTooltips){const t=document.createElement("span");t.className="tooltip fullscreen-tooltip",t.textContent=e.tooltipFullscreen;const n=document.createElement("span");n.className="tooltip exit-fullscreen-tooltip",n.style.display="none",n.textContent=e.tooltipExitFullscreen,i.appendChild(t),i.appendChild(n)}s.appendChild(i)}return o.appendChild(s),i.appendChild(o),i},kt=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")},At=function(){const e=t(this,fe,"m",ft).call(this);e.lazy||e.pauseOnOutOfView?t(this,fe,"m",St).call(this,t(this,Pe,"f"),e):t(this,fe,"m",Ct).call(this,t(this,Pe,"f"),e),e.performanceMode&&t(this,fe,"m",Ht).call(this),t(this,fe,"m",kt).call(this,e)},Tt=function(){t(this,fe,"m",ft).call(this).pauseOnTabHide&&(document.addEventListener("visibilitychange",t(this,Ke,"f"),{passive:!0}),window.addEventListener("pagehide",t(this,Ze,"f"),{passive:!0}),window.addEventListener("pageshow",t(this,Je,"f"),{passive:!0}))},xt=function(){document.removeEventListener("visibilitychange",t(this,Ke,"f")),window.removeEventListener("pagehide",t(this,Ze,"f")),window.removeEventListener("pageshow",t(this,Je,"f"))},St=function(e,i){if(!("IntersectionObserver"in window))return t(this,fe,"m",Ct).call(this,e,i);const o={root:null,rootMargin:"50px",threshold:i.lazyThreshold};n(this,we,new IntersectionObserver(o=>{o.forEach(o=>{i.lazy&&!t(this,Ee,"f")&&o.isIntersecting&&o.intersectionRatio>=i.lazyThreshold&&t(this,fe,"m",Ct).call(this,e,i),i.pauseOnOutOfView&&t(this,ke,"f")&&t(this,Ce,"f")&&(!o.isIntersecting||o.intersectionRatio<i.pauseThreshold?t(this,Ae,"f")&&(n(this,_e,!0,"f"),this.pauseVideo()):t(this,_e,"f")&&!t(this,Ae,"f")&&(this.playVideo(),n(this,_e,!1,"f")))})},o),"f"),t(this,we,"f").observe(e),i.lazy||!i.pauseOnOutOfView||t(this,Ee,"f")||t(this,fe,"m",Ct).call(this,e,i)},Ct=function(e,i){if(t(this,Ee,"f"))return;e.classList.add("video-loading");const o=document.createElement("video");n(this,ke,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",t(this,it,"f").bind(this,e,i),{once:!0}),o.addEventListener("playing",t(this,ot,"f").bind(this,e)),o.addEventListener("pause",t(this,st,"f").bind(this,e)),o.addEventListener("ended",t(this,at,"f").bind(this,e,i)),o.addEventListener("seeked",()=>t(this,fe,"m",Gt).call(this,"video-seeked",{currentTime:o.currentTime})),o.addEventListener("seeking",()=>t(this,fe,"m",Gt).call(this,"video-seeking",{currentTime:o.currentTime})),o.addEventListener("timeupdate",t(this,mt,"f"),{passive:!0}),o.addEventListener("volumechange",t(this,rt,"f").bind(this,e)),o.addEventListener("error",t(this,lt,"f").bind(this,e)),document.addEventListener("fullscreenchange",t(this,ct,"f"));const r=e.querySelector(".video-placeholder");r&&r.replaceWith(o),o.style.pointerEvents="auto";const l=e.querySelector("picture");l&&(l.removeEventListener("click",t(this,Qe,"f")),l.addEventListener("click",t(this,Qe,"f"))),i.autoplay&&i.muted&&this.playVideo()},Nt=function(e){e.addEventListener("click",n=>{const i=n.target,o=i.closest(".video-seekbar");if(o){const e=o.getBoundingClientRect();return t(this,Ye,"f").call(this,(n.clientX-e.left)/e.width),void n.stopPropagation()}const s=i.closest(".video-volume-slider");if(s){const e=s.getBoundingClientRect();return t(this,Xe,"f").call(this,(n.clientX-e.left)/e.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"))t(this,qe,"f").call(this,n);else if(a.classList.contains("volume-btn"))t(this,Ge,"f").call(this,n);else if(a.classList.contains("fullscreen-btn"))t(this,je,"f").call(this,n);else if(a.classList.contains("video-speed-btn"))t(this,fe,"m",It).call(this,e);else if(a.classList.contains("video-speed-option")){const n=parseFloat(a.getAttribute("data-speed"));t(this,$e,"f").call(this,n,e),t(this,fe,"m",Ft).call(this,e)}});const n=e.querySelector(".video-seekbar");n&&(n.addEventListener("mousedown",t(this,et,"f")),n.addEventListener("touchstart",t(this,tt,"f"),{passive:!0}));const i=e.querySelector(".video-volume-slider");i&&i.addEventListener("mousedown",t(this,nt,"f")),t(this,ke,"f")&&t(this,ke,"f").addEventListener("click",t(this,qe,"f")),t(this,fe,"m",Lt).call(this,e)},Lt=function(e){e.addEventListener("keydown",t(this,Ve,"f")),e.addEventListener("mouseenter",()=>{t(this,Ce,"f")&&e.classList.add("show-controls")},{passive:!0}),e.addEventListener("mouseleave",()=>{e.classList.remove("show-controls")},{passive:!0}),e.addEventListener("touchend",t(this,dt,"f"))},Mt=function(){const e=t(this,ke,"f");if(!e||!e.duration)return;const n=e.currentTime/e.duration*100;t(this,ze,"f")&&(t(this,ze,"f").style.width=n+"%"),t(this,De,"f")&&t(this,De,"f").setAttribute("aria-valuenow",Math.round(n).toString()),t(this,fe,"m",_t).call(this)},_t=function(){if(!t(this,Ie,"f")||!t(this,ke,"f"))return;const e=t(this,fe,"m",Ot).call(this,t(this,ke,"f").currentTime),n=t(this,fe,"m",Ot).call(this,t(this,ke,"f").duration);t(this,Ie,"f").textContent=`${e} / ${n}`},Ot=function(e){if(isNaN(e)||!isFinite(e))return"0:00";return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`},Rt=function(e,n){n||(n=t(this,Pe,"f")),n.querySelectorAll(".play-pause, .video-center-play").forEach(t=>{const n=t.querySelector(".play-icon"),i=t.querySelector(".pause-icon");n&&(n.style.display=e?"none":"block"),i&&(i.style.display=e?"block":"none"),t.setAttribute("aria-label",e?"Pause":"Play");const o=t.querySelector(".play-tooltip"),s=t.querySelector(".pause-tooltip");o&&(o.style.display=e?"none":"block"),s&&(s.style.display=e?"block":"none")})},Pt=function(e,n){n||(n=t(this,Pe,"f"));const i=n.querySelector(".volume-btn");if(i){const t=i.querySelector(".volume-icon"),n=i.querySelector(".muted-icon");t&&(t.style.display=e?"none":"block"),n&&(n.style.display=e?"block":"none"),i.setAttribute("aria-label",e?"Unmute":"Mute");const o=i.querySelector(".volume-tooltip"),s=i.querySelector(".muted-tooltip");o&&(o.style.display=e?"none":"block"),s&&(s.style.display=e?"block":"none")}},Dt=function(e,n){n||(n=t(this,Pe,"f"));const i=n.querySelector(".fullscreen-btn");if(i){const t=i.querySelector(".fullscreen-icon"),n=i.querySelector(".exit-fullscreen-icon");t&&(t.style.display=e?"none":"block"),n&&(n.style.display=e?"block":"none"),i.setAttribute("aria-label",e?"Exit fullscreen":"Fullscreen");const o=i.querySelector(".fullscreen-tooltip"),s=i.querySelector(".exit-fullscreen-tooltip");o&&(o.style.display=e?"none":"block"),s&&(s.style.display=e?"block":"none")}},zt=function(e,n){t(this,Fe,"f")&&(t(this,Fe,"f").style.width=100*e+"%")},It=function(e){var n;null===(n=t(this,We,"f"))||void 0===n||n.classList.toggle("active")},Ft=function(e){var n;null===(n=t(this,We,"f"))||void 0===n||n.classList.remove("active")},Wt=function(){t(this,ke,"f")&&(t(this,ke,"f").currentTime=Math.max(0,t(this,ke,"f").currentTime-t(this,fe,"m",ft).call(this).seekStep))},Ut=function(){t(this,ke,"f")&&(t(this,ke,"f").currentTime=Math.min(t(this,ke,"f").duration,t(this,ke,"f").currentTime+t(this,fe,"m",ft).call(this).seekStep))},Bt=function(e){t(this,ke,"f")&&t(this,Xe,"f").call(this,t(this,ke,"f").volume+e)},Ht=function(){t(this,Pe,"f")&&t(this,Pe,"f").classList.add("perf-mode")},Vt=function(){t(this,fe,"m",qt).call(this),t(this,fe,"m",bt).call(this),requestAnimationFrame(()=>{t(this,fe,"m",At).call(this),t(this,fe,"m",Tt).call(this)})},qt=function(){t(this,fe,"m",xt).call(this),t(this,we,"f")&&(t(this,we,"f").disconnect(),n(this,we,null,"f")),t(this,Pe,"f")&&t(this,Pe,"f").removeEventListener("keydown",t(this,Ve,"f")),t(this,ke,"f")&&(t(this,ke,"f").pause(),t(this,ke,"f").removeEventListener("click",t(this,qe,"f")),t(this,ke,"f").src="",t(this,ke,"f").load(),n(this,ke,null,"f")),t(this,Re,"f")&&cancelAnimationFrame(t(this,Re,"f")),n(this,Ee,!1,"f"),n(this,Ae,!1,"f"),n(this,Ce,!1,"f"),n(this,_e,!1,"f"),n(this,Me,!1,"f"),n(this,Le,t(this,Ne,"f"),"f"),n(this,Se,1,"f"),n(this,Pe,null,"f"),n(this,De,null,"f"),n(this,ze,null,"f"),n(this,Ie,null,"f"),n(this,Fe,null,"f"),n(this,We,null,"f"),n(this,Ue,null,"f"),n(this,be,null,"f")},Gt=function(e,t={}){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))},customElements.get("shadow-plyr")||customElements.define("shadow-plyr",$t),customElements.get("shadow-plyr")||customElements.define("shadow-plyr",$t),e.ShadowPlyr=$t});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ShadowPlyr={})}(this,function(t){"use strict";function e(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function i(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i}"function"==typeof SuppressedError&&SuppressedError;const n='<svg viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>',s='<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>',a='<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>',l='<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>',c='<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>',d='<svg viewBox="0 0 24 24"><title xmlns="">Loop Once</title><path fill="currentColor" d="M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"/></svg>',h='<svg viewBox="0 0 24 24"><title xmlns="">loop</title><path fill="currentColor" fill-rule="evenodd" d="M6.876 15.124A6.002 6.002 0 0 0 17.658 14h2.09a8.003 8.003 0 0 1-14.316 2.568L3 19v-6h6zm10.249-6.249A6.004 6.004 0 0 0 6.34 10H4.25a8.005 8.005 0 0 1 14.32-2.57L21 5v6h-6z"/></svg>',u='<svg viewBox="0 0 24 24"><path d="M19 11h-8v6h8v-6zm4 8V5c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 0H3V5h18v14z"/></svg>',p='<svg viewBox="0 0 24 24"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12zM6 10h2v2H6v-2zm0 4h8v2H6v-2zm10 0h2v2h-2v-2zm-6-4h8v2h-8v-2z"/></svg>',m='<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7v-7zm4-3h2v10h-2V7zm4 6h2v4h-2v-4z"/></svg>',f='<svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>',b='<svg viewBox="0 0 24 24"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM9 8h2v8H9V8zm4 0h2v8h-2V8z"/></svg>',v='<svg viewBox="0 0 24 24"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>',y='<svg viewBox="0 0 24 24"><path d="M6 22h12l-6-6-6 6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>',g='<svg viewBox="0 0 24 24"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zm-10-7h4v4h-4v-4z"/></svg>',w=new Map;function A(t,e){let i;return function(...n){i||(t.apply(this,n),i=!0,setTimeout(()=>i=!1,e))}}
|
|
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 */const{entries:k,setPrototypeOf:E,isFrozen:x,getPrototypeOf:C,getOwnPropertyDescriptor:T}=Object;let{freeze:S,seal:L,create:M}=Object,{apply:N,construct:z}="undefined"!=typeof Reflect&&Reflect;S||(S=function(t){return t}),L||(L=function(t){return t}),N||(N=function(t,e){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return t.apply(e,n)}),z||(z=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return new t(...i)});const _=Y(Array.prototype.forEach),P=Y(Array.prototype.lastIndexOf),O=Y(Array.prototype.pop),R=Y(Array.prototype.push),I=Y(Array.prototype.splice),D=Y(String.prototype.toLowerCase),W=Y(String.prototype.toString),q=Y(String.prototype.match),F=Y(String.prototype.replace),H=Y(String.prototype.indexOf),B=Y(String.prototype.trim),V=Y(Object.prototype.hasOwnProperty),U=Y(RegExp.prototype.test),j=(G=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return z(G,e)});var G;function Y(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return N(t,e,n)}}function X(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;E&&E(t,null);let n=e.length;for(;n--;){let s=e[n];if("string"==typeof s){const t=i(s);t!==s&&(x(e)||(e[n]=t),s=t)}t[s]=!0}return t}function $(t){for(let e=0;e<t.length;e++){V(t,e)||(t[e]=null)}return t}function K(t){const e=M(null);for(const[i,n]of k(t)){V(t,i)&&(Array.isArray(n)?e[i]=$(n):n&&"object"==typeof n&&n.constructor===Object?e[i]=K(n):e[i]=n)}return e}function Q(t,e){for(;null!==t;){const i=T(t,e);if(i){if(i.get)return Y(i.get);if("function"==typeof i.value)return Y(i.value)}t=C(t)}return function(){return null}}const Z=S(["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"]),J=S(["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"]),tt=S(["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"]),et=S(["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"]),it=S(["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"]),nt=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),st=S(["#text"]),ot=S(["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"]),at=S(["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"]),lt=S(["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"]),rt=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ct=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dt=L(/<%[\w\W]*|[\w\W]*%>/gm),ht=L(/\$\{[\w\W]*/gm),ut=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),pt=L(/^aria-[\-\w]+$/),mt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ft=L(/^(?:\w+script|data):/i),bt=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vt=L(/^html$/i),yt=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:pt,ATTR_WHITESPACE:bt,CUSTOM_ELEMENT:yt,DATA_ATTR:ut,DOCTYPE_NAME:vt,ERB_EXPR:dt,IS_ALLOWED_URI:mt,IS_SCRIPT_OR_DATA:ft,MUSTACHE_EXPR:ct,TMPLIT_EXPR:ht});const wt=1,At=3,kt=7,Et=8,xt=9,Ct=function(){return"undefined"==typeof window?null:window};var Tt,St,Lt,Mt,Nt,zt,_t,Pt,Ot,Rt,It,Dt,Wt,qt,Ft,Ht,Bt,Vt,Ut,jt,Gt,Yt,Xt,$t,Kt,Qt,Zt,Jt,te,ee,ie,ne,se,oe,ae,le,re,ce,de,he,ue,pe,me,fe,be,ve,ye,ge,we,Ae,ke,Ee,xe,Ce,Te,Se,Le,Me,Ne,ze,_e,Pe,Oe,Re,Ie,De,We,qe,Fe,He,Be,Ve,Ue,je,Ge,Ye,Xe,$e,Ke,Qe,Ze,Je,ti,ei,ii,ni,si,oi,ai,li,ri,ci,di,hi,ui,pi,mi,fi,bi,vi,yi,gi,wi,Ai,ki,Ei,xi,Ci,Ti,Si,Li,Mi,Ni,zi,_i,Pi,Oi,Ri,Ii,Di,Wi,qi,Fi,Hi,Bi,Vi,Ui,ji,Gi,Yi,Xi,$i,Ki,Qi,Zi,Ji,tn,en,nn,sn,on,an,ln,rn,cn,dn,hn,un,pn,mn,fn,bn,vn,yn,gn=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ct();const i=e=>t(e);if(i.version="3.3.1",i.removed=[],!e||!e.document||e.document.nodeType!==xt||!e.Element)return i.isSupported=!1,i;let{document:n}=e;const s=n,o=s.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:c,NodeFilter:d,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:m}=e,f=c.prototype,b=Q(f,"cloneNode"),v=Q(f,"remove"),y=Q(f,"nextSibling"),g=Q(f,"childNodes"),w=Q(f,"parentNode");if("function"==typeof l){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let A,E="";const{implementation:x,createNodeIterator:C,createDocumentFragment:T,getElementsByTagName:L}=n,{importNode:N}=s;let z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof k&&"function"==typeof w&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:G,ERB_EXPR:Y,TMPLIT_EXPR:$,DATA_ATTR:ct,ARIA_ATTR:dt,IS_SCRIPT_OR_DATA:ht,ATTR_WHITESPACE:ut,CUSTOM_ELEMENT:pt}=gt;let{IS_ALLOWED_URI:ft}=gt,bt=null;const yt=X({},[...Z,...J,...tt,...it,...st]);let Tt=null;const St=X({},[...ot,...at,...lt,...rt]);let Lt=Object.seal(M(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}})),Mt=null,Nt=null;const zt=Object.seal(M(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _t=!0,Pt=!0,Ot=!1,Rt=!0,It=!1,Dt=!0,Wt=!1,qt=!1,Ft=!1,Ht=!1,Bt=!1,Vt=!1,Ut=!0,jt=!1,Gt=!0,Yt=!1,Xt={},$t=null;const Kt=X({},["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 Qt=null;const Zt=X({},["audio","video","img","source","image","track"]);let Jt=null;const te=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml";let se=ne,oe=!1,ae=null;const le=X({},[ee,ie,ne],W);let re=X({},["mi","mo","mn","ms","mtext"]),ce=X({},["annotation-xml"]);const de=X({},["title","style","font","a","script"]);let he=null;const ue=["application/xhtml+xml","text/html"];let pe=null,me=null;const fe=n.createElement("form"),be=function(t){return t instanceof RegExp||t instanceof Function},ve=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!me||me!==t){if(t&&"object"==typeof t||(t={}),t=K(t),he=-1===ue.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===he?W:D,bt=V(t,"ALLOWED_TAGS")?X({},t.ALLOWED_TAGS,pe):yt,Tt=V(t,"ALLOWED_ATTR")?X({},t.ALLOWED_ATTR,pe):St,ae=V(t,"ALLOWED_NAMESPACES")?X({},t.ALLOWED_NAMESPACES,W):le,Jt=V(t,"ADD_URI_SAFE_ATTR")?X(K(te),t.ADD_URI_SAFE_ATTR,pe):te,Qt=V(t,"ADD_DATA_URI_TAGS")?X(K(Zt),t.ADD_DATA_URI_TAGS,pe):Zt,$t=V(t,"FORBID_CONTENTS")?X({},t.FORBID_CONTENTS,pe):Kt,Mt=V(t,"FORBID_TAGS")?X({},t.FORBID_TAGS,pe):K({}),Nt=V(t,"FORBID_ATTR")?X({},t.FORBID_ATTR,pe):K({}),Xt=!!V(t,"USE_PROFILES")&&t.USE_PROFILES,_t=!1!==t.ALLOW_ARIA_ATTR,Pt=!1!==t.ALLOW_DATA_ATTR,Ot=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Rt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Dt=!1!==t.SAFE_FOR_XML,Wt=t.WHOLE_DOCUMENT||!1,Ht=t.RETURN_DOM||!1,Bt=t.RETURN_DOM_FRAGMENT||!1,Vt=t.RETURN_TRUSTED_TYPE||!1,Ft=t.FORCE_BODY||!1,Ut=!1!==t.SANITIZE_DOM,jt=t.SANITIZE_NAMED_PROPS||!1,Gt=!1!==t.KEEP_CONTENT,Yt=t.IN_PLACE||!1,ft=t.ALLOWED_URI_REGEXP||mt,se=t.NAMESPACE||ne,re=t.MATHML_TEXT_INTEGRATION_POINTS||re,ce=t.HTML_INTEGRATION_POINTS||ce,Lt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Lt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&be(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Lt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Lt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Pt=!1),Bt&&(Ht=!0),Xt&&(bt=X({},st),Tt=[],!0===Xt.html&&(X(bt,Z),X(Tt,ot)),!0===Xt.svg&&(X(bt,J),X(Tt,at),X(Tt,rt)),!0===Xt.svgFilters&&(X(bt,tt),X(Tt,at),X(Tt,rt)),!0===Xt.mathMl&&(X(bt,it),X(Tt,lt),X(Tt,rt))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?zt.tagCheck=t.ADD_TAGS:(bt===yt&&(bt=K(bt)),X(bt,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?zt.attributeCheck=t.ADD_ATTR:(Tt===St&&(Tt=K(Tt)),X(Tt,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&X(Jt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&($t===Kt&&($t=K($t)),X($t,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&($t===Kt&&($t=K($t)),X($t,t.ADD_FORBID_CONTENTS,pe)),Gt&&(bt["#text"]=!0),Wt&&X(bt,["html","head","body"]),bt.table&&(X(bt,["tbody"]),delete Mt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=t.TRUSTED_TYPES_POLICY,E=A.createHTML("")}else void 0===A&&(A=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(m,o)),null!==A&&"string"==typeof E&&(E=A.createHTML(""));S&&S(t),me=t}},ye=X({},[...J,...tt,...et]),ge=X({},[...it,...nt]),we=function(t){R(i.removed,{element:t});try{w(t).removeChild(t)}catch(e){v(t)}},Ae=function(t,e){try{R(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){R(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Ht||Bt)try{we(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ke=function(t){let e=null,i=null;if(Ft)t="<remove></remove>"+t;else{const e=q(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===he&&se===ne&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const s=A?A.createHTML(t):t;if(se===ne)try{e=(new p).parseFromString(s,he)}catch(t){}if(!e||!e.documentElement){e=x.createDocument(se,"template",null);try{e.documentElement.innerHTML=oe?E:s}catch(t){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(n.createTextNode(i),o.childNodes[0]||null),se===ne?L.call(e,Wt?"html":"body")[0]:Wt?e.documentElement:o},Ee=function(t){return C.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},xe=function(t){return t instanceof u&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ce=function(t){return"function"==typeof r&&t instanceof r};function Te(t,e,n){_(t,t=>{t.call(i,e,n,me)})}const Se=function(t){let e=null;if(Te(z.beforeSanitizeElements,t,null),xe(t))return we(t),!0;const n=pe(t.nodeName);if(Te(z.uponSanitizeElement,t,{tagName:n,allowedTags:bt}),Dt&&t.hasChildNodes()&&!Ce(t.firstElementChild)&&U(/<[/\w!]/g,t.innerHTML)&&U(/<[/\w!]/g,t.textContent))return we(t),!0;if(t.nodeType===kt)return we(t),!0;if(Dt&&t.nodeType===Et&&U(/<[/\w]/g,t.data))return we(t),!0;if(!(zt.tagCheck instanceof Function&&zt.tagCheck(n))&&(!bt[n]||Mt[n])){if(!Mt[n]&&Me(n)){if(Lt.tagNameCheck instanceof RegExp&&U(Lt.tagNameCheck,n))return!1;if(Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(n))return!1}if(Gt&&!$t[n]){const e=w(t)||t.parentNode,i=g(t)||t.childNodes;if(i&&e){for(let n=i.length-1;n>=0;--n){const s=b(i[n],!0);s.__removalCount=(t.__removalCount||0)+1,e.insertBefore(s,y(t))}}}return we(t),!0}return t instanceof c&&!function(t){let e=w(t);e&&e.tagName||(e={namespaceURI:se,tagName:"template"});const i=D(t.tagName),n=D(e.tagName);return!!ae[t.namespaceURI]&&(t.namespaceURI===ie?e.namespaceURI===ne?"svg"===i:e.namespaceURI===ee?"svg"===i&&("annotation-xml"===n||re[n]):Boolean(ye[i]):t.namespaceURI===ee?e.namespaceURI===ne?"math"===i:e.namespaceURI===ie?"math"===i&&ce[n]:Boolean(ge[i]):t.namespaceURI===ne?!(e.namespaceURI===ie&&!ce[n])&&!(e.namespaceURI===ee&&!re[n])&&!ge[i]&&(de[i]||!ye[i]):!("application/xhtml+xml"!==he||!ae[t.namespaceURI]))}(t)?(we(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!U(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===At&&(e=t.textContent,_([G,Y,$],t=>{e=F(e,t," ")}),t.textContent!==e&&(R(i.removed,{element:t.cloneNode()}),t.textContent=e)),Te(z.afterSanitizeElements,t,null),!1):(we(t),!0)},Le=function(t,e,i){if(Ut&&("id"===e||"name"===e)&&(i in n||i in fe))return!1;if(Pt&&!Nt[e]&&U(ct,e));else if(_t&&U(dt,e));else if(zt.attributeCheck instanceof Function&&zt.attributeCheck(e,t));else if(!Tt[e]||Nt[e]){if(!(Me(t)&&(Lt.tagNameCheck instanceof RegExp&&U(Lt.tagNameCheck,t)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(t))&&(Lt.attributeNameCheck instanceof RegExp&&U(Lt.attributeNameCheck,e)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(e,t))||"is"===e&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&U(Lt.tagNameCheck,i)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(i))))return!1}else if(Jt[e]);else if(U(ft,F(i,ut,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==H(i,"data:")||!Qt[t]){if(Ot&&!U(ht,F(i,ut,"")));else if(i)return!1}else;return!0},Me=function(t){return"annotation-xml"!==t&&q(t,pt)},Ne=function(t){Te(z.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||xe(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let s=e.length;for(;s--;){const o=e[s],{name:a,namespaceURI:l,value:r}=o,c=pe(a),d=r;let h="value"===a?d:B(d);if(n.attrName=c,n.attrValue=h,n.keepAttr=!0,n.forceKeepAttr=void 0,Te(z.uponSanitizeAttribute,t,n),h=n.attrValue,!jt||"id"!==c&&"name"!==c||(Ae(a,t),h="user-content-"+h),Dt&&U(/((--!?|])>)|<\/(style|title|textarea)/i,h)){Ae(a,t);continue}if("attributename"===c&&q(h,"href")){Ae(a,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ae(a,t);continue}if(!Rt&&U(/\/>/i,h)){Ae(a,t);continue}It&&_([G,Y,$],t=>{h=F(h,t," ")});const u=pe(t.nodeName);if(Le(u,c,h)){if(A&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(u,c)){case"TrustedHTML":h=A.createHTML(h);break;case"TrustedScriptURL":h=A.createScriptURL(h)}if(h!==d)try{l?t.setAttributeNS(l,a,h):t.setAttribute(a,h),xe(t)?we(t):O(i.removed)}catch(e){Ae(a,t)}}else Ae(a,t)}Te(z.afterSanitizeAttributes,t,null)},ze=function t(e){let i=null;const n=Ee(e);for(Te(z.beforeSanitizeShadowDOM,e,null);i=n.nextNode();)Te(z.uponSanitizeShadowNode,i,null),Se(i),Ne(i),i.content instanceof a&&t(i.content);Te(z.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,l=null,c=null;if(oe=!t,oe&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ce(t)){if("function"!=typeof t.toString)throw j("toString is not a function");if("string"!=typeof(t=t.toString()))throw j("dirty is not a string, aborting")}if(!i.isSupported)return t;if(qt||ve(e),i.removed=[],"string"==typeof t&&(Yt=!1),Yt){if(t.nodeName){const e=pe(t.nodeName);if(!bt[e]||Mt[e])throw j("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof r)n=ke("\x3c!----\x3e"),o=n.ownerDocument.importNode(t,!0),o.nodeType===wt&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ht&&!It&&!Wt&&-1===t.indexOf("<"))return A&&Vt?A.createHTML(t):t;if(n=ke(t),!n)return Ht?null:Vt?E:""}n&&Ft&&we(n.firstChild);const d=Ee(Yt?t:n);for(;l=d.nextNode();)Se(l),Ne(l),l.content instanceof a&&ze(l.content);if(Yt)return t;if(Ht){if(Bt)for(c=T.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(Tt.shadowroot||Tt.shadowrootmode)&&(c=N.call(s,c,!0)),c}let h=Wt?n.outerHTML:n.innerHTML;return Wt&&bt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&U(vt,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),It&&_([G,Y,$],t=>{h=F(h,t," ")}),A&&Vt?A.createHTML(h):h},i.setConfig=function(){ve(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),qt=!0},i.clearConfig=function(){me=null,qt=!1},i.isValidAttribute=function(t,e,i){me||ve({});const n=pe(t),s=pe(e);return Le(n,s,i)},i.addHook=function(t,e){"function"==typeof e&&R(z[t],e)},i.removeHook=function(t,e){if(void 0!==e){const i=P(z[t],e);return-1===i?void 0:I(z[t],i,1)[0]}return O(z[t])},i.removeHooks=function(t){z[t]=[]},i.removeAllHooks=function(){z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();const wn=new CSSStyleSheet;wn.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; display: block; pointer-events: auto;\n opacity: 0; transition: opacity .3s ease; will-change: opacity;\n will-change: opacity, transform;\n transform: translateZ(0);\n }\n .video-loaded.is-playing video,\n .video-loaded:not(.poster-visible) video { opacity: 1 }\n video::-webkit-media-controls { display: none }\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 display: block; }\n .poster-visible picture { opacity: 1; pointer-events: auto; }\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 ----- */\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 position: relative;\n width: 100%;\n height: 14px;\n}\n\n.video-seekbar-track {\n position: absolute;\n top: 50%;\n left: 0;\n width: 100%;\n height: 8px;\n transform: translateY(-50%);\n background: rgba(255,255,255,.3);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.video-seekbar-buffer {\n position: absolute;\n inset: 0;\n background: rgba(255,255,255,.2);\n transform-origin: left center;\n transform: scaleX(0);\n}\n\n.video-seekbar-progress{\nheight:8px;\n}\n\n.video-seekbar-fill {\n height: 100%;\n width: 100%;\n background: var(--accent-color,#ff8c42);\n transform-origin: left center;\n transform: scaleX(0);\n}\n\n.video-seekbar-handle {\n position: absolute;\n top: 50%;\n left: 0;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--accent-color,#ff8c42);\n transform: translate(-50%, -50%);\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, .video-quality-control, .video-subtitle-control, .video-more-control { position: relative; }\n .video-speed-btn, .video-quality-btn, .video-subtitle-btn, .video-more-btn { min-width: 45px; font-size: 13px; font-weight: 600; color:var(--accent-color,#fff) }\n .video-speed-menu, .video-quality-menu, .video-subtitle-menu, .video-more-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, .video-quality-menu.active, .video-subtitle-menu.active, .video-more-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }\n .video-speed-option, .video-quality-option, .video-subtitle-option, .video-more-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, .video-quality-option:hover, .video-subtitle-option:hover, .video-more-option:hover { background: rgba(255,255,255,.1); }\n .video-speed-option.active, .video-quality-option.active, .video-subtitle-option.active, .video-more-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\n .video-control-btn.disabled,\n.video-control-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n pointer-events: auto;\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 .responsive-hidden { display: none }\n .responsive-more-menu .video-control-btn { display: flex; width: 100%; padding: 10px; }\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 @keyframes ripple-expand {\n from { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n to { opacity: 0; transform: translate(-50%, -50%) scale(8); }\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 .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 @keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n }\n /* Theater mode – applied to container */\n .video-container.theater-mode {\n max-width: none;\n aspect-ratio: auto;\n }\n /* Mini player */\n .mini-player {\n position: fixed;\n bottom: 20px;\n right: 20px;\n width: 320px;\n height: 180px;\n z-index: 9999;\n box-shadow: 0 0 20px rgba(0,0,0,.5);\n top:auto;\n left:auto;\n border-radius:8px;\n overflow:hidden;\n }\n .mini-player .video-volume-slider,\n.mini-player .video-time-display,\n.mini-player .fullscreen-btn,\n.mini-player .video-more-control\n{\n display: none !important;\n}\n .mini-player .miniplayer-btn {\n display:block !important;\n }\n .mini-player .video-controls-bar{\n gap:0;\n padding:16px 6px 2px;\n }\n .mini-player video,\n .mini-player img{\n border-radius:8px;\n }\n");const An=(()=>{const t=new Set;let e=null;return{register(e){t.add(e)},unregister(i){t.delete(i),e===i&&(e=null)},requestPlay(t){e&&e!==t&&e.pauseVideo(!0),e=t}}})();class kn extends HTMLElement{constructor(){super(),Tt.add(this),St.set(this,void 0),Lt.set(this,null),Mt.set(this,0),Nt.set(this,1e4),zt.set(this,null),_t.set(this,!1),Pt.set(this,null),Ot.set(this,!1),Rt.set(this,!1),It.set(this,!1),Dt.set(this,1),Wt.set(this,!1),qt.set(this,!1),Ft.set(this,!1),Ht.set(this,!1),Bt.set(this,!1),Vt.set(this,!0),Ut.set(this,null),jt.set(this,null),Gt.set(this,null),Yt.set(this,null),Xt.set(this,null),$t.set(this,null),Kt.set(this,void 0),Qt.set(this,null),Zt.set(this,null),Jt.set(this,null),te.set(this,null),ee.set(this,null),ie.set(this,null),ne.set(this,null),se.set(this,null),oe.set(this,null),ae.set(this,null),le.set(this,void 0),re.set(this,0),ce.set(this,null),de.set(this,null),he.set(this,null),ue.set(this,[]),pe.set(this,[]),me.set(this,null),fe.set(this,null),be.set(this,[]),ve.set(this,null),ye.set(this,null),ge.set(this,!1),we.set(this,!1),Ae.set(this,t=>{if(!e(this,Pt,"f"))return;const i=t.key.toLowerCase();e(this,Tt,"m",fi).call(this);let n=!1;const s={" ":()=>e(this,ke,"f").call(this),k:()=>e(this,ke,"f").call(this),arrowleft:()=>e(this,Tt,"m",un).call(this),arrowright:()=>e(this,Tt,"m",pn).call(this),arrowup:()=>e(this,Tt,"m",mn).call(this,.1),arrowdown:()=>e(this,Tt,"m",mn).call(this,-.1),m:()=>e(this,Ee,"f").call(this),f:()=>e(this,xe,"f").call(this),home:()=>{e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=0)},end:()=>{e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=e(this,Pt,"f").duration)},l:()=>e(this,Ce,"f").call(this),p:()=>e(this,Te,"f").call(this),t:()=>e(this,Se,"f").call(this),"?":()=>e(this,Me,"f").call(this)};s[i]?(t.preventDefault(),s[i](),n=!0):i>="0"&&i<="9"&&e(this,Pt,"f").duration&&(t.preventDefault(),e(this,Pt,"f").currentTime=e(this,Pt,"f").duration*(parseInt(i)/10),n=!0),n&&e(this,jt,"f")&&e(this,jt,"f").classList.add("show-controls")}),ke.set(this,t=>{t&&t.stopPropagation(),e(this,Pt,"f")&&(e(this,Ot,"f")?this.pauseVideo():this.playVideo())}),Ee.set(this,t=>{t&&t.stopPropagation(),e(this,Pt,"f")&&(e(this,Pt,"f").muted=!e(this,Pt,"f").muted)}),xe.set(this,t=>{t&&t.stopPropagation();const i=e(this,Gt,"f"),n=e(this,Pt,"f");if(document.fullscreenElement||document.webkitFullscreenElement)document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{if(n&&"webkitEnterFullscreen"in n)return void n.webkitEnterFullscreen();(null==i?void 0:i.requestFullscreen)?i.requestFullscreen():i&&"webkitRequestFullscreen"in i&&i.webkitRequestFullscreen()}}),Ce.set(this,t=>{t&&t.stopPropagation(),e(this,Pt,"f")&&(e(this,Pt,"f").loop=!e(this,Pt,"f").loop,e(this,Tt,"m",Ji).call(this,e(this,Pt,"f").loop),e(this,Tt,"m",yn).call(this,"video-loop-change",{loop:e(this,Pt,"f").loop}))}),Te.set(this,async t=>{if(t&&t.stopPropagation(),e(this,Pt,"f"))try{document.pictureInPictureElement===e(this,Pt,"f")?await document.exitPictureInPicture():e(this,Pt,"f").requestPictureInPicture&&await e(this,Pt,"f").requestPictureInPicture()}catch(t){console.warn("PiP failed",t)}}),Se.set(this,()=>{var t;i(this,ge,!e(this,ge,"f"),"f"),null===(t=e(this,Gt,"f"))||void 0===t||t.classList.toggle("theater-mode",e(this,ge,"f")),this.classList.toggle("theater-mode",e(this,ge,"f")),e(this,Tt,"m",yn).call(this,"theater-mode-change",{enabled:e(this,ge,"f")})}),Le.set(this,()=>{var t,n;e(this,Pt,"f")&&(e(this,we,"f")?(i(this,we,!1,"f"),null===(n=e(this,jt,"f"))||void 0===n||n.classList.remove("mini-player"),this.classList.remove("mini-player")):(i(this,we,!0,"f"),null===(t=e(this,jt,"f"))||void 0===t||t.classList.add("mini-player"),this.classList.add("mini-player")),e(this,Tt,"m",yn).call(this,"mini-player-change",{active:e(this,we,"f")}))}),Me.set(this,()=>{var t,i;const n=document.createElement("div");n.className="keyboard-help",n.innerHTML=`\n <div class="help-content">\n <h3>Keyboard Shortcuts</h3>\n <ul>\n <li>Space / K: Play/Pause</li>\n <li>←/→: Seek backward/forward ${e(this,Tt,"m",fi).call(this).seekStep}s</li>\n <li>↑/↓: Volume up/down</li>\n <li>M: Mute</li>\n <li>F: Fullscreen</li>\n <li>L: Toggle Loop</li>\n <li>P: Picture-in-Picture</li>\n <li>T: Theater mode</li>\n <li>Home/End: Start/End</li>\n <li>0-9: Seek 0% to 90%</li>\n </ul>\n <button class="close-help">Close</button>\n </div>\n `,n.addEventListener("click",()=>n.remove()),null===(t=n.querySelector(".close-help"))||void 0===t||t.addEventListener("click",()=>n.remove()),null===(i=e(this,jt,"f"))||void 0===i||i.appendChild(n)}),Ne.set(this,()=>{if(e(this,Pt,"f"))try{const t=document.createElement("canvas");t.width=e(this,Pt,"f").videoWidth,t.height=e(this,Pt,"f").videoHeight;const i=t.getContext("2d");if(!i)return;i.drawImage(e(this,Pt,"f"),0,0,t.width,t.height),t.toBlob(t=>{if(!t)return void console.warn("Screenshot blocked due to CORS.");const e=URL.createObjectURL(t),i=document.createElement("a");i.href=e,i.download=`screenshot-${Date.now()}.png`,i.click(),URL.revokeObjectURL(e)})}catch(t){console.warn("Screenshot failed:",t)}}),ze.set(this,t=>{var i;(null===(i=e(this,Pt,"f"))||void 0===i?void 0:i.duration)&&(e(this,Pt,"f").currentTime=e(this,Pt,"f").duration*t)}),_e.set(this,t=>{if(e(this,Pt,"f")){const i=Math.max(0,Math.min(1,t));e(this,Pt,"f").volume=i,e(this,Pt,"f").muted=0===i}}),Pe.set(this,(t,n)=>{e(this,Pt,"f")&&(e(this,Pt,"f").playbackRate=t,i(this,Dt,t,"f"),null==n||n.querySelectorAll(".video-speed-option").forEach(e=>{e.classList.toggle("active",parseFloat(e.getAttribute("data-speed"))===t)}),e(this,te,"f")&&(e(this,te,"f").textContent=t+"x"))}),Oe.set(this,()=>{const t=e(this,Pt,"f");if(!t)return;const n=t.currentTime,s=e(this,Ot,"f");t.removeAttribute("src"),t.load(),t.addEventListener("loadeddata",()=>{t.currentTime=n,s&&t.play()},{once:!0}),i(this,me,null,"f"),e(this,Tt,"m",nn).call(this),e(this,Tt,"m",Ye).call(this)}),Re.set(this,t=>{const n=e(this,Pt,"f");if(!n)return;if(e(this,me,"f")===t)return;const s=e(this,pe,"f").find(e=>e.label===t);if(!s)return;const o=n.currentTime,a=!n.paused;n.pause(),n.src=s.src,n.style.display="none",n.load(),requestAnimationFrame(()=>{n.style.display=""}),n.addEventListener("loadedmetadata",()=>{o>0&&o<n.duration&&(n.currentTime=o)},{once:!0}),n.addEventListener("canplay",()=>{a&&n.play().catch(()=>{})},{once:!0}),i(this,me,t,"f"),e(this,Tt,"m",nn).call(this),e(this,Tt,"m",Ye).call(this)}),Ie.set(this,t=>{if(e(this,Pt,"f")){if(e(this,be,"f").forEach(t=>{t.mode="disabled"}),t){const i=e(this,be,"f").find(e=>e.id===t||e.label===t);i&&(i.mode="showing")}i(this,ve,t,"f"),e(this,Tt,"m",sn).call(this)}}),De.set(this,()=>{e(this,Wt,"f")&&e(this,Pt,"f")&&(document.hidden?e(this,Ot,"f")&&(i(this,Bt,!0,"f"),this.pauseVideo()):e(this,Bt,"f")&&!e(this,Ot,"f")&&(this.playVideo(),i(this,Bt,!1,"f")))}),We.set(this,()=>{e(this,Ot,"f")&&(i(this,Bt,!0,"f"),this.pauseVideo())}),qe.set(this,()=>{e(this,Bt,"f")&&!e(this,Ot,"f")&&(this.playVideo(),i(this,Bt,!1,"f"))}),Fe.set(this,()=>{e(this,Tt,"m",fi).call(this).posterClickPlay&&e(this,Pt,"f")&&!e(this,Ht,"f")&&this.playVideo()}),He.set(this,t=>{t.preventDefault(),i(this,Rt,!0,"f");const n=t.currentTarget,s=n.getBoundingClientRect();e(this,ze,"f").call(this,(t.clientX-s.left)/s.width);const o=t=>{if(!e(this,Rt,"f"))return;t.preventDefault();const i=n.getBoundingClientRect();e(this,ze,"f").call(this,(t.clientX-i.left)/i.width)},a=()=>{i(this,Rt,!1,"f"),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}),Be.set(this,t=>{if(!e(this,Pt,"f"))return;i(this,Rt,!0,"f");const n=t.currentTarget,s=t=>{const i=n.getBoundingClientRect(),s=(t.clientX-i.left)/i.width;e(this,ze,"f").call(this,s)};s(t.touches[0]);const o=t=>{e(this,Rt,"f")&&s(t.touches[0])},a=()=>{i(this,Rt,!1,"f"),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",a)};document.addEventListener("touchmove",o,{passive:!0}),document.addEventListener("touchend",a)}),Ve.set(this,t=>{t.preventDefault(),i(this,It,!0,"f");const n=t.currentTarget,s=n.getBoundingClientRect();e(this,_e,"f").call(this,(t.clientX-s.left)/s.width);const o=t=>{if(!e(this,It,"f"))return;t.preventDefault();const i=n.getBoundingClientRect();e(this,_e,"f").call(this,(t.clientX-i.left)/i.width)},a=()=>{i(this,It,!1,"f"),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}),Ue.set(this,(t,n)=>{if(!e(this,Pt,"f"))return;t.classList.remove("video-loading"),t.classList.add("video-loaded"),this.classList.remove("video-loading"),this.classList.add("video-loaded"),i(this,_t,!0,"f"),i(this,Wt,!0,"f"),i(this,be,Array.from(e(this,Pt,"f").textTracks).filter(t=>"subtitles"===t.kind||"captions"===t.kind),"f");const s=t.querySelector(".video-subtitle-btn");if(n.showSubtitles)if(e(this,be,"f").length>0){if(e(this,Tt,"m",$e).call(this,t),s){s.disabled=!1,s.classList.remove("disabled"),s.setAttribute("aria-disabled","false");const t=s.querySelector(".subtitle-tooltip");t&&(t.textContent="Subtitles")}}else if(s){s.disabled=!0,s.classList.add("disabled"),s.setAttribute("aria-disabled","true");const t=s.querySelector(".subtitle-tooltip");t&&(t.textContent="No subtitles available")}if(n.showQuality&&e(this,Pt,"f").src.includes(".m3u8")?e(this,Tt,"m",je).call(this):(n.showQuality&&e(this,pe,"f").length>0||n.showQuality)&&e(this,Tt,"m",Ye).call(this),n.resume&&e(this,ye,"f")){const t=localStorage.getItem(e(this,ye,"f"));if(t){const i=parseFloat(t);i>5&&i<e(this,Pt,"f").duration-5&&(e(this,Pt,"f").currentTime=i)}}n.showControls&&e(this,Tt,"m",Hi).call(this,t),n.autoplay||(i(this,Ht,!1,"f"),i(this,Ft,!0,"f"),t.classList.add("poster-visible"),this.classList.add("poster-visible")),e(this,Tt,"m",Zi).call(this,!1,t),e(this,Tt,"m",yn).call(this,"video-ready",{duration:e(this,Pt,"f").duration}),n.responsiveControls&&e(this,Tt,"m",Ui).call(this,t)}),Xe.set(this,t=>{if(!e(this,he,"f")||0===e(this,he,"f").levels.length)return;if(e(this,fe,"f")===t)return;e(this,he,"f").currentLevel=t,i(this,fe,t,"f");const n=e(this,he,"f").levels[t];i(this,me,(null==n?void 0:n.height)?`${n.height}p`:(null==n?void 0:n.name)||`${Math.round((null==n?void 0:n.bitrate)/1e3)}kbps`,"f"),e(this,Tt,"m",nn).call(this),e(this,Tt,"m",Ye).call(this)}),Qe.set(this,t=>{e(this,Tt,"m",yn).call(this,"video-playing",{currentTime:e(this,Pt,"f").currentTime,duration:e(this,Pt,"f").duration}),t.classList.add("is-playing"),t.classList.remove("poster-visible"),this.classList.add("is-playing"),this.classList.remove("poster-visible"),i(this,Ot,!0,"f"),i(this,Ht,!0,"f"),i(this,Ft,!1,"f"),e(this,Tt,"m",Ki).call(this,!0,t),e(this,Tt,"m",Ke).call(this)}),Ze.set(this,t=>{e(this,Ut,"f")&&(cancelAnimationFrame(e(this,Ut,"f")),i(this,Ut,null,"f")),e(this,Tt,"m",yn).call(this,"video-paused",{currentTime:e(this,Pt,"f").currentTime}),t.classList.remove("is-playing"),this.classList.remove("is-playing"),i(this,Ot,!1,"f"),e(this,Tt,"m",Ki).call(this,!1,t);e(this,Tt,"m",fi).call(this).resume&&e(this,ye,"f")&&e(this,Pt,"f")&&window.isSecureContext&&localStorage.setItem(e(this,ye,"f"),e(this,Pt,"f").currentTime.toString())}),Je.set(this,(t,n)=>{e(this,Tt,"m",yn).call(this,"video-ended",{duration:e(this,Pt,"f").duration}),t.classList.remove("is-playing"),this.classList.remove("is-playing"),i(this,Ot,!1,"f"),e(this,Tt,"m",Ki).call(this,!1,t),n.loop||(n.resetOnEnded&&(e(this,Pt,"f").currentTime=0),n.showPosterOnEnded&&e(this,qt,"f")&&(t.classList.add("poster-visible"),this.classList.add("poster-visible"),i(this,Ft,!0,"f")))}),ti.set(this,t=>{const i=e(this,Pt,"f");e(this,Tt,"m",Qi).call(this,i.muted||0===i.volume,t),e(this,Tt,"m",en).call(this,i.volume,t),e(this,Tt,"m",yn).call(this,"video-volume-change",{volume:i.volume,muted:i.muted})}),ei.set(this,t=>{var n,s;console.error("Video load error"),t.classList.remove("video-loading","video-loaded"),this.classList.remove("video-loading","video-loaded"),i(this,Wt,!1,"f"),e(this,Tt,"m",yn).call(this,"video-error",{code:null===(s=null===(n=e(this,Pt,"f"))||void 0===n?void 0:n.error)||void 0===s?void 0:s.code})}),ii.set(this,()=>{const t=document.fullscreenElement||document.webkitFullscreenElement,i=t===e(this,Gt,"f")||t===this||t&&this.contains(t);e(this,Tt,"m",Zi).call(this,i),e(this,Tt,"m",yn).call(this,i?"video-fullscreen-enter":"video-fullscreen-exit")}),ni.set(this,()=>{if(!e(this,Pt,"f")||!e(this,$t,"f"))return;const t=e(this,Pt,"f").buffered;if(0===t.length)return;const i=t.end(t.length-1)/e(this,Pt,"f").duration;e(this,$t,"f").style.transform=`scaleX(${i})`}),si.set(this,()=>{e(this,Tt,"m",tn).call(this,!0)}),oi.set(this,()=>{e(this,Tt,"m",tn).call(this,!1)}),ai.set(this,t=>{var n;const s=e(this,Tt,"m",fi).call(this);if(!e(this,Pt,"f"))return;const o=e(this,jt,"f").getBoundingClientRect(),a=t.changedTouches[0].clientX<o.left+o.width/2;s.enableTapRipple&&e(this,Tt,"m",ci).call(this,t.changedTouches[0].clientX,t.changedTouches[0].clientY),i(this,re,(n=e(this,re,"f"),++n),"f"),e(this,ce,"f")&&clearTimeout(e(this,ce,"f")),i(this,ce,window.setTimeout(()=>{const t=s.doubleTapSeekSeconds,n=s.tripleTapSeconds;2===e(this,re,"f")&&s.doubleTapSeek&&e(this,Tt,"m",ri).call(this,a?-t:t),e(this,re,"f")>=3&&s.tripleTapSeek&&e(this,Tt,"m",ri).call(this,a?-n:n),i(this,re,0,"f")},300),"f")}),di.set(this,void 0),hi.set(this,void 0),ui.set(this,void 0),i(this,St,this.attachShadow({mode:"open"}),"f"),e(this,St,"f").adoptedStyleSheets=[wn],i(this,di,A(e(this,Tt,"m",Yi).bind(this),200),"f"),i(this,hi,A(e(this,ni,"f").bind(this),1e3),"f"),i(this,ui,e(this,ii,"f").bind(this),"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","loop-once-icon","loop-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","single-active","show-loop","show-pip","show-subtitles","show-quality","skip-intro","theater-mode","resume","screenshot","airplay","mini-player","responsive-controls","buffer-progress"]}connectedCallback(){e(this,Tt,"m",vi).call(this),e(this,Tt,"m",Ii).call(this),e(this,Tt,"m",Di).call(this),document.addEventListener("fullscreenchange",e(this,ui,"f")),document.addEventListener("webkitfullscreenchange",e(this,ui,"f")),("true"===this.getAttribute("virtual-playback")||e(this,Tt,"m",fi).call(this).singleActive)&&An.register(this)}disconnectedCallback(){e(this,Tt,"m",vn).call(this),e(this,Tt,"m",Wi).call(this),document.removeEventListener("fullscreenchange",e(this,ui,"f")),e(this,Ut,"f")&&cancelAnimationFrame(e(this,Ut,"f")),An.unregister(this),e(this,de,"f")&&e(this,de,"f").disconnect()}attributeChangedCallback(t,n,s){if(n===s)return;if(i(this,Lt,null,"f"),!e(this,_t,"f"))return;const o=e(this,Tt,"m",fi).call(this);switch(t){case"muted":e(this,Pt,"f")&&(e(this,Pt,"f").muted=o.muted);break;case"loop":e(this,Pt,"f")&&(e(this,Pt,"f").loop=o.loop);break;case"accent-color":case"theme":case"controls-background":case"center-play-background":case"center-play-size":e(this,Tt,"m",Ri).call(this,o);break;default:e(this,Tt,"m",bn).call(this)}}play(){this.playVideo()}pause(){this.pauseVideo()}mute(){e(this,Pt,"f")&&(e(this,Pt,"f").muted=!0)}unmute(){e(this,Pt,"f")&&(e(this,Pt,"f").muted=!1)}seek(t){e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=t)}playVideo(){if(!e(this,Pt,"f"))return;const t=e(this,Tt,"m",fi).call(this);t.autoplay&&(e(this,Pt,"f").muted=!0),(t.singleActive||"true"===this.getAttribute("virtual-playback"))&&An.requestPlay(this);const n=e(this,Pt,"f").play();n&&n.catch(()=>{i(this,Ft,!0,"f"),e(this,jt,"f")&&(e(this,jt,"f").classList.add("poster-visible"),this.classList.add("poster-visible"))})}pauseVideo(t){e(this,Pt,"f")&&(e(this,Pt,"f").pause(),t||e(this,Tt,"m",yn).call(this,"video-paused"))}}St=new WeakMap,Lt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,zt=new WeakMap,_t=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Rt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Wt=new WeakMap,qt=new WeakMap,Ft=new WeakMap,Ht=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Gt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,$t=new WeakMap,Kt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,te=new WeakMap,ee=new WeakMap,ie=new WeakMap,ne=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,re=new WeakMap,ce=new WeakMap,de=new WeakMap,he=new WeakMap,ue=new WeakMap,pe=new WeakMap,me=new WeakMap,fe=new WeakMap,be=new WeakMap,ve=new WeakMap,ye=new WeakMap,ge=new WeakMap,we=new WeakMap,Ae=new WeakMap,ke=new WeakMap,Ee=new WeakMap,xe=new WeakMap,Ce=new WeakMap,Te=new WeakMap,Se=new WeakMap,Le=new WeakMap,Me=new WeakMap,Ne=new WeakMap,ze=new WeakMap,_e=new WeakMap,Pe=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Ie=new WeakMap,De=new WeakMap,We=new WeakMap,qe=new WeakMap,Fe=new WeakMap,He=new WeakMap,Be=new WeakMap,Ve=new WeakMap,Ue=new WeakMap,Xe=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,ti=new WeakMap,ei=new WeakMap,ii=new WeakMap,ni=new WeakMap,si=new WeakMap,oi=new WeakMap,ai=new WeakMap,di=new WeakMap,hi=new WeakMap,ui=new WeakMap,Tt=new WeakSet,je=async function(){if(!e(this,Pt,"f"))return;const t=e(this,Pt,"f").currentSrc||e(this,Pt,"f").src;if(t.includes(".m3u8"))try{const i=await import("hls.js");e(this,Tt,"m",Ge).call(this,i,t)}catch(t){console.error("HLS.js could not be loaded. Make sure it is included in your bundle.",t)}},Ge=function(t,n){const s=t.default;i(this,he,new s({enableWorker:!0,lowLatencyMode:!0}),"f"),e(this,he,"f").loadSource(n),e(this,he,"f").attachMedia(e(this,Pt,"f")),e(this,he,"f").on(t.Events.MANIFEST_PARSED,()=>{i(this,ue,e(this,he,"f").levels,"f"),e(this,Tt,"m",Ye).call(this)})},Ye=function(){var t,i;if(!e(this,ee,"f"))return;e(this,ee,"f").innerHTML="";const n=[...new Set(e(this,pe,"f").map(t=>t.label))].sort();if(0===n.length&&0===e(this,ue,"f").length){const i=document.createElement("button");return i.className="video-quality-option",i.disabled=!0,i.textContent="No qualities available",i.setAttribute("part","quality-option"),void(null===(t=e(this,ee,"f"))||void 0===t||t.appendChild(i))}const s=document.createElement("button");s.className="video-quality-option "+(e(this,me,"f")?"":"active"),s.setAttribute("data-quality","auto"),s.textContent="Auto",s.setAttribute("part","quality-option"),s.addEventListener("click",()=>e(this,Oe,"f").call(this)),null===(i=e(this,ee,"f"))||void 0===i||i.appendChild(s),e(this,ue,"f").length>0&&e(this,ue,"f").forEach((t,i)=>{var n;const s=t.height?`${t.height}p`:`Level ${i+1}`,o=document.createElement("button");o.className="video-quality-option "+(e(this,fe,"f")===i?"active":""),o.setAttribute("data-quality",i.toString()),o.textContent=s,o.setAttribute("part","quality-option"),o.addEventListener("click",()=>e(this,Xe,"f").call(this,i)),null===(n=e(this,ee,"f"))||void 0===n||n.appendChild(o)}),n.forEach(t=>{var i;const n=document.createElement("button");n.className="video-quality-option "+(e(this,me,"f")===t?"active":""),n.setAttribute("data-quality",t),n.textContent=`${t}p`,n.setAttribute("part","quality-option"),n.addEventListener("click",()=>e(this,Re,"f").call(this,t)),null===(i=e(this,ee,"f"))||void 0===i||i.appendChild(n)})},$e=function(t){const i=t.querySelector(".video-subtitle-menu");if(!i)return;i.innerHTML="";const n=document.createElement("button");n.className="video-subtitle-option "+(e(this,ve,"f")?"":"active"),n.setAttribute("data-subtitle",""),n.textContent="Off",n.setAttribute("part","subtitle-option"),n.addEventListener("click",()=>e(this,Ie,"f").call(this,null)),null==i||i.appendChild(n),e(this,be,"f").forEach(t=>{const n=document.createElement("button");n.className="video-subtitle-option "+(e(this,ve,"f")===t.label?"active":""),n.setAttribute("data-subtitle",t.label),n.textContent=t.label||"Subtitles",n.setAttribute("part","subtitle-option"),n.addEventListener("click",()=>e(this,Ie,"f").call(this,t.label)),null==i||i.appendChild(n)})},Ke=function(){const t=e(this,Pt,"f");if(!t)return;const n=()=>{e(this,Pt,"f")&&(e(this,Tt,"m",Yi).call(this),e(this,Tt,"m",Xi).call(this),"requestVideoFrameCallback"in t?t.requestVideoFrameCallback(n):i(this,Ut,requestAnimationFrame(n),"f"))};n()},li=function(t){var i;const n=document.createElement("div");n.className="seek-overlay",n.textContent=(t>0?"+":"")+t+"s",null===(i=e(this,jt,"f"))||void 0===i||i.appendChild(n),setTimeout(()=>n.remove(),600)},ri=function(t){if(!e(this,Pt,"f"))return;const i=Math.min(Math.max(0,e(this,Pt,"f").currentTime+t),e(this,Pt,"f").duration);e(this,Pt,"f").currentTime=i,e(this,Tt,"m",li).call(this,t)},ci=function(t,i){if(!e(this,jt,"f"))return;const n=e(this,jt,"f").getBoundingClientRect(),s=document.createElement("div");s.className="tap-ripple",s.style.left=t-n.left+"px",s.style.top=i-n.top+"px",e(this,jt,"f").appendChild(s),setTimeout(()=>s.remove(),600)},pi=function(t){if(!t||"string"!=typeof t)return!1;try{return"https:"===new URL(t,window.location.origin).protocol}catch{return!1}},mi=function(t){const i=t.querySelector("img");if(i&&!e(this,Tt,"m",pi).call(this,i.src))return!1;const n=t.querySelectorAll("source");for(const t of Array.from(n))if(t.srcset&&!e(this,Tt,"m",pi).call(this,t.srcset))return!1;return!0},fi=function(){const t=Date.now();if(e(this,Lt,"f")&&t-e(this,Mt,"f")<e(this,Nt,"f"))return e(this,Lt,"f");const n={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,Tt,"m",bi).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"),singleActive:"true"===this.getAttribute("single-active"),showLoop:"true"===this.getAttribute("show-loop"),showPip:"true"===this.getAttribute("show-pip"),showSubtitles:"true"===this.getAttribute("show-subtitles"),showQuality:"true"===this.getAttribute("show-quality"),skipIntro:parseInt(this.getAttribute("skip-intro")||"0"),theaterMode:"true"===this.getAttribute("theater-mode"),resume:"true"===this.getAttribute("resume"),screenshot:"true"===this.getAttribute("screenshot"),airplay:"true"===this.getAttribute("airplay"),miniPlayer:"true"===this.getAttribute("mini-player"),responsiveControls:"true"===this.getAttribute("responsive-controls"),bufferProgress:"false"!==this.getAttribute("buffer-progress")};return i(this,Lt,n,"f"),i(this,Mt,t,"f"),n},bi=function(){const t=this.getAttribute("speed-options");if(!t)return[.5,.75,1,1.25,1.5,2];try{return t.split(",").map(t=>parseFloat(t.trim())).filter(t=>!isNaN(t))}catch{return[.5,.75,1,1.25,1.5,2]}},vi=function(){const t=e(this,Tt,"m",fi).call(this),n=this.querySelector("picture"),s=n&&e(this,Tt,"m",mi).call(this,n);i(this,qt,!!(s||t.desktopPoster||t.mobilePoster),"f"),i(this,Ft,e(this,qt,"f")&&!e(this,Ht,"f"),"f"),i(this,ye,t.resume?`shadowplyr-${t.desktopVideo||t.mobileVideo}`:null,"f");const o=document.createElement("div");if(o.className="shadow-plyr-wrapper",o.setAttribute("tabindex","0"),o.setAttribute("role","application"),o.setAttribute("aria-label","Video player"),o.setAttribute("part","shadow-plyr-wrapper"),s){[n,...Array.from(n.querySelectorAll("*"))].forEach(t=>{for(let e=t.attributes.length-1;e>=0;e--){const i=t.attributes[e];i.name.startsWith("on")&&t.removeAttribute(i.name)}}),n.setAttribute("part","poster"),o.appendChild(n)}else if(e(this,Tt,"m",pi).call(this,t.desktopPoster)||e(this,Tt,"m",pi).call(this,t.mobilePoster)){const i=document.createElement("picture");if(i.setAttribute("part","poster"),t.mobilePoster&&e(this,Tt,"m",pi).call(this,t.mobilePoster)){const e=document.createElement("source");e.media="(max-width: 768px)",e.srcset=t.mobilePoster,i.appendChild(e)}if(e(this,Tt,"m",pi).call(this,t.desktopPoster)){const e=document.createElement("img");e.src=t.desktopPoster,e.alt="Video thumbnail",e.loading="lazy",i.appendChild(e)}o.appendChild(i)}const a=document.createElement("div");if(a.className="video-placeholder",o.appendChild(a),t.showCenterPlay){const i=e(this,Tt,"m",wi).call(this),n=document.createElement("div");n.className="video-center-play",n.setAttribute("role","button"),n.tabIndex=0,n.setAttribute("aria-label","Play video"),n.setAttribute("part","center-play");const s=document.createElement("span");s.className="play-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,i.play));const a=document.createElement("span");if(a.className="pause-icon",a.style.display="none",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,Tt,"m",yi).call(this,i.pause)),n.appendChild(s),n.appendChild(a),t.showTooltips){const e=document.createElement("span");e.className="tooltip center-play-tooltip",e.textContent=t.tooltipCenterPlay,n.appendChild(e)}const l=document.createElement("span");l.className="sr-only",l.textContent="Play",n.appendChild(l),o.appendChild(n)}t.showControls&&"none"!==t.controlsType&&o.appendChild(e(this,Tt,"m",Ai).call(this,t)),t.showSeekButtons&&o.appendChild(e(this,Tt,"m",gi).call(this,t));const l=document.createElement("div");l.className="video-container",l.setAttribute("part","video-container"),l.appendChild(o),e(this,St,"f").innerHTML="",e(this,St,"f").appendChild(l),i(this,jt,o,"f"),i(this,Gt,l,"f"),i(this,Yt,o.querySelector(".video-seekbar"),"f"),i(this,Xt,o.querySelector(".video-seekbar-progress"),"f"),i(this,$t,o.querySelector(".video-seekbar-buffer"),"f"),i(this,Qt,o.querySelector(".video-time-display"),"f"),i(this,Zt,o.querySelector(".video-volume-progress"),"f"),i(this,Jt,o.querySelector(".video-speed-menu"),"f"),i(this,te,o.querySelector(".speed-text"),"f"),i(this,ee,o.querySelector(".video-quality-menu"),"f"),i(this,ie,o.querySelector(".quality-text"),"f"),i(this,ne,o.querySelector(".video-subtitle-menu"),"f"),i(this,se,o.querySelector(".subtitle-text"),"f"),i(this,oe,o.querySelector(".video-more-menu"),"f"),i(this,ae,o.querySelector(".video-more-btn"),"f")},yi=function(t){const e=document.createElement("div");e.innerHTML=t.trim();const i=e.firstElementChild;if(!i||"svg"!==i.tagName.toLowerCase()){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 24 24"),t}return i},gi=function(t){const i=document.createElement("div");i.className="video-seek-buttons",i.setAttribute("part","seek-buttons");const n=document.createElement("button");n.className="seek-left",n.textContent=`-${t.seekButtonSeconds}s`,n.setAttribute("part","seek-left");const s=document.createElement("button");return s.className="seek-right",s.textContent=`+${t.seekButtonSeconds}s`,s.setAttribute("part","seek-right"),n.addEventListener("click",()=>{e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=Math.max(0,e(this,Pt,"f").currentTime-t.seekButtonSeconds))}),s.addEventListener("click",()=>{e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=Math.min(e(this,Pt,"f").duration,e(this,Pt,"f").currentTime+t.seekButtonSeconds))}),i.appendChild(n),i.appendChild(s),i},wi=function(){const t=`${this.getAttribute("play-icon")||""}-${this.getAttribute("pause-icon")||""}`;if(w.has(t))return w.get(t);const e={USE_PROFILES:{svg:!0}},i={play:gn.sanitize(this.getAttribute("play-icon")||n,e),pause:gn.sanitize(this.getAttribute("pause-icon")||s,e),volume:gn.sanitize(this.getAttribute("volume-icon")||o,e),muted:gn.sanitize(this.getAttribute("muted-icon")||a,e),fullscreen:gn.sanitize(this.getAttribute("fullscreen-icon")||l,e),exitFullscreen:gn.sanitize(this.getAttribute("exit-fullscreen-icon")||r,e),speed:gn.sanitize(this.getAttribute("speed-icon")||c,e),loopOnce:gn.sanitize(this.getAttribute("loop-once-icon")||d,e),loop:gn.sanitize(this.getAttribute("loop-icon")||h,e),pip:gn.sanitize(this.getAttribute("pip-icon")||u,e),subtitle:gn.sanitize(this.getAttribute("subtitle-icon")||p,e),quality:gn.sanitize(this.getAttribute("quality-icon")||m,e),more:gn.sanitize(this.getAttribute("more-icon")||f,e),theater:gn.sanitize(this.getAttribute("theater-icon")||b,e),screenshot:gn.sanitize(this.getAttribute("screenshot-icon")||v,e),airplay:gn.sanitize(this.getAttribute("airplay-icon")||y,e),miniplayer:gn.sanitize(this.getAttribute("miniplayer-icon")||g,e)};return w.set(t,i),i},Ai=function(t){const n=e(this,Tt,"m",wi).call(this),s=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"),e.setAttribute("part","seekbar"),i(this,Yt,e,"f");const n=document.createElement("div");if(n.className="video-seekbar-track",n.setAttribute("part","video-seekbar-track"),t.bufferProgress){const t=document.createElement("div");t.className="video-seekbar-buffer",t.setAttribute("part","seekbar-buffer"),i(this,$t,t,"f"),n.appendChild(t)}const s=document.createElement("div");s.className="video-seekbar-progress",s.setAttribute("part","video-seekbar-progress");const a=document.createElement("div");a.className="video-seekbar-fill",a.setAttribute("part","seekbar-progress"),i(this,le,a,"f"),s.appendChild(a),n.appendChild(s);const l=document.createElement("div");l.className="video-seekbar-handle",l.setAttribute("part","seekbar-handle"),i(this,Kt,l,"f"),e.appendChild(n),e.appendChild(l),o.appendChild(e)}const a=document.createElement("div");a.className="video-controls-row",a.setAttribute("part","controls-row"),o.appendChild(a),t.showPlayPause&&a.appendChild(e(this,Tt,"m",ki).call(this,n,t)),t.showVolume&&a.appendChild(e(this,Tt,"m",Ei).call(this,n,t));const l=document.createElement("div");l.className="video-time-display",l.textContent="0:00 / 0:00",l.setAttribute("part","time-display"),a.appendChild(l);const r=document.createElement("div");return r.className="video-controls-spacer",r.setAttribute("part","controls-spacer"),a.appendChild(r),t.showLoop&&a.appendChild(e(this,Tt,"m",xi).call(this,n,t)),t.showPip&&document.pictureInPictureEnabled&&a.appendChild(e(this,Tt,"m",Ci).call(this,n,t)),t.showSubtitles&&a.appendChild(e(this,Tt,"m",Ti).call(this,n,t)),t.showQuality&&a.appendChild(e(this,Tt,"m",Si).call(this,n,t)),t.showSpeed&&a.appendChild(e(this,Tt,"m",Li).call(this,n,t)),t.theaterMode&&a.appendChild(e(this,Tt,"m",Mi).call(this,n,t)),t.screenshot&&a.appendChild(e(this,Tt,"m",Ni).call(this,n,t)),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&a.appendChild(e(this,Tt,"m",zi).call(this,n,t)),t.miniPlayer&&a.appendChild(e(this,Tt,"m",_i).call(this,n,t)),t.showFullscreen&&a.appendChild(e(this,Tt,"m",Pi).call(this,n,t)),t.responsiveControls&&a.appendChild(e(this,Tt,"m",Oi).call(this,n,t)),s.appendChild(o),s},ki=function(t,i){const n=document.createElement("button");n.className="video-control-btn play-pause",n.setAttribute("aria-label","Play"),n.tabIndex=0,n.setAttribute("part","play-pause");const s=document.createElement("span");s.className="play-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.play));const o=document.createElement("span");if(o.className="pause-icon",o.style.display="none",o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.pause)),n.appendChild(s),n.appendChild(o),i.showTooltips){const t=document.createElement("span");t.className="tooltip play-tooltip",t.textContent=i.tooltipPlay,t.setAttribute("part","play-tooltip");const e=document.createElement("span");e.className="tooltip pause-tooltip",t.setAttribute("part","pause-tooltip"),e.style.display="none",e.textContent=i.tooltipPause,n.appendChild(t),n.appendChild(e)}return n},Ei=function(t,i){const n=document.createElement("div");n.className="video-volume-control",n.setAttribute("part","volume-control");const s=document.createElement("button");s.className="video-control-btn volume-btn",s.setAttribute("aria-label","Mute"),s.tabIndex=0,s.setAttribute("part","volume-btn");const o=document.createElement("span");o.className="volume-icon",o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.volume));const a=document.createElement("span");if(a.className="muted-icon",a.style.display="none",a.setAttribute("aria-hidden","true"),a.appendChild(e(this,Tt,"m",yi).call(this,t.muted)),s.appendChild(o),s.appendChild(a),i.showTooltips){const t=document.createElement("span");t.className="tooltip volume-tooltip",t.textContent=i.tooltipMute,t.setAttribute("part","volume-tooltip");const e=document.createElement("span");e.className="tooltip muted-tooltip",e.style.display="none",e.textContent=i.tooltipUnmute,t.setAttribute("part","mute-tooltip"),s.appendChild(t),s.appendChild(e)}n.appendChild(s);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"),l.setAttribute("part","volume-slider");const r=document.createElement("div");return r.className="video-volume-progress",r.setAttribute("part","volume-progress"),l.appendChild(r),n.appendChild(l),n},xi=function(t,i){const n=document.createElement("button");n.className="video-control-btn loop-btn",n.setAttribute("aria-label","Enable loop"),n.tabIndex=0,n.setAttribute("part","loop-btn");const s=document.createElement("span");if(s.className="loop-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.loopOnce)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip loop-on-tooltip",t.textContent="Disable loop",t.style.display="none",n.appendChild(t);const e=document.createElement("span");e.className="tooltip loop-off-tooltip",e.textContent="Enable loop",n.appendChild(e)}return n},Ci=function(t,i){const n=document.createElement("button");n.className="video-control-btn pip-btn",n.setAttribute("aria-label","Picture in Picture"),n.tabIndex=0,n.setAttribute("part","pip-btn");const s=document.createElement("span");if(s.className="pip-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.pip)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip pip-tooltip",t.textContent="Picture in Picture",t.setAttribute("part","pip-tooltip"),n.appendChild(t)}return n},Ti=function(t,i){const n=document.createElement("div");n.className="video-subtitle-control",n.setAttribute("part","subtitle-control");const s=document.createElement("button");s.className="video-control-btn video-subtitle-btn",s.setAttribute("aria-label","Subtitles"),s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-expanded","false"),s.tabIndex=0,s.setAttribute("part","subtitle-btn");const o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.subtitle)),s.appendChild(o);const a=document.createElement("span");if(a.className="subtitle-text",a.textContent="CC",a.setAttribute("part","subtitle-text"),s.appendChild(a),i.showTooltips){const t=document.createElement("span");t.className="tooltip subtitle-tooltip",t.textContent="Subtitles",t.setAttribute("part","subtitle-tooltip"),s.appendChild(t)}n.appendChild(s);const l=document.createElement("div");return l.className="video-subtitle-menu",l.setAttribute("role","menu"),l.setAttribute("part","subtitle-menu"),n.appendChild(l),n},Si=function(t,i){const n=document.createElement("div");n.className="video-quality-control",n.setAttribute("part","quality-control");const s=document.createElement("button");s.className="video-control-btn video-quality-btn",s.setAttribute("aria-label","Quality"),s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-expanded","false"),s.tabIndex=0,s.setAttribute("part","quality-btn");const o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.quality)),s.appendChild(o);const a=document.createElement("span");if(a.className="quality-text",a.textContent="Auto",a.setAttribute("part","quality-text"),s.appendChild(a),i.showTooltips){const t=document.createElement("span");t.className="tooltip quality-tooltip",t.textContent="Quality",t.setAttribute("part","quality-tooltip"),s.appendChild(t)}n.appendChild(s);const l=document.createElement("div");return l.className="video-quality-menu",l.setAttribute("role","menu"),l.setAttribute("part","quality-menu"),n.appendChild(l),n},Li=function(t,i){const n=document.createElement("div");n.className="video-speed-control",n.setAttribute("part","speed-control");const s=document.createElement("button");s.className="video-control-btn video-speed-btn",s.setAttribute("aria-label","Playback speed"),s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-expanded","false"),s.tabIndex=0,s.setAttribute("part","speed-btn");const o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.speed)),s.appendChild(o);const a=document.createElement("span");if(a.className="speed-text",a.textContent="1x",a.setAttribute("part","speed-text"),s.appendChild(a),i.showTooltips){const t=document.createElement("span");t.className="tooltip speed-tooltip",t.textContent=i.tooltipSpeed,t.setAttribute("part","speed-tooltip"),s.appendChild(t)}n.appendChild(s);const l=document.createElement("div");return l.className="video-speed-menu",l.setAttribute("role","menu"),l.setAttribute("part","speed-menu"),i.speedOptions.forEach(t=>{const e=document.createElement("button");e.className="video-speed-option "+(1===t?"active":""),e.setAttribute("role","menuitem"),e.tabIndex=-1,e.setAttribute("data-speed",t.toString()),e.textContent=t+"x",e.setAttribute("part","speed-option"),l.appendChild(e)}),n.appendChild(l),n},Mi=function(t,i){const n=document.createElement("button");n.className="video-control-btn theater-btn",n.setAttribute("aria-label","Theater mode"),n.tabIndex=0,n.setAttribute("part","theater-btn");const s=document.createElement("span");if(s.className="theater-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.theater)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip theater-tooltip",t.textContent="Theater mode",t.setAttribute("part","theater-tooltip"),n.appendChild(t)}return n},Ni=function(t,i){const n=document.createElement("button");n.className="video-control-btn screenshot-btn",n.setAttribute("aria-label","Screenshot"),n.tabIndex=0,n.setAttribute("part","screenshot-btn");const s=document.createElement("span");if(s.className="screenshot-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.screenshot)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip screenshot-tooltip",t.textContent="Take screenshot",t.setAttribute("part","screenshot-tooltip"),n.appendChild(t)}return n},zi=function(t,i){const n=document.createElement("button");n.className="video-control-btn airplay-btn",n.setAttribute("aria-label","AirPlay"),n.tabIndex=0,n.setAttribute("part","airplay-btn");const s=document.createElement("span");if(s.className="airplay-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.airplay)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip airplay-tooltip",t.textContent="AirPlay",t.setAttribute("part","airplay-tooltip"),n.appendChild(t)}return n},_i=function(t,i){const n=document.createElement("button");n.className="video-control-btn miniplayer-btn",n.setAttribute("aria-label","Mini player"),n.tabIndex=0,n.setAttribute("part","miniplayer-btn");const s=document.createElement("span");if(s.className="miniplayer-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.miniplayer)),n.appendChild(s),i.showTooltips){const t=document.createElement("span");t.className="tooltip miniplayer-tooltip",t.textContent="Mini player",t.setAttribute("part","miniplayer-tooltip"),n.appendChild(t)}return n},Pi=function(t,i){const n=document.createElement("button");n.className="video-control-btn fullscreen-btn",n.setAttribute("aria-label","Fullscreen"),n.tabIndex=0,n.setAttribute("part","fullscreen-btn");const s=document.createElement("span");s.className="fullscreen-icon",s.setAttribute("aria-hidden","true"),s.appendChild(e(this,Tt,"m",yi).call(this,t.fullscreen));const o=document.createElement("span");if(o.className="exit-fullscreen-icon",o.style.display="none",o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.exitFullscreen)),n.appendChild(s),n.appendChild(o),i.showTooltips){const t=document.createElement("span");t.className="tooltip fullscreen-tooltip",t.textContent=i.tooltipFullscreen,t.setAttribute("part","fullscreen-tooltip");const e=document.createElement("span");e.className="tooltip exit-fullscreen-tooltip",e.style.display="none",e.textContent=i.tooltipExitFullscreen,e.setAttribute("part","exit-fullscreen-tooltip"),n.appendChild(t),n.appendChild(e)}return n},Oi=function(t,i){const n=document.createElement("div");n.className="video-more-control",n.setAttribute("part","more-control");const s=document.createElement("button");s.className="video-control-btn video-more-btn",s.setAttribute("aria-label","More controls"),s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-expanded","false"),s.tabIndex=0,s.setAttribute("part","more-btn");const o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.appendChild(e(this,Tt,"m",yi).call(this,t.more)),s.appendChild(o),n.appendChild(s);const a=document.createElement("div");return a.className="video-more-menu",a.setAttribute("role","menu"),a.setAttribute("part","more-menu"),n.appendChild(a),n},Ri=function(t){const e="light"===t.theme?{accent:"#ffffff"!==t.accentColor?t.accentColor:"#000000",controlsBg:"rgba(0,0,0,0.8)"!==t.controlsBackground?t.controlsBackground:"rgba(255,255,255,0.9)",centerPlayBg:"rgba(0,0,0,0.7)"!==t.centerPlayBackground?t.centerPlayBackground:"rgba(255,255,255,0.8)"}:{accent:t.accentColor,controlsBg:t.controlsBackground,centerPlayBg:t.centerPlayBackground};this.style.setProperty("--accent-color",e.accent),this.style.setProperty("--controls-bg",e.controlsBg),this.style.setProperty("--center-play-bg",e.centerPlayBg),t.centerPlaySize&&this.style.setProperty("--center-play-size",t.centerPlaySize+"px")},Ii=function(){const t=e(this,Tt,"m",fi).call(this);t.lazy||t.pauseOnOutOfView?e(this,Tt,"m",qi).call(this,e(this,jt,"f"),t):e(this,Tt,"m",Fi).call(this,e(this,jt,"f"),t),t.performanceMode&&e(this,Tt,"m",fn).call(this),e(this,Tt,"m",Ri).call(this,t)},Di=function(){e(this,Tt,"m",fi).call(this).pauseOnTabHide&&(document.addEventListener("visibilitychange",e(this,De,"f"),{passive:!0}),window.addEventListener("pagehide",e(this,We,"f"),{passive:!0}),window.addEventListener("pageshow",e(this,qe,"f"),{passive:!0}))},Wi=function(){document.removeEventListener("visibilitychange",e(this,De,"f")),window.removeEventListener("pagehide",e(this,We,"f")),window.removeEventListener("pageshow",e(this,qe,"f"))},qi=function(t,n){if(!("IntersectionObserver"in window))return e(this,Tt,"m",Fi).call(this,t,n);const s={root:null,rootMargin:"50px",threshold:n.lazyThreshold};i(this,zt,new IntersectionObserver(s=>{s.forEach(s=>{n.lazy&&!e(this,_t,"f")&&s.isIntersecting&&s.intersectionRatio>=n.lazyThreshold&&e(this,Tt,"m",Fi).call(this,t,n),n.pauseOnOutOfView&&e(this,Pt,"f")&&e(this,Wt,"f")&&(!s.isIntersecting||s.intersectionRatio<n.pauseThreshold?e(this,Ot,"f")&&(i(this,Bt,!0,"f"),this.pauseVideo()):e(this,Bt,"f")&&!e(this,Ot,"f")&&(this.playVideo(),i(this,Bt,!1,"f")))})},s),"f"),e(this,zt,"f").observe(t),n.lazy||!n.pauseOnOutOfView||e(this,_t,"f")||e(this,Tt,"m",Fi).call(this,t,n)},Fi=function(t,n){if(e(this,_t,"f"))return;t.classList.add("video-loading"),this.classList.add("video-loading");const s=document.createElement("video");i(this,Pt,s,"f"),s.muted=n.muted,s.defaultMuted=n.muted;const o={preload:n.preload,...!n.showPip&&{disablepictureinpicture:""},"webkit-playsinline":"",...n.loop&&{loop:""},...n.muted&&{muted:""},...n.playsinline&&{playsinline:""}};Object.entries(o).forEach(([t,e])=>s.setAttribute(t,e)),s.setAttribute("part","video"),s.playsInline=!0;Array.from(this.querySelectorAll("track")).forEach(t=>{for(let e=t.attributes.length-1;e>=0;e--){const i=t.attributes[e];i.name.startsWith("on")&&t.removeAttribute(i.name)}s.appendChild(t)});const a=Array.from(this.querySelectorAll("source")),l=[];if(a.forEach(t=>{for(let e=t.attributes.length-1;e>=0;e--){const i=t.attributes[e];i.name.startsWith("on")&&t.removeAttribute(i.name)}const i=t.getAttribute("src");i&&e(this,Tt,"m",pi).call(this,i)?l.push(t):console.warn("ShadowPlyr: Ignored invalid source URL:",i)}),l.length>0)l.forEach(t=>s.appendChild(t));else{if(n.desktopVideo&&e(this,Tt,"m",pi).call(this,n.desktopVideo)){const t=document.createElement("source");t.src=n.desktopVideo,t.type=n.videoType,t.media="(min-width: 769px)",s.appendChild(t)}if(n.mobileVideo&&e(this,Tt,"m",pi).call(this,n.mobileVideo)){const t=document.createElement("source");t.src=n.mobileVideo,t.type=n.videoType,t.media="(max-width: 768px)",s.appendChild(t)}n.desktopVideo&&e(this,Tt,"m",pi).call(this,n.desktopVideo)?s.src=n.desktopVideo:n.mobileVideo&&e(this,Tt,"m",pi).call(this,n.mobileVideo)&&(s.src=n.mobileVideo)}const r=Array.from(s.querySelectorAll("source[data-quality]"));i(this,pe,r.map(t=>({src:t.src,type:t.type||"video/mp4",label:t.getAttribute("data-quality"),media:t.media||null})).filter(t=>e(this,Tt,"m",pi).call(this,t.src)),"f"),s.addEventListener("loadedmetadata",e(this,Ue,"f").bind(this,t,n),{once:!0}),s.addEventListener("playing",e(this,Qe,"f").bind(this,t)),s.addEventListener("pause",e(this,Ze,"f").bind(this,t)),s.addEventListener("ended",e(this,Je,"f").bind(this,t,n)),s.addEventListener("seeked",()=>e(this,Tt,"m",yn).call(this,"video-seeked",{currentTime:s.currentTime})),s.addEventListener("seeking",()=>e(this,Tt,"m",yn).call(this,"video-seeking",{currentTime:s.currentTime})),s.addEventListener("progress",e(this,hi,"f"),{passive:!0}),s.addEventListener("volumechange",e(this,ti,"f").bind(this,t)),(s.muted||n.muted)&&e(this,Tt,"m",Qi).call(this,!0,t),s.addEventListener("error",e(this,ei,"f").bind(this,t)),s.addEventListener("enterpictureinpicture",e(this,si,"f")),s.addEventListener("leavepictureinpicture",e(this,oi,"f"));const c=t.querySelector(".video-placeholder");c&&c.replaceWith(s),s.load(),s.style.pointerEvents="auto";const d=t.querySelector("picture");d&&(d.removeEventListener("click",e(this,Fe,"f")),d.addEventListener("click",e(this,Fe,"f"))),n.autoplay&&n.muted&&this.playVideo()},Hi=function(t){t.addEventListener("click",i=>{const n=i.target,s=n.closest(".video-seekbar");if(s){const t=s.getBoundingClientRect();return e(this,ze,"f").call(this,(i.clientX-t.left)/t.width),void i.stopPropagation()}const o=n.closest(".video-volume-slider");if(o){const t=o.getBoundingClientRect();return e(this,_e,"f").call(this,(i.clientX-t.left)/t.width),void i.stopPropagation()}const a=n.closest('[class*="video-"]');if(a)if(a.classList.contains("play-pause")||a.classList.contains("video-center-play"))e(this,ke,"f").call(this,i);else if(a.classList.contains("volume-btn"))e(this,Ee,"f").call(this,i);else if(a.classList.contains("fullscreen-btn"))e(this,xe,"f").call(this,i);else if(a.classList.contains("loop-btn"))e(this,Ce,"f").call(this,i);else if(a.classList.contains("pip-btn"))e(this,Te,"f").call(this,i);else if(a.classList.contains("theater-btn"))e(this,Se,"f").call(this);else if(a.classList.contains("screenshot-btn"))e(this,Ne,"f").call(this);else if(a.classList.contains("airplay-btn"))e(this,Pt,"f")&&e(this,Pt,"f").webkitShowPlaybackTargetPicker&&e(this,Pt,"f").webkitShowPlaybackTargetPicker();else if(a.classList.contains("miniplayer-btn"))e(this,Le,"f").call(this);else if(a.classList.contains("video-speed-btn"))e(this,Tt,"m",on).call(this,t);else if(a.classList.contains("video-quality-btn"))e(this,Tt,"m",ln).call(this,t);else if(a.classList.contains("video-subtitle-btn"))e(this,Tt,"m",cn).call(this,t);else if(a.classList.contains("video-more-btn"))e(this,Tt,"m",hn).call(this,t);else if(a.classList.contains("video-speed-option")){const i=parseFloat(a.getAttribute("data-speed"));e(this,Pe,"f").call(this,i,t),e(this,Tt,"m",an).call(this,t)}else if(a.classList.contains("video-quality-option")){const i=a.getAttribute("data-quality");"auto"===i?e(this,Oe,"f").call(this):e(this,ue,"f").length>0&&!isNaN(parseInt(i))?e(this,Xe,"f").call(this,parseInt(i)):e(this,Re,"f").call(this,i),e(this,Tt,"m",rn).call(this,t)}else if(a.classList.contains("video-subtitle-option")){const i=a.getAttribute("data-subtitle");e(this,Ie,"f").call(this,i||null),e(this,Tt,"m",dn).call(this,t)}});const i=t.querySelector(".video-seekbar");i&&(i.addEventListener("mousedown",e(this,He,"f")),i.addEventListener("touchstart",e(this,Be,"f"),{passive:!0}));const n=t.querySelector(".video-volume-slider");n&&n.addEventListener("mousedown",e(this,Ve,"f")),e(this,Pt,"f")&&e(this,Pt,"f").addEventListener("click",e(this,ke,"f")),e(this,Tt,"m",Bi).call(this,t)},Bi=function(t){t.addEventListener("keydown",e(this,Ae,"f")),t.addEventListener("mouseenter",()=>{e(this,Wt,"f")&&(t.classList.add("show-controls"),this.classList.add("show-controls"))},{passive:!0}),t.addEventListener("mouseleave",()=>{t.classList.remove("show-controls"),this.classList.remove("show-controls"),e(this,Tt,"m",Vi).call(this)},{passive:!0}),t.addEventListener("touchend",e(this,ai,"f"))},Vi=function(t){e(this,Jt,"f")&&e(this,Jt,"f")!==t&&e(this,Jt,"f").classList.remove("active"),e(this,ee,"f")&&e(this,ee,"f")!==t&&e(this,ee,"f").classList.remove("active"),e(this,ne,"f")&&e(this,ne,"f")!==t&&e(this,ne,"f").classList.remove("active"),e(this,oe,"f")&&e(this,oe,"f")!==t&&e(this,oe,"f").classList.remove("active"),e(this,ae,"f")&&e(this,oe,"f")!==t&&e(this,ae,"f").classList.remove("active")},Ui=function(t){e(this,de,"f")||i(this,de,new ResizeObserver(i=>{for(const n of i){const i=n.contentRect.width;e(this,Tt,"m",ji).call(this,t,i)}}),"f"),e(this,de,"f").observe(t),e(this,Tt,"m",Gi).call(this,t)},ji=function(t,e){const i=[".loop-btn",".pip-btn",".video-subtitle-control",".video-quality-control",".video-speed-control",".theater-btn",".screenshot-btn",".airplay-btn",".miniplayer-btn"],n=t.querySelector(".video-more-menu"),s=t.querySelector(".video-more-btn");n&&s&&(e<500?(i.forEach(e=>{const i=t.querySelector(e);if(i&&!i.classList.contains("responsive-hidden")){i.classList.add("responsive-hidden");const s=i.cloneNode(!0);s.classList.remove("responsive-hidden"),s.classList.add("video-more-option"),s.addEventListener("click",i=>{i.stopPropagation();const n=t.querySelector(e);n&&n.click()}),n.appendChild(s)}}),s.classList.remove("responsive-hidden")):(i.forEach(e=>{const i=t.querySelector(e);i&&i.classList.remove("responsive-hidden")}),s.classList.add("responsive-hidden"),n.innerHTML=""))},Gi=function(t){},Yi=function(){const t=e(this,Pt,"f");if(!t||!t.duration)return;const i=t.currentTime/t.duration;e(this,le,"f")&&(e(this,le,"f").style.transform=`scaleX(${i})`),e(this,Kt,"f")&&(e(this,Kt,"f").style.left=100*i+"%"),e(this,Yt,"f")&&e(this,Yt,"f").setAttribute("aria-valuenow",Math.round(100*i).toString()),e(this,Tt,"m",Xi).call(this)},Xi=function(){if(!e(this,Qt,"f")||!e(this,Pt,"f"))return;const t=e(this,Tt,"m",$i).call(this,e(this,Pt,"f").currentTime),i=e(this,Tt,"m",$i).call(this,e(this,Pt,"f").duration);e(this,Qt,"f").textContent=`${t} / ${i}`},$i=function(t){if(isNaN(t)||!isFinite(t))return"0:00";return`${Math.floor(t/60)}:${Math.floor(t%60).toString().padStart(2,"0")}`},Ki=function(t,i){i||(i=e(this,jt,"f")),i.querySelectorAll(".play-pause, .video-center-play").forEach(e=>{const i=e.querySelector(".play-icon"),n=e.querySelector(".pause-icon");i&&(i.style.display=t?"none":"block"),n&&(n.style.display=t?"block":"none"),e.setAttribute("aria-label",t?"Pause":"Play");const s=e.querySelector(".play-tooltip"),o=e.querySelector(".pause-tooltip");s&&(s.style.display=t?"none":"block"),o&&(o.style.display=t?"block":"none")})},Qi=function(t,i){i||(i=e(this,jt,"f"));const n=i.querySelector(".volume-btn");if(n){const e=n.querySelector(".volume-icon"),i=n.querySelector(".muted-icon");e&&(e.style.display=t?"none":"block"),i&&(i.style.display=t?"block":"none"),n.setAttribute("aria-label",t?"Unmute":"Mute");const s=n.querySelector(".volume-tooltip"),o=n.querySelector(".muted-tooltip");s&&(s.style.display=t?"none":"block"),o&&(o.style.display=t?"block":"none")}},Zi=function(t,i){i||(i=e(this,jt,"f"));const n=i.querySelector(".fullscreen-btn");if(!n)return;const s=n.querySelector(".fullscreen-icon"),o=n.querySelector(".exit-fullscreen-icon");s&&(s.style.display=t?"none":"block"),o&&(o.style.display=t?"block":"none"),n.setAttribute("aria-label",t?"Exit fullscreen":"Fullscreen");const a=n.querySelector(".fullscreen-tooltip"),l=n.querySelector(".exit-fullscreen-tooltip");a&&(a.style.display=t?"none":"block"),l&&(l.style.display=t?"block":"none")},Ji=function(t){var i;const n=null===(i=e(this,jt,"f"))||void 0===i?void 0:i.querySelector(".loop-btn");if(!n)return;const s=n.querySelector(".loop-icon");if(!s)return;const o=e(this,Tt,"m",wi).call(this);s.innerHTML="";const a=e(this,Tt,"m",yi).call(this,t?o.loop:o.loopOnce);s.appendChild(a),n.setAttribute("aria-label",t?"Disable loop":"Enable loop");const l=n.querySelector(".loop-on-tooltip"),r=n.querySelector(".loop-off-tooltip");l&&r&&(l.style.display=t?"block":"none",r.style.display=t?"none":"block")},tn=function(t){var i;const n=null===(i=e(this,jt,"f"))||void 0===i?void 0:i.querySelector(".pip-btn");n&&(n.classList.toggle("active",t),this.classList.toggle("active",t))},en=function(t,i){e(this,Zt,"f")&&(e(this,Zt,"f").style.width=100*t+"%")},nn=function(){e(this,ie,"f")&&(e(this,me,"f")?e(this,ie,"f").textContent=e(this,me,"f")+"p":e(this,ie,"f").textContent="Auto")},sn=function(){e(this,se,"f")&&(e(this,se,"f").textContent=e(this,ve,"f")?"CC":"Off")},on=function(t){var i;e(this,Tt,"m",Vi).call(this,e(this,Jt,"f")),null===(i=e(this,Jt,"f"))||void 0===i||i.classList.toggle("active")},an=function(t){var i;null===(i=e(this,Jt,"f"))||void 0===i||i.classList.remove("active")},ln=function(t){var i;e(this,Tt,"m",Vi).call(this,e(this,ee,"f")),null===(i=e(this,ee,"f"))||void 0===i||i.classList.toggle("active")},rn=function(t){var i;null===(i=e(this,ee,"f"))||void 0===i||i.classList.remove("active")},cn=function(t){var i;e(this,Tt,"m",Vi).call(this,e(this,ne,"f")),null===(i=e(this,ne,"f"))||void 0===i||i.classList.toggle("active")},dn=function(t){var i;null===(i=e(this,ne,"f"))||void 0===i||i.classList.remove("active")},hn=function(t){var i;e(this,Tt,"m",Vi).call(this,e(this,oe,"f"));const n=null===(i=e(this,oe,"f"))||void 0===i?void 0:i.classList.toggle("active");e(this,ae,"f")&&e(this,ae,"f").classList.toggle("active",n)},un=function(){e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=Math.max(0,e(this,Pt,"f").currentTime-e(this,Tt,"m",fi).call(this).seekStep))},pn=function(){e(this,Pt,"f")&&(e(this,Pt,"f").currentTime=Math.min(e(this,Pt,"f").duration,e(this,Pt,"f").currentTime+e(this,Tt,"m",fi).call(this).seekStep))},mn=function(t){e(this,Pt,"f")&&e(this,_e,"f").call(this,e(this,Pt,"f").volume+t)},fn=function(){e(this,jt,"f")&&(e(this,jt,"f").classList.add("perf-mode"),this.classList.add("perf-mode"))},bn=function(){e(this,Tt,"m",vn).call(this),e(this,Tt,"m",vi).call(this),requestAnimationFrame(()=>{e(this,Tt,"m",Ii).call(this),e(this,Tt,"m",Di).call(this)})},vn=function(){e(this,Tt,"m",Wi).call(this),e(this,zt,"f")&&(e(this,zt,"f").disconnect(),i(this,zt,null,"f")),e(this,jt,"f")&&(e(this,jt,"f").removeEventListener("keydown",e(this,Ae,"f")),e(this,jt,"f").__closeMenus&&document.removeEventListener("click",e(this,jt,"f").__closeMenus)),e(this,Pt,"f")&&(e(this,Pt,"f").pause(),e(this,Pt,"f").removeEventListener("click",e(this,ke,"f")),e(this,Pt,"f").removeEventListener("enterpictureinpicture",e(this,si,"f")),e(this,Pt,"f").removeEventListener("leavepictureinpicture",e(this,oi,"f")),e(this,Pt,"f").src="",e(this,Pt,"f").load(),i(this,Pt,null,"f")),this.classList.remove("video-loading","video-loaded","is-playing","poster-visible","show-controls","theater-mode","mini-player"),e(this,Ut,"f")&&cancelAnimationFrame(e(this,Ut,"f")),e(this,he,"f")&&e(this,he,"f").destroy(),i(this,_t,!1,"f"),i(this,Ot,!1,"f"),i(this,Wt,!1,"f"),i(this,Bt,!1,"f"),i(this,Ht,!1,"f"),i(this,Ft,e(this,qt,"f"),"f"),i(this,Dt,1,"f"),i(this,jt,null,"f"),i(this,Gt,null,"f"),i(this,Yt,null,"f"),i(this,Xt,null,"f"),i(this,$t,null,"f"),i(this,Qt,null,"f"),i(this,Zt,null,"f"),i(this,Jt,null,"f"),i(this,te,null,"f"),i(this,ee,null,"f"),i(this,ie,null,"f"),i(this,ne,null,"f"),i(this,se,null,"f"),i(this,oe,null,"f"),i(this,ae,null,"f"),i(this,Lt,null,"f"),i(this,ue,[],"f"),i(this,pe,[],"f"),document.removeEventListener("webkitfullscreenchange",e(this,ui,"f"))},yn=function(t,e={}){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))},customElements.get("shadow-plyr")||customElements.define("shadow-plyr",kn),customElements.get("shadow-plyr")||customElements.define("shadow-plyr",kn),t.ShadowPlyr=kn});
|
|
4
3
|
//# sourceMappingURL=index.umd.js.map
|