@flowplayer/player 3.7.0 → 3.7.1-rc.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/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +3 -3
- package/package.json +1 -1
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/health.js +1 -1
- package/plugins/hls.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/subtitles.js +1 -1
package/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=t()}(this,(function(){"use strict";const e=[],t=[];function n(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),o=/Android/.test(t)&&!/Firefox/.test(t),r=/^((?!chrome|android).)*safari/i.test(t),i=/SamsungBrowser/.test(t),a=i&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:o,iphone:n,safari:r,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:i,samsung_tv:i&&a,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="click",r="touchend",i="loadedmetadata",a="loadeddata",s="recover",l="reap",c="retry";var u=Object.freeze({__proto__:null,MOUNT:"mount",ERROR:"error",CONTEXT_MENU:"contextmenu",CLICK:o,DBL_CLICK:"dblclick",KEYUP:"keyup",KEYDOWN:"keydown",LOAD:"load",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:r,TOUCH_CANCEL:"touchcancel",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_ENTER:"fullscreenenter",FULLSCREEN_EXIT:"fullscreenexit",FULLSCREEN_CHANGE:"fullscreenchange",WEBKIT_NEEDKEY:"webkitneedkey",METADATA:i,DATA:a,PROGRESS:"progress",TIME_UPDATE:"timeupdate",LOAD_START:"loadstart",VOLUME_CHANGE:"volumechange",PAUSE:"pause",PLAYING:"playing",PLAY:"play",WAITING:"waiting",CAN_PLAY:"canplay",ENDED:"ended",SEEKED:"seeked",SEEKING:"seeking",DURATION_CHANGE:"durationchange",BEFORE_PLAY:"beforeplay",BEFORE_PAUSE:"beforepause",STATE:"state",CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",VIEW_ENTER:"viewenter",VIEW_LEAVE:"viewleave",SOURCE:"src",RECOVER:s,REAP:l,CONFIG:"config",QUALITIES:"qualities",SET_QUALITY:"quality:set",NON_RECOVERABLE_ERROR:"error:fatal",RECOMMENDATIONS_READY:"recommendationsready",AUDIO_ONLY_SOURCE:"audioonlysource",LANDSCAPE:"landscape",PORTRAIT:"portrait",RENDER_PLUGIN:"renderplugin",DVR:"dvr",LIVE:"live",SEEK_QUEUED:"seek:queued",SEEK_CANCEL:"seek:cancel",PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:"remotesession:ended",INTERSECTIONCHANGE:"intersectionchange",RETRY:c});var d=Object.freeze({__proto__:null,SUBTITLES_MENU:"flowplayer-subtitles-menu",SHARE_MENU:"flowplayer-share-menu",SPEED_MENU:"flowplayer-speed-menu",QUALITY_MENU:"flowplayer-quality-menu",AUDIO_MENU:"flowplayer-audio-menu",UI:"flowplayer-ui",LOGO:"flowplayer-logo",CONTROL:"flowplayer-control",CONTROL_BUTTONS:"flowplayer-control-buttons",LIVE_STATUS:"flowplayer-live-status",ELAPSED:"flowplayer-elapsed-time",TIMELINE:"flowplayer-timeline-bar",CONTROL_DURATION:"flowplayer-control-duration",VOLUME_CONTROL:"flowplayer-volume-control",VOLUME_BAR:"flowplayer-volume-bar",HEADER:"flowplayer-header",HEADER_LEFT_ZONE:"flowplayer-header-left-zone",HEADER_RIGHT_ZONE:"flowplayer-header-right-zone",HEADER_DURATION:"flowplayer-header-duration",MIDDLE:"flowplayer-middle",MIDDLE_ZONE:"flowplayer-middle-zone",WAIT:"flowplayer-wait",MIDDLE_BUTTONS:"flowplayer-middle-buttons",MIDDLE_LEFT_ZONE:"flowplayer-middle-left-zone",MIDDLE_RIGHT_ZONE:"flowplayer-middle-right-zone",ENDSCREEN_INTERSTITIAL:"flowplayer-endscreen-interstitial",ENDSCREEN_UP_NEXT:"flowplayer-endscreen-up-next",ENDSCREEN_GRID:"flowplayer-endscreen-grid",PLAYLIST_INTERSTITIAL:"flowplayer-playlist-interstitial",AIRPLAY_ICON:"flowplayer-airplay-icon",CHROMECAST_ICON:"flowplayer-chromecast-icon",SMALL_PLAY_ICON:"flowplayer-small-play-icon",SMALL_PAUSE_ICON:"flowplayer-small-pause-icon",PLAY_ICON:"flowplayer-play-icon",PAUSE_ICON:"flowplayer-pause-icon",FULLSCREEN_ENTER_ICON:"flowplayer-fullscreen-enter-icon",FULLSCREEN_EXIT_ICON:"flowplayer-fullscreen-exit-icon",SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:"flowplayer-fast-forward-icon",REWIND_ICON:"flowplayer-rewind-icon",SHARE_ICON:"flowplayer-share-icon",VOLUME_ICON:"flowplayer-volume-icon",MUTE_ICON:"flowplayer-mute-icon",UNMUTE_ICON:"flowplayer-unmute-icon",CLOSE_ICON:"flowplayer-close-icon",FACEBOOK_ICON:"flowplayer-facebook-icon",TWITTER_ICON:"flowplayer-twitter-icon",LINK_ICON:"flowplayer-link-icon",EMBED_ICON:"flowplayer-embed-icon",LIVE_COUNTDOWN:"flowplayer-live-countdown",PLAYLIST_CONTROLS:"flowplayer-playlist-controls",THUMBNAILS_CAROUSEL:"flowplayer-thumbnails-carousel",ERROR_COMPONENT:"flowplayer-error",TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue"});const p="is-playing",f="is-paused",y="is-loaded",m="is-loading",E="is-starting",g="is-seeking",h="is-ended",w="is-waiting",v="is-live-seeked",S="no-timeline",O="will-play",_="will-pause",I="is-in-viewport";var N=Object.freeze({__proto__:null,PLAYING:p,FULLSCREEN:"is-fullscreen",PAUSED:f,MUTED:"is-muted",LOADED:y,LOADING:m,STARTING:E,SEEKING:g,GRABBING:"is-grabbing",DISABLED:"is-disabled",SMALL:"is-small",TINY:"is-tiny",RTL:"is-rtl",TV:"is-tv",ENDED:h,LIVE:"is-live",ERRORED:"is-error",WAITING:w,AUTOPLAY:"is-autoplay",NO_AUTOPLAY:"no-autoplay",SEAMLESS:"is-seamless",TOGGLING:"is-toggling",LIVE_SEEKED:v,NO_DVR:S,HAS_POSTER:"has-poster",WILL_PLAY:O,WILL_PAUSE:_,MENU_OPENED:"has-menu-opened",TOUCHED:"is-touched",HOVERED:"is-hovered",TOUCH_DEVICE:"is-touch-device",WILL_SEEK:"will-seek",SEEKABLE:"is-seekable",IN_VIEWPORT:I,NO_CONTROLS:"no-controls",DESTROYED:"is-destroyed",IS_SOURCE_PROCESSING:"is-source-processing"});function T(e){this.message=e}T.prototype=new Error,T.prototype.name="InvalidCharacterError";var A="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new T("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,a="";o=t.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)?a+=String.fromCharCode(255&n>>(-2*r&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};var L=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(A(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return A(t)}};function b(e){this.message=e}b.prototype=new Error,b.prototype.name="InvalidTokenError";var R=function(e,t){if("string"!=typeof e)throw new b("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(L(e.split(".")[n]))}catch(e){throw new b("Invalid token specified: "+e.message)}};R.InvalidTokenError=b;const C=new Map,D=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e);var U,k;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(U||(U={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(k||(k={}));function P(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(_)||e.paused),function(e,t,n){const o=e.poll(t?"beforeplay":"beforepause",{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(O)?(e.setState(_,!0),e.setState(O,!1),Promise.resolve()):Promise.resolve(e.pause());if(0==e.reaper)return Promise.resolve();const r=e.reaper.get("__pending_play");return e.paused||r?r?(r.src!==x(e.original_src)&&M(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==x(e.original_src)}(e)&&M(e),(e=>e.autoplay&&k.AUDIO_REQUIRED&e.autoplay)(t)?function(e){e.muted=!1,0==e.volume&&(e.volume=1);return e.play().catch(e=>{console.warn("[flowplayer/play] autoplay audio required\n%s",e.message)})}(e):e.play().then(()=>{e.hasState(_)&&e.togglePlay(!1)}).catch(t=>(console.warn("[flowplayer/play] attempting muted autoplay\n%s",t.message),e.muted=!0,e.volume=0,e.play()))):(e.setState(_,!1),!e.hasState(p)&&e.setState(O,!0),Promise.resolve())}function M(e){e.currentSrc.match(/^blob:/)||e.load()}function x(e){const t=document.createElement("a");return t.href=e,t.href}function W(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function V(e){const t=document.createElement("a");t.href=e;const n=t.pathname&&t.pathname.split(".");return n.length>1&&n[n.length-1]}function G(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const H=e=>{var{src:t}=e,n=W(e,["src"]);return[Object.assign({src:t,type:t?G("video/"+V(t)):""},n)]};function j(e){return H({src:e})}function Y(e){var{src:t,type:n}=e,o=W(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:H(Object.assign({src:t},o))}var F;function K(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?j(e):Array.isArray(e)||"object"!=typeof e?e.reduce((function(e,t){return"string"==typeof t&&(t=j(t)),"object"!=typeof t||Array.isArray(t)||(t=Y(t)),e.concat(t)}),[]):Y(e)}(n);return function(e){[g,_,O,p,f,m,y,v].forEach(t=>e.setState(t,!1)),e.setState(E,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(F.Ok==function(e,t,n){e.emit("src",n),"string"==typeof n.src&&(e.original_src=n.src);const o=function(e,t,n){return e.plugins.filter(e=>{return(t=e)&&"wants"in t;var t}).find(e=>e.wants(n.src||"",n,t))}(e,t,n);return e.setOpts({is_native:!o}),o?(o.onload(t,e.root,e,n),F.Ok):F.Err}(e,t,i)||F.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit("audioonlysource");t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return F.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return F.Err;"string"==typeof n.src&&(e.preload=t.autoplay?"auto":null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src,t.autoplay&&o.safari&&e.load(),"none"!==e.preload&&e.setState(m,!0));return F.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),function(e,t){!function(e,t){if(!e.currentSrc)return;if("none"==e.opt("preload"))return;if(t.autoplay&&t.autoplay>0)return;e.load()}(e,t)}(e,t),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(F||(F={}));const B=[l,"seeking","src","seek:cancel"];var z;function q(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?Z(e,t):(t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){0!=e.reaper&&(e.currentTime=function(e,t,n=0){return Math.max(Math.min(t,e),n)}(e.currentTime+t.offset,e.duration),t.timer=0,Z(e,t))}),1e3),function(e,t){e.setState("will-seek",!0),e.setState(z.BACKWARD,t.offset<0),e.setState(z.FORWARD,t.offset>0)}(e,t),e.emit("seek:queued",t),t))}function Z(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(z.FORWARD,!1),e.setState(z.BACKWARD,!1),e.setState("will-seek",!1)}(e)}function Q(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function X(e,t,n){const o=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;o.length;){if(null==e)return n;const t=o.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(z||(z={}));const $=[1e7]+""+-1e3+-4e3+-8e3+-1e11,J=()=>"undefined"==typeof crypto?"":$.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16));let ee="";!function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();const te=["touchstart","touchmove"];function ne(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function oe(e,t,n){const o=ne(t,n);return e.dispatchEvent(o),e}function re(e,t,n){const o=ne(t,n);return e.dispatchEvent(o),o}function ie(e,t,n,o){Array.isArray(t)?t.forEach(t=>ae(e,t,n,o)):ae(e,t,n,o)}function ae(e,t,n,o){if(r=t,!~te.indexOf(r))return e.addEventListener(t,n,o),e;var r;const i=Object.assign(o||{},{passive:!0});return e.addEventListener(t,n,i),e}function se(e,t,n,o){return ie(e,t,n,Object.assign(o||{},{once:!0}))}class PlayerStorage{constructor(e,t){this.implementation=e,t&&t.keys().forEach(e=>{"string"==typeof t.implementation[e]&&this.implementation.setItem(e,t.implementation[e])})}keys(){var e;const t=[];for(var n=0;n<this.implementation.length;n++)(null===(e=this.implementation.key(n))||void 0===e?void 0:e.startsWith("flowplayer/"))&&t.push(this.implementation.key(n));return t}removeItem(e){try{this.implementation.removeItem("flowplayer/"+e)}catch(e){}}getItem(e){try{return this.implementation.getItem("flowplayer/"+e)}catch(e){return null}}setItem(e,t){try{this.implementation.setItem("flowplayer/"+e,t)}catch(e){}}clear(){try{this.keys().forEach(e=>this.implementation.removeItem(e))}catch(e){}}get length(){try{return this.keys().length}catch(e){return 0}}key(e){try{return this.implementation.key(e)}catch(e){return null}}}class InMemoryStorage{constructor(){this.pairs=[]}get length(){return this.pairs.length}clear(){this.pairs=[]}getItem(e){var t;return(null===(t=this.pairs.find(t=>t[0]===e))||void 0===t?void 0:t[1])||null}key(e){return this.pairs[e][0]||null}removeItem(e){this.pairs=this.pairs.filter(t=>t[0]!==e)}setItem(e,t){this.removeItem(e),this.pairs.push([e,t])}}const le={preload:"none",rtl:!1,controls:!0},ce=["loop","muted","preload"];function ue(e,o,r){let i;r.live_state={dvr_window:void 0,get dvr(){return i},set dvr(t){i=t;const n=!(!e.live||t);r.hasState(S)!=n&&r.setState(S,n)}},r._storage=new PlayerStorage(["localStorage","sessionStorage"].map(e=>{try{const t=window[e];return t.getItem(""),t}catch(t){return console.debug(`Access to window.${e} denied, trying next option`),null}}).find(e=>!!e)||new InMemoryStorage),r.toJSON=function(){return{duration:r.duration,volume:r.volume,currentTime:r.currentTime,states:r.root.className}},r.setSrc=function(t){return K(r,e,t,n())},r.playerState=r.playerState||{},r.setState=function(e,t){if(r.playerState[e]===!!t)return r;const n=Object.assign({},r.playerState,{[e]:t});return r.playerState=n,oe(r,"state",r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>D(this,e[n]))},r.hasState=function(e){return!!r.playerState[e]},r.transitionState=function(e,t,n){!r.hasState(e)&&r.hasState(t)||(n=0),n&&r.setState("is-toggling",!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout((function(){r.setState("is-toggling",!1)}),n)},r.emit=(e,t)=>(oe(r,e,t),r),r.on=(e,t)=>(ie(r,e,t),r),r.once=(e,t)=>(se(r,e,t),r),r.off=(e,t)=>{var n,o;return n=e,o=t,r.removeEventListener(n,o),r},r.poll=(e,t)=>re(r,e,t),r.togglePlay=function(t){return P(r,e,t)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),oe(r,"volumechange")},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState("is-disabled",e),r.disabled=e},r.destroy=function(){r.pause();const e=t.indexOf(r);~e&&t.splice(e,1),setTimeout((function(){r.setSrc([]),r.reaper&&r.reaper.clear(),oe(r,l),r.setState("is-destroyed",!0)}),0)},r.setAttrs=function(e){return ce.forEach(t=>{if(!(t in e))return;const n=e[t];n?r.setAttribute(t,n.toString()):r.removeAttribute(t)}),r},r.opt=function(t,n){return n=void 0===n?X(le,t):n,X(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?function e(t,n,o,r){return(r=r||0)>=t.length?o:X(t[r],n,e(t,n,o,r+1))}(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState("is-live")&&(r.setState(S,!0),oe(r,"live")),"disabled"in t&&void 0!==t.disabled&&r.toggleDisable(t.disabled),"muted"in t&&void 0!==t.muted&&r.toggleMute(t.muted),"dvr"in e&&(r.live_state.dvr=r.opt("dvr"));const n=!!e.autoplay&&!r.hasState("no-autoplay");r.setState("is-autoplay",n),r.setState("is-rtl",r.opt("rtl",function(e){if(!e)return Q();const t=e.getAttribute("dir");return t?"rtl"==t:Q()}(o))),r.setState("is-live",!!e.live),r.setState("has-poster","string"==typeof e.poster&&e.poster.length>0),r.setState("is-seekable",!!e.seekable),r.setState("no-controls",0==e.controls),o.style.backgroundImage=r.hasState("has-poster")?"url('"+e.poster+"')":"",oe(r,"config",e)},r.renderPlugin=function(e){re(r,"renderplugin",e).defaultPrevented||r.root.appendChild(e)};const a={offset:0,timer:0};var s,c;c=a,(s=r).on(B,(function(){Z(s,c)})),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return q(r,a,e)},r.deviceId=function(){return function(e){if(ee)return ee;try{const t=e.getItem("flowplayer/uuid");if(t)return t;const n=J();return e.setItem("flowplayer/uuid",n),n}catch(e){return ee=J()}}(r._storage)}}function de(e,t){const n=t.querySelector("video"),o=n||(e._video_element_callback?e._video_element_callback(e):document.createElement("video"));return o.classList.add("fp-engine"),o.playsInline=!0,n||t.append(o),o}var pe="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};const fe=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function ye(e,t){return!!~fe.indexOf(e)||e.indexOf(t)===e.length-t.length}ye.check_whitelist=function(e){return!!~fe.indexOf(e)};const me="production";function Ee(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=R(e),n.valid_jwt=!0}catch(e){}return n.raw=e,n.data=JSON.parse(o.c),n.exp=o.exp,t.require_valid_token&&Ee.validate(n),n}function ge(e){try{return Ee.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}var he;function we(e){return{grant:e,is_granted:t=>(e&t)===t}}function ve({root:e,video:t,data:n}){t&&t.destroy(),console.error(new Error(n.details||n.reason)),e.innerHTML="",e.classList.remove("flowplayer"),e.classList.add("flowplayer-fatal"),e.style.removeProperty("background-image");const o=document.createElement("h2");o.textContent="Playback Error";const r=document.createElement("p");r.textContent="Are you the site owner?";const i=document.createElement("a");i.classList.add("troubleshoot"),i.target="_blank",i.href="https://docs.flowplayer.com/troubleshooting/player#"+n.reason,i.textContent="Troubleshoot?";const a=document.createElement("img");a.src="https://flowplayer.com/user/pages/images/logo-white.png",e.append(o,r,i,a)}Ee.validate=function(e){if("string"==typeof e&&(e=Ee(e)),!e||!e.raw){if(ye.check_whitelist(window.location.hostname)||"dev"===me.toString())return!0;throw new Error("No token provided in configuration")}if(!e.valid_jwt)throw new Error("Invalid token provided");const t=window.location.hostname,n=ye.bind(null,t);if("dev"!==me.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==me.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},Ee.id=function(e){if(e)return"string"==typeof e&&(e=Ee(e)),e.data.id},function(e){e[e.ADS=2]="ADS",e[e.ANALYTICS=4]="ANALYTICS",e[e.NO_METERING=8]="NO_METERING",e[e.DEVELOPER_PLAN=16]="DEVELOPER_PLAN",e[e.WOWZA_VIDEO=32]="WOWZA_VIDEO"}(he||(he={})),we.of=we,we.from_token=function(e){const t=Ee(e,{require_valid_token:!0});return we.of(t.data.acl)},we.permissions=he;function Se(e,t){const n=t.clientWidth;t.classList.toggle("is-small",n<600),t.classList.toggle("is-tiny",n<400)}function Oe(e,t,o){let r=!0;t.classList.add("flowplayer"),Se(0,t),ie(o,["loadstart","resize"],(function(){Se(0,t)})),ie(o,"state",(function(){Object.entries(o.playerState).forEach((function([e,n]){t.classList.toggle(e,n)}))})),ie(o,"timeupdate",(function(){o.setState(w,!o.hasState("is-casting")&&!o.hasState(E)&&o.readyState<3)})),ie(o,"ended",(function(t){setTimeout((function(){if(!t.defaultPrevented){if(e.rewind&&!o.loop){const t=o.src;e.autoplay&&(e.autoplay=0,o.setState("is-autoplay",!1)),o.setState(g,!0),se(o,"seeked",(function(){t===o.src&&(o.setState(g,!1),o.pause(),o.setState(E,!0))})),o.currentTime=0}se(o,"timeupdate",(function(){o.setState(h,!1)})),o.transitionState(h,p,e.loop||e.rewind?0:300)}}),0)})),ie(o,["seeking","seeked"],(function(e){o.setState(g,"seeking"==e.type)})),ie(o,"remotesession:ended",(function(e){setTimeout(()=>o.currentTime=e.detail.currentTime,0)})),ie(o,"ended",(function(){o.setState(p,!1),r=!0})),ie(o,"progress",()=>{if(!o.opts.live||!o.opts.is_native)return;const e=o.seekable;0!=e.length&&o.emit("dvr/window",e.end(e.length-1)-e.start(0))}),ie(o,n().ios?i:a,(function(){var e,t;o.setState(y,!0),o.setState(m,!1);const n=o;0===(null===(e=n.videoTracks)||void 0===e?void 0:e.length)&&(null===(t=n.audioTracks)||void 0===t?void 0:t.length)>0&&o.emit("audioonlysource")})),ie(o,"play",()=>{o.setState(O,!0)}),ie(o,["waiting","canplay","loadstart"],(function(t){if(!o.hasState(g)&&("canplay"!=t.type||e.autoplay||o.setState(w,!1),"loadstart"!=t.type||"none"!=o.opt("preload")||e.autoplay)){if("loadstart"==t.type&&e.autoplay)return se(o,"playing",(function(){o.setState(w,!1)}));"waiting"!=t.type||o.hasState(y)||o.setState(m,!0),o.setState(h,!1),o.setState(w,"waiting"==t.type)}})),ie(o,["playing","pause"],(function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:o});document.dispatchEvent(e)},0);const n="playing"==t.type,i=o.currentTime==o.duration,a=n&&r&&e.autoplay||o.hasState(w);if(n&&(o.started=!0,r=!1),o.setState(w,!1).setState(E,!1).setState(O,!1),!n&&o.setState(_,!1),i)return;const s=n?p:f,l=n?f:p;o.transitionState(s,l,a?0:300),n&&o.setState("no-autoplay",!1)}))}const _e=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function Ie(e,t,n){if(!window.IntersectionObserver)return;const i={should_resume:!!e.autoplay,has_user_gesture:!1,locked:!1};[r,o].forEach(e=>se(n,e,()=>i.has_user_gesture=!0)),ie(n,"play",(function(){i.locked||(i.should_resume=!0)})),ie(n,"src",(function(){i.should_resume=!!e.autoplay})),ie(n,"pause",(function(){i.locked||(i.should_resume=!1)}));const a=()=>{setTimeout(()=>{n.setState(E,!0),n.setState("is-autoplay",!1)},100)};ie(n,"canplay",()=>{if(e.autoplay)return n.hasState(I)&&i.should_resume?n.togglePlay(!0).catch(a):void(e.autopause||n.hasState(I)||!i.should_resume||se(n,"viewenter",()=>{e.autoplay&&i.should_resume&&n.togglePlay(!0).catch(a)}))});const s=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(I);if(n.setState(I,t>=.2),n.emit("intersectionchange",{ratio:t}),o===n.hasState(I))return;const r=n.hasState(I)?"viewenter":"viewleave";n.emit(r)},0)})},{threshold:_e});s.observe(t),n.on(l,()=>s.disconnect()),ie(n,"viewenter",(function(){i.should_resume&&e.autopause&&!Ne()&&n.togglePlay(!0)})),ie(n,"viewleave",(function(){if(!e.autopause||Ne())return;const t=!n.paused;i.locked=!0,n.pause(),setTimeout((function(){i.should_resume=t,i.locked=!1}),0)}))}function Ne(){return t.find(e=>e.hasState("is-casting"))}function Te(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit("resize",n)});n.observe(e),t.on(l,()=>n.disconnect())}function Ae(e){if("number"==typeof e&&!isNaN(e))return Number(e);if("string"==typeof e){const t=e.split(":");return Number(t[1])/Number(t[0])}return e}function Le(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let s=Ae(e.ratio||.5625);r.style.paddingTop=100*s+"%";const l=[a,i];n.on(l,(function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})})),n.on("config",(function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=Ae((null==e?void 0:e.ratio)||t||.5625);s!==o&&(s=o,r.style.paddingTop=100*o+"%")}))}class ExplorerPlan{constructor(){this.cleanUp=this.cleanUp.bind(this),this.render=this.render.bind(this),this.wireUp=this.wireUp.bind(this)}init(e,t,n){this.root=t,this.player=n,this.wireUp()}wireUp(){var e,t;this.cleanUp(),null===(e=this.player)||void 0===e||e.once("playing",this.render),null===(t=this.player)||void 0===t||t.once("ended",this.wireUp)}cleanUp(){var e,t,n,o;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo),null===(n=this.player)||void 0===n||n.off("playing",this.render),null===(o=this.player)||void 0===o||o.off("ended",this.wireUp)}render(){var e,t,n;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo);const o=(null===(n=this.root)||void 0===n?void 0:n.querySelector(".fp-ui"))||this.root;if(!o)return;const r=this._logo=document.createElement("a");r.href="https://explorer.flowplayer.com",r.target="_blank",Object.entries(be).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}const be={display:"block",opacity:"1",visibility:"visible",width:"33%","padding-top":"9%",position:"absolute","z-index":"9999",bottom:"25%",left:"10%","background-size":"cover","background-image":"url(https://static.flowplayer.com/explorer/explorer.svg)"};function Re(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(l,()=>document.removeEventListener("flowplayer/playing",t)),document.addEventListener("flowplayer/playing",t)}function Ce(e,t){const n=[];e.addEventListener("contextmenu",o=>{const r=o.timeStamp;for(n.push(r);n.length>3;)n.shift();n.length>=3&&n.every(e=>e-r<3e3)&&(console.debug("flowplayer/debug rendering info"),function(e,t){var n;!function(e){const t=e.querySelector(".debug-info");null==t||t.remove()}(e);const o=document.createElement("div");o.classList.add("debug-info");const r=De("flowplayer.version","3.7.0");o.append(r);const i=null===(n=null==t?void 0:t.hls)||void 0===n?void 0:n.constructor;if(i&&i.version){const e=De("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const De=(e,t)=>{const n=document.createElement("div");n.classList.add("row",e);const o=document.createElement("span");o.classList.add("attr"),o.textContent=e;const r=document.createElement("span");return r.textContent=t,r.classList.add("value"),n.append(o,r),n};const Ue=function(e,t){const n=function(){try{return localStorage.getItem("flowplayer/debug")}catch(e){return""}}(),o=(o,...r)=>{try{const i=(null==t?void 0:t.debug)||n;i&&e.match(i)&&console.log(`flowplayer/${e} -- ${o}`,...r)}catch(e){console.warn(e)}};return o.log=o,o}("core/retry");function ke(e,t){const n={pending:void 0,count:0};var o;e.on("error",o=>{t.retry&&void 0===n.pending&&(++n.count,n.pending=function(e,t){return setTimeout(()=>{e.hasState("is-destroyed")||(t.pending=void 0,[s,c].forEach(t=>e.emit(t)),Ue("%s try",t.count))},3e3*t.count)}(e,n))}),e.on("playing",()=>{n.count=0}),e.on(["src",s],()=>{n.pending&&(clearTimeout(n.pending),n.pending=void 0)}),e.on(c,(o=t=>{t.defaultPrevented||e.load()},e=>{setTimeout((function(){if(!e.defaultPrevented)return o(e)}),0)}))}const Pe=function(){const e="undefined"!=typeof window?window:void 0!==pe?pe:{},t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function Me(n,o){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),Me;"string"==typeof o&&(o={src:o}),o||(o={}),o.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(o.token=window.__FLOWPLAYER_TOKEN);const r="string"==typeof n?document.querySelector(n):n;if(!r)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const a=r.querySelector("video.fp-engine");if(a)return a;const s=ge(o.token);if(!s.success)return ve({root:r,data:{reason:"token",details:s.message}});const c=new Map,u=de(o,r);u.reaper=c,u._customElements=C,Object.defineProperty(u,"token",{value:"string"==typeof o.token?Ee.id(o.token):"",writable:!1}),u.addEventListener(l,()=>{c.clear(),u.reaper=0,delete u.root}),u.root=r,o.token&&we.from_token(o.token).is_granted(we.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(u)&&t.push(u),ue(o,r,u),u.setAttrs(o),u.plugins=Me.extensions.map(e=>new e(Me,u)),Oe(o,r,u),Ie(o,r,u),Te(r,u),Le(o,r,u),Re(u),Ce(r,u),ke(u,o),u.plugins.forEach(e=>{try{e.init(o,r,u)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),u.setOpts(o),u.opts=o,o.src&&u.setSrc(o.src);const d=u.readyState;return d>0&&u.currentSrc&&u.emit(i),d>2&&u.currentSrc&&u.emit("canplay"),u.emit("mount"),u.on("error:fatal",(function(e){ve({root:r,video:u,data:e.data||{}})})),setTimeout(oe,0,document,"flowplayer:player:created",u),u}return Object.assign(Me,Pe),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=C,o.defaultElements=d,o.version="3.7.0",o.commit="150bcafafbf4daa73b89428e7b714a7329c6333a",o.instances=t,o.extensions=e,o.support=n,o.events=u,o.states=N,o.jwt=R,o.autoplay=k,o.quality=U}(Me),"object"==typeof document&&setTimeout(oe,0,document,"flowplayer:umd",Me),Me}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=t()}(this,(function(){"use strict";const e=[],t=[];function n(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),o=/Android/.test(t)&&!/Firefox/.test(t),r=/^((?!chrome|android).)*safari/i.test(t),i=/SamsungBrowser/.test(t),a=i&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:o,iphone:n,safari:r,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:i,samsung_tv:i&&a,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="click",r="touchend",i="loadedmetadata",a="loadeddata",s="recover",l="reap",c="retry";var u=Object.freeze({__proto__:null,MOUNT:"mount",ERROR:"error",CONTEXT_MENU:"contextmenu",CLICK:o,DBL_CLICK:"dblclick",KEYUP:"keyup",KEYDOWN:"keydown",LOAD:"load",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:r,TOUCH_CANCEL:"touchcancel",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_ENTER:"fullscreenenter",FULLSCREEN_EXIT:"fullscreenexit",FULLSCREEN_CHANGE:"fullscreenchange",WEBKIT_NEEDKEY:"webkitneedkey",METADATA:i,DATA:a,PROGRESS:"progress",TIME_UPDATE:"timeupdate",LOAD_START:"loadstart",VOLUME_CHANGE:"volumechange",PAUSE:"pause",PLAYING:"playing",PLAY:"play",WAITING:"waiting",CAN_PLAY:"canplay",ENDED:"ended",SEEKED:"seeked",SEEKING:"seeking",DURATION_CHANGE:"durationchange",BEFORE_PLAY:"beforeplay",BEFORE_PAUSE:"beforepause",STATE:"state",CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",VIEW_ENTER:"viewenter",VIEW_LEAVE:"viewleave",SOURCE:"src",RECOVER:s,REAP:l,CONFIG:"config",QUALITIES:"qualities",SET_QUALITY:"quality:set",NON_RECOVERABLE_ERROR:"error:fatal",RECOMMENDATIONS_READY:"recommendationsready",AUDIO_ONLY_SOURCE:"audioonlysource",LANDSCAPE:"landscape",PORTRAIT:"portrait",RENDER_PLUGIN:"renderplugin",DVR:"dvr",LIVE:"live",SEEK_QUEUED:"seek:queued",SEEK_CANCEL:"seek:cancel",PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:"remotesession:ended",INTERSECTIONCHANGE:"intersectionchange",RETRY:c});var d=Object.freeze({__proto__:null,SUBTITLES_MENU:"flowplayer-subtitles-menu",SHARE_MENU:"flowplayer-share-menu",SPEED_MENU:"flowplayer-speed-menu",QUALITY_MENU:"flowplayer-quality-menu",AUDIO_MENU:"flowplayer-audio-menu",UI:"flowplayer-ui",LOGO:"flowplayer-logo",CONTROL:"flowplayer-control",CONTROL_BUTTONS:"flowplayer-control-buttons",LIVE_STATUS:"flowplayer-live-status",ELAPSED:"flowplayer-elapsed-time",TIMELINE:"flowplayer-timeline-bar",CONTROL_DURATION:"flowplayer-control-duration",VOLUME_CONTROL:"flowplayer-volume-control",VOLUME_BAR:"flowplayer-volume-bar",HEADER:"flowplayer-header",HEADER_LEFT_ZONE:"flowplayer-header-left-zone",HEADER_RIGHT_ZONE:"flowplayer-header-right-zone",HEADER_DURATION:"flowplayer-header-duration",MIDDLE:"flowplayer-middle",MIDDLE_ZONE:"flowplayer-middle-zone",WAIT:"flowplayer-wait",MIDDLE_BUTTONS:"flowplayer-middle-buttons",MIDDLE_LEFT_ZONE:"flowplayer-middle-left-zone",MIDDLE_RIGHT_ZONE:"flowplayer-middle-right-zone",ENDSCREEN_INTERSTITIAL:"flowplayer-endscreen-interstitial",ENDSCREEN_UP_NEXT:"flowplayer-endscreen-up-next",ENDSCREEN_GRID:"flowplayer-endscreen-grid",PLAYLIST_INTERSTITIAL:"flowplayer-playlist-interstitial",AIRPLAY_ICON:"flowplayer-airplay-icon",CHROMECAST_ICON:"flowplayer-chromecast-icon",SMALL_PLAY_ICON:"flowplayer-small-play-icon",SMALL_PAUSE_ICON:"flowplayer-small-pause-icon",PLAY_ICON:"flowplayer-play-icon",PAUSE_ICON:"flowplayer-pause-icon",FULLSCREEN_ENTER_ICON:"flowplayer-fullscreen-enter-icon",FULLSCREEN_EXIT_ICON:"flowplayer-fullscreen-exit-icon",SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:"flowplayer-fast-forward-icon",REWIND_ICON:"flowplayer-rewind-icon",SHARE_ICON:"flowplayer-share-icon",VOLUME_ICON:"flowplayer-volume-icon",MUTE_ICON:"flowplayer-mute-icon",UNMUTE_ICON:"flowplayer-unmute-icon",CLOSE_ICON:"flowplayer-close-icon",FACEBOOK_ICON:"flowplayer-facebook-icon",TWITTER_ICON:"flowplayer-twitter-icon",LINK_ICON:"flowplayer-link-icon",EMBED_ICON:"flowplayer-embed-icon",LIVE_COUNTDOWN:"flowplayer-live-countdown",PLAYLIST_CONTROLS:"flowplayer-playlist-controls",THUMBNAILS_CAROUSEL:"flowplayer-thumbnails-carousel",ERROR_COMPONENT:"flowplayer-error",TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue"});const p="is-playing",f="is-paused",y="is-loaded",m="is-loading",E="is-starting",g="is-seeking",h="is-ended",w="is-waiting",v="is-live-seeked",S="no-timeline",O="will-play",_="will-pause",I="is-in-viewport";var N=Object.freeze({__proto__:null,PLAYING:p,FULLSCREEN:"is-fullscreen",PAUSED:f,MUTED:"is-muted",LOADED:y,LOADING:m,STARTING:E,SEEKING:g,GRABBING:"is-grabbing",DISABLED:"is-disabled",SMALL:"is-small",TINY:"is-tiny",RTL:"is-rtl",TV:"is-tv",ENDED:h,LIVE:"is-live",ERRORED:"is-error",WAITING:w,AUTOPLAY:"is-autoplay",NO_AUTOPLAY:"no-autoplay",SEAMLESS:"is-seamless",TOGGLING:"is-toggling",LIVE_SEEKED:v,NO_DVR:S,HAS_POSTER:"has-poster",WILL_PLAY:O,WILL_PAUSE:_,MENU_OPENED:"has-menu-opened",TOUCHED:"is-touched",HOVERED:"is-hovered",TOUCH_DEVICE:"is-touch-device",WILL_SEEK:"will-seek",SEEKABLE:"is-seekable",IN_VIEWPORT:I,NO_CONTROLS:"no-controls",DESTROYED:"is-destroyed",IS_SOURCE_PROCESSING:"is-source-processing"});function T(e){this.message=e}T.prototype=new Error,T.prototype.name="InvalidCharacterError";var A="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new T("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,a="";o=t.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)?a+=String.fromCharCode(255&n>>(-2*r&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};var L=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(A(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return A(t)}};function b(e){this.message=e}b.prototype=new Error,b.prototype.name="InvalidTokenError";var R=function(e,t){if("string"!=typeof e)throw new b("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(L(e.split(".")[n]))}catch(e){throw new b("Invalid token specified: "+e.message)}};R.InvalidTokenError=b;const C=new Map,D=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e);var U,k;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(U||(U={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(k||(k={}));function P(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(_)||e.paused),function(e,t,n){const o=e.poll(t?"beforeplay":"beforepause",{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(O)?(e.setState(_,!0),e.setState(O,!1),Promise.resolve()):Promise.resolve(e.pause());if(0==e.reaper)return Promise.resolve();const r=e.reaper.get("__pending_play");return e.paused||r?r?(r.src!==x(e.original_src)&&M(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==x(e.original_src)}(e)&&M(e),(e=>e.autoplay&&k.AUDIO_REQUIRED&e.autoplay)(t)?function(e){e.muted=!1,0==e.volume&&(e.volume=1);return e.play().catch(e=>{console.warn("[flowplayer/play] autoplay audio required\n%s",e.message)})}(e):e.play().then(()=>{e.hasState(_)&&e.togglePlay(!1)}).catch(t=>(console.warn("[flowplayer/play] attempting muted autoplay\n%s",t.message),e.muted=!0,e.volume=0,e.play()))):(e.setState(_,!1),!e.hasState(p)&&e.setState(O,!0),Promise.resolve())}function M(e){e.currentSrc.match(/^blob:/)||e.load()}function x(e){const t=document.createElement("a");return t.href=e,t.href}function W(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function V(e){const t=document.createElement("a");t.href=e;const n=t.pathname&&t.pathname.split(".");return n.length>1&&n[n.length-1]}function G(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const H=e=>{var{src:t}=e,n=W(e,["src"]);return[Object.assign({src:t,type:t?G("video/"+V(t)):""},n)]};function j(e){return H({src:e})}function Y(e){var{src:t,type:n}=e,o=W(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:H(Object.assign({src:t},o))}var F;function K(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?j(e):Array.isArray(e)||"object"!=typeof e?e.reduce((function(e,t){return"string"==typeof t&&(t=j(t)),"object"!=typeof t||Array.isArray(t)||(t=Y(t)),e.concat(t)}),[]):Y(e)}(n);return function(e){[g,_,O,p,f,m,y,v].forEach(t=>e.setState(t,!1)),e.setState(E,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(F.Ok==function(e,t,n){e.emit("src",n),"string"==typeof n.src&&(e.original_src=n.src);const o=function(e,t,n){return e.plugins.filter(e=>{return(t=e)&&"wants"in t;var t}).find(e=>e.wants(n.src||"",n,t))}(e,t,n);return e.setOpts({is_native:!o}),o?(o.onload(t,e.root,e,n),F.Ok):F.Err}(e,t,i)||F.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit("audioonlysource");t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return F.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return F.Err;"string"==typeof n.src&&(e.preload=t.autoplay?"auto":null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src,t.autoplay&&o.safari&&e.load(),"none"!==e.preload&&e.setState(m,!0));return F.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),function(e,t){!function(e,t){if(!e.currentSrc)return;if("none"==e.opt("preload"))return;if(t.autoplay&&t.autoplay>0)return;e.load()}(e,t)}(e,t),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(F||(F={}));const B=[l,"seeking","src","seek:cancel"];var z;function q(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?Z(e,t):(t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){0!=e.reaper&&(e.currentTime=function(e,t,n=0){return Math.max(Math.min(t,e),n)}(e.currentTime+t.offset,e.duration),t.timer=0,Z(e,t))}),1e3),function(e,t){e.setState("will-seek",!0),e.setState(z.BACKWARD,t.offset<0),e.setState(z.FORWARD,t.offset>0)}(e,t),e.emit("seek:queued",t),t))}function Z(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(z.FORWARD,!1),e.setState(z.BACKWARD,!1),e.setState("will-seek",!1)}(e)}function Q(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function X(e,t,n){const o=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;o.length;){if(null==e)return n;const t=o.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(z||(z={}));const $=[1e7]+""+-1e3+-4e3+-8e3+-1e11,J=()=>"undefined"==typeof crypto?"":$.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16));let ee="";!function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();const te=["touchstart","touchmove"];function ne(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function oe(e,t,n){const o=ne(t,n);return e.dispatchEvent(o),e}function re(e,t,n){const o=ne(t,n);return e.dispatchEvent(o),o}function ie(e,t,n,o){Array.isArray(t)?t.forEach(t=>ae(e,t,n,o)):ae(e,t,n,o)}function ae(e,t,n,o){if(r=t,!~te.indexOf(r))return e.addEventListener(t,n,o),e;var r;const i=Object.assign(o||{},{passive:!0});return e.addEventListener(t,n,i),e}function se(e,t,n,o){return ie(e,t,n,Object.assign(o||{},{once:!0}))}class PlayerStorage{constructor(e,t){this.implementation=e,t&&t.keys().forEach(e=>{"string"==typeof t.implementation[e]&&this.implementation.setItem(e,t.implementation[e])})}keys(){var e;const t=[];for(var n=0;n<this.implementation.length;n++)(null===(e=this.implementation.key(n))||void 0===e?void 0:e.startsWith("flowplayer/"))&&t.push(this.implementation.key(n));return t}removeItem(e){try{this.implementation.removeItem("flowplayer/"+e)}catch(e){}}getItem(e){try{return this.implementation.getItem("flowplayer/"+e)}catch(e){return null}}setItem(e,t){try{this.implementation.setItem("flowplayer/"+e,t)}catch(e){}}clear(){try{this.keys().forEach(e=>this.implementation.removeItem(e))}catch(e){}}get length(){try{return this.keys().length}catch(e){return 0}}key(e){try{return this.implementation.key(e)}catch(e){return null}}}class InMemoryStorage{constructor(){this.pairs=[]}get length(){return this.pairs.length}clear(){this.pairs=[]}getItem(e){var t;return(null===(t=this.pairs.find(t=>t[0]===e))||void 0===t?void 0:t[1])||null}key(e){return this.pairs[e][0]||null}removeItem(e){this.pairs=this.pairs.filter(t=>t[0]!==e)}setItem(e,t){this.removeItem(e),this.pairs.push([e,t])}}const le={preload:"none",rtl:!1,controls:!0},ce=["loop","muted","preload"];function ue(e,o,r){let i;r.live_state={dvr_window:void 0,get dvr(){return i},set dvr(t){i=t;const n=!(!e.live||t);r.hasState(S)!=n&&r.setState(S,n)}},r._storage=new PlayerStorage(["localStorage","sessionStorage"].map(e=>{try{const t=window[e];return t.getItem(""),t}catch(t){return console.debug(`Access to window.${e} denied, trying next option`),null}}).find(e=>!!e)||new InMemoryStorage),r.toJSON=function(){return{duration:r.duration,volume:r.volume,currentTime:r.currentTime,states:r.root.className}},r.setSrc=function(t){return K(r,e,t,n())},r.playerState=r.playerState||{},r.setState=function(e,t){if(r.playerState[e]===!!t)return r;const n=Object.assign({},r.playerState,{[e]:t});return r.playerState=n,oe(r,"state",r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>D(this,e[n]))},r.hasState=function(e){return!!r.playerState[e]},r.transitionState=function(e,t,n){!r.hasState(e)&&r.hasState(t)||(n=0),n&&r.setState("is-toggling",!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout((function(){r.setState("is-toggling",!1)}),n)},r.emit=(e,t)=>(oe(r,e,t),r),r.on=(e,t)=>(ie(r,e,t),r),r.once=(e,t)=>(se(r,e,t),r),r.off=(e,t)=>{var n,o;return n=e,o=t,r.removeEventListener(n,o),r},r.poll=(e,t)=>re(r,e,t),r.togglePlay=function(t){return P(r,e,t)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),oe(r,"volumechange")},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState("is-disabled",e),r.disabled=e},r.destroy=function(){r.pause();const e=t.indexOf(r);~e&&t.splice(e,1),setTimeout((function(){r.setSrc([]),r.reaper&&r.reaper.clear(),oe(r,l),r.setState("is-destroyed",!0)}),0)},r.setAttrs=function(e){return ce.forEach(t=>{if(!(t in e))return;const n=e[t];n?r.setAttribute(t,n.toString()):r.removeAttribute(t)}),r},r.opt=function(t,n){return n=void 0===n?X(le,t):n,X(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?function e(t,n,o,r){return(r=r||0)>=t.length?o:X(t[r],n,e(t,n,o,r+1))}(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState("is-live")&&(r.setState(S,!0),oe(r,"live")),"disabled"in t&&void 0!==t.disabled&&r.toggleDisable(t.disabled),"muted"in t&&void 0!==t.muted&&r.toggleMute(t.muted),"dvr"in e&&(r.live_state.dvr=r.opt("dvr"));const n=!!e.autoplay&&!r.hasState("no-autoplay");r.setState("is-autoplay",n),r.setState("is-rtl",r.opt("rtl",function(e){if(!e)return Q();const t=e.getAttribute("dir");return t?"rtl"==t:Q()}(o))),r.setState("is-live",!!e.live),r.setState("has-poster","string"==typeof e.poster&&e.poster.length>0),r.setState("is-seekable",!!e.seekable),r.setState("no-controls",0==e.controls),o.style.backgroundImage=r.hasState("has-poster")?"url('"+e.poster+"')":"",oe(r,"config",e)},r.renderPlugin=function(e){re(r,"renderplugin",e).defaultPrevented||r.root.appendChild(e)};const a={offset:0,timer:0};var s,c;c=a,(s=r).on(B,(function(){Z(s,c)})),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return q(r,a,e)},r.deviceId=function(){return function(e){if(ee)return ee;try{const t=e.getItem("flowplayer/uuid");if(t)return t;const n=J();return e.setItem("flowplayer/uuid",n),n}catch(e){return ee=J()}}(r._storage)}}function de(e,t){const n=t.querySelector("video"),o=n||(e._video_element_callback?e._video_element_callback(e):document.createElement("video"));return o.classList.add("fp-engine"),o.playsInline=!0,n||t.append(o),o}var pe="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};const fe=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function ye(e,t){return!!~fe.indexOf(e)||e.indexOf(t)===e.length-t.length}ye.check_whitelist=function(e){return!!~fe.indexOf(e)};const me="production";function Ee(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=R(e),n.valid_jwt=!0}catch(e){}return n.raw=e,n.data=JSON.parse(o.c),n.exp=o.exp,t.require_valid_token&&Ee.validate(n),n}function ge(e){try{return Ee.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}var he;function we(e){return{grant:e,is_granted:t=>(e&t)===t}}function ve({root:e,video:t,data:n}){t&&t.destroy(),console.error(new Error(n.details||n.reason)),e.innerHTML="",e.classList.remove("flowplayer"),e.classList.add("flowplayer-fatal"),e.style.removeProperty("background-image");const o=document.createElement("h2");o.textContent="Playback Error";const r=document.createElement("p");r.textContent="Are you the site owner?";const i=document.createElement("a");i.classList.add("troubleshoot"),i.target="_blank",i.href="https://docs.flowplayer.com/troubleshooting/player#"+n.reason,i.textContent="Troubleshoot?";const a=document.createElement("img");a.src="https://flowplayer.com/user/pages/images/logo-white.png",e.append(o,r,i,a)}Ee.validate=function(e){if("string"==typeof e&&(e=Ee(e)),!e||!e.raw){if(ye.check_whitelist(window.location.hostname)||"dev"===me.toString())return!0;throw new Error("No token provided in configuration")}if(!e.valid_jwt)throw new Error("Invalid token provided");const t=window.location.hostname,n=ye.bind(null,t);if("dev"!==me.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==me.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},Ee.id=function(e){if(e)return"string"==typeof e&&(e=Ee(e)),e.data.id},function(e){e[e.ADS=2]="ADS",e[e.ANALYTICS=4]="ANALYTICS",e[e.NO_METERING=8]="NO_METERING",e[e.DEVELOPER_PLAN=16]="DEVELOPER_PLAN",e[e.WOWZA_VIDEO=32]="WOWZA_VIDEO"}(he||(he={})),we.of=we,we.from_token=function(e){const t=Ee(e,{require_valid_token:!0});return we.of(t.data.acl)},we.permissions=he;function Se(e,t){const n=t.clientWidth;t.classList.toggle("is-small",n<600),t.classList.toggle("is-tiny",n<400)}function Oe(e,t,o){let r=!0;t.classList.add("flowplayer"),Se(0,t),ie(o,["loadstart","resize"],(function(){Se(0,t)})),ie(o,"state",(function(){Object.entries(o.playerState).forEach((function([e,n]){t.classList.toggle(e,n)}))})),ie(o,"timeupdate",(function(){o.setState(w,!o.hasState("is-casting")&&!o.hasState(E)&&o.readyState<3)})),ie(o,"ended",(function(t){setTimeout((function(){if(!t.defaultPrevented){if(e.rewind&&!o.loop){const t=o.src;e.autoplay&&(e.autoplay=0,o.setState("is-autoplay",!1)),o.setState(g,!0),se(o,"seeked",(function(){t===o.src&&(o.setState(g,!1),o.pause(),o.setState(E,!0))})),o.currentTime=0}se(o,"timeupdate",(function(){o.setState(h,!1)})),o.transitionState(h,p,e.loop||e.rewind?0:300)}}),0)})),ie(o,["seeking","seeked"],(function(e){o.setState(g,"seeking"==e.type)})),ie(o,"remotesession:ended",(function(e){setTimeout(()=>o.currentTime=e.detail.currentTime,0)})),ie(o,"ended",(function(){o.setState(p,!1),r=!0})),ie(o,"progress",()=>{if(!o.opts.live||!o.opts.is_native)return;const e=o.seekable;0!=e.length&&o.emit("dvr/window",e.end(e.length-1)-e.start(0))}),ie(o,n().ios?i:a,(function(){var e,t;o.setState(y,!0),o.setState(m,!1);const n=o;0===(null===(e=n.videoTracks)||void 0===e?void 0:e.length)&&(null===(t=n.audioTracks)||void 0===t?void 0:t.length)>0&&o.emit("audioonlysource")})),ie(o,"play",()=>{o.setState(O,!0)}),ie(o,["waiting","canplay","loadstart"],(function(t){if(!o.hasState(g)&&("canplay"!=t.type||e.autoplay||o.setState(w,!1),"loadstart"!=t.type||"none"!=o.opt("preload")||e.autoplay)){if("loadstart"==t.type&&e.autoplay)return se(o,"playing",(function(){o.setState(w,!1)}));"waiting"!=t.type||o.hasState(y)||o.setState(m,!0),o.setState(h,!1),o.setState(w,"waiting"==t.type)}})),ie(o,["playing","pause"],(function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:o});document.dispatchEvent(e)},0);const n="playing"==t.type,i=o.currentTime==o.duration,a=n&&r&&e.autoplay||o.hasState(w);if(n&&(o.started=!0,r=!1),o.setState(w,!1).setState(E,!1).setState(O,!1),!n&&o.setState(_,!1),i)return;const s=n?p:f,l=n?f:p;o.transitionState(s,l,a?0:300),n&&o.setState("no-autoplay",!1)}))}const _e=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function Ie(e,t,n){if(!window.IntersectionObserver)return;const i={should_resume:!!e.autoplay,has_user_gesture:!1,locked:!1};[r,o].forEach(e=>se(n,e,()=>i.has_user_gesture=!0)),ie(n,"play",(function(){i.locked||(i.should_resume=!0)})),ie(n,"src",(function(){i.should_resume=!!e.autoplay})),ie(n,"pause",(function(){i.locked||(i.should_resume=!1)}));const a=()=>{setTimeout(()=>{n.setState(E,!0),n.setState("is-autoplay",!1)},100)};ie(n,"canplay",()=>{if(e.autoplay)return n.hasState(I)&&i.should_resume?n.togglePlay(!0).catch(a):void(e.autopause||n.hasState(I)||!i.should_resume||se(n,"viewenter",()=>{e.autoplay&&i.should_resume&&n.togglePlay(!0).catch(a)}))});const s=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(I);if(n.setState(I,t>=.2),n.emit("intersectionchange",{ratio:t}),o===n.hasState(I))return;const r=n.hasState(I)?"viewenter":"viewleave";n.emit(r)},0)})},{threshold:_e});s.observe(t),n.on(l,()=>s.disconnect()),ie(n,"viewenter",(function(){i.should_resume&&e.autopause&&!Ne()&&n.togglePlay(!0)})),ie(n,"viewleave",(function(){if(!e.autopause||Ne())return;const t=!n.paused;i.locked=!0,n.pause(),setTimeout((function(){i.should_resume=t,i.locked=!1}),0)}))}function Ne(){return t.find(e=>e.hasState("is-casting"))}function Te(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit("resize",n)});n.observe(e),t.on(l,()=>n.disconnect())}function Ae(e){if("number"==typeof e&&!isNaN(e))return Number(e);if("string"==typeof e){const t=e.split(":");return Number(t[1])/Number(t[0])}return e}function Le(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let s=Ae(e.ratio||.5625);r.style.paddingTop=100*s+"%";const l=[a,i];n.on(l,(function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})})),n.on("config",(function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=Ae((null==e?void 0:e.ratio)||t||.5625);s!==o&&(s=o,r.style.paddingTop=100*o+"%")}))}class ExplorerPlan{constructor(){this.cleanUp=this.cleanUp.bind(this),this.render=this.render.bind(this),this.wireUp=this.wireUp.bind(this)}init(e,t,n){this.root=t,this.player=n,this.wireUp()}wireUp(){var e,t;this.cleanUp(),null===(e=this.player)||void 0===e||e.once("playing",this.render),null===(t=this.player)||void 0===t||t.once("ended",this.wireUp)}cleanUp(){var e,t,n,o;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo),null===(n=this.player)||void 0===n||n.off("playing",this.render),null===(o=this.player)||void 0===o||o.off("ended",this.wireUp)}render(){var e,t,n;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo);const o=(null===(n=this.root)||void 0===n?void 0:n.querySelector(".fp-ui"))||this.root;if(!o)return;const r=this._logo=document.createElement("a");r.href="https://explorer.flowplayer.com",r.target="_blank",Object.entries(be).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}const be={display:"block",opacity:"1",visibility:"visible",width:"33%","padding-top":"9%",position:"absolute","z-index":"9999",bottom:"25%",left:"10%","background-size":"cover","background-image":"url(https://static.flowplayer.com/explorer/explorer.svg)"};function Re(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(l,()=>document.removeEventListener("flowplayer/playing",t)),document.addEventListener("flowplayer/playing",t)}function Ce(e,t){const n=[];e.addEventListener("contextmenu",o=>{const r=o.timeStamp;for(n.push(r);n.length>3;)n.shift();n.length>=3&&n.every(e=>e-r<3e3)&&(console.debug("flowplayer/debug rendering info"),function(e,t){var n;!function(e){const t=e.querySelector(".debug-info");null==t||t.remove()}(e);const o=document.createElement("div");o.classList.add("debug-info");const r=De("flowplayer.version","3.7.1-rc.0");o.append(r);const i=null===(n=null==t?void 0:t.hls)||void 0===n?void 0:n.constructor;if(i&&i.version){const e=De("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const De=(e,t)=>{const n=document.createElement("div");n.classList.add("row",e);const o=document.createElement("span");o.classList.add("attr"),o.textContent=e;const r=document.createElement("span");return r.textContent=t,r.classList.add("value"),n.append(o,r),n};const Ue=function(e,t){const n=function(){try{return localStorage.getItem("flowplayer/debug")}catch(e){return""}}(),o=(o,...r)=>{try{const i=(null==t?void 0:t.debug)||n;i&&e.match(i)&&console.log(`flowplayer/${e} -- ${o}`,...r)}catch(e){console.warn(e)}};return o.log=o,o}("core/retry");function ke(e,t){const n={pending:void 0,count:0};var o;e.on("error",o=>{t.retry&&void 0===n.pending&&(++n.count,n.pending=function(e,t){return setTimeout(()=>{e.hasState("is-destroyed")||(t.pending=void 0,[s,c].forEach(t=>e.emit(t)),Ue("%s try",t.count))},3e3*t.count)}(e,n))}),e.on("playing",()=>{n.count=0}),e.on(["src",s],()=>{n.pending&&(clearTimeout(n.pending),n.pending=void 0)}),e.on(c,(o=t=>{t.defaultPrevented||e.load()},e=>{setTimeout((function(){if(!e.defaultPrevented)return o(e)}),0)}))}const Pe=function(){const e="undefined"!=typeof window?window:void 0!==pe?pe:{},t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function Me(n,o){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),Me;"string"==typeof o&&(o={src:o}),o||(o={}),o.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(o.token=window.__FLOWPLAYER_TOKEN);const r="string"==typeof n?document.querySelector(n):n;if(!r)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const a=r.querySelector("video.fp-engine");if(a)return a;const s=ge(o.token);if(!s.success)return ve({root:r,data:{reason:"token",details:s.message}});const c=new Map,u=de(o,r);u.reaper=c,u._customElements=C,Object.defineProperty(u,"token",{value:"string"==typeof o.token?Ee.id(o.token):"",writable:!1}),u.addEventListener(l,()=>{c.clear(),u.reaper=0,delete u.root}),u.root=r,o.token&&we.from_token(o.token).is_granted(we.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(u)&&t.push(u),ue(o,r,u),u.setAttrs(o),u.plugins=Me.extensions.map(e=>new e(Me,u)),Oe(o,r,u),Ie(o,r,u),Te(r,u),Le(o,r,u),Re(u),Ce(r,u),ke(u,o),u.plugins.forEach(e=>{try{e.init(o,r,u)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),u.setOpts(o),u.opts=o,o.src&&u.setSrc(o.src);const d=u.readyState;return d>0&&u.currentSrc&&u.emit(i),d>2&&u.currentSrc&&u.emit("canplay"),u.emit("mount"),u.on("error:fatal",(function(e){ve({root:r,video:u,data:e.data||{}})})),setTimeout(oe,0,document,"flowplayer:player:created",u),u}return Object.assign(Me,Pe),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=C,o.defaultElements=d,o.version="3.7.1-rc.0",o.commit="52458eb6acf7df34e94380e52fe2064adab39e34",o.instances=t,o.extensions=e,o.support=n,o.events=u,o.states=N,o.jwt=R,o.autoplay=k,o.quality=U}(Me),"object"==typeof document&&setTimeout(oe,0,document,"flowplayer:umd",Me),Me}));
|
package/default.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=t()}(this,(function(){"use strict";const e=[],t=[];function n(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),o=/Android/.test(t)&&!/Firefox/.test(t),r=/^((?!chrome|android).)*safari/i.test(t),i=/SamsungBrowser/.test(t),s=i&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:o,iphone:n,safari:r,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:i,samsung_tv:i&&s,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="click",r="dblclick",i="load",s="mouseenter",a="mouseleave",l="mousemove",c="touchmove",u="touchend",d="fullscreenenter",p="fullscreenexit",f="loadedmetadata",m="loadeddata",h="progress",y="loadstart",v="pause",_="playing",g="waiting",E="canplay",w="ended",S="seeked",b="seeking",O="recover",T="reap",N="config",A="landscape",I="portrait",L="retry";var R=Object.freeze({__proto__:null,MOUNT:"mount",ERROR:"error",CONTEXT_MENU:"contextmenu",CLICK:o,DBL_CLICK:r,KEYUP:"keyup",KEYDOWN:"keydown",LOAD:i,MOUSE_ENTER:s,MOUSE_LEAVE:a,MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_MOVE:l,TOUCH_START:"touchstart",TOUCH_MOVE:c,TOUCH_END:u,TOUCH_CANCEL:"touchcancel",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_ENTER:d,FULLSCREEN_EXIT:p,FULLSCREEN_CHANGE:"fullscreenchange",WEBKIT_NEEDKEY:"webkitneedkey",METADATA:f,DATA:m,PROGRESS:h,TIME_UPDATE:"timeupdate",LOAD_START:y,VOLUME_CHANGE:"volumechange",PAUSE:v,PLAYING:_,PLAY:"play",WAITING:g,CAN_PLAY:E,ENDED:w,SEEKED:S,SEEKING:b,DURATION_CHANGE:"durationchange",BEFORE_PLAY:"beforeplay",BEFORE_PAUSE:"beforepause",STATE:"state",CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",VIEW_ENTER:"viewenter",VIEW_LEAVE:"viewleave",SOURCE:"src",RECOVER:O,REAP:T,CONFIG:N,QUALITIES:"qualities",SET_QUALITY:"quality:set",NON_RECOVERABLE_ERROR:"error:fatal",RECOMMENDATIONS_READY:"recommendationsready",AUDIO_ONLY_SOURCE:"audioonlysource",LANDSCAPE:A,PORTRAIT:I,RENDER_PLUGIN:"renderplugin",DVR:"dvr",LIVE:"live",SEEK_QUEUED:"seek:queued",SEEK_CANCEL:"seek:cancel",PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:"remotesession:ended",INTERSECTIONCHANGE:"intersectionchange",RETRY:L});const k="flowplayer-ui",C="flowplayer-logo",D="flowplayer-control",x="flowplayer-live-status",M="flowplayer-elapsed-time",P="flowplayer-timeline-bar",U="flowplayer-volume-bar",F="flowplayer-header",B="flowplayer-middle",G="flowplayer-middle-zone",H="flowplayer-wait",j="flowplayer-play-icon",q="flowplayer-pause-icon",W="flowplayer-rewind-icon",z="flowplayer-volume-icon";var V=Object.freeze({__proto__:null,SUBTITLES_MENU:"flowplayer-subtitles-menu",SHARE_MENU:"flowplayer-share-menu",SPEED_MENU:"flowplayer-speed-menu",QUALITY_MENU:"flowplayer-quality-menu",AUDIO_MENU:"flowplayer-audio-menu",UI:k,LOGO:C,CONTROL:D,CONTROL_BUTTONS:"flowplayer-control-buttons",LIVE_STATUS:x,ELAPSED:M,TIMELINE:P,CONTROL_DURATION:"flowplayer-control-duration",VOLUME_CONTROL:"flowplayer-volume-control",VOLUME_BAR:U,HEADER:F,HEADER_LEFT_ZONE:"flowplayer-header-left-zone",HEADER_RIGHT_ZONE:"flowplayer-header-right-zone",HEADER_DURATION:"flowplayer-header-duration",MIDDLE:B,MIDDLE_ZONE:G,WAIT:H,MIDDLE_BUTTONS:"flowplayer-middle-buttons",MIDDLE_LEFT_ZONE:"flowplayer-middle-left-zone",MIDDLE_RIGHT_ZONE:"flowplayer-middle-right-zone",ENDSCREEN_INTERSTITIAL:"flowplayer-endscreen-interstitial",ENDSCREEN_UP_NEXT:"flowplayer-endscreen-up-next",ENDSCREEN_GRID:"flowplayer-endscreen-grid",PLAYLIST_INTERSTITIAL:"flowplayer-playlist-interstitial",AIRPLAY_ICON:"flowplayer-airplay-icon",CHROMECAST_ICON:"flowplayer-chromecast-icon",SMALL_PLAY_ICON:"flowplayer-small-play-icon",SMALL_PAUSE_ICON:"flowplayer-small-pause-icon",PLAY_ICON:j,PAUSE_ICON:q,FULLSCREEN_ENTER_ICON:"flowplayer-fullscreen-enter-icon",FULLSCREEN_EXIT_ICON:"flowplayer-fullscreen-exit-icon",SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:"flowplayer-fast-forward-icon",REWIND_ICON:W,SHARE_ICON:"flowplayer-share-icon",VOLUME_ICON:z,MUTE_ICON:"flowplayer-mute-icon",UNMUTE_ICON:"flowplayer-unmute-icon",CLOSE_ICON:"flowplayer-close-icon",FACEBOOK_ICON:"flowplayer-facebook-icon",TWITTER_ICON:"flowplayer-twitter-icon",LINK_ICON:"flowplayer-link-icon",EMBED_ICON:"flowplayer-embed-icon",LIVE_COUNTDOWN:"flowplayer-live-countdown",PLAYLIST_CONTROLS:"flowplayer-playlist-controls",THUMBNAILS_CAROUSEL:"flowplayer-thumbnails-carousel",ERROR_COMPONENT:"flowplayer-error",TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue"});const K="is-playing",Y="is-paused",X="is-loaded",Z="is-loading",Q="is-starting",J="is-seeking",$="is-ended",ee="is-live",te="is-waiting",ne="is-live-seeked",oe="no-timeline",re="will-play",ie="will-pause",se="is-touched",ae="is-in-viewport",le="is-source-processing";var ce=Object.freeze({__proto__:null,PLAYING:K,FULLSCREEN:"is-fullscreen",PAUSED:Y,MUTED:"is-muted",LOADED:X,LOADING:Z,STARTING:Q,SEEKING:J,GRABBING:"is-grabbing",DISABLED:"is-disabled",SMALL:"is-small",TINY:"is-tiny",RTL:"is-rtl",TV:"is-tv",ENDED:$,LIVE:ee,ERRORED:"is-error",WAITING:te,AUTOPLAY:"is-autoplay",NO_AUTOPLAY:"no-autoplay",SEAMLESS:"is-seamless",TOGGLING:"is-toggling",LIVE_SEEKED:ne,NO_DVR:oe,HAS_POSTER:"has-poster",WILL_PLAY:re,WILL_PAUSE:ie,MENU_OPENED:"has-menu-opened",TOUCHED:se,HOVERED:"is-hovered",TOUCH_DEVICE:"is-touch-device",WILL_SEEK:"will-seek",SEEKABLE:"is-seekable",IN_VIEWPORT:ae,NO_CONTROLS:"no-controls",DESTROYED:"is-destroyed",IS_SOURCE_PROCESSING:le});function ue(e){this.message=e}ue.prototype=new Error,ue.prototype.name="InvalidCharacterError";var de="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new ue("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,s="";o=t.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};var pe=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(de(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return de(t)}};function fe(e){this.message=e}fe.prototype=new Error,fe.prototype.name="InvalidTokenError";var me=function(e,t){if("string"!=typeof e)throw new fe("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(pe(e.split(".")[n]))}catch(e){throw new fe("Invalid token specified: "+e.message)}};me.InvalidTokenError=fe;const he=new Map,ye=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e),ve=(e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)};var _e,ge;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(_e||(_e={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(ge||(ge={}));function Ee(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(ie)||e.paused),function(e,t,n){const o=e.poll(t?"beforeplay":"beforepause",{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(re)?(e.setState(ie,!0),e.setState(re,!1),Promise.resolve()):Promise.resolve(e.pause());if(0==e.reaper)return Promise.resolve();const r=e.reaper.get("__pending_play");return e.paused||r?r?(r.src!==Se(e.original_src)&&we(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==Se(e.original_src)}(e)&&we(e),(e=>e.autoplay&&ge.AUDIO_REQUIRED&e.autoplay)(t)?function(e){e.muted=!1,0==e.volume&&(e.volume=1);return e.play().catch(e=>{console.warn("[flowplayer/play] autoplay audio required\n%s",e.message)})}(e):e.play().then(()=>{e.hasState(ie)&&e.togglePlay(!1)}).catch(t=>(console.warn("[flowplayer/play] attempting muted autoplay\n%s",t.message),e.muted=!0,e.volume=0,e.play()))):(e.setState(ie,!1),!e.hasState(K)&&e.setState(re,!0),Promise.resolve())}function we(e){e.currentSrc.match(/^blob:/)||e.load()}function Se(e){const t=document.createElement("a");return t.href=e,t.href}function be(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function Oe(e){const t=document.createElement("a");t.href=e;const n=t.pathname&&t.pathname.split(".");return n.length>1&&n[n.length-1]}function Te(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const Ne=e=>{var{src:t}=e,n=be(e,["src"]);return[Object.assign({src:t,type:t?Te("video/"+Oe(t)):""},n)]};function Ae(e){return Ne({src:e})}function Ie(e){var{src:t,type:n}=e,o=be(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:Ne(Object.assign({src:t},o))}var Le;function Re(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?Ae(e):Array.isArray(e)||"object"!=typeof e?e.reduce((function(e,t){return"string"==typeof t&&(t=Ae(t)),"object"!=typeof t||Array.isArray(t)||(t=Ie(t)),e.concat(t)}),[]):Ie(e)}(n);return function(e){[J,ie,re,K,Y,Z,X,ne].forEach(t=>e.setState(t,!1)),e.setState(Q,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(Le.Ok==function(e,t,n){e.emit("src",n),"string"==typeof n.src&&(e.original_src=n.src);const o=function(e,t,n){return e.plugins.filter(e=>{return(t=e)&&"wants"in t;var t}).find(e=>e.wants(n.src||"",n,t))}(e,t,n);return e.setOpts({is_native:!o}),o?(o.onload(t,e.root,e,n),Le.Ok):Le.Err}(e,t,i)||Le.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit("audioonlysource");t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return Le.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return Le.Err;"string"==typeof n.src&&(e.preload=t.autoplay?"auto":null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src,t.autoplay&&o.safari&&e.load(),"none"!==e.preload&&e.setState(Z,!0));return Le.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),function(e,t){!function(e,t){if(!e.currentSrc)return;if("none"==e.opt("preload"))return;if(t.autoplay&&t.autoplay>0)return;e.load()}(e,t)}(e,t),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(Le||(Le={}));const ke=[T,b,"src","seek:cancel"];var Ce;function De(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?xe(e,t):(t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){0!=e.reaper&&(e.currentTime=function(e,t,n=0){return Math.max(Math.min(t,e),n)}(e.currentTime+t.offset,e.duration),t.timer=0,xe(e,t))}),1e3),function(e,t){e.setState("will-seek",!0),e.setState(Ce.BACKWARD,t.offset<0),e.setState(Ce.FORWARD,t.offset>0)}(e,t),e.emit("seek:queued",t),t))}function xe(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(Ce.FORWARD,!1),e.setState(Ce.BACKWARD,!1),e.setState("will-seek",!1)}(e)}function Me(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}function Pe(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function Ue(...e){const t=document.createElement("div");return 0==e.length||t.classList.add(...e),t}function Fe(e,t,n){const o=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;o.length;){if(null==e)return n;const t=o.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}function Be(e){const t="number"==typeof e?e:parseInt(e,10);return(t>9?"":"0")+t}function Ge(e){if(isNaN(e)||e>=Number.MAX_SAFE_INTEGER)return"";const t=e<0?"-":"";e=Math.round(Math.abs(e));const n=Math.floor(e/3600);let o=Math.floor(e/60);return e-=60*o,n>=1?(o-=60*n,t+n+":"+Be(o)+":"+Be(e)):t+Be(o)+":"+Be(e)}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(Ce||(Ce={}));const He=navigator.languages||[navigator.language];function je(e,t,n){const o={};return n=t.lang||n,e[n]&&(o[n]=e[n]),function(){try{return He.reduce((e,t)=>~t.indexOf("-")?e.concat(t,t.split("-")[0]):e.concat(t),[])}catch(e){return[]}}().forEach((function(t){e[t]&&!o[t]&&(o[t]=e[t])})),Object.values(o)}const qe=[1e7]+""+-1e3+-4e3+-8e3+-1e11,We=()=>"undefined"==typeof crypto?"":qe.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16));let ze="";!function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();const Ve=["touchstart","touchmove"];function Ke(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function Ye(e,t,n){const o=Ke(t,n);return e.dispatchEvent(o),e}function Xe(e,t,n){const o=Ke(t,n);return e.dispatchEvent(o),o}function Ze(e,t,n,o){Array.isArray(t)?t.forEach(t=>Qe(e,t,n,o)):Qe(e,t,n,o)}function Qe(e,t,n,o){if(r=t,!~Ve.indexOf(r))return e.addEventListener(t,n,o),e;var r;const i=Object.assign(o||{},{passive:!0});return e.addEventListener(t,n,i),e}function Je(e,t,n,o){return Ze(e,t,n,Object.assign(o||{},{once:!0}))}class PlayerStorage{constructor(e,t){this.implementation=e,t&&t.keys().forEach(e=>{"string"==typeof t.implementation[e]&&this.implementation.setItem(e,t.implementation[e])})}keys(){var e;const t=[];for(var n=0;n<this.implementation.length;n++)(null===(e=this.implementation.key(n))||void 0===e?void 0:e.startsWith("flowplayer/"))&&t.push(this.implementation.key(n));return t}removeItem(e){try{this.implementation.removeItem("flowplayer/"+e)}catch(e){}}getItem(e){try{return this.implementation.getItem("flowplayer/"+e)}catch(e){return null}}setItem(e,t){try{this.implementation.setItem("flowplayer/"+e,t)}catch(e){}}clear(){try{this.keys().forEach(e=>this.implementation.removeItem(e))}catch(e){}}get length(){try{return this.keys().length}catch(e){return 0}}key(e){try{return this.implementation.key(e)}catch(e){return null}}}class InMemoryStorage{constructor(){this.pairs=[]}get length(){return this.pairs.length}clear(){this.pairs=[]}getItem(e){var t;return(null===(t=this.pairs.find(t=>t[0]===e))||void 0===t?void 0:t[1])||null}key(e){return this.pairs[e][0]||null}removeItem(e){this.pairs=this.pairs.filter(t=>t[0]!==e)}setItem(e,t){this.removeItem(e),this.pairs.push([e,t])}}const $e={preload:"none",rtl:!1,controls:!0},et=["loop","muted","preload"];function tt(e,o,r){let i;r.live_state={dvr_window:void 0,get dvr(){return i},set dvr(t){i=t;const n=!(!e.live||t);r.hasState(oe)!=n&&r.setState(oe,n)}},r._storage=new PlayerStorage(["localStorage","sessionStorage"].map(e=>{try{const t=window[e];return t.getItem(""),t}catch(t){return console.debug(`Access to window.${e} denied, trying next option`),null}}).find(e=>!!e)||new InMemoryStorage),r.toJSON=function(){return{duration:r.duration,volume:r.volume,currentTime:r.currentTime,states:r.root.className}},r.setSrc=function(t){return Re(r,e,t,n())},r.playerState=r.playerState||{},r.setState=function(e,t){if(r.playerState[e]===!!t)return r;const n=Object.assign({},r.playerState,{[e]:t});return r.playerState=n,Ye(r,"state",r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>ye(this,e[n]))},r.hasState=function(e){return!!r.playerState[e]},r.transitionState=function(e,t,n){!r.hasState(e)&&r.hasState(t)||(n=0),n&&r.setState("is-toggling",!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout((function(){r.setState("is-toggling",!1)}),n)},r.emit=(e,t)=>(Ye(r,e,t),r),r.on=(e,t)=>(Ze(r,e,t),r),r.once=(e,t)=>(Je(r,e,t),r),r.off=(e,t)=>{var n,o;return n=e,o=t,r.removeEventListener(n,o),r},r.poll=(e,t)=>Xe(r,e,t),r.togglePlay=function(t){return Ee(r,e,t)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),Ye(r,"volumechange")},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState("is-disabled",e),r.disabled=e},r.destroy=function(){r.pause();const e=t.indexOf(r);~e&&t.splice(e,1),setTimeout((function(){r.setSrc([]),r.reaper&&r.reaper.clear(),Ye(r,T),r.setState("is-destroyed",!0)}),0)},r.setAttrs=function(e){return et.forEach(t=>{if(!(t in e))return;const n=e[t];n?r.setAttribute(t,n.toString()):r.removeAttribute(t)}),r},r.opt=function(t,n){return n=void 0===n?Fe($e,t):n,Fe(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?function e(t,n,o,r){return(r=r||0)>=t.length?o:Fe(t[r],n,e(t,n,o,r+1))}(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState(ee)&&(r.setState(oe,!0),Ye(r,"live")),"disabled"in t&&void 0!==t.disabled&&r.toggleDisable(t.disabled),"muted"in t&&void 0!==t.muted&&r.toggleMute(t.muted),"dvr"in e&&(r.live_state.dvr=r.opt("dvr"));const n=!!e.autoplay&&!r.hasState("no-autoplay");r.setState("is-autoplay",n),r.setState("is-rtl",r.opt("rtl",function(e){if(!e)return Pe();const t=e.getAttribute("dir");return t?"rtl"==t:Pe()}(o))),r.setState(ee,!!e.live),r.setState("has-poster","string"==typeof e.poster&&e.poster.length>0),r.setState("is-seekable",!!e.seekable),r.setState("no-controls",0==e.controls),o.style.backgroundImage=r.hasState("has-poster")?"url('"+e.poster+"')":"",Ye(r,N,e)},r.renderPlugin=function(e){Xe(r,"renderplugin",e).defaultPrevented||r.root.appendChild(e)};const s={offset:0,timer:0};var a,l;l=s,(a=r).on(ke,(function(){xe(a,l)})),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return De(r,s,e)},r.deviceId=function(){return function(e){if(ze)return ze;try{const t=e.getItem("flowplayer/uuid");if(t)return t;const n=We();return e.setItem("flowplayer/uuid",n),n}catch(e){return ze=We()}}(r._storage)}}function nt(e,t){const n=t.querySelector("video"),o=n||(e._video_element_callback?e._video_element_callback(e):document.createElement("video"));return o.classList.add("fp-engine"),o.playsInline=!0,n||t.append(o),o}var ot="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function rt(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}function it(){return"undefined"!=typeof window?window:void 0!==ot?ot:{}}const st=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function at(e,t){return!!~st.indexOf(e)||e.indexOf(t)===e.length-t.length}at.check_whitelist=function(e){return!!~st.indexOf(e)};const lt="production";function ct(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=me(e),n.valid_jwt=!0}catch(e){}return n.raw=e,n.data=JSON.parse(o.c),n.exp=o.exp,t.require_valid_token&&ct.validate(n),n}function ut(e){try{return ct.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}var dt;function pt(e){return{grant:e,is_granted:t=>(e&t)===t}}function ft({root:e,video:t,data:n}){t&&t.destroy(),console.error(new Error(n.details||n.reason)),e.innerHTML="",e.classList.remove("flowplayer"),e.classList.add("flowplayer-fatal"),e.style.removeProperty("background-image");const o=document.createElement("h2");o.textContent="Playback Error";const r=document.createElement("p");r.textContent="Are you the site owner?";const i=document.createElement("a");i.classList.add("troubleshoot"),i.target="_blank",i.href="https://docs.flowplayer.com/troubleshooting/player#"+n.reason,i.textContent="Troubleshoot?";const s=document.createElement("img");s.src="https://flowplayer.com/user/pages/images/logo-white.png",e.append(o,r,i,s)}ct.validate=function(e){if("string"==typeof e&&(e=ct(e)),!e||!e.raw){if(at.check_whitelist(window.location.hostname)||"dev"===lt.toString())return!0;throw new Error("No token provided in configuration")}if(!e.valid_jwt)throw new Error("Invalid token provided");const t=window.location.hostname,n=at.bind(null,t);if("dev"!==lt.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==lt.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},ct.id=function(e){if(e)return"string"==typeof e&&(e=ct(e)),e.data.id},function(e){e[e.ADS=2]="ADS",e[e.ANALYTICS=4]="ANALYTICS",e[e.NO_METERING=8]="NO_METERING",e[e.DEVELOPER_PLAN=16]="DEVELOPER_PLAN",e[e.WOWZA_VIDEO=32]="WOWZA_VIDEO"}(dt||(dt={})),pt.of=pt,pt.from_token=function(e){const t=ct(e,{require_valid_token:!0});return pt.of(t.data.acl)},pt.permissions=dt;function mt(e,t){const n=t.clientWidth;t.classList.toggle("is-small",n<600),t.classList.toggle("is-tiny",n<400)}function ht(e,t,o){let r=!0;t.classList.add("flowplayer"),mt(0,t),Ze(o,[y,"resize"],(function(){mt(0,t)})),Ze(o,"state",(function(){Object.entries(o.playerState).forEach((function([e,n]){t.classList.toggle(e,n)}))})),Ze(o,"timeupdate",(function(){o.setState(te,!o.hasState("is-casting")&&!o.hasState(Q)&&o.readyState<3)})),Ze(o,w,(function(t){setTimeout((function(){if(!t.defaultPrevented){if(e.rewind&&!o.loop){const t=o.src;e.autoplay&&(e.autoplay=0,o.setState("is-autoplay",!1)),o.setState(J,!0),Je(o,S,(function(){t===o.src&&(o.setState(J,!1),o.pause(),o.setState(Q,!0))})),o.currentTime=0}Je(o,"timeupdate",(function(){o.setState($,!1)})),o.transitionState($,K,e.loop||e.rewind?0:300)}}),0)})),Ze(o,[b,S],(function(e){o.setState(J,e.type==b)})),Ze(o,"remotesession:ended",(function(e){setTimeout(()=>o.currentTime=e.detail.currentTime,0)})),Ze(o,w,(function(){o.setState(K,!1),r=!0})),Ze(o,h,()=>{if(!o.opts.live||!o.opts.is_native)return;const e=o.seekable;0!=e.length&&o.emit("dvr/window",e.end(e.length-1)-e.start(0))}),Ze(o,n().ios?f:m,(function(){var e,t;o.setState(X,!0),o.setState(Z,!1);const n=o;0===(null===(e=n.videoTracks)||void 0===e?void 0:e.length)&&(null===(t=n.audioTracks)||void 0===t?void 0:t.length)>0&&o.emit("audioonlysource")})),Ze(o,"play",()=>{o.setState(re,!0)}),Ze(o,[g,E,y],(function(t){if(!o.hasState(J)&&(t.type!=E||e.autoplay||o.setState(te,!1),t.type!=y||"none"!=o.opt("preload")||e.autoplay)){if(t.type==y&&e.autoplay)return Je(o,_,(function(){o.setState(te,!1)}));t.type!=g||o.hasState(X)||o.setState(Z,!0),o.setState($,!1),o.setState(te,t.type==g)}})),Ze(o,[_,v],(function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:o});document.dispatchEvent(e)},0);const n=t.type==_,i=o.currentTime==o.duration,s=n&&r&&e.autoplay||o.hasState(te);if(n&&(o.started=!0,r=!1),o.setState(te,!1).setState(Q,!1).setState(re,!1),!n&&o.setState(ie,!1),i)return;const a=n?K:Y,l=n?Y:K;o.transitionState(a,l,s?0:300),n&&o.setState("no-autoplay",!1)}))}const yt=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function vt(e,t,n){if(!window.IntersectionObserver)return;const r={should_resume:!!e.autoplay,has_user_gesture:!1,locked:!1};[u,o].forEach(e=>Je(n,e,()=>r.has_user_gesture=!0)),Ze(n,"play",(function(){r.locked||(r.should_resume=!0)})),Ze(n,"src",(function(){r.should_resume=!!e.autoplay})),Ze(n,v,(function(){r.locked||(r.should_resume=!1)}));const i=()=>{setTimeout(()=>{n.setState(Q,!0),n.setState("is-autoplay",!1)},100)};Ze(n,E,()=>{if(e.autoplay)return n.hasState(ae)&&r.should_resume?n.togglePlay(!0).catch(i):void(e.autopause||n.hasState(ae)||!r.should_resume||Je(n,"viewenter",()=>{e.autoplay&&r.should_resume&&n.togglePlay(!0).catch(i)}))});const s=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(ae);if(n.setState(ae,t>=.2),n.emit("intersectionchange",{ratio:t}),o===n.hasState(ae))return;const r=n.hasState(ae)?"viewenter":"viewleave";n.emit(r)},0)})},{threshold:yt});s.observe(t),n.on(T,()=>s.disconnect()),Ze(n,"viewenter",(function(){r.should_resume&&e.autopause&&!_t()&&n.togglePlay(!0)})),Ze(n,"viewleave",(function(){if(!e.autopause||_t())return;const t=!n.paused;r.locked=!0,n.pause(),setTimeout((function(){r.should_resume=t,r.locked=!1}),0)}))}function _t(){return t.find(e=>e.hasState("is-casting"))}function gt(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit("resize",n)});n.observe(e),t.on(T,()=>n.disconnect())}function Et(e){if("number"==typeof e&&!isNaN(e))return Number(e);if("string"==typeof e){const t=e.split(":");return Number(t[1])/Number(t[0])}return e}function wt(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let i=Et(e.ratio||.5625);r.style.paddingTop=100*i+"%";const s=[m,f];n.on(s,(function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})})),n.on(N,(function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=Et((null==e?void 0:e.ratio)||t||.5625);i!==o&&(i=o,r.style.paddingTop=100*o+"%")}))}class ExplorerPlan{constructor(){this.cleanUp=this.cleanUp.bind(this),this.render=this.render.bind(this),this.wireUp=this.wireUp.bind(this)}init(e,t,n){this.root=t,this.player=n,this.wireUp()}wireUp(){var e,t;this.cleanUp(),null===(e=this.player)||void 0===e||e.once(_,this.render),null===(t=this.player)||void 0===t||t.once(w,this.wireUp)}cleanUp(){var e,t,n,o;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo),null===(n=this.player)||void 0===n||n.off(_,this.render),null===(o=this.player)||void 0===o||o.off(w,this.wireUp)}render(){var e,t,n;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo);const o=(null===(n=this.root)||void 0===n?void 0:n.querySelector(".fp-ui"))||this.root;if(!o)return;const r=this._logo=document.createElement("a");r.href="https://explorer.flowplayer.com",r.target="_blank",Object.entries(St).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}const St={display:"block",opacity:"1",visibility:"visible",width:"33%","padding-top":"9%",position:"absolute","z-index":"9999",bottom:"25%",left:"10%","background-size":"cover","background-image":"url(https://static.flowplayer.com/explorer/explorer.svg)"},bt="flowplayer/"+_;function Ot(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(T,()=>document.removeEventListener(bt,t)),document.addEventListener(bt,t)}function Tt(e,t){const n=[];e.addEventListener("contextmenu",o=>{const r=o.timeStamp;for(n.push(r);n.length>3;)n.shift();n.length>=3&&n.every(e=>e-r<3e3)&&(console.debug("flowplayer/debug rendering info"),function(e,t){var n;!function(e){const t=e.querySelector(".debug-info");null==t||t.remove()}(e);const o=document.createElement("div");o.classList.add("debug-info");const r=Nt("flowplayer.version","3.7.0");o.append(r);const i=null===(n=null==t?void 0:t.hls)||void 0===n?void 0:n.constructor;if(i&&i.version){const e=Nt("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const Nt=(e,t)=>{const n=document.createElement("div");n.classList.add("row",e);const o=document.createElement("span");o.classList.add("attr"),o.textContent=e;const r=document.createElement("span");return r.textContent=t,r.classList.add("value"),n.append(o,r),n};function At(e,t){const n=function(){try{return localStorage.getItem("flowplayer/debug")}catch(e){return""}}(),o=(o,...r)=>{try{const i=(null==t?void 0:t.debug)||n;i&&e.match(i)&&console.log(`flowplayer/${e} -- ${o}`,...r)}catch(e){console.warn(e)}};return o.log=o,o}const It=At("core/retry");function Lt(e,t){const n={pending:void 0,count:0};var o;e.on("error",o=>{t.retry&&void 0===n.pending&&(++n.count,n.pending=function(e,t){return setTimeout(()=>{e.hasState("is-destroyed")||(t.pending=void 0,[O,L].forEach(t=>e.emit(t)),It("%s try",t.count))},3e3*t.count)}(e,n))}),e.on(_,()=>{n.count=0}),e.on(["src",O],()=>{n.pending&&(clearTimeout(n.pending),n.pending=void 0)}),e.on(L,(o=t=>{t.defaultPrevented||e.load()},e=>{setTimeout((function(){if(!e.defaultPrevented)return o(e)}),0)}))}const Rt=function(){const e=it(),t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function kt(n,o){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),kt;"string"==typeof o&&(o={src:o}),o||(o={}),o.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(o.token=window.__FLOWPLAYER_TOKEN);const r="string"==typeof n?document.querySelector(n):n;if(!r)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const i=r.querySelector("video.fp-engine");if(i)return i;const s=ut(o.token);if(!s.success)return ft({root:r,data:{reason:"token",details:s.message}});const a=new Map,l=nt(o,r);l.reaper=a,l._customElements=he,Object.defineProperty(l,"token",{value:"string"==typeof o.token?ct.id(o.token):"",writable:!1}),l.addEventListener(T,()=>{a.clear(),l.reaper=0,delete l.root}),l.root=r,o.token&&pt.from_token(o.token).is_granted(pt.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(l)&&t.push(l),tt(o,r,l),l.setAttrs(o),l.plugins=kt.extensions.map(e=>new e(kt,l)),ht(o,r,l),vt(o,r,l),gt(r,l),wt(o,r,l),Ot(l),Tt(r,l),Lt(l,o),l.plugins.forEach(e=>{try{e.init(o,r,l)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),l.setOpts(o),l.opts=o,o.src&&l.setSrc(o.src);const c=l.readyState;return c>0&&l.currentSrc&&l.emit(f),c>2&&l.currentSrc&&l.emit(E),l.emit("mount"),l.on("error:fatal",(function(e){ft({root:r,video:l,data:e.data||{}})})),setTimeout(Ye,0,document,"flowplayer:player:created",l),l}Object.assign(kt,Rt),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=he,o.defaultElements=V,o.version="3.7.0",o.commit="150bcafafbf4daa73b89428e7b714a7329c6333a",o.instances=t,o.extensions=e,o.support=n,o.events=R,o.states=ce,o.jwt=me,o.autoplay=ge,o.quality=_e}(kt),"object"==typeof document&&setTimeout(Ye,0,document,"flowplayer:umd",kt);var Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Dt(e){var t={exports:{}};return e(t,t.exports),t.exports}var xt=Dt((function(e,t){var n=Ct&&Ct.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};t.__esModule=!0,t.remove=t.downcase=t.pluck=t.merge=void 0,t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return n(n({},e),t)}),{})},t.pluck=function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return Object.keys(e).filter((function(e){return~n.indexOf(e)})).reduce((function(n,o){var r;return t.merge(n,((r={})[o]=e[o],r))}),{})},t.downcase=function(e){return(e||"").toString().toLowerCase()},t.remove=function(e,t){var n=e.lastIndexOf(t);return~n&&e.splice(n,1),e}})),Mt=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};t.__esModule=!0;var i=r(xt),s=function(){function e(){this.pending=[],this.open=[],this.stats={failures:0,ttl:0}}return e.of=function(){return new e},e.is_empty=function(e){return 0==e.pending.length},e.is_high_water=function(t){return t.open.length==e.MAX_OPEN_REQUESTS},e.maybe_spawn_req=function(t){if(e.is_empty(t))return t;if(e.is_high_water(t))return t;try{var n=e.lpop(t);n&&e.request(t,n)}catch(e){}},e.increment_failures=function(t){return t.stats.failures++,t.stats.failures>e.MAX_FAILURE_COUNT&&(t.stats.ttl=Date.now()+e.REQUEST_TTL_MS),t},e.handle_error=function(t,n){e.rm(t,n),e.increment_failures(t)},e.request=function(t,n){var o=n[0],r=n[1],i=n[2];if(!(Date.now()<t.stats.ttl)){var s=new XMLHttpRequest;t.open.push(s),s.timeout=e.REQUEST_TIMEOUT_MS,s.ontimeout=function(){e.handle_error(t,s)},s.onerror=function(n){e.handle_error(t,s)},s.onreadystatechange=function(){s.readyState==XMLHttpRequest.DONE&&e.rm(t,s),Math.floor(s.status/100)},s.onload=function(){e.rm(t,s),t.stats.failures&&t.stats.failures--},s.open(r,o),s.setRequestHeader("Content-Type","text/plain;charset=UTF-8");try{s.send(JSON.stringify(i))}catch(e){}}},e.rpush=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return n.forEach((function(n){t.pending.length>=e.MAX_PENDING||(t.pending.push(n),e.maybe_spawn_req(t))})),t},e.lpop=function(e){return e.pending.shift()},e.rm=function(e,t){return i.remove(e.open,t),e},e.MAX_OPEN_REQUESTS=3,e.MAX_PENDING=5,e.REQUEST_TIMEOUT_MS=4e3,e.REQUEST_TTL_MS=5e3,e.MAX_FAILURE_COUNT=3,e}();t.default=s})),Pt=Dt((function(e,t){var n=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(Mt);t.default=o.default.of()})),Ut=Dt((function(e,t){t.__esModule=!0,t.prepare_url=t.URL_PARAM=void 0,t.URL_PARAM=/:([a-zA-Z_]+)/g,t.prepare_url=function(e,n){return e.url.replace(t.URL_PARAM,(function(t){if((t=t.slice(1,t.length))in n)return n[t].toString();e.log.error(new Error("\n preparing url["+e.url+"] failed\n \n parameter["+t+"] not detected in params:\n \n "+JSON.stringify(n,null,2)+"\n "))}))}})),Ft=Dt((function(e,t){t.__esModule=!0,t.Log=void 0;var n=function(){function e(e){this.emitter=e}return e.prepare=function(e,t){var n=document.createEvent("Event");return n.initEvent(e,!1,!0),n.ns=e,n.data=t,n},e.of=function(t){return new e(t)},e.prototype.info=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.INFO,t))},e.prototype.error=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.ERROR,t))},e.prototype.warn=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.WARN,t))},e.NAMESPACE={INFO:"tracker:info",ERROR:"tracker:err",WARN:"tracker:warn"},e}();t.Log=n})),Bt=Dt((function(e,t){var n;t.__esModule=!0,t.Verb=void 0,(n=t.Verb||(t.Verb={})).POST="POST",n.PUT="PUT",n.GET="GET"})),Gt=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=Ct&&Ct.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,r++)o[r]=i[s];return o},s=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=s(Pt),l=s(Mt),c=r(Ut),u=r(xt),d=function(){function e(t,n){var o=this;void 0===n&&(n={});var r=this;if(this.emitter=t,this.url=n.url,this.log=Ft.Log.of(this.emitter),this.verb=n.verb,this.metadata=u.merge({},n.metadata||{}),this.rq=n.rq||a.default,this.events=n.events||[],this.required_keys=n.required_keys||[],this.optional_keys=n.optional_keys||[],this.listeners=[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),e.assert_emitter_api(this.emitter),void 0===e.verb[this.verb])throw new Error("invalid HTTP verb["+this.verb+"] passed");if("string"!=typeof this.url)throw new Error("invalid API url["+this.url+"] passed");e.TRACKERS.push(this),r.events.forEach((function(t){e.create_listener(o,t,(function(n){void 0===n&&(n={});var i=u.merge(r.metadata,{event_type:t},n.data||n),s=c.prepare_url(r,i),a=e.pluck_valid_keys(r,i),d=e.ensure_required_keys(r,a);if(d.length)return r.log.error("Tracker.validate_metadata() failed for \n Event["+t+"]\n missing keys: "+d+"\n payload:\n "+JSON.stringify(a,null,2));l.default.rpush(o.rq,[s,o.verb,a])}))}))}return e.of=function(t,n){return new e(t,n)},e.ensure_required_keys=function(e,t){return e.required_keys.filter((function(e){return!(e in t)}))},e.pluck_valid_keys=function(e,t){return u.pluck.apply(u,i([t],e.valid_keys))},e.merge_metadata=function(t,n){return void 0===n&&(n={}),t.metadata=e.pluck_valid_keys(t,u.merge(t.metadata,n)),t},e.assert_emitter_api=function(e){if("function"!=typeof(e||{}).addEventListener)throw new Error("Tracker() received an emitter that does not implement the addEventListener method");if("function"!=typeof(e||{}).removeEventListener)throw new Error("Tracker() received an emitter that does not implement the removeEventListener method")},e.create_listener=function(e,t,n){e.listeners.push([t,n]),e.emitter.addEventListener(t,n)},e.prototype.destroy=function(){var t=this;this.listeners.forEach((function(e){var n=e[0],o=e[1];return t.emitter.removeEventListener(n,o)})),delete this.rq,delete this.emitter,u.remove(e.TRACKERS,this)},e.prototype.put=function(t){return void 0===t&&(t={}),e.merge_metadata(this,t),this},e.TRACKERS=[],e.QUEUE=a.default,e.verb=Bt.Verb,e}();t.default=d})),Ht=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.API=t.Tracker=void 0;var s=i(Gt);t.Tracker=s.default;var a=r(Ut);t.API=a})),jt="ping",qt="display",Wt="view";const zt=["sitegroup_id","session_id","media_id","site_id","player_id","video_type"],Vt=["created","position"],Kt=["player_version","created","source","category","category_id","autoplay","muted","customer_user_id"];function Yt(e,t){return e.duration/1===e.duration&&Object.assign(t,function(e){const t=e/100;return{segment_duration:t,breakpoints:Array(...Array(100)).map((function(e,n){return Math.floor(n*t*1e3)/1e3}))}}(e.duration))}function Xt(e,t,n){if(!t.segment_duration&&!Yt(e,t))return;const o=function(e,t,n){const o=t.last_idx,r=n?99:Zt(e,t);return t.last_idx=r,r<=o?[]:t.breakpoints.slice(o,99==r?100:r).map((function(e){return t.breakpoints.indexOf(e)}))}(e,t,n);0!=o.length&&e.emit(jt,{position:o})}function Zt(e,t){return Math.min(Math.floor(e.currentTime/t.segment_duration),99)}function Qt(){try{return window.location!==window.parent.location?document.referrer:document.location.href}catch(e){return!1}}const Jt="vod",$t="live",en=[qt,jt,Wt];function tn(e,t,n){switch(null==t?void 0:t.kind){case"live":return function(e,t){const n=Date.now();n-t.last_tracked_ts<6e4||(t.last_tracked_ts=n,++t.ticks,e.emit(jt,{position:60*t.ticks}))}(e,t);case"vod":return Xt(e,t,"boolean"==typeof n&&n)}}function nn(e){const t=e.ads;return void 0!==t&&(void 0!==t.schedule&&("function"==typeof t.hasPreroll&&(t.currentRequests?t.currentRequests:!!t.adPlaying||!(!t.hasPreroll()||0!=t.nextIndex))))}class Analytics{init(e,t,n){if(!pt.from_token(e.token||"").is_granted(pt.permissions.ANALYTICS))return;if(n.hasState("consent-no-tracking"))return;if(n.analytics)return;const o=n.analytics={ticker:void 0,last_media_id:"",ended:!1},r={locked:!1,ttl:6e3,task:()=>{tn(n,o.ticker)}};const i={session_id:n.deviceId(),autoplay:n.autoplay,muted:n.muted,player_id:e.player_id,customer_user_id:e.customer_user_id,player_version:"3.7.0"},s=Ht.Tracker.of(n,{verb:Ht.Tracker.verb.POST,url:"https://ptm.flowplayer.com/:video_type/:sitegroup_id/:event_type",events:en,required_keys:zt,optional_keys:Kt.concat(Vt).slice(0),metadata:i});n.on(T,(function(){s&&s.destroy()})),n.on(N,(function(t){if(!s)return;const r=Fe(t,"data.metadata",{});if(!r.media_id)return;const i=Fe(s,"metadata.media_id");if(i&&r.media_id==i)return;const a=Fe(e,"analytics",{});s.put(r),s.put(a);const l=Fe(e,"metadata.live_start_time",e.live)?$t:Jt;s.put({video_type:l,source:e.source||Qt()||""}),o.ticker=e.live?{ticks:0,last_tracked_ts:Date.now(),kind:"live"}:{last_idx:0,segment_duration:0,breakpoints:[],kind:"vod"},o.ended=!1,n.emit(qt)}));let a=0;n.on(_,(function(){if(!s)return;if(a||function(e,t){return e.metadata.media_id&&e.metadata.media_id==t.last_media_id}(s,o))return;s.put({muted:n.muted});const e=nn(n);if(e)return a=Promise.resolve(e).then((function(){o.last_media_id=s.metadata.media_id,n.emit(Wt),a=0})).catch((function(){a=0}));o.last_media_id=s.metadata.media_id,n.emit(Wt)})),n.on("timeupdate",(function(){var t;s&&(a||nn(n)||o.ended||(!e.live&&n.currentTime+.25>=n.duration&&tn(n,o.ticker,!0),(t=r).locked||(t.locked=setTimeout((function(){return t.task(),function(e){return e.locked=!1,e}(t)}),t.ttl))))})),n.on(S,(function(){s&&o.ticker&&"vod"==o.ticker.kind&&function(e,t){Yt(e,t),t.last_idx=Zt(e,t)}(n,o.ticker)})),n.on(w,(function(){s&&function(e,t){t.ended||(t.ended=!0,tn(e,t.ticker))}(n,o)}))}}var on;function rn(e){switch(e){case on.MEDIA_PLAYBACK_ABORTED:return"media playback was aborted";case on.MEDIA_ERR_NETWORK:return"a network error occurred";case on.MEDIA_ERR_DECODE:return"unable to decode media content";case on.MEDIA_ERR_SRC_NOT_SUPPORTED:return"unsupported media type";case on.NO_INTERNET:return"no internet connection detected";case on.MIXED_CONTENT:return"cannot load insecure content in a secure context";default:return"an unknown error occurred"}}function sn(){}function an(e){try{return!!new URL(e)}catch(e){return!1}}rt(it(),Analytics),"undefined"!=typeof window&&window.matchMedia&&[A,I].forEach((function(e){window.matchMedia("(orientation: "+e+")").addListener((function(n){t.length&&t.forEach((function(t){n.matches&&t.emit(e)}))}))})),function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.MEDIA_PLAYBACK_ABORTED=1]="MEDIA_PLAYBACK_ABORTED",e[e.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MIXED_CONTENT=1001]="MIXED_CONTENT",e[e.NO_INTERNET=1002]="NO_INTERNET"}(on||(on={}));function ln(e,t){if(t.message)return t.message;if(t.stack)return t.stack;const n=t.code||-1,o=rn(n);return e.i18n("media_errors."+n,o)}const cn=()=>!0===(navigator||{}).onLine;function un(e){try{return"https:"===location.protocol&&"http:"==function(e){const t=document.createElement("a");return t.href=e,t}(e).protocol}catch(e){return!1}}function dn(e,t,n){const o=n.togglePlay;n.on("error",(function(e){const t=e.data||n.error,r="Error: %s\n"+(null===(i=(new Error).stack)||void 0===i?void 0:i.split("\n").slice(2).join("\n"));var i;setTimeout((function(){const i=Me(n,k);if(e.defaultPrevented||!i||n.root.querySelector("#qul_error"))return;if("AbortError"==t.name)return;n.setState("is-error",!0),n.togglePlay=sn;const s=function(e,t){return{code:"http:0"===t.code?fn(e):t.code,message:ln(e,t)}}(n,t);console.error(r,s.message);let a=Me(n,"flowplayer-error");a||(a=ye(n,"flowplayer-error"),i.append(a)),Ye(a,"error",{data:t,formatted_data:s}),n.once(y,()=>{pn(n,o)})}))})),n.on(O,()=>pn(n,o))}function pn(e,t){const n=Me(e,"flowplayer-error");e.togglePlay=t,e.opt("retry")&&e.setState(te,!0),e.setState("is-error",!1),null==n||n.remove()}function fn(e){return un(e.original_src)?{code:on.MIXED_CONTENT}:cn()?{code:on.MEDIA_ERR_NETWORK}:cn()?{code:on.UNKNOWN}:{code:on.NO_INTERNET}}var mn=Object.freeze({__proto__:null,NO_FULLSCREEN:1,NO_VOLUME_CONTROL:2,NO_MUTE:4,LOGO_ON_RIGHT:8,USE_DRAG_HANDLE:16,USE_PLAY_2:32,USE_PLAY_3:64,USE_THIN_CONTROLBAR:128,NO_TITLE:256,NO_DESCRIPTION:512,NO_CONTROLS:1024,NO_DURATION:2048,NO_HEADER:4096,AUDIO_ONLY:8192,NO_TOUCH_ZONES:16384,LOGO_ON_BOTTOM:32768});function hn(e,t,n){let o=()=>document.fullscreenElement,i="fullscreenchange";if(!Element.prototype.requestFullscreen){const e=Element.prototype,t=document;e.webkitRequestFullScreen&&(e.requestFullscreen=e.webkitRequestFullScreen,t.fullscreenEnabled=!0),t.webkitCancelFullScreen&&(document.exitFullscreen=t.webkitCancelFullScreen),i="webkit"+i,o=()=>t.webkitCurrentFullScreenElement}const s=()=>n.getFullsceenTarget?n.getFullsceenTarget():t;n.toggleFullScreen=function(e,t){if(n.ios_fullscreen_disabled)return;if("boolean"!=typeof e&&(e=!n.hasState("is-fullscreen")),yn(n)&&(e?function(e){e.getAttribute("playsinline")&&e.removeAttribute("playsinline");e.getAttribute("webkit-playsinline")&&e.removeAttribute("webkit-playsinline");e.webkitEnterFullScreen()}(n):function(e,t){e.getAttribute("playsinline")||e.setAttribute("playsinline","");e.getAttribute("webkit-playsinline")||e.setAttribute("webkit-playsinline","");t||e.webkitExitFullScreen();e.togglePlay(!1),e.hasState(se)||e.setState(se,!0)}(n,t)),!document.fullscreenEnabled)return;const r=s();if(e)return r.requestFullscreen();o()===r&&document.exitFullscreen()},yn(n)&&(n.ios_fullscreen_disabled=!0,n.once("beforeplay",(function(){n.ios_fullscreen_disabled=!1})),n.on("webkitendfullscreen",(function(){n.toggleFullScreen(!1,!0)}))),setTimeout(()=>{const e=s();e.addEventListener(i,(function(){const t=o(),r=t===e||t==n;n.emit(r?d:p),n.setState("is-fullscreen",r)}))},0),!1!==e.doubleclick&&t.addEventListener(r,(function(e){var t;e.target&&(null===(t=e.target)||void 0===t?void 0:t.classList.contains("fp-ui"))&&n.toggleFullScreen()}))}function yn(e){return n().ios&&"function"==typeof e.webkitEnterFullScreen&&"function"==typeof e.webkitExitFullScreen}function vn(e,t){const n=e.seekable;if("object"!=typeof e.opts||0==n.length)return{head:0,tail:0};const o=n.end(n.length-1),r=t||e.live_state.dvr_window;return{head:o,tail:"number"!=typeof r||o-r<0?n.start(0):o-r}}function _n(e){return e.opt("live",!1)||e.duration>=Number.MAX_SAFE_INTEGER}function gn(e){return isFinite(e.duration)?e.duration:0==e.seekable.length?0:vn(e).head}function En(e){return function(e){return vn(e).head}(e)-.5}function wn(e,t,n){if(!n.reaper)return;const o=document.createDocumentFragment(),r=ye(n,k),i=ye(n,C);t.append(i),o.append(r),n.reaper.set("ui",r),~t.className.indexOf("use-play-")||t.classList.add("use-play-1"),function(e,t,n){const o=Ue("fp-footer");t.append(o),n.on(N,(function(e){var t,n;const r=null===(t=e.data)||void 0===t?void 0:t.description,i=null===(n=e.data)||void 0===n?void 0:n.title;if(o.innerHTML="","string"==typeof i){const e=Ue("fp-title");e.innerText=i,o.append(e)}if("string"==typeof r){const e=r.split(" "),t=Ue("fp-desc");for(t.innerText=e.join(" "),o.append(t);e.length>1&&t.scrollHeight>t.offsetHeight;)e.pop(),t.innerText=e.join(" ")+"..."}}))}(0,t,n),dn(0,0,n),t.appendChild(o),[s,a].forEach(e=>{t.addEventListener(e,(function(e){n.setState("is-hovered",e.type==s),n.setState("is-accessibility",!1)}))}),hn(e,t,n),n.on("volumechange",(function(){const e=0==n.volume||n.muted;n.setState("is-muted",e),n._storage.setItem("mute",e.toString())})),"true"==n._storage.getItem("mute")&&(n.muted=!0,n.setState("is-muted",n.muted));const u=n._storage.getItem("volume");u&&!isNaN(Number(u))&&(n.volume=Number(u)),n.emit("volumechange"),n.on("dvr/window",t=>{e.live&&(n.live_state.dvr=n.seekable.length>0&&function(e,t,n){if(0==t)return!0;const o=vn(e,n);return o.head-o.tail>=t}(n,e.seconds_to_dvr||60,t.detail),n.live_state.dvr_window=t.detail)}),n.on("live",()=>{const e=setInterval(()=>{if(n.opts.live&&!n.hasState("is-error")&&0!=n.reaper||(n.setState(ee,!1),clearInterval(e)),0==n.seekable.length)return;const t=function(e){var t;const n=e.currentTime,o=vn(e),r=!e.hasState("is-chromecast-playing")&&(null===(t=e.hls)||void 0===t?void 0:t.liveSyncPosition);return{progress:Math.min(100,Math.max(0,(n-o.tail)/(o.head-o.tail)*100)),is_live:n-(r||o.head)>=-10}}(n);n.hasState(ne)==t.is_live&&n.setState(ne,!t.is_live),n.live_state.dvr&&n.emit("dvr",t.progress)},200)}),n.on(f,(function(){n.setOpts({live:_n(n)})})),n.on("durationchange",(function(e){const t=_n(n),o=t?gn(n):e.data||n.duration;isNaN(o)||n.setOpts({live:t,duration:o})})),n.on(["playlist/advance","src"],t=>{if(n.root.classList.contains("is-livecountdown"))return Sn(n,e);n.currentSrc&&("src"===t.type&&["is-playlist",le].some(e=>n.root.classList.contains(e))||Sn(n,e))}),n.on(N,(function(n){var o,r;e.seekable=void 0===(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.seekable)||n.data.seekable;const i=null===(r=n.data)||void 0===r?void 0:r.ui;if("number"!=typeof i)return;const s=t.classList;s.toggle("use-play-1",!(32&i||64&i)),s.toggle("use-play-2",(32&i)>0),s.toggle("use-play-3",(64&i)>0),s.toggle("use-thin-controlbar",(128&i)>0),s.toggle("no-title",(256&i)>0),s.toggle("no-description",(512&i)>0),s.toggle("logo-on-right",(8&i)>0),s.toggle("logo-on-bottom",(32768&i)>0),s.toggle("use-drag-handle",(16&i)>0),s.toggle("no-controls",(1024&i)>0),s.toggle("no-duration",(2048&i)>0),s.toggle("no-header",(4096&i)>0),s.toggle("no-mute",(4&i)>0),s.toggle("no-volume",(2&i)>0),s.toggle("no-fullscreen",(1&i)>0),s.toggle("no-touch-zones",(16384&i)>0)}));let d=null;[l,c].forEach(e=>r.addEventListener(e,(function(e){n.hasState("is-touch-device")&&e.type===l||("number"==typeof d&&clearTimeout(d),n.setState("is-hovered",!0),d=0==n.paused&&setTimeout((function(){n.setState("is-hovered",!1)}),2e3))})))}function Sn(e,t){delete t.live_start_time,e.setOpts({live:!1}),e.live_state.dvr=void 0,e.live_state.dvr_window=void 0,delete t.live,delete t.poster,delete t.duration,delete t.title,delete t.description}function bn(e,t,n){if(pt.from_token(e.token||"").is_granted(pt.permissions.NO_METERING))return;ct.id(e.token||"")&&n.once(_,async()=>await async function e(t,n){const o=ct.id(n||"");t.once("src",()=>{t.once(_,()=>e(t,n))}),function(e,t){if(!function(e){return pt.from_token(e).is_granted(pt.permissions.WOWZA_VIDEO)}(t))return;if(function(e){try{return new URL(e).hostname.endsWith(".wowza.com")}catch(e){return!1}}(e.original_src))return;e.emit("error:fatal",{reason:"token",details:"This token only allows wowza video sources"})}(t,n);if(401==(await fetch("https://pmi.flowplayer.com/in",{method:"POST",body:JSON.stringify({token_id:o,factor:1,rnd:Math.random().toString(36).substring(2)})})).status)return t.emit("error:fatal",{reason:"token",details:"The token online validation failed"})}(n,e.token||""))}var On={ads:{ad:"Ad",ads:"Ads",advertisement:"Advertisement"},audio:{button_txt:"Audio",menu_title:"Audio"},core:{exit_fullscreen:"Exit fullscreen",fullscreen:"Fullscreen",mute:"Mute",pause:"Pause",play:"Play",unmute:"Unmute",volume:"Volume"},ovp:{starting_in:"Countdown"},playlist:{cancel:"Cancel",up_next:"Up next"},qsel:{menu_title:"Quality"},share:{clipboard_failure:"Access to clipboard failed",clipboard_success:"The text is now on your clipboard",embed:"Embed",link:"Link",menu_title:"Share"},speed:{menu_title:"Speed"}};class I18n{init(e,t,n){n.reaper&&n.reaper.set("translations",je(I18n,e,"en"))}}I18n.en=On;const Tn="rebuffer";var Nn=Object.freeze({__proto__:null,RECORD:"health:record",REBUFFER:Tn,DISPLAY:"display"});const An=navigator;function In(e){var t,n;const o=null===(t=e.hls)||void 0===t?void 0:t.bandwidthEstimate;return o?1e-6*o:(null===(n=An.connection)||void 0===n?void 0:n.downlink)||-1}function Ln(e,t){return async function(e,t){try{await fetch(e,{body:t,method:"POST",mode:"no-cors"})}catch(e){}}(e,JSON.stringify({events:t}))}const Rn="https://ljsp.lwcdn.com".concat("/web/public/countdown/time.json"),kn=window,Cn=kn._flowplayerTimekeeper||(kn._flowplayerTimekeeper={});const Dn=e=>{switch(e){case!0:return ge.ON;case!1:return ge.OFF;default:return e}},xn=[],Mn="https://ihi.flowplayer.com/v1/health/events";function Pn(e){if(e.suspended)return;const t=xn.slice(0);xn.length=0,0!=t.length&&(e.logger.log(`:dispatch events={${t.length}}`),Ln(function(){try{return"undefined"==typeof window?Mn:window.__FLOWPLAYER_INSIGHTS_URL?window.__FLOWPLAYER_INSIGHTS_URL:Mn}catch(e){return Mn}}(),t))}async function Un(e,t,n){const o=await Bn();xn.push(Object.assign(t,o)),e.logger.log(":enqueue",t.event,t),xn.length<10&&!n||Pn(e)}const Fn=()=>{var e,t;try{const n=window;return null===(t=null===(e=null==n?void 0:n.google)||void 0===e?void 0:e.ima)||void 0===t?void 0:t.VERSION}catch(e){return}},Bn=async()=>{const e=Date.now();try{return{adjusted_time:e-await async function(){const e=Cn.cachedServerOffset;if(e)return e;const t=Cn.pendingRequest||(Cn.pendingRequest=fetch(Rn)),n=await t,o=parseInt(n.headers.get("age")||"0"),r=await n.json(),i=Date.now()-r.millisUtc-1e3*o;return Cn.cachedServerOffset=i,Cn.cachedServerOffset}(),client_time:e}}catch(t){return{client_time:e}}},Gn=(e,t)=>Object.assign(e,{detail:t}),Hn=(e,{event:t,media_session_id:n,session_id:o})=>({event:t,media_session_id:n,session_id:o,device_id:e.deviceId(),version:"3.7.0",commit:"150bcafafbf4daa73b89428e7b714a7329c6333a",ima_sdk_version:Fn(),preload:e.opt("preload"),autoplay:Dn(e.opt("autoplay")),live:e.opt("live"),dvr:!!e.live_state.dvr,source:e.original_src,downlink_mbs:In(e),page_url:Qt(),player_id:e.opt("metadata.player_id"),media_id:e.opt("metadata.media_id"),site_id:e.opt("metadata.site_id"),category_id:e.opt("metadata.category_id"),sitegroup_id:e.opt("metadata.sitegroup_id"),token:e.token,plugins:e.plugins.map(e=>e.constructor.name).sort((e,t)=>e.localeCompare(t)),current_time:e.currentTime,external_media_id:e.opt("external_media_id")}),jn=e=>({bitrate:null==e?void 0:e.bitrate,resolution:null==e?void 0:e.attrs.RESOLUTION,frame_rate:null==e?void 0:e.attrs["FRAME-RATE"]});function qn(e,t,n,o){const r=Hn(t,e.eventInfo(n)),{before:i,after:s}=o;Un(e,((e,t,n)=>Object.assign(e,{state:{before:t,after:n}}))(r,jn(i),jn(s)))}const Wn=(e,t)=>{let n=null;return(...o)=>{null!==n&&(clearTimeout(n),n=null),n=setTimeout(()=>t(...o),e)}},zn=We();class Health{constructor(e,t){this.session_id=zn,this.suspended=!1,this.logger=At("health",t.opts),this.media_session_id=We(),this.analyticsLoop=setInterval(()=>Pn(this),2e3),t.on(T,()=>clearInterval(this.analyticsLoop));const n=this;if(t.health={get media_session_id(){return n.media_session_id},set media_session_id(e){n.media_session_id=e},get session_id(){return n.session_id},set session_id(e){n.session_id=e},toggle(e){e?n.resume():n.suspend()}},!Health._UNLOAD_SUBSCRIBED){Health._UNLOAD_SUBSCRIBED=!0;const t=t=>e.instances.forEach(e=>e.emit(t.type));document.addEventListener("visibilitychange",e=>{"hidden"==document.visibilityState&&t(e)}),window.addEventListener("pagehide",t)}}eventInfo(e){return{event:e,media_session_id:this.media_session_id,session_id:this.session_id}}suspend(){this.suspended=!0,clearInterval(this.analyticsLoop)}resume(){this.suspended=!1,this.analyticsLoop=setInterval(()=>Pn(this),2e3)}init(e,t,n){!function(e){e.on(g,(function(t){e.seeking||e.networkState===e.NETWORK_LOADING&&e.readyState!==e.HAVE_NOTHING&&e.emit(Tn)}))}(n),n.on("display",e=>{Un(this,Hn(n,this.eventInfo(e.type)),!0)}),n.on("health:record",({detail:e})=>{const t=Hn(n,this.eventInfo(e.event));Object.assign(t,e.detail||{}),Un(this,t)}),[E,y,i,f,m,h,g,Tn].forEach(e=>{n.on(e,e=>{Un(this,Hn(n,this.eventInfo(e.type)))})}),[_,v,b,S,w,d,p].forEach(e=>{n.on(e,e=>{Un(this,Hn(n,this.eventInfo(e.type)))})}),n.on("volumechange",Wn(800,e=>{const t=Hn(n,this.eventInfo(e.type));Un(this,Gn(t,{volume:parseFloat(n.volume.toFixed(2)),muted:n.muted}))})),n.on("resize",Wn(800,e=>{const o=Hn(n,this.eventInfo(e.type));Un(this,Gn(o,{height:t.clientHeight,width:t.clientWidth}))})),n.on("hls/failover",e=>{const t=Hn(n,this.eventInfo(e.type)),o=e.detail,{reason:r,from:i}=o;Un(this,Gn(t,{reason:r,from:i}))}),n.on("qualitychange",({type:e,detail:t})=>{switch(t.kind){case"hls":return qn(this,n,e,t)}});let o=Date.now()+5e3;n.on("timeupdate",e=>{if(Date.now()<o)return;o=Date.now()+5e3;const t=Hn(n,this.eventInfo(e.type));var r;Un(this,Gn(t,{duration:(r=n.duration,Number.isFinite(r)?r:r===1/0?-1:void 0)}))}),n.addEventListener("error",e=>{const t=Hn(n,this.eventInfo(e.type)),o=e.error||n.error;if(!o)return Un(this,t,!0);const r=o.code,i={error_message:o.message||rn(r),error_code:r,error_stack:o.stack||""};return Un(this,Gn(t,i),!0)}),n.on("src",e=>{var t;const o=null===(t=e.detail)||void 0===t?void 0:t.src;if("string"!=typeof o)return;if(!an(n.original_src))return;if(!an(o))return;if(o==n.original_src)return;this.media_session_id=We();Un(this,Hn(n,this.eventInfo(e.type))),Pn(this)}),n.on("visibilitychange",e=>{Un(this,Hn(n,this.eventInfo(e.type))),Pn(this)})}}Health.events=Nn,Health._UNLOAD_SUBSCRIBED=!1,rt(window,Health);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class FlowplayerLogo extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-logo");const t={logo:""};e.on(N,e=>{var n;const o=t.logo,r=(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)||"";o!=r&&(t.logo=r,this.set_logo(r,e.detail.logo_alt_text,e.detail.logo_href))})}set_logo(e,t,n){this.innerHTML="";const o=document.createElement("img");if(!e)return;if(o.src=e,t&&(o.alt=t),!n)return this.append(o);const r=document.createElement("a");r.href=n,r.append(o),this.append(r)}}class FlowplayerHeaderDuration extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-duration"),e.on(N,e=>{var t;const n=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.duration)||NaN;this.innerText=isFinite(n)?Ge(n):""})}}const Vn={name:"fp-fullscreen",translation_key:"core.fullscreen"},Kn={name:"fp-fullscreen-exit",translation_key:"core.exit_fullscreen"},Yn={name:"fp-play",translation_key:"core.play"},Xn={name:"fp-pause",translation_key:"core.pause"},Zn={translation_key:"core.mute",name:"fp-volume-mute-unmute"},Qn={translation_key:"core.play",name:"fp-small-play"},Jn={translation_key:"core.pause",name:"fp-small-pause"},$n={name:"fp-fast-forward"},eo={name:"fp-rewind"};class FlowplayerIcon extends FlowplayerComponent{constructor(e,t){super(e),this.classList.add("fp-icon",t.name),t.title&&this.setAttribute("title",t.title),t.title&&this.setAttribute("aria-label",t.title),t.translation_key&&this.setAttribute("aria-label",e.i18n(t.translation_key)),this.setAttribute("tabindex","0"),this.setAttribute("focusable","true")}}document.addEventListener(o,(function(e){this.active_menu&&!e.composedPath().includes(this.active_menu)&&(Array.from(document.querySelectorAll(".fp-engine")).forEach(e=>{var t;const n=e.root.querySelector("details[open].fp-menu-container");n&&(n.open=!1,null===(t=n.querySelector("summary"))||void 0===t||t.removeAttribute("aria-expanded"),e.root.classList.toggle("has-menu-opened",!1))}),this.active_menu=void 0)}));const to={passive:!0};var no;function oo(e,t){let n=0,o=-1,r=-1;const i=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),s=e.classList;e.id=i,s.remove(no.GRABBING),s.remove(no.TOUCHING);const a=t.onseek||sn,d=t.onstart||sn,p=t.onend||sn,f=t.onmouse||sn,m=t.ontouch||sn,h=t.ontouchend||sn;function y(t){!function(){const t=e.getBoundingClientRect();n=t.left,o=t.width}();let r=(function(e){return"function"==typeof window.TouchEvent&&e instanceof TouchEvent}(t)?t.changedTouches[0].pageX:t.pageX)-n;return r>o&&(r=o),r<0&&(r=0),r/o*100}function v(t){const n=y(t);n!=r&&(a(e,n),r=n)}return e.addEventListener("touchstart",(function(t){ro(e,t)&&(s.add(no.TOUCHING),io(e.parentElement)&&(s.add(no.GRABBING),m(e,y(t)),d(e,y(t)),v(t)))}),to),e.addEventListener(c,(function(t){v(t),f(e,y(t))}),to),e.addEventListener(u,(function(t){setTimeout((function(){s.remove(no.TOUCHING)}),500),ro(e,t)&&(s.remove(no.GRABBING),h(e,y(t)),p(e,y(t)),o=0)}),to),e.addEventListener("touchcancel",(function(){s.remove(no.GRABBING,no.TOUCHING),o=0}),to),e.addEventListener("mousedown",(function(t){s.contains(no.TOUCHING)||(document.addEventListener(l,v),s.add(no.GRABBING),d(e,y(t)),t.preventDefault(),v(t))})),e.addEventListener(l,(function(t){s.contains(no.TOUCHING)||f(e,y(t))})),document.addEventListener("mouseup",(function(t){s.contains(no.TOUCHING)||(document.removeEventListener(l,v),s.contains(no.GRABBING)&&(s.remove(no.GRABBING),p(e,y(t)),o=0))})),e}function ro(e,t){const n=t.target;return!!n&&(n&&!n.closest(e.id)||!io(e.parentElement)||!e.classList.contains(no.TOUCHING))}function io(e){if(!e)return!1;const t=window.getComputedStyle(e);return"0"!==t.width&&"0"!==t.height&&"0"!==t.opacity&&"none"!==t.display&&"hidden"!==t.visibility}!function(e){e.GRABBING="has-grab",e.TOUCHING="has-touch"}(no||(no={}));class FlowplayerVolumeBar extends FlowplayerComponent{constructor(e){super(e),this.className="fp-volume";const t=e.root.classList,n=t.contains("is-tiny")?6:t.contains("is-small")?8:10,o=Array.from({length:n}).map(()=>{const e=document.createElement("i");return e.className="fp-tick",e});this.append(...o),oo(this,{onseek:(t,n)=>{n>0&&(e.muted=!1,e._storage.removeItem("mute")),e._storage.setItem("volume",(e.volume=n/100).toString()),this.adjustVolumeSlider(e.volume)}}),this.setAttribute("tabindex","0"),this.setAttribute("role","slider"),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","1"),this.setAttribute("aria-label",e.i18n("core.volume","volume")),e.on("volumechange",()=>{const t=0==e.volume||e.muted;t&&this.adjustVolumeSlider(0);const n=e.opt("ui");this.classList.contains(no.GRABBING)||t&&"number"==typeof n&&(4&n)>0||this.adjustVolumeSlider(e.volume)})}adjustVolumeSlider(e){this.setAttribute("aria-valuenow",e.toString()),this.setAttribute("aria-valuetext",Math.round(100*e)+"%");const t=Array.from(this.querySelectorAll(".fp-tick")),n=Math.round(e*t.length);t.forEach((e,t)=>{e.classList.toggle("fp-color",t<n)})}}function so(e,t){if(!e.parentElement)return;const n=e.clientWidth/e.parentElement.clientWidth*100/2;e.style.left=t-n+"%",e.style.display="block"}function ao(e,t){if(isNaN(e.duration))return;const n=e.buffered;n.length&&(t.style.width=Math.min(n.end(n.length-1)/e.duration*100,100)+"%")}function lo(e,t){e.style.width="0",t.style.display="none"}function co(e,t,n){if(!t.seekable||0==t.seekable.length)return;so(n,e);const o=vn(t),r=(100-Math.max(0,Math.min(e,100)))/100*(o.head-o.tail);n.innerText="-"+Ge(r)}function uo(e,t){e/=100,t.currentTime=function(e,t){if(t>1||t<0)return console.warn("cannot calculate a percent outside of range(0..1)"),0;const n=vn(e);return n.tail+t*(n.head-n.tail)}(t,e)}function po(e,t){e.style.width="0",t.style.display="none"}class FlowplayerTimelineBar extends FlowplayerComponent{constructor(e){let t;super(e),this.bufferEle=Ue("fp-buffer"),this.progress=Ue("fp-progress","fp-color"),this.tooltipEle=Ue("fp-timestamp"),this.proposedSeekBar=Ue("fp-hover"),this.dragger=Ue("fp-dragger","fp-color"),this.classList.add("fp-timeline","fp-bar"),this.tooltipEle.style.display="none",this.setAttribute("role","slider"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",e.i18n("timeline","Timeline")),this.setAttribute("aria-valuenow","0"),this.progress.append(this.dragger),this.append(this.bufferEle,this.progress,this.proposedSeekBar,this.tooltipEle);const n=requestAnimationFrame;let o=void 0;const r=()=>{var n;0==e.reaper||t.live||(n=e,this.progress.style.width=n.currentTime/n.duration*100+"%",o=void 0,e.paused||this.classList.contains(no.GRABBING)||o||(o=setTimeout(r,200)))},i=()=>!!this.player.opt("seekable",!0)&&!isNaN(this.player.duration);oo(this,{onseek:(n,o)=>{if(i())switch(!!t.live){case!0:co(o,e,this.tooltipEle);break;case!1:!function(e,t,n){const o=t.duration*(e/100);if(t.disabled&&o>t.currentTime)return!1;n.style.width=e+"%",t.currentTime=o}(o,e,this.progress),so(this.tooltipEle,o)}},onstart:()=>{i()&&(e.emit("timeline/gesture/start"),!e.hasState("is-casting")&&e.setState(J,!0),t.live||function(e){e.style.display="block"}(this.tooltipEle))},onend:function(o,i){n(r),0!=t.seekable&&t.live&&uo(i,e)},ontouchend:()=>{t.live?po(this.proposedSeekBar,this.tooltipEle):lo(this.proposedSeekBar,this.tooltipEle),setTimeout(()=>e.emit("timeline/gesture/end"),0)},onmouse:(n,o)=>{if(i()&&(e.emit("timeline/gesture/move",{percent:o}),!this.classList.contains(no.GRABBING)))switch(!!t.live){case!0:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),co(o,e,this.tooltipEle);break;case!1:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),function(e,t,n){if(isNaN(e)||isNaN(t.duration))return;so(n,e),n.innerHTML="";const o=document.createElement("span");o.innerText=Ge(e/100*t.duration),n.append(o)}(o,e,this.tooltipEle)}}}),e.on(N,(function(e){e.data&&(t=e.data)})),e.on(_,()=>n(r)),e.on(h,()=>{0==e.reaper||t.live||ao(e,this.bufferEle)}),e.on("dvr",e=>{this.progress.style.width=e.detail+"%"}),e.on("timeupdate",()=>{0!=e.reaper&&(n(r),this.setAttribute("aria-valuenow",e.currentTime+""),this.setAttribute("aria-valuetext",Math.round(e.currentTime)+e.i18n("core.sec","sec")),t.live||ao(e,this.bufferEle))}),e.on(f,()=>{0!=e.reaper&&(t.live||ao(e,this.bufferEle))}),e.on("durationchange",t=>{if(0==e.reaper)return;const n=_n(e)?gn(e):t.data||e.duration;isNaN(n)||(this.setAttribute("aria-valuemax",n+""),this.setAttribute("aria-valuemin","0"))}),this.addEventListener(a,()=>{e.emit("timeline/gesture/end"),t.live?po(this.proposedSeekBar,this.tooltipEle):lo(this.proposedSeekBar,this.tooltipEle)})}}class FlowplayerChaptersTimelineBar extends FlowplayerTimelineBar{constructor(e){super(e),this.handleChapters(e)}handleChapters(e){const t=document.createElement("div");let n;this.addEventListener("chapters:new",e=>{t.innerText="",this.querySelectorAll(".fp-chapter").forEach(e=>this.removeChild(e)),e.data&&e.data.forEach(e=>{const o=document.createElement("div");o.className="fp-chapter",o.style.left=e.left,o.style.bottom=o.style.top="0",o.style.width=e.width,o.title=e.title,o.onmouseover=()=>{t.innerText=e.title},o.onmouseleave=()=>{t.innerText=n||""},this.appendChild(o)})}),this.addEventListener("chapter:changed",o=>{var r;const i=o.data;i&&(t.parentNode||(null===(r=Me(e,D))||void 0===r||r.insertAdjacentElement("beforebegin",t),t.classList.toggle("fp-togglable",!0),t.classList.toggle("fp-chapter-info",!0)),n=i,t.innerText=i)})}}class FlowplayerLiveStatus extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-live-status");const t=Ue("fp-live-text"),n=Ue("fp-live-indicator","fp-color");t.textContent="live",this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.append(n,t),this.addEventListener(o,(function(){!function(e){try{e.dvr_offset=0,e.currentTime=En(e)}catch(e){console.warn("failed to seek to now: %j",e)}}(e)}))}}class FlowplayerDuration extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-duration"),this.setAttribute("aria-hidden","true"),e.on(N,n=>{if(0==e.reaper||!n.data)return;t=n.data;const o=_n(e)?NaN:n.data.duration||0;if(isNaN(o)||o>=Number.MAX_SAFE_INTEGER)return this.style.display="none";this.style.display="inline-block",this.innerText=Ge(o)}),e.on(f,()=>{var n,o;0==e.reaper||t.live||(o=this,(n=e).duration&&(o.innerText=Ge(n.duration)))})}}class FlowplayerElapsedTime extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-elapsed"),this.innerText=Ge(0),this.setAttribute("aria-hidden","true"),e.on(N,e=>{e.data&&(t=e.data)}),e.on("timeupdate",()=>{var n;0!=e.reaper&&(t.live?(n=e,this.innerText=Ge(n.currentTime)):function(e,t){t.innerText=Ge(e.currentTime)}(e,this))})}}class FlowplayerControlButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-btns","fp-small-switch");const t=ye(e,"flowplayer-small-pause-icon"),n=ye(e,"flowplayer-small-play-icon");t.addEventListener("click",(function(){e.togglePlay(),setTimeout((function(){n.focus&&n.focus()}),100)})),n.addEventListener("click",(function(){e.togglePlay(),setTimeout((function(){t.focus&&t.focus()}),100)})),this.append(t,n)}}class FlowplayerLeftRightZone extends FlowplayerComponent{constructor(e,t){super(e),this.classList.add(t);const n=this.classList.contains("fp-left-zone")?-1:1,o=document.createElement("span"),r=ye(e,this.classList.contains("fp-left-zone")?W:"flowplayer-fast-forward-icon");r.removeAttribute("tabindex"),o.classList.add("fp-zone-seconds"),this.append(o,r);e.on(S,()=>{o.innerText=""}),e.on("seek:queued",e=>{const t=e.data;if(!t)return;if("number"!=typeof t.offset)return;const n=t.offset;if(0==n)return this.reset_zone();n>0&&this.classList.contains("fp-right-zone")||n<0&&!this.classList.contains("fp-right-zone")?this.render_zone_state(n):this.reset_zone()}),e.on("seek:cancel",()=>{this.reset_zone()}),this.reset_zone(),this.addEventListener(u,(function(t){isNaN(e.duration)||isNaN(e.currentTime)||16384&e.opt("ui")||e.hasState(oe)||!e.hasState("will-seek")&&!e.hasState(se)||e.enqueueSeek(5*n)&&(t.stopPropagation(),t.preventDefault())}))}reset_zone(){const e=this.querySelector(".fp-zone-seconds");e&&(e.innerText="")}render_zone_state(e){const t=this.querySelector(".fp-zone-seconds");t&&(t.innerText=Math.abs(e)+"")}}class FlowplayerError extends FlowplayerComponent{constructor(e){super(e),this.className="fp-error",this.message=document.createElement("p"),this.message.className="error-message",this.append(this.message),this.addEventListener("error",e=>{const t=e.detail;t&&(this.message.textContent=t.formatted_data.message)})}}class FlowplayerHeaderLeftRight extends FlowplayerComponent{constructor(e,t,...n){super(e),this.className=t;const r=e.createComponents(...n);this.append(...r),"fp-left"!==t&&r.forEach(t=>{t.addEventListener(o,()=>e.toggleFullScreen())})}}class FlowplayerMiddleWait extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-wait"),Array(...Array(4)).map((e,t)=>t).forEach(()=>{this.append(document.createElement("b"))})}}class FlowplayerMiddleZone extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-middle-zone");const t=e.createComponents(H,"flowplayer-middle-buttons");this.append(...t)}}class FlowplayerMiddleButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-switch"),[j,q].forEach(t=>{const n=ye(e,t);n.removeAttribute("tabindex"),this.append(n)})}}class FlowplayerVolumeControl extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-volume-control");const t=ye(e,z);this.append(t),!n().ios&&this.append(ye(e,U)),t instanceof FlowplayerIcon&&t.addEventListener(o,(function(){e.toggleMute()}))}}class FlowplayerHeader extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-header"),this.append(...e.createComponents("flowplayer-header-left-zone","flowplayer-header-right-zone")),e.reaper&&e.reaper.set("header",this)}}class FlowplayerControls extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-controls","fp-togglable"),this.append(...e.createComponents("flowplayer-control-buttons",x,M,P,"flowplayer-control-duration","flowplayer-volume-control"))}}class FullscreenIcon extends FlowplayerIcon{constructor(e,t){super(e,t),this.setAttribute("role","button")}}class FlowplayerMiddle extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-middle"),this.append(...e.createComponents("flowplayer-middle-left-zone",G,"flowplayer-middle-right-zone")),this.setAttribute("tabindex","0"),e.reaper&&e.reaper.set("middle",this),this.handleClick(e),this.handleTouch(e),e.once("beforeplay",()=>{this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label")})}handleClick(e){[o,r].forEach(t=>this.addEventListener(t,(function(n){if(!(n.defaultPrevented||e.root.classList.contains("is-endscreen")||t===r&&e.root.classList.contains("no-fullscreen")))return n.preventDefault(),e.emit(n.type),!1}))),e.on(o,(function(t){setTimeout((function(){t.defaultPrevented||e.togglePlay()}),0)})),e.on(r,(function(t){setTimeout((function(){t.defaultPrevented||e.toggleFullScreen()}),0)}))}handleTouch(e){let t=!1;this.addEventListener(u,(function(t){t.cancelable&&!e.hasState("is-endscreen")&&(t.preventDefault(),e.emit(t.type,{source:t}))})),e.on(u,(function(n){setTimeout((function(){if(n.defaultPrevented)return;if(e.ended)return e.togglePlay(!0);const o=e.hasState(Q);t&&clearTimeout(t),(o||e.hasState(se)||e.hasState("no-autoplay"))&&(e.hasState(se)&&(e.setState(se,!1),e.setState("is-hovered",!1)),e.togglePlay(),o)||(e.setState(se,!0),e.paused||(t=setTimeout((function(){t=!1,e.setState(se,!1),e.setState("is-hovered",!1)}),2e3)))}),0)}))}}class FlowplayerUi extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-ui"),this.append(...e.createComponents(F,B,D))}}return kt.extensions.unshift.apply(kt.extensions,[I18n,Analytics,Health,class Default{constructor(e){ve(e,k,FlowplayerUi),ve(e,"flowplayer-error",FlowplayerError),ve(e,D,FlowplayerControls),ve(e,x,FlowplayerLiveStatus),ve(e,"flowplayer-control-duration",FlowplayerDuration),ve(e,P,e.extensions.find(e=>"Chapters"===e.name)?FlowplayerChaptersTimelineBar:FlowplayerTimelineBar),ve(e,M,FlowplayerElapsedTime),ve(e,U,FlowplayerVolumeBar),ve(e,"flowplayer-volume-control",FlowplayerVolumeControl),ve(e,"flowplayer-control-buttons",FlowplayerControlButtons),ve(e,F,FlowplayerHeader),ve(e,C,FlowplayerLogo),ve(e,"flowplayer-header-duration",FlowplayerHeaderDuration),ve(e,"flowplayer-header-left-zone",class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-left","flowplayer-header-duration")}}),ve(e,"flowplayer-header-right-zone",class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-right fp-togglable","flowplayer-fullscreen-enter-icon","flowplayer-fullscreen-exit-icon")}}),ve(e,B,FlowplayerMiddle),ve(e,G,FlowplayerMiddleZone),ve(e,H,FlowplayerMiddleWait),ve(e,"flowplayer-middle-buttons",FlowplayerMiddleButtons),ve(e,"flowplayer-middle-right-zone",class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-right-zone")}}),ve(e,"flowplayer-middle-left-zone",class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-left-zone")}}),ve(e,"flowplayer-small-play-icon",class extends FlowplayerIcon{constructor(e){super(e,Qn),this.setAttribute("role","button")}}),ve(e,"flowplayer-small-pause-icon",class extends FlowplayerIcon{constructor(e){super(e,Jn),this.setAttribute("role","button")}}),ve(e,j,class extends FlowplayerIcon{constructor(e){super(e,Yn),this.setAttribute("role","button")}}),ve(e,q,class extends FlowplayerIcon{constructor(e){super(e,Xn),this.setAttribute("role","button")}}),ve(e,"flowplayer-fullscreen-enter-icon",class extends FullscreenIcon{constructor(e){super(e,Vn)}}),ve(e,"flowplayer-fullscreen-exit-icon",class extends FullscreenIcon{constructor(e){super(e,Kn)}}),ve(e,"flowplayer-fast-forward-icon",class extends FlowplayerIcon{constructor(e){super(e,$n)}}),ve(e,W,class extends FlowplayerIcon{constructor(e){super(e,eo)}}),ve(e,z,class extends FlowplayerIcon{constructor(e){super(e,Zn),this.classList.add("fp-volumebtn"),this.setAttribute("role","switch"),e.on("volumechange",()=>{const t=0==e.volume||e.muted;this.setAttribute("aria-label",e.i18n("core.muted","Muted")),this.setAttribute("aria-checked",t?"true":"false")})}})}init(e,t,n){var o;bn(e,0,n),wn(e,t,n),o=n,"undefined"!=typeof window&&"ontouchstart"in window&&o.setState("is-touch-device",!0),o.setState("is-accessibility",!1)}}]),Object.assign(kt,{ui:mn,i18n:I18n})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=t()}(this,(function(){"use strict";const e=[],t=[];function n(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),o=/Android/.test(t)&&!/Firefox/.test(t),r=/^((?!chrome|android).)*safari/i.test(t),i=/SamsungBrowser/.test(t),s=i&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:o,iphone:n,safari:r,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:i,samsung_tv:i&&s,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="click",r="dblclick",i="load",s="mouseenter",a="mouseleave",l="mousemove",c="touchmove",u="touchend",d="fullscreenenter",p="fullscreenexit",f="loadedmetadata",m="loadeddata",h="progress",y="loadstart",v="pause",_="playing",g="waiting",E="canplay",w="ended",S="seeked",b="seeking",O="recover",T="reap",N="config",A="landscape",I="portrait",L="retry";var R=Object.freeze({__proto__:null,MOUNT:"mount",ERROR:"error",CONTEXT_MENU:"contextmenu",CLICK:o,DBL_CLICK:r,KEYUP:"keyup",KEYDOWN:"keydown",LOAD:i,MOUSE_ENTER:s,MOUSE_LEAVE:a,MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_MOVE:l,TOUCH_START:"touchstart",TOUCH_MOVE:c,TOUCH_END:u,TOUCH_CANCEL:"touchcancel",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_ENTER:d,FULLSCREEN_EXIT:p,FULLSCREEN_CHANGE:"fullscreenchange",WEBKIT_NEEDKEY:"webkitneedkey",METADATA:f,DATA:m,PROGRESS:h,TIME_UPDATE:"timeupdate",LOAD_START:y,VOLUME_CHANGE:"volumechange",PAUSE:v,PLAYING:_,PLAY:"play",WAITING:g,CAN_PLAY:E,ENDED:w,SEEKED:S,SEEKING:b,DURATION_CHANGE:"durationchange",BEFORE_PLAY:"beforeplay",BEFORE_PAUSE:"beforepause",STATE:"state",CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",VIEW_ENTER:"viewenter",VIEW_LEAVE:"viewleave",SOURCE:"src",RECOVER:O,REAP:T,CONFIG:N,QUALITIES:"qualities",SET_QUALITY:"quality:set",NON_RECOVERABLE_ERROR:"error:fatal",RECOMMENDATIONS_READY:"recommendationsready",AUDIO_ONLY_SOURCE:"audioonlysource",LANDSCAPE:A,PORTRAIT:I,RENDER_PLUGIN:"renderplugin",DVR:"dvr",LIVE:"live",SEEK_QUEUED:"seek:queued",SEEK_CANCEL:"seek:cancel",PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:"remotesession:ended",INTERSECTIONCHANGE:"intersectionchange",RETRY:L});const k="flowplayer-ui",C="flowplayer-logo",D="flowplayer-control",x="flowplayer-live-status",M="flowplayer-elapsed-time",P="flowplayer-timeline-bar",U="flowplayer-volume-bar",F="flowplayer-header",B="flowplayer-middle",G="flowplayer-middle-zone",H="flowplayer-wait",j="flowplayer-play-icon",q="flowplayer-pause-icon",W="flowplayer-rewind-icon",z="flowplayer-volume-icon";var V=Object.freeze({__proto__:null,SUBTITLES_MENU:"flowplayer-subtitles-menu",SHARE_MENU:"flowplayer-share-menu",SPEED_MENU:"flowplayer-speed-menu",QUALITY_MENU:"flowplayer-quality-menu",AUDIO_MENU:"flowplayer-audio-menu",UI:k,LOGO:C,CONTROL:D,CONTROL_BUTTONS:"flowplayer-control-buttons",LIVE_STATUS:x,ELAPSED:M,TIMELINE:P,CONTROL_DURATION:"flowplayer-control-duration",VOLUME_CONTROL:"flowplayer-volume-control",VOLUME_BAR:U,HEADER:F,HEADER_LEFT_ZONE:"flowplayer-header-left-zone",HEADER_RIGHT_ZONE:"flowplayer-header-right-zone",HEADER_DURATION:"flowplayer-header-duration",MIDDLE:B,MIDDLE_ZONE:G,WAIT:H,MIDDLE_BUTTONS:"flowplayer-middle-buttons",MIDDLE_LEFT_ZONE:"flowplayer-middle-left-zone",MIDDLE_RIGHT_ZONE:"flowplayer-middle-right-zone",ENDSCREEN_INTERSTITIAL:"flowplayer-endscreen-interstitial",ENDSCREEN_UP_NEXT:"flowplayer-endscreen-up-next",ENDSCREEN_GRID:"flowplayer-endscreen-grid",PLAYLIST_INTERSTITIAL:"flowplayer-playlist-interstitial",AIRPLAY_ICON:"flowplayer-airplay-icon",CHROMECAST_ICON:"flowplayer-chromecast-icon",SMALL_PLAY_ICON:"flowplayer-small-play-icon",SMALL_PAUSE_ICON:"flowplayer-small-pause-icon",PLAY_ICON:j,PAUSE_ICON:q,FULLSCREEN_ENTER_ICON:"flowplayer-fullscreen-enter-icon",FULLSCREEN_EXIT_ICON:"flowplayer-fullscreen-exit-icon",SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:"flowplayer-fast-forward-icon",REWIND_ICON:W,SHARE_ICON:"flowplayer-share-icon",VOLUME_ICON:z,MUTE_ICON:"flowplayer-mute-icon",UNMUTE_ICON:"flowplayer-unmute-icon",CLOSE_ICON:"flowplayer-close-icon",FACEBOOK_ICON:"flowplayer-facebook-icon",TWITTER_ICON:"flowplayer-twitter-icon",LINK_ICON:"flowplayer-link-icon",EMBED_ICON:"flowplayer-embed-icon",LIVE_COUNTDOWN:"flowplayer-live-countdown",PLAYLIST_CONTROLS:"flowplayer-playlist-controls",THUMBNAILS_CAROUSEL:"flowplayer-thumbnails-carousel",ERROR_COMPONENT:"flowplayer-error",TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue"});const K="is-playing",Y="is-paused",X="is-loaded",Z="is-loading",Q="is-starting",J="is-seeking",$="is-ended",ee="is-live",te="is-waiting",ne="is-live-seeked",oe="no-timeline",re="will-play",ie="will-pause",se="is-touched",ae="is-in-viewport",le="is-source-processing";var ce=Object.freeze({__proto__:null,PLAYING:K,FULLSCREEN:"is-fullscreen",PAUSED:Y,MUTED:"is-muted",LOADED:X,LOADING:Z,STARTING:Q,SEEKING:J,GRABBING:"is-grabbing",DISABLED:"is-disabled",SMALL:"is-small",TINY:"is-tiny",RTL:"is-rtl",TV:"is-tv",ENDED:$,LIVE:ee,ERRORED:"is-error",WAITING:te,AUTOPLAY:"is-autoplay",NO_AUTOPLAY:"no-autoplay",SEAMLESS:"is-seamless",TOGGLING:"is-toggling",LIVE_SEEKED:ne,NO_DVR:oe,HAS_POSTER:"has-poster",WILL_PLAY:re,WILL_PAUSE:ie,MENU_OPENED:"has-menu-opened",TOUCHED:se,HOVERED:"is-hovered",TOUCH_DEVICE:"is-touch-device",WILL_SEEK:"will-seek",SEEKABLE:"is-seekable",IN_VIEWPORT:ae,NO_CONTROLS:"no-controls",DESTROYED:"is-destroyed",IS_SOURCE_PROCESSING:le});function ue(e){this.message=e}ue.prototype=new Error,ue.prototype.name="InvalidCharacterError";var de="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new ue("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,r=0,i=0,s="";o=t.charAt(i++);~o&&(n=r%4?64*n+o:o,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};var pe=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(de(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return de(t)}};function fe(e){this.message=e}fe.prototype=new Error,fe.prototype.name="InvalidTokenError";var me=function(e,t){if("string"!=typeof e)throw new fe("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(pe(e.split(".")[n]))}catch(e){throw new fe("Invalid token specified: "+e.message)}};me.InvalidTokenError=fe;const he=new Map,ye=(e,t)=>new(((e,t)=>{const n=e.get(t);if(!n)throw new Error(`no flowplayer component with the name ${t} exists`);const o=window.customElements.get(t);if(!o)throw new Error(`no default flowplayer component with the name ${t} exists`);const r=window.customElements.get(n);return"function"!=typeof r?o:r})(e._customElements,t))(e),ve=(e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)};var _e,ge;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(_e||(_e={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(ge||(ge={}));function Ee(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(ie)||e.paused),function(e,t,n){const o=e.poll(t?"beforeplay":"beforepause",{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(re)?(e.setState(ie,!0),e.setState(re,!1),Promise.resolve()):Promise.resolve(e.pause());if(0==e.reaper)return Promise.resolve();const r=e.reaper.get("__pending_play");return e.paused||r?r?(r.src!==Se(e.original_src)&&we(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==Se(e.original_src)}(e)&&we(e),(e=>e.autoplay&&ge.AUDIO_REQUIRED&e.autoplay)(t)?function(e){e.muted=!1,0==e.volume&&(e.volume=1);return e.play().catch(e=>{console.warn("[flowplayer/play] autoplay audio required\n%s",e.message)})}(e):e.play().then(()=>{e.hasState(ie)&&e.togglePlay(!1)}).catch(t=>(console.warn("[flowplayer/play] attempting muted autoplay\n%s",t.message),e.muted=!0,e.volume=0,e.play()))):(e.setState(ie,!1),!e.hasState(K)&&e.setState(re,!0),Promise.resolve())}function we(e){e.currentSrc.match(/^blob:/)||e.load()}function Se(e){const t=document.createElement("a");return t.href=e,t.href}function be(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function Oe(e){const t=document.createElement("a");t.href=e;const n=t.pathname&&t.pathname.split(".");return n.length>1&&n[n.length-1]}function Te(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const Ne=e=>{var{src:t}=e,n=be(e,["src"]);return[Object.assign({src:t,type:t?Te("video/"+Oe(t)):""},n)]};function Ae(e){return Ne({src:e})}function Ie(e){var{src:t,type:n}=e,o=be(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:Ne(Object.assign({src:t},o))}var Le;function Re(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?Ae(e):Array.isArray(e)||"object"!=typeof e?e.reduce((function(e,t){return"string"==typeof t&&(t=Ae(t)),"object"!=typeof t||Array.isArray(t)||(t=Ie(t)),e.concat(t)}),[]):Ie(e)}(n);return function(e){[J,ie,re,K,Y,Z,X,ne].forEach(t=>e.setState(t,!1)),e.setState(Q,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(Le.Ok==function(e,t,n){e.emit("src",n),"string"==typeof n.src&&(e.original_src=n.src);const o=function(e,t,n){return e.plugins.filter(e=>{return(t=e)&&"wants"in t;var t}).find(e=>e.wants(n.src||"",n,t))}(e,t,n);return e.setOpts({is_native:!o}),o?(o.onload(t,e.root,e,n),Le.Ok):Le.Err}(e,t,i)||Le.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit("audioonlysource");t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return Le.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return Le.Err;"string"==typeof n.src&&(e.preload=t.autoplay?"auto":null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src,t.autoplay&&o.safari&&e.load(),"none"!==e.preload&&e.setState(Z,!0));return Le.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),function(e,t){!function(e,t){if(!e.currentSrc)return;if("none"==e.opt("preload"))return;if(t.autoplay&&t.autoplay>0)return;e.load()}(e,t)}(e,t),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(Le||(Le={}));const ke=[T,b,"src","seek:cancel"];var Ce;function De(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?xe(e,t):(t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){0!=e.reaper&&(e.currentTime=function(e,t,n=0){return Math.max(Math.min(t,e),n)}(e.currentTime+t.offset,e.duration),t.timer=0,xe(e,t))}),1e3),function(e,t){e.setState("will-seek",!0),e.setState(Ce.BACKWARD,t.offset<0),e.setState(Ce.FORWARD,t.offset>0)}(e,t),e.emit("seek:queued",t),t))}function xe(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(Ce.FORWARD,!1),e.setState(Ce.BACKWARD,!1),e.setState("will-seek",!1)}(e)}function Me(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}function Pe(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function Ue(...e){const t=document.createElement("div");return 0==e.length||t.classList.add(...e),t}function Fe(e,t,n){const o=function(e){return Array.isArray(e)?e.slice(0):e.split(".")}(t);for(;o.length;){if(null==e)return n;const t=o.shift();if("string"!=typeof t)return n;e=e[t]}return null==e?n:e}function Be(e){const t="number"==typeof e?e:parseInt(e,10);return(t>9?"":"0")+t}function Ge(e){if(isNaN(e)||e>=Number.MAX_SAFE_INTEGER)return"";const t=e<0?"-":"";e=Math.round(Math.abs(e));const n=Math.floor(e/3600);let o=Math.floor(e/60);return e-=60*o,n>=1?(o-=60*n,t+n+":"+Be(o)+":"+Be(e)):t+Be(o)+":"+Be(e)}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(Ce||(Ce={}));const He=navigator.languages||[navigator.language];function je(e,t,n){const o={};return n=t.lang||n,e[n]&&(o[n]=e[n]),function(){try{return He.reduce((e,t)=>~t.indexOf("-")?e.concat(t,t.split("-")[0]):e.concat(t),[])}catch(e){return[]}}().forEach((function(t){e[t]&&!o[t]&&(o[t]=e[t])})),Object.values(o)}const qe=[1e7]+""+-1e3+-4e3+-8e3+-1e11,We=()=>"undefined"==typeof crypto?"":qe.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16));let ze="";!function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}}();const Ve=["touchstart","touchmove"];function Ke(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function Ye(e,t,n){const o=Ke(t,n);return e.dispatchEvent(o),e}function Xe(e,t,n){const o=Ke(t,n);return e.dispatchEvent(o),o}function Ze(e,t,n,o){Array.isArray(t)?t.forEach(t=>Qe(e,t,n,o)):Qe(e,t,n,o)}function Qe(e,t,n,o){if(r=t,!~Ve.indexOf(r))return e.addEventListener(t,n,o),e;var r;const i=Object.assign(o||{},{passive:!0});return e.addEventListener(t,n,i),e}function Je(e,t,n,o){return Ze(e,t,n,Object.assign(o||{},{once:!0}))}class PlayerStorage{constructor(e,t){this.implementation=e,t&&t.keys().forEach(e=>{"string"==typeof t.implementation[e]&&this.implementation.setItem(e,t.implementation[e])})}keys(){var e;const t=[];for(var n=0;n<this.implementation.length;n++)(null===(e=this.implementation.key(n))||void 0===e?void 0:e.startsWith("flowplayer/"))&&t.push(this.implementation.key(n));return t}removeItem(e){try{this.implementation.removeItem("flowplayer/"+e)}catch(e){}}getItem(e){try{return this.implementation.getItem("flowplayer/"+e)}catch(e){return null}}setItem(e,t){try{this.implementation.setItem("flowplayer/"+e,t)}catch(e){}}clear(){try{this.keys().forEach(e=>this.implementation.removeItem(e))}catch(e){}}get length(){try{return this.keys().length}catch(e){return 0}}key(e){try{return this.implementation.key(e)}catch(e){return null}}}class InMemoryStorage{constructor(){this.pairs=[]}get length(){return this.pairs.length}clear(){this.pairs=[]}getItem(e){var t;return(null===(t=this.pairs.find(t=>t[0]===e))||void 0===t?void 0:t[1])||null}key(e){return this.pairs[e][0]||null}removeItem(e){this.pairs=this.pairs.filter(t=>t[0]!==e)}setItem(e,t){this.removeItem(e),this.pairs.push([e,t])}}const $e={preload:"none",rtl:!1,controls:!0},et=["loop","muted","preload"];function tt(e,o,r){let i;r.live_state={dvr_window:void 0,get dvr(){return i},set dvr(t){i=t;const n=!(!e.live||t);r.hasState(oe)!=n&&r.setState(oe,n)}},r._storage=new PlayerStorage(["localStorage","sessionStorage"].map(e=>{try{const t=window[e];return t.getItem(""),t}catch(t){return console.debug(`Access to window.${e} denied, trying next option`),null}}).find(e=>!!e)||new InMemoryStorage),r.toJSON=function(){return{duration:r.duration,volume:r.volume,currentTime:r.currentTime,states:r.root.className}},r.setSrc=function(t){return Re(r,e,t,n())},r.playerState=r.playerState||{},r.setState=function(e,t){if(r.playerState[e]===!!t)return r;const n=Object.assign({},r.playerState,{[e]:t});return r.playerState=n,Ye(r,"state",r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>ye(this,e[n]))},r.hasState=function(e){return!!r.playerState[e]},r.transitionState=function(e,t,n){!r.hasState(e)&&r.hasState(t)||(n=0),n&&r.setState("is-toggling",!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout((function(){r.setState("is-toggling",!1)}),n)},r.emit=(e,t)=>(Ye(r,e,t),r),r.on=(e,t)=>(Ze(r,e,t),r),r.once=(e,t)=>(Je(r,e,t),r),r.off=(e,t)=>{var n,o;return n=e,o=t,r.removeEventListener(n,o),r},r.poll=(e,t)=>Xe(r,e,t),r.togglePlay=function(t){return Ee(r,e,t)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),Ye(r,"volumechange")},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState("is-disabled",e),r.disabled=e},r.destroy=function(){r.pause();const e=t.indexOf(r);~e&&t.splice(e,1),setTimeout((function(){r.setSrc([]),r.reaper&&r.reaper.clear(),Ye(r,T),r.setState("is-destroyed",!0)}),0)},r.setAttrs=function(e){return et.forEach(t=>{if(!(t in e))return;const n=e[t];n?r.setAttribute(t,n.toString()):r.removeAttribute(t)}),r},r.opt=function(t,n){return n=void 0===n?Fe($e,t):n,Fe(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?function e(t,n,o,r){return(r=r||0)>=t.length?o:Fe(t[r],n,e(t,n,o,r+1))}(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState(ee)&&(r.setState(oe,!0),Ye(r,"live")),"disabled"in t&&void 0!==t.disabled&&r.toggleDisable(t.disabled),"muted"in t&&void 0!==t.muted&&r.toggleMute(t.muted),"dvr"in e&&(r.live_state.dvr=r.opt("dvr"));const n=!!e.autoplay&&!r.hasState("no-autoplay");r.setState("is-autoplay",n),r.setState("is-rtl",r.opt("rtl",function(e){if(!e)return Pe();const t=e.getAttribute("dir");return t?"rtl"==t:Pe()}(o))),r.setState(ee,!!e.live),r.setState("has-poster","string"==typeof e.poster&&e.poster.length>0),r.setState("is-seekable",!!e.seekable),r.setState("no-controls",0==e.controls),o.style.backgroundImage=r.hasState("has-poster")?"url('"+e.poster+"')":"",Ye(r,N,e)},r.renderPlugin=function(e){Xe(r,"renderplugin",e).defaultPrevented||r.root.appendChild(e)};const s={offset:0,timer:0};var a,l;l=s,(a=r).on(ke,(function(){xe(a,l)})),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return De(r,s,e)},r.deviceId=function(){return function(e){if(ze)return ze;try{const t=e.getItem("flowplayer/uuid");if(t)return t;const n=We();return e.setItem("flowplayer/uuid",n),n}catch(e){return ze=We()}}(r._storage)}}function nt(e,t){const n=t.querySelector("video"),o=n||(e._video_element_callback?e._video_element_callback(e):document.createElement("video"));return o.classList.add("fp-engine"),o.playsInline=!0,n||t.append(o),o}var ot="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function rt(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}function it(){return"undefined"!=typeof window?window:void 0!==ot?ot:{}}const st=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function at(e,t){return!!~st.indexOf(e)||e.indexOf(t)===e.length-t.length}at.check_whitelist=function(e){return!!~st.indexOf(e)};const lt="production";function ct(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=me(e),n.valid_jwt=!0}catch(e){}return n.raw=e,n.data=JSON.parse(o.c),n.exp=o.exp,t.require_valid_token&&ct.validate(n),n}function ut(e){try{return ct.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}var dt;function pt(e){return{grant:e,is_granted:t=>(e&t)===t}}function ft({root:e,video:t,data:n}){t&&t.destroy(),console.error(new Error(n.details||n.reason)),e.innerHTML="",e.classList.remove("flowplayer"),e.classList.add("flowplayer-fatal"),e.style.removeProperty("background-image");const o=document.createElement("h2");o.textContent="Playback Error";const r=document.createElement("p");r.textContent="Are you the site owner?";const i=document.createElement("a");i.classList.add("troubleshoot"),i.target="_blank",i.href="https://docs.flowplayer.com/troubleshooting/player#"+n.reason,i.textContent="Troubleshoot?";const s=document.createElement("img");s.src="https://flowplayer.com/user/pages/images/logo-white.png",e.append(o,r,i,s)}ct.validate=function(e){if("string"==typeof e&&(e=ct(e)),!e||!e.raw){if(at.check_whitelist(window.location.hostname)||"dev"===lt.toString())return!0;throw new Error("No token provided in configuration")}if(!e.valid_jwt)throw new Error("Invalid token provided");const t=window.location.hostname,n=at.bind(null,t);if("dev"!==lt.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==lt.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},ct.id=function(e){if(e)return"string"==typeof e&&(e=ct(e)),e.data.id},function(e){e[e.ADS=2]="ADS",e[e.ANALYTICS=4]="ANALYTICS",e[e.NO_METERING=8]="NO_METERING",e[e.DEVELOPER_PLAN=16]="DEVELOPER_PLAN",e[e.WOWZA_VIDEO=32]="WOWZA_VIDEO"}(dt||(dt={})),pt.of=pt,pt.from_token=function(e){const t=ct(e,{require_valid_token:!0});return pt.of(t.data.acl)},pt.permissions=dt;function mt(e,t){const n=t.clientWidth;t.classList.toggle("is-small",n<600),t.classList.toggle("is-tiny",n<400)}function ht(e,t,o){let r=!0;t.classList.add("flowplayer"),mt(0,t),Ze(o,[y,"resize"],(function(){mt(0,t)})),Ze(o,"state",(function(){Object.entries(o.playerState).forEach((function([e,n]){t.classList.toggle(e,n)}))})),Ze(o,"timeupdate",(function(){o.setState(te,!o.hasState("is-casting")&&!o.hasState(Q)&&o.readyState<3)})),Ze(o,w,(function(t){setTimeout((function(){if(!t.defaultPrevented){if(e.rewind&&!o.loop){const t=o.src;e.autoplay&&(e.autoplay=0,o.setState("is-autoplay",!1)),o.setState(J,!0),Je(o,S,(function(){t===o.src&&(o.setState(J,!1),o.pause(),o.setState(Q,!0))})),o.currentTime=0}Je(o,"timeupdate",(function(){o.setState($,!1)})),o.transitionState($,K,e.loop||e.rewind?0:300)}}),0)})),Ze(o,[b,S],(function(e){o.setState(J,e.type==b)})),Ze(o,"remotesession:ended",(function(e){setTimeout(()=>o.currentTime=e.detail.currentTime,0)})),Ze(o,w,(function(){o.setState(K,!1),r=!0})),Ze(o,h,()=>{if(!o.opts.live||!o.opts.is_native)return;const e=o.seekable;0!=e.length&&o.emit("dvr/window",e.end(e.length-1)-e.start(0))}),Ze(o,n().ios?f:m,(function(){var e,t;o.setState(X,!0),o.setState(Z,!1);const n=o;0===(null===(e=n.videoTracks)||void 0===e?void 0:e.length)&&(null===(t=n.audioTracks)||void 0===t?void 0:t.length)>0&&o.emit("audioonlysource")})),Ze(o,"play",()=>{o.setState(re,!0)}),Ze(o,[g,E,y],(function(t){if(!o.hasState(J)&&(t.type!=E||e.autoplay||o.setState(te,!1),t.type!=y||"none"!=o.opt("preload")||e.autoplay)){if(t.type==y&&e.autoplay)return Je(o,_,(function(){o.setState(te,!1)}));t.type!=g||o.hasState(X)||o.setState(Z,!0),o.setState($,!1),o.setState(te,t.type==g)}})),Ze(o,[_,v],(function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:o});document.dispatchEvent(e)},0);const n=t.type==_,i=o.currentTime==o.duration,s=n&&r&&e.autoplay||o.hasState(te);if(n&&(o.started=!0,r=!1),o.setState(te,!1).setState(Q,!1).setState(re,!1),!n&&o.setState(ie,!1),i)return;const a=n?K:Y,l=n?Y:K;o.transitionState(a,l,s?0:300),n&&o.setState("no-autoplay",!1)}))}const yt=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function vt(e,t,n){if(!window.IntersectionObserver)return;const r={should_resume:!!e.autoplay,has_user_gesture:!1,locked:!1};[u,o].forEach(e=>Je(n,e,()=>r.has_user_gesture=!0)),Ze(n,"play",(function(){r.locked||(r.should_resume=!0)})),Ze(n,"src",(function(){r.should_resume=!!e.autoplay})),Ze(n,v,(function(){r.locked||(r.should_resume=!1)}));const i=()=>{setTimeout(()=>{n.setState(Q,!0),n.setState("is-autoplay",!1)},100)};Ze(n,E,()=>{if(e.autoplay)return n.hasState(ae)&&r.should_resume?n.togglePlay(!0).catch(i):void(e.autopause||n.hasState(ae)||!r.should_resume||Je(n,"viewenter",()=>{e.autoplay&&r.should_resume&&n.togglePlay(!0).catch(i)}))});const s=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(ae);if(n.setState(ae,t>=.2),n.emit("intersectionchange",{ratio:t}),o===n.hasState(ae))return;const r=n.hasState(ae)?"viewenter":"viewleave";n.emit(r)},0)})},{threshold:yt});s.observe(t),n.on(T,()=>s.disconnect()),Ze(n,"viewenter",(function(){r.should_resume&&e.autopause&&!_t()&&n.togglePlay(!0)})),Ze(n,"viewleave",(function(){if(!e.autopause||_t())return;const t=!n.paused;r.locked=!0,n.pause(),setTimeout((function(){r.should_resume=t,r.locked=!1}),0)}))}function _t(){return t.find(e=>e.hasState("is-casting"))}function gt(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit("resize",n)});n.observe(e),t.on(T,()=>n.disconnect())}function Et(e){if("number"==typeof e&&!isNaN(e))return Number(e);if("string"==typeof e){const t=e.split(":");return Number(t[1])/Number(t[0])}return e}function wt(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let i=Et(e.ratio||.5625);r.style.paddingTop=100*i+"%";const s=[m,f];n.on(s,(function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})})),n.on(N,(function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=Et((null==e?void 0:e.ratio)||t||.5625);i!==o&&(i=o,r.style.paddingTop=100*o+"%")}))}class ExplorerPlan{constructor(){this.cleanUp=this.cleanUp.bind(this),this.render=this.render.bind(this),this.wireUp=this.wireUp.bind(this)}init(e,t,n){this.root=t,this.player=n,this.wireUp()}wireUp(){var e,t;this.cleanUp(),null===(e=this.player)||void 0===e||e.once(_,this.render),null===(t=this.player)||void 0===t||t.once(w,this.wireUp)}cleanUp(){var e,t,n,o;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo),null===(n=this.player)||void 0===n||n.off(_,this.render),null===(o=this.player)||void 0===o||o.off(w,this.wireUp)}render(){var e,t,n;null===(t=null===(e=this._logo)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeChild(this._logo);const o=(null===(n=this.root)||void 0===n?void 0:n.querySelector(".fp-ui"))||this.root;if(!o)return;const r=this._logo=document.createElement("a");r.href="https://explorer.flowplayer.com",r.target="_blank",Object.entries(St).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}const St={display:"block",opacity:"1",visibility:"visible",width:"33%","padding-top":"9%",position:"absolute","z-index":"9999",bottom:"25%",left:"10%","background-size":"cover","background-image":"url(https://static.flowplayer.com/explorer/explorer.svg)"},bt="flowplayer/"+_;function Ot(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(T,()=>document.removeEventListener(bt,t)),document.addEventListener(bt,t)}function Tt(e,t){const n=[];e.addEventListener("contextmenu",o=>{const r=o.timeStamp;for(n.push(r);n.length>3;)n.shift();n.length>=3&&n.every(e=>e-r<3e3)&&(console.debug("flowplayer/debug rendering info"),function(e,t){var n;!function(e){const t=e.querySelector(".debug-info");null==t||t.remove()}(e);const o=document.createElement("div");o.classList.add("debug-info");const r=Nt("flowplayer.version","3.7.1-rc.0");o.append(r);const i=null===(n=null==t?void 0:t.hls)||void 0===n?void 0:n.constructor;if(i&&i.version){const e=Nt("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const Nt=(e,t)=>{const n=document.createElement("div");n.classList.add("row",e);const o=document.createElement("span");o.classList.add("attr"),o.textContent=e;const r=document.createElement("span");return r.textContent=t,r.classList.add("value"),n.append(o,r),n};function At(e,t){const n=function(){try{return localStorage.getItem("flowplayer/debug")}catch(e){return""}}(),o=(o,...r)=>{try{const i=(null==t?void 0:t.debug)||n;i&&e.match(i)&&console.log(`flowplayer/${e} -- ${o}`,...r)}catch(e){console.warn(e)}};return o.log=o,o}const It=At("core/retry");function Lt(e,t){const n={pending:void 0,count:0};var o;e.on("error",o=>{t.retry&&void 0===n.pending&&(++n.count,n.pending=function(e,t){return setTimeout(()=>{e.hasState("is-destroyed")||(t.pending=void 0,[O,L].forEach(t=>e.emit(t)),It("%s try",t.count))},3e3*t.count)}(e,n))}),e.on(_,()=>{n.count=0}),e.on(["src",O],()=>{n.pending&&(clearTimeout(n.pending),n.pending=void 0)}),e.on(L,(o=t=>{t.defaultPrevented||e.load()},e=>{setTimeout((function(){if(!e.defaultPrevented)return o(e)}),0)}))}const Rt=function(){const e=it(),t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function kt(n,o){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),kt;"string"==typeof o&&(o={src:o}),o||(o={}),o.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(o.token=window.__FLOWPLAYER_TOKEN);const r="string"==typeof n?document.querySelector(n):n;if(!r)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const i=r.querySelector("video.fp-engine");if(i)return i;const s=ut(o.token);if(!s.success)return ft({root:r,data:{reason:"token",details:s.message}});const a=new Map,l=nt(o,r);l.reaper=a,l._customElements=he,Object.defineProperty(l,"token",{value:"string"==typeof o.token?ct.id(o.token):"",writable:!1}),l.addEventListener(T,()=>{a.clear(),l.reaper=0,delete l.root}),l.root=r,o.token&&pt.from_token(o.token).is_granted(pt.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(l)&&t.push(l),tt(o,r,l),l.setAttrs(o),l.plugins=kt.extensions.map(e=>new e(kt,l)),ht(o,r,l),vt(o,r,l),gt(r,l),wt(o,r,l),Ot(l),Tt(r,l),Lt(l,o),l.plugins.forEach(e=>{try{e.init(o,r,l)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),l.setOpts(o),l.opts=o,o.src&&l.setSrc(o.src);const c=l.readyState;return c>0&&l.currentSrc&&l.emit(f),c>2&&l.currentSrc&&l.emit(E),l.emit("mount"),l.on("error:fatal",(function(e){ft({root:r,video:l,data:e.data||{}})})),setTimeout(Ye,0,document,"flowplayer:player:created",l),l}Object.assign(kt,Rt),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=he,o.defaultElements=V,o.version="3.7.1-rc.0",o.commit="52458eb6acf7df34e94380e52fe2064adab39e34",o.instances=t,o.extensions=e,o.support=n,o.events=R,o.states=ce,o.jwt=me,o.autoplay=ge,o.quality=_e}(kt),"object"==typeof document&&setTimeout(Ye,0,document,"flowplayer:umd",kt);var Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Dt(e){var t={exports:{}};return e(t,t.exports),t.exports}var xt=Dt((function(e,t){var n=Ct&&Ct.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};t.__esModule=!0,t.remove=t.downcase=t.pluck=t.merge=void 0,t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return n(n({},e),t)}),{})},t.pluck=function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return Object.keys(e).filter((function(e){return~n.indexOf(e)})).reduce((function(n,o){var r;return t.merge(n,((r={})[o]=e[o],r))}),{})},t.downcase=function(e){return(e||"").toString().toLowerCase()},t.remove=function(e,t){var n=e.lastIndexOf(t);return~n&&e.splice(n,1),e}})),Mt=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};t.__esModule=!0;var i=r(xt),s=function(){function e(){this.pending=[],this.open=[],this.stats={failures:0,ttl:0}}return e.of=function(){return new e},e.is_empty=function(e){return 0==e.pending.length},e.is_high_water=function(t){return t.open.length==e.MAX_OPEN_REQUESTS},e.maybe_spawn_req=function(t){if(e.is_empty(t))return t;if(e.is_high_water(t))return t;try{var n=e.lpop(t);n&&e.request(t,n)}catch(e){}},e.increment_failures=function(t){return t.stats.failures++,t.stats.failures>e.MAX_FAILURE_COUNT&&(t.stats.ttl=Date.now()+e.REQUEST_TTL_MS),t},e.handle_error=function(t,n){e.rm(t,n),e.increment_failures(t)},e.request=function(t,n){var o=n[0],r=n[1],i=n[2];if(!(Date.now()<t.stats.ttl)){var s=new XMLHttpRequest;t.open.push(s),s.timeout=e.REQUEST_TIMEOUT_MS,s.ontimeout=function(){e.handle_error(t,s)},s.onerror=function(n){e.handle_error(t,s)},s.onreadystatechange=function(){s.readyState==XMLHttpRequest.DONE&&e.rm(t,s),Math.floor(s.status/100)},s.onload=function(){e.rm(t,s),t.stats.failures&&t.stats.failures--},s.open(r,o),s.setRequestHeader("Content-Type","text/plain;charset=UTF-8");try{s.send(JSON.stringify(i))}catch(e){}}},e.rpush=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return n.forEach((function(n){t.pending.length>=e.MAX_PENDING||(t.pending.push(n),e.maybe_spawn_req(t))})),t},e.lpop=function(e){return e.pending.shift()},e.rm=function(e,t){return i.remove(e.open,t),e},e.MAX_OPEN_REQUESTS=3,e.MAX_PENDING=5,e.REQUEST_TIMEOUT_MS=4e3,e.REQUEST_TTL_MS=5e3,e.MAX_FAILURE_COUNT=3,e}();t.default=s})),Pt=Dt((function(e,t){var n=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(Mt);t.default=o.default.of()})),Ut=Dt((function(e,t){t.__esModule=!0,t.prepare_url=t.URL_PARAM=void 0,t.URL_PARAM=/:([a-zA-Z_]+)/g,t.prepare_url=function(e,n){return e.url.replace(t.URL_PARAM,(function(t){if((t=t.slice(1,t.length))in n)return n[t].toString();e.log.error(new Error("\n preparing url["+e.url+"] failed\n \n parameter["+t+"] not detected in params:\n \n "+JSON.stringify(n,null,2)+"\n "))}))}})),Ft=Dt((function(e,t){t.__esModule=!0,t.Log=void 0;var n=function(){function e(e){this.emitter=e}return e.prepare=function(e,t){var n=document.createEvent("Event");return n.initEvent(e,!1,!0),n.ns=e,n.data=t,n},e.of=function(t){return new e(t)},e.prototype.info=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.INFO,t))},e.prototype.error=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.ERROR,t))},e.prototype.warn=function(t){this.emitter.dispatchEvent(e.prepare(e.NAMESPACE.WARN,t))},e.NAMESPACE={INFO:"tracker:info",ERROR:"tracker:err",WARN:"tracker:warn"},e}();t.Log=n})),Bt=Dt((function(e,t){var n;t.__esModule=!0,t.Verb=void 0,(n=t.Verb||(t.Verb={})).POST="POST",n.PUT="PUT",n.GET="GET"})),Gt=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=Ct&&Ct.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,r++)o[r]=i[s];return o},s=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=s(Pt),l=s(Mt),c=r(Ut),u=r(xt),d=function(){function e(t,n){var o=this;void 0===n&&(n={});var r=this;if(this.emitter=t,this.url=n.url,this.log=Ft.Log.of(this.emitter),this.verb=n.verb,this.metadata=u.merge({},n.metadata||{}),this.rq=n.rq||a.default,this.events=n.events||[],this.required_keys=n.required_keys||[],this.optional_keys=n.optional_keys||[],this.listeners=[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),e.assert_emitter_api(this.emitter),void 0===e.verb[this.verb])throw new Error("invalid HTTP verb["+this.verb+"] passed");if("string"!=typeof this.url)throw new Error("invalid API url["+this.url+"] passed");e.TRACKERS.push(this),r.events.forEach((function(t){e.create_listener(o,t,(function(n){void 0===n&&(n={});var i=u.merge(r.metadata,{event_type:t},n.data||n),s=c.prepare_url(r,i),a=e.pluck_valid_keys(r,i),d=e.ensure_required_keys(r,a);if(d.length)return r.log.error("Tracker.validate_metadata() failed for \n Event["+t+"]\n missing keys: "+d+"\n payload:\n "+JSON.stringify(a,null,2));l.default.rpush(o.rq,[s,o.verb,a])}))}))}return e.of=function(t,n){return new e(t,n)},e.ensure_required_keys=function(e,t){return e.required_keys.filter((function(e){return!(e in t)}))},e.pluck_valid_keys=function(e,t){return u.pluck.apply(u,i([t],e.valid_keys))},e.merge_metadata=function(t,n){return void 0===n&&(n={}),t.metadata=e.pluck_valid_keys(t,u.merge(t.metadata,n)),t},e.assert_emitter_api=function(e){if("function"!=typeof(e||{}).addEventListener)throw new Error("Tracker() received an emitter that does not implement the addEventListener method");if("function"!=typeof(e||{}).removeEventListener)throw new Error("Tracker() received an emitter that does not implement the removeEventListener method")},e.create_listener=function(e,t,n){e.listeners.push([t,n]),e.emitter.addEventListener(t,n)},e.prototype.destroy=function(){var t=this;this.listeners.forEach((function(e){var n=e[0],o=e[1];return t.emitter.removeEventListener(n,o)})),delete this.rq,delete this.emitter,u.remove(e.TRACKERS,this)},e.prototype.put=function(t){return void 0===t&&(t={}),e.merge_metadata(this,t),this},e.TRACKERS=[],e.QUEUE=a.default,e.verb=Bt.Verb,e}();t.default=d})),Ht=Dt((function(e,t){var n=Ct&&Ct.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),o=Ct&&Ct.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ct&&Ct.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.API=t.Tracker=void 0;var s=i(Gt);t.Tracker=s.default;var a=r(Ut);t.API=a})),jt="ping",qt="display",Wt="view";const zt=["sitegroup_id","session_id","media_id","site_id","player_id","video_type"],Vt=["created","position"],Kt=["player_version","created","source","category","category_id","autoplay","muted","customer_user_id"];function Yt(e,t){return e.duration/1===e.duration&&Object.assign(t,function(e){const t=e/100;return{segment_duration:t,breakpoints:Array(...Array(100)).map((function(e,n){return Math.floor(n*t*1e3)/1e3}))}}(e.duration))}function Xt(e,t,n){if(!t.segment_duration&&!Yt(e,t))return;const o=function(e,t,n){const o=t.last_idx,r=n?99:Zt(e,t);return t.last_idx=r,r<=o?[]:t.breakpoints.slice(o,99==r?100:r).map((function(e){return t.breakpoints.indexOf(e)}))}(e,t,n);0!=o.length&&e.emit(jt,{position:o})}function Zt(e,t){return Math.min(Math.floor(e.currentTime/t.segment_duration),99)}function Qt(){try{return window.location!==window.parent.location?document.referrer:document.location.href}catch(e){return!1}}const Jt="vod",$t="live",en=[qt,jt,Wt];function tn(e,t,n){switch(null==t?void 0:t.kind){case"live":return function(e,t){const n=Date.now();n-t.last_tracked_ts<6e4||(t.last_tracked_ts=n,++t.ticks,e.emit(jt,{position:60*t.ticks}))}(e,t);case"vod":return Xt(e,t,"boolean"==typeof n&&n)}}function nn(e){const t=e.ads;return void 0!==t&&(void 0!==t.schedule&&("function"==typeof t.hasPreroll&&(t.currentRequests?t.currentRequests:!!t.adPlaying||!(!t.hasPreroll()||0!=t.nextIndex))))}class Analytics{init(e,t,n){if(!pt.from_token(e.token||"").is_granted(pt.permissions.ANALYTICS))return;if(n.hasState("consent-no-tracking"))return;if(n.analytics)return;const o=n.analytics={ticker:void 0,last_media_id:"",ended:!1},r={locked:!1,ttl:6e3,task:()=>{tn(n,o.ticker)}};const i={session_id:n.deviceId(),autoplay:n.autoplay,muted:n.muted,player_id:e.player_id,customer_user_id:e.customer_user_id,player_version:"3.7.1-rc.0"},s=Ht.Tracker.of(n,{verb:Ht.Tracker.verb.POST,url:"https://ptm.flowplayer.com/:video_type/:sitegroup_id/:event_type",events:en,required_keys:zt,optional_keys:Kt.concat(Vt).slice(0),metadata:i});n.on(T,(function(){s&&s.destroy()})),n.on(N,(function(t){if(!s)return;const r=Fe(t,"data.metadata",{});if(!r.media_id)return;const i=Fe(s,"metadata.media_id");if(i&&r.media_id==i)return;const a=Fe(e,"analytics",{});s.put(r),s.put(a);const l=Fe(e,"metadata.live_start_time",e.live)?$t:Jt;s.put({video_type:l,source:e.source||Qt()||""}),o.ticker=e.live?{ticks:0,last_tracked_ts:Date.now(),kind:"live"}:{last_idx:0,segment_duration:0,breakpoints:[],kind:"vod"},o.ended=!1,n.emit(qt)}));let a=0;n.on(_,(function(){if(!s)return;if(a||function(e,t){return e.metadata.media_id&&e.metadata.media_id==t.last_media_id}(s,o))return;s.put({muted:n.muted});const e=nn(n);if(e)return a=Promise.resolve(e).then((function(){o.last_media_id=s.metadata.media_id,n.emit(Wt),a=0})).catch((function(){a=0}));o.last_media_id=s.metadata.media_id,n.emit(Wt)})),n.on("timeupdate",(function(){var t;s&&(a||nn(n)||o.ended||(!e.live&&n.currentTime+.25>=n.duration&&tn(n,o.ticker,!0),(t=r).locked||(t.locked=setTimeout((function(){return t.task(),function(e){return e.locked=!1,e}(t)}),t.ttl))))})),n.on(S,(function(){s&&o.ticker&&"vod"==o.ticker.kind&&function(e,t){Yt(e,t),t.last_idx=Zt(e,t)}(n,o.ticker)})),n.on(w,(function(){s&&function(e,t){t.ended||(t.ended=!0,tn(e,t.ticker))}(n,o)}))}}var on;function rn(e){switch(e){case on.MEDIA_PLAYBACK_ABORTED:return"media playback was aborted";case on.MEDIA_ERR_NETWORK:return"a network error occurred";case on.MEDIA_ERR_DECODE:return"unable to decode media content";case on.MEDIA_ERR_SRC_NOT_SUPPORTED:return"unsupported media type";case on.NO_INTERNET:return"no internet connection detected";case on.MIXED_CONTENT:return"cannot load insecure content in a secure context";default:return"an unknown error occurred"}}function sn(){}function an(e){try{return!!new URL(e)}catch(e){return!1}}rt(it(),Analytics),"undefined"!=typeof window&&window.matchMedia&&[A,I].forEach((function(e){window.matchMedia("(orientation: "+e+")").addListener((function(n){t.length&&t.forEach((function(t){n.matches&&t.emit(e)}))}))})),function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.MEDIA_PLAYBACK_ABORTED=1]="MEDIA_PLAYBACK_ABORTED",e[e.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MIXED_CONTENT=1001]="MIXED_CONTENT",e[e.NO_INTERNET=1002]="NO_INTERNET"}(on||(on={}));function ln(e,t){if(t.message)return t.message;if(t.stack)return t.stack;const n=t.code||-1,o=rn(n);return e.i18n("media_errors."+n,o)}const cn=()=>!0===(navigator||{}).onLine;function un(e){try{return"https:"===location.protocol&&"http:"==function(e){const t=document.createElement("a");return t.href=e,t}(e).protocol}catch(e){return!1}}function dn(e,t,n){const o=n.togglePlay;n.on("error",(function(e){const t=e.data||n.error,r="Error: %s\n"+(null===(i=(new Error).stack)||void 0===i?void 0:i.split("\n").slice(2).join("\n"));var i;setTimeout((function(){const i=Me(n,k);if(e.defaultPrevented||!i||n.root.querySelector("#qul_error"))return;if("AbortError"==t.name)return;n.setState("is-error",!0),n.togglePlay=sn;const s=function(e,t){return{code:"http:0"===t.code?fn(e):t.code,message:ln(e,t)}}(n,t);console.error(r,s.message);let a=Me(n,"flowplayer-error");a||(a=ye(n,"flowplayer-error"),i.append(a)),Ye(a,"error",{data:t,formatted_data:s}),n.once(y,()=>{pn(n,o)})}))})),n.on(O,()=>pn(n,o))}function pn(e,t){const n=Me(e,"flowplayer-error");e.togglePlay=t,e.opt("retry")&&e.setState(te,!0),e.setState("is-error",!1),null==n||n.remove()}function fn(e){return un(e.original_src)?{code:on.MIXED_CONTENT}:cn()?{code:on.MEDIA_ERR_NETWORK}:cn()?{code:on.UNKNOWN}:{code:on.NO_INTERNET}}var mn=Object.freeze({__proto__:null,NO_FULLSCREEN:1,NO_VOLUME_CONTROL:2,NO_MUTE:4,LOGO_ON_RIGHT:8,USE_DRAG_HANDLE:16,USE_PLAY_2:32,USE_PLAY_3:64,USE_THIN_CONTROLBAR:128,NO_TITLE:256,NO_DESCRIPTION:512,NO_CONTROLS:1024,NO_DURATION:2048,NO_HEADER:4096,AUDIO_ONLY:8192,NO_TOUCH_ZONES:16384,LOGO_ON_BOTTOM:32768});function hn(e,t,n){let o=()=>document.fullscreenElement,i="fullscreenchange";if(!Element.prototype.requestFullscreen){const e=Element.prototype,t=document;e.webkitRequestFullScreen&&(e.requestFullscreen=e.webkitRequestFullScreen,t.fullscreenEnabled=!0),t.webkitCancelFullScreen&&(document.exitFullscreen=t.webkitCancelFullScreen),i="webkit"+i,o=()=>t.webkitCurrentFullScreenElement}const s=()=>n.getFullsceenTarget?n.getFullsceenTarget():t;n.toggleFullScreen=function(e,t){if(n.ios_fullscreen_disabled)return;if("boolean"!=typeof e&&(e=!n.hasState("is-fullscreen")),yn(n)&&(e?function(e){e.getAttribute("playsinline")&&e.removeAttribute("playsinline");e.getAttribute("webkit-playsinline")&&e.removeAttribute("webkit-playsinline");e.webkitEnterFullScreen()}(n):function(e,t){e.getAttribute("playsinline")||e.setAttribute("playsinline","");e.getAttribute("webkit-playsinline")||e.setAttribute("webkit-playsinline","");t||e.webkitExitFullScreen();e.togglePlay(!1),e.hasState(se)||e.setState(se,!0)}(n,t)),!document.fullscreenEnabled)return;const r=s();if(e)return r.requestFullscreen();o()===r&&document.exitFullscreen()},yn(n)&&(n.ios_fullscreen_disabled=!0,n.once("beforeplay",(function(){n.ios_fullscreen_disabled=!1})),n.on("webkitendfullscreen",(function(){n.toggleFullScreen(!1,!0)}))),setTimeout(()=>{const e=s();e.addEventListener(i,(function(){const t=o(),r=t===e||t==n;n.emit(r?d:p),n.setState("is-fullscreen",r)}))},0),!1!==e.doubleclick&&t.addEventListener(r,(function(e){var t;e.target&&(null===(t=e.target)||void 0===t?void 0:t.classList.contains("fp-ui"))&&n.toggleFullScreen()}))}function yn(e){return n().ios&&"function"==typeof e.webkitEnterFullScreen&&"function"==typeof e.webkitExitFullScreen}function vn(e,t){const n=e.seekable;if("object"!=typeof e.opts||0==n.length)return{head:0,tail:0};const o=n.end(n.length-1),r=t||e.live_state.dvr_window;return{head:o,tail:"number"!=typeof r||o-r<0?n.start(0):o-r}}function _n(e){return e.opt("live",!1)||e.duration>=Number.MAX_SAFE_INTEGER}function gn(e){return isFinite(e.duration)?e.duration:0==e.seekable.length?0:vn(e).head}function En(e){return function(e){return vn(e).head}(e)-.5}function wn(e,t,n){if(!n.reaper)return;const o=document.createDocumentFragment(),r=ye(n,k),i=ye(n,C);t.append(i),o.append(r),n.reaper.set("ui",r),~t.className.indexOf("use-play-")||t.classList.add("use-play-1"),function(e,t,n){const o=Ue("fp-footer");t.append(o),n.on(N,(function(e){var t,n;const r=null===(t=e.data)||void 0===t?void 0:t.description,i=null===(n=e.data)||void 0===n?void 0:n.title;if(o.innerHTML="","string"==typeof i){const e=Ue("fp-title");e.innerText=i,o.append(e)}if("string"==typeof r){const e=r.split(" "),t=Ue("fp-desc");for(t.innerText=e.join(" "),o.append(t);e.length>1&&t.scrollHeight>t.offsetHeight;)e.pop(),t.innerText=e.join(" ")+"..."}}))}(0,t,n),dn(0,0,n),t.appendChild(o),[s,a].forEach(e=>{t.addEventListener(e,(function(e){n.setState("is-hovered",e.type==s),n.setState("is-accessibility",!1)}))}),hn(e,t,n),n.on("volumechange",(function(){const e=0==n.volume||n.muted;n.setState("is-muted",e),n._storage.setItem("mute",e.toString())})),"true"==n._storage.getItem("mute")&&(n.muted=!0,n.setState("is-muted",n.muted));const u=n._storage.getItem("volume");u&&!isNaN(Number(u))&&(n.volume=Number(u)),n.emit("volumechange"),n.on("dvr/window",t=>{e.live&&(n.live_state.dvr=n.seekable.length>0&&function(e,t,n){if(0==t)return!0;const o=vn(e,n);return o.head-o.tail>=t}(n,e.seconds_to_dvr||60,t.detail),n.live_state.dvr_window=t.detail)}),n.on("live",()=>{const e=setInterval(()=>{if(n.opts.live&&!n.hasState("is-error")&&0!=n.reaper||(n.setState(ee,!1),clearInterval(e)),0==n.seekable.length)return;const t=function(e){var t;const n=e.currentTime,o=vn(e),r=!e.hasState("is-chromecast-playing")&&(null===(t=e.hls)||void 0===t?void 0:t.liveSyncPosition);return{progress:Math.min(100,Math.max(0,(n-o.tail)/(o.head-o.tail)*100)),is_live:n-(r||o.head)>=-10}}(n);n.hasState(ne)==t.is_live&&n.setState(ne,!t.is_live),n.live_state.dvr&&n.emit("dvr",t.progress)},200)}),n.on(f,(function(){n.setOpts({live:_n(n)})})),n.on("durationchange",(function(e){const t=_n(n),o=t?gn(n):e.data||n.duration;isNaN(o)||n.setOpts({live:t,duration:o})})),n.on(["playlist/advance","src"],t=>{if(n.root.classList.contains("is-livecountdown"))return Sn(n,e);n.currentSrc&&("src"===t.type&&["is-playlist",le].some(e=>n.root.classList.contains(e))||Sn(n,e))}),n.on(N,(function(n){var o,r;e.seekable=void 0===(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.seekable)||n.data.seekable;const i=null===(r=n.data)||void 0===r?void 0:r.ui;if("number"!=typeof i)return;const s=t.classList;s.toggle("use-play-1",!(32&i||64&i)),s.toggle("use-play-2",(32&i)>0),s.toggle("use-play-3",(64&i)>0),s.toggle("use-thin-controlbar",(128&i)>0),s.toggle("no-title",(256&i)>0),s.toggle("no-description",(512&i)>0),s.toggle("logo-on-right",(8&i)>0),s.toggle("logo-on-bottom",(32768&i)>0),s.toggle("use-drag-handle",(16&i)>0),s.toggle("no-controls",(1024&i)>0),s.toggle("no-duration",(2048&i)>0),s.toggle("no-header",(4096&i)>0),s.toggle("no-mute",(4&i)>0),s.toggle("no-volume",(2&i)>0),s.toggle("no-fullscreen",(1&i)>0),s.toggle("no-touch-zones",(16384&i)>0)}));let d=null;[l,c].forEach(e=>r.addEventListener(e,(function(e){n.hasState("is-touch-device")&&e.type===l||("number"==typeof d&&clearTimeout(d),n.setState("is-hovered",!0),d=0==n.paused&&setTimeout((function(){n.setState("is-hovered",!1)}),2e3))})))}function Sn(e,t){delete t.live_start_time,e.setOpts({live:!1}),e.live_state.dvr=void 0,e.live_state.dvr_window=void 0,delete t.live,delete t.poster,delete t.duration,delete t.title,delete t.description}function bn(e,t,n){if(pt.from_token(e.token||"").is_granted(pt.permissions.NO_METERING))return;ct.id(e.token||"")&&n.once(_,async()=>await async function e(t,n){const o=ct.id(n||"");t.once("src",()=>{t.once(_,()=>e(t,n))}),function(e,t){if(!function(e){return pt.from_token(e).is_granted(pt.permissions.WOWZA_VIDEO)}(t))return;if(function(e){try{return new URL(e).hostname.endsWith(".wowza.com")}catch(e){return!1}}(e.original_src))return;e.emit("error:fatal",{reason:"token",details:"This token only allows wowza video sources"})}(t,n);if(401==(await fetch("https://pmi.flowplayer.com/in",{method:"POST",body:JSON.stringify({token_id:o,factor:1,rnd:Math.random().toString(36).substring(2)})})).status)return t.emit("error:fatal",{reason:"token",details:"The token online validation failed"})}(n,e.token||""))}var On={ads:{ad:"Ad",ads:"Ads",advertisement:"Advertisement"},audio:{button_txt:"Audio",menu_title:"Audio"},core:{exit_fullscreen:"Exit fullscreen",fullscreen:"Fullscreen",mute:"Mute",pause:"Pause",play:"Play",unmute:"Unmute",volume:"Volume"},ovp:{starting_in:"Countdown"},playlist:{cancel:"Cancel",up_next:"Up next"},qsel:{menu_title:"Quality"},share:{clipboard_failure:"Access to clipboard failed",clipboard_success:"The text is now on your clipboard",embed:"Embed",link:"Link",menu_title:"Share"},speed:{menu_title:"Speed"}};class I18n{init(e,t,n){n.reaper&&n.reaper.set("translations",je(I18n,e,"en"))}}I18n.en=On;const Tn="rebuffer";var Nn=Object.freeze({__proto__:null,RECORD:"health:record",REBUFFER:Tn,DISPLAY:"display"});const An=navigator;function In(e){var t,n;const o=null===(t=e.hls)||void 0===t?void 0:t.bandwidthEstimate;return o?1e-6*o:(null===(n=An.connection)||void 0===n?void 0:n.downlink)||-1}function Ln(e,t){return async function(e,t){try{await fetch(e,{body:t,method:"POST",mode:"no-cors"})}catch(e){}}(e,JSON.stringify({events:t}))}const Rn="https://ljsp.lwcdn.com".concat("/web/public/countdown/time.json"),kn=window,Cn=kn._flowplayerTimekeeper||(kn._flowplayerTimekeeper={});const Dn=e=>{switch(e){case!0:return ge.ON;case!1:return ge.OFF;default:return e}},xn=[],Mn="https://ihi.flowplayer.com/v1/health/events";function Pn(e){if(e.suspended)return;const t=xn.slice(0);xn.length=0,0!=t.length&&(e.logger.log(`:dispatch events={${t.length}}`),Ln(function(){try{return"undefined"==typeof window?Mn:window.__FLOWPLAYER_INSIGHTS_URL?window.__FLOWPLAYER_INSIGHTS_URL:Mn}catch(e){return Mn}}(),t))}async function Un(e,t,n){const o=await Bn();xn.push(Object.assign(t,o)),e.logger.log(":enqueue",t.event,t),xn.length<10&&!n||Pn(e)}const Fn=()=>{var e,t;try{const n=window;return null===(t=null===(e=null==n?void 0:n.google)||void 0===e?void 0:e.ima)||void 0===t?void 0:t.VERSION}catch(e){return}},Bn=async()=>{const e=Date.now();try{return{adjusted_time:e-await async function(){const e=Cn.cachedServerOffset;if(e)return e;const t=Cn.pendingRequest||(Cn.pendingRequest=fetch(Rn)),n=await t,o=parseInt(n.headers.get("age")||"0"),r=await n.json(),i=Date.now()-r.millisUtc-1e3*o;return Cn.cachedServerOffset=i,Cn.cachedServerOffset}(),client_time:e}}catch(t){return{client_time:e}}},Gn=(e,t)=>Object.assign(e,{detail:t}),Hn=(e,{event:t,media_session_id:n,session_id:o})=>({event:t,media_session_id:n,session_id:o,device_id:e.deviceId(),version:"3.7.1-rc.0",commit:"52458eb6acf7df34e94380e52fe2064adab39e34",ima_sdk_version:Fn(),preload:e.opt("preload"),autoplay:Dn(e.opt("autoplay")),live:e.opt("live"),dvr:!!e.live_state.dvr,source:e.original_src,downlink_mbs:In(e),page_url:Qt(),player_id:e.opt("metadata.player_id"),media_id:e.opt("metadata.media_id"),site_id:e.opt("metadata.site_id"),category_id:e.opt("metadata.category_id"),sitegroup_id:e.opt("metadata.sitegroup_id"),token:e.token,plugins:e.plugins.map(e=>e.constructor.name).sort((e,t)=>e.localeCompare(t)),current_time:e.currentTime,external_media_id:e.opt("external_media_id")}),jn=e=>({bitrate:null==e?void 0:e.bitrate,resolution:null==e?void 0:e.attrs.RESOLUTION,frame_rate:null==e?void 0:e.attrs["FRAME-RATE"]});function qn(e,t,n,o){const r=Hn(t,e.eventInfo(n)),{before:i,after:s}=o;Un(e,((e,t,n)=>Object.assign(e,{state:{before:t,after:n}}))(r,jn(i),jn(s)))}const Wn=(e,t)=>{let n=null;return(...o)=>{null!==n&&(clearTimeout(n),n=null),n=setTimeout(()=>t(...o),e)}},zn=We();class Health{constructor(e,t){this.session_id=zn,this.suspended=!1,this.logger=At("health",t.opts),this.media_session_id=We(),this.analyticsLoop=setInterval(()=>Pn(this),2e3),t.on(T,()=>clearInterval(this.analyticsLoop));const n=this;if(t.health={get media_session_id(){return n.media_session_id},set media_session_id(e){n.media_session_id=e},get session_id(){return n.session_id},set session_id(e){n.session_id=e},toggle(e){e?n.resume():n.suspend()}},!Health._UNLOAD_SUBSCRIBED){Health._UNLOAD_SUBSCRIBED=!0;const t=t=>e.instances.forEach(e=>e.emit(t.type));document.addEventListener("visibilitychange",e=>{"hidden"==document.visibilityState&&t(e)}),window.addEventListener("pagehide",t)}}eventInfo(e){return{event:e,media_session_id:this.media_session_id,session_id:this.session_id}}suspend(){this.suspended=!0,clearInterval(this.analyticsLoop)}resume(){this.suspended=!1,this.analyticsLoop=setInterval(()=>Pn(this),2e3)}init(e,t,n){!function(e){e.on(g,(function(t){e.seeking||e.networkState===e.NETWORK_LOADING&&e.readyState!==e.HAVE_NOTHING&&e.emit(Tn)}))}(n),n.on("display",e=>{Un(this,Hn(n,this.eventInfo(e.type)),!0)}),n.on("health:record",({detail:e})=>{const t=Hn(n,this.eventInfo(e.event));Object.assign(t,e.detail||{}),Un(this,t)}),[E,y,i,f,m,h,g,Tn].forEach(e=>{n.on(e,e=>{Un(this,Hn(n,this.eventInfo(e.type)))})}),[_,v,b,S,w,d,p].forEach(e=>{n.on(e,e=>{Un(this,Hn(n,this.eventInfo(e.type)))})}),n.on("volumechange",Wn(800,e=>{const t=Hn(n,this.eventInfo(e.type));Un(this,Gn(t,{volume:parseFloat(n.volume.toFixed(2)),muted:n.muted}))})),n.on("resize",Wn(800,e=>{const o=Hn(n,this.eventInfo(e.type));Un(this,Gn(o,{height:t.clientHeight,width:t.clientWidth}))})),n.on("hls/failover",e=>{const t=Hn(n,this.eventInfo(e.type)),o=e.detail,{reason:r,from:i}=o;Un(this,Gn(t,{reason:r,from:i}))}),n.on("qualitychange",({type:e,detail:t})=>{switch(t.kind){case"hls":return qn(this,n,e,t)}});let o=Date.now()+5e3;n.on("timeupdate",e=>{if(Date.now()<o)return;o=Date.now()+5e3;const t=Hn(n,this.eventInfo(e.type));var r;Un(this,Gn(t,{duration:(r=n.duration,Number.isFinite(r)?r:r===1/0?-1:void 0)}))}),n.addEventListener("error",e=>{const t=Hn(n,this.eventInfo(e.type)),o=e.error||n.error;if(!o)return Un(this,t,!0);const r=o.code,i={error_message:o.message||rn(r),error_code:r,error_stack:o.stack||""};return Un(this,Gn(t,i),!0)}),n.on("src",e=>{var t;const o=null===(t=e.detail)||void 0===t?void 0:t.src;if("string"!=typeof o)return;if(!an(n.original_src))return;if(!an(o))return;if(o==n.original_src)return;this.media_session_id=We();Un(this,Hn(n,this.eventInfo(e.type))),Pn(this)}),n.on("visibilitychange",e=>{Un(this,Hn(n,this.eventInfo(e.type))),Pn(this)})}}Health.events=Nn,Health._UNLOAD_SUBSCRIBED=!1,rt(window,Health);class FlowplayerComponent extends HTMLElement{constructor(e){super(),this.player=e}}class FlowplayerLogo extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-logo");const t={logo:""};e.on(N,e=>{var n;const o=t.logo,r=(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)||"";o!=r&&(t.logo=r,this.set_logo(r,e.detail.logo_alt_text,e.detail.logo_href))})}set_logo(e,t,n){this.innerHTML="";const o=document.createElement("img");if(!e)return;if(o.src=e,t&&(o.alt=t),!n)return this.append(o);const r=document.createElement("a");r.href=n,r.append(o),this.append(r)}}class FlowplayerHeaderDuration extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-duration"),e.on(N,e=>{var t;const n=(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.duration)||NaN;this.innerText=isFinite(n)?Ge(n):""})}}const Vn={name:"fp-fullscreen",translation_key:"core.fullscreen"},Kn={name:"fp-fullscreen-exit",translation_key:"core.exit_fullscreen"},Yn={name:"fp-play",translation_key:"core.play"},Xn={name:"fp-pause",translation_key:"core.pause"},Zn={translation_key:"core.mute",name:"fp-volume-mute-unmute"},Qn={translation_key:"core.play",name:"fp-small-play"},Jn={translation_key:"core.pause",name:"fp-small-pause"},$n={name:"fp-fast-forward"},eo={name:"fp-rewind"};class FlowplayerIcon extends FlowplayerComponent{constructor(e,t){super(e),this.classList.add("fp-icon",t.name),t.title&&this.setAttribute("title",t.title),t.title&&this.setAttribute("aria-label",t.title),t.translation_key&&this.setAttribute("aria-label",e.i18n(t.translation_key)),this.setAttribute("tabindex","0"),this.setAttribute("focusable","true")}}document.addEventListener(o,(function(e){this.active_menu&&!e.composedPath().includes(this.active_menu)&&(Array.from(document.querySelectorAll(".fp-engine")).forEach(e=>{var t;const n=e.root.querySelector("details[open].fp-menu-container");n&&(n.open=!1,null===(t=n.querySelector("summary"))||void 0===t||t.removeAttribute("aria-expanded"),e.root.classList.toggle("has-menu-opened",!1))}),this.active_menu=void 0)}));const to={passive:!0};var no;function oo(e,t){let n=0,o=-1,r=-1;const i=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),s=e.classList;e.id=i,s.remove(no.GRABBING),s.remove(no.TOUCHING);const a=t.onseek||sn,d=t.onstart||sn,p=t.onend||sn,f=t.onmouse||sn,m=t.ontouch||sn,h=t.ontouchend||sn;function y(t){!function(){const t=e.getBoundingClientRect();n=t.left,o=t.width}();let r=(function(e){return"function"==typeof window.TouchEvent&&e instanceof TouchEvent}(t)?t.changedTouches[0].pageX:t.pageX)-n;return r>o&&(r=o),r<0&&(r=0),r/o*100}function v(t){const n=y(t);n!=r&&(a(e,n),r=n)}return e.addEventListener("touchstart",(function(t){ro(e,t)&&(s.add(no.TOUCHING),io(e.parentElement)&&(s.add(no.GRABBING),m(e,y(t)),d(e,y(t)),v(t)))}),to),e.addEventListener(c,(function(t){v(t),f(e,y(t))}),to),e.addEventListener(u,(function(t){setTimeout((function(){s.remove(no.TOUCHING)}),500),ro(e,t)&&(s.remove(no.GRABBING),h(e,y(t)),p(e,y(t)),o=0)}),to),e.addEventListener("touchcancel",(function(){s.remove(no.GRABBING,no.TOUCHING),o=0}),to),e.addEventListener("mousedown",(function(t){s.contains(no.TOUCHING)||(document.addEventListener(l,v),s.add(no.GRABBING),d(e,y(t)),t.preventDefault(),v(t))})),e.addEventListener(l,(function(t){s.contains(no.TOUCHING)||f(e,y(t))})),document.addEventListener("mouseup",(function(t){s.contains(no.TOUCHING)||(document.removeEventListener(l,v),s.contains(no.GRABBING)&&(s.remove(no.GRABBING),p(e,y(t)),o=0))})),e}function ro(e,t){const n=t.target;return!!n&&(n&&!n.closest(e.id)||!io(e.parentElement)||!e.classList.contains(no.TOUCHING))}function io(e){if(!e)return!1;const t=window.getComputedStyle(e);return"0"!==t.width&&"0"!==t.height&&"0"!==t.opacity&&"none"!==t.display&&"hidden"!==t.visibility}!function(e){e.GRABBING="has-grab",e.TOUCHING="has-touch"}(no||(no={}));class FlowplayerVolumeBar extends FlowplayerComponent{constructor(e){super(e),this.className="fp-volume";const t=e.root.classList,n=t.contains("is-tiny")?6:t.contains("is-small")?8:10,o=Array.from({length:n}).map(()=>{const e=document.createElement("i");return e.className="fp-tick",e});this.append(...o),oo(this,{onseek:(t,n)=>{n>0&&(e.muted=!1,e._storage.removeItem("mute")),e._storage.setItem("volume",(e.volume=n/100).toString()),this.adjustVolumeSlider(e.volume)}}),this.setAttribute("tabindex","0"),this.setAttribute("role","slider"),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","1"),this.setAttribute("aria-label",e.i18n("core.volume","volume")),e.on("volumechange",()=>{const t=0==e.volume||e.muted;t&&this.adjustVolumeSlider(0);const n=e.opt("ui");this.classList.contains(no.GRABBING)||t&&"number"==typeof n&&(4&n)>0||this.adjustVolumeSlider(e.volume)})}adjustVolumeSlider(e){this.setAttribute("aria-valuenow",e.toString()),this.setAttribute("aria-valuetext",Math.round(100*e)+"%");const t=Array.from(this.querySelectorAll(".fp-tick")),n=Math.round(e*t.length);t.forEach((e,t)=>{e.classList.toggle("fp-color",t<n)})}}function so(e,t){if(!e.parentElement)return;const n=e.clientWidth/e.parentElement.clientWidth*100/2;e.style.left=t-n+"%",e.style.display="block"}function ao(e,t){if(isNaN(e.duration))return;const n=e.buffered;n.length&&(t.style.width=Math.min(n.end(n.length-1)/e.duration*100,100)+"%")}function lo(e,t){e.style.width="0",t.style.display="none"}function co(e,t,n){if(!t.seekable||0==t.seekable.length)return;so(n,e);const o=vn(t),r=(100-Math.max(0,Math.min(e,100)))/100*(o.head-o.tail);n.innerText="-"+Ge(r)}function uo(e,t){e/=100,t.currentTime=function(e,t){if(t>1||t<0)return console.warn("cannot calculate a percent outside of range(0..1)"),0;const n=vn(e);return n.tail+t*(n.head-n.tail)}(t,e)}function po(e,t){e.style.width="0",t.style.display="none"}class FlowplayerTimelineBar extends FlowplayerComponent{constructor(e){let t;super(e),this.bufferEle=Ue("fp-buffer"),this.progress=Ue("fp-progress","fp-color"),this.tooltipEle=Ue("fp-timestamp"),this.proposedSeekBar=Ue("fp-hover"),this.dragger=Ue("fp-dragger","fp-color"),this.classList.add("fp-timeline","fp-bar"),this.tooltipEle.style.display="none",this.setAttribute("role","slider"),this.setAttribute("tabindex","0"),this.setAttribute("aria-label",e.i18n("timeline","Timeline")),this.setAttribute("aria-valuenow","0"),this.progress.append(this.dragger),this.append(this.bufferEle,this.progress,this.proposedSeekBar,this.tooltipEle);const n=requestAnimationFrame;let o=void 0;const r=()=>{var n;0==e.reaper||t.live||(n=e,this.progress.style.width=n.currentTime/n.duration*100+"%",o=void 0,e.paused||this.classList.contains(no.GRABBING)||o||(o=setTimeout(r,200)))},i=()=>!!this.player.opt("seekable",!0)&&!isNaN(this.player.duration);oo(this,{onseek:(n,o)=>{if(i())switch(!!t.live){case!0:co(o,e,this.tooltipEle);break;case!1:!function(e,t,n){const o=t.duration*(e/100);if(t.disabled&&o>t.currentTime)return!1;n.style.width=e+"%",t.currentTime=o}(o,e,this.progress),so(this.tooltipEle,o)}},onstart:()=>{i()&&(e.emit("timeline/gesture/start"),!e.hasState("is-casting")&&e.setState(J,!0),t.live||function(e){e.style.display="block"}(this.tooltipEle))},onend:function(o,i){n(r),0!=t.seekable&&t.live&&uo(i,e)},ontouchend:()=>{t.live?po(this.proposedSeekBar,this.tooltipEle):lo(this.proposedSeekBar,this.tooltipEle),setTimeout(()=>e.emit("timeline/gesture/end"),0)},onmouse:(n,o)=>{if(i()&&(e.emit("timeline/gesture/move",{percent:o}),!this.classList.contains(no.GRABBING)))switch(!!t.live){case!0:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),co(o,e,this.tooltipEle);break;case!1:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),function(e,t,n){if(isNaN(e)||isNaN(t.duration))return;so(n,e),n.innerHTML="";const o=document.createElement("span");o.innerText=Ge(e/100*t.duration),n.append(o)}(o,e,this.tooltipEle)}}}),e.on(N,(function(e){e.data&&(t=e.data)})),e.on(_,()=>n(r)),e.on(h,()=>{0==e.reaper||t.live||ao(e,this.bufferEle)}),e.on("dvr",e=>{this.progress.style.width=e.detail+"%"}),e.on("timeupdate",()=>{0!=e.reaper&&(n(r),this.setAttribute("aria-valuenow",e.currentTime+""),this.setAttribute("aria-valuetext",Math.round(e.currentTime)+e.i18n("core.sec","sec")),t.live||ao(e,this.bufferEle))}),e.on(f,()=>{0!=e.reaper&&(t.live||ao(e,this.bufferEle))}),e.on("durationchange",t=>{if(0==e.reaper)return;const n=_n(e)?gn(e):t.data||e.duration;isNaN(n)||(this.setAttribute("aria-valuemax",n+""),this.setAttribute("aria-valuemin","0"))}),this.addEventListener(a,()=>{e.emit("timeline/gesture/end"),t.live?po(this.proposedSeekBar,this.tooltipEle):lo(this.proposedSeekBar,this.tooltipEle)})}}class FlowplayerChaptersTimelineBar extends FlowplayerTimelineBar{constructor(e){super(e),this.handleChapters(e)}handleChapters(e){const t=document.createElement("div");let n;this.addEventListener("chapters:new",e=>{t.innerText="",this.querySelectorAll(".fp-chapter").forEach(e=>this.removeChild(e)),e.data&&e.data.forEach(e=>{const o=document.createElement("div");o.className="fp-chapter",o.style.left=e.left,o.style.bottom=o.style.top="0",o.style.width=e.width,o.title=e.title,o.onmouseover=()=>{t.innerText=e.title},o.onmouseleave=()=>{t.innerText=n||""},this.appendChild(o)})}),this.addEventListener("chapter:changed",o=>{var r;const i=o.data;i&&(t.parentNode||(null===(r=Me(e,D))||void 0===r||r.insertAdjacentElement("beforebegin",t),t.classList.toggle("fp-togglable",!0),t.classList.toggle("fp-chapter-info",!0)),n=i,t.innerText=i)})}}class FlowplayerLiveStatus extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-live-status");const t=Ue("fp-live-text"),n=Ue("fp-live-indicator","fp-color");t.textContent="live",this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.append(n,t),this.addEventListener(o,(function(){!function(e){try{e.dvr_offset=0,e.currentTime=En(e)}catch(e){console.warn("failed to seek to now: %j",e)}}(e)}))}}class FlowplayerDuration extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-duration"),this.setAttribute("aria-hidden","true"),e.on(N,n=>{if(0==e.reaper||!n.data)return;t=n.data;const o=_n(e)?NaN:n.data.duration||0;if(isNaN(o)||o>=Number.MAX_SAFE_INTEGER)return this.style.display="none";this.style.display="inline-block",this.innerText=Ge(o)}),e.on(f,()=>{var n,o;0==e.reaper||t.live||(o=this,(n=e).duration&&(o.innerText=Ge(n.duration)))})}}class FlowplayerElapsedTime extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-elapsed"),this.innerText=Ge(0),this.setAttribute("aria-hidden","true"),e.on(N,e=>{e.data&&(t=e.data)}),e.on("timeupdate",()=>{var n;0!=e.reaper&&(t.live?(n=e,this.innerText=Ge(n.currentTime)):function(e,t){t.innerText=Ge(e.currentTime)}(e,this))})}}class FlowplayerControlButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-btns","fp-small-switch");const t=ye(e,"flowplayer-small-pause-icon"),n=ye(e,"flowplayer-small-play-icon");t.addEventListener("click",(function(){e.togglePlay(),setTimeout((function(){n.focus&&n.focus()}),100)})),n.addEventListener("click",(function(){e.togglePlay(),setTimeout((function(){t.focus&&t.focus()}),100)})),this.append(t,n)}}class FlowplayerLeftRightZone extends FlowplayerComponent{constructor(e,t){super(e),this.classList.add(t);const n=this.classList.contains("fp-left-zone")?-1:1,o=document.createElement("span"),r=ye(e,this.classList.contains("fp-left-zone")?W:"flowplayer-fast-forward-icon");r.removeAttribute("tabindex"),o.classList.add("fp-zone-seconds"),this.append(o,r);e.on(S,()=>{o.innerText=""}),e.on("seek:queued",e=>{const t=e.data;if(!t)return;if("number"!=typeof t.offset)return;const n=t.offset;if(0==n)return this.reset_zone();n>0&&this.classList.contains("fp-right-zone")||n<0&&!this.classList.contains("fp-right-zone")?this.render_zone_state(n):this.reset_zone()}),e.on("seek:cancel",()=>{this.reset_zone()}),this.reset_zone(),this.addEventListener(u,(function(t){isNaN(e.duration)||isNaN(e.currentTime)||16384&e.opt("ui")||e.hasState(oe)||!e.hasState("will-seek")&&!e.hasState(se)||e.enqueueSeek(5*n)&&(t.stopPropagation(),t.preventDefault())}))}reset_zone(){const e=this.querySelector(".fp-zone-seconds");e&&(e.innerText="")}render_zone_state(e){const t=this.querySelector(".fp-zone-seconds");t&&(t.innerText=Math.abs(e)+"")}}class FlowplayerError extends FlowplayerComponent{constructor(e){super(e),this.className="fp-error",this.message=document.createElement("p"),this.message.className="error-message",this.append(this.message),this.addEventListener("error",e=>{const t=e.detail;t&&(this.message.textContent=t.formatted_data.message)})}}class FlowplayerHeaderLeftRight extends FlowplayerComponent{constructor(e,t,...n){super(e),this.className=t;const r=e.createComponents(...n);this.append(...r),"fp-left"!==t&&r.forEach(t=>{t.addEventListener(o,()=>e.toggleFullScreen())})}}class FlowplayerMiddleWait extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-wait"),Array(...Array(4)).map((e,t)=>t).forEach(()=>{this.append(document.createElement("b"))})}}class FlowplayerMiddleZone extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-middle-zone");const t=e.createComponents(H,"flowplayer-middle-buttons");this.append(...t)}}class FlowplayerMiddleButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-switch"),[j,q].forEach(t=>{const n=ye(e,t);n.removeAttribute("tabindex"),this.append(n)})}}class FlowplayerVolumeControl extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-volume-control");const t=ye(e,z);this.append(t),!n().ios&&this.append(ye(e,U)),t instanceof FlowplayerIcon&&t.addEventListener(o,(function(){e.toggleMute()}))}}class FlowplayerHeader extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-header"),this.append(...e.createComponents("flowplayer-header-left-zone","flowplayer-header-right-zone")),e.reaper&&e.reaper.set("header",this)}}class FlowplayerControls extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-controls","fp-togglable"),this.append(...e.createComponents("flowplayer-control-buttons",x,M,P,"flowplayer-control-duration","flowplayer-volume-control"))}}class FullscreenIcon extends FlowplayerIcon{constructor(e,t){super(e,t),this.setAttribute("role","button")}}class FlowplayerMiddle extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-middle"),this.append(...e.createComponents("flowplayer-middle-left-zone",G,"flowplayer-middle-right-zone")),this.setAttribute("tabindex","0"),e.reaper&&e.reaper.set("middle",this),this.handleClick(e),this.handleTouch(e),e.once("beforeplay",()=>{this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label")})}handleClick(e){[o,r].forEach(t=>this.addEventListener(t,(function(n){if(!(n.defaultPrevented||e.root.classList.contains("is-endscreen")||t===r&&e.root.classList.contains("no-fullscreen")))return n.preventDefault(),e.emit(n.type),!1}))),e.on(o,(function(t){setTimeout((function(){t.defaultPrevented||e.togglePlay()}),0)})),e.on(r,(function(t){setTimeout((function(){t.defaultPrevented||e.toggleFullScreen()}),0)}))}handleTouch(e){let t=!1;this.addEventListener(u,(function(t){t.cancelable&&!e.hasState("is-endscreen")&&(t.preventDefault(),e.emit(t.type,{source:t}))})),e.on(u,(function(n){setTimeout((function(){if(n.defaultPrevented)return;if(e.ended)return e.togglePlay(!0);const o=e.hasState(Q);t&&clearTimeout(t),(o||e.hasState(se)||e.hasState("no-autoplay"))&&(e.hasState(se)&&(e.setState(se,!1),e.setState("is-hovered",!1)),e.togglePlay(),o)||(e.setState(se,!0),e.paused||(t=setTimeout((function(){t=!1,e.setState(se,!1),e.setState("is-hovered",!1)}),2e3)))}),0)}))}}class FlowplayerUi extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-ui"),this.append(...e.createComponents(F,B,D))}}return kt.extensions.unshift.apply(kt.extensions,[I18n,Analytics,Health,class Default{constructor(e){ve(e,k,FlowplayerUi),ve(e,"flowplayer-error",FlowplayerError),ve(e,D,FlowplayerControls),ve(e,x,FlowplayerLiveStatus),ve(e,"flowplayer-control-duration",FlowplayerDuration),ve(e,P,e.extensions.find(e=>"Chapters"===e.name)?FlowplayerChaptersTimelineBar:FlowplayerTimelineBar),ve(e,M,FlowplayerElapsedTime),ve(e,U,FlowplayerVolumeBar),ve(e,"flowplayer-volume-control",FlowplayerVolumeControl),ve(e,"flowplayer-control-buttons",FlowplayerControlButtons),ve(e,F,FlowplayerHeader),ve(e,C,FlowplayerLogo),ve(e,"flowplayer-header-duration",FlowplayerHeaderDuration),ve(e,"flowplayer-header-left-zone",class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-left","flowplayer-header-duration")}}),ve(e,"flowplayer-header-right-zone",class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-right fp-togglable","flowplayer-fullscreen-enter-icon","flowplayer-fullscreen-exit-icon")}}),ve(e,B,FlowplayerMiddle),ve(e,G,FlowplayerMiddleZone),ve(e,H,FlowplayerMiddleWait),ve(e,"flowplayer-middle-buttons",FlowplayerMiddleButtons),ve(e,"flowplayer-middle-right-zone",class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-right-zone")}}),ve(e,"flowplayer-middle-left-zone",class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-left-zone")}}),ve(e,"flowplayer-small-play-icon",class extends FlowplayerIcon{constructor(e){super(e,Qn),this.setAttribute("role","button")}}),ve(e,"flowplayer-small-pause-icon",class extends FlowplayerIcon{constructor(e){super(e,Jn),this.setAttribute("role","button")}}),ve(e,j,class extends FlowplayerIcon{constructor(e){super(e,Yn),this.setAttribute("role","button")}}),ve(e,q,class extends FlowplayerIcon{constructor(e){super(e,Xn),this.setAttribute("role","button")}}),ve(e,"flowplayer-fullscreen-enter-icon",class extends FullscreenIcon{constructor(e){super(e,Vn)}}),ve(e,"flowplayer-fullscreen-exit-icon",class extends FullscreenIcon{constructor(e){super(e,Kn)}}),ve(e,"flowplayer-fast-forward-icon",class extends FlowplayerIcon{constructor(e){super(e,$n)}}),ve(e,W,class extends FlowplayerIcon{constructor(e){super(e,eo)}}),ve(e,z,class extends FlowplayerIcon{constructor(e){super(e,Zn),this.classList.add("fp-volumebtn"),this.setAttribute("role","switch"),e.on("volumechange",()=>{const t=0==e.volume||e.muted;this.setAttribute("aria-label",e.i18n("core.muted","Muted")),this.setAttribute("aria-checked",t?"true":"false")})}})}init(e,t,n){var o;bn(e,0,n),wn(e,t,n),o=n,"undefined"!=typeof window&&"ontouchstart"in window&&o.setState("is-touch-device",!0),o.setState("is-accessibility",!1)}}]),Object.assign(kt,{ui:mn,i18n:I18n})}));
|