https://www.tuskevents.co.za/wp-content/plugins/super-video-player…/view.js?ver=1fbf30eba453ea30ae9f
1(()=>{"use strict";const t=window.wp.element,e=window.React;function n(t){if(!t)return"";const e=t.split(".");return e.length>1?e.pop().toLowerCase():""}const i=(t,e={},n={})=>{if(!t)return;const{color:i="#fff",bg:r="#000"}=e,{fontSize:o={},fontWeight:s="",fontFamily:a="",lineHeight:l="",textTransform:c="",textDecoration:d="",letterSpace:u=""}=n,p=o.desktop||18,m=o.tablet||p,h=o.mobile||m,v="svp-caption-style";let $=t.querySelector(`#${v}`);$||($=document.createElement("style"),$.id=v,t.appendChild($)),$.innerHTML=`\n .plyr__caption {\n color: ${i} !important;\n background: ${r} !important;\n font-size: ${p} !important;\n font-weight: ${s} !important;\n font-family: ${a} !important;\n line-height: ${l};\n text-transform: ${c};\n text-decoration: ${d};\n latter-space: ${u}\n }\n\n @media (max-width: 1024px) {\n .plyr__caption {\n font-size: ${m} !important;\n }\n }\n\n @media (max-width: 767px) {\n .plyr__caption {\n font-size: ${h} !important;\n }\n }\n\n .plyr--fullscreen .plyr__caption {\n font-size: ${p} !important;\n }\n `},r=window.ReactJSXRuntime,o=({video:t,options:o,isAdmin:s,plyr:a,captionstyles:l,captionTypo:c})=>{const{autoPlay:d,muted:u,repeat:p,isControl:m,controls:h,clickToPlay:v,volume:$,seekTime:y,toolTip:f}=o,g=(0,e.useRef)(),b=(0,e.useRef)(null),x=(0,e.useRef)(null),w=(0,e.useRef)(null),j=(0,e.useMemo)((()=>Object.keys(h).filter((t=>h[t]))),[h]),k=j.join(",");return(0,e.useEffect)((()=>{g.current&&i(g.current,l,c)}),[l,c]),(0,e.useEffect)((()=>{if(!window.Plyr||!g.current)return;const e=g.current.querySelector(".hidden")?.innerHTML;if(e){const t=g.current.querySelector(".visible");t.innerHTML="",t.innerHTML=e}const i=g.current.querySelector(".visible video");if(!i)return;const r=window.SVP_DATA?.iconUrl||"https://cdn.plyr.io/3.7.8/plyr.svg",o=setTimeout((()=>{const e=new window.Plyr(i,{controls:j,autoplay:d,muted:u,clickToPlay:v,volume:u?0:$,loop:{active:p},hideControls:m,captions:{active:!0,language:"auto",update:!0},tooltips:{controls:f},seekTime:y||10,iconUrl:r,urls:{download:t.customDownloadButton?t.customDownloadUrl:t.src},storage:{enabled:!d,key:"plyr"}});b.current=e,"object"==typeof a&&null!==a&&(a.current=e);const o=n(t.src);if("m3u8"===o&&window.Hls?.isSupported()){const n=new window.Hls;x.current=n,n.loadSource(t.src),n.attachMedia(i),e.on("languagechange",(()=>{setTimeout((()=>n.subtitleTrack=e.currentTrack),50)}))}if("mpd"===o&&window.dashjs){const e=window.dashjs.MediaPlayer().create();w.current=e,e.initialize(i,t.src,!0)}}),0);return()=>{clearTimeout(o),w.current&&("function"==typeof w.current.destroy?w.current.destroy():"function"==typeof w.current.reset&&w.current.reset(),w.current=null),x.current&&(x.current.destroy(),x.current=null),b.current&&(b.current.destroy(),b.current=null),"object"==typeof a&&null!==a&&(a.current=null),i.pause()}}),[t,k,d,u,v,$,p,m,y,f]),(0,r.jsxs)("div",{ref:g,children:[s&&(0,r.jsx)("div",{className:"hidden",children:(0,r.jsxs)("video",{playsInline:!0,controls:!0,crossOrigin:"anonymous","data-poster":t.poster,src:t.src,children:[t?.qualities?.length>0?t.qualities.map(((t,e)=>(0,r.jsx)("source",{src:t.source,size:t.size,type:"video/mp4"},e))):(0,r.jsx)("source",{src:t.src,type:"video/mp4"}),t?.captions?.length>0&&t.captions.map(((t,e)=>(0,r.jsx)("track",{kind:"captions",srcLang:t.srclang,label:t.label,src:t.source,default:t.default},e)))]})}),(0,r.jsx)("div",{className:"visible",children:(0,r.jsxs)("video",{playsInline:!0,controls:!0,crossOrigin:"anonymous","data-poster":t.poster,src:t.src,children:[t?.qualities?.length>0?t.qualities.map(((t,e)=>(0,r.jsx)("source",{src:t.source,size:t.size,type:"video/mp4"},e))):(0,r.jsx)("source",{src:t.src,type:"video/mp4"}),t?.captions?.length>0&&t.captions.map(((t,e)=>(0,r.jsx)("track",{kind:"captions",srcLang:t.srclang,label:t.label,src:t.source,default:t.default},e)))]})})]})},s=({video:t,videos:e,currentItem:n,setCurrentItem:i,player:s,isAdmin:a,attributes:l,plyr:c=null})=>(0,r.jsxs)("div",{className:"default-container",children:[(0,r.jsx)(o,{video:t,captionstyles:l?.captionstyles,captionTypo:l?.captionTypo,options:l.options,plyr:c,isAdmin:a,currentItem:n}),Array.isArray(e)&&(0,r.jsx)("div",{className:"svp_playlist",children:(0,r.jsx)("div",{className:"default",children:e.map(((t,e)=>(0,r.jsxs)("div",{className:"svp_item "+(n===e?"active":""),onClick:()=>{i(e),setTimeout((()=>{s?.play()}),500)},children:[n===e&&(0,r.jsx)("span",{className:"playing",children:"Now Playing"}),n===e-1&&(0,r.jsx)("span",{className:"next",children:"Up Next"}),(0,r.jsx)("h3",{className:"title",children:t.title?t.title:"Enter video title..."}),(0,r.jsx)("p",{className:"description",children:t.description})]},e)))})})]}),a=({currentItem:t,setCurrentItem:n,videos:i,video:s,videoSrc:a,isAdmin:l,attributes:c})=>{const[d,u]=(0,e.useState)({}),p=(0,e.useRef)(null),m=(0,e.useRef)(),{autoPlay:h}=c.options;(0,e.useEffect)((()=>{(async()=>{const t={};for(const e of i){if(!e.src)continue;const n=document.createElement("video");n.src=e.src,await new Promise((i=>
1{n.addEventListener("loadedmetadata",(()=>{t[e.src]=v(n.duration),i()}))}))}u(t)})()}),[i]);const v=t=>{const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n}`};return(0,e.useEffect)((()=>{p.current&&(p.current.load(),p.current.play())}),[t]),(0,r.jsxs)("div",{className:"grid-container",ref:m,children:[(0,r.jsx)("div",{className:"grid-main-video-container",children:(0,r.jsx)(o,{video:s,captionstyles:c?.captionstyles,captionTypo:c?.captionTypo,options:c.options,isAdmin:l,videoSrc:a})}),(0,r.jsx)("div",{className:"videos-grid content",children:i.map(((e,i)=>(0,r.jsxs)("div",{className:"video-grid-item "+(t===i?"active":""),onClick:()=>{n(i),h&&setTimeout((()=>{document.querySelector("video")?.play()}),500)},children:[(0,r.jsxs)("div",{className:"thumbnail-grid-container",children:[(0,r.jsx)("img",{src:e.poster,alt:"upload thumbnail",className:"grid-thumbnail"}),(0,r.jsx)("div",{className:"grid-video-time",children:d[e.src]||"0:00"})]}),(0,r.jsxs)("div",{className:"grid-video-details",children:[(0,r.jsx)("h3",{className:"grid-title",children:e.title}),(0,r.jsx)("p",{className:"grid-des",children:e.description})]})]},i)))})]})},l=({currentItem:t,setCurrentItem:n,videos:i,videoSrc:s,video:a,attributes:l,isAdmin:c})=>{const[d,u]=(0,e.useState)({}),p=(0,e.useRef)(null),{autoPlay:m}=l.options;(0,e.useEffect)((()=>{(async()=>{const t={};for(const e of i){if(!e.src)continue;const n=document.createElement("video");n.src=e.src,await new Promise((i=>{n.addEventListener("loadedmetadata",(()=>{t[e.src]=h(n.duration),i()}))}))}u(t)})()}),[i]);const h=t=>{const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n}`};return(0,e.useEffect)((()=>{p.current&&(p.current.load(),p.current.play())}),[t]),(0,r.jsxs)("div",{className:"horizontal-container",children:[(0,r.jsx)("div",{className:"video-container",children:(0,r.jsx)(o,{video:a,captionstyles:l?.captionstyles,captionTypo:l?.captionTypo,options:l.options,isAdmin:c,videoSrc:s})}),(0,r.jsx)("div",{className:"videos-container content",children:i.map(((e,i)=>(0,r.jsxs)("div",{className:"video-item "+(t===i?"active":""),onClick:()=>{n(i),m&&setTimeout((()=>{document.querySelector("video")?.play()}),500)},children:[(0,r.jsxs)("div",{className:"thumbnail-container",children:[(0,r.jsx)("img",{src:e.poster,alt:"upload thumbnail",className:"video-thumbnail"}),(0,r.jsx)("div",{className:"video-time",children:d[e.src]||"0:00"})]}),(0,r.jsxs)("div",{className:"video-details",children:[(0,r.jsx)("h3",{children:e?.title}),(0,r.jsx)("p",{className:"horizontal-des",children:e.description})]})]},i)))})]})},c=({currentItem:t,setCurrentItem:n,videos:i,videoSrc:s,video:a,attributes:l,isAdmin:c})=>{const[d,u]=(0,e.useState)({}),p=(0,e.useRef)(null),{autoPlay:m}=l.options;(0,e.useEffect)((()=>{(async()=>{const t={};await Promise.all(i.map((e=>new Promise((n=>{if(!e.src)return n();const i=document.createElement("video");i.preload="metadata",i.crossOrigin="anonymous",i.src=e.src,i.addEventListener("loadedmetadata",(()=>{const r=i.duration;t[e.src]=isNaN(r)?"0:00":h(r),n()})),i.addEventListener("error",(()=>n()))}))))),u(t)})()}),[i]);const h=t=>{const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n}`};return(0,e.useEffect)((()=>{p.current&&(p.current.load(),p.current.play())}),[t]),(0,r.jsxs)("div",{className:"vertical-container",children:[(0,r.jsx)("div",{className:"video-container",children:(0,r.jsx)(o,{video:a,captionstyles:l?.captionstyles,captionTypo:l?.captionTypo,options:l.options,isAdmin:c,videoSrc:s})}),(0,r.jsx)("div",{className:"videos-list content",children:i.map(((e,i)=>(0,r.jsxs)("div",{className:"video-item "+(t===i?"active":""),onClick:()=>{n(i),m&&setTimeout((()=>{document.querySelector("video")?.play()}),500)},children:[(0,r.jsxs)("div",{className:"thumbnail-container",children:[(0,r.jsx)("img",{src:e.poster,alt:"upload thumbnail",className:"video-thumbnail"}),(0,r.jsx)("div",{className:"video-time",children:d[e.src]||"0:00"})," "]}),(0,r.jsxs)("div",{className:"vertical-details",children:[(0,r.jsx)("h4",{children:e.title}),(0,r.jsx)("p",{className:"vertical-des",children:e.description})]})]},i)))})]})},d=({attributes:t,isAdmin:i=!1}
1)=>{const{videos:o=[],themes:s={}}=t,{theme:a}=s,l=(0,e.useRef)(null),[c,d]=(0,e.useState)(null),[p,m]=(0,e.useState)(0),h=o?.[p]||{},v=h?.src||"https://cdn.jsdelivr.net/npm/[email protected]/video.mp4",$=(0,e.useRef)(null),y=(0,e.useRef)(null),f=(0,e.useRef)(null);return(0,e.useEffect)((()=>{if(0===o?.length)return;const e=o[p],i=l.current?.querySelector("video");if(!i)return;let r;i.src=e.src,l.current.querySelector(".plyr__poster")?.setAttribute("style",`background-image: url("${e.poster}")`),(t.options||{}).autoPlay&&(r=setTimeout((()=>i.play().catch((()=>{}))),100));let s=n(e.src);if("m3u8"===s&&window.Hls?.isSupported()){const t=new window.Hls;y.current=t,t.loadSource(e.src),t.attachMedia(i),c?.on("languagechange",(()=>{setTimeout((()=>t.subtitleTrack=c.currentTrack),50)}))}if("mpd"===s&&window.dashjs){const t=window.dashjs.MediaPlayer().create();f.current=t,t.initialize(i,e.src,!0)}return()=>{clearTimeout(r),f.current&&("function"==typeof f.current.destroy?f.current.destroy():"function"==typeof f.current.reset&&f.current.reset(),f.current=null),y.current&&(y.current.destroy(),y.current=null)}}),[p,o,t.options?.autoPlay,a]),(0,e.useEffect)((()=>{null!==p&&localStorage.setItem("svp_current_item",p)}),[p]),(0,e.useEffect)((()=>{const t=parseInt(localStorage.getItem("svp_current_item"))||0;m(t)}),[]),(0,e.useEffect)((()=>{if(!l.current)return;const e=l.current.querySelector("video");if(!e)return;const n=()=>{const{isAutoNextVideo:e=!1}=t?.options||{};e&&p<(t?.videos||[]).length-1&&m((t=>t+1))};return e.addEventListener("ended",n),()=>e.removeEventListener("ended",n)}),[l,p,t?.options?.isAutoNextVideo,t?.videos]),(0,r.jsx)("div",{className:"svpVideoPlayer",ref:l,children:(0,r.jsx)(u,{attributes:t,video:h,plyr:$,videoSrc:v,videos:o,currentItem:p,setCurrentItem:m,isAdmin:i})})},u=t=>{const{themes:e={}}=t.attributes,{theme:n}=e;switch(n){case"default":return(0,r.jsx)(s,{...t});case"horizontal":return(0,r.jsx)(l,{...t});case"vertical":return(0,r.jsx)(c,{...t});case"grid":return(0,r.jsx)(a,{...t});default:return null}},p="@media only screen and (max-width: 1024px)",m="@media only screen and (max-width: 640px)",h="linear-gradient(135deg, #0040E3, #18D4FD)",v=t=>{const e=(t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}})(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},$=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},y=(t,e=!0,n=!0,i=!0)=>{const{type:r="solid",color:o="",gradient:s=h,image:a={},position:l="center center",attachment:c="",repeat:d="no-repeat",size:u="",overlayColor:p=""}=t||{};return"gradient"===r&&n?$("background",s):"image"===r&&i?`background: ${v(a?.url)};\n\t\t\t\t${$("background-color",p)}\n\t\t\t\t${$("background-position",l)}\n\t\t\t\t${$("background-size",u)}\n\t\t\t\t${$("background-repeat",d)}\n\t\t\t\t${$("background-attachment",c)}\n\t\t\t\t${$("background-repeat",d)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&$("background",o)},f=t=>{const{width:e="",style:n="solid",color:i="",side:r="all",radius:o=""}=t||{},s=t=>{const e=r?.toLowerCase();return e?.includes("all")||e?.includes(t)},a=`${e} ${n} ${i}`,l=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>s(t)?`border-${t}: ${a};`:"")).join(""):""}\n\t\t${$("border-radius",o)}\n\t`;return l},g=(t,e,n=!0)=>{const{fontFamily:i="Default",fontCategory:r="sans-serif",fontVariant:o=400,fontWeight:s,isUploadFont:a=!0,fontSize:l={desktop:null,tablet:null,mobile:null},fontStyle:c,textTransform:d,textDecoration:u,lineHeight:h,letterSpace:v}=e||{},y=!n||!i||"Default"===i,f=l?.desktop||l,g=l?.tablet||f,b=l?.mobile||g,x=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},w=`\n\t\t${y?"":`font-family: '${i}', ${r};`}\n\t\t${$("font-weight",s)}\n\t\t${$("font-size",x(f))}\n\t\t${$("font-style",c)}\n\t\t${$("text-transform",d)}\n\t\t${$("text-decoration",u)}\n\t\t${$("line-height",h)}\n\t\t${$("letter-spacing",v)}\n\t`,j=o&&400!==o?"400i"===o?":ital@1":o?.includes("00i")?`: ital, wght@1, ${o?.replace("00i","00")} `:`: wght@${o} `:"",k=y?"":`https://fonts.googleapis.com/css2?family=${i?.split(" ").join("+")}${j.replace(/ /g,"")}&display=swap`;return{googleFontLink:!a||y?"":`@import url(${k});`,styles:`${t}{\n\t\t\t${w}\n\t\t}\n\t\t${p} {\n\t\t\t${t}{\n\t\t\t\t${$("font-size",x(g))}\n\t\t\t}\n\t\t}\n\t\t${m} {\n\t\t\t${t}{\n\t\t\t\t${$("font-size",x(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},b=({attributes:t,id:e})=>{const{alignment:n,typography:i,border:o,videoSize:s,options:a,tabStyles:l={},titleTypo:c={},descriptionTypo:d={},viewersTypo:u={},thumbnailSize:h={},scrollBg:v="#3D8D7A",align:b="min"}=t,{activeBg:x="",activeTitleColor:w="",activeDesColor:j="",inactiveBg:k="",inactiveTitleColor:T="",inactiveDesColor:_="",durationTimeColor:S="",durationBg:C=""}=l,{shadowControl:N}=a,E=`#${e}`,P=`${E} .svpVideoPlayer`,z=`${P} .plyr--video`,A=`${P} .default-container`,L=`${A} .svp_playlist .default .svp_item.active`,I=`${A} .svp_playlist .default .svp_item`,R=`${L} .title`,M=`${L} .description`,D=`${I} .title`,q=`${I} .description`,U=`${P} .horizontal-container`,H=`${U} .videos-container`,F=`${U} .videos-container .video-item.active`,V=`${U} .videos-container .video-item`,O=`${V} .thumbnail-container`,B=`${O} img`,W=`${O} .video-time`,J=`${F} .thumbnail-container .video-time`,K=`${F}
1 .video-details`,G=`${V} .video-details`,Q=`${P} .vertical-container .videos-list`,X=`${Q} .video-item.active`,Y=`${Q} .video-item`,Z=`${Y} .thumbnail-container img`,tt=`${Y} .thumbnail-container .video-time`,et=`${Y} .vertical-details`,nt=`${X} .vertical-details`,it=`${P} .grid-container .videos-grid`,rt=`${it} .video-grid-item.active`,ot=`${it} .video-grid-item`,st=`${ot} .thumbnail-grid-container .grid-video-time`,at=`${ot} .grid-video-details`,lt=`${rt} .grid-video-details`;return(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${g("",i)?.googleFontLink}\n\t\t${g("",c)?.googleFontLink}\n\t\t${g("",d)?.googleFontLink}\n\t\t${g("",u)?.googleFontLink}\n\n\t\t${g(`${P} .content`,i)?.styles}\n\n\t\t${g(`${R}`,c)?.styles}\n\t\t${g(`${D}`,c)?.styles}\n\n\t\t${g(`${M}`,d)?.styles}\n\t\t${g(`${q}`,d)?.styles}\n\n\t\t\n\t\t${g(`${G} h3`,c)?.styles}\n\t\t${g(`${G} .horizontal-des`,d)?.styles}\n\t\t${g(`${G} .viewers`,u)?.styles}\n\n\t\t${g(`${et} h4`,c)?.styles}\n\t\t${g(`${et} .vertical-des`,d)?.styles}\n\t\t${g(`${et} .viewers`,u)?.styles}\n\n\t\t${g(`${at} .grid-title`,c)?.styles}\n\t\t${g(`${at} .grid-des`,d)?.styles}\n\t\t${g(`${at} .grid-views`,u)?.styles}\n\n\n\t\t${E}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${P}{\n\t\t\tjustify-content: ${n};\n\t\t}\n\t\t${P} .plyr__controls{\n\t\t\tbackground: ${N?"":"transparent"};\n\t\t}\n\t\t${z}{\n\t\t\t${$("width",s?.width.desktop)}\n\t\t\t${f(o)};\n\t\t}\n\n\t\t${L}{\n\t\t\t${y(x)}\n\t\t}\n\t\t${R}{\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${M}{\n\t\t\tcolor: ${j};\n\t\t}\n\t\t${I}{\n\t\t\t${y(k)}\n\t\t}\n\t\t${D}{\n\t\t\tcolor: ${T};\n\t\t}\n\t\t${q}{\n\t\t\tcolor: ${_}\n\t\t}\n\t\t${U}{\n\t\t\tmax-height: 25vh;\n\t\t}\n\t\t${U}{\n\t\t\t\t${"wide"===b?"max-height: 51vh;":"full"===b?"max-height: 74vh;":""}\n\t\t}\n\t\t\n\t\t${H}{\n\t\t\tscrollbar-color: ${v} #f1f1f1;\n\t\t}\n\t\t${F}{\n\t\t\t${y(x)}\n\t\t}\n\t\t${V}{\n\t\t\t${y(k)}\n\t\t}\n\n\t\t${B} {\n\t\t\t${$("width",h?.width.desktop)}\n\t\t\t${$("height",h?.height.desktop)}\n\t\t}\n\t\t${K} h3{\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${K} .horizontal-des{\n\t\t\tcolor: ${j};\n\t\t}\n\t\t${G} h3{\n\t\t\tcolor: ${T};\n\t\t}\n\t\t${G} .horizontal-des{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${W},\n\t\t${J}{\n\t\t\tcolor: ${S};\n\t\t\t${y(C)}\n\t\t}\n\n\t\t${Q}{\n\t\t\tscrollbar-color: ${v} #f1f1f1;\n\t\t}\n\t\t${X}{\n\t\t\t${y(x)}\n\t\t}\n\t\t${Y}{\n\t\t\t${y(k)}\n\t\t}\n\t\t${Z}{\n\t\t\t${$("width",h?.width.desktop)}\n\t\t\t${$("height",h?.height.desktop)}\n\t\t}\n\n\t\t${nt} h4{\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${nt} .vertical-des{\n\t\t\tcolor: ${j};\n\t\t}\n\t\t${et} h4{\n\t\t\tcolor: ${T};\n\t\t}\n\t\t${et} .vertical-des{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${tt}{\n\t\t\tcolor: ${S};\n\t\t\t${y(C)}\n\t\t}\n\t\t${rt}{\n\t\t\t${y(x)}\n\t\t}\n\t\t${ot}{\n\t\t\t${y(k)}\n\t\t}\n\t\t${ot}{\n\t\t\t${$("width",h?.width.desktop)}\n\t\t\t${$("height",h?.height.desktop)}\n\t\t}\n\t\t${lt} .grid-title{\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${lt} .grid-des{\n\t\t\tcolor: ${j};\n\t\t}\n\t\t${at} .grid-title{\n\t\t\tcolor: ${T};\n\t\t}\n\t\t${at} .grid-des{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${st}{\n\t\t\tcolor: ${S};\n\t\t\t${y(C)}\n\t\t}\n\n\t\t${p}{\n\t\t\t${ot}{\n\t\t\t\t${$("width",h?.width.tablet)}\n\t\t\t\t${$("height",h?.height.tablet)}\n\t\t\t}\n\t\t\t${Z}{\n\t\t\t\t${$("width",h?.width.tablet)}\n\t\t\t\t${$("height",h?.height.tablet)}\n\t\t\t}\n\t\t\t${B}{\n\t\t\t\t${$("width",h?.width.tablet)}\n\t\t\t\t${$("height",h?.height.tablet)}\n\t\t\t}\n\t\t\t${z}{\n\t\t\t\t${$("width",s?.width.tablet)}\n\t\t\t}\n\t\t}\n\t${m}{\n\t\t\t${ot}{\n\t\t\t\t${$("width",h?.width.mobile)}\n\t\t\t\t${$("height",h?.height.mobile)}\n\t\t\t}\n\t\t\t${Z}{\n\t\t\t\t${$("width",h?.width.mobile)}\n\t\t\t\t${$("height",h?.height.mobile)}\n\t\t\t}\n\t\t\t${B}{\n\t\t\t\t${$("width",h?.width.mobile)}\n\t\t\t\t${$("height",h?.height.mobile)}\n\t\t\t}\n\t\t\t${z}{\n\t\t\t\t${$("width",s?.width.mobile)}\n\t\t\t}\n\t\t}\n\t`}})},x=window.wp.i18n,w=((0,x.__)("General","svp"),(0,x.__)("Style","svp"),(0,x.__)("Caption","svp"),(0,x.__)("Quality","svp"),"plyr-share-modal"),j=t=>{if(!t||"string"!=typeof t)return"";try{const e=new URL(t,window.location.href);return"http:"===e.protocol||"https:"===e.protocol?e.href:""}catch(t){return""}},k=(t,e={},n="")=>{const i=document.createElement(t);return Object.keys(e).forEach((t=>{i[t]=e[t]})),n&&(i.style.cssText=n),i},T=[{label:"WhatsApp",bg:"#25D366",url:(t,e)=>
1`https://api.whatsapp.com/send?text=${encodeURIComponent(`${e} ${t}`.trim())}`},{label:"Twitter",bg:"#1DA1F2",url:(t,e)=>`https://twitter.com/intent/tweet?text=${encodeURIComponent(e)}&url=${encodeURIComponent(t)}`},{label:"Facebook",bg:"#1877F2",url:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`}],_=({attributes:t})=>{const{options:o,videos:s,captionstyles:a={},captionTypo:l={}}=t,{controls:c,autoPlay:d,clickToPlay:u,volume:p,repeat:m,muted:h,seekTime:v,toolTip:$}=o,y=(0,e.useRef)(null),f=(0,e.useRef)(),g=s?.[0]||{},b=g?.src||"",_=Object.keys(c).filter((t=>c[t])),S=g?.captions?.findIndex((t=>t.default)),C=(t=>{if(!t)return`v${Math.random().toString(36).slice(2,8)}`;try{return"v"+btoa(t).replace(/=*$/,"").slice(0,12)}catch(e){return"v"+encodeURIComponent(t).slice(0,12)}})(b),N=`svp-${C}`;return(0,e.useEffect)((()=>{y.current&&i(y.current,a,l)}),[a,l]),(0,e.useEffect)((()=>{if(!window.Plyr||!y.current)return;const t=y.current.querySelector("video");if(!t)return;f.current&&f.current.destroy();const e=window.SVP_DATA?.iconUrl||"https://cdn.plyr.io/3.7.8/plyr.svg",i=new window.Plyr(t,{controls:_,clickToPlay:u,volume:h?0:p,loop:{active:m},captions:{active:!0,update:!0},tooltips:{controls:$},seekTime:v||10,iconUrl:e});f.current=i,i.muted=h,i.once("ready",(()=>{if(d&&h){const t=i.play();void 0!==t&&t.catch((()=>{}))}}));let r=n(b);if("m3u8"===r&&window.Hls?.isSupported()){const e=new Hls;e.loadSource(b),e.attachMedia(t),i.on("languagechange",(()=>{setTimeout((()=>e.subtitleTrack=i.currentTrack),50)}))}return"mpd"===r&&window.dashjs&&window.dashjs.MediaPlayer().create().initialize(t,b,!0),()=>{f.current&&(f.current.destroy(),f.current=null)}}),[b,c,d,m,$,v,u,p,h]),(0,e.useEffect)((()=>{const t=f.current;if(!t)return;const e=t.elements?.controls;if(!e)return;const n=setTimeout((()=>{const t=e.querySelector(".plyr__control--share");if(t&&t.remove(),!c.share)return;const n=document.createElement("button");n.type="button",n.className="plyr__control plyr__control--share",n.setAttribute("aria-label","Share"),n.innerHTML='<svg fill="#000000" xmlns="http://www.w3.org/2000/svg"\nwidth="800px" height="800px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">\n<path d="M40.9,32c-2.6,0-4.9,1.1-6.5,2.8l-14.6-7.3c0.1-0.5,0.1-1,0.1-1.6c0-0.5-0.1-1.1-0.1-1.6l14.6-7.3\n c1.6,1.8,4,2.9,6.6,2.9c5,0,9-4,9-9s-4-9-9-9s-9,4-9,9c0,0.2,0,0.4,0,0.6l-15.1,7.6c-1.7-1.3-3.7-2.1-6-2.1c-5,0-9,4-9,9s4,9,9,9\n c2.3,0,4.3-0.8,5.9-2.2l15.1,7.5c0,0.2,0,0.4,0,0.7c0,5,4,9,9,9s9-4,9-9S45.9,32,40.9,32z"/>\n</svg>',e.appendChild(n),n.addEventListener("click",(t=>{t.stopPropagation(),(({url:t="",title:e="",shareId:n=null})=>{const i=document.getElementById(w);i&&i.remove();const r=j(window.location.href.split("#")[0])||window.location.origin,o=n?`${r}#sv=${encodeURIComponent(n)}`:j(t)||r,s="string"==typeof e?e:"",a=document.activeElement,l=k("div",{id:w},"\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tz-index: 999999;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tbackground: rgba(0,0,0,0.55);\n\t"),c=k("div",{tabIndex:-1},"\n\t\tposition: relative;\n\t\tmax-width: 420px;\n\t\twidth: 90%;\n\t\tbackground: #fff;\n\t\tpadding: 18px;\n\t\tborder-radius: 10px;\n\t\tbox-shadow: 0 8px 32px rgba(0,0,0,0.3);\n\t");c.setAttribute("role","dialog"),c.setAttribute("aria-modal","true"),c.setAttribute("aria-label",(0,x.__)("Share this video","svp"));const d=k("button",{type:"button",id:"plyr-share-close",textContent:"Ã"},"\n\t\tposition: absolute;\n\t\ttop: 10px;\n\t\tright: 10px;\n\t\tbackground: transparent;\n\t\tborder: none;\n\t\tfont-size: 27px;\n\t\tfont-weight: bold;\n\t\tline-height: 1;\n\t\tcursor: pointer;\n\t\tcolor: #333;\n\t");d.setAttribute("aria-label",(0,x.__)("Close","svp"));const u=k("h3",{textContent:(0,x.__)("Share","svp")},"margin:0 0 8px;font-size:17px;font-weight:600;"),p=k("p",{textContent:(0,x.__)("Share this video","svp")},"margin:0 0 12px;font-size:14px;color:#444;"),m=k("div",{},"display:flex;gap:10px;flex-wrap:wrap;margin-bottom:15px;");T.forEach((t=>{const e=k("a",{href:t.url(o,s),target:"_blank",rel:"noopener noreferrer",textContent:t.label},`padding:8px 12px;color:#fff;border-radius:6px;text-decoration:none;display:inline-block;background:${t.bg};`);m.appendChild(e)}));const h=k("div",{}
1,"display:flex;gap:8px;margin-bottom:12px;"),v=k("input",{type:"text",id:"plyr-share-url",readOnly:!0},"flex:1;padding:8px;border:1px solid #ccc;border-radius:5px;font-size:14px;");v.value=o,v.setAttribute("aria-label",(0,x.__)("Video link","svp"));const $=k("button",{type:"button",id:"plyr-share-copy",textContent:(0,x.__)("Copy","svp")},"padding:8px 12px;background:#333;color:#fff;border-radius:5px;border:none;cursor:pointer;");h.appendChild(v),h.appendChild($),c.appendChild(d),c.appendChild(u),c.appendChild(p),c.appendChild(m),c.appendChild(h),l.appendChild(c);const y=[d,...m.children,v,$],f=()=>{document.removeEventListener("keydown",g,!0),l.remove(),a&&"function"==typeof a.focus&&a.focus()};function g(t){if("Escape"===t.key)return t.stopPropagation(),void f();if("Tab"!==t.key)return;const e=y[0],n=y[y.length-1];t.shiftKey&&document.activeElement===e?(t.preventDefault(),n.focus()):t.shiftKey||document.activeElement!==n||(t.preventDefault(),e.focus())}let b=null;const _=()=>{$.textContent=(0,x.__)("Copied!","svp"),clearTimeout(b),b=setTimeout((()=>{$.textContent=(0,x.__)("Copy","svp")}),2e3)};$.addEventListener("click",(async()=>{try{await navigator.clipboard.writeText(o),_()}catch(t){v.select(),document.execCommand("copy"),_()}})),d.addEventListener("click",f),l.addEventListener("click",(t=>{t.target===l&&f()})),document.addEventListener("keydown",g,!0),document.body.appendChild(l),d.focus()})({shareId:C,title:g.title||document.title,description:g.description||""})}))}),0);return()=>clearTimeout(n)}),[c,b]),(0,e.useEffect)((()=>{function t(){const t=window.location.hash||"";let e=null;if(t.startsWith("#sv=")?e=decodeURIComponent(t.replace("#sv=","")):t.startsWith("#")&&(e=decodeURIComponent(t.replace("#",""))),e&&e===C){const t=document.getElementById(N);t&&setTimeout((()=>{t.scrollIntoView({behavior:"smooth",block:"center"});try{f.current?.play()}catch(t){}}),150)}}return t(),window.addEventListener("hashchange",t),()=>window.removeEventListener("hashchange",t)}),[C,N]),(0,r.jsx)("div",{id:N,className:"svpVideoPlayer",ref:y,children:(0,r.jsxs)("video",{id:"superVideo",controls:!0,playsInline:!0,crossOrigin:"anonymous","data-poster":g.poster,muted:h,autoPlay:d&&h,children:[g?.qualities?.length>0?g.qualities.map(((t,e)=>(0,r.jsx)("source",{src:t.source,size:t.size,type:"video/mp4"},e))):(0,r.jsx)("source",{src:b,type:"video/mp4"}),g?.captions?.length>0&&g.captions.map(((t,e)=>(0,r.jsx)("track",{kind:"captions",srcLang:t.srclang,label:t.label,src:t.source,default:S===e},e)))]})})},S=()=>(0,r.jsxs)("div",{className:"svp-premium-notice",children:[(0,r.jsxs)("div",{className:"svp-premium-notice__content",children:[(0,r.jsx)("span",{className:"svp-premium-badge",children:"Premium"}),(0,r.jsxs)("div",{className:"svp-premium-text",children:[(0,r.jsx)("strong",{children:"Premium Theme Locked"}),(0,r.jsx)("p",{children:"This predefined layout is available in the Pro version. Upgrade to unlock this beautiful design."})]})]}),(0,r.jsx)("a",{href:"https://bplugins.com/products/super-video-player/pricing/",target:"_blank",rel:"noopener noreferrer",className:"svp-premium-btn",children:"Upgrade to Pro ð"})]});document.addEventListener("DOMContentLoaded",(()=>{var e;const n=document.querySelectorAll(".wp-block-svp-video-player"),i=null!==(e=window.SVP_DATA?.isPremium)&&void 0!==e&&e;n.forEach((e=>{const n=JSON.parse(e.dataset.attributes),{playlist:o,themes:s={}}=n,{theme:a}=s,l=!i&&["vertical","grid"].includes(a);(0,t.createRoot)(e).render((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{attributes:n,id:e.id}),l?(0,r.jsx)(S,{}):o?(0,r.jsx)(d,{attributes:n}):(0,r.jsx)(_,{attributes:n})]})),e?.removeAttribute("data-attributes")}))}))})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.