@flowplayer/player 3.34.0 → 3.34.1
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 +2 -2
- package/package.json +1 -1
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/ssai.js +1 -1
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=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),a=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),s=/edg/i.test(t),l=/opr|opera/i.test(t),c=/SamsungBrowser/.test(t),u=c&&/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,edge:s,opera:l,chrome:i,firefox:a,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:c,samsung_tv:c&&u,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="mount",r="retry",i="error",a="click",s="dblclick",l="mouseleave",c="mouseup",u="mousedown",d="mousemove",p="touchstart",f="touchmove",h="touchend",m="touchcancel",y="resize",g="fullscreenenter",v="fullscreenexit",E="loadedmetadata",_="loadeddata",w="progress",S="timeupdate",b="loadstart",k="volumechange",T="pause",N="playing",A="play",O="waiting",I="canplay",L="ended",R="seeked",C="seeking",P="durationchange",F="viewenter",M="viewleave",D="src",U="reap",x="qualitychange",H="landscape",W="portrait",q="dvr",B="live",G="recover",V="seek:queued",j="seek:cancel",K="remotesession:ended",z="intersectionchange",Q="renderplugin",Y="audioonlysource",X="error:fatal",$="config",Z="state",J="beforeplay",ee="beforepause",te="content:loadstart",ne="flowplayer:error";var oe=Object.freeze({__proto__:null,MOUNT:o,RETRY:r,ERROR:i,CONTEXT_MENU:"contextmenu",CLICK:a,DBL_CLICK:s,KEYUP:"keyup",KEYDOWN:"keydown",LOAD:"load",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:l,MOUSE_UP:c,MOUSE_DOWN:u,MOUSE_MOVE:d,TOUCH_START:p,TOUCH_MOVE:f,TOUCH_END:h,TOUCH_CANCEL:m,RESIZE:y,SCROLL:"scroll",FULLSCREEN_ENTER:g,FULLSCREEN_EXIT:v,FULLSCREEN_CHANGE:"fullscreenchange",METADATA:E,DATA:_,PROGRESS:w,TIME_UPDATE:S,LOAD_START:b,VOLUME_CHANGE:k,PAUSE:T,PLAYING:N,PLAY:A,WAITING:O,CAN_PLAY:I,ENDED:L,SEEKED:R,SEEKING:C,DURATION_CHANGE:P,VIEW_ENTER:F,VIEW_LEAVE:M,SOURCE:D,REAP:U,QUALITIES:"qualities",QUALITY_CHANGE:x,VIDEO_TRACKS:"videoTracks",SET_QUALITY:"quality:set",VIDEO_TRACK_SELECT:"tracks:video:select",RECOMMENDATIONS_READY:"recommendationsready",LANDSCAPE:H,PORTRAIT:W,DVR:q,LIVE:B,RECOVER:G,SEEK_QUEUED:V,SEEK_CANCEL:j,PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:K,INTERSECTIONCHANGE:z,WEBKIT_NEEDKEY:"webkitneedkey",RENDER_PLUGIN:Q,AUDIO_ONLY_SOURCE:Y,NON_RECOVERABLE_ERROR:X,CONFIG:$,STATE:Z,BEFORE_PLAY:J,BEFORE_PAUSE:ee,CONTENT_REAL_LOAD_START:te,CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",STANDARD_ERROR:ne});const re="flowplayer-ui",ie="flowplayer-logo",ae="flowplayer-control",se="flowplayer-control-buttons",le="flowplayer-live-status",ce="flowplayer-elapsed-time",ue="flowplayer-timeline-bar",de="flowplayer-control-duration",pe="flowplayer-volume-control",fe="flowplayer-volume-bar",he="flowplayer-header",me="flowplayer-header-left-zone",ye="flowplayer-header-right-zone",ge="flowplayer-header-duration",ve="flowplayer-middle",Ee="flowplayer-middle-zone",_e="flowplayer-wait",we="flowplayer-middle-buttons",Se="flowplayer-middle-left-zone",be="flowplayer-middle-right-zone",ke="flowplayer-small-play-icon",Te="flowplayer-small-pause-icon",Ne="flowplayer-play-icon",Ae="flowplayer-pause-icon",Oe="flowplayer-fullscreen-enter-icon",Ie="flowplayer-fullscreen-exit-icon",Le="flowplayer-fast-forward-icon",Re="flowplayer-rewind-icon",Ce="flowplayer-volume-icon",Pe="flowplayer-error";var Fe=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",VIDEO_MENU:"flowplayer-video-menu",UI:re,LOGO:ie,CONTROL:ae,CONTROL_BUTTONS:se,LIVE_STATUS:le,ELAPSED:ce,TIMELINE:ue,CHAPTERS_TIMELINE:"flowplayer-chapters-timeline-bar",CONTROL_DURATION:de,VOLUME_CONTROL:pe,VOLUME_BAR:fe,HEADER:he,HEADER_LEFT_ZONE:me,HEADER_RIGHT_ZONE:ye,HEADER_DURATION:ge,MIDDLE:ve,MIDDLE_ZONE:Ee,WAIT:_e,MIDDLE_BUTTONS:we,MIDDLE_LEFT_ZONE:Se,MIDDLE_RIGHT_ZONE:be,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:ke,SMALL_PAUSE_ICON:Te,PLAY_ICON:Ne,PAUSE_ICON:Ae,FULLSCREEN_ENTER_ICON:Oe,FULLSCREEN_EXIT_ICON:Ie,SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:Le,REWIND_ICON:Re,SHARE_ICON:"flowplayer-share-icon",SUBTITLES_MENU_ICON:"flowplayer-subs-menu-icon",MENU_BACK_ICON:"flowplayer-menu-back",VOLUME_ICON:Ce,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:Pe,TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue",SSAI_UI:"flowplayer-ssai-ui",SSAI_CONTROLS:"flowplayer-ssai-controls",SSAI_TIMELINE:"flowplayer-ssai-timeline",SSAI_INDICATOR:"flowplayer-ssai-indicator"});const Me="is-playing",De="is-fullscreen",Ue="is-paused",xe="is-muted",He="is-loaded",We="is-loading",qe="is-starting",Be="is-seeking",Ge="is-disabled",Ve="is-small",je="is-tiny",Ke="is-rtl",ze="is-ended",Qe="is-live",Ye="is-error",Xe="is-waiting",$e="is-autoplay",Ze="is-toggling",Je="is-live-seeked",et="no-timeline",tt="has-poster",nt="will-play",ot="will-pause",rt="has-menu-opened",it="is-touched",at="is-hovered",st="is-touch-device",lt="will-seek",ct="is-seekable",ut="is-in-viewport",dt="no-controls",pt="is-destroyed",ft="is-source-processing";var ht=Object.freeze({__proto__:null,PLAYING:Me,FULLSCREEN:De,PAUSED:Ue,MUTED:xe,LOADED:He,LOADING:We,STARTING:qe,SEEKING:Be,GRABBING:"is-grabbing",DISABLED:Ge,SMALL:Ve,TINY:je,RTL:Ke,TV:"is-tv",ENDED:ze,LIVE:Qe,ERRORED:Ye,WAITING:Xe,AUTOPLAY:$e,SEAMLESS:"is-seamless",TOGGLING:Ze,LIVE_SEEKED:Je,NO_DVR:et,HAS_POSTER:tt,WILL_PLAY:nt,WILL_PAUSE:ot,MENU_OPENED:rt,TOUCHED:it,HOVERED:at,TOUCH_DEVICE:st,WILL_SEEK:lt,SEEKABLE:ct,IN_VIEWPORT:ut,NO_CONTROLS:dt,DESTROYED:pt,IS_SOURCE_PROCESSING:ft});function mt(e){this.message=e}mt.prototype=new Error,mt.prototype.name="InvalidCharacterError";var yt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new mt("'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 gt=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(yt(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 yt(t)}};function vt(e){this.message=e}vt.prototype=new Error,vt.prototype.name="InvalidTokenError";var Et=function(e,t){if("string"!=typeof e)throw new vt("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(gt(e.split(".")[n]))}catch(e){throw new vt("Invalid token specified: "+e.message)}};Et.InvalidTokenError=vt;const _t=new Map,wt=(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),St=(e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)},bt=(e,t)=>{const n=e.customElements.get(t),o=n&&n===t,r=Object.values(e.defaultElements).includes(t);return Boolean(r||o)};var kt,Tt;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(kt||(kt={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(Tt||(Tt={}));const Nt={Unknown:"00-00",MediaUnknown:"01-00",MediaUnavailable:"01-01",MediaUnsupportedVideoFormat:"01-02",MediaUnsupportedAudioFormat:"01-03",MediaBitrateExceeded:"01-04",MediaBufferOverread:"01-05",MediaIntegerOverflow:"01-06",MediaQuotaExceeded:"01-07",MediaInvalidCompositionDuration:"01-08",MediaInvalidCompositionSourceDuration:"01-09",MediaInvalidCompositionSourceStartTime:"01-10",MediaMalformedDepth:"01-11",PlaybackUnknown:"02-00",PlaybackVideoBufferUnderRun:"02-01",PlaybackAudioBufferUnderRun:"02-02",PlaybackVideoBufferingTimeout:"02-03",PlaybackAudioBufferingTimeout:"02-04",PlaybackManifestParseError:"02-05",PlaybackVideoDecodeError:"02-06",PlaybackAudioDecodeError:"02-07",PlaybackDroppedFramesExceeded:"02-08",PlaybackPlayheadExceedsDuration:"02-09",PlaybackUnsupportedDevice:"02-10",PlaybackManifestLoadError:"02-11",PlaybackManifestLoadTimeout:"02-12",PlaybackManifestParsingError:"02-13",PlaybackManifestIncompatibleCodecs:"02-14",PlaybackLevelEmptyError:"02-15",PlaybackLevelLoadError:"02-16",PlaybackLevelLoadTimeout:"02-17",PlaybackLevelSwitchError:"02-18",PlaybackAudioTrackLoadError:"02-19",PlaybackAudioTrackLoadTimeout:"02-20",PlaybackFragLoadError:"02-21",PlaybackFragLoadTimeout:"02-22",PlaybackFragDecryptError:"02-23",PlaybackFragParsingError:"02-24",PlaybackFragGap:"02-25",PlaybackRemuxAllocError:"02-26",PlaybackBufferAddCodecError:"02-27",PlaybackBufferIncompatibleCodecs:"02-28",PlaybackBufferAppendError:"02-29",PlaybackBufferStalledError:"02-30",PlaybackBufferFullError:"02-31",PlaybackBufferSeekOverHole:"02-32",PlaybackBufferNudgeOnStall:"02-33",PlaybackInternalException:"02-34",PlaybackInternalAborted:"02-35",PlaybackManifestLoaderFailure:"02-36",PlaybackSegmentBaseLoaderError:"02-37",PlaybackTimeSyncFailed:"02-38",PlaybackFragmentLoaderFailure:"02-39",PlaybackAppendError:"02-40",PlaybackRemoveError:"02-41",PlaybackDataUpdateFailed:"02-42",PlaybackManifestNoStreams:"02-43",PlaybackUnknownManifestType:"02-44",PlaybackDashInsufficientSegmentInfo:"02-45",PlaybackDashNoRepresentations:"02-46",PlaybackDashNoAdaptationSets:"02-47",PlaybackDashNoInitSegment:"02-48",PlaybackDashUnsupportedContainerFormat:"02-49",PlaybackDashKeySystemMismatch:"02-50",PlaybackMultipleKeyIDs:"02-51",PlaybackDashConflictingKeyIDs:"02-52",PlaybackRestrictedStreams:"02-53",PlaybackHlsMasterAndMediaTags:"02-54",PlaybackRepresentationIdConflict:"02-55",PlaybackHlsUnsupportedKeyFormats:"02-56",PlaybackManifestNoVariants:"02-57",PlaybackHlsUndeclaredVariables:"02-58",PlaybackAes128InvalidKeyLength:"02-59",PlaybackDashConflictingAes128Keys:"02-60",PlaybackDashUnsupportedAes128Encryption:"02-61",PlaybackManifestPatchMismatch:"02-62",PlaybackEmptyMediaPlaylist:"02-63",PlaybackNonContiguousCompositionTrack:"02-64",PlaybackDecoderNotFound:"02-65",PlaybackDecoderTemporarilyUnavailable:"02-66",PlaybackIncompatibleAsset:"02-67",PlaybackNoCompatibleExternalDisplay:"02-69",PlaybackOutOfMemory:"02-70",PlaybackToneMappingFailed:"02-71",PlaybackVideoCompositorFailed:"02-72",NetworkUnknown:"03-00",NetworkNoInternet:"03-01",NetworkRequestTimeout:"03-02",NetworkUnableToResolveHost:"03-03",NetworkResourceNotFound:"03-04",NetworkExpiredUrl:"03-05",NetworkUrlResolutionFailed:"03-06",NetworkDownloadErrorIdManifest:"03-07",NetworkDownloadErrorIdSidx:"03-08",NetworkDownloadErrorIdContent:"03-09",NetworkDownloadErrorIdInitialization:"03-10",NetworkDownloadErrorIdXlink:"03-11",NetworkHttpRequestFailed:"03-12",NetworkMaxRetriesExceeded:"03-13",NetworkSegmentMissing:"03-14",NetworkHttp400BadRequest:"03-400",NetworkHttp401Unauthorized:"03-401",NetworkHttp402PaymentRequired:"03-402",NetworkHttp403Forbidden:"03-403",NetworkHttp404NotFound:"03-404",NetworkHttp405MethodNotAllowed:"03-405",NetworkHttp406NotAcceptable:"03-406",NetworkHttp407ProxyAuthenticationRequired:"03-407",NetworkHttp408RequestTimeout:"03-408",NetworkHttp409Conflict:"03-409",NetworkHttp410Gone:"03-410",NetworkHttp411LengthRequired:"03-411",NetworkHttp412PreconditionFailed:"03-412",NetworkHttp413PayloadTooLarge:"03-413",NetworkHttp414URITooLong:"03-414",NetworkHttp415UnsupportedMediaType:"03-415",NetworkHttp416RangeNotSatisfiable:"03-416",NetworkHttp417ExpectationFailed:"03-417",NetworkHttp418ImATeapot:"03-418",NetworkHttp421MisdirectedRequest:"03-421",NetworkHttp422UnprocessableEntity:"03-422",NetworkHttp423Locked:"03-423",NetworkHttp424FailedDependency:"03-424",NetworkHttp425TooEarly:"03-425",NetworkHttp426UpgradeRequired:"03-426",NetworkHttp428PreconditionRequired:"03-428",NetworkHttp429TooManyRequests:"03-429",NetworkHttp431RequestHeaderFieldsTooLarge:"03-431",NetworkHttp451UnavailableForLegalReasons:"03-451",NetworkHttp500InternalServerError:"03-500",NetworkHttp501NotImplemented:"03-501",NetworkHttp502BadGateway:"03-502",NetworkHttp503ServiceUnavailable:"03-503",NetworkHttp504GatewayTimeout:"03-504",NetworkHttp505HTTPVersionNotSupported:"03-505",NetworkHttp506VariantAlsoNegotiates:"03-506",NetworkHttp507InsufficientStorage:"03-507",NetworkHttp508LoopDetected:"03-508",NetworkHttp510NotExtended:"03-510",NetworkHttp511NetworkAuthenticationRequired:"03-511",ContentProtectionUnknown:"04-00",ContentProtectionConcurrentStreamLimitExceeded:"04-01",ContentProtectionEntitlementRefused:"04-02",ContentProtectionLicenseExpired:"04-03",ContentProtectionBadLicenseRequest:"04-04",ContentProtectionLicenseServerTimeout:"04-05",ContentProtectionInsufficientHDCPSupport:"04-06",ContentProtectionGeoRestricted:"04-07",ContentProtectionParentalControlRestricted:"04-08",ContentProtectionCDNUnauthorized:"04-09",ContentProtectionInvalidAccessToken:"04-10",ContentProtectionKeySystemNoKeys:"04-11",ContentProtectionKeySystemNoAccess:"04-12",ContentProtectionKeySystemNoSession:"04-13",ContentProtectionKeySystemNoConfiguredLicense:"04-14",ContentProtectionKeySystemCertificateRequestFailed:"04-15",ContentProtectionKeySystemCertificateUpdateFailed:"04-16",ContentProtectionKeySystemSessionUpdateFailed:"04-17",ContentProtectionKeySystemStatusOutputRestricted:"04-18",ContentProtectionKeySystemStatusInternalError:"04-19",ContentProtectionKeyLoadError:"04-20",ContentProtectionKeyLoadTimeout:"04-21",ContentProtectionCapabilityMediaKeysError:"04-22",ContentProtectionManifestKeySystemUnknown:"04-23",ContentProtectionKeySystemUnavailable:"04-24",ContentProtectionCDMCreationFailed:"04-25",ContentProtectionCDMAttachFailed:"04-26",ContentProtectionCDMServerCertificateRejected:"04-27",ContentProtectionCDMSessionCreationFailed:"04-28",ContentProtectionCDMLicenseRequestFailed:"04-29",ContentProtectionCDMLicenseResponseRejected:"04-30",ContentProtectionManifestMissingDRMInfo:"04-31",ContentProtectionLicenseServerMissing:"04-32",ContentProtectionOfflineSessionRemoved:"04-33",ContentProtectionInitDataTransformationError:"04-34",ContentProtectionServerCertificateRequestFailed:"04-35",ContentProtectionInsufficientHDCPVersion:"04-36",ContentProtectionHDCPVersionCheckFailed:"04-37",AdsUnknown:"08-00",AdsVastParseError:"08-100",AdsInvalidVastSchema:"08-101",AdsVastVersionNotSupported:"08-102",AdsUnexpectedAdType:"08-200",AdsCreativeLinearityMismatch:"08-201",AdsCreativeDurationMismatch:"08-202",AdsCreativeSizeMismatch:"08-203",AdsWrapperVastError:"08-300",AdsVastResponseRedirectTimeout:"08-301",AdsWrapperLimitReached:"08-302",AdsVastResponseEmpty:"08-303",AdsLinearAdDisplayError:"08-400",AdsMediaFileNotFound:"08-401",AdsMediaFileUnavailable:"08-402",AdsUnsupportedMimeType:"08-403",AdsUnableToDisplayMediaFile:"08-405",AdsMezzanineFileMissing:"08-406",AdsMezzanineFileDownloaded:"08-407",AdsRejectedAd:"08-408",AdsInteractiveCreativeError:"08-409",AdsVerificationNodeExecutionError:"08-410",AdsNonLinearAdDisplayError:"08-500",AdsNonLinearAdSizeMismatch:"08-501",AdsNonLinearAdFetchError:"08-502",AdsNonLinearUnsupportedType:"08-503",AdsCompanionAdDisplayError:"08-600",AdsCompanionAdSizeMismatch:"08-601",AdsRequiredCompanionAdError:"08-602",AdsCompanionAdFetchError:"08-603",AdsUndefinedVastError:"08-900",AdsUnknownVpaidError:"08-901",AdsVastDocumentEmpty:"08-999"},At=Object.fromEntries(Object.entries(Nt).map(([e,t])=>[t,e]));const Ot=e=>{return e.autoplay&&Tt.AUDIO_REQUIRED&(!0===(t=e.autoplay)?Tt.ON:!1===t?Tt.OFF:t);var t};function It(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(ot)||e.paused),function(e,t,n){const o=e.poll(t?J:ee,{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(nt)?(e.setState(ot,!0),e.setState(nt,!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!==Rt(e.original_src)&&Lt(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==Rt(e.original_src)}(e)&&Lt(e),function(e){const t=e.hasState($e),n=t&&Ot(e.opts);n&&(e.muted&&e.toggleMute(!1),0==e.volume&&(e.volume=1));t&&e.setState($e,!1);return e.play().then(()=>{e.hasState(ot)&&e.togglePlay(!1)}).catch(o=>{if(console.warn(t?n?"[flowplayer/play] autoplay audio required\n%s":"[flowplayer/play] attempting muted autoplay\n%s":"",o.message,"\ninstance:",e),t&&!n)return e.muted=!0,e.play()})}(e)):(e.setState(ot,!1),!e.hasState(Me)&&e.setState(nt,!0),Promise.resolve())}function Lt(e){e.opts.is_native&&(e.hasState(He)||(e.hasState(We)||e.emit(te),e.setState(We,!0),e.load()))}function Rt(e){const t=document.createElement("a");return t.href=e,t.href}function Ct(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 Pt(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 Ft(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const Mt=e=>{var{src:t}=e,n=Ct(e,["src"]);return[Object.assign({src:t,type:t?Ft("video/"+Pt(t)):""},n)]};function Dt(e){return Mt({src:e})}function Ut(e){var{src:t,type:n}=e,o=Ct(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:Mt(Object.assign({src:t},o))}const xt="health:record",Ht="rebuffer",Wt="rebuffer:ended",qt="display",Bt="insights:ttff",Gt="insights:time_to_first_frag_loaded",Vt="insights:watched_interval",jt="flowplayer:feature",Kt="health:ready";var zt=Object.freeze({__proto__:null,RECORD:xt,REBUFFER:Ht,REBUFFER_ENDED:Wt,DISPLAY:qt,TIME_TO_FIRST_FRAME:Bt,TIME_TO_FIRST_FRAGMENT_LOADED:Gt,WATCHED_INTERVAL:Vt,FEATURE_USAGE:jt,HEALTH_SERVICE_READY:Kt});const Qt={All:1,High:.1,Medium:.01,Low:.001,None:0};function Yt(e,{feature_name:t,behavior:n,sample_rate:o}){t&&(o||(o=Qt.All),e.emit(jt,{feature_name:t,behavior:n,sample_rate:o}))}var Xt;function $t(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?Dt(e):Array.isArray(e)||"object"!=typeof e?e.reduce(function(e,t){return"string"==typeof t&&(t=Dt(t)),"object"!=typeof t||Array.isArray(t)||(t=Ut(t)),e.concat(t)},[]):Ut(e)}(n);return function(e){[Be,ot,nt,Me,Ue,We,He,Je].forEach(t=>e.setState(t,!1)),e.setState(qe,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(Xt.Ok==function(e,t,n){e.emit(D,n),t.playback_token&&"string"==typeof n.src&&n.src.startsWith("https://")&&(n.src=function(e,t){const n=new URL(e);return n.pathname=`/pt:${t}${n.pathname}`,n.toString()}(n.src,t.playback_token),Yt(e,{feature_name:"signed-urls",behavior:"used",sample_rate:.1}));"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),Xt.Ok):Xt.Err}(e,t,i)||Xt.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit(Y);t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return Xt.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return Xt.Err;"string"==typeof n.src&&(e.preload=null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src);return Xt.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(Xt||(Xt={}));const Zt=[U,C,D,j];var Jt;function en(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?tn(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,tn(e,t))},1e3),function(e,t){e.setState(lt,!0),e.setState(Jt.BACKWARD,t.offset<0),e.setState(Jt.FORWARD,t.offset>0)}(e,t),e.emit(V,t),t))}function tn(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(Jt.FORWARD,!1),e.setState(Jt.BACKWARD,!1),e.setState(lt,!1)}(e)}function nn(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function on(...e){const t=document.createElement("div");return 0==e.length||t.classList.add(...e),t}function rn(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 an(e){const t="number"==typeof e?e:parseInt(e,10);return(t>9?"":"0")+t}function sn(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+":"+an(o)+":"+an(e)):t+an(o)+":"+an(e)}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(Jt||(Jt={}));const ln=navigator.languages||[navigator.language];function cn(e,t,n,o){if((o=o||0)>=e.length)return n;return rn(e[o],t,cn(e,t,n,o+1))}function un(e,t,n){const o=new Map,r=t.lang;return r&&e[r]&&o.set(r,e[r]),function(){try{return ln.reduce((e,t)=>~t.indexOf("-")?e.concat(t,t.split("-")[0]):e.concat(t),[])}catch(e){return[]}}().forEach(function(t){e[t]&&!o.has(t)&&o.set(t,e[t])}),e[n]&&!o.has(n)&&o.set(n,e[n]),Array.from(o.values())}const dn=[1e7]+""+-1e3+-4e3+-8e3+-1e11,pn=()=>"undefined"==typeof crypto?"":dn.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),fn="flowplayer/uuid";let hn="";!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 mn=["touchstart","touchmove"];function yn(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function gn(e,t,n){const o=yn(t,n);return e.dispatchEvent(o),e}function vn(e,t,n){const o=yn(t,n);return e.dispatchEvent(o),o}function En(e,t,n,o){Array.isArray(t)?t.forEach(t=>_n(e,t,n,o)):_n(e,t,n,o)}function _n(e,t,n,o){if(r=t,!~mn.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 wn(e,t,n,o){return En(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 Sn={preload:"auto",rtl:!1,controls:!0},bn=["muted","preload"];function kn(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(et)!=n&&r.setState(et,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 $t(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,gn(r,Z,r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>wt(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(Ze,!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout(function(){r.setState(Ze,!1)},n)},r.emit=(e,t)=>(gn(r,e,t),r),r.on=(e,t)=>(En(r,e,t),r),r.once=(e,t)=>(wn(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)=>vn(r,e,t),r.togglePlay=function(e){return r.hasState(Ye)?Promise.reject():It(r,0,e)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),gn(r,k)},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState(Ge,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(),gn(r,U),r.setState(pt,!0)},0)},r.setAttrs=function(e){return bn.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?rn(Sn,t):n,rn(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?cn(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState(Qe)&&(r.setState(et,!0),gn(r,B)),"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")),r.setState(Ke,r.opt("rtl",function(e){if(!e)return nn();const t=e.getAttribute("dir");return t?"rtl"==t:nn()}(o))),r.setState(Qe,!!e.live),r.setState(tt,"string"==typeof e.poster&&e.poster.length>0),r.setState(ct,!!e.seekable),r.setState(dt,0==e.controls),o.style.backgroundImage=r.hasState(tt)?"url('"+e.poster+"')":"",gn(r,$,e)},r.renderPlugin=function(e){vn(r,Q,e).defaultPrevented||r.root.appendChild(e)};const a={offset:0,timer:0};var s,l;l=a,(s=r).on(Zt,function(){tn(s,l)}),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return en(r,a,e)},r.deviceId=function(){return function(e){if(hn)return hn;try{const t=e.getItem(fn);if(t)return t;const n=pn();return e.setItem(fn,n),n}catch(e){return hn=pn()}}(r._storage)}}var Tn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Nn(){return"undefined"!=typeof window?window:void 0!==Tn?Tn:{}}const An=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function On(e,t){return!!~An.indexOf(e)||e.indexOf(t)===e.length-t.length}On.check_whitelist=function(e){return!!~An.indexOf(e)};const In="production";function Ln(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=Et(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&&Ln.validate(n),n}var Rn;function Cn(e){return{grant:e,is_granted:t=>(e&t)===t}}function Pn({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",a.alt="Flowplayer Logo",e.append(o,r,i,a)}function Fn(e){return t=>{setTimeout(function(){if(!t.defaultPrevented&&!t.prevented)return e(t)},0)}}Ln.validate=function(e){if("string"==typeof e&&(e=Ln(e)),!e||!e.raw){if(On.check_whitelist(window.location.hostname)||"dev"===In.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=On.bind(null,t);if("dev"!==In.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==In.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},Ln.id=function(e){if(e)return"string"==typeof e&&(e=Ln(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"}(Rn||(Rn={})),Cn.of=Cn,Cn.from_token=function(e){const t=Ln(e,{require_valid_token:!0});return Cn.of(t.data.acl)},Cn.permissions=Rn;const Mn="is-casting",Dn="has-casted";function Un(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 xn(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 Hn(e,t){e.style.width="0",t.style.display="none"}function Wn(e,t){const n=e.seekable;if("object"!=typeof e.opts||0==n.length)return{head:0,tail:0};const o=Gn(e),r=t||e.live_state.dvr_window;return{head:o,tail:"number"!=typeof r||o-r<0?n.start(0):o-r}}function qn(e){return e.opt("live",!1)||e.duration>=Number.MAX_SAFE_INTEGER}function Bn(e){return isFinite(e.duration)?e.duration:0==e.seekable.length?0:Wn(e).head}function Gn(e){var t;const n=e.seekable;return n.length?e.hasState("is-chromecast-playing")||!(null===(t=e.hls)||void 0===t?void 0:t.liveSyncPosition)?n.end(n.length-1):e.hls.liveSyncPosition:0}function Vn(e,t,n){if(!t.seekable||0==t.seekable.length)return;Un(n,e);const o=Wn(t),r=(100-Math.max(0,Math.min(e,100)))/100*(o.head-o.tail);n.innerText="-"+sn(r)}function jn(e){e.currentTime=Wn(e).tail}function Kn(e){try{e.dvr_offset=0,e.currentTime=Gn(e)}catch(e){console.warn("failed to seek to now: %j",e)}}function zn(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=Wn(e);return n.tail+t*(n.head-n.tail)}(t,e)}function Qn(e,t){e.style.width="0",t.style.display="none"}function Yn(e,t){const n=t.clientWidth;t.classList.toggle(Ve,n<600),t.classList.toggle(je,n<400)}function Xn(e,t,n){let o=!0;t.classList.add("flowplayer"),Yn(0,t),wn(n,b,()=>{void 0!==e.start_quality&&Yt(n,{feature_name:"start-quality",behavior:String(e.start_quality),sample_rate:Qt.High})}),En(n,b,()=>{if(!n.hasState(We)&&!n.hasState(He)&&e.is_native&&"none"!==e.preload)return"metadata"===e.preload?(n.setState(We,!0),n.emit(te)):void Lt(n)}),En(n,E,()=>{e.is_native&&"metadata"===e.preload&&n.paused&&n.emit(I)}),En(n,[b,y],function(){Yn(0,t)}),En(n,Z,function(){Object.entries(n.playerState).forEach(function([e,n]){t.classList.toggle(e,n)})}),En(n,S,function(){n.setState(Xe,!n.hasState(Mn)&&!n.hasState(qe)&&n.readyState<3)}),En(n,L,function(t){const o=n.original_src;Fn(()=>{if(o===n.original_src){if(n.setState(ze,!0),wn(n,S,function(){n.setState(ze,!1),o===n.original_src&&n.setState(qe,!e.loop&&!!e.rewind&&n.paused)}),e.loop)return n.togglePlay(!0);e.rewind&&(n.currentTime=0)}})(t)}),En(n,[C,R],function(e){n.setState(Be,e.type==C)}),En(n,K,function(e){setTimeout(()=>{e.defaultPrevented||(n.currentTime=e.detail.currentTime)},0)}),En(n,L,function(){n.setState(Me,!1),o=!0}),En(n,w,()=>{if(!n.opts.live||!n.opts.is_native)return;const e=n.seekable;0!=e.length&&n.emit("dvr/window",e.end(e.length-1)-e.start(0))}),En(n,_,function(){n.setState(He,!0),n.setState(We,!1)}),En(n,A,()=>{n.setState(nt,!0)}),En(n,[O,I,b],function(t){if(!n.hasState(Be)&&(t.type!=I||e.autoplay||n.setState(Xe,!1),t.type!=b||"none"!=n.opt("preload")||e.autoplay)){if(t.type==b&&e.autoplay)return wn(n,N,function(){n.setState(Xe,!1)});t.type!=O||n.hasState(He)||n.setState(We,!0),n.setState(ze,!1),n.setState(Xe,t.type==O)}}),En(n,[N,T],function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:n});document.dispatchEvent(e)},0);const r=t.type==N,i=n.currentTime==n.duration,a=r&&o&&e.autoplay||n.hasState(Xe);if(r&&(n.started=!0,o=!1),n.setState(Xe,!1).setState(nt,!1),!r&&n.setState(ot,!1),i)return;const s=r?Me:Ue,l=r?Ue:Me;n.transitionState(s,l,a?0:300),!n.hasState(qe)||n.root.classList.contains("ad-hide-first-frame")||n.root.classList.contains("preroll-ios")||function(e,t){if(!e.hasState(Qe)||![void 0,0,-1].includes(t)||!e.seekable.length||e.hasState(Dn))return e.setState(qe,!1);e.once(R,()=>e.setState(qe,!1)),0===t?jn(e):Kn(e)}(n,e.start_time)})}const $n=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function Zn(){return t.find(e=>e.hasState(Mn))}const Jn=.5625;function eo(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}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(N,this.render),null===(t=this.player)||void 0===t||t.once(L,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(N,this.render),null===(o=this.player)||void 0===o||o.off(L,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(to).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}ExplorerPlan.pluginName="explorer-plan";const to={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)"},no="flowplayer/"+N;function oo(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=ro("flowplayer.version","3.34.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=ro("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const ro=(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 io(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 ao="without_recovery",so="off";class FlowplayerError extends Error{static getErrorKey(e){return e in At?At[e]:At["00-00"]}constructor(e,t,n={}){super(e),this.message=e,this.flowplayerErrorCode=t,this.config=n,this.id=pn(),this.isFatal=!!n.isFatal,this.errorKey=FlowplayerError.getErrorKey(this.flowplayerErrorCode)||"unknown"}toJSON(){return{message:this.message,flowplayer_error_code:this.flowplayerErrorCode,id:this.id,root_error_id:this.config.rootErrorId,resource:this.config.resource,is_fatal:this.isFatal,is_retry:!!this.config.isRetry}}}const lo=io("core/retry");function co(e,t){const n={pending:void 0,count:0};e.on(ne,o=>{var i,a,s,l,c;const u=null===(i=o.detail)||void 0===i?void 0:i.error;u.config.isRetry=!!n.count,void 0===n.pending&&(null===(s=null===(a=u.config)||void 0===a?void 0:a.retryOpts)||void 0===s?void 0:s.retry)!==so&&(t.retry||(null===(c=null===(l=u.config)||void 0===l?void 0:l.retryOpts)||void 0===c?void 0:c.retry))&&(++n.count,n.pending=function(e,t,n){var o,i;return setTimeout(()=>{var o;e.hasState(pt)||(t.pending=void 0,(null===(o=n.config.retryOpts)||void 0===o?void 0:o.retry)!==ao&&e.emit(G),e.emit(r,{error:n}),lo("%s try",t.count))},null!==(i=null===(o=n.config.retryOpts)||void 0===o?void 0:o.retryTimeout)&&void 0!==i?i:3e3*t.count)}(e,n,u))}),e.on(N,()=>{n.count=0}),e.on([D,G],e=>{e.type===D&&(n.count=0),clearTimeout(n.pending),n.pending=void 0}),e.on(r,Fn(()=>{e.load()}))}const uo=[te,i,D];function po(e){try{return!!new URL(e)}catch(e){return!1}}const fo=navigator;function ho(e){var t,n;const o=null===(t=e.hls)||void 0===t?void 0:t.bandwidthEstimate;return o?1e-6*o:(null===(n=fo.connection)||void 0===n?void 0:n.downlink)||-1}function mo(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 yo=e=>{switch(e){case!0:return Tt.ON;case!1:return Tt.OFF;default:return e}};function go(){try{const e=window.location!==window.parent.location?document.referrer:document.location.href;return"string"==typeof e&&e.slice(0,200)}catch(e){return!1}}const vo=[],Eo="https://ihi.flowplayer.com/v1/health/events";function _o(e){if(e.suspended)return;const t=vo.slice(0);vo.length=0,0!=t.length&&(e.logger.log(`:dispatch events={${t.length}}`),mo(function(){try{return"undefined"==typeof window?Eo:window.__FLOWPLAYER_INSIGHTS_URL?window.__FLOWPLAYER_INSIGHTS_URL:Eo}catch(e){return Eo}}(),t))}async function wo(e,t,n){const o=await bo();vo.push(Object.assign(t,o)),e.logger.log(":enqueue",t.event,t),vo.length<10&&!n||_o(e)}const So=()=>{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}},bo=async()=>({client_time:Date.now()}),ko=(e,t)=>Object.assign(e,{detail:t}),To=(e,{event:t,media_session_id:n,session_id:o,play_range_id:r})=>({event:t,media_session_id:n,session_id:o,play_range_id:r,device_id:e.deviceId(),version:"3.34.0",commit:"05614c70f97798c941eb7edb4944b088237fa192",ima_sdk_version:So(),preload:e.opt("preload"),autoplay:yo(e.opt("autoplay")),live:e.opt("live"),dvr:!!e.live_state.dvr,source:e.original_src,downlink_mbs:ho(e),page_url:go(),player_id:e.opt("metadata.player_id"),media_id:e.opt("metadata.media_id")||e.opt("metadata.stream_target_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")}),No=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"]});const Ao=(e,t)=>{let n=null;return(...o)=>{null!==n&&(clearTimeout(n),n=null),n=setTimeout(()=>t(...o),e)}};var Oo;!function(e){e[e.Starting=0]="Starting",e[e.ConfigFinalized=1]="ConfigFinalized",e[e.TimerStartedWithAutoplay=2]="TimerStartedWithAutoplay",e[e.TimerStartedWithUserGesture=3]="TimerStartedWithUserGesture",e[e.MetricReported=4]="MetricReported"}(Oo||(Oo={}));const Io=[a,h];class TimeToFirstFrame{constructor(e=Oo.Starting,t=!1){this.state=e,this.loadedAd=t}reset(){this.state=Oo.Starting,this.loadedAd=!1,this.start=void 0,this.end=void 0,this.adDetails=void 0}adInfo(){const{ad_tag_id:e,vast_ad_id:t}=this.adDetails||{};return{ad_tag_id:e,vast_ad_id:t}}toJSON(){return Object.assign({ad_was_requested:this.loadedAd,ms_to_first_frame:Math.round(this.end&&this.start?this.end-this.start:-1)},this.adInfo())}startTimer(e){this.state==Oo.ConfigFinalized&&(this.state=e,this.start=performance.now())}hasStarted(){return[Oo.TimerStartedWithAutoplay,Oo.TimerStartedWithUserGesture].includes(this.state)}stopTimer(e){this.hasStarted()&&(this.end||(this.end=performance.now()),this.state=Oo.MetricReported,e())}}function Lo(e){return Math.round(1e3*e)/1e3}class EWMA{constructor(e){this.tickInterval=e,this.ewma=0,this.startTime=Date.now()}decay(){const e=Date.now()-this.startTime;return Math.pow(2,-e/(4*this.tickInterval))}update(e){const t=this.decay();return this.ewma=t*this.ewma+(1-t)*e,this.ewma}toJSON(){return this.ewma}}const Ro={skipUnreliableSegments:!0};class WatchedState{constructor(e){this.player=e,this.marchingInterval=void 0,this.lastWatchedPoint=void 0,this.watchedSum=0,this.lastReportedSum=0,this.ewmaTickWatched=new EWMA(WatchedState.AccuracyMilliseconds)}reset(){this.onNotWatching(),this.watchedSum=0,this.lastReportedSum=0,this.lastWatchedPoint=void 0}onNotWatching(){this.marchingInterval&&(this.updateWatched(),this.marchingInterval=clearInterval(this.marchingInterval))}onWatching(){this.marchingInterval||(this.lastWatchedPoint=this.createWatchedPoint(),this.marchingInterval=setInterval(()=>{this.updateWatched()},WatchedState.AccuracyMilliseconds))}createWatchedPoint(){return{currentTime:this.player.currentTime,paused:this.player.paused}}updateWatched(){const e=this.createWatchedPoint();this.lastWatchedPoint&&this.calculateTimeWatched(this.lastWatchedPoint,e),this.lastWatchedPoint=e}calculateTimeWatched(e,t){var n,o;const r=t.currentTime-e.currentTime,i=this.ewmaTickWatched.update(r);if(!(r<0)&&!(!1!==(null===(o=null===(n=this.player.opts)||void 0===n?void 0:n.health)||void 0===o?void 0:o.skipUnreliableSegments)&&1e3*r>1.3*WatchedState.AccuracyMilliseconds)&&(this.watchedSum+=r,this.watchedSum!=this.lastReportedSum&&(this.watchedSum>this.lastReportedSum+WatchedState.ReportingIntervalSeconds||this.player.ended))){const e=Lo(i),t={total_watched_seconds:Lo(this.watchedSum),tick_watched_seconds:e,batch_watched_seconds:Lo(this.watchedSum-this.lastReportedSum)};this.lastReportedSum=this.watchedSum,this.player.emit(Vt,t)}}}WatchedState.ReportingIntervalSeconds=5,WatchedState.AccuracyMilliseconds=160;const Co=pn();class Health{constructor(e,t){let n;this.session_id=Co,this.suspended=!1,this.logger=io("health",t.opts),this.media_session_id=pn(),this.play_range_id=pn(),this.analyticsLoop=setInterval(()=>_o(this),2e3),t.on(U,()=>clearInterval(this.analyticsLoop)),t.on(N,()=>{n!==this.media_session_id&&(n=this.media_session_id,this.first_playing_event_timestamp=Date.now()),this.play_range_id=pn()});let o=Date.now()-1e3;t.on(S,e=>{if(n!==this.media_session_id)return;const r=Date.now();if(r<o)return;o=Date.now()+5e3;const i=To(t,this.eventInfo(e.type)),a=ko(i,{duration:(s=t.duration,Number.isFinite(s)?s:s===1/0?-1:void 0)});var s;this.first_playing_event_timestamp&&(Object.assign(a,{ms_since_first_playing:r-this.first_playing_event_timestamp}),this.first_playing_event_timestamp=void 0),wo(this,a)});const r=this;if(t.health={get media_session_id(){return r.media_session_id},set media_session_id(e){r.media_session_id=e},get session_id(){return r.session_id},set session_id(e){r.session_id=e},toggle(e){e?r.resume():r.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,play_range_id:this.play_range_id}}suspend(){this.suspended=!0,clearInterval(this.analyticsLoop)}resume(){this.suspended=!1,this.analyticsLoop=setInterval(()=>_o(this),2e3)}init(e,t,n){if(go().toString().startsWith("data:"))return this.suspend();!function(e){let t=null;const n=()=>{t=null};e.on(O,function(t){e.seeking||e.networkState===e.NETWORK_LOADING&&(e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e.emit(Ht))}),e.on(Ht,e=>{t=e}),e.on(I,o=>{if(t){const r=o.timeStamp-t.timeStamp;if(n(),r<31)return;if(r>3e5)return;e.emit(Wt,{rebuffer_duration:r/1e3})}}),uo.forEach(t=>e.on(t,n))}(n),function(e){let t;[I,te].forEach(n=>{e.on(n,n=>{const o=Date.now();switch(n.type){case te:return t=o;case I:if(t)return e.emit(Gt,{ms_since_loading_started:o-t}),t=null}})})}(n),function(e){if(void 0===window.performance)return;const t=new TimeToFirstFrame;e.on(D,()=>{if(!e.opt("metadata.media_id"))return t.reset();t.reset(),t.state=Oo.ConfigFinalized}),e.on(te,()=>{(e.root.classList.contains("ad-hide-first-frame")||e.opt("autoplay"))&&t.startTimer(Oo.TimerStartedWithAutoplay)}),Io.forEach(n=>{e.on(n,()=>{e.opt("autoplay")||t.startTimer(Oo.TimerStartedWithUserGesture)})}),e.on("ad-requested",()=>{t.loadedAd=!0}),e.on(S,()=>{if(!(e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA)){if(e.root.classList.contains("ad-hide-first-frame"))return!t.end&&(t.end=performance.now());switch(t.state){case Oo.TimerStartedWithAutoplay:case Oo.TimerStartedWithUserGesture:return t.stopTimer(()=>e.emit(Bt,t.toJSON()))}}}),e.on("ad-started",n=>{switch(t.end=void 0,t.adDetails=n.detail,t.state){case Oo.TimerStartedWithAutoplay:case Oo.TimerStartedWithUserGesture:return t.stopTimer(()=>e.emit(Bt,t.toJSON()))}})}(n),function(e){const t=new WatchedState(e);e.on(te,()=>t.reset()),e.on(N,()=>t.onWatching()),e.on(Wt,()=>!e.paused&&t.onWatching()),e.on(Ht,()=>t.onNotWatching()),e.on(T,()=>t.onNotWatching()),e.on(C,()=>{e.currentTime>1&&t.updateWatched(),t.onNotWatching()}),e.on(R,()=>{e.paused||t.onWatching()}),e.on(L,()=>t.updateWatched()),e.on("visibilitychange",()=>t.updateWatched())}(n),n.on(qt,e=>{wo(this,To(n,this.eventInfo(e.type)),!0)}),n.on(xt,({detail:e})=>{const t=To(n,this.eventInfo(e.event));Object.assign(t,e.detail||{}),wo(this,t)}),n.on(jt,e=>{if(t=e.detail.sample_rate,!Object.values(Qt).includes(t))return console.debug(`sample_rate=${e.detail.sample_rate} is invalid`);var t,o;if(!(0!==(o=e.detail).sample_rate&&Math.random()<=o.sample_rate))return;const r=To(n,this.eventInfo(e.type));wo(this,ko(r,e.detail))}),n.on(D,()=>{n.opt("metadata.media_id")&&n.emit(Kt)}),[b,E,_,w,O,Ht].forEach(e=>{n.on(e,e=>{wo(this,To(n,this.eventInfo(e.type)))})}),[Wt,Bt,Gt,Vt].forEach(e=>{n.on(e,e=>{const t=To(n,this.eventInfo(e.type));wo(this,Object.assign(t,e.detail))})}),[N,T,C,R,L,g,v,I,te].forEach(e=>{n.on(e,e=>{wo(this,To(n,this.eventInfo(e.type)))})}),n.on(k,Ao(800,e=>{const t=To(n,this.eventInfo(e.type));wo(this,ko(t,{volume:parseFloat(n.volume.toFixed(2)),muted:n.muted}))})),n.on(y,Ao(800,e=>{const o=To(n,this.eventInfo(e.type));wo(this,ko(o,{height:t.clientHeight,width:t.clientWidth}))})),n.on("hls/failover",e=>{const t=To(n,this.eventInfo(e.type)),o=e.detail,{reason:r,from:i}=o;wo(this,ko(t,{reason:r,from:i}))}),n.on(x,({type:e,detail:t})=>{if("hls"===t.plugin)return function(e,t,n,o){const r=To(t,e.eventInfo(n)),i=Object.assign({before:No(o.before),after:No(o.after),automatic:o.automatic,downscale:o.downscale},o.before?{}:{start_quality:t.opts.start_quality});wo(e,Object.assign(Object.assign({},r),{state:i}))}(this,n,e,t)}),n.on(ne,e=>{const t=To(n,this.eventInfo(e.type)),o=e.detail.error;if(!o)return wo(this,t,!0);return wo(this,ko(t,o.toJSON()),!0)}),n.on(D,e=>{var t;const o=null===(t=e.detail)||void 0===t?void 0:t.src;if("string"!=typeof o)return;if(!po(n.original_src))return;if(!po(o))return;if(o==n.original_src)return;this.media_session_id=pn();wo(this,To(n,this.eventInfo(e.type))),_o(this),n.setOpts({health:Object.assign(Object.assign({},n.opts.health),Ro)})}),n.on("visibilitychange",e=>{wo(this,To(n,this.eventInfo(e.type))),_o(this)})}}function Po(e,t){return function(e){return e.extensions.reduce((e,t)=>e.find(e=>e.pluginName===t.pluginName)?(console.warn("flowplayer: duplicate plugin %s detected, plugin names should be unique",t.name),e):(e.push(t),e),[])}(e).map(n=>new n(e,t))}function Fo(e,t={}){var n,o,r,i,a,s;switch(e.code){case MediaError.MEDIA_ERR_ABORTED:return new FlowplayerError(null!==(n=e.message)&&void 0!==n?n:"The playback was aborted, typically by the user.",Nt.PlaybackInternalAborted,Object.assign({isFatal:!1,retryOpts:{retry:so}},t));case MediaError.MEDIA_ERR_NETWORK:return new FlowplayerError(null!==(o=e.message)&&void 0!==o?o:"A network error prevented media from being downloaded.",Nt.NetworkHttpRequestFailed,Object.assign({isFatal:!0},t));case MediaError.MEDIA_ERR_DECODE:return new FlowplayerError(null!==(r=e.message)&&void 0!==r?r:"An error occurred while decoding the media.",Nt.PlaybackVideoDecodeError,Object.assign({isFatal:!0},t));case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return new FlowplayerError(null!==(i=e.message)&&void 0!==i?i:"The media could not be loaded because the format is not supported.",Nt.MediaUnsupportedVideoFormat,Object.assign({isFatal:!0},t));case 5:return new FlowplayerError(null!==(a=e.message)&&void 0!==a?a:"Encrypted content could not be played due to missing keys or unsupported protection scheme.",Nt.ContentProtectionKeySystemNoKeys,Object.assign({isFatal:!0},t));default:return new FlowplayerError(null!==(s=e.message)&&void 0!==s?s:"An unknown playback error occurred.",Nt.PlaybackUnknown,Object.assign({isFatal:!0},t))}}Health.pluginName="health",Health.events=zt,Health._UNLOAD_SUBSCRIBED=!1;const Mo=function(){const e=Nn(),t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function Do(n,r){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),Do;"string"==typeof r&&(r={src:r}),r||(r={}),r.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(r.token=window.__FLOWPLAYER_TOKEN);const a="string"==typeof n?document.querySelector(n):n;if(!a)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const s=a.querySelector("video.fp-engine");if(s)return s;const l=function(e){try{return Ln.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}(r.token);if(!l.success)return Pn({root:a,data:{reason:"token",details:l.message}});const c=new Map,u=function(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}(r,a);var d;u.reaper=c,u._customElements=_t,Object.defineProperty(u,"token",{value:"string"==typeof r.token?Ln.id(r.token):"",writable:!1}),u.addEventListener(U,()=>{c.clear(),u.reaper=0,delete u.root}),u.root=a,r.token&&Cn.from_token(r.token).is_granted(Cn.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(u)&&t.push(u),kn(r,a,u),u.setAttrs(r),u.plugins=Po(Do,u),Xn(r,a,u),function(e,t,n){if(!window.IntersectionObserver)return;const o={should_resume:!!e.autoplay,locked:!1};En(n,A,function(){o.locked||(o.should_resume=!0)});const r=()=>{if(!e.autoplay)return;if(n.hasState(ut)&&o.should_resume)return n.togglePlay(!0);const t=n.currentSrc;e.autopause||n.hasState(ut)||!o.should_resume||wn(n,F,()=>{e.autoplay&&o.should_resume&&t===n.currentSrc&&n.togglePlay(!0)})},i=()=>{if(!e.autoplay)return;if(!e.is_native)return;if("auto"===e.preload)return;if(n.hasState(ut))return Lt(n);const t=n.currentSrc;wn(n,F,()=>{t!==n.currentSrc||n.readyState>1||!n.paused||Lt(n)})};En(n,D,function(){o.should_resume=!!e.autoplay,n.off(b,i),n.once(b,i),n.off(I,r),n.once(I,r)}),En(n,T,function(){o.locked||(o.should_resume=!1)});const a=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(ut);if(n.setState(ut,t>=.2),n.emit(z,{ratio:t}),o===n.hasState(ut))return;const r=n.hasState(ut)?F:M;n.emit(r)},0)})},{threshold:$n});a.observe(t),n.on(U,()=>a.disconnect()),En(n,F,function(){!o.should_resume||!e.autopause||Zn()||n.opts.autoplay&&!n.readyState||n.togglePlay(!0)}),En(n,M,function(){if(!e.autopause||Zn())return;const t=!n.paused;o.locked=!0,n.pause(),setTimeout(function(){o.should_resume=t,o.locked=!1},0)})}(r,a,u),function(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit(y,n)});n.observe(e),t.on(U,()=>n.disconnect())}(a,u),function(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let i=eo(e.ratio||Jn);r.style.paddingTop=100*i+"%";const a=[_,E];n.on(a,function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})}),n.on($,function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=eo((null==e?void 0:e.ratio)||t||Jn);i!==o&&(i=o,r.style.paddingTop=100*o+"%")})}(r,a,u),function(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(U,()=>document.removeEventListener(no,t)),document.addEventListener(no,t)}(u),oo(a,u),co(u,r),(d=u).on(i,Fn(e=>{const t=e instanceof MediaError?e:d.error;t&&d.emit(ne,{error:Fo(t,{resource:d.original_src})})})),u.plugins.forEach(e=>{try{e.init(r,a,u)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),u.setOpts(r),u.opts=r,r.src&&u.setSrc(r.src);const p=u.readyState;return p>0&&u.currentSrc&&u.emit(E),p>2&&u.currentSrc&&u.emit(I),u.emit(o),u.on(X,function(e){Pn({root:a,video:u,data:e.data||{}})}),setTimeout(gn,0,document,"flowplayer:player:created",u),u}Object.assign(Do,Mo),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=_t,o.defaultElements=Fe,o.version="3.34.0",o.commit="05614c70f97798c941eb7edb4944b088237fa192",o.instances=t,o.extensions=e,o.support=n,o.events=oe,o.states=ht,o.errors=Nt,o.jwt=Et,o.autoplay=Tt,o.quality=kt}(Do),"object"==typeof document&&setTimeout(gn,0,document,"flowplayer:umd",Do),Do.extensions.unshift.apply(Do.extensions,[Health]),"undefined"!=typeof window&&"function"==typeof window.matchMedia&&[H,W].forEach(function(e){window.matchMedia("(orientation: "+e+")").addListener(function(n){t.length&&t.forEach(function(t){n.matches&&t.emit(e)})})});const Uo=[b,G];function xo(e,t){const n=wt(t,Pe);e.append(n),t.on(ne,o=>{if(!document.body.contains(e))return;const r=o.detail.error;!1!==r.config.showErrorUI&&(r.isFatal||r.config.showErrorUI)&&(t.setState(Ye,!0),console.warn(r),gn(n,ne,{error:r}),gn(n,i,{error:r}))}),Uo.forEach(e=>t.on(e,()=>{!function(e){if(!e.hasState(Ye))return;e.setState(Xe,!0),e.setState(Ye,!1)}(t)}))}const Ho=16384;var Wo=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:Ho,LOGO_ON_BOTTOM:32768});function qo(e,t,n){let o=()=>document.fullscreenElement,r="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),r="webkit"+r,o=()=>t.webkitCurrentFullScreenElement}const i=()=>n.getFullsceenTarget?n.getFullsceenTarget():t;n.toggleFullScreen=function(e,t){if(n.ios_fullscreen_disabled)return;if("boolean"!=typeof e&&(e=!n.hasState(De)),Bo(n)&&(e?function(e,t){e.getAttribute("playsinline")&&e.removeAttribute("playsinline");e.getAttribute("webkit-playsinline")&&e.removeAttribute("webkit-playsinline");t||e.webkitEnterFullScreen()}(n,t):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(it)||e.setState(it,!0)}(n,t)),!document.fullscreenEnabled)return;const r=i();if(e)return r.requestFullscreen();o()===r&&document.exitFullscreen()},Bo(n)&&(n.ios_fullscreen_disabled=!0,n.once(J,function(){n.ios_fullscreen_disabled=!1}),n.on(["webkitendfullscreen","webkitbeginfullscreen"],e=>{const t="webkitbeginfullscreen"===e.type;n.setState(De,t).emit(t?g:v).toggleFullScreen(t,!0)})),setTimeout(()=>{const e=i();e.addEventListener(r,function(){const t=o(),r=t===e||t==n;n.emit(r?g:v),n.setState(De,r)})},0),!1!==e.doubleclick&&t.addEventListener(s,function(e){var t;e.target&&(null===(t=e.target)||void 0===t?void 0:t.classList.contains("fp-ui"))&&n.toggleFullScreen()})}function Bo(e){return!document.fullscreenEnabled&&"function"==typeof e.webkitEnterFullScreen&&"function"==typeof e.webkitExitFullScreen}const Go="use-play-",Vo="mute";function jo(e,t,n){if(!n.reaper)return;const o=document.createDocumentFragment(),r=wt(n,re),i=wt(n,ie);t.append(i),o.append(r),n.reaper.set("ui",r),~t.className.indexOf(Go)||t.classList.add(Go+1),function(e,t,n){const o=on("fp-footer");t.append(o),n.on($,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=on("fp-title");e.innerText=i,o.append(e)}if("string"==typeof r){const e=r.split(" "),t=on("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),xo(r,n),t.appendChild(o);let a=null;[d,f,l].forEach(e=>{t.addEventListener(e,function(e){if(!n.hasState(st)||e.type===f){if(clearTimeout(a),e.type===l)return n.setState(at,!1);n.setState(at,!0),a=setTimeout(function(){n.setState("is-hovered",!1)},2e3)}})}),qo(e,t,n),n.on(k,function(){const e=0==n.volume||n.muted;n.muted=e,n.setState(xe,e),n._storage.setItem(Vo,e.toString())}),"true"==n._storage.getItem(Vo)&&(n.muted=!0,n.setState(xe,n.muted));const s=n._storage.getItem("volume");s&&!isNaN(Number(s))&&(n.volume=Number(s)),n.emit(k),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=Wn(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(B,()=>{const e=setInterval(()=>{if(!n.opts.live||0==n.reaper)return clearInterval(e);if(0==n.seekable.length||n.hasState(Ye))return;const t=function(e){const t=e.currentTime,n=Wn(e);return{progress:Math.min(100,Math.max(0,(t-n.tail)/(n.head-n.tail)*100)),is_live:t-n.head>=-10}}(n);n.hasState(Je)==t.is_live&&n.setState(Je,!t.is_live),n.live_state.dvr&&n.emit(q,t.progress)},200)}),n.on(E,function(){n.setOpts({live:qn(n)})}),n.on(P,function(e){const t=qn(n),o=t?Bn(n):e.data||n.duration;isNaN(o)||n.setOpts({live:t,duration:o})}),n.on(["playlist/advance",D],t=>{if(n.setState($e,!!e.autoplay),n.root.classList.contains("is-livecountdown"))return Ko(n,e);(n.currentSrc||n.srcObject)&&(t.type===D&&["is-playlist",ft].some(e=>n.root.classList.contains(e))||Ko(n,e))}),n.on($,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 a=t.classList;a.toggle("use-play-1",!(32&i||64&i)),a.toggle("use-play-2",(32&i)>0),a.toggle("use-play-3",(64&i)>0),a.toggle("use-thin-controlbar",(128&i)>0),a.toggle("no-title",(256&i)>0),a.toggle("no-description",(512&i)>0),a.toggle("logo-on-right",(8&i)>0),a.toggle("logo-on-bottom",(32768&i)>0),a.toggle("use-drag-handle",(16&i)>0),a.toggle("no-controls",(1024&i)>0),a.toggle("no-duration",(2048&i)>0),a.toggle("no-header",(4096&i)>0),a.toggle("no-mute",(4&i)>0),a.toggle("no-volume",(2&i)>0),a.toggle("no-fullscreen",(1&i)>0),a.toggle("no-touch-zones",(Ho&i)>0)})}function Ko(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,"metadata"in t&&delete t.metadata}function zo(e,t,n){if(Cn.from_token(e.token||"").is_granted(Cn.permissions.NO_METERING))return;Ln.id(e.token||"")&&n.once(N,async()=>await Qo(n,e.token||""))}async function Qo(e,t){const n=Ln.id(t||"");e.once(D,()=>{e.once(N,()=>Qo(e,t))});if(401==(await fetch("https://pmi.flowplayer.com/in",{method:"POST",body:JSON.stringify({token_id:n,factor:1,rnd:Math.random().toString(36).substring(2)})})).status)return e.emit(X,{reason:"token",details:"The token online validation failed"})}class I18n{init(e,t,n){var o;n.reaper&&n.reaper.set("translations",un(I18n,e,"en")),(o=n).once(Kt,()=>{const e=I18n.languagesLoaded().filter(e=>"en"!==e);e.length>0&&e.forEach(e=>{Yt(o,{feature_name:"translations",behavior:`loaded-lang-${e}`,sample_rate:Qt.All})})}),o.on(Kt,()=>{o.opts.lang&&Yt(o,{feature_name:"translations",behavior:`used-lang-${o.opts.lang}`,sample_rate:Qt.Medium})})}static languagesLoaded(){return Object.keys(I18n).filter(e=>!I18n._nonLanguageFields.includes(e)).concat(I18n.en?["en"]:[])}}I18n.pluginName="i18n",I18n.en={ads:{ad:"Ad",ads:"Ads",advertisement:"Advertisement",indicator:"Ads",adchoices:"AdChoices"},audio:{button_txt:"Audio",menu_title:"Audio"},cc:{button:"CC",menu_title:"Subtitles",options:"Options",tracks:"Tracks",reset:"Reset",colors:{Black:"Black",Blue:"Blue",Cyan:"Cyan",Green:"Green",Magenta:"Magenta",Red:"Red",White:"White",Yellow:"Yellow"},edgeStyle:{None:"None","Drop shadow":"Drop shadow",Raised:"Raised",Depressed:"Depressed",Outline:"Outline"},fontFamily:{"Monospaced Serif":"Monospaced Serif","Proportional Serif":"Proportional Serif","Monospaced Sans-Serif":"Monospaced Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Cursive:"Cursive"},properties:{fontFamily:"Font family",fontSize:"Font size",fontColor:"Font color",fontOpacity:"Font opacity",backgroundColor:"Background color",backgroundOpacity:"Background opacity",characterEdgeStyle:"Character edge style"}},chromecast:{start:"start casting",stop:"stop casting"},core:{exit_fullscreen:"Exit fullscreen",fullscreen:"Fullscreen",mute:"Mute",muted:"Muted",pause:"Pause",play:"Play",seconds:"Seconds",timeline_aria_label:"Seek slider",unmute:"Unmute",volume:"Volume",close:"Close","skip-next":"Next","skip-prev":"Previous"},ovp:{starting_in:"Countdown"},playlist:{cancel:"Cancel",up_next:"Up next",autoplay:"Autoplay",now_playing:"Now playing",turn_off_autoplay:"Turn off autoplay",playlist:"Playlist"},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"},vtsel:{button_txt:"Video",menu_title:"Video Track"}},I18n._nonLanguageFields=[],I18n._nonLanguageFields=Object.keys(I18n);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($,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,o.alt=t||"Logo",!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($,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)?sn(n):""})}}const Yo={name:"fp-fullscreen",translation_key:"core.fullscreen"},Xo={name:"fp-fullscreen-exit",translation_key:"core.exit_fullscreen"},$o={name:"fp-play",translation_key:"core.play"},Zo={name:"fp-pause",translation_key:"core.pause"},Jo={translation_key:"core.mute",name:"fp-volume-mute-unmute"},er={translation_key:"core.play",name:"fp-small-play"},tr={translation_key:"core.pause",name:"fp-small-pause"},nr={name:"fp-fast-forward"},or={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")}}function rr(){}document.addEventListener(a,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(rt,!1))}),this.active_menu=void 0)});const ir={passive:!0};var ar;function sr(e,t){let n=0,o=-1,r=-1;const i=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),a=e.classList;e.id=i,a.remove(ar.GRABBING),a.remove(ar.TOUCHING);const s=t.onseek||rr,l=t.onstart||rr,y=t.onend||rr,g=t.onmouse||rr,v=t.ontouch||rr,E=t.ontouchend||rr;function _(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 w(t){const n=_(t);n!=r&&(s(e,n),r=n)}return e.addEventListener(p,function(t){lr(e,t)&&(a.add(ar.TOUCHING),cr(e.parentElement)&&(a.add(ar.GRABBING),v(e,_(t)),l(e,_(t)),w(t)))},ir),e.addEventListener(f,function(t){w(t),g(e,_(t))},ir),e.addEventListener(h,function(t){setTimeout(function(){a.remove(ar.TOUCHING)},500),lr(e,t)&&(a.remove(ar.GRABBING),E(e,_(t)),y(e,_(t)),o=0)},ir),e.addEventListener(m,function(){a.remove(ar.GRABBING,ar.TOUCHING),o=0},ir),e.addEventListener(u,function(t){a.contains(ar.TOUCHING)||(document.addEventListener(d,w),a.add(ar.GRABBING),l(e,_(t)),t.preventDefault(),w(t))}),e.addEventListener(d,function(t){a.contains(ar.TOUCHING)||g(e,_(t))}),document.addEventListener(c,function(t){a.contains(ar.TOUCHING)||(document.removeEventListener(d,w),a.contains(ar.GRABBING)&&(a.remove(ar.GRABBING),y(e,_(t)),o=0))}),e}function lr(e,t){const n=t.target;return!!n&&(n&&!n.closest(e.id)||!cr(e.parentElement)||!e.classList.contains(ar.TOUCHING))}function cr(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"}(ar||(ar={}));const ur="fp-tick";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=ur,e});this.append(...o),sr(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)},onend:()=>{Yt(e,{feature_name:"volume-slider",sample_rate:Qt.High,behavior:String(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")),this.adjustVolumeSlider(e.volume),e.on(k,()=>{const t=0==e.volume||e.muted;t&&this.adjustVolumeSlider(0);const n=e.opt("ui");this.classList.contains(ar.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("."+ur)),n=Math.round(e*t.length);t.forEach((e,t)=>{e.classList.toggle("fp-color",t<n)})}}class FlowplayerTimelineBar extends FlowplayerComponent{constructor(e){let t;super(e),this.bufferEle=on("fp-buffer"),this.progress=on("fp-progress","fp-color"),this.tooltipEle=on("fp-timestamp"),this.proposedSeekBar=on("fp-hover"),this.dragger=on("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("core.timeline_aria_label","Seek slider")),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;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(ar.GRABBING)||o||(o=setTimeout(r,200)))},i=()=>!!this.player.opt("seekable",!0)&&!isNaN(this.player.duration);sr(this,{onseek:(n,o)=>{if(i())switch(!!t.live){case!0:Vn(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),Un(this.tooltipEle,o)}},onstart:()=>{i()&&(e.emit("timeline/gesture/start"),!e.hasState(Mn)&&e.setState(Be,!0),t.live||function(e){e.style.display="block"}(this.tooltipEle))},onend:function(o,i){n(r),0!=t.seekable&&t.live&&zn(i,e)},ontouchend:()=>{t.live?Qn(this.proposedSeekBar,this.tooltipEle):Hn(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(ar.GRABBING)))switch(!!t.live){case!0:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),Vn(o,e,this.tooltipEle);break;case!1:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),function(e,t,n){isNaN(e)||isNaN(t.duration)||(Un(n,e),n.textContent=sn(e/100*t.duration))}(o,e,this.tooltipEle)}}}),e.on($,function(e){e.data&&(t=e.data)}),e.on(N,()=>n(r)),e.on(w,()=>{0==e.reaper||t.live||xn(e,this.bufferEle)}),e.on(q,e=>{this.progress.style.width=e.detail+"%"}),e.on(S,()=>{0!=e.reaper&&(n(r),this.setAttribute("aria-valuenow",e.currentTime+""),this.setAttribute("aria-valuetext",Math.round(e.currentTime)+" "+e.i18n("core.seconds","Seconds")),t.live||xn(e,this.bufferEle))}),e.on(E,()=>{0!=e.reaper&&(t.live||xn(e,this.bufferEle))}),e.on(P,t=>{if(0==e.reaper)return;const n=qn(e)?Bn(e):t.data||e.duration;isNaN(n)||(this.setAttribute("aria-valuemax",n+""),this.setAttribute("aria-valuemin","0"))}),this.addEventListener(l,()=>{e.emit("timeline/gesture/end"),t.live?Qn(this.proposedSeekBar,this.tooltipEle):Hn(this.proposedSeekBar,this.tooltipEle)})}}class FlowplayerLiveStatus extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-live-status");const t=on("fp-live-text"),n=on("fp-live-indicator","fp-color");t.textContent="live",this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.append(n,t),this.addEventListener(a,function(){Kn(e)})}}class FlowplayerDuration extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-duration"),this.setAttribute("aria-hidden","true"),e.on($,n=>{if(0==e.reaper||!n.data)return;t=n.data;const o=qn(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=sn(o)}),e.on(E,()=>{var n,o;0==e.reaper||t.live||(o=this,(n=e).duration&&(o.innerText=sn(n.duration)))})}}class FlowplayerElapsedTime extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-elapsed"),this.innerText=sn(0),this.setAttribute("aria-hidden","true"),e.on($,e=>{e.data&&(t=e.data)}),e.on(S,()=>{var n;0!=e.reaper&&(t.live?(n=e,this.innerText=sn(n.currentTime)):function(e,t){t.innerText=sn(e.currentTime)}(e,this))})}}class FlowplayerControlButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-btns","fp-small-switch");const t=wt(e,Te),n=wt(e,ke);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=wt(e,this.classList.contains("fp-left-zone")?Re:Le);r.removeAttribute("tabindex"),o.classList.add("fp-zone-seconds"),this.append(o,r);e.on(R,()=>{o.innerText=""}),e.on(V,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(j,()=>{this.reset_zone()}),this.reset_zone(),this.addEventListener(h,function(t){isNaN(e.duration)||isNaN(e.currentTime)||Ho&e.opt("ui")||e.hasState(et)||!e.hasState(lt)&&!e.hasState(it)||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 FlowplayerErrorView extends FlowplayerComponent{constructor(e){super(e),this.className="fp-error",this.message=document.createElement("p"),this.message.className="error-message",this.errorId=document.createElement("p"),this.errorId.className="error-id",this.errorKey=document.createElement("p"),this.errorKey.className="error-key",this.append(this.errorKey,this.message,this.errorId),this.addEventListener(ne,t=>{if(e.opts.live&&0==e.currentTime&&t.detail.error.flowplayerErrorCode==Nt.PlaybackManifestLoadError)return void(this.message.textContent="stream offline");const n=t.detail.error;this.message.textContent=n.message,this.errorKey.textContent=n.errorKey,console.warn("flowplayer encountered an %s error while loading %s id:%s",n.errorKey,n.config.resource,n.id)})}}class FlowplayerHeaderLeftRight extends FlowplayerComponent{constructor(e,t,...n){super(e),this.className=t;const o=e.createComponents(...n);this.append(...o),"fp-left"!==t&&o.forEach(t=>{t.addEventListener(a,()=>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(_e,we);this.append(...t)}}class FlowplayerMiddleButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-switch"),[Ne,Ae].forEach(t=>{const n=wt(e,t);n.removeAttribute("tabindex"),this.append(n)})}}class FlowplayerVolumeControl extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-volume-control");const t=wt(e,Ce);this.append(t),!n().ios&&this.append(wt(e,fe)),t instanceof FlowplayerIcon&&t.addEventListener(a,function(){e.toggleMute()})}}class FlowplayerHeader extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-header"),this.append(...e.createComponents(me,ye)),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(se,le,ce,ue,de,pe))}}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(Se,Ee,be)),this.setAttribute("tabindex","0"),e.reaper&&e.reaper.set("middle",this),this.handleClick(e),this.handleTouch(e),e.once(J,()=>{this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label")})}handleClick(e){[a,s].forEach(t=>this.addEventListener(t,function(n){if(!(n.defaultPrevented||e.root.classList.contains("is-endscreen")||t===s&&e.root.classList.contains("no-fullscreen")))return n.preventDefault(),e.emit(n.type),!1})),e.on(a,function(t){setTimeout(function(){t.defaultPrevented||e.togglePlay()},0)}),e.on(s,function(t){setTimeout(function(){t.defaultPrevented||e.toggleFullScreen()},0)})}handleTouch(e){let t=!1;this.addEventListener(h,function(t){t.cancelable&&!e.hasState("is-endscreen")&&(t.preventDefault(),e.emit(t.type,{source:t}))}),e.on(h,function(n){setTimeout(function(){if(n.defaultPrevented)return;if(e.ended)return e.togglePlay(!0);const o=e.hasState(qe);t&&clearTimeout(t),(o||e.hasState(it))&&(e.hasState(it)&&(e.setState(it,!1),e.setState(at,!1)),e.togglePlay(),o)||(e.setState(it,!0),e.paused||(t=setTimeout(function(){t=!1,e.setState(it,!1),e.setState(at,!1)},2e3)))},0)})}}class FlowplayerUi extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-ui"),this.append(...e.createComponents(he,ve,ae))}}const dr=e=>{let t=!1;e.on(Kt,()=>{t||(e=>{const t=e.customElements.entries();for(var[n,o]of t)if(!bt(e,o))return!0;return!1})(Do)&&(Yt(e,{feature_name:"custom-components",behavior:"used",sample_rate:.1}),t=!0)})},pr=(...e)=>e.reduce((e,t)=>Object.assign(Object.assign({},e),t),{}),fr=(e,t)=>{const n=e.lastIndexOf(t);return~n&&e.splice(n,1),e};class RequestQueue{static of(){return new RequestQueue}static is_empty(e){return 0==e.pending.length}static is_high_water(e){return e.open.length==RequestQueue.MAX_OPEN_REQUESTS}static maybe_spawn_req(e){if(RequestQueue.is_empty(e))return e;if(RequestQueue.is_high_water(e))return e;try{const t=RequestQueue.lpop(e);t&&RequestQueue.request(e,t)}catch(e){}}static increment_failures(e){return e.stats.failures++,e.stats.failures>RequestQueue.MAX_FAILURE_COUNT&&(e.stats.ttl=Date.now()+RequestQueue.REQUEST_TTL_MS),e}static handle_error(e,t){RequestQueue.rm(e,t),RequestQueue.increment_failures(e)}static request(e,[t,n,o]){if(Date.now()<e.stats.ttl)return;const r=new XMLHttpRequest;e.open.push(r),r.timeout=RequestQueue.REQUEST_TIMEOUT_MS,r.ontimeout=function(){RequestQueue.handle_error(e,r)},r.onerror=function(t){RequestQueue.handle_error(e,r)},r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&RequestQueue.rm(e,r),Math.floor(r.status/100)},r.onload=function(){RequestQueue.rm(e,r),e.stats.failures&&e.stats.failures--},r.open(n,t),r.setRequestHeader("Content-Type","text/plain;charset=UTF-8");try{r.send(JSON.stringify(o))}catch(e){}}static rpush(e,...t){return t.forEach(t=>{e.pending.length>=RequestQueue.MAX_PENDING||(e.pending.push(t),RequestQueue.maybe_spawn_req(e))}),e}static lpop(e){return e.pending.shift()}static rm(e,t){return fr(e.open,t),e}constructor(){this.pending=[],this.open=[],this.stats={failures:0,ttl:0}}}RequestQueue.MAX_OPEN_REQUESTS=3,RequestQueue.MAX_PENDING=5,RequestQueue.REQUEST_TIMEOUT_MS=4e3,RequestQueue.REQUEST_TTL_MS=5e3,RequestQueue.MAX_FAILURE_COUNT=3;var hr=RequestQueue.of();const mr=/:([a-zA-Z_]+)/g;class Log{static prepare(e,t){const n=document.createEvent("Event");return n.initEvent(e,!1,!0),n.ns=e,n.data=t,n}static of(e){return new Log(e)}constructor(e){this.emitter=e}info(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.INFO,e))}error(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.ERROR,e))}warn(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.WARN,e))}}var yr;Log.NAMESPACE={INFO:"tracker:info",ERROR:"tracker:err",WARN:"tracker:warn"},function(e){e.POST="POST",e.PUT="PUT",e.GET="GET"}(yr||(yr={}));class Tracker{static of(e,t){return new Tracker(e,t)}static ensure_required_keys(e,t){return e.required_keys.filter(e=>!(e in t))}static pluck_valid_keys(e,t){return((e,...t)=>Object.keys(e).filter(e=>~t.indexOf(e)).reduce((t,n)=>pr(t,{[n]:e[n]}),{}))(t,...e.valid_keys)}static merge_metadata(e,t={}){return e.metadata=Tracker.pluck_valid_keys(e,pr(e.metadata,t)),e}static assert_emitter_api(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")}static create_listener(e,t,n){var o;e.listeners.push([t,n]),null===(o=e.emitter)||void 0===o||o.addEventListener(t,n)}constructor(e,t={}){const n=this;if(this.emitter=e,this.url=t.url,this.log=Log.of(this.emitter),this.verb=t.verb,this.metadata=pr({},t.metadata||{}),this.rq=t.rq||hr,this.events=t.events||[],this.required_keys=t.required_keys||[],this.optional_keys=t.optional_keys||[],this.listeners=[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),Tracker.assert_emitter_api(this.emitter),void 0===Tracker.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`);Tracker.TRACKERS.push(this),n.events.forEach(e=>{Tracker.create_listener(this,e,(t={})=>{var o;if(null===(o=this.emitter)||void 0===o?void 0:o.hasState("consent-no-tracking"))return;const r=pr(n.metadata,{event_type:e},t.data||t),i=function(e,t){return e.replace(mr,e=>{const n=e.slice(1,e.length);return n in t?t[n].toString():e})}(n.url,r),a=Tracker.pluck_valid_keys(n,r),s=Tracker.ensure_required_keys(n,a);if(s.length)return n.log.error(`Tracker.validate_metadata() failed for\n Event[${e}]\n missing keys: ${s}\n payload:\n ${JSON.stringify(a,null,2)}`);this.rq&&RequestQueue.rpush(this.rq,[i,this.verb,a])})})}destroy(){this.listeners.forEach(([e,t])=>{var n;return null===(n=this.emitter)||void 0===n?void 0:n.removeEventListener(e,t)}),delete this.rq,delete this.emitter,fr(Tracker.TRACKERS,this)}put(e={}){return Tracker.merge_metadata(this,e),this}}Tracker.TRACKERS=[],Tracker.QUEUE=hr,Tracker.verb=yr;var gr="ping",vr="display",Er="view";const _r=["sitegroup_id","session_id","media_id","site_id","player_id","video_type"],wr=["created","position"],Sr=["player_version","created","source","category","category_id","autoplay","muted","customer_user_id"];const br=100,kr=1e3;function Tr(e,t){return e.duration/1===e.duration&&Object.assign(t,function(e){const t=e/br;return{segment_duration:t,breakpoints:Array(...Array(br)).map(function(e,n){return Math.floor(n*t*kr)/kr})}}(e.duration))}function Nr(e,t,n){if(!t.segment_duration&&!Tr(e,t))return;const o=function(e,t,n){const o=t.last_idx,r=n?99:Ar(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(gr,{position:o})}function Ar(e,t){return Math.min(Math.floor(e.currentTime/t.segment_duration),99)}var Or;const Ir="vod",Lr="live",Rr=[vr,gr,Er];function Cr(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(gr,{position:60*t.ticks}))}(e,t);case"vod":return Nr(e,t,"boolean"==typeof n&&n)}}function Pr(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))))}const Fr=((Or=class Analytics{init(e,t,n){if(!Cn.from_token(e.token||"").is_granted(Cn.permissions.ANALYTICS))return;if(n.analytics)return;const o=n.analytics={ticker:void 0,last_media_id:"",ended:!1,played:!1},r={locked:void 0,ttl:6e3,task:()=>{Cr(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.34.0"},a=Tracker.of(n,{verb:Tracker.verb.POST,url:"https://ptm.flowplayer.com/:video_type/:sitegroup_id/:event_type",events:Rr,required_keys:_r,optional_keys:Sr.concat(wr).slice(0),metadata:i});n.on(U,function(){a&&a.destroy()}),n.on($,function(t){if(!a)return;const r=rn(t,"data.metadata",{});if(!r.media_id&&r.stream_target_id&&(r.media_id=r.stream_target_id),!r.media_id)return o.last_media_id="";if(o.last_media_id===r.media_id)return;o.played=!1,o.last_media_id=r.media_id;const i=rn(e,"analytics",{});a.put(r),a.put(i);const s=rn(e,"metadata.live_start_time",e.live)?Lr:Ir;a.put({video_type:s,source:e.source||go()||""}),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(vr)});let s=0;n.on(N,function(){if(!a)return;if(s||o.played||!o.last_media_id)return;a.put({muted:n.muted});const e=Pr(n);if(e)return s=Promise.resolve(e).then(function(){o.played=!0,n.emit(Er),s=0}).catch(function(){s=0});o.played=!0,n.emit(Er)}),n.on(S,function(){var t;a&&(s||Pr(n)||o.ended||!o.last_media_id||(!e.live&&n.currentTime+.25>=n.duration&&Cr(n,o.ticker,!0),(t=r).locked||(t.locked=setTimeout(function(){return t.task(),function(e){return e.locked=void 0,e}(t)},t.ttl))))}),n.on(R,function(){a&&o.last_media_id&&o.ticker&&"vod"==o.ticker.kind&&function(e,t){Tr(e,t),t.last_idx=Ar(e,t)}(n,o.ticker)}),n.on(L,function(){a&&o.last_media_id&&function(e,t){t.ended||(t.ended=!0,Cr(e,t.ticker))}(n,o)})}}).pluginName="analytics",Or),Mr=function(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)}(Nn(),Fr),Dr=e=>0==e.volume||e.muted?"true":"false";class Default{constructor(e){St(e,re,FlowplayerUi),St(e,Pe,FlowplayerErrorView),St(e,ae,FlowplayerControls),St(e,le,FlowplayerLiveStatus),St(e,de,FlowplayerDuration),St(e,ue,FlowplayerTimelineBar),St(e,ce,FlowplayerElapsedTime),St(e,fe,FlowplayerVolumeBar),St(e,pe,FlowplayerVolumeControl),St(e,se,FlowplayerControlButtons),St(e,he,FlowplayerHeader),St(e,ie,FlowplayerLogo),St(e,ge,FlowplayerHeaderDuration),St(e,me,class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-left",ge)}}),St(e,ye,class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-right fp-togglable",Oe,Ie)}}),St(e,ve,FlowplayerMiddle),St(e,Ee,FlowplayerMiddleZone),St(e,_e,FlowplayerMiddleWait),St(e,we,FlowplayerMiddleButtons),St(e,be,class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-right-zone")}}),St(e,Se,class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-left-zone")}}),St(e,ke,class extends FlowplayerIcon{constructor(e){super(e,er),this.setAttribute("role","button")}}),St(e,Te,class extends FlowplayerIcon{constructor(e){super(e,tr),this.setAttribute("role","button")}}),St(e,Ne,class extends FlowplayerIcon{constructor(e){super(e,$o),this.setAttribute("role","button")}}),St(e,Ae,class extends FlowplayerIcon{constructor(e){super(e,Zo),this.setAttribute("role","button")}}),St(e,Oe,class extends FullscreenIcon{constructor(e){super(e,Yo)}}),St(e,Ie,class extends FullscreenIcon{constructor(e){super(e,Xo)}}),St(e,Le,class extends FlowplayerIcon{constructor(e){super(e,nr)}}),St(e,Re,class extends FlowplayerIcon{constructor(e){super(e,or)}}),St(e,Ce,class extends FlowplayerIcon{constructor(e){super(e,Jo),this.classList.add("fp-volumebtn"),this.setAttribute("role","switch"),this.setAttribute("aria-checked",Dr(e)),e.on(k,()=>{this.setAttribute("aria-label",e.i18n("core.muted","Muted")),this.setAttribute("aria-checked",Dr(e))})}})}init(e,t,n){var o;zo(e,0,n),jo(e,t,n),o=n,"undefined"!=typeof window&&"ontouchstart"in window&&o.setState(st,!0),o.setState("is-accessibility",!1),dr(n)}}return Default.pluginName="default",Do.extensions.unshift.apply(Do.extensions,[I18n,Mr,Default]),Object.assign(Do,{ui:Wo,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=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),a=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),s=/edg/i.test(t),l=/opr|opera/i.test(t),c=/SamsungBrowser/.test(t),u=c&&/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,edge:s,opera:l,chrome:i,firefox:a,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:c,samsung_tv:c&&u,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}const o="mount",r="retry",i="error",a="click",s="dblclick",l="mouseleave",c="mouseup",u="mousedown",d="mousemove",p="touchstart",f="touchmove",h="touchend",m="touchcancel",y="resize",g="fullscreenenter",v="fullscreenexit",E="loadedmetadata",_="loadeddata",w="progress",S="timeupdate",b="loadstart",k="volumechange",T="pause",N="playing",A="play",O="waiting",I="canplay",L="ended",R="seeked",C="seeking",P="durationchange",F="viewenter",M="viewleave",D="src",U="reap",x="qualitychange",H="landscape",W="portrait",q="dvr",B="live",G="recover",V="seek:queued",j="seek:cancel",K="remotesession:ended",z="intersectionchange",Q="renderplugin",Y="audioonlysource",X="error:fatal",$="config",Z="state",J="beforeplay",ee="beforepause",te="content:loadstart",ne="flowplayer:error";var oe=Object.freeze({__proto__:null,MOUNT:o,RETRY:r,ERROR:i,CONTEXT_MENU:"contextmenu",CLICK:a,DBL_CLICK:s,KEYUP:"keyup",KEYDOWN:"keydown",LOAD:"load",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:l,MOUSE_UP:c,MOUSE_DOWN:u,MOUSE_MOVE:d,TOUCH_START:p,TOUCH_MOVE:f,TOUCH_END:h,TOUCH_CANCEL:m,RESIZE:y,SCROLL:"scroll",FULLSCREEN_ENTER:g,FULLSCREEN_EXIT:v,FULLSCREEN_CHANGE:"fullscreenchange",METADATA:E,DATA:_,PROGRESS:w,TIME_UPDATE:S,LOAD_START:b,VOLUME_CHANGE:k,PAUSE:T,PLAYING:N,PLAY:A,WAITING:O,CAN_PLAY:I,ENDED:L,SEEKED:R,SEEKING:C,DURATION_CHANGE:P,VIEW_ENTER:F,VIEW_LEAVE:M,SOURCE:D,REAP:U,QUALITIES:"qualities",QUALITY_CHANGE:x,VIDEO_TRACKS:"videoTracks",SET_QUALITY:"quality:set",VIDEO_TRACK_SELECT:"tracks:video:select",RECOMMENDATIONS_READY:"recommendationsready",LANDSCAPE:H,PORTRAIT:W,DVR:q,LIVE:B,RECOVER:G,SEEK_QUEUED:V,SEEK_CANCEL:j,PLUGIN_REGISTERED:"plugin:registered",REMOTE_SESSION_STARTED:"remotesession:started",REMOTE_SESSION_ENDED:K,INTERSECTIONCHANGE:z,WEBKIT_NEEDKEY:"webkitneedkey",RENDER_PLUGIN:Q,AUDIO_ONLY_SOURCE:Y,NON_RECOVERABLE_ERROR:X,CONFIG:$,STATE:Z,BEFORE_PLAY:J,BEFORE_PAUSE:ee,CONTENT_REAL_LOAD_START:te,CUEPOINTS:"cuepoints",CUEPOINT_START:"cuepointstart",CUEPOINT_END:"cuepointend",STANDARD_ERROR:ne});const re="flowplayer-ui",ie="flowplayer-logo",ae="flowplayer-control",se="flowplayer-control-buttons",le="flowplayer-live-status",ce="flowplayer-elapsed-time",ue="flowplayer-timeline-bar",de="flowplayer-control-duration",pe="flowplayer-volume-control",fe="flowplayer-volume-bar",he="flowplayer-header",me="flowplayer-header-left-zone",ye="flowplayer-header-right-zone",ge="flowplayer-header-duration",ve="flowplayer-middle",Ee="flowplayer-middle-zone",_e="flowplayer-wait",we="flowplayer-middle-buttons",Se="flowplayer-middle-left-zone",be="flowplayer-middle-right-zone",ke="flowplayer-small-play-icon",Te="flowplayer-small-pause-icon",Ne="flowplayer-play-icon",Ae="flowplayer-pause-icon",Oe="flowplayer-fullscreen-enter-icon",Ie="flowplayer-fullscreen-exit-icon",Le="flowplayer-fast-forward-icon",Re="flowplayer-rewind-icon",Ce="flowplayer-volume-icon",Pe="flowplayer-error";var Fe=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",VIDEO_MENU:"flowplayer-video-menu",UI:re,LOGO:ie,CONTROL:ae,CONTROL_BUTTONS:se,LIVE_STATUS:le,ELAPSED:ce,TIMELINE:ue,CHAPTERS_TIMELINE:"flowplayer-chapters-timeline-bar",CONTROL_DURATION:de,VOLUME_CONTROL:pe,VOLUME_BAR:fe,HEADER:he,HEADER_LEFT_ZONE:me,HEADER_RIGHT_ZONE:ye,HEADER_DURATION:ge,MIDDLE:ve,MIDDLE_ZONE:Ee,WAIT:_e,MIDDLE_BUTTONS:we,MIDDLE_LEFT_ZONE:Se,MIDDLE_RIGHT_ZONE:be,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:ke,SMALL_PAUSE_ICON:Te,PLAY_ICON:Ne,PAUSE_ICON:Ae,FULLSCREEN_ENTER_ICON:Oe,FULLSCREEN_EXIT_ICON:Ie,SKIP_NEXT_ICON:"flowplayer-skip-next-icon",SKIP_PREVIOUS_ICON:"flowplayer-skip-previous-icon",FAST_FORWARD_ICON:Le,REWIND_ICON:Re,SHARE_ICON:"flowplayer-share-icon",SUBTITLES_MENU_ICON:"flowplayer-subs-menu-icon",MENU_BACK_ICON:"flowplayer-menu-back",VOLUME_ICON:Ce,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:Pe,TV_MENU:"flowplayer-tv-menu",CUE_COMPONENT:"flowplayer-cue",SSAI_UI:"flowplayer-ssai-ui",SSAI_CONTROLS:"flowplayer-ssai-controls",SSAI_TIMELINE:"flowplayer-ssai-timeline",SSAI_INDICATOR:"flowplayer-ssai-indicator"});const Me="is-playing",De="is-fullscreen",Ue="is-paused",xe="is-muted",He="is-loaded",We="is-loading",qe="is-starting",Be="is-seeking",Ge="is-disabled",Ve="is-small",je="is-tiny",Ke="is-rtl",ze="is-ended",Qe="is-live",Ye="is-error",Xe="is-waiting",$e="is-autoplay",Ze="is-toggling",Je="is-live-seeked",et="no-timeline",tt="has-poster",nt="will-play",ot="will-pause",rt="has-menu-opened",it="is-touched",at="is-hovered",st="is-touch-device",lt="will-seek",ct="is-seekable",ut="is-in-viewport",dt="no-controls",pt="is-destroyed",ft="is-source-processing";var ht=Object.freeze({__proto__:null,PLAYING:Me,FULLSCREEN:De,PAUSED:Ue,MUTED:xe,LOADED:He,LOADING:We,STARTING:qe,SEEKING:Be,GRABBING:"is-grabbing",DISABLED:Ge,SMALL:Ve,TINY:je,RTL:Ke,TV:"is-tv",ENDED:ze,LIVE:Qe,ERRORED:Ye,WAITING:Xe,AUTOPLAY:$e,SEAMLESS:"is-seamless",TOGGLING:Ze,LIVE_SEEKED:Je,NO_DVR:et,HAS_POSTER:tt,WILL_PLAY:nt,WILL_PAUSE:ot,MENU_OPENED:rt,TOUCHED:it,HOVERED:at,TOUCH_DEVICE:st,WILL_SEEK:lt,SEEKABLE:ct,IN_VIEWPORT:ut,NO_CONTROLS:dt,DESTROYED:pt,IS_SOURCE_PROCESSING:ft});function mt(e){this.message=e}mt.prototype=new Error,mt.prototype.name="InvalidCharacterError";var yt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new mt("'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 gt=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(yt(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 yt(t)}};function vt(e){this.message=e}vt.prototype=new Error,vt.prototype.name="InvalidTokenError";var Et=function(e,t){if("string"!=typeof e)throw new vt("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(gt(e.split(".")[n]))}catch(e){throw new vt("Invalid token specified: "+e.message)}};Et.InvalidTokenError=vt;const _t=new Map,wt=(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),St=(e,t,n)=>{window.customElements.get(t)||window.customElements.define(t,n),e.customElements.get(t)||e.customElements.set(t,t)},bt=(e,t)=>{const n=e.customElements.get(t),o=n&&n===t,r=Object.values(e.defaultElements).includes(t);return Boolean(r||o)};var kt,Tt;!function(e){e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=4]="HIGH"}(kt||(kt={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.AUDIO_REQUIRED=2]="AUDIO_REQUIRED"}(Tt||(Tt={}));const Nt={Unknown:"00-00",MediaUnknown:"01-00",MediaUnavailable:"01-01",MediaUnsupportedVideoFormat:"01-02",MediaUnsupportedAudioFormat:"01-03",MediaBitrateExceeded:"01-04",MediaBufferOverread:"01-05",MediaIntegerOverflow:"01-06",MediaQuotaExceeded:"01-07",MediaInvalidCompositionDuration:"01-08",MediaInvalidCompositionSourceDuration:"01-09",MediaInvalidCompositionSourceStartTime:"01-10",MediaMalformedDepth:"01-11",PlaybackUnknown:"02-00",PlaybackVideoBufferUnderRun:"02-01",PlaybackAudioBufferUnderRun:"02-02",PlaybackVideoBufferingTimeout:"02-03",PlaybackAudioBufferingTimeout:"02-04",PlaybackManifestParseError:"02-05",PlaybackVideoDecodeError:"02-06",PlaybackAudioDecodeError:"02-07",PlaybackDroppedFramesExceeded:"02-08",PlaybackPlayheadExceedsDuration:"02-09",PlaybackUnsupportedDevice:"02-10",PlaybackManifestLoadError:"02-11",PlaybackManifestLoadTimeout:"02-12",PlaybackManifestParsingError:"02-13",PlaybackManifestIncompatibleCodecs:"02-14",PlaybackLevelEmptyError:"02-15",PlaybackLevelLoadError:"02-16",PlaybackLevelLoadTimeout:"02-17",PlaybackLevelSwitchError:"02-18",PlaybackAudioTrackLoadError:"02-19",PlaybackAudioTrackLoadTimeout:"02-20",PlaybackFragLoadError:"02-21",PlaybackFragLoadTimeout:"02-22",PlaybackFragDecryptError:"02-23",PlaybackFragParsingError:"02-24",PlaybackFragGap:"02-25",PlaybackRemuxAllocError:"02-26",PlaybackBufferAddCodecError:"02-27",PlaybackBufferIncompatibleCodecs:"02-28",PlaybackBufferAppendError:"02-29",PlaybackBufferStalledError:"02-30",PlaybackBufferFullError:"02-31",PlaybackBufferSeekOverHole:"02-32",PlaybackBufferNudgeOnStall:"02-33",PlaybackInternalException:"02-34",PlaybackInternalAborted:"02-35",PlaybackManifestLoaderFailure:"02-36",PlaybackSegmentBaseLoaderError:"02-37",PlaybackTimeSyncFailed:"02-38",PlaybackFragmentLoaderFailure:"02-39",PlaybackAppendError:"02-40",PlaybackRemoveError:"02-41",PlaybackDataUpdateFailed:"02-42",PlaybackManifestNoStreams:"02-43",PlaybackUnknownManifestType:"02-44",PlaybackDashInsufficientSegmentInfo:"02-45",PlaybackDashNoRepresentations:"02-46",PlaybackDashNoAdaptationSets:"02-47",PlaybackDashNoInitSegment:"02-48",PlaybackDashUnsupportedContainerFormat:"02-49",PlaybackDashKeySystemMismatch:"02-50",PlaybackMultipleKeyIDs:"02-51",PlaybackDashConflictingKeyIDs:"02-52",PlaybackRestrictedStreams:"02-53",PlaybackHlsMasterAndMediaTags:"02-54",PlaybackRepresentationIdConflict:"02-55",PlaybackHlsUnsupportedKeyFormats:"02-56",PlaybackManifestNoVariants:"02-57",PlaybackHlsUndeclaredVariables:"02-58",PlaybackAes128InvalidKeyLength:"02-59",PlaybackDashConflictingAes128Keys:"02-60",PlaybackDashUnsupportedAes128Encryption:"02-61",PlaybackManifestPatchMismatch:"02-62",PlaybackEmptyMediaPlaylist:"02-63",PlaybackNonContiguousCompositionTrack:"02-64",PlaybackDecoderNotFound:"02-65",PlaybackDecoderTemporarilyUnavailable:"02-66",PlaybackIncompatibleAsset:"02-67",PlaybackNoCompatibleExternalDisplay:"02-69",PlaybackOutOfMemory:"02-70",PlaybackToneMappingFailed:"02-71",PlaybackVideoCompositorFailed:"02-72",NetworkUnknown:"03-00",NetworkNoInternet:"03-01",NetworkRequestTimeout:"03-02",NetworkUnableToResolveHost:"03-03",NetworkResourceNotFound:"03-04",NetworkExpiredUrl:"03-05",NetworkUrlResolutionFailed:"03-06",NetworkDownloadErrorIdManifest:"03-07",NetworkDownloadErrorIdSidx:"03-08",NetworkDownloadErrorIdContent:"03-09",NetworkDownloadErrorIdInitialization:"03-10",NetworkDownloadErrorIdXlink:"03-11",NetworkHttpRequestFailed:"03-12",NetworkMaxRetriesExceeded:"03-13",NetworkSegmentMissing:"03-14",NetworkHttp400BadRequest:"03-400",NetworkHttp401Unauthorized:"03-401",NetworkHttp402PaymentRequired:"03-402",NetworkHttp403Forbidden:"03-403",NetworkHttp404NotFound:"03-404",NetworkHttp405MethodNotAllowed:"03-405",NetworkHttp406NotAcceptable:"03-406",NetworkHttp407ProxyAuthenticationRequired:"03-407",NetworkHttp408RequestTimeout:"03-408",NetworkHttp409Conflict:"03-409",NetworkHttp410Gone:"03-410",NetworkHttp411LengthRequired:"03-411",NetworkHttp412PreconditionFailed:"03-412",NetworkHttp413PayloadTooLarge:"03-413",NetworkHttp414URITooLong:"03-414",NetworkHttp415UnsupportedMediaType:"03-415",NetworkHttp416RangeNotSatisfiable:"03-416",NetworkHttp417ExpectationFailed:"03-417",NetworkHttp418ImATeapot:"03-418",NetworkHttp421MisdirectedRequest:"03-421",NetworkHttp422UnprocessableEntity:"03-422",NetworkHttp423Locked:"03-423",NetworkHttp424FailedDependency:"03-424",NetworkHttp425TooEarly:"03-425",NetworkHttp426UpgradeRequired:"03-426",NetworkHttp428PreconditionRequired:"03-428",NetworkHttp429TooManyRequests:"03-429",NetworkHttp431RequestHeaderFieldsTooLarge:"03-431",NetworkHttp451UnavailableForLegalReasons:"03-451",NetworkHttp500InternalServerError:"03-500",NetworkHttp501NotImplemented:"03-501",NetworkHttp502BadGateway:"03-502",NetworkHttp503ServiceUnavailable:"03-503",NetworkHttp504GatewayTimeout:"03-504",NetworkHttp505HTTPVersionNotSupported:"03-505",NetworkHttp506VariantAlsoNegotiates:"03-506",NetworkHttp507InsufficientStorage:"03-507",NetworkHttp508LoopDetected:"03-508",NetworkHttp510NotExtended:"03-510",NetworkHttp511NetworkAuthenticationRequired:"03-511",ContentProtectionUnknown:"04-00",ContentProtectionConcurrentStreamLimitExceeded:"04-01",ContentProtectionEntitlementRefused:"04-02",ContentProtectionLicenseExpired:"04-03",ContentProtectionBadLicenseRequest:"04-04",ContentProtectionLicenseServerTimeout:"04-05",ContentProtectionInsufficientHDCPSupport:"04-06",ContentProtectionGeoRestricted:"04-07",ContentProtectionParentalControlRestricted:"04-08",ContentProtectionCDNUnauthorized:"04-09",ContentProtectionInvalidAccessToken:"04-10",ContentProtectionKeySystemNoKeys:"04-11",ContentProtectionKeySystemNoAccess:"04-12",ContentProtectionKeySystemNoSession:"04-13",ContentProtectionKeySystemNoConfiguredLicense:"04-14",ContentProtectionKeySystemCertificateRequestFailed:"04-15",ContentProtectionKeySystemCertificateUpdateFailed:"04-16",ContentProtectionKeySystemSessionUpdateFailed:"04-17",ContentProtectionKeySystemStatusOutputRestricted:"04-18",ContentProtectionKeySystemStatusInternalError:"04-19",ContentProtectionKeyLoadError:"04-20",ContentProtectionKeyLoadTimeout:"04-21",ContentProtectionCapabilityMediaKeysError:"04-22",ContentProtectionManifestKeySystemUnknown:"04-23",ContentProtectionKeySystemUnavailable:"04-24",ContentProtectionCDMCreationFailed:"04-25",ContentProtectionCDMAttachFailed:"04-26",ContentProtectionCDMServerCertificateRejected:"04-27",ContentProtectionCDMSessionCreationFailed:"04-28",ContentProtectionCDMLicenseRequestFailed:"04-29",ContentProtectionCDMLicenseResponseRejected:"04-30",ContentProtectionManifestMissingDRMInfo:"04-31",ContentProtectionLicenseServerMissing:"04-32",ContentProtectionOfflineSessionRemoved:"04-33",ContentProtectionInitDataTransformationError:"04-34",ContentProtectionServerCertificateRequestFailed:"04-35",ContentProtectionInsufficientHDCPVersion:"04-36",ContentProtectionHDCPVersionCheckFailed:"04-37",AdsUnknown:"08-00",AdsVastParseError:"08-100",AdsInvalidVastSchema:"08-101",AdsVastVersionNotSupported:"08-102",AdsUnexpectedAdType:"08-200",AdsCreativeLinearityMismatch:"08-201",AdsCreativeDurationMismatch:"08-202",AdsCreativeSizeMismatch:"08-203",AdsWrapperVastError:"08-300",AdsVastResponseRedirectTimeout:"08-301",AdsWrapperLimitReached:"08-302",AdsVastResponseEmpty:"08-303",AdsLinearAdDisplayError:"08-400",AdsMediaFileNotFound:"08-401",AdsMediaFileUnavailable:"08-402",AdsUnsupportedMimeType:"08-403",AdsUnableToDisplayMediaFile:"08-405",AdsMezzanineFileMissing:"08-406",AdsMezzanineFileDownloaded:"08-407",AdsRejectedAd:"08-408",AdsInteractiveCreativeError:"08-409",AdsVerificationNodeExecutionError:"08-410",AdsNonLinearAdDisplayError:"08-500",AdsNonLinearAdSizeMismatch:"08-501",AdsNonLinearAdFetchError:"08-502",AdsNonLinearUnsupportedType:"08-503",AdsCompanionAdDisplayError:"08-600",AdsCompanionAdSizeMismatch:"08-601",AdsRequiredCompanionAdError:"08-602",AdsCompanionAdFetchError:"08-603",AdsUndefinedVastError:"08-900",AdsUnknownVpaidError:"08-901",AdsVastDocumentEmpty:"08-999"},At=Object.fromEntries(Object.entries(Nt).map(([e,t])=>[t,e]));const Ot=e=>{return e.autoplay&&Tt.AUDIO_REQUIRED&(!0===(t=e.autoplay)?Tt.ON:!1===t?Tt.OFF:t);var t};function It(e,t,n){const o="boolean"==typeof n;if("boolean"!=typeof n&&(n=!!e.hasState(ot)||e.paused),function(e,t,n){const o=e.poll(t?J:ee,{forced:n});return o&&o.defaultPrevented}(e,n,o))return Promise.resolve();if(!n)return e.hasState(nt)?(e.setState(ot,!0),e.setState(nt,!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!==Rt(e.original_src)&&Lt(e),r):(function(e){return(0==e.networkState||0==e.readyState)&&e.currentSrc==Rt(e.original_src)}(e)&&Lt(e),function(e){const t=e.hasState($e),n=t&&Ot(e.opts);n&&(e.muted&&e.toggleMute(!1),0==e.volume&&(e.volume=1));t&&e.setState($e,!1);return e.play().then(()=>{e.hasState(ot)&&e.togglePlay(!1)}).catch(o=>{if(console.warn(t?n?"[flowplayer/play] autoplay audio required\n%s":"[flowplayer/play] attempting muted autoplay\n%s":"",o.message,"\ninstance:",e),t&&!n)return e.muted=!0,e.play()})}(e)):(e.setState(ot,!1),!e.hasState(Me)&&e.setState(nt,!0),Promise.resolve())}function Lt(e){e.opts.is_native&&(e.hasState(He)||(e.hasState(We)||e.emit(te),e.setState(We,!0),e.load()))}function Rt(e){const t=document.createElement("a");return t.href=e,t.href}function Ct(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 Pt(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 Ft(e){switch(e){case"video/mpd":return"application/dash+xml";case"video/m3u8":return"application/x-mpegurl";default:return e}}const Mt=e=>{var{src:t}=e,n=Ct(e,["src"]);return[Object.assign({src:t,type:t?Ft("video/"+Pt(t)):""},n)]};function Dt(e){return Mt({src:e})}function Ut(e){var{src:t,type:n}=e,o=Ct(e,["src","type"]);return t&&n?[Object.assign({src:t,type:n},o)]:n&&!t?[Object.assign({type:n},o)]:Mt(Object.assign({src:t},o))}const xt="health:record",Ht="rebuffer",Wt="rebuffer:ended",qt="display",Bt="insights:ttff",Gt="insights:time_to_first_frag_loaded",Vt="insights:watched_interval",jt="flowplayer:feature",Kt="health:ready";var zt=Object.freeze({__proto__:null,RECORD:xt,REBUFFER:Ht,REBUFFER_ENDED:Wt,DISPLAY:qt,TIME_TO_FIRST_FRAME:Bt,TIME_TO_FIRST_FRAGMENT_LOADED:Gt,WATCHED_INTERVAL:Vt,FEATURE_USAGE:jt,HEALTH_SERVICE_READY:Kt});const Qt={All:1,High:.1,Medium:.01,Low:.001,None:0};function Yt(e,{feature_name:t,behavior:n,sample_rate:o}){t&&(o||(o=Qt.All),e.emit(jt,{feature_name:t,behavior:n,sample_rate:o}))}var Xt;function $t(e,t,n,o={safari:!1}){const r=function(e){return"string"==typeof e?Dt(e):Array.isArray(e)||"object"!=typeof e?e.reduce(function(e,t){return"string"==typeof t&&(t=Dt(t)),"object"!=typeof t||Array.isArray(t)||(t=Ut(t)),e.concat(t)},[]):Ut(e)}(n);return function(e){[Be,ot,nt,Me,Ue,We,He,Je].forEach(t=>e.setState(t,!1)),e.setState(qe,!0)}(e),Array(...Array(r.length)).map((e,t)=>t).some(n=>{const i=r[n];if(Xt.Ok==function(e,t,n){e.emit(D,n),t.playback_token&&"string"==typeof n.src&&n.src.startsWith("https://")&&(n.src=function(e,t){const n=new URL(e);return n.pathname=`/pt:${t}${n.pathname}`,n.toString()}(n.src,t.playback_token),Yt(e,{feature_name:"signed-urls",behavior:"used",sample_rate:.1}));"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),Xt.Ok):Xt.Err}(e,t,i)||Xt.Ok==function(e,t,n,o={safari:!1}){var r;/^audio\//.test(n.type||"")&&e.emit(Y);t.start_time&&(n.src=n.src+"#t="+t.start_time);if(""==e.canPlayType(n.type||""))return Xt.Err;if(n.drm&&(!n.drm["com.apple.fps.1_0"]||!o.safari))return Xt.Err;"string"==typeof n.src&&(e.preload=null!==(r=t.preload)&&void 0!==r?r:"auto",e.src=n.src);return Xt.Ok}(e,t,i,o))return!0;n==r.length-1&&"string"==typeof i.src&&(e.src=i.src)}),e}!function(e){e[e.Err=0]="Err",e[e.Ok=1]="Ok"}(Xt||(Xt={}));const Zt=[U,C,D,j];var Jt;function en(e,t,n){return isNaN(e.duration)||isNaN(e.currentTime)?{}:(t.offset+=n,0==t.offset?tn(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,tn(e,t))},1e3),function(e,t){e.setState(lt,!0),e.setState(Jt.BACKWARD,t.offset<0),e.setState(Jt.FORWARD,t.offset>0)}(e,t),e.emit(V,t),t))}function tn(e,t){t.timer&&clearTimeout(t.timer),t.timer=t.offset=0,function(e){e.setState(Jt.FORWARD,!1),e.setState(Jt.BACKWARD,!1),e.setState(lt,!1)}(e)}function nn(){if("undefined"==typeof document)return!1;const e=document.documentElement;return e&&"rtl"==e.getAttribute("dir")}function on(...e){const t=document.createElement("div");return 0==e.length||t.classList.add(...e),t}function rn(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 an(e){const t="number"==typeof e?e:parseInt(e,10);return(t>9?"":"0")+t}function sn(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+":"+an(o)+":"+an(e)):t+an(o)+":"+an(e)}!function(e){e.FORWARD="forward",e.BACKWARD="backward"}(Jt||(Jt={}));const ln=navigator.languages||[navigator.language];function cn(e,t,n,o){if((o=o||0)>=e.length)return n;return rn(e[o],t,cn(e,t,n,o+1))}function un(e,t,n){const o=new Map,r=t.lang;return r&&e[r]&&o.set(r,e[r]),function(){try{return ln.reduce((e,t)=>~t.indexOf("-")?e.concat(t,t.split("-")[0]):e.concat(t),[])}catch(e){return[]}}().forEach(function(t){e[t]&&!o.has(t)&&o.set(t,e[t])}),e[n]&&!o.has(n)&&o.set(n,e[n]),Array.from(o.values())}const dn=[1e7]+""+-1e3+-4e3+-8e3+-1e11,pn=()=>"undefined"==typeof crypto?"":dn.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),fn="flowplayer/uuid";let hn="";!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 mn=["touchstart","touchmove"];function yn(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return t&&Object.defineProperty(n,"data",{get:()=>t}),n}function gn(e,t,n){const o=yn(t,n);return e.dispatchEvent(o),e}function vn(e,t,n){const o=yn(t,n);return e.dispatchEvent(o),o}function En(e,t,n,o){Array.isArray(t)?t.forEach(t=>_n(e,t,n,o)):_n(e,t,n,o)}function _n(e,t,n,o){if(r=t,!~mn.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 wn(e,t,n,o){return En(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 Sn={preload:"auto",rtl:!1,controls:!0},bn=["muted","preload"];function kn(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(et)!=n&&r.setState(et,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 $t(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,gn(r,Z,r.playerState),r},r.createComponents=function(...e){return Array.from({length:e.length}).map((t,n)=>wt(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(Ze,!0),r.setState(t,!1),r.setState(e,!0),n&&setTimeout(function(){r.setState(Ze,!1)},n)},r.emit=(e,t)=>(gn(r,e,t),r),r.on=(e,t)=>(En(r,e,t),r),r.once=(e,t)=>(wn(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)=>vn(r,e,t),r.togglePlay=function(e){return r.hasState(Ye)?Promise.reject():It(r,0,e)},r.toggleMute=function(e){e=null==e?!r.muted:!!e,r.muted=e,r.muted||r.volume||(r.volume=1),gn(r,k)},r.toggleDisable=function(e){e=null==e?!r.disabled:!!e,r.setState(Ge,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(),gn(r,U),r.setState(pt,!0)},0)},r.setAttrs=function(e){return bn.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?rn(Sn,t):n,rn(e,t,n)},r.i18n=function(e,t){if(!r.reaper)return"";const n=r.reaper.get("translations");return n?cn(n,e,t||""):t||""},r.setOpts=function(t){Object.assign(e,t),e.live&&!r.hasState(Qe)&&(r.setState(et,!0),gn(r,B)),"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")),r.setState(Ke,r.opt("rtl",function(e){if(!e)return nn();const t=e.getAttribute("dir");return t?"rtl"==t:nn()}(o))),r.setState(Qe,!!e.live),r.setState(tt,"string"==typeof e.poster&&e.poster.length>0),r.setState(ct,!!e.seekable),r.setState(dt,0==e.controls),o.style.backgroundImage=r.hasState(tt)?"url('"+e.poster+"')":"",gn(r,$,e)},r.renderPlugin=function(e){vn(r,Q,e).defaultPrevented||r.root.appendChild(e)};const a={offset:0,timer:0};var s,l;l=a,(s=r).on(Zt,function(){tn(s,l)}),r.enqueueSeek=function(e){if(0!=r.opts.seekable&&!(1==r.opts.disabled&&e>0))return en(r,a,e)},r.deviceId=function(){return function(e){if(hn)return hn;try{const t=e.getItem(fn);if(t)return t;const n=pn();return e.setItem(fn,n),n}catch(e){return hn=pn()}}(r._storage)}}var Tn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Nn(){return"undefined"!=typeof window?window:void 0!==Tn?Tn:{}}const An=["localhost","127.0.0.1","0.0.0.0","s.codepen.io","cdpn.io","try.flowplayer.com"];function On(e,t){return!!~An.indexOf(e)||e.indexOf(t)===e.length-t.length}On.check_whitelist=function(e){return!!~An.indexOf(e)};const In="production";function Ln(e,t){const n={valid_jwt:!1,raw:"",data:{acl:0},exp:0};let o={c:"{}",exp:0};t=t||{};try{o=Et(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&&Ln.validate(n),n}var Rn;function Cn(e){return{grant:e,is_granted:t=>(e&t)===t}}function Pn({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",a.alt="Flowplayer Logo",e.append(o,r,i,a)}function Fn(e){return t=>{setTimeout(function(){if(!t.defaultPrevented&&!t.prevented)return e(t)},0)}}Ln.validate=function(e){if("string"==typeof e&&(e=Ln(e)),!e||!e.raw){if(On.check_whitelist(window.location.hostname)||"dev"===In.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=On.bind(null,t);if("dev"!==In.toString()&&e.data.domain&&e.data.domain.length&&!e.data.domain.some(n))throw new Error("Domain not allowed");if("dev"!==In.toString()&&1e3*e.exp-Date.now()<0)throw new Error("Expired token");return!0},Ln.id=function(e){if(e)return"string"==typeof e&&(e=Ln(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"}(Rn||(Rn={})),Cn.of=Cn,Cn.from_token=function(e){const t=Ln(e,{require_valid_token:!0});return Cn.of(t.data.acl)},Cn.permissions=Rn;const Mn="is-casting",Dn="has-casted";function Un(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 xn(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 Hn(e,t){e.style.width="0",t.style.display="none"}function Wn(e,t){const n=e.seekable;if("object"!=typeof e.opts||0==n.length)return{head:0,tail:0};const o=Gn(e),r=t||e.live_state.dvr_window;return{head:o,tail:"number"!=typeof r||o-r<0?n.start(0):o-r}}function qn(e){return e.opt("live",!1)||e.duration>=Number.MAX_SAFE_INTEGER}function Bn(e){return isFinite(e.duration)?e.duration:0==e.seekable.length?0:Wn(e).head}function Gn(e){var t;const n=e.seekable;return n.length?e.hasState("is-chromecast-playing")||!(null===(t=e.hls)||void 0===t?void 0:t.liveSyncPosition)?n.end(n.length-1):e.hls.liveSyncPosition:0}function Vn(e,t,n){if(!t.seekable||0==t.seekable.length)return;Un(n,e);const o=Wn(t),r=(100-Math.max(0,Math.min(e,100)))/100*(o.head-o.tail);n.innerText="-"+sn(r)}function jn(e){e.currentTime=Wn(e).tail}function Kn(e){try{e.dvr_offset=0,e.currentTime=Gn(e)}catch(e){console.warn("failed to seek to now: %j",e)}}function zn(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=Wn(e);return n.tail+t*(n.head-n.tail)}(t,e)}function Qn(e,t){e.style.width="0",t.style.display="none"}function Yn(e,t){const n=t.clientWidth;t.classList.toggle(Ve,n<600),t.classList.toggle(je,n<400)}function Xn(e,t,n){let o=!0;t.classList.add("flowplayer"),Yn(0,t),wn(n,b,()=>{void 0!==e.start_quality&&Yt(n,{feature_name:"start-quality",behavior:String(e.start_quality),sample_rate:Qt.High})}),En(n,b,()=>{if(!n.hasState(We)&&!n.hasState(He)&&e.is_native&&"none"!==e.preload)return"metadata"===e.preload?(n.setState(We,!0),n.emit(te)):void Lt(n)}),En(n,E,()=>{e.is_native&&"metadata"===e.preload&&n.paused&&n.emit(I)}),En(n,[b,y],function(){Yn(0,t)}),En(n,Z,function(){Object.entries(n.playerState).forEach(function([e,n]){t.classList.toggle(e,n)})}),En(n,S,function(){n.setState(Xe,!n.hasState(Mn)&&!n.hasState(qe)&&n.readyState<3)}),En(n,L,function(t){const o=n.original_src;Fn(()=>{if(o===n.original_src){if(n.setState(ze,!0),wn(n,S,function(){n.setState(ze,!1),o===n.original_src&&n.setState(qe,!e.loop&&!!e.rewind&&n.paused)}),e.loop)return n.togglePlay(!0);e.rewind&&(n.currentTime=0)}})(t)}),En(n,[C,R],function(e){n.setState(Be,e.type==C)}),En(n,K,function(e){setTimeout(()=>{e.defaultPrevented||(n.currentTime=e.detail.currentTime)},0)}),En(n,L,function(){n.setState(Me,!1),o=!0}),En(n,w,()=>{if(!n.opts.live||!n.opts.is_native)return;const e=n.seekable;0!=e.length&&n.emit("dvr/window",e.end(e.length-1)-e.start(0))}),En(n,_,function(){n.setState(He,!0),n.setState(We,!1)}),En(n,A,()=>{n.setState(nt,!0)}),En(n,[O,I,b],function(t){if(!n.hasState(Be)&&(t.type!=I||e.autoplay||n.setState(Xe,!1),t.type!=b||"none"!=n.opt("preload")||e.autoplay)){if(t.type==b&&e.autoplay)return wn(n,N,function(){n.setState(Xe,!1)});t.type!=O||n.hasState(He)||n.setState(We,!0),n.setState(ze,!1),n.setState(Xe,t.type==O)}}),En(n,[N,T],function(t){setTimeout(()=>{const e=new CustomEvent("flowplayer/"+t.type,{detail:n});document.dispatchEvent(e)},0);const r=t.type==N,i=n.currentTime==n.duration,a=r&&o&&e.autoplay||n.hasState(Xe);if(r&&(n.started=!0,o=!1),n.setState(Xe,!1).setState(nt,!1),!r&&n.setState(ot,!1),i)return;const s=r?Me:Ue,l=r?Ue:Me;n.transitionState(s,l,a?0:300),!n.hasState(qe)||n.root.classList.contains("ad-hide-first-frame")||n.root.classList.contains("preroll-ios")||function(e,t){if(!e.hasState(Qe)||![void 0,0,-1].includes(t)||!e.seekable.length||e.hasState(Dn))return e.setState(qe,!1);e.once(R,()=>e.setState(qe,!1)),0===t?jn(e):Kn(e)}(n,e.start_time)})}const $n=[0].concat(Array.from({length:100}).map((e,t)=>(t+1)/100));function Zn(){return t.find(e=>e.hasState(Mn))}const Jn=.5625;function eo(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}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(N,this.render),null===(t=this.player)||void 0===t||t.once(L,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(N,this.render),null===(o=this.player)||void 0===o||o.off(L,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(to).forEach(([e,t])=>{r.style.setProperty(e,t,"important")}),o.appendChild(r)}}ExplorerPlan.pluginName="explorer-plan";const to={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)"},no="flowplayer/"+N;function oo(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=ro("flowplayer.version","3.34.1");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=ro("hls.version",i.version);o.append(e)}e.appendChild(o)}(e,t))})}const ro=(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 io(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 ao="without_recovery",so="off";class FlowplayerError extends Error{static getErrorKey(e){return e in At?At[e]:At["00-00"]}constructor(e,t,n={}){super(e),this.message=e,this.flowplayerErrorCode=t,this.config=n,this.id=pn(),this.isFatal=!!n.isFatal,this.errorKey=FlowplayerError.getErrorKey(this.flowplayerErrorCode)||"unknown"}toJSON(){return{message:this.message,flowplayer_error_code:this.flowplayerErrorCode,id:this.id,root_error_id:this.config.rootErrorId,resource:this.config.resource,is_fatal:this.isFatal,is_retry:!!this.config.isRetry}}}const lo=io("core/retry");function co(e,t){const n={pending:void 0,count:0};e.on(ne,o=>{var i,a,s,l,c;const u=null===(i=o.detail)||void 0===i?void 0:i.error;u.config.isRetry=!!n.count,void 0===n.pending&&(null===(s=null===(a=u.config)||void 0===a?void 0:a.retryOpts)||void 0===s?void 0:s.retry)!==so&&(t.retry||(null===(c=null===(l=u.config)||void 0===l?void 0:l.retryOpts)||void 0===c?void 0:c.retry))&&(++n.count,n.pending=function(e,t,n){var o,i;return setTimeout(()=>{var o;e.hasState(pt)||(t.pending=void 0,(null===(o=n.config.retryOpts)||void 0===o?void 0:o.retry)!==ao&&e.emit(G),e.emit(r,{error:n}),lo("%s try",t.count))},null!==(i=null===(o=n.config.retryOpts)||void 0===o?void 0:o.retryTimeout)&&void 0!==i?i:3e3*t.count)}(e,n,u))}),e.on(N,()=>{n.count=0}),e.on([D,G],e=>{e.type===D&&(n.count=0),clearTimeout(n.pending),n.pending=void 0}),e.on(r,Fn(()=>{e.load()}))}const uo=[te,i,D];function po(e){try{return!!new URL(e)}catch(e){return!1}}const fo=navigator;function ho(e){var t,n;const o=null===(t=e.hls)||void 0===t?void 0:t.bandwidthEstimate;return o?1e-6*o:(null===(n=fo.connection)||void 0===n?void 0:n.downlink)||-1}function mo(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 yo=e=>{switch(e){case!0:return Tt.ON;case!1:return Tt.OFF;default:return e}};function go(){try{const e=window.location!==window.parent.location?document.referrer:document.location.href;return"string"==typeof e&&e.slice(0,200)}catch(e){return!1}}const vo=[],Eo="https://ihi.flowplayer.com/v1/health/events";function _o(e){if(e.suspended)return;const t=vo.slice(0);vo.length=0,0!=t.length&&(e.logger.log(`:dispatch events={${t.length}}`),mo(function(){try{return"undefined"==typeof window?Eo:window.__FLOWPLAYER_INSIGHTS_URL?window.__FLOWPLAYER_INSIGHTS_URL:Eo}catch(e){return Eo}}(),t))}async function wo(e,t,n){const o=await bo();vo.push(Object.assign(t,o)),e.logger.log(":enqueue",t.event,t),vo.length<10&&!n||_o(e)}const So=()=>{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}},bo=async()=>({client_time:Date.now()}),ko=(e,t)=>Object.assign(e,{detail:t}),To=(e,{event:t,media_session_id:n,session_id:o,play_range_id:r})=>({event:t,media_session_id:n,session_id:o,play_range_id:r,device_id:e.deviceId(),version:"3.34.1",commit:"b6818796fc39e12da65fa0ebd29704a4b383c122",ima_sdk_version:So(),preload:e.opt("preload"),autoplay:yo(e.opt("autoplay")),live:e.opt("live"),dvr:!!e.live_state.dvr,source:e.original_src,downlink_mbs:ho(e),page_url:go(),player_id:e.opt("metadata.player_id"),media_id:e.opt("metadata.media_id")||e.opt("metadata.stream_target_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")}),No=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"]});const Ao=(e,t)=>{let n=null;return(...o)=>{null!==n&&(clearTimeout(n),n=null),n=setTimeout(()=>t(...o),e)}};var Oo;!function(e){e[e.Starting=0]="Starting",e[e.ConfigFinalized=1]="ConfigFinalized",e[e.TimerStartedWithAutoplay=2]="TimerStartedWithAutoplay",e[e.TimerStartedWithUserGesture=3]="TimerStartedWithUserGesture",e[e.MetricReported=4]="MetricReported"}(Oo||(Oo={}));const Io=[a,h];class TimeToFirstFrame{constructor(e=Oo.Starting,t=!1){this.state=e,this.loadedAd=t}reset(){this.state=Oo.Starting,this.loadedAd=!1,this.start=void 0,this.end=void 0,this.adDetails=void 0}adInfo(){const{ad_tag_id:e,vast_ad_id:t}=this.adDetails||{};return{ad_tag_id:e,vast_ad_id:t}}toJSON(){return Object.assign({ad_was_requested:this.loadedAd,ms_to_first_frame:Math.round(this.end&&this.start?this.end-this.start:-1)},this.adInfo())}startTimer(e){this.state==Oo.ConfigFinalized&&(this.state=e,this.start=performance.now())}hasStarted(){return[Oo.TimerStartedWithAutoplay,Oo.TimerStartedWithUserGesture].includes(this.state)}stopTimer(e){this.hasStarted()&&(this.end||(this.end=performance.now()),this.state=Oo.MetricReported,e())}}function Lo(e){return Math.round(1e3*e)/1e3}class EWMA{constructor(e){this.tickInterval=e,this.ewma=0,this.startTime=Date.now()}decay(){const e=Date.now()-this.startTime;return Math.pow(2,-e/(4*this.tickInterval))}update(e){const t=this.decay();return this.ewma=t*this.ewma+(1-t)*e,this.ewma}toJSON(){return this.ewma}}const Ro={skipUnreliableSegments:!0};class WatchedState{constructor(e){this.player=e,this.marchingInterval=void 0,this.lastWatchedPoint=void 0,this.watchedSum=0,this.lastReportedSum=0,this.ewmaTickWatched=new EWMA(WatchedState.AccuracyMilliseconds)}reset(){this.onNotWatching(),this.watchedSum=0,this.lastReportedSum=0,this.lastWatchedPoint=void 0}onNotWatching(){this.marchingInterval&&(this.updateWatched(),this.marchingInterval=clearInterval(this.marchingInterval))}onWatching(){this.marchingInterval||(this.lastWatchedPoint=this.createWatchedPoint(),this.marchingInterval=setInterval(()=>{this.updateWatched()},WatchedState.AccuracyMilliseconds))}createWatchedPoint(){return{currentTime:this.player.currentTime,paused:this.player.paused}}updateWatched(){const e=this.createWatchedPoint();this.lastWatchedPoint&&this.calculateTimeWatched(this.lastWatchedPoint,e),this.lastWatchedPoint=e}calculateTimeWatched(e,t){var n,o;const r=t.currentTime-e.currentTime,i=this.ewmaTickWatched.update(r);if(!(r<0)&&!(!1!==(null===(o=null===(n=this.player.opts)||void 0===n?void 0:n.health)||void 0===o?void 0:o.skipUnreliableSegments)&&1e3*r>1.3*WatchedState.AccuracyMilliseconds)&&(this.watchedSum+=r,this.watchedSum!=this.lastReportedSum&&(this.watchedSum>this.lastReportedSum+WatchedState.ReportingIntervalSeconds||this.player.ended))){const e=Lo(i),t={total_watched_seconds:Lo(this.watchedSum),tick_watched_seconds:e,batch_watched_seconds:Lo(this.watchedSum-this.lastReportedSum)};this.lastReportedSum=this.watchedSum,this.player.emit(Vt,t)}}}WatchedState.ReportingIntervalSeconds=5,WatchedState.AccuracyMilliseconds=160;const Co=pn();class Health{constructor(e,t){let n;this.session_id=Co,this.suspended=!1,this.logger=io("health",t.opts),this.media_session_id=pn(),this.play_range_id=pn(),this.analyticsLoop=setInterval(()=>_o(this),2e3),t.on(U,()=>clearInterval(this.analyticsLoop)),t.on(N,()=>{n!==this.media_session_id&&(n=this.media_session_id,this.first_playing_event_timestamp=Date.now()),this.play_range_id=pn()});let o=Date.now()-1e3;t.on(S,e=>{if(n!==this.media_session_id)return;const r=Date.now();if(r<o)return;o=Date.now()+5e3;const i=To(t,this.eventInfo(e.type)),a=ko(i,{duration:(s=t.duration,Number.isFinite(s)?s:s===1/0?-1:void 0)});var s;this.first_playing_event_timestamp&&(Object.assign(a,{ms_since_first_playing:r-this.first_playing_event_timestamp}),this.first_playing_event_timestamp=void 0),wo(this,a)});const r=this;if(t.health={get media_session_id(){return r.media_session_id},set media_session_id(e){r.media_session_id=e},get session_id(){return r.session_id},set session_id(e){r.session_id=e},toggle(e){e?r.resume():r.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,play_range_id:this.play_range_id}}suspend(){this.suspended=!0,clearInterval(this.analyticsLoop)}resume(){this.suspended=!1,this.analyticsLoop=setInterval(()=>_o(this),2e3)}init(e,t,n){if(go().toString().startsWith("data:"))return this.suspend();!function(e){let t=null;const n=()=>{t=null};e.on(O,function(t){e.seeking||e.networkState===e.NETWORK_LOADING&&(e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e.emit(Ht))}),e.on(Ht,e=>{t=e}),e.on(I,o=>{if(t){const r=o.timeStamp-t.timeStamp;if(n(),r<31)return;if(r>3e5)return;e.emit(Wt,{rebuffer_duration:r/1e3})}}),uo.forEach(t=>e.on(t,n))}(n),function(e){let t;[I,te].forEach(n=>{e.on(n,n=>{const o=Date.now();switch(n.type){case te:return t=o;case I:if(t)return e.emit(Gt,{ms_since_loading_started:o-t}),t=null}})})}(n),function(e){if(void 0===window.performance)return;const t=new TimeToFirstFrame;e.on(D,()=>{if(!e.opt("metadata.media_id"))return t.reset();t.reset(),t.state=Oo.ConfigFinalized}),e.on(te,()=>{(e.root.classList.contains("ad-hide-first-frame")||e.opt("autoplay"))&&t.startTimer(Oo.TimerStartedWithAutoplay)}),Io.forEach(n=>{e.on(n,()=>{e.opt("autoplay")||t.startTimer(Oo.TimerStartedWithUserGesture)})}),e.on("ad-requested",()=>{t.loadedAd=!0}),e.on(S,()=>{if(!(e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA)){if(e.root.classList.contains("ad-hide-first-frame"))return!t.end&&(t.end=performance.now());switch(t.state){case Oo.TimerStartedWithAutoplay:case Oo.TimerStartedWithUserGesture:return t.stopTimer(()=>e.emit(Bt,t.toJSON()))}}}),e.on("ad-started",n=>{switch(t.end=void 0,t.adDetails=n.detail,t.state){case Oo.TimerStartedWithAutoplay:case Oo.TimerStartedWithUserGesture:return t.stopTimer(()=>e.emit(Bt,t.toJSON()))}})}(n),function(e){const t=new WatchedState(e);e.on(te,()=>t.reset()),e.on(N,()=>t.onWatching()),e.on(Wt,()=>!e.paused&&t.onWatching()),e.on(Ht,()=>t.onNotWatching()),e.on(T,()=>t.onNotWatching()),e.on(C,()=>{e.currentTime>1&&t.updateWatched(),t.onNotWatching()}),e.on(R,()=>{e.paused||t.onWatching()}),e.on(L,()=>t.updateWatched()),e.on("visibilitychange",()=>t.updateWatched())}(n),n.on(qt,e=>{wo(this,To(n,this.eventInfo(e.type)),!0)}),n.on(xt,({detail:e})=>{const t=To(n,this.eventInfo(e.event));Object.assign(t,e.detail||{}),wo(this,t)}),n.on(jt,e=>{if(t=e.detail.sample_rate,!Object.values(Qt).includes(t))return console.debug(`sample_rate=${e.detail.sample_rate} is invalid`);var t,o;if(!(0!==(o=e.detail).sample_rate&&Math.random()<=o.sample_rate))return;const r=To(n,this.eventInfo(e.type));wo(this,ko(r,e.detail))}),n.on(D,()=>{n.opt("metadata.media_id")&&n.emit(Kt)}),[b,E,_,w,O,Ht].forEach(e=>{n.on(e,e=>{wo(this,To(n,this.eventInfo(e.type)))})}),[Wt,Bt,Gt,Vt].forEach(e=>{n.on(e,e=>{const t=To(n,this.eventInfo(e.type));wo(this,Object.assign(t,e.detail))})}),[N,T,C,R,L,g,v,I,te].forEach(e=>{n.on(e,e=>{wo(this,To(n,this.eventInfo(e.type)))})}),n.on(k,Ao(800,e=>{const t=To(n,this.eventInfo(e.type));wo(this,ko(t,{volume:parseFloat(n.volume.toFixed(2)),muted:n.muted}))})),n.on(y,Ao(800,e=>{const o=To(n,this.eventInfo(e.type));wo(this,ko(o,{height:t.clientHeight,width:t.clientWidth}))})),n.on("hls/failover",e=>{const t=To(n,this.eventInfo(e.type)),o=e.detail,{reason:r,from:i}=o;wo(this,ko(t,{reason:r,from:i}))}),n.on(x,({type:e,detail:t})=>{if("hls"===t.plugin)return function(e,t,n,o){const r=To(t,e.eventInfo(n)),i=Object.assign({before:No(o.before),after:No(o.after),automatic:o.automatic,downscale:o.downscale},o.before?{}:{start_quality:t.opts.start_quality});wo(e,Object.assign(Object.assign({},r),{state:i}))}(this,n,e,t)}),n.on(ne,e=>{const t=To(n,this.eventInfo(e.type)),o=e.detail.error;if(!o)return wo(this,t,!0);return wo(this,ko(t,o.toJSON()),!0)}),n.on(D,e=>{var t;const o=null===(t=e.detail)||void 0===t?void 0:t.src;if("string"!=typeof o)return;if(!po(n.original_src))return;if(!po(o))return;if(o==n.original_src)return;this.media_session_id=pn();wo(this,To(n,this.eventInfo(e.type))),_o(this),n.setOpts({health:Object.assign(Object.assign({},n.opts.health),Ro)})}),n.on("visibilitychange",e=>{wo(this,To(n,this.eventInfo(e.type))),_o(this)})}}function Po(e,t){return function(e){return e.extensions.reduce((e,t)=>e.find(e=>e.pluginName===t.pluginName)?(console.warn("flowplayer: duplicate plugin %s detected, plugin names should be unique",t.name),e):(e.push(t),e),[])}(e).map(n=>new n(e,t))}function Fo(e,t={}){var n,o,r,i,a,s;switch(e.code){case MediaError.MEDIA_ERR_ABORTED:return new FlowplayerError(null!==(n=e.message)&&void 0!==n?n:"The playback was aborted, typically by the user.",Nt.PlaybackInternalAborted,Object.assign({isFatal:!1,retryOpts:{retry:so}},t));case MediaError.MEDIA_ERR_NETWORK:return new FlowplayerError(null!==(o=e.message)&&void 0!==o?o:"A network error prevented media from being downloaded.",Nt.NetworkHttpRequestFailed,Object.assign({isFatal:!0},t));case MediaError.MEDIA_ERR_DECODE:return new FlowplayerError(null!==(r=e.message)&&void 0!==r?r:"An error occurred while decoding the media.",Nt.PlaybackVideoDecodeError,Object.assign({isFatal:!0},t));case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return new FlowplayerError(null!==(i=e.message)&&void 0!==i?i:"The media could not be loaded because the format is not supported.",Nt.MediaUnsupportedVideoFormat,Object.assign({isFatal:!0},t));case 5:return new FlowplayerError(null!==(a=e.message)&&void 0!==a?a:"Encrypted content could not be played due to missing keys or unsupported protection scheme.",Nt.ContentProtectionKeySystemNoKeys,Object.assign({isFatal:!0},t));default:return new FlowplayerError(null!==(s=e.message)&&void 0!==s?s:"An unknown playback error occurred.",Nt.PlaybackUnknown,Object.assign({isFatal:!0},t))}}Health.pluginName="health",Health.events=zt,Health._UNLOAD_SUBSCRIBED=!1;const Mo=function(){const e=Nn(),t=e.flowplayer?e.flowplayer:{extensions:[]};return Array.isArray(t.extensions)||(t.extensions=[]),t}();function Do(n,r){if("function"==typeof n)return e.push(...[...arguments].filter(e=>"function"==typeof e)),Do;"string"==typeof r&&(r={src:r}),r||(r={}),r.token||"string"!=typeof window.__FLOWPLAYER_TOKEN||(r.token=window.__FLOWPLAYER_TOKEN);const a="string"==typeof n?document.querySelector(n):n;if(!a)return console.error(new Error("Flowplayer: '"+n.toString()+"' not found"));const s=a.querySelector("video.fp-engine");if(s)return s;const l=function(e){try{return Ln.validate(e),{success:!0,message:""}}catch(e){return{success:!1,message:e.message}}}(r.token);if(!l.success)return Pn({root:a,data:{reason:"token",details:l.message}});const c=new Map,u=function(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}(r,a);var d;u.reaper=c,u._customElements=_t,Object.defineProperty(u,"token",{value:"string"==typeof r.token?Ln.id(r.token):"",writable:!1}),u.addEventListener(U,()=>{c.clear(),u.reaper=0,delete u.root}),u.root=a,r.token&&Cn.from_token(r.token).is_granted(Cn.permissions.DEVELOPER_PLAN)&&e.push(ExplorerPlan),!~t.indexOf(u)&&t.push(u),kn(r,a,u),u.setAttrs(r),u.plugins=Po(Do,u),Xn(r,a,u),function(e,t,n){if(!window.IntersectionObserver)return;const o={should_resume:!!e.autoplay,locked:!1};En(n,A,function(){o.locked||(o.should_resume=!0)});const r=()=>{if(!e.autoplay)return;if(n.hasState(ut)&&o.should_resume)return n.togglePlay(!0);const t=n.currentSrc;e.autopause||n.hasState(ut)||!o.should_resume||wn(n,F,()=>{e.autoplay&&o.should_resume&&t===n.currentSrc&&n.togglePlay(!0)})},i=()=>{if(!e.autoplay)return;if(!e.is_native)return;if("auto"===e.preload)return;if(n.hasState(ut))return Lt(n);const t=n.currentSrc;wn(n,F,()=>{t!==n.currentSrc||n.readyState>1||!n.paused||Lt(n)})};En(n,D,function(){o.should_resume=!!e.autoplay,n.off(b,i),n.once(b,i),n.off(I,r),n.once(I,r)}),En(n,T,function(){o.locked||(o.should_resume=!1)});const a=new IntersectionObserver(e=>{e.forEach(e=>{setTimeout(()=>{const t=e.intersectionRatio,o=n.hasState(ut);if(n.setState(ut,t>=.2),n.emit(z,{ratio:t}),o===n.hasState(ut))return;const r=n.hasState(ut)?F:M;n.emit(r)},0)})},{threshold:$n});a.observe(t),n.on(U,()=>a.disconnect()),En(n,F,function(){!o.should_resume||!e.autopause||Zn()||n.opts.autoplay&&!n.readyState||n.togglePlay(!0)}),En(n,M,function(){if(!e.autopause||Zn())return;const t=!n.paused;o.locked=!0,n.pause(),setTimeout(function(){o.should_resume=t,o.locked=!1},0)})}(r,a,u),function(e,t){if(!window.ResizeObserver)return;const n=new ResizeObserver(e=>{const n=e[e.length-1];t.emit(y,n)});n.observe(e),t.on(U,()=>n.disconnect())}(a,u),function(e,t,n){const o=!!e.ratio,r=document.createElement("div");r.classList.add("fp-ratio"),t.append(r);let i=eo(e.ratio||Jn);r.style.paddingTop=100*i+"%";const a=[_,E];n.on(a,function(){if(o)return;const e=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth;e&&n.setOpts({ratio:e})}),n.on($,function(){const t=n.videoHeight&&n.videoWidth&&n.videoHeight/n.videoWidth,o=eo((null==e?void 0:e.ratio)||t||Jn);i!==o&&(i=o,r.style.paddingTop=100*o+"%")})}(r,a,u),function(e){const t=t=>{t.detail!==e&&!1===e.opt("multiplay")&&e.togglePlay(!1)};e.on(U,()=>document.removeEventListener(no,t)),document.addEventListener(no,t)}(u),oo(a,u),co(u,r),(d=u).on(i,Fn(e=>{const t=e instanceof MediaError?e:d.error;t&&d.emit(ne,{error:Fo(t,{resource:d.original_src})})})),u.plugins.forEach(e=>{try{e.init(r,a,u)}catch(t){console.log("Error(plugin/%s)",e.constructor.name,t)}}),u.setOpts(r),u.opts=r,r.src&&u.setSrc(r.src);const p=u.readyState;return p>0&&u.currentSrc&&u.emit(E),p>2&&u.currentSrc&&u.emit(I),u.emit(o),u.on(X,function(e){Pn({root:a,video:u,data:e.data||{}})}),setTimeout(gn,0,document,"flowplayer:player:created",u),u}Object.assign(Do,Mo),function(o){Array.isArray(o.extensions)&&o.extensions.forEach(t=>e.push(t)),o.customElements=_t,o.defaultElements=Fe,o.version="3.34.1",o.commit="b6818796fc39e12da65fa0ebd29704a4b383c122",o.instances=t,o.extensions=e,o.support=n,o.events=oe,o.states=ht,o.errors=Nt,o.jwt=Et,o.autoplay=Tt,o.quality=kt}(Do),"object"==typeof document&&setTimeout(gn,0,document,"flowplayer:umd",Do),Do.extensions.unshift.apply(Do.extensions,[Health]),"undefined"!=typeof window&&"function"==typeof window.matchMedia&&[H,W].forEach(function(e){window.matchMedia("(orientation: "+e+")").addListener(function(n){t.length&&t.forEach(function(t){n.matches&&t.emit(e)})})});const Uo=[b,G];function xo(e,t){const n=wt(t,Pe);e.append(n),t.on(ne,o=>{if(!document.body.contains(e))return;const r=o.detail.error;!1!==r.config.showErrorUI&&(r.isFatal||r.config.showErrorUI)&&(t.setState(Ye,!0),console.warn(r),gn(n,ne,{error:r}),gn(n,i,{error:r}))}),Uo.forEach(e=>t.on(e,()=>{!function(e){if(!e.hasState(Ye))return;e.setState(Xe,!0),e.setState(Ye,!1)}(t)}))}const Ho=16384;var Wo=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:Ho,LOGO_ON_BOTTOM:32768});function qo(e,t,n){let o=()=>document.fullscreenElement,r="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),r="webkit"+r,o=()=>t.webkitCurrentFullScreenElement}const i=()=>n.getFullsceenTarget?n.getFullsceenTarget():t;n.toggleFullScreen=function(e,t){if(n.ios_fullscreen_disabled)return;if("boolean"!=typeof e&&(e=!n.hasState(De)),Bo(n)&&(e?function(e,t){e.getAttribute("playsinline")&&e.removeAttribute("playsinline");e.getAttribute("webkit-playsinline")&&e.removeAttribute("webkit-playsinline");t||e.webkitEnterFullScreen()}(n,t):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(it)||e.setState(it,!0)}(n,t)),!document.fullscreenEnabled)return;const r=i();if(e)return r.requestFullscreen();o()===r&&document.exitFullscreen()},Bo(n)&&(n.ios_fullscreen_disabled=!0,n.once(J,function(){n.ios_fullscreen_disabled=!1}),n.on(["webkitendfullscreen","webkitbeginfullscreen"],e=>{const t="webkitbeginfullscreen"===e.type;n.setState(De,t).emit(t?g:v).toggleFullScreen(t,!0)})),setTimeout(()=>{const e=i();e.addEventListener(r,function(){const t=o(),r=t===e||t==n;n.emit(r?g:v),n.setState(De,r)})},0),!1!==e.doubleclick&&t.addEventListener(s,function(e){var t;e.target&&(null===(t=e.target)||void 0===t?void 0:t.classList.contains("fp-ui"))&&n.toggleFullScreen()})}function Bo(e){return!document.fullscreenEnabled&&"function"==typeof e.webkitEnterFullScreen&&"function"==typeof e.webkitExitFullScreen}const Go="use-play-",Vo="mute";function jo(e,t,n){if(!n.reaper)return;const o=document.createDocumentFragment(),r=wt(n,re),i=wt(n,ie);t.append(i),o.append(r),n.reaper.set("ui",r),~t.className.indexOf(Go)||t.classList.add(Go+1),function(e,t,n){const o=on("fp-footer");t.append(o),n.on($,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=on("fp-title");e.innerText=i,o.append(e)}if("string"==typeof r){const e=r.split(" "),t=on("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),xo(r,n),t.appendChild(o);let a=null;[d,f,l].forEach(e=>{t.addEventListener(e,function(e){if(!n.hasState(st)||e.type===f){if(clearTimeout(a),e.type===l)return n.setState(at,!1);n.setState(at,!0),a=setTimeout(function(){n.setState("is-hovered",!1)},2e3)}})}),qo(e,t,n),n.on(k,function(){const e=0==n.volume||n.muted;n.muted=e,n.setState(xe,e),n._storage.setItem(Vo,e.toString())}),"true"==n._storage.getItem(Vo)&&(n.muted=!0,n.setState(xe,n.muted));const s=n._storage.getItem("volume");s&&!isNaN(Number(s))&&(n.volume=Number(s)),n.emit(k),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=Wn(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(B,()=>{const e=setInterval(()=>{if(!n.opts.live||0==n.reaper)return clearInterval(e);if(0==n.seekable.length||n.hasState(Ye))return;const t=function(e){const t=e.currentTime,n=Wn(e);return{progress:Math.min(100,Math.max(0,(t-n.tail)/(n.head-n.tail)*100)),is_live:t-n.head>=-10}}(n);n.hasState(Je)==t.is_live&&n.setState(Je,!t.is_live),n.live_state.dvr&&n.emit(q,t.progress)},200)}),n.on(E,function(){n.setOpts({live:qn(n)})}),n.on(P,function(e){const t=qn(n),o=t?Bn(n):e.data||n.duration;isNaN(o)||n.setOpts({live:t,duration:o})}),n.on(["playlist/advance",D],t=>{if(n.setState($e,!!e.autoplay),n.root.classList.contains("is-livecountdown"))return Ko(n,e);(n.currentSrc||n.srcObject)&&(t.type===D&&["is-playlist",ft].some(e=>n.root.classList.contains(e))||Ko(n,e))}),n.on($,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 a=t.classList;a.toggle("use-play-1",!(32&i||64&i)),a.toggle("use-play-2",(32&i)>0),a.toggle("use-play-3",(64&i)>0),a.toggle("use-thin-controlbar",(128&i)>0),a.toggle("no-title",(256&i)>0),a.toggle("no-description",(512&i)>0),a.toggle("logo-on-right",(8&i)>0),a.toggle("logo-on-bottom",(32768&i)>0),a.toggle("use-drag-handle",(16&i)>0),a.toggle("no-controls",(1024&i)>0),a.toggle("no-duration",(2048&i)>0),a.toggle("no-header",(4096&i)>0),a.toggle("no-mute",(4&i)>0),a.toggle("no-volume",(2&i)>0),a.toggle("no-fullscreen",(1&i)>0),a.toggle("no-touch-zones",(Ho&i)>0)})}function Ko(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,"metadata"in t&&delete t.metadata}function zo(e,t,n){if(Cn.from_token(e.token||"").is_granted(Cn.permissions.NO_METERING))return;Ln.id(e.token||"")&&n.once(N,async()=>await Qo(n,e.token||""))}async function Qo(e,t){const n=Ln.id(t||"");e.once(D,()=>{e.once(N,()=>Qo(e,t))});if(401==(await fetch("https://pmi.flowplayer.com/in",{method:"POST",body:JSON.stringify({token_id:n,factor:1,rnd:Math.random().toString(36).substring(2)})})).status)return e.emit(X,{reason:"token",details:"The token online validation failed"})}class I18n{init(e,t,n){var o;n.reaper&&n.reaper.set("translations",un(I18n,e,"en")),(o=n).once(Kt,()=>{const e=I18n.languagesLoaded().filter(e=>"en"!==e);e.length>0&&e.forEach(e=>{Yt(o,{feature_name:"translations",behavior:`loaded-lang-${e}`,sample_rate:Qt.Low})})}),o.on(Kt,()=>{o.opts.lang&&Yt(o,{feature_name:"translations",behavior:`used-lang-${o.opts.lang}`,sample_rate:Qt.Medium})})}static languagesLoaded(){return Object.keys(I18n).filter(e=>!I18n._nonLanguageFields.includes(e)).concat(I18n.en?["en"]:[])}}I18n.pluginName="i18n",I18n.en={ads:{ad:"Ad",ads:"Ads",advertisement:"Advertisement",indicator:"Ads",adchoices:"AdChoices"},audio:{button_txt:"Audio",menu_title:"Audio"},cc:{button:"CC",menu_title:"Subtitles",options:"Options",tracks:"Tracks",reset:"Reset",colors:{Black:"Black",Blue:"Blue",Cyan:"Cyan",Green:"Green",Magenta:"Magenta",Red:"Red",White:"White",Yellow:"Yellow"},edgeStyle:{None:"None","Drop shadow":"Drop shadow",Raised:"Raised",Depressed:"Depressed",Outline:"Outline"},fontFamily:{"Monospaced Serif":"Monospaced Serif","Proportional Serif":"Proportional Serif","Monospaced Sans-Serif":"Monospaced Sans-Serif","Proportional Sans-Serif":"Proportional Sans-Serif",Casual:"Casual",Cursive:"Cursive"},properties:{fontFamily:"Font family",fontSize:"Font size",fontColor:"Font color",fontOpacity:"Font opacity",backgroundColor:"Background color",backgroundOpacity:"Background opacity",characterEdgeStyle:"Character edge style"}},chromecast:{start:"start casting",stop:"stop casting"},core:{exit_fullscreen:"Exit fullscreen",fullscreen:"Fullscreen",mute:"Mute",muted:"Muted",pause:"Pause",play:"Play",seconds:"Seconds",timeline_aria_label:"Seek slider",unmute:"Unmute",volume:"Volume",close:"Close","skip-next":"Next","skip-prev":"Previous"},ovp:{starting_in:"Countdown"},playlist:{cancel:"Cancel",up_next:"Up next",autoplay:"Autoplay",now_playing:"Now playing",turn_off_autoplay:"Turn off autoplay",playlist:"Playlist"},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"},vtsel:{button_txt:"Video",menu_title:"Video Track"}},I18n._nonLanguageFields=[],I18n._nonLanguageFields=Object.keys(I18n);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($,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,o.alt=t||"Logo",!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($,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)?sn(n):""})}}const Yo={name:"fp-fullscreen",translation_key:"core.fullscreen"},Xo={name:"fp-fullscreen-exit",translation_key:"core.exit_fullscreen"},$o={name:"fp-play",translation_key:"core.play"},Zo={name:"fp-pause",translation_key:"core.pause"},Jo={translation_key:"core.mute",name:"fp-volume-mute-unmute"},er={translation_key:"core.play",name:"fp-small-play"},tr={translation_key:"core.pause",name:"fp-small-pause"},nr={name:"fp-fast-forward"},or={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")}}function rr(){}document.addEventListener(a,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(rt,!1))}),this.active_menu=void 0)});const ir={passive:!0};var ar;function sr(e,t){let n=0,o=-1,r=-1;const i=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),a=e.classList;e.id=i,a.remove(ar.GRABBING),a.remove(ar.TOUCHING);const s=t.onseek||rr,l=t.onstart||rr,y=t.onend||rr,g=t.onmouse||rr,v=t.ontouch||rr,E=t.ontouchend||rr;function _(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 w(t){const n=_(t);n!=r&&(s(e,n),r=n)}return e.addEventListener(p,function(t){lr(e,t)&&(a.add(ar.TOUCHING),cr(e.parentElement)&&(a.add(ar.GRABBING),v(e,_(t)),l(e,_(t)),w(t)))},ir),e.addEventListener(f,function(t){w(t),g(e,_(t))},ir),e.addEventListener(h,function(t){setTimeout(function(){a.remove(ar.TOUCHING)},500),lr(e,t)&&(a.remove(ar.GRABBING),E(e,_(t)),y(e,_(t)),o=0)},ir),e.addEventListener(m,function(){a.remove(ar.GRABBING,ar.TOUCHING),o=0},ir),e.addEventListener(u,function(t){a.contains(ar.TOUCHING)||(document.addEventListener(d,w),a.add(ar.GRABBING),l(e,_(t)),t.preventDefault(),w(t))}),e.addEventListener(d,function(t){a.contains(ar.TOUCHING)||g(e,_(t))}),document.addEventListener(c,function(t){a.contains(ar.TOUCHING)||(document.removeEventListener(d,w),a.contains(ar.GRABBING)&&(a.remove(ar.GRABBING),y(e,_(t)),o=0))}),e}function lr(e,t){const n=t.target;return!!n&&(n&&!n.closest(e.id)||!cr(e.parentElement)||!e.classList.contains(ar.TOUCHING))}function cr(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"}(ar||(ar={}));const ur="fp-tick";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=ur,e});this.append(...o),sr(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)},onend:()=>{Yt(e,{feature_name:"volume-slider",sample_rate:Qt.High,behavior:String(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")),this.adjustVolumeSlider(e.volume),e.on(k,()=>{const t=0==e.volume||e.muted;t&&this.adjustVolumeSlider(0);const n=e.opt("ui");this.classList.contains(ar.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("."+ur)),n=Math.round(e*t.length);t.forEach((e,t)=>{e.classList.toggle("fp-color",t<n)})}}class FlowplayerTimelineBar extends FlowplayerComponent{constructor(e){let t;super(e),this.bufferEle=on("fp-buffer"),this.progress=on("fp-progress","fp-color"),this.tooltipEle=on("fp-timestamp"),this.proposedSeekBar=on("fp-hover"),this.dragger=on("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("core.timeline_aria_label","Seek slider")),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;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(ar.GRABBING)||o||(o=setTimeout(r,200)))},i=()=>!!this.player.opt("seekable",!0)&&!isNaN(this.player.duration);sr(this,{onseek:(n,o)=>{if(i())switch(!!t.live){case!0:Vn(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),Un(this.tooltipEle,o)}},onstart:()=>{i()&&(e.emit("timeline/gesture/start"),!e.hasState(Mn)&&e.setState(Be,!0),t.live||function(e){e.style.display="block"}(this.tooltipEle))},onend:function(o,i){n(r),0!=t.seekable&&t.live&&zn(i,e)},ontouchend:()=>{t.live?Qn(this.proposedSeekBar,this.tooltipEle):Hn(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(ar.GRABBING)))switch(!!t.live){case!0:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),Vn(o,e,this.tooltipEle);break;case!1:!function(e,t){t.style.width=e+"%"}(o,this.proposedSeekBar),function(e,t,n){isNaN(e)||isNaN(t.duration)||(Un(n,e),n.textContent=sn(e/100*t.duration))}(o,e,this.tooltipEle)}}}),e.on($,function(e){e.data&&(t=e.data)}),e.on(N,()=>n(r)),e.on(w,()=>{0==e.reaper||t.live||xn(e,this.bufferEle)}),e.on(q,e=>{this.progress.style.width=e.detail+"%"}),e.on(S,()=>{0!=e.reaper&&(n(r),this.setAttribute("aria-valuenow",e.currentTime+""),this.setAttribute("aria-valuetext",Math.round(e.currentTime)+" "+e.i18n("core.seconds","Seconds")),t.live||xn(e,this.bufferEle))}),e.on(E,()=>{0!=e.reaper&&(t.live||xn(e,this.bufferEle))}),e.on(P,t=>{if(0==e.reaper)return;const n=qn(e)?Bn(e):t.data||e.duration;isNaN(n)||(this.setAttribute("aria-valuemax",n+""),this.setAttribute("aria-valuemin","0"))}),this.addEventListener(l,()=>{e.emit("timeline/gesture/end"),t.live?Qn(this.proposedSeekBar,this.tooltipEle):Hn(this.proposedSeekBar,this.tooltipEle)})}}class FlowplayerLiveStatus extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-live-status");const t=on("fp-live-text"),n=on("fp-live-indicator","fp-color");t.textContent="live",this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.append(n,t),this.addEventListener(a,function(){Kn(e)})}}class FlowplayerDuration extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-duration"),this.setAttribute("aria-hidden","true"),e.on($,n=>{if(0==e.reaper||!n.data)return;t=n.data;const o=qn(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=sn(o)}),e.on(E,()=>{var n,o;0==e.reaper||t.live||(o=this,(n=e).duration&&(o.innerText=sn(n.duration)))})}}class FlowplayerElapsedTime extends FlowplayerComponent{constructor(e){let t;super(e),this.classList.add("fp-elapsed"),this.innerText=sn(0),this.setAttribute("aria-hidden","true"),e.on($,e=>{e.data&&(t=e.data)}),e.on(S,()=>{var n;0!=e.reaper&&(t.live?(n=e,this.innerText=sn(n.currentTime)):function(e,t){t.innerText=sn(e.currentTime)}(e,this))})}}class FlowplayerControlButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-btns","fp-small-switch");const t=wt(e,Te),n=wt(e,ke);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=wt(e,this.classList.contains("fp-left-zone")?Re:Le);r.removeAttribute("tabindex"),o.classList.add("fp-zone-seconds"),this.append(o,r);e.on(R,()=>{o.innerText=""}),e.on(V,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(j,()=>{this.reset_zone()}),this.reset_zone(),this.addEventListener(h,function(t){isNaN(e.duration)||isNaN(e.currentTime)||Ho&e.opt("ui")||e.hasState(et)||!e.hasState(lt)&&!e.hasState(it)||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 FlowplayerErrorView extends FlowplayerComponent{constructor(e){super(e),this.className="fp-error",this.message=document.createElement("p"),this.message.className="error-message",this.errorId=document.createElement("p"),this.errorId.className="error-id",this.errorKey=document.createElement("p"),this.errorKey.className="error-key",this.append(this.errorKey,this.message,this.errorId),this.addEventListener(ne,t=>{if(e.opts.live&&0==e.currentTime&&t.detail.error.flowplayerErrorCode==Nt.PlaybackManifestLoadError)return void(this.message.textContent="stream offline");const n=t.detail.error;this.message.textContent=n.message,this.errorKey.textContent=n.errorKey,console.warn("flowplayer encountered an %s error while loading %s id:%s",n.errorKey,n.config.resource,n.id)})}}class FlowplayerHeaderLeftRight extends FlowplayerComponent{constructor(e,t,...n){super(e),this.className=t;const o=e.createComponents(...n);this.append(...o),"fp-left"!==t&&o.forEach(t=>{t.addEventListener(a,()=>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(_e,we);this.append(...t)}}class FlowplayerMiddleButtons extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-switch"),[Ne,Ae].forEach(t=>{const n=wt(e,t);n.removeAttribute("tabindex"),this.append(n)})}}class FlowplayerVolumeControl extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-volume-control");const t=wt(e,Ce);this.append(t),!n().ios&&this.append(wt(e,fe)),t instanceof FlowplayerIcon&&t.addEventListener(a,function(){e.toggleMute()})}}class FlowplayerHeader extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-header"),this.append(...e.createComponents(me,ye)),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(se,le,ce,ue,de,pe))}}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(Se,Ee,be)),this.setAttribute("tabindex","0"),e.reaper&&e.reaper.set("middle",this),this.handleClick(e),this.handleTouch(e),e.once(J,()=>{this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label")})}handleClick(e){[a,s].forEach(t=>this.addEventListener(t,function(n){if(!(n.defaultPrevented||e.root.classList.contains("is-endscreen")||t===s&&e.root.classList.contains("no-fullscreen")))return n.preventDefault(),e.emit(n.type),!1})),e.on(a,function(t){setTimeout(function(){t.defaultPrevented||e.togglePlay()},0)}),e.on(s,function(t){setTimeout(function(){t.defaultPrevented||e.toggleFullScreen()},0)})}handleTouch(e){let t=!1;this.addEventListener(h,function(t){t.cancelable&&!e.hasState("is-endscreen")&&(t.preventDefault(),e.emit(t.type,{source:t}))}),e.on(h,function(n){setTimeout(function(){if(n.defaultPrevented)return;if(e.ended)return e.togglePlay(!0);const o=e.hasState(qe);t&&clearTimeout(t),(o||e.hasState(it))&&(e.hasState(it)&&(e.setState(it,!1),e.setState(at,!1)),e.togglePlay(),o)||(e.setState(it,!0),e.paused||(t=setTimeout(function(){t=!1,e.setState(it,!1),e.setState(at,!1)},2e3)))},0)})}}class FlowplayerUi extends FlowplayerComponent{constructor(e){super(e),this.classList.add("fp-ui"),this.append(...e.createComponents(he,ve,ae))}}const dr=e=>{let t=!1;e.on(Kt,()=>{t||(e=>{const t=e.customElements.entries();for(var[n,o]of t)if(!bt(e,o))return!0;return!1})(Do)&&(Yt(e,{feature_name:"custom-components",behavior:"used",sample_rate:.1}),t=!0)})},pr=(...e)=>e.reduce((e,t)=>Object.assign(Object.assign({},e),t),{}),fr=(e,t)=>{const n=e.lastIndexOf(t);return~n&&e.splice(n,1),e};class RequestQueue{static of(){return new RequestQueue}static is_empty(e){return 0==e.pending.length}static is_high_water(e){return e.open.length==RequestQueue.MAX_OPEN_REQUESTS}static maybe_spawn_req(e){if(RequestQueue.is_empty(e))return e;if(RequestQueue.is_high_water(e))return e;try{const t=RequestQueue.lpop(e);t&&RequestQueue.request(e,t)}catch(e){}}static increment_failures(e){return e.stats.failures++,e.stats.failures>RequestQueue.MAX_FAILURE_COUNT&&(e.stats.ttl=Date.now()+RequestQueue.REQUEST_TTL_MS),e}static handle_error(e,t){RequestQueue.rm(e,t),RequestQueue.increment_failures(e)}static request(e,[t,n,o]){if(Date.now()<e.stats.ttl)return;const r=new XMLHttpRequest;e.open.push(r),r.timeout=RequestQueue.REQUEST_TIMEOUT_MS,r.ontimeout=function(){RequestQueue.handle_error(e,r)},r.onerror=function(t){RequestQueue.handle_error(e,r)},r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&RequestQueue.rm(e,r),Math.floor(r.status/100)},r.onload=function(){RequestQueue.rm(e,r),e.stats.failures&&e.stats.failures--},r.open(n,t),r.setRequestHeader("Content-Type","text/plain;charset=UTF-8");try{r.send(JSON.stringify(o))}catch(e){}}static rpush(e,...t){return t.forEach(t=>{e.pending.length>=RequestQueue.MAX_PENDING||(e.pending.push(t),RequestQueue.maybe_spawn_req(e))}),e}static lpop(e){return e.pending.shift()}static rm(e,t){return fr(e.open,t),e}constructor(){this.pending=[],this.open=[],this.stats={failures:0,ttl:0}}}RequestQueue.MAX_OPEN_REQUESTS=3,RequestQueue.MAX_PENDING=5,RequestQueue.REQUEST_TIMEOUT_MS=4e3,RequestQueue.REQUEST_TTL_MS=5e3,RequestQueue.MAX_FAILURE_COUNT=3;var hr=RequestQueue.of();const mr=/:([a-zA-Z_]+)/g;class Log{static prepare(e,t){const n=document.createEvent("Event");return n.initEvent(e,!1,!0),n.ns=e,n.data=t,n}static of(e){return new Log(e)}constructor(e){this.emitter=e}info(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.INFO,e))}error(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.ERROR,e))}warn(e){this.emitter.dispatchEvent(Log.prepare(Log.NAMESPACE.WARN,e))}}var yr;Log.NAMESPACE={INFO:"tracker:info",ERROR:"tracker:err",WARN:"tracker:warn"},function(e){e.POST="POST",e.PUT="PUT",e.GET="GET"}(yr||(yr={}));class Tracker{static of(e,t){return new Tracker(e,t)}static ensure_required_keys(e,t){return e.required_keys.filter(e=>!(e in t))}static pluck_valid_keys(e,t){return((e,...t)=>Object.keys(e).filter(e=>~t.indexOf(e)).reduce((t,n)=>pr(t,{[n]:e[n]}),{}))(t,...e.valid_keys)}static merge_metadata(e,t={}){return e.metadata=Tracker.pluck_valid_keys(e,pr(e.metadata,t)),e}static assert_emitter_api(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")}static create_listener(e,t,n){var o;e.listeners.push([t,n]),null===(o=e.emitter)||void 0===o||o.addEventListener(t,n)}constructor(e,t={}){const n=this;if(this.emitter=e,this.url=t.url,this.log=Log.of(this.emitter),this.verb=t.verb,this.metadata=pr({},t.metadata||{}),this.rq=t.rq||hr,this.events=t.events||[],this.required_keys=t.required_keys||[],this.optional_keys=t.optional_keys||[],this.listeners=[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),Tracker.assert_emitter_api(this.emitter),void 0===Tracker.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`);Tracker.TRACKERS.push(this),n.events.forEach(e=>{Tracker.create_listener(this,e,(t={})=>{var o;if(null===(o=this.emitter)||void 0===o?void 0:o.hasState("consent-no-tracking"))return;const r=pr(n.metadata,{event_type:e},t.data||t),i=function(e,t){return e.replace(mr,e=>{const n=e.slice(1,e.length);return n in t?t[n].toString():e})}(n.url,r),a=Tracker.pluck_valid_keys(n,r),s=Tracker.ensure_required_keys(n,a);if(s.length)return n.log.error(`Tracker.validate_metadata() failed for\n Event[${e}]\n missing keys: ${s}\n payload:\n ${JSON.stringify(a,null,2)}`);this.rq&&RequestQueue.rpush(this.rq,[i,this.verb,a])})})}destroy(){this.listeners.forEach(([e,t])=>{var n;return null===(n=this.emitter)||void 0===n?void 0:n.removeEventListener(e,t)}),delete this.rq,delete this.emitter,fr(Tracker.TRACKERS,this)}put(e={}){return Tracker.merge_metadata(this,e),this}}Tracker.TRACKERS=[],Tracker.QUEUE=hr,Tracker.verb=yr;var gr="ping",vr="display",Er="view";const _r=["sitegroup_id","session_id","media_id","site_id","player_id","video_type"],wr=["created","position"],Sr=["player_version","created","source","category","category_id","autoplay","muted","customer_user_id"];const br=100,kr=1e3;function Tr(e,t){return e.duration/1===e.duration&&Object.assign(t,function(e){const t=e/br;return{segment_duration:t,breakpoints:Array(...Array(br)).map(function(e,n){return Math.floor(n*t*kr)/kr})}}(e.duration))}function Nr(e,t,n){if(!t.segment_duration&&!Tr(e,t))return;const o=function(e,t,n){const o=t.last_idx,r=n?99:Ar(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(gr,{position:o})}function Ar(e,t){return Math.min(Math.floor(e.currentTime/t.segment_duration),99)}var Or;const Ir="vod",Lr="live",Rr=[vr,gr,Er];function Cr(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(gr,{position:60*t.ticks}))}(e,t);case"vod":return Nr(e,t,"boolean"==typeof n&&n)}}function Pr(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))))}const Fr=((Or=class Analytics{init(e,t,n){if(!Cn.from_token(e.token||"").is_granted(Cn.permissions.ANALYTICS))return;if(n.analytics)return;const o=n.analytics={ticker:void 0,last_media_id:"",ended:!1,played:!1},r={locked:void 0,ttl:6e3,task:()=>{Cr(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.34.1"},a=Tracker.of(n,{verb:Tracker.verb.POST,url:"https://ptm.flowplayer.com/:video_type/:sitegroup_id/:event_type",events:Rr,required_keys:_r,optional_keys:Sr.concat(wr).slice(0),metadata:i});n.on(U,function(){a&&a.destroy()}),n.on($,function(t){if(!a)return;const r=rn(t,"data.metadata",{});if(!r.media_id&&r.stream_target_id&&(r.media_id=r.stream_target_id),!r.media_id)return o.last_media_id="";if(o.last_media_id===r.media_id)return;o.played=!1,o.last_media_id=r.media_id;const i=rn(e,"analytics",{});a.put(r),a.put(i);const s=rn(e,"metadata.live_start_time",e.live)?Lr:Ir;a.put({video_type:s,source:e.source||go()||""}),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(vr)});let s=0;n.on(N,function(){if(!a)return;if(s||o.played||!o.last_media_id)return;a.put({muted:n.muted});const e=Pr(n);if(e)return s=Promise.resolve(e).then(function(){o.played=!0,n.emit(Er),s=0}).catch(function(){s=0});o.played=!0,n.emit(Er)}),n.on(S,function(){var t;a&&(s||Pr(n)||o.ended||!o.last_media_id||(!e.live&&n.currentTime+.25>=n.duration&&Cr(n,o.ticker,!0),(t=r).locked||(t.locked=setTimeout(function(){return t.task(),function(e){return e.locked=void 0,e}(t)},t.ttl))))}),n.on(R,function(){a&&o.last_media_id&&o.ticker&&"vod"==o.ticker.kind&&function(e,t){Tr(e,t),t.last_idx=Ar(e,t)}(n,o.ticker)}),n.on(L,function(){a&&o.last_media_id&&function(e,t){t.ended||(t.ended=!0,Cr(e,t.ticker))}(n,o)})}}).pluginName="analytics",Or),Mr=function(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)}(Nn(),Fr),Dr=e=>0==e.volume||e.muted?"true":"false";class Default{constructor(e){St(e,re,FlowplayerUi),St(e,Pe,FlowplayerErrorView),St(e,ae,FlowplayerControls),St(e,le,FlowplayerLiveStatus),St(e,de,FlowplayerDuration),St(e,ue,FlowplayerTimelineBar),St(e,ce,FlowplayerElapsedTime),St(e,fe,FlowplayerVolumeBar),St(e,pe,FlowplayerVolumeControl),St(e,se,FlowplayerControlButtons),St(e,he,FlowplayerHeader),St(e,ie,FlowplayerLogo),St(e,ge,FlowplayerHeaderDuration),St(e,me,class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-left",ge)}}),St(e,ye,class extends FlowplayerHeaderLeftRight{constructor(e){super(e,"fp-right fp-togglable",Oe,Ie)}}),St(e,ve,FlowplayerMiddle),St(e,Ee,FlowplayerMiddleZone),St(e,_e,FlowplayerMiddleWait),St(e,we,FlowplayerMiddleButtons),St(e,be,class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-right-zone")}}),St(e,Se,class extends FlowplayerLeftRightZone{constructor(e){super(e,"fp-left-zone")}}),St(e,ke,class extends FlowplayerIcon{constructor(e){super(e,er),this.setAttribute("role","button")}}),St(e,Te,class extends FlowplayerIcon{constructor(e){super(e,tr),this.setAttribute("role","button")}}),St(e,Ne,class extends FlowplayerIcon{constructor(e){super(e,$o),this.setAttribute("role","button")}}),St(e,Ae,class extends FlowplayerIcon{constructor(e){super(e,Zo),this.setAttribute("role","button")}}),St(e,Oe,class extends FullscreenIcon{constructor(e){super(e,Yo)}}),St(e,Ie,class extends FullscreenIcon{constructor(e){super(e,Xo)}}),St(e,Le,class extends FlowplayerIcon{constructor(e){super(e,nr)}}),St(e,Re,class extends FlowplayerIcon{constructor(e){super(e,or)}}),St(e,Ce,class extends FlowplayerIcon{constructor(e){super(e,Jo),this.classList.add("fp-volumebtn"),this.setAttribute("role","switch"),this.setAttribute("aria-checked",Dr(e)),e.on(k,()=>{this.setAttribute("aria-label",e.i18n("core.muted","Muted")),this.setAttribute("aria-checked",Dr(e))})}})}init(e,t,n){var o;zo(e,0,n),jo(e,t,n),o=n,"undefined"!=typeof window&&"ontouchstart"in window&&o.setState(st,!0),o.setState("is-accessibility",!1),dr(n)}}return Default.pluginName="default",Do.extensions.unshift.apply(Do.extensions,[I18n,Mr,Default]),Object.assign(Do,{ui:Wo,i18n:I18n})});
|