astroport/www/LOVELand/A/aris/aris_fichiers/242768475_data/player.js

11 lines
595 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* VimeoPlayer - v3.20.11 - 2020-06-09 - https://player.vimeo.com/NOTICE.txt */
!function(t){"use strict";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,n){return t(n={exports:{}},n.exports),n.exports}var e=i((function(t,i){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.6+9869a4bc
*/
t.exports=function(){function t(t){return"function"==typeof t}var i=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},e=0,r=void 0,o=void 0,u=function(t,n){h[e]=t,h[e+1]=n,2===(e+=2)&&(o?o(v):p())},a="undefined"!=typeof window?window:void 0,s=a||{},c=s.MutationObserver||s.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var h=new Array(1e3);function v(){for(var t=0;t<e;t+=2)(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0;e=0}var p=void 0;function m(t,n){var i=this,e=new this.constructor(g);void 0===e[b]&&O(e);var r=i._;if(r){var o=arguments[r-1];u((function(){return R(r,e,o,i.k)}))}else A(i,e,t,n);return e}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var n=new this(g);return E(n,t),n}p=l?function(){return process.nextTick(v)}:c?function(){var t=0,n=new c(v),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){i.data=t=++t%2}}():f?function(){var t=new MessageChannel;return t.port1.onmessage=v,function(){return t.port2.postMessage(0)}}():void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(r=t.runOnLoop||t.runOnContext)?function(){r(v)}:d()}catch(t){return d()}}():d();var b=Math.random().toString(36).substring(2);function g(){}var y={error:null};function _(t){try{return t.then}catch(t){return y.error=t,y}}function k(n,i,e){i.constructor===n.constructor&&e===m&&i.constructor.resolve===w?function(t,n){1===n._?x(t,n.k):2===n._?S(t,n.k):A(n,void 0,(function(n){return E(t,n)}),(function(n){return S(t,n)}))}(n,i):e===y?(S(n,y.error),y.error=null):void 0===e?x(n,i):t(e)?function(t,n,i){u((function(t){var e=!1,r=function(i,r,o,u){try{i.call(r,(function(i){e||(e=!0,n!==i?E(t,i):x(t,i))}),(function(n){e||(e=!0,S(t,n))}))}catch(t){return t}}(i,n,0,0,t.T);!e&&r&&(e=!0,S(t,r))}),t)}(n,i,e):x(n,i)}function E(t,n){t===n?S(t,new TypeError("You cannot resolve a promise with itself")):function(t){var n=typeof t;return null!==t&&("object"===n||"function"===n)}(n)?k(t,n,_(n)):x(t,n)}function T(t){t.S&&t.S(t.k),M(t)}function x(t,n){void 0===t._&&(t.k=n,t._=1,0!==t.A.length&&u(M,t))}function S(t,n){void 0===t._&&(t._=2,t.k=n,u(T,t))}function A(t,n,i,e){var r=t.A,o=r.length;t.S=null,r[o]=n,r[o+1]=i,r[o+2]=e,0===o&&t._&&u(M,t)}function M(t){var n=t.A,i=t._;if(0!==n.length){for(var e=void 0,r=void 0,o=t.k,u=0;u<n.length;u+=3)e=n[u],r=n[u+i],e?R(i,e,r,o):r(o);t.A.length=0}}function R(n,i,e,r){var o=t(e),u=void 0,a=void 0,s=void 0,c=void 0;if(o){if((u=function(t,n){try{return t(n)}catch(t){return y.error=t,y}}(e,r))===y?(c=!0,a=u.error,u.error=null):s=!0,i===u)return void S(i,new TypeError("A promises callback cannot return that same promise."))}else u=r,s=!0;void 0!==i._||(o&&s?E(i,u):c?S(i,a):1===n?x(i,u):2===n&&S(i,u))}var C=0;function O(t){t[b]=C++,t._=void 0,t.k=void 0,t.A=[]}var I=function(){function t(t,n){this.M=t,this.promise=new t(g),this.promise[b]||O(this.promise),i(n)?(this.length=n.length,this.R=n.length,this.k=new Array(this.length),0===this.length?x(this.promise,this.k):(this.length=this.length||0,this.C(n),0===this.R&&x(this.promise,this.k))):S(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype.C=function(t){for(var n=0;void 0===this._&&n<t.length;n++)this.O(t[n],n)},t.prototype.O=function(t,n){var i=this.M,e=i.resolve;if(e===w){var r=_(t);if(r===m&&void 0!==t._)this.I(t._,n,t.k);else if("function"!=typeof r)this.R--,this.k[n]=t;else if(i===j){var o=new i(g);k(o,t,r),this.D(o,n)}else this.D(new i((function(n){return n(t)})),n)}else this.D(e(t),n)},t.prototype.I=function(t,n,i){var e=this.promise;void 0===e._&&(this.R--,2===t?S(e,i):this.k[n]=i),0===this.R&&x(e,this.k)},t.prototype.D=function(t,n){var i=this;A(t,void 0,(function(t){return i.I(1,n,t)}),(function(t){return i.I(2,n,t)}))},t}(),j=function(){function n(t){this[b]=C++,this.k=this._=void 0,this.A=[],g!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof n?function(t,n){try{n((function(n){E(t,n)}),(function(n){S(t,n)}))}catch(n){S(t,n)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(n){var i=this.constructor;return t(n)?this.then((function(t){return i.resolve(n()).then((function(){return t}))}),(function(t){return i.resolve(n()).then((function(){throw t}))})):this.then(n,n)},n}();return j.prototype.then=m,j.all=function(t){return new I(this,t).promise},j.race=function(t){var n=this;return i(t)?new n((function(i,e){for(var r=t.length,o=0;o<r;o++)n.resolve(t[o]).then(i,e)})):new n((function(t,n){return n(new TypeError("You must pass an array to race."))}))},j.resolve=w,j.reject=function(t){var n=new this(g);return S(n,t),n},j.L=function(t){o=t},j.N=function(t){u=t},j.P=u,j.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var i=t.Promise;if(i){var e=null;try{e=Object.prototype.toString.call(i.resolve())}catch(t){}if("[object Promise]"===e&&!i.cast)return}t.Promise=j},j.Promise=j,j}()})),r=window.Promise||e;if(r.allSettled||(r.allSettled=function(t){return r.all(t.map((function(t){return t.then((function(t){return{status:"fulfilled",value:t}})).catch((function(t){return{status:"rejected",reason:t}}))})))}),function(){for(var t=["webkit","moz"],n=0;n<t.length&&!window.requestAnimationFrame;++n){var i=t[n];window.requestAnimationFrame=window[i+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]}!/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)&&window.requestAnimationFrame&&window.cancelAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,0)},window.cancelAnimationFrame=clearTimeout)}(),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),"undefined"!=typeof DOMTokenList&&!function(){var t=document.createElement("div");return t.classList.toggle("test-class",!1),!t.classList.contains("test-class")}()){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,n){!0!==n?!1!==n?o.call(this,t):this.remove(t):this.add(t)}}"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1;i<arguments.length;i++){var e=arguments[i];if(null!=e)for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r])}return n}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){for(var n=Object(this),i=n.length>>>0,e=arguments[1],r=0;r<i;){var o=n[r];if(t.call(e,o,r,n))return o;r++}}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){for(var n=Object(this),i=n.length>>>0,e=arguments[1],r=0;r<i;){var o=n[r];if(t.call(e,o,r,n))return r;r++}return-1}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,n){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),e=i.length>>>0;if(0===e)return!1;var r=0|n,o=Math.max(r>=0?r:e-Math.abs(r),0);function u(t,n){return t===n||"number"==typeof t&&"number"==typeof n&&isNaN(t)&&isNaN(n)}for(;o<e;){if(u(i[o],t))return!0;o++}return!1}}),String.prototype.includes||(String.prototype.includes=function(t,n){return"number"!=typeof n&&(n=0),!(n+t.length>this.length)&&-1!==this.indexOf(t,n)}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(n){return t[n]}))});var u,a,s,c,l={object:!0,symbol:!0},f=function(t){return null!=t},d=Object.keys,h=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}()?Object.keys:function(t){return d(f(t)?Object(t):t)},v=function(t){if(!f(t))throw new TypeError("Cannot use null or undefined");return t},p=Math.max,m=function(){var t,n=Object.assign;return"function"==typeof n&&(n(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}()?Object.assign:function(t,n){var i,e,r,o=p(arguments.length,2);for(t=Object(v(t)),r=function(e){try{t[e]=n[e]}catch(t){i||(i=t)}},e=1;e<o;++e)n=arguments[e],h(n).forEach(r);if(void 0!==i)throw i;return t},w=Array.prototype.forEach,b=Object.create,g=function(t,n){var i;for(i in t)n[i]=t[i]},y=function(t){var n=b(null);return w.call(arguments,(function(t){f(t)&&g(Object(t),n)})),n},_=function(t){return"function"==typeof t},k="razdwatrzy",E=String.prototype.indexOf,T="function"==typeof k.contains&&!0===k.contains("dwa")&&!1===k.contains("foo")?String.prototype.contains:function(t){return E.call(this,t,arguments[1])>-1},x=i((function(t){(t.exports=function(t,n){var i,e,r,o,u;return arguments.length<2||"string"!=typeof t?(o=n,n=t,t=null):o=arguments[2],null==t?(i=r=!0,e=!1):(i=T.call(t,"c"),e=T.call(t,"e"),r=T.call(t,"w")),u={value:n,configurable:i,enumerable:e,writable:r},o?m(y(o),u):u}).gs=function(t,n,i){var e,r,o,u;return"string"!=typeof t?(o=i,i=n,n=t,t=null):o=arguments[3],null==n?n=void 0:_(n)?null==i?i=void 0:_(i)||(o=i,i=void 0):(o=n,n=i=void 0),null==t?(e=!0,r=!1):(e=T.call(t,"c"),r=T.call(t,"e")),u={get:n,set:i,configurable:e,enumerable:r},o?m(y(o),u):u}})),S=function(t){if(!function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}(t))throw new TypeError(t+" is not a symbol");return t},A=Object.create,M=Object.defineProperties,R=Object.defineProperty,C=Object.prototype,O=A(null);if("function"==typeof Symbol){u=Symbol;try{String(u()),c=!0}catch(t){}}var I=function(){var t=A(null);return function(n){for(var i,e,r=0;t[n+(r||"")];)++r;return t[n+=r||""]=!0,R(C,i="@@"+n,x.gs(null,(function(t){e||(e=!0,R(this,i,x(t)),e=!1)}))),i}}();s=function(t){if(this instanceof s)throw new TypeError("TypeError: Symbol is not a constructor");return a(t)};var j=a=function t(n){var i;if(this instanceof t)throw new TypeError("TypeError: Symbol is not a constructor");return c?u(n):(i=A(s.prototype),n=void 0===n?"":String(n),M(i,{F:x("",n),V:x("",I(n))}))};M(a,{for:x((function(t){return O[t]?O[t]:O[t]=a(String(t))})),keyFor:x((function(t){var n;for(n in S(t),O)if(O[n]===t)return n})),hasInstance:x("",u&&u.hasInstance||a("hasInstance")),isConcatSpreadable:x("",u&&u.isConcatSpreadable||a("isConcatSpreadable")),iterator:x("",u&&u.iterator||a("iterator")),match:x("",u&&u.match||a("match")),replace:x("",u&&u.replace||a("replace")),search:x("",u&&u.search||a("search")),species:x("",u&&u.species||a("species")),split:x("",u&&u.split||a("split")),toPrimitive:x("",u&&u.toPrimitive||a("toPrimitive")),toStringTag:x("",u&&u.toStringTag||a("toStringTag")),unscopables:x("",u&&u.unscopables||a("unscopables"))}),M(s.prototype,{constructor:x(a),toString:x("",(function(){return this.V}))}),M(a.prototype,{toString:x((function(){return"Symbol ("+S(this).F+")"})),valueOf:x((function(){return S(this)}))}),R(a.prototype,a.toPrimitive,x("",(function(){var t=S(this);return"symbol"==typeof t?t:t.toString()}))),R(a.prototype,a.toStringTag,x("c","Symbol")),R(s.prototype,a.toStringTag,x("c",a.prototype[a.toStringTag])),R(s.prototype,a.toPrimitive,x("c",a.prototype[a.toPrimitive]));var D=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(t){return!1}return!!l[typeof Symbol.iterator]&&!!l[typeof Symbol.toPrimitive]&&!!l[typeof Symbol.toStringTag]}()?Symbol:j,L=window.Map||function(){var t,n,i,e=function(){n=[],i=[]},r=function(i){return-1<(t=n.indexOf(i))};return e(),{get size(){return n.length},has:r,clear:e,get:function(t){return i[n.indexOf(t)]},keys:function(){return n.slice()},values:function(){return i.slice()},entries:function(){return n.map((function(t,n){return[t,i[n]]}))},delete:function(e){return r(e)&&n.splice(t,1)&&!!i.splice(t,1)},forEach:function(t,e){var r=this;i.forEach((function(i,o){return t.call(e,i,n[o],r)}))},set:function(e,o){return r(e)?i[t]=o:i[n.push(e)-1]=o,this}}},N=window.WeakMap||function(){var t=Object.defineProperty,n=Date.now()%1e9,i=function(){this.name="__st"+(1e9*Math.random()>>>0)+n+++"__"};return i.prototype.set=function(n,i){if("object"!==U(n)&&"function"!=typeof n)throw new TypeError("Invalid value used as weak map key");var e=n[this.name];return e&&e[0]===n?e[1]=i:t(n,this.name,{value:[n,i],writable:!0}),this},i.prototype.get=function(t){var n;return(n=t[this.name])&&n[0]===t?n[1]:void 0},i.prototype.delete=function(t){var n=t[this.name];return!(!n||n[0]!==t||(n[0]=n[1]=void 0,0))},i.prototype.has=function(t){var n=t[this.name];return!!n&&n[0]===t},i}(),P=window.Array.from,F=[1];"function"==typeof P&&P(F)===F&&(P=!1);var V=P||function(t){return[].slice.call(t,0)};function U(t){return(U="function"==typeof D&&"symbol"==typeof D.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof D&&t.constructor===D&&t!==D.prototype?"symbol":typeof t})(t)}function B(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function H(t,n,i){return n&&B(t.prototype,n),i&&B(t,i),t}function z(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function q(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function W(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?q(Object(i),!0).forEach((function(n){z(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function G(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}function $(t){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function K(t,n){return(K=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function J(t,n,i){return(J=Y()?Reflect.construct:function(t,n,i){var e=[null];e.push.apply(e,n);var r=new(Function.bind.apply(t,e));return i&&K(r,i.prototype),r}).apply(null,arguments)}function X(t){var n="function"==typeof L?new L:void 0;return(X=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,i)}function i(){return J(t,arguments,$(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),K(i,t)})(t)}function Z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Q(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(D.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],e=!0,r=!1,o=void 0;try{for(var u,a=t[D.iterator]();!(e=(u=a.next()).done)&&(i.push(u.value),!n||i.length!==n);e=!0);}catch(t){r=!0,o=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw o}}return i}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function tt(t){return function(t){if(Array.isArray(t)){for(var n=0,i=new Array(t.length);n<t.length;n++)i[n]=t[n];return i}}(t)||function(t){if(D.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return V(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var nt=i((function(t,n){t.exports=function(t){var n={};return(t=t||{}).prependOn=function(n,i){return t.on(n,i,!0)},t.eventNames=function(){return Object.keys(n)},t.on=function(i,e,r){for(var o=0,u=(i=[].concat(i)).length;o<u;o++){var a=i[o];if(!a)throw new Error("Tried to listen for an undefined event.");n[a]||(n[a]=[]),r?n[a].unshift(e):n[a].push(e)}return t},t.once=function(n,i,e){function r(){i.apply(t.off(n,r),arguments)}return r.handler=i,t.on(n,r,e)},t.off=function(i,e){if(!i)return n={},t;for(var r=0,o=(i=[].concat(i)).length;r<o;r++){var u=i[r];if(!u)throw new Error("Tried to remove an undefined event.");if(u in n)if(e){var a=n[u].indexOf(e);if(-1===a)for(var s=0,c=n[u].length;s<c;s++)if(n[u][s].handler===e){a=r;break}if(-1===a)return t;n[u].splice(a,1)}else delete n[u]}return t},t.fire=function(i){if(!i)throw new Error("Tried to fire an undefined event.");if(i in n)for(var e=n[i].slice(0),r=0,o=e.length;r<o;r++)if(e[r].apply(t,e.slice.call(arguments,1)),t.U){delete t.U;break}return t},t.halt=function(){return t.U=!0,t},t}}));function it(t){return function(n){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return e.forEach((function(i){for(var e in i){var r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,Object.assign(r,t))}})),n}}var et=it({enumerable:!1,configurable:!0,writeable:!1}),rt=it({enumerable:!1,configurable:!1,writeable:!1}),ot=it({enumerable:!0,configurable:!0,writeable:!1}),ut="",at={defer:!0,async:!0};function st(t,n){n=Object.assign(at,n);var i=window.vpimport__=window.vpimport__||{cache:{}};if(i.cache[t])return i.cache[t].H;var e=new r((function(e,r){var o=document.getElementsByTagName("head")[0],u=document.createElement("script");u.src=ut+t,u.defer=n.defer,u.async=n.async,u.onreadystatechange=u.onload=function(){var n=Object.keys(i).filter((function(t){return"cache"!==t}))[0];i.cache[t].W=i[n],delete i[n],e(i.cache[t].W),o.removeChild(u)},u.onerror=function(n){r(n),delete i.cache[t],o.removeChild(u)},o.appendChild(u)}));return i.cache[t]={H:e},e}function ct(t){for(var n=function(t){return t&&"object"===U(t)},i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return e.reduce((function(t,i){return Object.keys(i||{}).forEach((function(e){var r=t[e],o=i[e];r&&void 0===o||(Array.isArray(o)?t[e]=(r||[]).concat(o):n(o)?t[e]=ct({},r,o):t[e]=o)})),t}),t)}function lt(){var t,n,i=new r((function(i,e){t=i,n=e}));return i.resolve=t,i.reject=n,i}function ft(t,n){for(var i=t,e=0;e<n.length;e++)if(n.start(e)<=t&&n.end(e)>=t){i=n.end(e);break}return i-t}function dt(t,n){if(!n||!n.length)return 0;if(1===n.length&&n.end(0)-n.start(0)<1e-6)return 0;for(var i=0,e=n.length-1;e>=0&&n.end(e)>t;--e)i+=n.end(e)-Math.max(n.start(e),t);return i}function ht(t){return"string"!=typeof t?{}:t.replace("?","").split("&").reduce((function(t,n){if(n.length>0){var i=Q(n.split("="),2),e=i[0],r=i[1];t[e]=decodeURIComponent(r)}return t}),{})}function vt(t){var n=document.createElement("a");return n.href=t,n}function pt(t,n){var i=function(t){if("object"!==U(t))return"";var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n.length?n.join("&"):""}(n);return"".concat(t).concat(i?"?".concat(i):"")}function mt(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}function wt(t){return t}var bt=Math.max;function gt(t,n,i){return n=bt(void 0===n?t.length-1:n,0),function(){for(var e=arguments,r=-1,o=bt(e.length-n,0),u=Array(o);++r<o;)u[r]=e[n+r];r=-1;for(var a=Array(n+1);++r<n;)a[r]=e[r];return a[n]=i(u),mt(t,this,a)}}function yt(t){return function(){return t}}var _t="object"==("undefined"==typeof global?"undefined":U(global))&&global&&global.Object===Object&&global,kt="object"==("undefined"==typeof self?"undefined":U(self))&&self&&self.Object===Object&&self,Et=_t||kt||Function("return this")(),Tt=Et.Symbol,xt=Object.prototype,St=xt.hasOwnProperty,At=xt.toString,Mt=Tt?Tt.toStringTag:void 0,Rt=Object.prototype.toString,Ct=Tt?Tt.toStringTag:void 0;function Ot(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ct&&Ct in Object(t)?function(t){var n=St.call(t,Mt),i=t[Mt];try{t[Mt]=void 0;var e=!0}catch(t){}var r=At.call(t);return e&&(n?t[Mt]=i:delete t[Mt]),r}(t):function(t){return Rt.call(t)}(t)}function It(t){var n=U(t);return null!=t&&("object"==n||"function"==n)}function jt(t){if(!It(t))return!1;var n=Ot(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var Dt=Et["G"],Lt=function(){var t=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Nt=Function.prototype.toString;function Pt(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ft=/^\[object .+?Constructor\]$/,Vt=Function.prototype,Ut=Object.prototype,Bt=Vt.toString,Ht=Ut.hasOwnProperty,zt=RegExp("^"+Bt.call(Ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qt(t,n){var i=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!It(t)||function(t){return!!Lt&&Lt in t}(t))&&(jt(t)?zt:Ft).test(Pt(t))}(i)?i:void 0}var Wt=function(){try{var t=qt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Gt=Wt?function(t,n){return Wt(t,"toString",{configurable:!0,enumerable:!1,value:yt(n),writable:!0})}:wt,$t=Date.now,Kt=function(t){var n=0,i=0;return function(){var e=$t(),r=16-(e-i);if(i=e,r>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}(Gt);function Yt(t,n){return Kt(gt(t,n,wt),t+"")}function Jt(t,n){return t===n||t!=t&&n!=n}function Xt(t,n){for(var i=t.length;i--;)if(Jt(t[i][0],n))return i;return-1}var Zt=Array.prototype.splice;function Qt(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var e=t[n];this.set(e[0],e[1])}}Qt.prototype.clear=function(){this.$=[],this.size=0},Qt.prototype.delete=function(t){var n=this.$,i=Xt(n,t);return!(i<0||(i==n.length-1?n.pop():Zt.call(n,i,1),--this.size,0))},Qt.prototype.get=function(t){var n=this.$,i=Xt(n,t);return i<0?void 0:n[i][1]},Qt.prototype.has=function(t){return Xt(this.$,t)>-1},Qt.prototype.set=function(t,n){var i=this.$,e=Xt(i,t);return e<0?(++this.size,i.push([t,n])):i[e][1]=n,this};var tn=qt(Et,"Map"),nn=qt(Object,"create"),en=Object.prototype.hasOwnProperty,rn=Object.prototype.hasOwnProperty;function on(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var e=t[n];this.set(e[0],e[1])}}function un(t,n){var i=t.$;return function(t){var n=U(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}(n)?i["string"==typeof n?"string":"hash"]:i.map}function an(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var e=t[n];this.set(e[0],e[1])}}function sn(t){var n=this.$=new Qt(t);this.size=n.size}function cn(t,n,i){"__proto__"==n&&Wt?Wt(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}function ln(t,n,i){(void 0===i||Jt(t[n],i))&&(void 0!==i||n in t)||cn(t,n,i)}on.prototype.clear=function(){this.$=nn?nn(null):{},this.size=0},on.prototype.delete=function(t){var n=this.has(t)&&delete this.$[t];return this.size-=n?1:0,n},on.prototype.get=function(t){var n=this.$;if(nn){var i=n[t];return"__lodash_hash_undefined__"===i?void 0:i}return en.call(n,t)?n[t]:void 0},on.prototype.has=function(t){var n=this.$;return nn?void 0!==n[t]:rn.call(n,t)},on.prototype.set=function(t,n){var i=this.$;return this.size+=this.has(t)?0:1,i[t]=nn&&void 0===n?"__lodash_hash_undefined__":n,this},an.prototype.clear=function(){this.size=0,this.$={hash:new on,map:new(tn||Qt),string:new on}},an.prototype.delete=function(t){var n=un(this,t).delete(t);return this.size-=n?1:0,n},an.prototype.get=function(t){return un(this,t).get(t)},an.prototype.has=function(t){return un(this,t).has(t)},an.prototype.set=function(t,n){var i=un(this,t),e=i.size;return i.set(t,n),this.size+=i.size==e?0:1,this},sn.prototype.clear=function(){this.$=new Qt,this.size=0},sn.prototype.delete=function(t){var n=this.$,i=n.delete(t);return this.size=n.size,i},sn.prototype.get=function(t){return this.$.get(t)},sn.prototype.has=function(t){return this.$.has(t)},sn.prototype.set=function(t,n){var i=this.$;if(i instanceof Qt){var e=i.$;if(!tn||e.length<199)return e.push([t,n]),this.size=++i.size,this;i=this.$=new an(e)}return i.set(t,n),this.size=i.size,this};var fn=function(t,n,i){for(var e=-1,r=Object(t),o=i(t),u=o.length;u--;){var a=o[++e];if(!1===n(r[a],a,r))break}return t},dn="object"==(void 0===t?"undefined":U(t))&&t&&!t.nodeType&&t,hn=dn&&"object"==("undefined"==typeof module?"undefined":U(module))&&module&&!module.nodeType&&module,vn=hn&&hn.exports===dn?Et.Buffer:void 0,pn=vn?vn.allocUnsafe:void 0;function mn(t,n){if(n)return t.slice();var i=t.length,e=pn?pn(i):new t.constructor(i);return t.copy(e),e}var wn=Et.Uint8Array;function bn(t){var n=new t.constructor(t.byteLength);return new wn(n).set(new wn(t)),n}function gn(t,n){var i=n?bn(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function yn(t,n){var i=-1,e=t.length;for(n||(n=Array(e));++i<e;)n[i]=t[i];return n}var _n=Object.create,kn=function(){function t(){}return function(n){if(!It(n))return{};if(_n)return _n(n);t.prototype=n;var i=new t;return t.prototype=void 0,i}}();function En(t,n){return function(i){return t(n(i))}}var Tn=En(Object.getPrototypeOf,Object),xn=Object.prototype;function Sn(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||xn)}function An(t){return"function"!=typeof t.constructor||Sn(t)?{}:kn(Tn(t))}function Mn(t){return null!=t&&"object"==U(t)}function Rn(t){return Mn(t)&&"[object Arguments]"==Ot(t)}var Cn=Object.prototype,On=Cn.hasOwnProperty,In=Cn.propertyIsEnumerable,jn=Rn(function(){return arguments}())?Rn:function(t){return Mn(t)&&On.call(t,"callee")&&!In.call(t,"callee")},Dn=Array.isArray;function Ln(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Nn(t){return null!=t&&Ln(t.length)&&!jt(t)}var Pn="object"==(void 0===t?"undefined":U(t))&&t&&!t.nodeType&&t,Fn=Pn&&"object"==("undefined"==typeof module?"undefined":U(module))&&module&&!module.nodeType&&module,Vn=Fn&&Fn.exports===Pn?Et.Buffer:void 0,Un=(Vn?Vn.isBuffer:void 0)||function(){return!1},Bn=Function.prototype,Hn=Object.prototype,zn=Bn.toString,qn=Hn.hasOwnProperty,Wn=zn.call(Object);function Gn(t){if(!Mn(t)||"[object Object]"!=Ot(t))return!1;var n=Tn(t);if(null===n)return!0;var i=qn.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&zn.call(i)==Wn}var $n={};function Kn(t){return function(n){return t(n)}}$n["[object Float32Array]"]=$n["[object Float64Array]"]=$n["[object Int8Array]"]=$n["[object Int16Array]"]=$n["[object Int32Array]"]=$n["[object Uint8Array]"]=$n["[object Uint8ClampedArray]"]=$n["[object Uint16Array]"]=$n["[object Uint32Array]"]=!0,$n["[object Arguments]"]=$n["[object Array]"]=$n["[object ArrayBuffer]"]=$n["[object Boolean]"]=$n["[object DataView]"]=$n["[object Date]"]=$n["[object Error]"]=$n["[object Function]"]=$n["[object Map]"]=$n["[object Number]"]=$n["[object Object]"]=$n["[object RegExp]"]=$n["[object Set]"]=$n["[object String]"]=$n["[object WeakMap]"]=!1;var Yn="object"==(void 0===t?"undefined":U(t))&&t&&!t.nodeType&&t,Jn=Yn&&"object"==("undefined"==typeof module?"undefined":U(module))&&module&&!module.nodeType&&module,Xn=Jn&&Jn.exports===Yn&&_t.process,Zn=function(){try{return Jn&&Jn.require&&Jn.require("util").types||Xn&&Xn.binding&&Xn.binding("util")}catch(t){}}(),Qn=Zn&&Zn.isTypedArray,ti=Qn?Kn(Qn):function(t){return Mn(t)&&Ln(t.length)&&!!$n[Ot(t)]};function ni(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var ii=Object.prototype.hasOwnProperty;function ei(t,n,i){var e=t[n];ii.call(t,n)&&Jt(e,i)&&(void 0!==i||n in t)||cn(t,n,i)}function ri(t,n,i,e){var r=!i;i||(i={});for(var o=-1,u=n.length;++o<u;){var a=n[o],s=e?e(i[a],t[a],a,i,t):void 0;void 0===s&&(s=t[a]),r?cn(i,a,s):ei(i,a,s)}return i}var oi=/^(?:0|[1-9]\d*)$/;function ui(t,n){var i=U(t);return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&oi.test(t))&&t>-1&&t%1==0&&t<n}var ai=Object.prototype.hasOwnProperty;function si(t,n){var i=Dn(t),e=!i&&jn(t),r=!i&&!e&&Un(t),o=!i&&!e&&!r&&ti(t),u=i||e||r||o,a=u?function(t,n){for(var i=-1,e=Array(t);++i<t;)e[i]=n(i);return e}(t.length,String):[],s=a.length;for(var c in t)!n&&!ai.call(t,c)||u&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ui(c,s))||a.push(c);return a}var ci=Object.prototype.hasOwnProperty;function li(t){return Nn(t)?si(t,!0):function(t){if(!It(t))return function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}(t);var n=Sn(t),i=[];for(var e in t)("constructor"!=e||!n&&ci.call(t,e))&&i.push(e);return i}(t)}function fi(t,n,i,e,r){t!==n&&fn(n,(function(o,u){if(r||(r=new sn),It(o))!function(t,n,i,e,r,o,u){var a=ni(t,i),s=ni(n,i),c=u.get(s);if(c)ln(t,i,c);else{var l=o?o(a,s,i+"",t,n,u):void 0,f=void 0===l;if(f){var d=Dn(s),h=!d&&Un(s),v=!d&&!h&&ti(s);l=s,d||h||v?Dn(a)?l=a:function(t){return Mn(t)&&Nn(t)}(a)?l=yn(a):h?(f=!1,l=mn(s,!0)):v?(f=!1,l=gn(s,!0)):l=[]:Gn(s)||jn(s)?(l=a,jn(a)?l=function(t){return ri(t,li(t))}(a):It(a)&&!jt(a)||(l=An(s))):f=!1}f&&(u.set(s,l),r(l,s,e,o,u),u.delete(s)),ln(t,i,l)}}(t,n,u,i,fi,e,r);else{var a=e?e(ni(t,u),o,u+"",t,n,r):void 0;void 0===a&&(a=o),ln(t,u,a)}}),li)}function di(t,n,i,e,r,o){return It(t)&&It(n)&&(o.set(n,t),fi(t,n,void 0,di,o),o.delete(n)),t}function hi(t){return Yt((function(n,i){var e=-1,r=i.length,o=r>1?i[r-1]:void 0,u=r>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,u&&function(t,n,i){if(!It(i))return!1;var e=U(n);return!!("number"==e?Nn(i)&&ui(n,i.length):"string"==e&&n in i)&&Jt(i[n],t)}(i[0],i[1],u)&&(o=r<3?void 0:o,r=1),n=Object(n);++e<r;){var a=i[e];a&&t(n,a,e,o)}return n}))}var vi=hi((function(t,n,i,e){fi(t,n,i,e)})),pi=Yt((function(t){return t.push(void 0,di),mt(vi,void 0,t)})),mi=function(){function t(t){this.K=!1,this.Y=!1,this.J=t,nt(this)}H(t,null,[{key:"displayName",get:function(){return"ExternalDisplay"}},{key:"supported",get:function(){return!1}},{key:"supportedVideoTypes",get:function(){return[]}}]);var n=t.prototype;return n.showPicker=function(){},n.getFile=function(){var t=this.constructor.displayName.replace("ExternalDisplay","");if(this.J.externalDisplayFiles[t])return this.J.externalDisplayFiles[t];var n=this.constructor.supportedVideoTypes,i=this.J.files.filter((function(t){return-1!==n.indexOf(t.mime)})).sort((function(t,i){return t.mime===i.mime?t.priority-i.priority:n.indexOf(t.mime)-n.indexOf(i.mime)}));if(!i.length)throw new Error("No files available for ".concat(this.constructor.displayName," external display."));return i[0]},H(t,[{key:"active",get:function(){return this.Y}},{key:"available",get:function(){return this.K}},{key:"element",get:function(){return document.createElement("div")}}]),t}(),wi={ABORT:"abort",CAN_PLAY:"canplay",CAN_PLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting",WEBKIT_BEGIN_FULLSCREEN:"webkitbeginfullscreen",WEBKIT_END_FULLSCREEN:"webkitendfullscreen",WEBKIT_PRESENTATION_MODE_CHANGED:"webkitpresentationmodechanged"},bi={AVAILABLE:"externaldisplayavailable",UNAVAILABLE:"externaldisplayunavailable",ACTIVATED:"externaldisplayactivated",DEACTIVATED:"externaldisplaydeactivated"},gi={AIRPLAY_AVAILABLE:"available",AIRPLAY_UNAVAILABLE:"unavailable",AIRPLAY_ACTIVATED:"activated",AIRPLAY_DEACTIVATED:"deactivated"},yi={SCANNER_CHANGE:"scannerchange",SCANNER_ERROR:"scannererror",FILE_ERROR:"fileerror",FILE_SRC_UPDATE:"filesrcupdate",DOWNLOAD_START:"downloadstart",DOWNLOAD_END:"downloadend",DOWNLOAD_ERROR:"downloaderror",DOWNLOAD_TIMEOUT:"downloadtimeout",DRM_AUTH_FAILURE:"drmauthfailure",DRM_AUTH_SUCCESS:"drmauthsuccess",DRM_FAILURE:"drmfailure",DRM_OUTPUT_RESTRICTED:"drmoutputrestricted",EME_UNSUPPORTED:"emeunsupported",CURRENT_FILE_CHANGE:"currentfilechange",MEDIA_URL_EXPIRED:"mediaurlexpired",MEDIA_URL_BAD_REQUEST:"mediaurlbadrequest",STREAM_CHANGE:"streamchange",STREAM_CHANGE_START:"streamchangestart",STREAM_BUFFER_START:"streambufferstart",STREAM_BUFFER_END:"streambufferend",DROPPED_FRAMES:"droppedframes",BANDWIDTH:"bandwidth",STREAM_TARGET_CHANGE:"streamtargetchange",PRESENTATION_MODE_CHANGE:"presentationmodechange",CUE_POINT:"cuepoint",BUFFER_OCCUPANCY:"bufferoccupancy",MANIFEST_TIMEOUT:"manifesttimeout",MANIFEST_LOADED:"manifestloaded",STREAMS_LOADED:"streamsloaded",TEXT_SRC_UPDATE:"texttracksrcupdate",TEXT_TRACKS_AVAILABLE:"texttracksavailable",AV_DURATION_MISMATCH:"avdurationmismatch",BUFFER_STARTED:"bufferstarted",BUFFER_ENDED:"bufferended",QUOTA_EXCEEDED_ERROR:"quotaexceedederror",CHAPTER_CUES_UPDATED:"chaptercuesupdated",APPEND_BUFFER_END:"appendbufferend"},_i={STREAM_ONLINE:"livestreamonline",STREAM_OFFLINE:"livestreamoffline"},ki={CAMERA_UPDATE:"cameraupdate",MOTION_START:"motionstart",MOTION_END:"motionend",SPATIAL_UNSUPPORTED:"spatialunsupported",WEBVR_ENTER:"entervr",WEBVR_EXIT:"exitvr",WEBVR_HARDWARE_AVAILABLE:"webvrhardwareavailable"},Ei={MEDIASESSION_PLAY:"mediasessionplay",MEDIASESSION_PAUSE:"mediasessionpause",MEDIASESSION_SEEK_FORWARD:"mediasessionseekforward",MEDIASESSION_SEEK_BACKWARD:"mediasessionseekbackward"},Ti={BRAIN_ML_MODEL_ERR:"brainmlmodelerr",BRAIN_ML_MODEL_NET_ERR:"brainmlmodelresperr",BRAIN_ML_MODEL_TIMEOUT:"brainmlmodeltimeout",BRAIN_ML_SWITCH_TO_SKYFIRE:"brainmlmodelswitchtoskyfire",BRAIN_ML_MODEL_INPUTS:"brainmlmodelinputs"},xi=Object.assign({},wi,bi,gi,yi,ki,_i,Ei,Ti),AirPlayExternalDisplay=function(t){function AirPlayExternalDisplay(n){var i;return(i=t.call(this,n)||this).X=document.createElement("video"),i.X.setAttribute("data-airplay",""),i.X.setAttribute("x-webkit-airplay","allow"),i.addVideoEventListeners(),i}G(AirPlayExternalDisplay,t),H(AirPlayExternalDisplay,null,[{key:"displayName",get:function(){return"AirPlayExternalDisplay"}},{key:"supported",get:function(){return"WebKitPlaybackTargetAvailabilityEvent"in window}},{key:"supportedVideoTypes",get:function(){return["application/vnd.apple.mpegurl","video/mp4"]}}]);var n=AirPlayExternalDisplay.prototype;return n.addVideoEventListeners=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.X;n.addEventListener(wi.LOADED_METADATA,(function(n){t.fire(wi.LOADED_METADATA,n)})),n.addEventListener("webkitplaybacktargetavailabilitychanged",(function(n){switch(n.availability){case"available":t.K||(t.K=!0,t.fire(gi.AIRPLAY_AVAILABLE));break;case"not-available":t.K&&(t.K=!1,t.fire(gi.AIRPLAY_UNAVAILABLE))}})),n.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",(function(n){if(n.target.webkitCurrentPlaybackTargetIsWireless)return t.Y=!0,void t.fire(gi.AIRPLAY_ACTIVATED);t.Y=!1,t.fire(gi.AIRPLAY_DEACTIVATED)}))},n.showPicker=function(){var t=this;this.X.webkitShowPlaybackTargetPicker(),this.loadMetadata().then((function(){return t.X.webkitShowPlaybackTargetPicker()})).catch((function(){}))},n.loadMetadata=function(){var t=this;return this.X.readyState>=1?r.resolve():new r((function(n,i){t.X.addEventListener(wi.LOADED_METADATA,(function(){n()})),t.X.src=t.getFile().src}))},H(AirPlayExternalDisplay,[{key:"element",get:function(){return this.X},set:function(t){if(!(t instanceof HTMLVideoElement))throw new TypeError("The element for AirPlay must be a <video>.");t!==this.X&&(this.addVideoEventListeners(t),this.X=t,this.X.setAttribute("x-webkit-airplay","allow"))}}]),AirPlayExternalDisplay}(mi),Si=navigator.userAgent.toLowerCase();function Ai(t){t=t.toLowerCase();var n=new RegExp(t).test(Si);return"safari"===t?n&&new RegExp("version").test(Si):n}function Mi(t){var n=document.createElement("div"),i=t.charAt(0).toUpperCase()+t.slice(1),e=(t+" "+["Webkit","Moz","O","ms"].join(i+" ")+i).split(" ");for(var r in e){var o=e[r];if(void 0!==n.style[o])return o}return t}var Ri=!!Ai("android")&&(parseFloat(Si.replace(/^.* android (\d+)\.(\d+).*$/,"$1.$2"))||!0),Ci=window.devicePixelRatio||1,Oi=!(!Ai("windows phone")&&!Ai("iemobile"))&&(parseFloat(Si.replace(/^.* windows phone (os )?(\d+)\.(\d+).*$/,"$2.$3"))||!0),Ii=!!Ai("msie")&&parseFloat(Si.replace(/^.*msie (\d+).*$/,"$1")),ji=!!Ai("trident")&&parseFloat(Si.replace(/^.*trident\/(\d+)\.(\d+).*$/,"$1.$2"))+4,Di=!!(Ai("ipad;")||Ai("iphone;")||Ai("ipod touch;"))&&parseFloat(Si.replace(/^.* os (\d+)_(\d+).*$/,"$1.$2")),Li=Ai("opera")||Ai("opr");function Ni(){if(!Ai("safari"))return[];var t=Si.split(" ").find((function(t){return/version\//.test(t)}));return t?t.replace("version/","").split(".").map((function(t){return parseInt(t,10)})):[]}var Pi=Ai("safari")&&Ai("apple")&&!Ai("chrome")&&!Ai("android")&&Ni()[0]>=11,Fi={airPlay:"WebKitPlaybackTargetAvailabilityEvent"in window,android:Ri,hasAutoplayPolicy:Ri||Di||Pi||function(){if(!Ai("chrome"))return[];var t=Si.split(" ").find((function(t){return Di?/CriOS\//.test(t):/chrome\//.test(t)}));return t?t.replace("chrome/","").split(".").map((function(t){return parseInt(t,10)})):[]}()[0]>=66,iOS:Di,mobileAndroid:Ri&&Ai("mobile"),browser:{bb10:Ai("bb10"),chrome:Ai("chrome"),firefox:Ai("firefox"),ie:Ii||ji,edge:Ai("edge"),opera:Li,safari:Ai("safari")&&Ai("apple")&&!Ai("chrome")&&!Ai("android")},devicePixelRatio:Ci,iPhone:Ai("iphone;")||Ai("ipod touch;")||Ai("ipod;"),iPad:Ai("ipad;"),iPadNonRetina:Ai("ipad;")&&Ci<2,mac:Ai("mac os"),pointerEvents:window.navigator.pointerEnabled||window.navigator.msPointerEnabled||!1,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||Ai("windows phone")||window.navigator.maxTouchPoints>1||window.navigator.msMaxTouchPoints||!1,transformProperty:Mi("transform"),transitionProperty:Mi("transition"),webp:function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),windowsPhone:Oi},Vi=/mac os x 10_13/.test(Si),Ui=Fi.iOS&&Fi.iOS>=11,Bi=Fi.iPhone&&812===window.screen.availHeight&&375===window.screen.availWidth,Hi=Fi.iPhone&&896===window.screen.availHeight&&414===window.screen.availWidth,zi=Fi.iPad&&1112===window.screen.availWidth&&834===window.screen.availHeight,qi=Fi.iPad&&834===window.screen.availWidth&&1194===window.screen.availHeight,Wi=Fi.iPad&&1024===window.screen.availWidth&&1366===window.screen.availHeight,Gi=Bi||Hi||zi||qi||Wi;function $i(){return!!(Pi&&Vi||Pi&&Ui)||"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="hvc1"')}function Ki(){return!(Fi.iOS||Fi.iPad||Fi.browser.ie)&&(!Ai("safari")||Ni()[0]>11||11===Ni()[0]&&(Ni()[2]>1||Ni()[1]>0))}Fi.hevc=$i(),Fi.hdr=Pi&&Ui&&Gi,Fi.vp9hdr=(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(color-gamut: rec2020)").matches)&&screen.colorDepth>=48&&(MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.01"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.01"')),Fi.av1="undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="av01.0.31M.08.0.110.01.01.01.0"'),Fi.webvr=!!(window.navigator&&"getVRDisplays"in window.navigator),Fi.webxr=!!(window.navigator&&"xr"in window.navigator&&"supportsSession"in window.navigator.xr),Fi.spatialPlayback=Ki(),Fi.spatialHEVC=!Fi.browser.safari&&Ki()&&$i(),Fi.stereoscopic=Fi.spatialPlayback&&Fi.mobileAndroid;var Yi=/Firefox/.test(navigator.userAgent),Ji=/i(Phone|Pad|Pod touch);/.test(navigator.userAgent),Xi=/Android/.test(navigator.userAgent),Zi={firefox:Yi,iOS:Ji,android:Xi,androidMobile:Xi&&/mobile/.test(navigator.userAgent.toLowerCase()),chrome:function(){var t=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\./);return!!t&&{major:t[1],minor:t[2]}}()};function Qi(t,n){var i,e=0;return z(i={},D.iterator,(function(){return this})),z(i,"next",(function(){return e<t.length?{done:!1,value:n?[t[e],n[e++]]:t[e++]}:{done:!0}})),i}var te=function(t){for(var n=0,i=this.length;n<i;n++)if(this[n].id==="".concat(t))return this[n];return null};function ne(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.item=function(t){return this[t]},t.getTrackById=te,t}function ie(){return void 0!==window.performance&&"function"==typeof window.performance.now?window.performance.now():Date.now()}function ee(t){return ie()-t}function re(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^(16*Math.random()>>t)/4).toString(16)}))}function oe(t){for(var n=window.atob(t),i=n.length,e=new Uint8Array(i),r=0;r<i;r++)e[r]=n.charCodeAt(r);return e}function ue(t){return oe(t).buffer}function ae(t,n,i,e){var r=0,o=0,u=t,a=n,s=i/e;return u/a>=s?(o=a,r=(s*a).toFixed(2)):(r=u,o=(u/s).toFixed(2)),{width:r,height:o,left:Math.max((u-r)/2,0),top:Math.max((a-o)/2,0)}}function se(t){var n=[document.fullscreenElement,document.webkitFullscreenElement,document.webkitCurrentFullScreenElement,document.mozFullScreenElement,document.msFullscreenElement].find((function(t){return void 0!==t}));return void 0!==n?!!n:t.webkitDisplayingFullscreen}function ce(t,n){return["".concat(t,';codecs="').concat(n,'"'),"".concat(t,';codecs="').concat("avc1.42E01E,mp4a.40.2",'"')].find(MediaSource.isTypeSupported)||t}function le(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(t=parseFloat(t),isNaN(t))return 0;var i=Math.pow(10,n);return Math.round(t*i)/i}function fe(t,n){return t&&t.tests&&t.tests[n]?t.tests[n]:null}function de(t){return t&&"ML"===t.displayName}var TelecineError=function(t,n){this.name=t,this.message=n,Object.freeze(this)},he=new N,ve=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=parseFloat(t);if(isNaN(i))throw new TypeError("Time must be a number.");if(i<0)throw new TypeError("Time must be a positive number.");this.time=t,this.data=n,this.id=re();try{var e="undefined"==typeof VTTCue?TextTrackCue:VTTCue;this.vttCue=new e(t,t+.25,JSON.stringify(n)),this.vttCue.id=this.id}catch(t){throw new TelecineError("CuePointsNotSupported","Cue points are not supported in this browser.")}he.set(this.vttCue,this),Object.freeze(this)}return t.fromVTTCue=function(n){if(he.has(n))return he.get(n);var i={};try{i=JSON.parse(n.text)}catch(t){}return new t(n.startTime,i)},t}();function pe(t,n,i){var e;try{document.removeChild({})}catch(r){e=Object.create(Object.getPrototypeOf(r),{name:{value:n,configurable:!0,writable:!0},code:{value:t,configurable:!0,writable:!0},message:{value:i,configurable:!0,writable:!0},toString:{value:function(){return"".concat(n,": DOM Exception ").concat(t)},configurable:!0,writable:!0}})}return Object.freeze(e)}var me=function(t,n){if(!t||void 0===t[n])throw pe(1,"INDEX_SIZE_ERR");return t[n]};function we(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.freeze(z({get length(){return t.length},start:function(n){return me(t,n)},end:function(t){return me(n,t)}},D.iterator,(function(){return Qi(t,n)})))}we.from=function(t){if(!(t instanceof TimeRanges))throw new TypeError("Can only create a TelecineTimeRange from a TimeRanges object.");for(var n=[],i=[],e=0,r=t.length;e<r;e++)n.push(t.start(e)),i.push(t.end(e));return we(n,i)};var be=document.createElement("video"),ge={"application/vnd.apple.mpegurl":"application/vnd.apple.mpegurl","video/mp4":'video/mp4; codecs="avc1.64001E"',"video/webm":'video/webm; codecs="vp8, vorbis"',"video/x-flv":'video/x-flv; codecs="vp6"'},ye=function(){var t="undefined"==typeof TextTrack?{}:TextTrack;return{disabled:"DISABLED"in t?t.DISABLED:"disabled",hidden:"HIDDEN"in t?t.HIDDEN:"hidden",showing:"SHOWING"in t?t.SHOWING:"showing"}}(),_e=function(){var t=document.createElement("track");return"track"in t&&"oncuechange"in t.track}(),ke=new N,Ee=function(){function t(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.Z=t,this.tt=i,this.nt=null,this.it=null,this.et=[],nt(this),this.on("play",(function(){return n.rt()}));var e=t.querySelector("video");e||((e=document.createElement("video")).preload="none",this.Z.appendChild(e)),e.setAttribute("tabindex","-1"),this.J=e,i.playRequest&&(this.ot=i.playRequest,this.ot.video=e),i.htmlScanner&&i.htmlScanner.controls&&(this.J.controls=!0),this.ut=this.handleVideoEvent.bind(this),this.addVideoEventListeners(),this.at="none",this.st=!1,this.ct=!1,this.lt=-1}H(t,null,[{key:"displayName",get:function(){return"HTMLScanner"}},{key:"supported",get:function(){return t.supportedVideoTypes.length>0}},{key:"supportedVideoTypes",get:function(){var t=[];if("function"!=typeof be.canPlayType)return t;for(var n in ge){var i=ge[n];Fi.android&&"application/vnd.apple.mpegurl"===n||(Fi.android&&!Fi.mobileAndroid&&"video/mp4"===n&&Fi.android instanceof String?parseInt(Fi.android.split(".")[0],10)>3&&t.push(n):be.canPlayType(i).replace(/^no$/,"")&&t.push(n))}return t}},{key:"supportedAudioTypes",get:function(){return[]}},{key:"supportedExternalDisplays",get:function(){return[AirPlayExternalDisplay]}},{key:"supportsSettingVolume",get:function(){if(Fi.android)return!1;var t=be.volume;return be.volume=.5*t,be.volume!==t}},{key:"supportsTextTracks",get:function(){return void 0!==be.textTracks&&be.textTracks instanceof TextTrackList}},{key:"supportsPlaybackRate",get:function(){if(Fi.android&&Zi.chrome&&Zi.chrome.major<52)return!1;var t=be.playbackRate;be.playbackRate=.5*t;var n=t!==be.playbackRate;return be.playbackRate=t,n}}]);var n=t.prototype;return n.deactivate=function(){this.nt&&(this.nt.off("filesrcupdate"),this.nt.off("texttracksrcupdate")),this.removeVideoEventListeners(),this.removeSnapshot(),this.J.style.display="none"},n.reactivate=function(){this.addVideoEventListeners(),this.J.style.display=""},n.addVideoEventListeners=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.J;Object.keys(wi).forEach((function(i){var e=wi[i];n.addEventListener(e,t.ut)}))},n.removeVideoEventListeners=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.J;Object.keys(wi).forEach((function(i){var e=wi[i];n.removeEventListener(e,t.ut)}))},n.play=function(t){var n=this;return this.ot.start(t).catch((function(t){throw n.ft(t),t}))},n.ft=function(t){this.fire(wi.ERROR,new TelecineError(t.name,t.message))},n.pause=function(){this.ot.cancel(),this.J.pause()},n.onpause=function(){},n.ontimeupdate=function(){this.lt=this.currentTime},n.addTextTrack=function(t){var n,i,e=this;t.src?((n=document.createElement("track")).kind=t.kind,n.src=t.src,n.id="telecine-track-".concat(t.id),n.srclang=t.language,n.label=t.label,this.J.appendChild(n),i=n.track):(i=this.J.addTextTrack(t.kind,t.label,t.language),this.dt=this.dt||{},this.dt["telecine-track-".concat(t.id)]=i),i.addEventListener("cuechange",(function(){return t.dispatchEvent("cuechange")})),this.J.addEventListener("timeupdate",(function(){se(e.J)&&(t.mode=i.mode)}));var r=function(){var n=Zi.iOS&&se(e.J);!t.ht||n?t.mode=i.mode:i.mode=ye[t.mode]},o=[];if(n?n.addEventListener("load",r):r(),["loadeddata","seeking"].forEach((function(t){e.J.addEventListener(t,r),o.push([t,r])})),t.ht&&(i.mode=ye[t.mode]),!_e){var u=[],a=function(){if(i&&"disabled"!==ye[i.mode]){if(u.length!==i.activeCues.length)return t.dispatchEvent("cuechange"),void(u=V(i.activeCues));for(var n=0,e=i.activeCues.length;n<e;n++)if(i.activeCues[n].startTime!==u[n].startTime)return t.dispatchEvent("cuechange"),void(u=V(i.activeCues))}};this.J.addEventListener("timeupdate",a),o.push(["timeupdate",a])}return ke.set(t,o),i},n.removeTextTrack=function(t){var n=this,i=this.J.querySelector("#telecine-track-".concat(t.id));i&&this.J.removeChild(i);var e=ke.get(t);Array.isArray(e)&&e.forEach((function(t){var i=Q(t,2),e=i[0],r=i[1];n.J.removeEventListener(e,r)}))},n.getCuesForTrack=function(t){var n=this.getTrackById("telecine-track-".concat(t.id));return n?V(n.cues):[]},n.getActiveCuesForTrack=function(t){var n=this.getTrackById("telecine-track-".concat(t.id));return n?V(n.activeCues):[]},n.setModeForTrack=function(t,n){var i=this.getTrackById("telecine-track-".concat(t.id));return i&&i.mode!==ye[n]&&(i.mode=ye[n],_e||"disabled"===n||t.dispatchEvent("cuechange")),this},n.setSrcForTrack=function(t,n){var i=this.J.querySelector("#telecine-track-".concat(t.id));return i&&null===i.track.cues&&(i.src=n),this},n.pt=function(t,n){var i,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.wt||(this.wt=this.J.addTextTrack("chapters"),this.wt.mode="hidden");var r=t.timecode,o=e?e.timecode:n,u=window.VTTCue||window.TextTrackCue;try{i=new u(r,o,t.title)}catch(t){throw new TelecineError("ChaptersNotSupported","Chapters are not supported in this browser.")}i.size=(o-r)/n,i.id=r,this.wt.addCue(i)},n.addChapter=function(t,n){var i=this.video.chapters,e={timecode:t,title:n};i.push(e),i.sort((function(t,n){return t.timecode-n.timecode}));var r=i[i.indexOf(e)+1];this.pt(e,this.video.duration,r),this.gt(this.wt,this.video.duration)},n.removeChapter=function(t){try{this.wt.removeCue(t)}catch(t){throw new TelecineError("ChaptersNotSupported","Chapters are not supported in this browser.")}var n=this.video.chapters.find((function(n){return n.timecode===t.timecode}));this.video.chapters.splice(n,1),this.gt(this.wt,this.video.duration)},n.gt=function(t,n){for(var i=0;i<t.cues.length;i++){var e=t.cues[i],r=t.cues[i+1],o=r?r.startTime:n;e.endTime=o,e.size=(o-e.startTime)/n}this.fire(yi.CHAPTER_CUES_UPDATED)},n.addChapters=function(t,n){var i=this;0!==t.length&&n&&t.every((function(t){return void 0!==t.timecode&&t.timecode>=0&&t.timecode<n&&void 0!==t.title}))&&t.sort((function(t,n){return t.timecode-n.timecode})).forEach((function(e,r){return i.pt(e,n,t[r+1])}))},n.addCuePoint=function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.yt||(this.yt=this.J.addTextTrack("metadata"),this.yt.mode="hidden",this.yt.addEventListener("cuechange",(function(t){V(t.target.activeCues).forEach((function(t){n.fire(yi.CUE_POINT,ve.fromVTTCue(t))}))})),this.J.addEventListener("canplay",(function(t){n.yt.mode="hidden"}))),t=parseFloat(t),isNaN(t))throw new TypeError("Time must be a number.");if(t<0||t>=this.duration)throw new TypeError("Time must be a positive number less than the duration of the video.");var e=new ve(t,i);return this.yt.addCue(e.vttCue),e},n.removeCuePoint=function(t){if(!t)throw new TelecineError("InvalidCuePoint","The specified cue point is not valid.");return this.yt.removeCue(t.vttCue),!0},n.removeAllCuePoints=function(){var t=this;return this.yt&&this.yt.length&&V(this.yt.cues).forEach((function(n){t.yt.removeCue(n)})),!0},n.onerror=function(){if(!this.J.error)return!1;switch(this.J.error.code){case this.J.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return this._t("MediaSrcNotSupportedError","The media was not suitable."),this.kt(),!1;case this.J.error.MEDIA_ERR_DECODE:return-1!==this.lt&&Fi.iOS?(this.J.load(),this.currentTime=this.lt,this.lt=-1,!1):(this._t("MediaDecodeError","The media could not be decoded."),this.kt(),!1);case this.J.error.MEDIA_ERR_NETWORK:return this._t("MediaNetworkError","A network error ocurred while fetching the media."),!1;case this.J.error.MEDIA_ERR_ABORTED:return this._t("MediaAbortedError","The user agent aborted the fetching of the media."),!1;default:return this._t("MediaUnknownError","An unknown error occurred."),!1}},n._t=function(t,n){this.fire(wi.ERROR,new TelecineError(t,n))},n.onended=function(){if(this.J.paused||this.J.pause(),this.currentTime<this.J.duration)return!1},n.onwaiting=function(){return!1},n.onwebkitbeginfullscreen=function(){this.ct=!0},n.onwebkitendfullscreen=function(){this.ct=!1},n.onwebkitpresentationmodechanged=function(){switch(this.J.webkitPresentationMode){case"picture-in-picture":this.J.controls=!0;break;case"inline":this.tt.htmlScanner&&this.tt.htmlScanner.controls||(this.J.controls=!1)}this.fire(yi.PRESENTATION_MODE_CHANGE,this.J.webkitPresentationMode)},n.shouldHandleVideoEvent=function(t){return!0},n.handleVideoEvent=function(t){t.target===this.J&&!1!==this.shouldHandleVideoEvent(t)&&("function"==typeof this["on".concat(t.type)]&&!1===this["on".concat(t.type)](t)||this.fire(t.type))},n.swapVideo=function(t,n){var i=t.paused;this.removeVideoEventListeners(t),t.parentElement.replaceChild(n,t),t.pause(),n.currentTime=t.currentTime,i||n.play(),this.addVideoEventListeners(n),this.J=n},n.onexternaldisplayactivated=function(t){this.st||(this.J!==t.element&&(this.Et=this.J,this.swapVideo(this.J,t.element)),this.st=!0)},n.onexternaldisplaydeactivated=function(t){this.st&&(this.Et&&(this.swapVideo(t.element,this.Et),this.Et=null),this.st=!1)},n.setVideoSrc=function(t){this.J.src=t},n.canSeekTo=function(t){var n=this.duration;if(n&&t>n&&(t=n),this.J.seekable.length>0)for(var i=0,e=this.J.seekable.length;i<e;i++)if(this.J.seekable.start(i)<=t&&this.J.seekable.end(i)>=t)return!0;return!1},n.seekToTime=function(t){var n=this;return this.canSeekTo(t)?(this.J.currentTime=t,r.resolve(this.J.currentTime)):new r((function(i,e){var r=function e(){n.canSeekTo(t)&&(Object.keys(wi).forEach((function(t){var i=wi[t];n.J.removeEventListener(i,e)})),n.J.currentTime=t,i(n.J.currentTime))};Object.keys(wi).forEach((function(t){var i=wi[t];n.J.addEventListener(i,r)}))}))},n.takeSnapshot=function(){var t=this.Z.querySelector("[telecine-snapshot]");t||((t=document.createElement("canvas")).setAttribute("telecine-snapshot",""),this.Z.appendChild(t)),t.setAttribute("width","".concat(this.Z.clientWidth,"px")),t.setAttribute("height","".concat(this.Z.clientHeight,"px")),t.style.display="";var n=ae(this.J.clientWidth,this.J.clientHeight,this.J.videoWidth,this.J.videoHeight),i=n.width,e=n.height,r=n.left,o=n.top;t.style.cssText="position:absolute;width:".concat(i,"px;height:").concat(e,"px;left:").concat(r,"px;top:").concat(o,"px");var u=t.getContext("2d");t.width>0&&t.height>0&&u.drawImage(this.J,0,0,t.width,t.height)},n.removeSnapshot=function(){var t=this.Z.querySelector("[telecine-snapshot]");t&&(t.style.display="none")},n.getTrackById=function(t){if(this.dt&&this.dt[t])return this.dt[t];if("function"==typeof this.J.textTracks.getTrackById)return this.J.textTracks.getTrackById(t);var n=document.getElementById(t);return n?n.track:null},n.initDrm=function(){var t=this.nt.drmHandler;t&&t.init(this)},n.showExternalDisplayPicker=function(t){if(!this.et.length)throw new TelecineError("ExternalDisplayUnvailable","No external displays are available.");if(t){var n=this.et.filter((function(n){return n.constructor.displayName.replace("ExternalDisplay","")===t}))[0];if(!n)throw new TelecineError("InvalidExternalDisplay","The specified external display is not available.");n.showPicker()}else this.et[0].showPicker()},n.Tt=function(){return this.xt.length<1?null:this.xt.slice(0).sort((function(t,n){return t.priority-n.priority}))[0]},n.St=function(){var t=this.Tt();t?this.currentFile=t:this.fire(yi.SCANNER_ERROR,{reason:"all files failed"})},n.kt=function(){var t=this.xt.indexOf(this.it);this.xt.splice(t,1),this.St()},n.rt=function(){var t=this;if("mediaSession"in navigator){var n={title:this.nt.title,artist:this.nt.subtitle,artwork:[]};this.nt.metadata.thumbnail&&n.artwork.push({src:this.nt.metadata.thumbnail}),navigator.mediaSession.metadata=new MediaMetadata(n),"function"==typeof navigator.mediaSession.setActionHandler&&(navigator.mediaSession.setActionHandler("play",(function(){t.play().then((function(){return t.fire(Ei.MEDIASESSION_PLAY)})).catch(t.ft.bind(t))})),navigator.mediaSession.setActionHandler("pause",(function(){t.pause(),t.fire(Ei.MEDIASESSION_PAUSE)})),navigator.mediaSession.setActionHandler("seekforward",(function(){t.currentTime=Math.min(t.duration,t.currentTime+10),t.fire(Ei.MEDIASESSION_SEEK_FORWARD)})),navigator.mediaSession.setActionHandler("seekbackward",(function(){t.currentTime=Math.max(0,t.currentTime-10),t.fire(Ei.MEDIASESSION_SEEK_BACKWARD)})))}},H(t,[{key:"chaptersTrack",get:function(){return this.wt}},{key:"manifest",get:function(){return this.At}},{key:"buffered",get:function(){return we.from(this.J.buffered)}},{key:"cuePoints",get:function(){return this.yt?V(this.yt.cues).map((function(t){return ve.fromVTTCue(t)})):[]}},{key:"currentFile",get:function(){return this.it},set:function(n){var i=this,e=!this.J.paused,r=this.currentTime,o=!this.it||n.video.id!==this.it.video.id;if(o||this.takeSnapshot(),this.it=n,o&&(this.J.preload=this.at),this.constructor===t&&this.J.readyState>0&&(this.J.currentTime=0),(Zi.iOS||Fi.android)&&this.it.video.title){var u=this.it.video.title;this.it.video.subtitle&&(u="".concat(u," ").concat(this.it.video.subtitle)),this.J.setAttribute("title",u)}else this.J.removeAttribute("title");this.setVideoSrc(this.it.src,o),this.fire(yi.CURRENT_FILE_CHANGE,n),Zi.iOS&&!o&&this.play().catch(this.ft.bind(this)),this.constructor!==t||o?e&&this.play().catch(this.ft.bind(this)):(this.seekToTime(r).then((function(t){return e&&i.play().catch(i.ft.bind(i)),t})).catch((function(){})),this.once("canplay",(function(){return i.removeSnapshot()})),this.once("playing",(function(){return i.removeSnapshot()})))}},{key:"currentTime",get:function(){return this.J.currentTime},set:function(t){this.seekToTime(t)}},{key:"duration",get:function(){return this.J.duration}},{key:"ended",get:function(){return this.J.ended}},{key:"externalDisplayAvailable",get:function(){return this.et.some((function(t){return t.available}))}},{key:"externalDisplayActive",get:function(){return this.et.some((function(t){return t.active}))}},{key:"loop",get:function(){return this.J.loop},set:function(t){this.J.loop=t}},{key:"isLowerProfileAvailable",get:function(){return null}},{key:"muted",get:function(){return this.J.muted},set:function(t){this.J.muted=t}},{key:"playsinline",get:function(){return this.J.playsinline},set:function(t){this.J.playsinline=t,t?this.J.setAttribute("playsinline",""):this.J.removeAttribute("playsinline")}},{key:"paused",get:function(){return this.J.paused}},{key:"defaultPlaybackRate",get:function(){return this.J.defaultPlaybackRate},set:function(t){this.J.defaultPlaybackRate=t}},{key:"playbackRate",get:function(){return this.J.playbackRate},set:function(t){this.J.playbackRate=t}},{key:"played",get:function(){return this.J.played}},{key:"seekable",get:function(){return this.J.seekable}},{key:"seeking",get:function(){return this.J.seeking}},{key:"preload",get:function(){return this.at},set:function(t){this.J.preload=t,this.at=t}},{key:"presentationMode",get:function(){return this.J.webkitPresentationMode?this.J.webkitPresentationMode:"inline"},set:function(t){if(-1===this.supportedPresentationModes.indexOf(t))throw new TelecineError("InvalidPresentationMode","The “".concat(t,"” presentation mode is not supported."));"function"==typeof this.J.webkitSetPresentationMode&&this.J.webkitSetPresentationMode(t)}},{key:"supportedPresentationModes",get:function(){var t=["inline"];return"function"==typeof this.J.webkitSupportsPresentationMode&&this.J.webkitSupportsPresentationMode("picture-in-picture")&&t.push("picture-in-picture"),t}},{key:"video",get:function(){return this.nt},set:function(t){var n=this;if(this.reactivate(),this.nt!==t){if(this.nt&&(this.nt.off("filesrcupdate"),this.nt.off("texttracksrcupdate")),this.removeAllCuePoints(),this.nt=t,this.xt=t.files.filter((function(t){return-1!==n.constructor.supportedVideoTypes.indexOf(t.mime)})),this.nt.on("filesrcupdate",(function(t){t===n.it&&n.St()})),this.nt.on("texttracksrcupdate",(function(t){n.video.currentScanner&&n.video.currentScanner.setSrcForTrack(t,t.src)})),this.tt.externalDisplays&&this.tt.externalDisplays.length){this.et=[];var i=this.constructor.supportedExternalDisplays;Array.isArray(i)||(i=[]);var e=i.map((function(t){return t.displayName}));this.tt.externalDisplays.filter((function(t){return t.supported&&-1!==e.indexOf(t.displayName)})).forEach((function(i){var e=new i(t),r=i.displayName.replace("ExternalDisplay","");e.on(wi.LOADED_METADATA,(function(t){return n.fire(wi.LOADED_METADATA,t)})),e.on("available",(function(){return n.fire(bi.AVAILABLE,{type:r})})),e.on("unavailable",(function(){return n.fire(bi.UNAVAILABLE,{type:r})})),e.on("activated",(function(){"function"==typeof n.onexternaldisplayactivated&&n.onexternaldisplayactivated(e),n.fire(bi.ACTIVATED,{type:r})})),e.on("deactivated",(function(){"function"==typeof n.onexternaldisplaydeactivated&&n.onexternaldisplaydeactivated(e),n.fire(bi.DEACTIVATED,{type:r})})),n.et.push(e)}))}this.St(),Zi.iOS&&this.et.forEach((function(t){"AirPlay"===t.constructor.displayName&&(t.element=n.J)})),this.initDrm()}}},{key:"videoElement",get:function(){return this.J}},{key:"videoWidth",get:function(){return this.J.videoWidth}},{key:"videoHeight",get:function(){return this.J.videoHeight}},{key:"volume",get:function(){return this.J.volume},set:function(t){this.J.volume=t}},{key:"readyState",get:function(){return this.J.readyState}}]),t}(),Te={};try{Te.Set=Set}catch(t){!function(t,n){var i=n(e.prototype,{size:{configurable:!0,get:function(){return this.Mt.length}}});function e(t){n(this,{Mt:{value:[]}}),t&&t.forEach(this.add,this)}function r(n,i){return-1<(t=n.Mt.indexOf(i))}function o(t){return[t,t]}i.add=function(t){return r(this,t)||this.Mt.push(t),this},i.clear=function(){var t=this.Mt.length;this.Mt.splice(0,t)},i.delete=function(n){return r(this,n)&&!!this.Mt.splice(t,1)},i.entries=function(){return this.Mt.map(o)},i.forEach=function(t,n){this.Mt.forEach((function(i,e){t.call(n,i,i,this)}),this)},i.has=function(t){return r(this,t)},i.keys=i.values=function(){return this.Mt.slice(0)},Te.Set=e}(0,Object.defineProperties)}var xe=Te.Set,Se={MANIFEST:"manifest",SEGMENT:"segment"},Ae={method:"GET",async:!0,retry:0,throwHttpErrors:!0,headers:{},hooks:{beforeRequest:[],beforeRetry:[],afterResponse:[]},validateStatus:function(t){return t>=200&&t<300},retryStatus:function(t){return[408,413,429].includes(t)||t>=500&&t<600}};function Me(t,n){var i=this;this.headers={},ct(this,n),this.ok=2==(this.status/100|0),this.body=t,this.text=function(){return r.resolve(t)},this.json=function(){return r.resolve(JSON.parse(t))},this.blob=function(){return r.resolve(new Blob([t]))},this.arrayBuffer=function(){return r.resolve(t)},this.clone=function(){return new Me(t,i)}}var Re=function(t){function n(){var n;return(n=t.call(this,"The operation was aborted.")||this).name="AbortError",n}return G(n,t),n}(X(Error)),Ce=function(t){function n(n){var i;return(i=t.call(this,n.statusText)||this).name="HTTPError",i.response=n,i}return G(n,t),n}(X(Error)),Oe=function(t){function n(){var n;return(n=t.call(this,"A network error occurred.")||this).name="NetworkError",n}return G(n,t),n}(X(Error)),Ie=function(t){function n(n){var i;return(i=t.call(this,"Request timed out.")||this).name="TimeoutError",i.timeoutMs=n,i}return G(n,t),n}(X(Error));function je(){}function De(t,n,i){if(!t.s){if(i instanceof Le){if(!i.s)return void(i.o=De.bind(null,t,n));1&n&&(n=i.s),i=i.v}if(i&&i.then)return void i.then(De.bind(null,t,n),De.bind(null,t,2));t.s=n,t.v=i;var e=t.o;e&&e(t)}}var Le=function(){function t(){}return t.prototype.then=function(n,i){var e=new t,r=this.s;if(r){var o=1&r?n:i;if(o){try{De(e,1,o(this.v))}catch(t){De(e,2,t)}return e}return this}return this.o=function(t){try{var r=t.v;1&t.s?De(e,1,n?n(r):r):i?De(e,1,i(r)):De(e,2,r)}catch(t){De(e,2,t)}},e},t}();function Ne(t){return t instanceof Le&&1&t.s}function Pe(t){var n=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}((function(e){return function(t,n){try{var i=t()}catch(t){return n(t)}return i&&i.then?i.then(void 0,n):i}(e,(function(o){var u=!1;i++;var a=function(n){if(!t.retryAbortErrors&&n instanceof Re)return 0;if(n instanceof Ie)return 0;if(i>=t.retry)return 0;if(n instanceof Ce){if(!t.retryStatus(n.response.status))return 0;var e=n.response.headers["retry-after"];if(e&&t.retryStatus(n.response.status)){var r=Number(e);return isNaN(r)?r=Date.parse(e)-Date.now():r*=1e3,r}if(413===n.response.status)return 0}return.3*Math.pow(2,i-1)*1e3}(o);return function(s,c){var l=function(){if(0!==a&&i>0)return function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(function(t){return new r((function(n,i){return setTimeout(n,t)}))}(a),(function(){var a=t.hooks.beforeRetry||[];return function(t,n){return t&&t.then?t.then(n):n()}(function(t,n,i){var e,r,o=-1;return function i(u){try{for(;++o<t.length;)if((u=n(o))&&u.then){if(!Ne(u))return void u.then(i,r||(r=De.bind(null,e=new Le,2)));u=u.v}e?De(e,1,u):e=u}catch(t){De(e||(e=new Le),2,t)}}(),e}(a,(function(n){return function(t,n){return t&&t.then?t.then(je):r.resolve()}((0,a[n])(t,o,i))})),(function(){return u=!0,n(e)}))}))}();return l&&l.then?l.then(c):c(l)}(0,(function(n){if(u)return n;if(t.throwHttpErrors)throw o}))}))})),i=0;return n}function Fe(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}function Ve(t,n,i){if(!t.s){if(i instanceof Ue){if(!i.s)return void(i.o=Ve.bind(null,t,n));1&n&&(n=i.s),i=i.v}if(i&&i.then)return void i.then(Ve.bind(null,t,n),Ve.bind(null,t,2));t.s=n,t.v=i;var e=t.o;e&&e(t)}}var Ue=function(){function t(){}return t.prototype.then=function(n,i){var e=new t,r=this.s;if(r){var o=1&r?n:i;if(o){try{Ve(e,1,o(this.v))}catch(t){Ve(e,2,t)}return e}return this}return this.o=function(t){try{var r=t.v;1&t.s?Ve(e,1,n?n(r):r):i?Ve(e,1,i(r)):Ve(e,2,r)}catch(t){Ve(e,2,t)}},e},t}();function Be(t){return t instanceof Ue&&1&t.s}function He(t,n,i){var e,r,o=-1;return function u(a){try{for(;++o<t.length&&(!i||!i());)if((a=n(o))&&a.then){if(!Be(a))return void a.then(u,r||(r=Ve.bind(null,e=new Ue,2)));a=a.v}e?Ve(e,1,a):e=a}catch(t){Ve(e||(e=new Ue),2,t)}}(),e}function ze(t,n){return t&&t.then?t.then(n):n(t)}function qe(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}var We=["get","post","put","patch","head","delete"],Ge={json:"application/json",text:"text/plain",arrayBuffer:"*/*",blob:"*/*"},$e=["get"];function Ke(t,n){var i=qe((function(){var t=!1,i=!1,e=n.hooks.beforeRequest||[];return ze(He(e,(function(o){return Fe((0,e[o])(n),(function(e){return e instanceof Ye?(n=e,void(i=!0)):e instanceof Me?(t=!0,r.resolve(e).then(Je(n))):void 0}))}),(function(){return i||t})),(function(i){return t?i:function(t){var n=t.url,i=t.method,e=t.body,o=t.onDownloadProgress;return new r((function(r,u){var a=new XMLHttpRequest;for(var s in a.open(i.toUpperCase(),n,t.async),t.timeout&&(a.timeout=t.timeout),a.onload=function(){if(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:")){var t={};a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(n,i,e){t[i]=t[i]?"".concat(t[i],",").concat(e):e})),r(new Me(a.response,{headers:t,statusText:a.statusText,status:a.status,url:a.responseURL}))}},a.onabort=function(){u(new Re)},a.onerror=function(){u(new Oe)},a.ontimeout=function(){u(new Ie(t.timeout))},"function"==typeof o&&a.addEventListener("progress",o),t.headers)a.setRequestHeader(s,t.headers[s]);t.withCredentials&&(a.withCredentials=!0),t.responseType&&(a.responseType=t.responseType),t.abort=a.abort.bind(a),a.send(e||null)}))}(n).then(Je(n))}))})),e=n=new Ye(t,n),o=e.method,u=e.json,a=e.jwt,s=e.searchParams;if(u&&(n.headers["Content-Type"]=Ge.json,n.body=JSON.stringify(u)),a&&(n.headers.Authorization="jwt ".concat(a)),s){var c=Q(n.url.split("?"),2),l=c[0],f=c[1];n.url=pt(l,W({},ht(f),{},s))}var d=-1!==$e.indexOf(o.toLowerCase())?Pe(n)(i):i(),h=function(t){d[t]=qe((function(){return n.headers["Content-Type"]=Ge[t],Fe(d,(function(n){return n.clone()[t]()}))}))};for(var v in Ge)h(v);return function t(n,i){var e=n.then.bind(n);return Object.assign(n,{abort:i,then:function(){return t(e.apply(void 0,arguments),i)}})}(d,(function(){return n.abort()}))}function Ye(t,n){ct(this,Ae,t="string"==typeof t?{url:t}:t,n)}function Je(t){var n=t.validateStatus,i=t.throwHttpErrors,e=t.hooks;return qe((function(r){var o=e.afterResponse||[];return ze(He(o,(function(n){return Fe((0,o[n])(t,r.clone()),(function(t){t instanceof Me&&(r=t)}))})),(function(){if(!n||n(r.status))return r;if(i)throw new Ce(r);return r}))}))}We.forEach((function(t){return Ke[t]=function(n,i){return Ke(n,W({method:t},i))},Ke[t]}));var Xe=Ke.get,Ze=Ke.post,Qe=Ke.put,tr=Ke.patch,nr=Ke.head,ir={ARRAY_BUFFER:"arraybuffer"},er=Object.freeze({__proto__:null,ContentTypes:Se,defaults:Ae,requestMethods:We,responseTypes:Ge,retryMethods:$e,request:Ke,Request:Ye,get:Xe,post:Ze,put:Qe,patch:tr,head:nr,Response:Me,ResponseTypes:ir,AbortError:Re,HTTPError:Ce,NetworkError:Oe,TimeoutError:Ie});function rr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===t.length)return 0;for(var i=0,e=0,r=0;r<t.length;r++){var o=n[r]||1;e+=o,i+=t[r]*o}return i/e}function or(t){if(0===t.length)return 0;for(var n=0,i=0;i<t.length;i++)n+=1/t[i];return t.length/n}function ur(t,n){if(t.sort(),0===t.length)return 0;if(n<=0)return t[0];if(n>=1)return t[t.length-1];var i=t.length*n,e=Math.floor(i),r=e+1,o=i%1;return r>=t.length?t[e]:t[e]*(1-o)+t[r]*o}function ar(t){t.sort((function(t,n){return t-n}));var n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2}function sr(){return"undefined"!=typeof performance?performance.now():Date.now()}function cr(){}var lr=[],fr=[],dr=[];function hr(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}var vr=[],pr=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.retryCount,i=void 0===n?3:n,e=t.parallel,r=void 0===e?1:e,o=t.includeWithSpeeds,u=void 0===o||o,a=t.timeout,s=void 0===a?0:a,c=t.retryAbortErrors,l=void 0===c||c;this.Rt=[],this.Ct=new xe,this.Ot=new N,this.It=i,this.jt=!1,this.Dt=!1,this.Lt=r,this.Nt=u,this.Pt=s,this.Ft=l,this.Vt()}t.getPercentileSpeed=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.8,i=lr.slice(-t);return ur(i,n)},t.getAverageSpeed=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=lr.slice(-t);return rr(i,n)},t.getHarmonicAverageSpeed=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=lr.slice(-t);return or(n)},t.getVolatilityScaler=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=lr.slice(-t);if(n.length<3)return null;var i=rr(n,[]),e=Math.min.apply(Math,tt(n));return e/i},t.getMedianSpeed=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=lr.slice(-t);return ar(n)},t.getResponseSpeeds=function(){return lr},t.getProgressSpeeds=function(){return vr},t.getFailedSegments=function(){return fr},t.getSuccessfulSegments=function(){return dr};var n=t.prototype;return n.add=function(t,n){var i=this;return new r((function(e,r){var o=i.Ut(t,e,r);i.Bt(o,n),i.jt&&!i.Dt&&i.Ht()}))},n.start=function(){this.jt||(this.jt=!0,this.Ht())},n.stop=function(){this.jt=!1},n.abort=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this.Rt.filter((function(t){return!n||n===t.stream}));i.forEach((function(n){n.reject("Stream manually aborted"),t.fire("downloadabort",n.identifier)})),this.Rt=this.Rt.filter((function(t){return n&&n!==t.stream})),this.Ct.forEach((function(t){n&&n!==t.stream||t.request.abort()}))},n.zt=function(t){for(var n=0;n<this.Rt.length&&!(this.Rt[n].priority>t.priority);n++);this.Rt.splice(n,0,t)},n.Vt=function(){var t=this;this.qt=new N,nt(this),window.addEventListener("online",(function(){t.start(),t.Wt&&(t.Wt.resolve(),t.Wt=null)})),window.addEventListener("offline",(function(){t.stop(),t.abort(),t.Wt=new lt}))},n.Bt=function(t,n){t.hasOwnProperty("priority")?this.zt(t):this.Rt[n?"unshift":"push"](t)},n.Ht=function(){if(this.jt){this.Dt=!0;for(var t=this.Lt-this.Ct.size,n=0;n<t;n++)this.Gt()}},n.Ut=function(t,n,i){var e=t;return t.id&&(e=t.id),W({},t,{identifier:e,resolve:n,reject:i})},n.$t=function(){0!==this.Ct.size||0!==this.Rt.length?this.Ct.size<this.Lt&&this.Ht():this.Dt=!1},n.Gt=function(){if(0!==this.Rt.length){var t=this.Rt.shift(),n=t.url,i=t.byteRange,e=t.isInitSegmentRequest,r=t.identifier,o=t.timeout,u={stream:t.stream,data:{url:n,isInitSegmentRequest:e,requestSendTime:sr(),uuid:([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^16*Math.random()>>t/4).toString(16)}))}},a=this.Pt,s=parseInt(o,10);s>=0&&(a=s);var c={url:n,type:Se.SEGMENT,responseType:ir.ARRAY_BUFFER,retry:this.It,hooks:{beforeRetry:[this.Kt.bind(this)]},onDownloadProgress:this.Yt(r,u),headers:i&&{Range:"bytes=".concat(i)},retryAbortErrors:this.Ft,timeout:a};this.fire("downloadstart",r),u.request=Ke(c).then(this.Jt(u,t)).catch(this.Xt(u,t)),this.Ct.add(u)}else this.Dt=!1},n.Kt=function(){try{var t=this;return function(n){var i=function(){if(t.Wt)return function(t,n){return t&&t.then?t.then(cr):r.resolve()}(t.Wt)}();if(i&&i.then)return i.then(cr)}()}catch(t){return r.reject(t)}},n.Yt=function(t,n){var i=this,e=0,r=0,o=sr();return function(u){if(u.lengthComputable){var a=8*(u.loaded-r),s=sr(),c=s-o,l={startTime:o,length:c,bitrate:a/(c/1e3),index:e};e>0&&(vr.length>=100&&vr.shift(),vr.push(l)),o=s,r=u.loaded,e+=1,i.qt.set(n,{bytesTotal:u.total,bytesLoaded:u.loaded,percent:u.loaded/u.total,identifier:t}),i.fire("progress",t)}}},n.Jt=function(t,n){var i=this,e=sr(),o=n.identifier,u=n.resolve;return function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}((function(r){return hr(r.arrayBuffer(),(function(a){return t.data.duration=sr()-t.data.requestSendTime,i.Ct.delete(t),i.qt.delete(t),i.Zt(n,e,a.byteLength),i.fire("downloadend",o,{request:t,response:r}),dr.push({url:t.data.url,status:200,duration:t.data.duration}),hr(i.Qt(t,a),(function(t){u(a=t),i.$t()}))}))}))},n.Zt=function(t,n,i){var e=t.includeWithBandwidthChecks,r=(sr()-n)/1e3;if(i>8e3){var o=8*i/r;lr.length>100&&lr.shift(),this.Nt&&e&&lr.push(o)}},n.Qt=function(t,n){return t.data.url&&t.data.url.match(".ts$")?this.tn(t,n):r.resolve(new Uint8Array(n))},n.tn=function(t,n){try{var i=this;return function(t,n){var e=function(){if(!i.nn)return hr(st("module/mux-mp4.js"),(function(t){i.nn=new t({keepOriginalTimestamps:!0})}))}();return e&&e.then?e.then(n):n()}(0,(function(){return new r((function(e){i.nn.on("data",(function(n){i.nn.off("data");var r=new Uint8Array(n.initSegment.byteLength+n.data.byteLength);r.set(n.initSegment,0),r.set(n.data,n.initSegment.byteLength),e(t.data.isInitSegmentRequest?n.initSegment:r)})),i.nn.push(new Uint8Array(n)),i.nn.flush()}))}))}catch(t){return r.reject(t)}},n.Xt=function(t,n){var i=this,e=n.identifier,r=n.reject,o=n.size;return function(n){var u=sr()-t.data.requestSendTime;if(t.data.duration=u,n instanceof Re)fr.push({url:t.data.url,status:"abort",duration:u}),i.fire("downloadabort",e);else if(n instanceof Ce)fr.push({url:t.data.url,status:n.response.status,duration:u}),i.fire("downloaderror",e,n.response.status);else if(n instanceof Ie){if(fr.push({url:t.data.url,status:"timeout",duration:u}),o>0&&n.timeoutMs>0){var a=8*o/(n.timeoutMs/1e3);a*=.5,lr.push(a)}i.fire("downloadtimeout",e,"timeout")}i.qt.delete(t),i.Ct.delete(t),r(n),i.$t()}},H(t,[{key:"parallel",get:function(){return this.Lt},set:function(t){this.Lt=t}},{key:"pendingFetches",get:function(){var t=this,n=[];return this.Ct.forEach((function(i){if(t.qt.get(i)){var e=t.qt.get(i);e.elapsedTime=sr()-i.data.requestSendTime,n.push(e)}})),n}}]),t}(),mr=function(){function t(t){nt(this),this.in=t,this.en=null,this.rn=null,this.un=!1,this.an=!0,this.sn=null,this.cn=[],this.ln=[],this.fn=!1,this.dn=null,this.hn=!1,this.vn=void 0,this.pn=!1,this.mn=!0,this.wn={},this.bn=this.gn.bind(this),this.in.on("durationset",this.yn.bind(this))}var n=t.prototype;return n.addStream=function(t){var n=this;t.on("segmentadd",(function(){return n._n()}));var i=this.ln.push(t)-1;t.index=i,null===this.rn&&(this.kn(i),this.un=!0)},n.streamIndexAtTime=function(t){return this.wn[void 0]?{stream:this.activeStreamIndex}:this.wn[Math.floor(t/6)]},n.switchTo=function(t){var n=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;"object"===U(t)&&(e=t.index);var o=this.rn!==e,u=o;if(!o&&this.un&&(o=!0),o){this.un=!1;var a=this.rn,s=this.ln[a];this.fire("streamchangestart",a,e),s&&u&&i&&s.abort(),this.En=e,this.kn(e)}return this._n(),new r((function(t){o?n.Tn=function(){n.En===e&&(n.Tn=null,t(),n.fire("streamchange",e))}:t()}))},n.isTimeInBuffer=function(t){for(var n=0;n<this.en.buffered.length;n++){var i=this.en.buffered.start(n),e=this.en.buffered.end(n);if(i<=t&&e>=t)return!0}return!1},n.hasAppendedFinalSegment=function(){return void 0!==this.vn&&this.isTimeInBuffer(this.vn)},n.clear=function(){this.ln.forEach((function(t){return t.clear()}))},n.remove=function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.in.xn.duration;return new r((function(e,r){n.cn.push([t,i,e]),n._n()}))},n.removeEventListeners=function(){this.en&&this.en.removeEventListener("updateend",this.bn)},n.yn=function(){var t=this.in.xn.duration,n=Math.floor(t/6);n+=6%t>1?1:0;for(var i=0;i<n;i++)this.wn[i]={stream:null,segment:i,type:"video"}},n.Sn=function(){this.en.addEventListener("updateend",this.bn)},n.kn=function(t){this.an=!0,this.rn=t,this.in.An.streamIndex=t},n.gn=function(){this.Mn(),this.Rn(),this._n()},n.Mn=function(){if(this.hn&&this.endTime)return this.hn=!1,this.vn=this.endTime,void this.in.checkEndOfStream();!this.activeStream.hasNextSegment()&&this.vn>0&&"open"===this.in.xn.readyState&&this.in.checkEndOfStream()},n.Rn=function(){this.sn&&(this.fire("appendbufferend",this.sn),this.sn=null,this.Tn&&this.Tn())},n._n=function(){if(this.en){if(this.activeStream&&"closed"!==this.in.xn.readyState&&!this.en.updating)if(this.cn.length)this.Cn();else if(!this.fn&&!this.pn)return this.an?(this.an=!1,void this.On()):void this.In()}else this.on("sourcebufferattach",this._n)},n.Cn=function(){var t=this,n=Q(this.cn.shift(),3),i=n[0],e=n[1],r=n[2];this.en.addEventListener("updateend",(function n(i){t.en.removeEventListener("updateend",n),r(),clearTimeout(t.dn),t.dn=setTimeout((function(){t.fn=!1,t._n()}),5e3)})),this.en.remove(i,e)},n.On=function(){var t=this;this.pn=!0,this.activeStream.getInitSegment().then((function(n){return t.sn=null,t.en.appendBuffer(n),t.pn=!1,n})).catch((function(n){t.an=!0,t.pn=!1}))},n.In=function(){var t=this.activeStream.getNextSegment();if(null!==t){var n=this.activeStream.getIdForSegment(t);this.activeStream.isFinal(t)&&(this.hn=!0),this.sn=n,this.fire("appendbufferstart",n);try{this.en.appendBuffer(t),this.wn[n.segment]=n,this.mn&&(this.mn=!1,this.fire("initialbufferstart"))}catch(n){if("QuotaExceededError"===n.name){if(this.fn=!0,this.fire("quotaexceedederror",this.en.buffered),this.in.J.currentTime>6){var i=this.in.J.currentTime-6;this.in.removeBuffer(0,i)}this.activeStream.jn.unshift(t)}}}},H(t,[{key:"streams",get:function(){return this.ln}},{key:"activeStreamIndex",get:function(){return this.rn}},{key:"activeStream",get:function(){return this.ln[this.rn]}},{key:"sourceBuffer",get:function(){return this.en},set:function(t){this.en=t,this.Sn(),this.fire("sourcebufferattach")}},{key:"endTime",get:function(){var t=this.en.buffered;if(t.length>0)return t.end(t.length-1)}}]),t}(),wr=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new pr;nt(this),this.jn=[],this.Dn=t,this.an=!0,this.Ln=NaN,this.Nn=n,this.Pn=i,this.Pn.start(),this.Fn=new N,this.Vn={}}t.isValidSegmentUrl=function(t){return"string"==typeof t||"string"==typeof t.url&&"string"==typeof t.byteRange};var n=t.prototype;return n.getIdForSegment=function(n){return t.isValidSegmentUrl(n)?this.Vn[n]:this.Fn.get(n).id},n.isFinal=function(t){return this.Fn.get(t).final},n.addSegment=function(n){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.identifier,u=void 0===o?null:o,a=e.isFinalSegment,s=void 0!==a&&a,c=e.loadOnly,l=void 0!==c&&c,f=e.priority,d=void 0===f?0:f,h=e.includeWithBandwidthChecks,v=void 0===h||h,p=e.timeout,m=void 0===p?null:p,w=e.size,b=void 0===w?null:w;return this.an&&this.getInitSegment(),t.isValidSegmentUrl(n)?(this.Vn[n]=u||n,this.fire("queued",this.getIdForSegment(n)),this.Pn.add({url:n.url||n,byteRange:n.byteRange,id:this.getIdForSegment(n),stream:this,includeWithBandwidthChecks:v,isInitSegmentRequest:!1,priority:d,timeout:m,size:b}).then((function(t){i.Fn.set(t,{id:u||n,final:s}),i.jn.push(t),i.fire("bufferqueueadd",i.getIdForSegment(n)),l||i.fire("segmentadd")}))):(this.Fn.set(n,{id:u,final:s}),this.jn.push(n),this.fire("bufferqueueadd",u),r.resolve())},n.clear=function(){this.jn=[]},n.abort=function(){var t=this;this.getInitSegment().then((function(){t.Pn.abort(t)})).catch((function(t){}))},n.hasNextSegment=function(){return this.jn.length>0},n.getNextSegment=function(){return 0===this.jn.length?null:this.jn.shift()},n.getInitSegment=function(){var n=this;this.an=!1;var i=this.Dn.url||this.Dn;return t.isValidSegmentUrl(i)?this.Pn.add({url:i,byteRange:this.Dn.byteRange,id:null,stream:this,isInitSegmentRequest:!0}).then((function(t){return n.Dn=t,n.Dn})):r.resolve(this.Dn)},H(t,[{key:"codec",get:function(){return this.Nn},set:function(t){this.Nn=t}},{key:"index",get:function(){return this.Ln},set:function(t){this.Ln=t}},{key:"pendingFetches",get:function(){return this.Pn.pendingFetches}}]),t}(),br=function(){function t(t){this.J=t,this.jt=!1,this.Un=null,this.Bn={},this.Hn={},this.zn=0,this.qn=0,this.Wn="default",this.bound={startCheckingDroppedFrames:this.Gn.bind(this),stopCheckingDroppedFrames:this.$n.bind(this)}}var n=t.prototype;return n.start=function(){return this.Gn(),this},n.stop=function(){return this.$n(),this},n.destroy=function(){this.$n(),this.Kn()},n.getDroppedFrameRate=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"average",e=this.Bn[n];if(!e)return 0;if(e.length<t)return 0;var r=e.slice(-t);return"median"===i?ar(r):rr(r)},n.getDroppedFrameTotal=function(){return{dropped:this.Yn(),total:this.Jn()}},n.Sn=function(){this.J.addEventListener("playing",this.bound.startCheckingDroppedFrames),this.J.addEventListener("pause",this.bound.stopCheckingDroppedFrames),this.J.addEventListener("ended",this.bound.stopCheckingDroppedFrames)},n.Kn=function(){this.J.removeEventListener("playing",this.bound.startCheckingDroppedFrames),this.J.removeEventListener("pause",this.bound.stopCheckingDroppedFrames),this.J.removeEventListener("ended",this.bound.stopCheckingDroppedFrames)},n.Gn=function(){this.jt=!0,this.Xn()},n.$n=function(){this.jt=!1},n.Xn=function(){var t=this;if(this.jt&&null!==this.Wn){clearTimeout(this.Un);var n=this.Yn(),i=n-this.zn;this.zn=n;var e=this.Zn(),r=e-this.qn;this.qn=e,this.Bn[this.Wn]||(this.Bn[this.Wn]=[]),this.Hn[this.Wn]||(this.Hn[this.Wn]=[]),this.Bn[this.Wn].length>100&&this.Bn[this.Wn].shift(),this.Hn[this.Wn].length>100&&this.Hn[this.Wn].shift(),this.Bn[this.Wn].push(i),this.Hn[this.Wn].push(r),this.Un=setTimeout((function(){t.Xn()}),1e3)}},n.Yn=function(){return"function"==typeof this.J.getVideoPlaybackQuality?this.J.getVideoPlaybackQuality().droppedVideoFrames:this.J.webkitDroppedFrameCount||0},n.Jn=function(){return"function"==typeof this.J.getVideoPlaybackQuality?this.J.getVideoPlaybackQuality().totalVideoFrames:this.J.webkitDecodedFrameCount||0},n.Zn=function(){if("function"==typeof this.J.getVideoPlaybackQuality){var t=this.J.getVideoPlaybackQuality();return t.totalVideoFrames-t.droppedVideoFrames-t.corruptedVideoFrames}return this.J.webkitDecodedFrameCount||0},H(t,[{key:"streamIndex",get:function(){return this.Wn},set:function(t){this.Wn=t}}]),t}(),gr=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.J=t,this.tt=n,nt(this);var i=this.tt,e=i.fetcherTimeout,r=void 0===e?0:e,o=i.fetcherRetryAbortErrors,u=void 0===o||o;this.An=new br(t),this.xn=new MediaSource,this.Pn=new pr({parallel:1,timeout:r,retryAbortErrors:u}),this.Qn={},this.ti=[],this.ni=null,this.ii=this.ei.bind(this),this.Sn()}var n=t.prototype;return n.switchTo=function(t){return 1===this.ti.length&&this.video.switchTo(t)},n.getCurrentSpeed=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.type,i=void 0===n?"average":n,e=t.howMany,r=void 0===e?10:e,o=t.weights,u=void 0===o?[]:o,a=t.percentile,s=void 0===a?null:a;return"harmonicAverage"===i?pr.getHarmonicAverageSpeed(r):"average"===i?pr.getAverageSpeed(r,u):"median"===i?pr.getMedianSpeed(r):pr.getPercentileSpeed(r,s)},n.getVolatilityScaler=function(t){return pr.getVolatilityScaler(t)},n.getResponseSpeeds=function(){return pr.getResponseSpeeds()},n.getFailedSegments=function(){return pr.getFailedSegments()},n.getSuccessfulSegments=function(){return pr.getSuccessfulSegments()},n.getDroppedFrameRate=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.activeStreamIndex,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"average";return this.An.getDroppedFrameRate(t,n,i)},n.getDroppedFrameTotal=function(){return this.An.getDroppedFrameTotal()},n.clear=function(){this.ti.forEach((function(t){return t.clear()}))},n.streamIndexAtTime=function(t,n){return this.Qn[n].streamIndexAtTime(t)?this.Qn[n].streamIndexAtTime(t).stream:null},n.removeBuffer=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.J.duration;if(t>=(n=n||0))return r.resolve();var i=this.ti.map((function(i){return i.remove(t,n)}));return r.all(i)},n.addStream=function(t,n){var i=this,e=this.ri(t);if(!this.Qn[e]){var r=new mr(this,e);this.Qn[e]=r,this.ti.push(r),this.readyPromise.then((function(){var n;try{n=i.xn.addSourceBuffer(t)}catch(t){if(22!==t.code)return void i.fire("srcnotsupported",t);n=i.Qn[e]}i.tt.duration&&(n.appendWindowEnd=i.tt.duration+.1),r.sourceBuffer=n})).catch((function(t){})),["appendbufferstart","appendbufferend","streamchange","streamchangestart","initialbufferstart","quotaexceedederror"].forEach((function(t){r.on(t,(function(n){i.fire(t,n)}))}))}var o=new wr(n,t,this.Pn);return["queued","bufferqueueadd"].forEach((function(t){o.on(t,(function(n){i.fire(t,n)}))})),this.Qn[e].addStream(o),o},n.checkEndOfStream=function(){var t=this;this.ti.every((function(t){return t.hasAppendedFinalSegment()}))&&this.J.addEventListener("timeupdate",(function n(){t.J.removeEventListener("timeupdate",n),t.ti.every((function(n){return n.isTimeInBuffer(t.J.currentTime)}))&&t.endOfStream()}))},n.abortFetches=function(){this.Pn.abort()},n.endOfStream=function(){"open"===this.xn.readyState&&(this.oi()||(this.xn.endOfStream(),this.fire("endofstream")))},n.destroy=function(){this.clear(),this.ai(),this.An.destroy(),this.Pn.abort(),this.J.src&&(this.J.removeAttribute("src"),this.J.load())},n.Sn=function(){var t=this;this.readyPromise=new r((function(n,i){t.ni=n,t.xn.addEventListener("sourceopen",t.ii)})),["downloadstart","downloadend","downloadabort","downloaderror","downloadtimeout","progress"].forEach((function(n){t.Pn.on(n,(function(){for(var i=arguments.length,e=new Array(i),r=0;r<i;r++)e[r]=arguments[r];t.fire.apply(t,[n].concat(e))}))}))},n.oi=function(){for(var t=0;t<this.xn.sourceBuffers.length;t++)if(this.xn.sourceBuffers[t].updating)return!0;return!1},n.ei=function(){URL.revokeObjectURL(this.J.src),this.xn.removeEventListener("sourceopen",this.ii),this.tt.duration&&(this.xn.duration=this.tt.duration,this.fire("durationset")),this.ni()},n.ai=function(){this.ti.forEach((function(t){return t.removeEventListeners()}))},n.ri=function(t){return 0===t.indexOf("audio")?"audio":"video"},H(t,[{key:"mediaSource",get:function(){return this.xn}},{key:"pendingFetches",get:function(){return this.Pn.pendingFetches}},{key:"streams",get:function(){return 1===this.ti.length&&this.video.streams}},{key:"activeStreamIndex",get:function(){return 1===this.ti.length&&this.video.activeStreamIndex}},{key:"video",get:function(){return!!this.Qn.video&&this.Qn.video}},{key:"audio",get:function(){return!!this.Qn.audio&&this.Qn.audio}}]),t}(),yr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n)||this).tt=e,i.blacklisted=[],i.whitelisted=[],i.MAX_LOADABLE_SEGMENTS_AUTO=3,i.MAX_LOADABLE_SEGMENTS_LOCKED=15,i.SEGMENT_DURATION=6,i}G(n,t),H(n,[{key:"displayName",get:function(){return"MediaSource"}}]);var i=n.prototype;return i.isTimeInBuffer=function(t,n,i){return this.si(t,t,n,i,1)},i.getDistanceFromBuffer=function(t,n){for(var i=t,e=0;e<n.length;e++)if(n.start(e)<=t&&n.end(e)>=t){i=n.end(e);break}return i-t},i.blacklist=function(t){this.blacklisted[t]=1},i.lock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.whitelisted=t},i.filterStreams=function(t,n,i){for(var e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=[],u=!1,a=0;a<t.length;a++)if(e&&e[0]===t[a].width&&e[1]===t[a].height)o.push(t[a]);else{if(u)break;if(!(this.blacklisted[a]&&-1===this.whitelisted.indexOf(a)||this.whitelisted.length&&-1===this.whitelisted.indexOf(a)))if(this.whitelisted.length)o.push(t[a]);else{var s=this.ci(n,i,t[a].width,t[a].height,r),c=1e3/(window.devicePixelRatio||1),l=i<c?1.75:1;s>=l&&(u=!0),o.push(t[a]),e=[t[a].width,t[a].height]}}return o},i.getCurrentSpeed=function(){var t="average",n=3,i=[1,2,5];return this.tt.tests&&this.tt.tests.harmonic_average&&this.tt.tests.harmonic_average.group&&(t="harmonicAverage",n=this.li(),i=[]),this.scanner.sorcerer.getCurrentSpeed({type:t,howMany:n,weights:i})},i.getAudioIndexFromVideo=function(t,n,i){if(0===n.length)return!1;if(!t[i])return 0;for(var e=0;e<n.length;e++){if(n[e].bitrate<8e4&&t[i].bitrate<5e5)return e;if(n[e].bitrate>144e3&&t[i].bitrate>1e6)return e}return 0},i.fi=function(t,n,i,e){var r=i/e,o=t-n*r,u=n-t/r,a=t-o,s=n-u;return o>0&&(s=n),u>0&&(a=t),[a,s]},i.ci=function(t,n,i,e){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=this.fi(t,n,i,e),u=i*e;r&&(u*=r);var a=window.devicePixelRatio||1,s=o[0]*o[1]*a*a;return u/s},i.li=function(){var t=fe(this.tt,"lookahead_count");return t&&t.group&&t.data.count?t.data.count:t&&t.data.segment_lookahead_count?t.data.segment_lookahead_count:this.MAX_LOADABLE_SEGMENTS_AUTO},i.di=function(t,n,i){var e=i&&i.bitrate>11e6;return 1===this.whitelisted.length?e?30:this.MAX_LOADABLE_SEGMENTS_LOCKED*this.SEGMENT_DURATION:this.li()*this.SEGMENT_DURATION},i.si=function(t,n,i,e){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!i)return!1;n=Math.min(n,e);for(var o=0;o<i.length;o++){var u=le(i.start(o))-r,a=le(i.end(o))+r;if(u<=t&&a>=n)return!0}return!1},i.hi=function(t){return t.video.length>0&&t.audio.length>0},i.vi=function(t,n,i,e){var r=1;return this.hi(e)&&(r=.05),this.si(t.start,t.end,n,i,r)},n}(function(){function t(t){this.scanner=t}H(t,[{key:"displayName",get:function(){return"Brain"}}]);var n=t.prototype;return n.shouldPowerUp=function(t,n){return!1},n.shouldPowerDown=function(t,n){return!1},n.canPowerUp=function(t,n){return 1!==t.length&&n<t.length-1},n.canPowerDown=function(t,n){return 1!==t.length&&n>0},n.filterStreams=function(t){return t},t}()),_r=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).BANDWIDTH_UPSWITCH_THRESHOLD=.85,i.BANDWIDTH_DOWNSWITCH_THRESHOLD=.9,i}G(n,t),H(n,[{key:"displayName",get:function(){return"Skyfire"}}]);var i=n.prototype;return i.shouldPowerUp=function(t,n,i){i&&this.tt.startingBandwidthThreshold&&(this.BANDWIDTH_UPSWITCH_THRESHOLD=this.tt.startingBandwidthThreshold);var e=t.indexOf(n);if(-1===e&&(e=0),!this.canPowerUp(t,e))return r.resolve(!1);var o=this.getCurrentSpeed();if(!o)return r.resolve(!1);var u=this.pi(o,this.BANDWIDTH_UPSWITCH_THRESHOLD,t);if(u===e)return r.resolve(!1);var a=fe(this.tt,"upswitch_health");return a&&a.group&&!i&&u>e&&ft(this.scanner.currentTime,this.scanner.J.buffered)<1.5*this.SEGMENT_DURATION?r.resolve(!1):r.resolve(u)},i.shouldPowerDown=function(t,n){var i=t.indexOf(n);if(-1===i){var e=this.isTimeInBuffer(this.scanner.J.duration,this.scanner.J.buffered,this.scanner.J.duration);return this.whitelisted.length||this.blacklisted.length||!e?r.resolve(t.length-1):r.resolve(!1)}if(!this.canPowerDown(t,i))return r.resolve(!1);var o=this.getCurrentSpeed();if(!o)return r.resolve(!1);if(this.hasTooManyDroppedFrames(i,n,this.tt.droppedFrameSwitchPercent))return r.resolve(i-1);var u=this.pi(o,this.BANDWIDTH_DOWNSWITCH_THRESHOLD,t);return u===i?r.resolve(!1):r.resolve(u)},i.hasTooManyDroppedFrames=function(t,n,i){return this.scanner.sorcerer.getDroppedFrameRate(10,t,"median")/n.framerate*100>=i&&(this.blacklist(t),!0)},i.getTimeEstimateToLoad=function(t,n){if(null===n)return 3;var i=n.segments[t],e=i.end-i.start,r=this.getCurrentSpeed();return e*(n.bitrate+n.audioBitrate)/r*1.3},i.canPlayFromTimeInStream=function(t,n){if(!this.isTimeInBuffer(t,this.scanner.J.buffered,this.scanner.J.duration))return!1;if(!n)return!1;var i=this.getSegmentsToLoad(!1,"video",n);if(0===i.length)return!0;var e=ft(t,this.scanner.J.buffered);return this.getTimeEstimateToLoad(i[0],n)<e},i.getSegmentsToLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video",i=arguments.length>2?arguments[2]:void 0,e=this.scanner.J,r=this.scanner.currentTime,o=[],u=this.di(r,e.duration,i),a=r+u,s=this.scanner.sorcerer[n].activeStreamIndex,c=this.scanner.ln[n][s];if(!c)return o;var l=this.scanner.sorcerer[n].sourceBuffer,f=null;l&&(f=l.buffered);for(var d=0;d<c.segments.length;d++){var h=c.segments[d];if(!(h.end<r||h.start>a)){var v=r>=h.start&&r<h.end,p=this.vi(h,f,this.scanner.J.duration,this.scanner.ln);!t&&p||t&&p&&v||(v||a>=h.start)&&o.push(d)}}return o},i.pi=function(t,n,i){for(var e=0,r=e;r<i.length;r++)t*n>i[r].bitrate+i[r].audioBitrate&&(e=r);return e},n}(yr),kr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).mi=e.tests.ml_brain.data.mimir_url,i.wi=e.tests.ml_brain.data.geolocation,i.bi={},i.gi=null,i.yi=[],i._i=[],i.ki=[],i.Ei=[],i.Ti=[],i.xi=[],i.Si=[],i.Ai=null,i.Mi=null,i.Ri=null,i.Ci=!1,i.Oi=!1,i.Ii=0,i.ji=[],i.scanner.on(yi.DOWNLOAD_START,i.Di.bind(Z(i))),i.scanner.on(yi.DOWNLOAD_END,i.Li.bind(Z(i))),i.scanner.on(yi.APPEND_BUFFER_END,i.Ni.bind(Z(i))),Ae.hooks.beforeRequest.push(i.Pi),Ae.hooks.afterResponse.push(i.Fi),i}G(n,t),H(n,[{key:"displayName",get:function(){return"ML"}}]);var i=n.prototype;return i.Di=function(t){var n=t.identifier;"video"===n.type&&(this.Mi={index:n.segment,streamIndex:n.stream,complete:null}),"audio"===n.type&&(this.Ri={index:n.segment,streamIndex:n.stream,complete:null})},i.Vi=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video";return"video"===n?null!==this.Mi&&this.Mi.index===t.segment&&this.Mi.streamIndex===t.stream:"audio"===n&&null!==this.Ri&&this.Ri.index===t.segment},i.Ui=function(){return null!==this.Mi||null!==this.Ri},i.Li=function(t){var n=t.identifier,i=t.data,e=i.request,r=i.response,o=e.data.duration/1e3,u=r.body.byteLength;"video"===n.type&&this.Vi(n,"video")&&(this.Mi.complete={downloadTime:o,byteLength:u,uuid:e.data.uuid},this.Oi||(this.Bi(n.stream,n.segment-1,o,u),this.Oi=!0)),"audio"===n.type&&this.Vi(n,"audio")&&(this.Ri.complete={downloadTime:o,byteLength:u,uuid:e.data.uuid})},i.Ni=function(t){var n=this,i=t.identifier,e=function(t,e,r){n.Bi(i.stream,i.segment-1,t,e,r),n.Mi=null,n.Ri=null};if(this.hi(this.scanner.ln)){if(this.Vi(i,"video")&&this.Vi(i,"audio")&&null!==this.Mi.complete&&null!==this.Ri.complete){var r=this.Mi.complete,o=this.Ri.complete;e(r.downloadTime+o.downloadTime,r.byteLength+o.byteLength,r.uuid)}}else if(this.Vi(i,"video")&&null!==this.Mi.complete){var u=this.Mi.complete;e(u.downloadTime,u.byteLength,u.uuid)}},i.Bi=function(t,n,i,e,r){var o=this.scanner.ln.video[t],u=this.scanner.sorcerer.video.sourceBuffer;u&&o&&(this.yi.push(this.getTotalBufferDuration()),this.Ei.push(ft(this.scanner.currentTime,u.buffered)),this.Ti.push(t),this._i.push(i),this.ki.push(e),this.xi.push(o.segments.length-n),this.Si.push(r))},i.handleScrubEnd=function(t){var n=this._i.length,i=n?this._i[n-1]:0,e=this.ki.length,r=e?this.ki[e-1]:0,o=this.scanner.ln.video[t],u=this.Hi(o),a=u?u.index:this.xi[this.xi.length-1],s=this.Si.length?this.Si[this.Si.length-1]:"";this.Bi(t,a,i,r,s)},i.shouldPowerUp=function(t,n,i){var e=t.indexOf(n);if(-1===e&&(e=0),1===this.whitelisted.length)return this.whitelisted[0]>e?r.resolve(0):r.resolve(!1);if(1===this.scanner.ln.video.length)return r.resolve(!1);if(!this.canPowerUp(t,e))return r.resolve(!1);if(this.scrubInProgress)return r.resolve(!1);var o=this.Hi(n);if(null===o)return r.resolve(!1);var u={index:o.index,streamIndex:o.streamIndex},a=o.index;if(null!==this.gi&&this.gi.index===u.index&&this.gi.streamIndex===u.streamIndex)return r.resolve(!1);if(!(a in this.bi))return this.zi(u,t,n).then((function(t){return t>e&&t})).catch(console.error);var s=this.bi[a];return s>e?r.resolve(s):r.resolve(!1)},i.shouldPowerDown=function(t,n){var i=t.indexOf(n);if(-1===i){var e=this.isTimeInBuffer(this.scanner.J.duration,this.scanner.J.buffered,this.scanner.J.duration);return this.whitelisted.length||this.blacklisted.length||!e?r.resolve(t.length-1):r.resolve(!1)}if(1===this.whitelisted.length)return this.whitelisted[0]<i?r.resolve(0):r.resolve(!1);if(1===this.scanner.ln.video.length)return r.resolve(!1);if(!this.canPowerDown(t,i))return r.resolve(!1);if(this.scrubInProgress)return r.resolve(!1);var o=this.Hi(n);if(null===o)return r.resolve(!1);var u={index:o.index,streamIndex:o.streamIndex},a=o.index;if(null!==this.gi&&this.gi.index===u.index&&this.gi.streamIndex===u.streamIndex)return r.resolve(!1);if(!(a in this.bi))return this.zi(u,t,n).then((function(t){return t<i&&t})).catch(console.error);var s=this.bi[a];return s<i?r.resolve(s):r.resolve(!1)},i.getTotalBufferDuration=function(){var t=this.scanner.sorcerer.video.sourceBuffer,n=0;if(!t)return n;for(var i=0;i<t.buffered.length;i++){var e=t.buffered.start(i);n+=t.buffered.end(i)-e}return n},i.canPlayFromTimeInStream=function(t,n){return!!this.isTimeInBuffer(t,this.scanner.J.buffered,this.scanner.J.duration)&&!!n},i.qi=function(t){var n=t.slice(0);if(n.length<8){for(var i=8-n.length,e=0;e<i;e++)n.unshift(0);return n}return n.slice(n.length-8,n.length)},i.Wi=function(t,n){for(var i=this,e={240:1,360:2,480:3,540:3,720:4,1080:5,1440:6,2160:7},r={240:0,360:1,480:2,540:2,720:3,1080:4,1440:5,2160:6},o=[0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0],a=0;a<n.length;a++){var s=n[a],c=parseInt(s.quality,10);c in e&&(o[e[c]]=1);var l=this.getAudioIndexFromVideo(n,this.ji,a),f=null;!1!==l&&(f=this.ji[l]);for(var d=0;d<s.segments.length;d++)if(d===t&&c in r){var h=s.segments[d].size,v=f?f.segments[d].size:0;u[r[c]]=h+v}}var p=this.Ti.map((function(t){return parseInt(i.scanner.ln.video[t].quality,10)}));return{availableQualities:o,nextChunkSizes:u,lastBufferSizes:this.qi(this.yi),lastChunkDownloadTimes:this.qi(this._i),lastChunkSizes:this.qi(this.ki),lastChunkQualities:this.qi(p),numRemainingChunks:this.qi(this.xi),lastPlaybackHeads:this.qi(this.Ei),geolocation:[[this.wi]]}},i.Gi=function(t,n){for(var i=-1,e=-1,r=0;r<t.length;r++)t[r]>e&&(e=t[r],i=r);for(var o=[],u=0;u<n.length;u++)1===n[u]&&o.push(u);return{1:240,2:360,3:540,4:720,5:1080,6:1440,7:2160}[o[i]]},i.$i=function(t,n){for(var i=0;i<n.length;i++){var e=parseInt(n[i].quality,10);if(e===t)return i;if(480===e&&540===t)return i}return 0},i.Pi=function(t){t.startTime=ie()},i.Fi=function(t,n){return n.duration=ee(t.startTime),n},i.zi=function(t,n,i){var e=this,r=this.Wi(t.index,n);return this.gi=t,Ke.post(this.mi,{json:{inputs:r},timeout:2e3}).then((function(i){var o=JSON.parse(i.body),u=e.Gi(o.outputs[0],r.availableQualities),a=e.$i(u,n);if(e.bi[t.index]=a,e.Si.length&&e.Ai){var s=e.Si[e.Si.length-1];e.scanner.fire(Ti.BRAIN_ML_MODEL_INPUTS,W({chunkRequestID:s,duration:i.duration,geolocation:e.wi},e.Ai))}return e.Ai=r,e.gi=null,a})).catch((function(n){if(n instanceof Ce){var i={status:n.response.status,resp:n.response.body,url:e.mi};e.scanner.fire(Ti.BRAIN_ML_MODEL_ERR,i),e.Ii++}if(n instanceof Ie){var r={url:e.mi};e.scanner.fire(Ti.BRAIN_ML_MODEL_TIMEOUT,r),e.Ii++}if(n instanceof Oe){var o={url:e.mi};e.scanner.fire(Ti.BRAIN_ML_MODEL_NET_ERR,o),e.Ii++}e.Ii>=2&&e.scanner.resetBrain(!0);var u=t.streamIndex;return e.bi[t.index]=u,e.gi=null,u}))},i.Hi=function(t){var n=this.scanner.sorcerer.video.sourceBuffer,i=null;if(n&&(i=n.buffered),null===i)return null;for(var e=this.Ki(t),r=0;r<e.length;r++){var o=e[r].segment;if(!this.vi(o,i,this.scanner.J.duration,this.scanner.ln))return e[r]}return null},i.Ki=function(t){var n=this.scanner.J,i=this.scanner.currentTime,e=i+this.di(i,n.duration,t),r=[],o=this.scanner.sorcerer.video.activeStreamIndex,u=this.scanner.ln.video[o];if(!u)return r;for(var a=0;a<u.segments.length;a++){var s=u.segments[a];s.end<i||s.start>e||(i>=s.start&&i<s.end||e>=s.start)&&r.push({segment:s,index:a,streamIndex:o})}return r},i.Yi=function(t,n){var i=this;Object.keys(this.bi).filter((function(n){return-1===t.indexOf(parseInt(n,10))})).forEach((function(t){var e=i.bi[t],r=i.scanner.ln.video[e].segments[t];i.vi(r,n,i.scanner.J.duration,i.scanner.ln)||delete i.bi[t]}))},i.getSegmentsToLoad=function(t,n,i){var e=this.Ki(i),r=this.scanner.sorcerer[n].sourceBuffer,o=null;r&&(o=r.buffered),this.Yi(e.map((function(t){return t.index})),o);for(var u=[],a=0;a<e.length;a++){var s=e[a].segment,c=e[a].index,l=this.vi(s,o,this.scanner.J.duration,this.scanner.ln),f=c in this.bi;l||!f&&1!==this.whitelisted.length&&1!==this.scanner.ln.video.length||u.push(c)}return u},H(n,[{key:"audioStreams",set:function(t){this.ji=t}},{key:"scrubInProgress",set:function(t){this.Ci=t},get:function(){return this.Ci}}]),n}(yr),Er=function(){function t(t,n){this.J=t,this.Ji=n}var n=t.prototype;return n.start=function(){return clearInterval(this.Xi),this.Xi=setInterval(this.Zi.bind(this),200),this.Zi()},n.stop=function(){clearInterval(this.Xi)},n.Zi=function(){var t=this.J.buffered,n=this.J.currentTime,i=this.Qi(t,n);if(0===this.J.readyState)return!1;if(this.J.seeking)return!1;if(this.J.paused)return!1;var e=this.J.duration;if(n>=e)return this.J.currentTime=e-.1,!0;if(t.length<=i)return!1;var r=t.start(i);return!(r>=e)&&(0===i&&(this.stop(),this.te("audio",r),this.te("video",r),this.J.currentTime=r,!0))},n.Qi=function(t,n){if(!t||!t.length)return null;for(var i=0;i<t.length;i++){var e=t.start(i),r=t.end(i);if(e>n&&(0===i||r-n<=.1))break}return i>=0?i:null},n.te=function(t,n){var i=this.Ji(0,t);i&&i.segments&&i.segments[0]&&(i.segments[0].start=n)},t}(),Tr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).reset(),i.manifestLoadDurations=[],e.mediaSourceScanner&&(i.ne=e.mediaSourceScanner.maxPreloadStreamIndex),i}G(n,t),H(n,null,[{key:"displayName",get:function(){return"MediaSourceScanner"}},{key:"supported",get:function(){return"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported}},{key:"supportedVideoTypes",get:function(){return["application/vnd.vimeo.dash+json","video/vnd.mpeg.dash.mpd"]}}]);var i=n.prototype;return i.deactivate=function(){t.prototype.deactivate.call(this),this.sorcerer&&this.sorcerer.destroy(),this.reset()},i.reset=function(){this.ee=new xe,this.re={},this.oe=new Er(this.J,this.Ji.bind(this)),this.resetBrain(),this.ue=!1,this.ae=!1,this.At=null,this.ln={},this.ln.audio=[],this.ln.video=[],this.ji=[],this.se=null,this.ce=null,this.le=null,this.fe=null,this.de=null,this.he=null,this.ve=!1,this.pe=null,this.me=!1,this.we=!1,this.be=null,this.ge=null,this.ye=!1,this._e=[],this.ke={},this.Ee=0,this.Te=null,clearInterval(this.xe),clearTimeout(this.Se)},i.resetBrain=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.tt.mediaSourceScanner||{};if(n.tests=this.tt.tests,t){var i=de(this.Ae);return this.Ae=new _r(this,n),void(i&&this.fire(Ti.BRAIN_ML_SWITCH_TO_SKYFIRE))}this.Ae=new _r(this,n);var e=fe(n,"ml_brain");e&&e.group&&e.data.use_model&&(this.Ae=new kr(this,n))},i.preloadStream=function(){var t=this;if(this.be)return this.be;var n=0,i=1;this.ln.audio.length&&(i=2);var e=this.sorcerer.video.activeStreamIndex;this._e.length&&(e=this._e[0]);var o=0,u=this.Ae.getSegmentsToLoad(!1,"video",e);u.length>0&&(o=u[0]);var a=function(){},s=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n&&(e=t.sorcerer.video.activeStreamIndex),t.Te=e,t.Me(!0)},c=function(e){(n+=1)<i||(e.segment===o&&0===t._e.length?t.Re(!0).then((function(i){if(!1!==i&&i>e.stream){if(t.sorcerer.video.switchTo(i,!1),t.ln.audio.length){var r=t.Ae.getAudioIndexFromVideo(t.ln.video,t.ln.audio,i);t.sorcerer.audio.switchTo(r,!1)}return n=0,void s(!0)}a()})).catch(console.error):a())};return this.be=new r((function(n,i){a=function(){var i=t.Ji(e).segments[0].end,r=t.Ce(!0);if(t.currentTime>=r&&(t.currentTime=r),t.currentTime>i&&(t.sorcerer.clear(),t.ee=new xe),t.sorcerer.video.switchTo(e,!1),t.ln.audio.length){var o=t.Ae.getAudioIndexFromVideo(t.ln.video,t.ln.audio,e);t.sorcerer.audio.switchTo(o,!1)}t.sorcerer.off("bufferqueueadd",c),t.Te=null,t.ue=!0,n()},t.sorcerer.on("bufferqueueadd",c),s()})),this.be},i.loadManifest=function(t){var n=this,i=Date.now();return Fi.browser.ie&&t&&-1!==t.indexOf("archive_playlist")?(setTimeout((function(){n._t("MediaUnknownError","An unknown error occurred.")}),250),new r((function(){}))):Ke({url:t,timeout:1e4,type:Se.MANIFEST}).then((function(e){return e.url&&e.url!==t&&-1!==e.url.indexOf("live-archive")&&(n.ce=e.url.split("/").slice(0,-2).join("/")),n.manifestLoadDurations.push({url:t,status:e.status,duration:Date.now()-i}),n.fire(yi.MANIFEST_LOADED),e.text()})).then(function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}((function(n){var i;return function(e,o){var u=function(){if(-1!==t.indexOf(".mpd"))return function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(st("module/media-manifest.js"),(function(e){var r=e.parseMPD;i=r(n,t)}));i=JSON.parse(n)}();return u&&u.then?u.then(o):o()}(0,(function(){return i}))}))).catch((function(e){if(n.manifestLoadDurations.push({url:t,status:e.response&&e.response.status,duration:Date.now()-i}),n.reset(),e instanceof Ce&&410===e.response.status)return n.fire(yi.MEDIA_URL_EXPIRED),new r((function(){}));throw e instanceof Ce&&400===e.response.status?n.fire(yi.MEDIA_URL_BAD_REQUEST,e.response.url):e instanceof Ie&&n.fire(yi.MANIFEST_TIMEOUT),e}))},i.setVideoSrc=function(t,n){var i=this,e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&!n&&this.se){if(("metadata"===this.at||"none"===this.at&&!this.paused)&&!this.ue)return void this.se.then((function(){var n=i.paused;i.setVideoSrc(t,n,!1)})).catch(console.error);if("auto"===this.at)return void this.se.then((function(){i.setVideoSrc(t,!1,!1)})).catch(console.error)}n&&this.reset(),n||!this.paused||this.sorcerer||(n=!0);var r=this.Oe;n&&(r=this.Vt);var o=t.split("/");o.pop();var u="".concat(o.join("/"),"/");this.ve=!n,this.se=this.Ie(t,this.at).then(this.loadManifest.bind(this)).then((function(t){return"string"==typeof i.ce&&-1!==i.ce.indexOf("live-archive")||(i.ce=u),t})).then(r.bind(this)),n&&"auto"===this.at&&(this.se=this.je(this.se,this.preloadStream.bind(this),!1)),this.se=this.De(this.se)},i.getBitrateAtTime=function(t,n){if(!this.sorcerer)return 0;var i=this.sorcerer.streamIndexAtTime(t,n);return this.ln[n][i]?this.ln[n][i].bitrate:0},i.lockStreamIndexes=function(){var t=this,n=this._e.map((function(n){return t.ln.video.indexOf(t.ln.video[n])})),i=!this.paused;if(i&&(this.Le=!0,this.J.pause()),this.ke.video=!1,this.Ae.lock(n),this.ae||"auto"===this.at){var e=Math.max(this.currentTime-7,0),r=Math.min(this.currentTime+7,this.J.duration);this.sorcerer.removeBuffer(e,r).then((function(){!t.ae&&"auto"===t.at||t.ended?t.Ne():(t.seekToTime(t.currentTime),i&&t.paused&&(t.Pe=!0,t.J.play()))})).catch(console.error)}},i.seekToTime=function(t){var n=this;if(t===this.currentTime)return r.resolve();var i=null===this.fe;if(i||(this.Fe&&(this.Fe(),this.Fe=null),this.Ve=null,this.fe=null,this.de=null),this.fe=t,this.Ue(),this.ue)for(var e in this.ln)if(this.ln[e].length>0){var o=this.sorcerer[e].activeStreamIndex;this.sorcerer[e].streams[o].abort()}return this.Ve=this.Be(t),r.all([this.se,this.ge]).then((function(){n.Ne()})).catch(console.error),this.He&&0===t&&this.fire(wi.SEEKING),i||this.play().catch(this.ft.bind(this)),this.se.then((function(){return n.Ve})).catch((function(t){}))},i.takeSnapshot=function(){},i.initDrm=function(){},i.onstalled=function(){return!1},i.onseeked=function(t){this.ae&&this.Me()},i.onended=function(n){return t.prototype.onended.call(this,n),!0},i.onseeking=function(t){this.ae},i.Ue=function(){var t=this;this.ze(),clearTimeout(this.qe),this.qe=setTimeout((function(){t.We()}),200)},i.ze=function(){this.Ge||(this.Ge=!0,de(this.Ae)&&(this.Ae.scrubInProgress=!0))},i.We=function(){if(this.Ge=!1,de(this.Ae)){this.Ae.scrubInProgress=!1;var t=this.sorcerer.video.activeStreamIndex;this.Ae.handleScrubEnd(t),this.Ne()}},i.ontimeupdate=function(n){if(!this.sorcerer)return!1;if(t.prototype.ontimeupdate.call(this),this.oe.stop(),0===this.currentTime)return this.ae;if(this.fe)return!1;this.ae||(this.ae=!0),this.we&&this.currentTime>=this.we&&(this.sorcerer.removeBuffer(0,this.we-2),this.we=!1);var i=this.sorcerer.getDroppedFrameTotal();this.fire(yi.DROPPED_FRAMES,i);var e=this.sorcerer.getResponseSpeeds(),r=this.ln.video[this.sorcerer.video.activeStreamIndex],o=this.tt.tests&&this.tt.tests.download_bitrate;if((!o||!o.group)&&r&&this.Ae.getCurrentSpeed){var u={speed:this.Ae.getCurrentSpeed(),bitrate:r.bitrate,speeds:e};this.fire(yi.BANDWIDTH,u)}var a=this.J.buffered.length;if(!a)return!0;var s=this.J.buffered.end(a-1);return Math.ceil(s)===Math.ceil(this.J.duration)||(Math.abs(this.currentTime-s)<.2?(this.ye||(this.fire(yi.STREAM_BUFFER_START,{hasLowerStreamIndex:this.sorcerer.video.activeStreamIndex>0}),this.ye=!0),!1):void 0)},i.$e=function(){return!!this.ended||Math.ceil(this.currentTime)===Math.ceil(this.J.duration)},i.Ke=function(){return!!this.sorcerer&&!this.$e()&&(null!==this.Te?(this.Ye(),!0):0!==this.currentTime||this.ue?(this.Ne(),!0):this.ae)},i.onprogress=function(){this.Ae.canPlayFromTimeInStream(this.currentTime,this.Ji())&&this.ye&&(this.fire(yi.STREAM_BUFFER_END),this.ye=!1)},i.onwaiting=function(){return!this.oe.start()},i.onerror=function(){return!!this.J.error&&(this.J.error.code===this.J.error.MEDIA_ERR_DECODE?(this.fire(yi.SCANNER_ERROR,{reason:"encountered media decode error"}),!1):t.prototype.onerror.call(this))},i.pause=function(){t.prototype.pause.call(this)},i.play=function(){var n=this;return this.Me(),t.prototype.play.call(this,(function(){return n.he&&n.he(),n.ve||n.ue||"auto"===n.at||(n.se=n.je(n.se,n.preloadStream.bind(n))),n.se.then((function(){return r.resolve(n.Ve)}))}))},i.onpause=function(){return this.Le?(this.Le=!1,!1):(t.prototype.onpause.call(this),!0)},i.onplay=function(){return!this.Pe||(this.Pe=!1,!1)},i.je=function(t,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],e=t.then(n);return i&&(e=this.De(e)),e},i.De=function(t){var n=this;return t.catch((function(t){return n.fire(yi.FILE_ERROR,{reason:t}),new r((function(t,n){}))}))},i.Je=function(){this.ue&&this.ln.video[this.sorcerer.video.activeStreamIndex].bitrate/1e3>12e3&&(this.ge=this.sorcerer.removeBuffer())},i.Ie=function(t,n){var i=this;return new r((function(e,r){"none"!==n||i.ve&&!i.paused?e(t):i.he=function(){e(t),i.he=null}}))},i.Be=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.fe;return new r((function(i,e){var r=t.ae&&0===n,o=t.Ae.canPlayFromTimeInStream(n,t.Ji());r||o?i(n):(t.Je(),t.de=i)})).then((function(n){t.fe=null,t.Ve=null;var i=new r((function(n,i){t.Fe=i,t.J.addEventListener("seeked",(function i(){n(t.J.currentTime),t.J.removeEventListener("seeked",i)}))}));return t.J.currentTime=n,i}))},i.Xe=function(t,n){"auto"!==t&&"auto"===n&&(this.se=this.je(this.se,this.preloadStream.bind(this))),t!==n&&"none"!==n&&this.he&&this.he()},i.Ze=function(t){var n=t.audio.reduce((function(t,n){return t+n.duration}),0),i=t.video.reduce((function(t,n){return t+n.duration}),0),e=n/t.audio.length,r=i/t.video.length;return e+4<r?r-e:0},i.Qe=function(t){return t.video.every((function(t){return t.segments.every((function(t){return"size"in t}))}))},i.Oe=function(t){var n=this;return new r((function(i,e){if(n.At=t,n.ln.video=n.tr(t.video),t.audio){var r=n.Ze(t);if(r>0)return n.fire(yi.AV_DURATION_MISMATCH,r),n.fire(yi.SCANNER_ERROR,{reason:"Encountered A/V duration mismatch"}),void e();n.ln.audio=n.tr(t.audio)}for(var o=0;o<n.ln.video.length;o++){var u=0;if(t.audio){var a=n.Ae.getAudioIndexFromVideo(n.ln.video,n.ln.audio,o),s=n.ln.audio[a];s&&(u=s.bitrate)}n.ln.video[o].audioBitrate=u}de(n.Ae)&&n.ln.audio.length>0&&(n.Ae.audioStreams=n.ln.audio),n.nr(n.ln.video,n.ln.audio,n.At.key_info),n.Qe(t)||n.resetBrain(!0),n.fire(yi.STREAMS_LOADED,n.ln),i()}))},i.ir=function(t,n){this.sorcerer&&this.sorcerer.destroy(),this.sorcerer=new gr(t,n),this.J.src=URL.createObjectURL(this.sorcerer.mediaSource),this.successfulSegments=this.sorcerer.getSuccessfulSegments(),this.failedSegments=this.sorcerer.getFailedSegments(),this.Me()},i.Me=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.er(500),clearTimeout(this.Se),this.Se=setTimeout((function(){t.er(5e3)}),6e4),n&&this.Ke()},i.er=function(t){var n=this;clearInterval(this.xe),this.xe=setInterval((function(){n.Ke()}),t)},i.Ce=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t?1/0:0;for(var i in this.ln)this.ln[i].length&&(n=Math[t?"min":"max"](n,this.ln[i][0].duration));return n},i.Vt=function(t){var n=this;return this.Oe(t).then((function(){var i=n.video&&n.video.metadata.percentShown?n.video.metadata.percentShown:null,e=n.Ae.filterStreams(n.ln.video,n.J.clientWidth,n.J.clientHeight,i).length-1,r=n.ln.video[0];n._e.length&&(r=n.ln.video[n._e[0]]),void 0!==n.ne&&e<=n.ln.video.indexOf(t.video[n.ne])&&(r=n.ln.video[e]),n.ir(n.J,{duration:n.Ce(),fetcherTimeout:8e3,fetcherRetryAbortErrors:!1}),n.sorcerer.on("srcnotsupported",(function(){n.fire(yi.SCANNER_ERROR,{reason:"this codec is not supported for mediasource playback"})}));var o=n.ln.video.indexOf(r),u=function(t){n.ln[t].forEach((function(i,e){var r=n.rr(e,"init",t);n.or(e,t)&&n.ln[t][e].init_segment_range&&(r={url:r,byteRange:n.ur(e,"init",t)}),n.sorcerer.addStream("".concat(i.mime_type,'; codecs="').concat(n.ln[t][e].codecs,'"'),r)}))};for(var a in n.ln)u(a);n.sorcerer.video.switchTo(o),n.sorcerer.on("queued",n.ar.bind(n)),n.sorcerer.on("downloadabort",n.sr.bind(n)),n.sorcerer.on("appendbufferend",n.Ni.bind(n)),n.sorcerer.on("downloadstart",n.Di.bind(n)),n.sorcerer.on("downloadend",n.Li.bind(n)),n.sorcerer.on("downloaderror",n.cr.bind(n)),n.sorcerer.on("downloadtimeout",n.lr.bind(n)),n.sorcerer.on("quotaexceedederror",n.dr.bind(n)),n.sorcerer.video.on("streamchange",n.hr.bind(n)),n.sorcerer.video.on("streamchangestart",n.pr.bind(n)),n.sorcerer.mediaSource.addEventListener("sourceended",(function(){n.fire(wi.PROGRESS)}))}))},i.tr=function(t){var n=t.slice(0);return n.sort((function(t,n){var i=t.width*t.height*t.bitrate,e=n.width*n.height*n.bitrate;return t.width===n.width&&t.height===n.height?t.framerate-n.framerate:i-e})),n},i.or=function(t,n){return!!this.ln[n][t].segments[0].range},i.ur=function(t,n,i){return"init"===n?this.ln[i][t].init_segment_range:this.ln[i][t].segments[n].range},i.mr=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"video",e="init"===n;if(e)return 0;var r=this.ln[i][t].segments[n].start;return r},i.rr=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"video",e="init"===n;if(e&&!this.ln[i][t].init_segment_range&&-1===this.ln[i][t].init_segment.indexOf(".")){var r=this.ln[i][t].init_segment;return ue(r)}var o=this.ce,u=this.At.base_url&&-1!==this.At.base_url.indexOf("//");return u&&(o=this.At.base_url),this.At.base_url&&!u&&(o+=this.At.base_url),this.ln[i][t].base_url&&(o+=this.ln[i][t].base_url),this.or(t,i)?o:"init"===n?o+=this.ln[i][t].init_segment:(this.ln[i][t].segments[n].url&&(o+=this.ln[i][t].segments[n].url),o)},i.wr=function(t,n,i){return"".concat(t,":").concat(n,":").concat(i)},i.br=function(t,n,i){return n===this.ln[i][t].segments.length-1},i.gr=function(t,n){var i=[],e=this.re[t];if(!e)return i;for(var r=0;r<e.length;r++)this.ee.has(this.wr(e[r],t,n))&&i.push(e[r]);return i},i.Ji=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video";return void 0!==this.sorcerer&&(t=this.sorcerer[n].activeStreamIndex),this.ln[n][t]},i.Re=function(t,n){var i=this,e=this.ln.video,o=this.video&&this.video.metadata.percentShown?this.video.metadata.percentShown:null;if(0===(e=this.Ae.filterStreams(e,this.J.clientWidth,this.J.clientHeight,o)).length)return r.resolve(!1);if(this.ke.video&&!de(this.Ae))return r.resolve(!1);var u=e[e.length-1];if(u.id!==this.le){this.le=u.id;var a={index:this.ln.video.indexOf(u),streams:this.ln.video};this.fire(yi.STREAM_TARGET_CHANGE,a)}var s=this.Ji();return this.Ae.shouldPowerUp(e,s,t).then((function(t){return!1===t?i.Ae.shouldPowerDown(e,s).then((function(t){return!1===t?t:i.ln.video.indexOf(e[t])})):i.ln.video.indexOf(e[t])}))},i.yr=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"video";this.Re(!1,n).then((function(i){"audio"===n&&(!1===i&&(i=t.sorcerer.video.activeStreamIndex),i=t.Ae.getAudioIndexFromVideo(t.ln.video,t.ln.audio,i),t.sorcerer.audio.activeStreamIndex===i&&(i=!1));var e=!1;!1!==i&&(e=i>t.sorcerer[n].activeStreamIndex,t.ke[n]=!0,t.sorcerer[n].switchTo(i).then((function(){t.ke[n]=!1})).catch(console.error));for(var r=e,o=t.Ae.getSegmentsToLoad(r,n,t.Ji()),u=t.sorcerer[n].activeStreamIndex,a=function(i){var e=t.rr(u,o[i],n),r=t.gr(o[i],n);if(r.length>1)return"continue";if(1===r.length&&u<=r[0])return"continue";var a=t.br(u,o[i],n),s={stream:u,segment:o[i],type:n},c=t.sorcerer[n].streams[u],l=e;t.or(u,n)&&(l={url:l,byteRange:t.ur(u,o[i],n)});var f=t.mr(u,o[i],n),d="video"===n,h=null;0===u&&"video"===n&&(h=16e3);var v=null;try{v=t.ln[n][u].segments[o[i]].size}catch(t){}c.addSegment(l,{identifier:s,isFinalSegment:a,priority:f,includeWithBandwidthChecks:d,timeout:h,size:v}).catch((function(t){if(!(t instanceof Re))throw t}))},s=0;s<o.length;s++)a(s)})).catch(console.error)},i.Ye=function(){var t=this,n=function(n){if(0===t.ln[n].length)return"continue";var i=0,e=t.Ae.getSegmentsToLoad(!1,n,t.Ji());e.length>0&&(i=e[0]);var r=t.Te;"audio"===n&&(r=t.Ae.getAudioIndexFromVideo(t.ln.video,t.ln.audio,t.Te));var o=t.wr(r,i,n);if(t.ee.has(o))return"continue";var u=t.rr(r,i,n),a=t.br(r,i,n),s=t.sorcerer[n].streams[r],c={stream:r,segment:i,type:n},l=u;t.or(r,n)&&(l={url:l,byteRange:t.ur(r,i,n)}),s.addSegment(l,{identifier:c,isFinalSegment:a,loadOnly:!0,priority:0}).catch((function(t){if(!(t instanceof Re))throw t}))};for(var i in this.ln)n(i)},i.Ne=function(){var t=this;return this.se&&this.se.then((function(){for(var n in t.ln)t.ln[n].length>0&&t.yr(n)}))},i.ar=function(t){this.ee.add(this.wr(t.stream,t.segment,t.type)),this.re[t.segment]||(this.re[t.segment]=[]),-1===this.re[t.segment].indexOf(t.stream)&&this.re[t.segment].push(t.stream)},i._r=function(t){var n=this;(this.re[t.segment]||[]).forEach((function(i){n.ee.delete(n.wr(i,t.segment,t.type))}))},i.sr=function(t){this.re[t.segment]&&this._r(t)},i.Ni=function(t){this.fire(yi.APPEND_BUFFER_END,{identifier:t}),this.Me(),this.me&&t.stream===this.pe&&(this.me=!1,this.we=this.ln.video[t.stream].segments[t.segment].start),this.re[t.segment]&&this._r(t);var n=this.Ae.canPlayFromTimeInStream(this.fe,this.Ji());null!==this.fe&&this.de&&n&&(this.de(this.fe),this.de=null)},i.Di=function(t){this.fire(yi.DOWNLOAD_START,{identifier:t})},i.Li=function(t,n){this.fire(yi.DOWNLOAD_END,{identifier:t,data:n})},i.cr=function(t,n){this._r(t);var i=yi.DOWNLOAD_ERROR;410===n&&(i=yi.MEDIA_URL_EXPIRED),this.fire(i,{identifier:t,status:n})},i.lr=function(t,n){this.fire(yi.DOWNLOAD_TIMEOUT,{identifier:t,data:n}),this.re[t.segment]&&this._r(t),"video"===t.type?this.ke.video=!1:"audio"===t.type&&(this.ke.audio=!1)},i.dr=function(t){this.fire(yi.QUOTA_EXCEEDED_ERROR,{buffered:t})},i.pr=function(t,n){var i={previousStreamIndex:this.At.video.indexOf(this.ln.video[t]),index:this.At.video.indexOf(this.ln.video[n]),streams:this.At.video};this.fire(yi.STREAM_CHANGE_START,i)},i.hr=function(t){t>this.pe&&this.currentTime>0&&(this.me=!0),this.pe=t;var n={index:this.At.video.indexOf(this.ln.video[t]),streams:this.At.video};this.fire(yi.STREAM_CHANGE,n)},i.nr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.nt.drmHandler){var e={audio:n.map((function(t){return"".concat(t.mime_type,';codecs="').concat(t.codecs,'"')})),video:t.map((function(t){return"".concat(t.mime_type,';codecs="').concat(t.codecs,'"')}))};this.nt.drmHandler.init(this,e,i)}},H(n,[{key:"preload",get:function(){return this.at},set:function(t){this.Xe(this.at,t),this.at=t}},{key:"videoElement",get:function(){return this.J}},{key:"videoWidth",get:function(){var t=this.Ji();return t?t.width:this.J.videoWidth}},{key:"videoHeight",get:function(){var t=this.Ji();return t?t.height:this.J.videoHeight}},{key:"restrictedStreamIndexes",get:function(){return this._e},set:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._e.join(",")!==n.join(",")&&(this._e=n,this.se.then((function(){return t.lockStreamIndexes()})).catch(console.error))}},{key:"currentTime",get:function(){return null!==this.fe?this.fe:this.J.currentTime},set:function(t){(this.ae||0!==t)&&this.seekToTime(t)}},{key:"downloadSpeed",get:function(){return this.Ee}},{key:"brainDebug",get:function(){var t=this.Ae.getCurrentSpeed?this.Ae.getCurrentSpeed():null,n=this.sorcerer.getResponseSpeeds();return{currentSpeed:t,responseSpeeds:n=n?n.slice(-20):[]}}},{key:"isLowerProfileAvailable",get:function(){return this.sorcerer?this.sorcerer.video.activeStreamIndex>0:null}}]),n}(Ee),xr=[1,2,5],Sr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).kr=.4,i.Er=.6,i.Tr=i.tt.tests&&i.tt.tests.live_volatility&&i.tt.tests.live_volatility.group,i.consecutiveStreamIndex={},i.isNewPlayback=!0,i}G(n,t),H(n,[{key:"displayName",get:function(){return"Live"}}]);var i=n.prototype;return i.optimalStreamIndex=function(t,n){if(this.isNewPlayback&&this.scanner.sorcerer.getResponseSpeeds().length>=2&&(this.isNewPlayback=!1),1===t.length)return 0;if(this.isNewPlayback){for(var i=0,e=0,r=this.scanner.videoElement.clientHeight,o=[],u=0;u<t.length;u++){var a=t[u].height;o.push(a),a<r&&a>e&&(i=u,e=t[u].height)}return Math.max(0,i-1)}var s=this.scanner.sorcerer.getCurrentSpeed({type:"average",howMany:5,weights:xr}),c=this.scanner.sorcerer.getVolatilityScaler(5);c||(c=.3);var l=n,f=n;if(this.Tr)for(var d=0;d<t.length;d++)s*this.kr*c>t[d].bandwidth&&(l=d),s*this.Er*c>t[d].bandwidth&&(f=d);else for(var h=0;h<t.length;h++)s*this.kr>t[h].bandwidth&&(l=h),s*this.Er>t[h].bandwidth&&(f=h);var v=n<l?l:f;this.xr(v),this.consecutiveStreamIndex[v]++;var p=1.5*this.scanner.segmentLength,m=this.scanner.videoElement,w=m.buffered;return w&&0!==w.length?w.end(w.length-1)-m.currentTime<p?0!==n?n-1:0:this.consecutiveStreamIndex[v]>2&&v!==n?v:n:0},i.xr=function(t){for(var n in this.consecutiveStreamIndex[t]||(this.consecutiveStreamIndex[t]=0),this.consecutiveStreamIndex)this.consecutiveStreamIndex.hasOwnProperty(n)&&parseInt(n,10)!==t&&(this.consecutiveStreamIndex[n]=0)},i.getSegmentsToLoad=function(t,n){var i=this.scanner.videoElement,e=this.scanner.sorcerer[t].sourceBuffer;if(dt(i.currentTime,e&&e.buffered)>=this.scanner.bufferTarget)return[];var r=this.Sr(),o=this.Ar(),u=n.segments.sort((function(t,n){return t.index-n.index}));return!this.Mr&&r<u[0].start?[]:(this.Mr=!0,u.filter((function(t){return!(t.end<r||t.start>o)})))},i.Sr=function(){var t=this.Rr(),n=this.scanner.manifest.maxEndTime-t;return Math.max(0,n)},i.Ar=function(){var t=this.Rr(),n=this.scanner.bufferTarget,i=this.scanner.manifest.maxEndTime-Math.max(0,t-n);return Math.max(0,i)},i.Rr=function(){return this.scanner.presentationDelay||this.scanner.manifest.presentationDelay},n}(_r),Ar=["disabled","hidden","showing"],Mr=["subtitles","captions","descriptions","chapters","metadata"],Rr=["ar","fa","he","iw","ku","ps","sd","ur","yi"],Cr=new N,Or=new N,TelecineTextTrack=function(){function TelecineTextTrack(t,n){var i=t.kind,e=t.src,r=void 0===e?null:e,o=t.label,u=void 0===o?"":o,a=t.language,s=void 0===a?"":a,c=t.id,l=void 0===c?re():c;if(-1===Mr.indexOf(i))throw pe(12,"SYNTAX_ERR","Syntax Error");nt(this),Object.defineProperties(this,{kind:{value:i,enumerable:!0},label:{value:u,enumerable:!0},language:{value:s,enumerable:!0},id:{value:"".concat(l),enumerable:!0},rtl:{value:-1!==Rr.indexOf(s.substr(0,2)),enumerable:!0}}),this.video=n,this.src=r,this.ht=!1,Cr.set(this,"disabled")}return TelecineTextTrack.prototype.dispatchEvent=function(t){this.fire(t,{target:this})},H(TelecineTextTrack,[{key:"mode",get:function(){return Cr.get(this)},set:function(t){if(Ar.indexOf(t)>-1){if(this.ht=!0,Cr.get(this)===t)return;Cr.set(this,t),this.video.currentScanner&&this.video.currentScanner.setModeForTrack(this,t),this.dispatchEvent("modechange")}}},{key:"src",get:function(){return Or.get(this)},set:function(t){Or.set(this,t),this.video.fire(yi.TEXT_SRC_UPDATE,this)}},{key:"cues",get:function(){return this.video.currentScanner?this.video.currentScanner.getCuesForTrack(this):[]}},{key:"activeCues",get:function(){return this.video.currentScanner?this.video.currentScanner.getActiveCuesForTrack(this):[]}}]),TelecineTextTrack}();function Ir(t){var n=/^(?:(\d{2,}):)?(\d{2}):(\d{2})[,.](\d{3})$/.exec(t);if(!n)return-1;var i=parseInt(n[4],10)/1e3;return i+=parseInt(n[3],10),n[2]&&(i+=60*parseInt(n[2],10)),n[1]&&(i+=60*parseInt(n[1],10)*60),i}function jr(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}function Dr(t,n){try{var i=t()}catch(t){return n(t)}return i&&i.then?i.then(void 0,n):i}function Lr(t,n){return t&&t.then?t.then(n):n(t)}var Nr=Fi.browser.ie||Fi.browser.edge?.5:.2;function Pr(){}function Fr(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}var Vr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).Cr=!1,i.Or=!1,i.Ir=2e3,i.jr=1e4,i.reset(),i.bufferTarget=e.bufferTarget||12,i.presentationDelay=e.presentationDelay||12,window.addEventListener("online",(function(){i.play()})),i}G(n,t),H(n,null,[{key:"displayName",get:function(){return"HLSLiveScanner"}},{key:"supported",get:function(){return"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported}},{key:"supportedVideoTypes",get:function(){return["application/x-mpegURL"]}},{key:"supportsPlaybackRate",get:function(){return!1}}]);var i=n.prototype;return i.deactivate=function(){t.prototype.deactivate.call(this),this.reset()},i.reset=function(){this.in&&this.in.destroy(),this.Dr&&this.Dr.stop(),this.Lr=new lt,this.in=null,this.ln={},this.ln.video=[],this.ln.audio=[],this.pe=0,this.Nr=!1,this.Pr=!1,this.Fr=!1,this.Vr=0,this.Ur=0,this.Br=0,this.Hr=new Sr(this,this.tt),this._e=[],this.zr={},this.qr=0,this.Wr=0},i.endLive=function(){this.Nr=!1,this.Dr&&this.Dr.stop(),this.in&&(this.in.abortFetches(),this.in.endOfStream()),this.Pr=!0,t.prototype.deactivate.call(this),this.fire(wi.ENDED)},i.Gr=function(){this.Nr||(this.Nr=!0,this.fire(_i.STREAM_ONLINE))},i.$r=function(){this.Nr&&(this.Nr=!1,this.fire(_i.STREAM_OFFLINE))},i.Kr=function(t){t?this.Gr():this.$r()},i.Yr=function(t){try{var n=this;if(n.Pr)return;n.Dr&&(n.Dr.stop(),n.Dr.off());var i=[st("module/media-manifest.js")];return n.video.metadata.p2p&&i.push(st("module/streamroot.js")),jr(r.allSettled(i),(function(i){var e=Q(i,1)[0].value,r=e.M3U8Loader,o=e.PLAYLIST_UPDATE,u=e.PLAYLIST_ERROR;return n.Dr=new r,n.Dr.on(o,(function(){return n.Jr()})),n.Dr.on(u,(function(){return n.$r()})),Lr(Dr((function(){var i=n.video.metadata.playlistRefreshUrl;return jr(n.Dr.start(t,i),(function(t){n.At=t,n.Gr()}))}),(function(t){throw n.$r(),n.endLive(),t})),(function(t){n.Xr(n.J),n.ln.video=n.Zr(n.tr(n.At.video)),n.ln.video.forEach((function(t){n.in.addStream(ce(t.mimeType,t.codecs),t.initSegment)})),n.At.audio&&(n.ln.audio=n.Zr(n.tr(n.At.audio)),n.ln.audio.forEach((function(t){n.in.addStream(ce(t.mimeType,t.codecs),t.initSegment)}))),n.fire(yi.STREAMS_LOADED,n.ln),n.manifest.captions&&n.manifest.captions.length>0&&(n.manifest.captions.forEach(n.Qr.bind(n)),n.fire(yi.TEXT_TRACKS_AVAILABLE)),n.to(),n.no(!0)}))}))}catch(t){return r.reject(t)}},i.io=function(){try{var t=this;return function(t){if(t&&t.then)return t.then(Pr)}(Dr((function(){var n=t.Ji();return jr(t.Dr.update(n.uri),(function(){t.Gr()}))}),(function(){t.$r()})))}catch(t){return r.reject(t)}},i.Xr=function(t){this.in&&this.in.destroy(),this.in=new gr(t,{fetcherRetryAbortErrors:!1})},i.to=function(){this.in.video.on("streamchange",this.hr.bind(this)),this.in.on("downloadend",this.Li.bind(this)),this.in.on("downloadtimeout",this.lr.bind(this)),this.in.on("downloadabort",this.eo.bind(this))},i.Li=function(t,n){t&&t.isInitSegmentRequest||this.fire(yi.DOWNLOAD_END,{identifier:t,data:n})},i.lr=function(t,n){if(!t||!t.isInitSegmentRequest){var i="".concat(t.type,"_").concat(t.segment);delete this.zr[i],this.fire(yi.DOWNLOAD_TIMEOUT,{identifier:t,data:n})}},i.eo=function(t,n){if(!t||!t.isInitSegmentRequest){var i="".concat(t.type,"_").concat(t.segment);delete this.zr[i]}},i.hr=function(t){this.Fr=!1,this.fire(yi.STREAM_CHANGE,{index:t,streams:this.ln.video})},i.Jr=function(){this.Ne(),this.Or&&this.manifest.captions&&this.manifest.captions.length>0&&this.ro(),this.Kr(this.oo()||!this.uo()),this.ao()},i.Qr=function(t,n){var i=t.label,e=t.language;if(!this.so){var r=new TelecineTextTrack({label:i,id:n,kind:"captions",language:e},this.nt);this.nt.textTracks=ne([r]),this.so=this.addTextTrack(r)}},i.ro=function(){try{var t=this;return jr(t.Lr,(function(){if(t.manifest.captions){var n=t.manifest.captions[0].segments,i=n.slice(t.Br);t.Br=n.length,i.forEach(Fr((function(n){return jr(Ke(n.url).text(),(function(n){var i=function(t){var n=0,i=t.split(/(?:(?:\r\n|\n){2,})/),e=[],r=null;do{0===n&&/^\uFEFF?WEBVTT(?: .*)?/.test(i[n])&&n++,(r=/^(?:(.*)(?:\r\n|\n))?([\d:,.]+) --> ([\d:,.]+)(.*)?(?:\r\n|\n)([\s\S]*)/.exec(i[n]))&&e.push({startTime:Ir(r[2]),endTime:Ir(r[3]),text:r[5]}),n++}while(n<i.length);return e}(n),e=function(t){var n=t.match(/=MPEGTS:(\d+),/);return(n&&n[1]||0)/9e4}(n);i.forEach((function(n){n.startTime=e+n.startTime,n.endTime=e+n.endTime;var i=new(window.VTTCue||window.TextTrackCue)(n.startTime,n.endTime,n.text);t.so.addCue(i)}))}))})))}}))}catch(t){return r.reject(t)}},i.oo=function(){return this.manifest.maxEndTime>0&&(this.manifest.maxEndTime===this.qr?this.Wr++:this.Wr=0,this.qr=this.manifest.maxEndTime),this.Wr<3},i.Ne=function(){try{var t=this;return jr(t.Lr,(function(){for(var n in t.ln)t.ln[n].length>0&&t.yr(n)}))}catch(t){return r.reject(t)}},i.yr=function(t){var n=this,i=this.in[t].activeStreamIndex,e=this.Ji(t,i);this.Hr.getSegmentsToLoad(t,e).forEach((function(e){var r="".concat(t,"_").concat(e.index),o={stream:i,segment:e.index,type:t};n.zr[r]||(n.sorcerer[t].streams[i].addSegment(e.url,{identifier:o}).catch((function(t){delete n.zr[r]})),n.zr[r]=!0)}))},i.Ji=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"video",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return void 0!==this.in&&(n=this.in[t].activeStreamIndex),this.ln[t][n]},i.no=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.Fr){var n=this.video&&this.video.metadata.percentShown?this.video.metadata.percentShown:null,i=this.Hr.filterStreams(this.ln.video,this.J.clientWidth,this.J.clientHeight,n);if(0!==i.length){var e=this.Hr.optimalStreamIndex(i,this.pe),r=this.ln.video.indexOf(i[e]);if(r>=0&&(t||r!==this.pe)){if(r-this.pe>0&&this.Ur>0){if(ee(this.Ur)<this.jr)return}else this.Ur=ie();var o={index:r,streams:this.ln.video};this.fire(yi.STREAM_TARGET_CHANGE,o),this.Fr=!0,this.in.video.switchTo(r,!0),this.pe=r,this.io()}}}},i.ao=function(){var t=this.buffered;if(t.length){var n=t.length,i=function(t,n){if(!t||!t.length)return null;if(1===t.length&&t.end(0)-t.start(0)<1e-6)return null;for(var i,e=0;e<t.length;e++)if(t.start(e)>n&&(0===e||t.end(e-1)-n<=.5)){i=e;break}return i>=0?i:null}(t,this.J.currentTime);if(null!==i&&0!==this.J.readyState&&!(this.J.paused||n<=i)){var e=t.start(i),r=t.end(n-1)-e;r>0&&r<=2*this.segmentLength||(this.J.currentTime=e+.1)}}},i.uo=function(){var t=this.buffered;return!!(t&&t.length&&this.J.currentTime+Nr>t.end(t.length-1))},i.setVideoSrc=function(t){try{var n=this;return jr(n.Ie(n.at),(function(){return jr(n.Yr(t),(function(){n.J.src=URL.createObjectURL(n.in.mediaSource),n.Lr.resolve()}))}))}catch(t){return r.reject(t)}},i.Ie=function(t){try{return this.co=new lt,"none"===t&&this.paused||this.co.resolve(),this.co}catch(t){return r.reject(t)}},i.getBitrateAtTime=function(t,n){if(!this.in)return 0;var i=this.in.streamIndexAtTime(t,n);return this.ln[n][i]?this.ln[n][i].bandwidth:0},i.tr=function(t){var n=t.slice(0);return n.sort((function(t,n){var i=t.width*t.height*t.bitrate,e=n.width*n.height*n.bitrate;return t.width===n.width&&t.height===n.height?t.framerate-n.framerate:i-e})),n},i.Zr=function(t){return t.filter((function(n){return n.mimeType===t[0].mimeType}))},i.onprogress=function(){this.ao()},i.ondurationchange=function(){this.ao()},i.ontimeupdate=function(){if(this.in){t.prototype.ontimeupdate.call(this),this.fire(yi.DROPPED_FRAMES,this.in.getDroppedFrameTotal());var n=this.Ji();if(n){var i={speed:this.in.getCurrentSpeed({type:"average",howMany:3,weights:[1,2,5]}),bitrate:n.bitrate,speeds:this.in.getResponseSpeeds()};this.fire(yi.BANDWIDTH,i)}!this.Nr&&this.uo()&&this.fire(_i.STREAM_OFFLINE),ee(this.Vr)>this.Ir&&(this.no(),this.Vr=ie())}},i.seekToTime=function(){},i.onpause=function(){this.Dr&&this.Dr.stop()},i.pause=function(){t.prototype.pause.call(this),this.Dr&&this.Dr.stop(),this.in&&(this.in.abortFetches(),this.zr={},this.in.removeBuffer().catch((function(){})))},i.play=function(){var n=this;return t.prototype.play.call(this,Fr((function(){var t=!1;return n.co.resolve(),function(i,e){var o=function(){if(n.Cr)return jr(n.io(),(function(){return n.zr={},Lr(Dr((function(){return function(t,n){return t&&t.then?t.then(Pr):r.resolve()}(n.in.removeBuffer())}),(function(t){})),(function(){return jr(n.Lr,(function(){return n.Ne(),jr(n.lo(),(function(){n.currentTime=n.buffered.start(0)+.1,t=!0}))}))}))}))}();return o&&o.then?o.then(e):e(o)}(0,(function(i){return t?i:jr(n.Lr,(function(){n.Ne(),n.Cr=!0}))}))})))},i.lo=function(){var t=this;return new r((function(n){t.in.once("appendbufferend",n)}))},i.setCaptionsState=function(t){this.Or=t},H(n,[{key:"preload",get:function(){return this.at},set:function(t){this.at!==t&&"none"!==t&&this.co.resolve(),this.at=t}},{key:"restrictedStreamIndexes",get:function(){return this._e},set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._e.join(",")!==t.join(",")&&(this._e=t,this.Hr.lock(this._e))}},{key:"videoWidth",get:function(){return this.fo?this.fo.width:this.J.videoWidth}},{key:"videoHeight",get:function(){return this.fo?this.fo.height:this.J.videoHeight}},{key:"currentTime",get:function(){return this.J.currentTime},set:function(t){this.J.currentTime=t}},{key:"isLowerProfileAvailable",get:function(){return this.in?this.in.video.activeStreamIndex>0:null}},{key:"sorcerer",get:function(){return this.in}},{key:"segmentLength",get:function(){return this.At.targetDuration}}]),n}(Ee),Ur=document.createElement("video"),Br={"application/x-mpegURL":"application/x-mpegURL"},Hr=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).do=null,i.reset(),window.addEventListener("online",(function(){i.play()})),i}G(n,t),H(n,null,[{key:"displayName",get:function(){return"NativeHLSLiveScanner"}},{key:"supported",get:function(){return n.supportedVideoTypes.length>0}},{key:"supportedVideoTypes",get:function(){var t=[];if("function"!=typeof Ur.canPlayType)return t;for(var n in Br){var i=Br[n];Ur.canPlayType(i).replace(/^no$/,"")&&t.push(n)}return t}},{key:"supportsPlaybackRate",get:function(){return!1}}]);var i=n.prototype;return i.deactivate=function(){t.prototype.deactivate.call(this),this.reset()},i.reset=function(){this.ho&&clearTimeout(this.ho),this.se=null,this.ho=null,this.Nr=!1,this.Pr=!1,this.vo=null,this.po=0,this.ho=null,this.Hr=new Sr(this,this.tt),this._e=[]},i.endLive=function(){var n=this;this.Nr=!1,this.Pr=!0,clearTimeout(this.ho),this.J.pause(),setTimeout((function(){t.prototype.deactivate.call(n),n.fire(wi.ENDED)}),0)},i.mo=function(){var t=this,n=ht(this.video.metadata.playlistRefreshUrl.split("?")[1]);n.expires&&(this.ho=setTimeout((function(){t.wo()}),1e3*(n.expires-10)))},i.wo=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=this.video.metadata.playlistRefreshUrl;return Ke(i).json().then((function(e){if(!("url"in e))throw new Error("Error parsing 'url' key from player live API refresh endpoint: ".concat(i," ").concat(e));return t.bo(e.url.hls).then((function(){return t.play(),t.yo(5e3),null})).catch((function(){return t.wo(++n)}))})).catch((function(){if(n>=3)throw new Error("Manifest failed to load after ".concat(n," attempts."));return++n,t.wo(n)}))},i._o=function(){var t=this;this.on(_i.STREAM_OFFLINE,(function(){t.Nr=!1}))},i.ko=function(t){return this._o(),this.Nr=!0,this.fire(_i.STREAM_ONLINE),this.yo(5e3),r.resolve(t)},i.bo=function(t){var n=this;return this.do=t,/json=1/.test(t)?Ke(t).json().then((function(t){if(!("url"in t))throw new Error("Error parsing 'url' key from Live API manifest endpoint: ".concat(n.do," ").concat(t));n.J.src=t.url,n.mo()})).catch((function(t){var i=n.video.metadata.playlistRefreshUrl;return Ke(i).json().then((function(t){if(!("url"in t))throw new Error("Error parsing 'url' key from player live API refresh endpoint: ".concat(i," ").concat(t));n.do=t.url.ios,n.J.src=t.url.ios,n.mo()}))})):(this.J.src=t,this.mo(),r.resolve())},i.yo=function(t){var n=this;"number"==typeof Fi.iOS&&Fi.iOS<9||this.vo||(this.vo=setTimeout((function(){if(n.Nr){var t=new XMLHttpRequest;t.onload=function(){410!==t.status?(200!==t.status&&n.fire(_i.STREAM_OFFLINE),t.response.match(/^#EXTM3U\n#EXT-X-VERSION:3\n$/)&&n.fire(_i.STREAM_OFFLINE)):n.wo()},t.onerror=function(){n.fire(_i.STREAM_OFFLINE)},/json=1/.test(n.do)?Ke(n.do).json().then((function(i){"url"in i||n.fire(_i.STREAM_OFFLINE),t.open("GET",i.url),t.send()})).catch((function(){t.open("GET",n.do),t.send()})):(t.open("GET",n.do),t.send())}}),t))},i.setVideoSrc=function(t){var n=this;this.se=this.ko(t).then((function(){return n.do=t,n.bo(t)}))},i.onprogress=function(){this.vo&&(clearTimeout(this.vo),this.vo=null)},i.onstalled=function(){this.yo(1e4)},i.onerror=function(){var n=this;return this.J.error.code===this.J.error.MEDIA_ERR_SRC_NOT_SUPPORTED?(Ke(this.do).then((function(){t.prototype.onerror.call(n)})).catch((function(i){i instanceof Oe?n.fire(wi.ERROR,new TelecineError("MediaNetworkError","A network error ocurred while fetching the media.")):t.prototype.onerror.call(n)})),!1):t.prototype.onerror.call(this)},i.onwaiting=function(){this.yo(1e4)},i.seekToTime=function(){},i.play=function(){var n=this;return t.prototype.play.call(this,(function(){return n.se}))},H(n,[{key:"currentTime",get:function(){return this.J.currentTime},set:function(t){this.J.currentTime=t}}]),n}(Ee),zr=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.Eo=t,this.Z=t.Z,this.tt=n}H(t,null,[{key:"displayName",get:function(){return"Effect"}},{key:"supported",get:function(){return!1}},{key:"supportedScanners",get:function(){return[]}}]);var n=t.prototype;return n.activate=function(){throw new TelecineError("NotImplemented","The effect must implement the activate method.")},n.deactivate=function(){throw new TelecineError("NotImplemented","The effect must implement the deactivate method.")},t}(),qr=new N,Wr=new N,TelecineFile=function(){function TelecineFile(t,n){var i=t.src,e=t.mime,r=t.id,o=void 0===r?re():r,u=t.priority,a=void 0===u?0:u,s=t.metadata,c=void 0===s?{}:s;if(!i)throw new TypeError("Must provide a src for the file.");if(!e)throw new TypeError("Must provide a mime type for the file.");Object.defineProperties(this,{mime:{value:e,enumerable:!0},id:{value:"".concat(o),enumerable:!0},metadata:{value:c,enumerable:!0}}),this.video=n,this.priority=a,this.src=i}return H(TelecineFile,[{key:"priority",get:function(){return qr.get(this)},set:function(t){if(!("number"==typeof(t=parseInt(t,10))&&isFinite(t)&&Math.floor(t)===t&&t>=0))throw new TypeError("The file priority must be an integer greater than or equal to 0.");qr.set(this,t)}},{key:"src",get:function(){return Wr.get(this)},set:function(t){Wr.set(this,t),this.video.fire(yi.FILE_SRC_UPDATE,this)}},{key:"restrictedStreamIndexes",get:function(){if(!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.video.currentScanner),"restrictedStreamIndexes"))throw new ReferenceError("The current scanner does not support streams.");return this.video.currentScanner.restrictedStreamIndexes},set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Array.isArray(t))throw new TypeError("Indexes must be an array.");if(!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.video.currentScanner),"restrictedStreamIndexes"))throw new ReferenceError("The current scanner does not support streams.");this.video.currentScanner.restrictedStreamIndexes=t}}]),TelecineFile}();function Gr(){return!!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration||window.WebKitMediaKeys)}function $r(t,n,i){"string"==typeof n&&(n=function(t){for(var n=new ArrayBuffer(2*t.length),i=new Uint16Array(n),e=0,r=t.length;e<r;e++)i[e]=t.charCodeAt(e);return i}(n));var e=0,r=new ArrayBuffer(t.byteLength+4+n.byteLength+4+i.byteLength),o=new DataView(r);new Uint8Array(r,e,t.byteLength).set(t),e+=t.byteLength,o.setUint32(e,n.byteLength,!0),e+=4;var u=new Uint8Array(r,e,n.byteLength);return u.set(n),e+=u.byteLength,o.setUint32(e,i.byteLength,!0),e+=4,new Uint8Array(r,e,i.byteLength).set(i),new Uint8Array(r,0,r.byteLength)}function Kr(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=n?t.buffer:t,e=String.fromCharCode.apply(null,new Uint16Array(i)),r=(new DOMParser).parseFromString(e,"application/xml"),o={},u=r.getElementsByTagName("HttpHeader"),a=0;a<u.length;++a){var s=u[a].querySelector("name"),c=u[a].querySelector("value");o[s.textContent]=c.textContent}var l=r.querySelector("Challenge");return[o,t=oe(l.textContent)]}function Yr(t,n,i,e){var o=e.audio||[],u=e.video||[],a=[{video:"HW_SECURE_ALL",audio:"SW_SECURE_CRYPTO"},{video:"HW_SECURE_DECODE",audio:"SW_SECURE_CRYPTO"},{video:"HW_SECURE_CRYPTO",audio:"SW_SECURE_CRYPTO"},{video:"SW_SECURE_DECODE",audio:"SW_SECURE_CRYPTO"},{video:"SW_SECURE_CRYPTO",audio:"SW_SECURE_CRYPTO"}].map((function(t){var n={persistentState:"optional",sessionTypes:["temporary"]};return u.length&&(n.videoCapabilities=u.map((function(n){return{contentType:n,robustness:t.video}}))),o.length&&(n.audioCapabilities=o.map((function(n){return{contentType:n,robustness:t.audio}}))),n})),s=Object.keys(t).map((function(e){var o=t[e].id;if(n||i){var u=null,s=n?window.WebKitMediaKeys:window.MSMediaKeys;try{u=new s(o)}catch(t){}return r.resolve({name:o,keySystem:u})}return navigator.requestMediaKeySystemAccess(o,a).then((function(t){return t.createMediaKeys()})).catch((function(t){})).then((function(t){return{name:o,keySystem:t}}))}));return r.all(s)}function Jr(t,n){var i={},e="".concat(window.screen.availWidth,"x").concat(window.screen.availHeight),r=window.devicePixelRatio;return i.merchant="vimeo",i.sessionId=JSON.stringify({ua:navigator.userAgent,token:t,resolution:e,pixelRatio:r}),i.userId=n,i}function Xr(t,n){var i=null;return Object.keys(t).forEach((function(e){n.name===t[e].id&&(i=t[e])})),i}var Zr=function(){function t(t,n){this.To=t.cdms,this.xo=t.lr_token,this.So=t.user,this.Ao=t.asset,this.Mo=n,this.Ro=null,this.Co=null,this.Oo=null,this.Io=null,this.jo=this.Do.bind(this)}var n=t.prototype;return n.init=function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.J=t.J,this.Lo=t,Gr()?(this.No=Jr(this.xo,this.So),Yr(this.To,this.Mo,!1,i).then((function(t){if(t.forEach((function(t){t.keySystem&&(n.Oo=t)})),!n.Oo)return n.Lo.fire(yi.EME_UNSUPPORTED),!1;var i=Xr(n.To,n.Oo);return n.Io="encrypted",n.Ro=i.license_url,n.Mo&&(n.Po=i.certificate_url,n.Io="webkitneedkey"),n.J.addEventListener(n.Io,n.jo),n.Mo?(n.J.webkitSetMediaKeys(n.Oo.keySystem),!0):n.J.mediaKeys?(n.Co=n.J.mediaKeys.createSession(),n.Co.addEventListener("message",(function(t){return n.Fo(t)})),!0):(n.Co=n.Oo.keySystem.createSession(),n.Co.addEventListener("message",(function(t){return n.Fo(t)})),n.J.setMediaKeys(n.Oo.keySystem),!0)}))):(this.Lo.fire(yi.EME_UNSUPPORTED),!1)},n.destroy=function(){this.Co&&this.Co.sessionId&&this.Co.close(),this.J.removeEventListener(this.Io,this.jo)},n.Do=function(t){var n=this;return"com.apple.fps.1_0"===this.Oo.name?(this.Vo().then((function(i){n.Uo="assetId=".concat(n.Ao);var e=$r(t.initData,n.Uo,i);return n.Co=n.Oo.keySystem.createSession("video/mp4",e),n.Co.addEventListener("webkitkeymessage",(function(t){return n.Fo(t)})),i})).catch((function(t){n.Lo.fire(t.error,t.payload)})),!0):!this.Co.sessionId&&!this.Bo&&(this.Bo=this.Co.generateRequest(t.initDataType,t.initData).catch((function(){n.Lo.fire(yi.DRM_FAILURE)})),!0)},n.Fo=function(t){var n=this;return new r((function(i,e){n.Bo=null;var r=new XMLHttpRequest;r.keySession=t.target,r.responseType="arraybuffer",r.open("POST",n.Ro),r.setRequestHeader("dt-custom-data",window.btoa(JSON.stringify(n.No)));var o=t.message;if("com.microsoft.playready"===n.Oo.name){var u=Kr(t.message,!1),a=u[0];Object.keys(a).forEach((function(t){r.setRequestHeader([t],a[t])})),o=u[1]}if("com.apple.fps.1_0"===n.Oo.name){var s=btoa(String.fromCharCode.apply(null,o));s=encodeURIComponent(s),o="spc=".concat(s,"&").concat(n.Uo),r.setRequestHeader("Content-type","application/x-www-form-urlencoded")}r.onload=function(){if(403!==r.status)if(r.status>=400)e({error:yi.DRM_FAILURE});else try{n.Lo.fire(yi.DRM_AUTH_SUCCESS);var t=new Uint8Array(r.response),o=t.buffer;"com.apple.fps.1_0"===n.Oo.name&&(o=function(t){var n=window.atob(t.trim());return"<ckc>"===n.substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6)),new Uint8Array(atob(n).split("").map((function(t){return t.charCodeAt(0)})))}(btoa(String.fromCharCode.apply(null,t)))),r.keySession.update(o),i()}catch(t){e("Error updating key session: ".concat(t))}else{var u=JSON.parse(r.getResponseHeader("x-dt-error-message"));e({error:yi.DRM_AUTH_FAILURE,payload:{text:u.error,code:u.error_code}})}},r.onerror=e,r.send(o)})).catch((function(t){n.Lo.fire(t.error,t.payload)}))},n.Vo=function(){var t=this;return new r((function(n,i){var e=new XMLHttpRequest;e.responseType="arraybuffer",e.open("GET",t.Po),e.setRequestHeader("dt-custom-data",window.btoa(JSON.stringify(t.No))),e.onload=function(){if(403!==e.status)if(e.status>=400)i({error:yi.DRM_FAILURE});else try{n(new Uint8Array(e.response))}catch(t){i(t)}else{var t=JSON.parse(e.getResponseHeader("x-dt-error-message"));i({error:yi.DRM_AUTH_FAILURE,payload:{text:t.error,code:t.error_code}})}},e.onerror=i,e.send()}))},t}(),Qr=function(){function t(t,n){this.To=t.cdms,this.Ao=t.asset,this.Mo=n,this.Ho=null,this.Ro=null,this.Co=null,this.Oo=null,this.Io=null,this.jo=this.Do.bind(this),this.zo=this.qo.bind(this)}var n=t.prototype;return n.init=function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.J=t.J,this.Lo=t,this.Wo=!!window.MSMediaKeys,Gr()||this.Wo?Yr(this.To,this.Mo,this.Wo,i).then((function(t){n.Oo=t.find((function(t){return t.keySystem}));var i=n.Oo&&Xr(n.To,n.Oo);if(!i)throw n.Lo.fire(yi.EME_UNSUPPORTED),new Error("No valid key system was found.");n.Ho=i.license_url;var r=e&&e.inits&&e.inits[i.id];return r||n.Go(i),n.$o().then((function(){return r&&n.Do(r.cenc)}))})):(this.Lo.fire(yi.EME_UNSUPPORTED),r.reject())},n.destroy=function(){this.Co&&this.Co.sessionId&&this.Co.close(),this.J.removeEventListener(this.Io,this.jo)},n.Go=function(t){this.Io="encrypted",this.Ro=t.license_url,this.Mo?(this.Po=t.certificate_url,this.Io="webkitneedkey"):this.Wo&&(this.Io="msneedkey"),this.J.addEventListener(this.Io,this.jo)},n.$o=function(){var t=this;return new r((function(n){if(t.Wo){var i=function i(){t.J.msSetMediaKeys(t.Oo.keySystem),t.J.removeEventListener("loadedmetadata",i),n()};t.J.readyState>=1?i():t.J.addEventListener("loadedmetadata",i)}else{if(t.Mo)t.J.webkitSetMediaKeys(t.Oo.keySystem);else{var e=t.J.mediaKeys||t.Oo.keySystem;t.Co=t.Ko(e),t.Co.addEventListener("message",(function(n){return t.Fo(n)})),t.J.mediaKeys||t.J.setMediaKeys(t.Oo.keySystem)}n()}}))},n.Ko=function(t,n,i){var e=t.createSession(n,i);if(!e)throw new Error("Could not create key session");return e},n.Do=function(t){var n=this,i=new Error("A decryption key error was encountered");return"com.apple.fps.1_0"===this.Oo.name?(this.Vo(this.Po).then((function(e){n.Uo=function(t){var n=function(t){var n=new Uint16Array(t.buffer);return String.fromCharCode.apply(null,n)}(t),i=document.createElement("a");return i.href=n,i.hostname}(t.initData);var r=$r(t.initData,n.Uo,e);return n.Co=n.Ko(n.Oo.keySystem,"video/mp4",r),n.Co.contentId=n.Uo,n.Co.addEventListener("webkitkeymessage",(function(t){return n.Fo(t)})),n.Co.addEventListener("webkitkeyerror",(function(t){throw i})),e})).catch((function(t){n.Lo.fire(t.error,t.payload)})),!0):"com.microsoft.playready"===this.Oo.name?(this.Co=this.Ko(this.J.msKeys,"video/mp4",t.initData),this.Co.addEventListener("mskeymessage",(function(t){return n.Fo(t)})),this.Co.addEventListener("mskeyerror",(function(t){throw i})),!0):!this.Co.sessionId&&!this.Bo&&(this.Co.addEventListener("keystatuseschange",this.zo),this.Bo=this.Co.generateRequest(t.initDataType,t.initData).catch((function(){n.Lo.fire(yi.DRM_FAILURE)})),!0)},n.qo=function(){var t=!1,n=V(this.Co.keyStatuses.values());n.forEach((function(n,i){switch(n){case"expired":t=!0}})),n.every((function(t){return"output-restricted"===t}))&&this.Lo.fire(yi.DRM_OUTPUT_RESTRICTED),t&&this.Co.close()},n.Fo=function(t){var n=this;return this.Yo(this.Ho).then((function(i){return new r((function(e,r){n.Ro=i,n.Bo=null;var o=new XMLHttpRequest;o.keySession=t.target,o.open("POST",n.Ro),o.responseType="arraybuffer";var u=t.message;if("com.microsoft.playready"===n.Oo.name){var a=Kr(t.message),s=a[0];Object.keys(s).forEach((function(t){o.setRequestHeader(t,s[t])})),u=a[1]}"com.apple.fps.1_0"===n.Oo.name&&(u=new Uint8Array(u),o.setRequestHeader("Content-type","application/octet-stream")),o.onload=function(){if(403!==o.status)if(o.status>=400)r(new TelecineError(yi.DRM_FAILURE));else try{n.Lo.fire(yi.DRM_AUTH_SUCCESS);var t=new Uint8Array(o.response);o.keySession.update(t),e()}catch(t){r(new TelecineError(yi.DRM_FAILURE,"Error updating key session: ".concat(t)))}else r(new TelecineError(yi.DRM_AUTH_FAILURE))},o.onerror=r,o.send(u)})).catch((function(t){n.Lo.fire(t.name,{text:t.message||"License request failed."})}))}))},n.Yo=function(t){return new r((function(n,i){var e=new XMLHttpRequest;e.open("GET",t),e.onload=function(){if(e.status>=400)i(new TelecineError(yi.DRM_FAILURE));else try{try{var t=JSON.parse(e.response),r=t.licenseAcquisitionUrl,o=t.token;if(!r&&!o)throw new Error;n("".concat(r,"?ExpressPlayToken=").concat(o))}catch(t){n(e.response)}}catch(t){i(new TelecineError(yi.DRM_FAILURE,"Error retrieving License Acquisition URL (LA_URL): ".concat(t)))}},e.onerror=i,e.send()}))},n.Vo=function(t){return new r((function(n,i){var e=new XMLHttpRequest;e.open("GET",t),e.responseType="arraybuffer",e.setRequestHeader("Pragma","Cache-Control: no-cache"),e.setRequestHeader("Cache-Control","max-age=0"),e.onload=function(){if(403!==e.status)if(e.status>=400)i({error:yi.DRM_FAILURE});else try{n(new Uint8Array(e.response))}catch(t){i(t)}else i({error:yi.DRM_AUTH_FAILURE})},e.onerror=i,e.send()}))},t}(),to=new N,TelecineVideo=function(){function TelecineVideo(t){var n=this,i=t.files,e=t.id,r=void 0===e?re():e,o=t.title,u=void 0===o?null:o,a=t.subtitle,s=void 0===a?null:a,c=t.metadata,l=void 0===c?{}:c,f=t.textTracks,d=void 0===f?ne():f,h=t.externalDisplayFiles,v=void 0===h?{}:h,p=t.chapters,m=void 0===p?[]:p,w=t.duration;if(!i||!Array.isArray(i))throw new TypeError("Must provide files for the video.");nt(this);var b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.getFileById=te,t}(i.map((function(t){return t instanceof TelecineFile?(t.video=n,t):new TelecineFile(t,n)}))),g=ne(d.map((function(t){return t instanceof TelecineTextTrack?(t.video=n,t):new TelecineTextTrack(t,n)})));Object.keys(v).forEach((function(t){!v[t]||v[t]instanceof TelecineFile||(v[t]=new TelecineFile(v[t],n))})),Object.defineProperties(this,{id:{value:"".concat(r),enumerable:!0},title:{value:u,enumerable:!0},subtitle:{value:s,enumerable:!0},metadata:{value:l,enumerable:!0},files:{value:b,enumerable:!0},textTracks:{value:g,enumerable:!0,writable:!0},chapters:{value:m,enumerable:!0},duration:{value:w,enumerable:!0},externalDisplayFiles:{value:v,enumerable:!0}}),l.drm&&(l.drm.fastly?this.Jo=new Qr(l.drm,l.useHls):this.Jo=new Zr(l.drm,l.useHls))}return TelecineVideo.prototype.deactivate=function(){var t=this;this.Jo&&this.Jo.destroy(),this.textTracks.forEach((function(n){return t.currentScanner.removeTextTrack(n)}))},H(TelecineVideo,[{key:"drmHandler",get:function(){return this.Jo||null}},{key:"currentFile",get:function(){return this.currentScanner.currentFile},set:function(t){this.currentScanner.currentFile=t}},{key:"currentScanner",get:function(){return to.get(this)},set:function(t){var n=this;this.currentScanner&&this.currentScanner.constructor.supportsTextTracks&&this.textTracks.forEach((function(t){return n.currentScanner.removeTextTrack(t)})),t.constructor.supportsTextTracks&&this.textTracks.forEach((function(n){return t.addTextTrack(n)})),to.set(this,t)}},{key:"chapters",get:function(){return this.chapters}}]),TelecineVideo}(),no=function(){function t(t,n){this.Eo=t,this.tt=n,this.Xo=null,this.Zo=this.tt.embedTime?this.tt.embedTime:0,this.Qo=!1,this.tu=!1,this.nu=!1,this.playInitiated=!1,this.iu=!1,nt(this),this.eu=this.ru.bind(this),this.ou=this.uu.bind(this),this.au=this.su.bind(this),this.cu=this.lu.bind(this),this.fu=this.du.bind(this),this.hu(this.Eo.on),this.vu()}var n=t.prototype;return n.destroy=function(){clearInterval(this.Xo),this.hu(this.Eo.off),this.ru()},n.hu=function(t){t(wi.PLAYING,this.eu),t(wi.SEEKING,this.ou),t(wi.SEEKED,this.au),t(_i.STREAM_ONLINE,this.cu),t(_i.STREAM_OFFLINE,this.fu)},n.ru=function(){this.Qo&&(this.Qo=!1,this.fire(yi.BUFFER_ENDED))},n.uu=function(){this.tu=!0},n.su=function(){this.tu=!1},n.lu=function(){this.iu=!0},n.du=function(){this.iu=!1},n.vu=function(){var t=this;clearInterval(this.Xo),this.Xo=setInterval((function(){if(t.Eo.video){var n=t.Eo.video.currentScanner;if(n){var i=t.Eo.isLive(),e=n.currentTime;if(t.playInitiated&&(!t.tu||i)&&(!t.Eo.paused||t.userPlayState)&&!t.Qo&&e<t.Zo+.125){if(i&&!t.iu)return;for(var r=t.Eo.buffered,o=0;o<r.length;o++)if(e>=r.start(o)&&e+.2<=r.end(o))return;if(e+.125>=t.Eo.duration)return;t.Qo=!0,t.fire(yi.BUFFER_STARTED)}(t.playInitiated&&t.Qo&&e>t.Zo+.125||i&&!t.iu&&t.Qo)&&(t.Qo=!1,t.fire(yi.BUFFER_ENDED)),t.Zo=e}}}),250)},H(t,[{key:"userPlayState",get:function(){return this.nu},set:function(t){this.nu=t,t||this.ru()}}]),t}();function io(){var t,n;function i(){t.src?document.createElement("video").load():t.load()}function e(){if(!n)return r.reject();t.preload="";var i=t.play();return void 0===i&&(i=new r((function(n){t.addEventListener("playing",n)}))),i}function o(){n&&(n.resolve(),n=null)}function u(t){n&&(n.reject(t),n=null)}return{set video(n){t=n},get active(){return!!n},start:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.resolve.bind(r);return n||(n=new lt),i(),t().then(e).then(o).catch(u),n},cancel:function(){n&&(n.reject(new TelecineError("PlayInterrupted","The play() request was interrupted by a call to pause()")),n=null)}}}var eo=function(){function t(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.Z=t,this.pu=n,this.tt=i,this.J=null,this.dt=ne(),this.mu={},this.wu=new Ee(t),this.tt.playRequest=new io,this.bu=[],this.gu=[],nt(this)}var n=t.prototype;return n.supportsEffect=function(t){var n=this;return!!t.supported&&t.supportedScanners.some((function(t){return n.yu(n.wu)===t.displayName}))},n.getEffectByName=function(t){var n=this,i=null;return this.gu.forEach((function(e){t===n._u(e)&&(i=e)})),i},n.activateEffect=function(t,n){var i=new t(this,n);return i.activate(),this.gu.push(i),i},n.deactivateEffect=function(t){var n=this;return this.gu.some((function(i,e){return i.constructor===t&&(i.deactivate(),n.gu.splice(e,1),!0)}))},n.deactivateEffects=function(){var t=this;this.gu.forEach((function(n){return t.deactivateEffect(n.constructor)}))},n.play=function(){if(!this.J||this.J.files.length<1)throw new TelecineError("NoFiles","There are no files to play.");this.ku.playInitiated||(this.ku.playInitiated=!0),this.ku.userPlayState=!0;var t=this.wu.play();return this.mu.paused=!1,t},n.pause=function(){if(!this.J||this.J.files.length<1)throw new TelecineError("NoFiles","There are no files to play.");return this.ku.userPlayState=!1,this.wu.pause(),this.mu.paused=!0,this},n.isLive=function(){return this.currentScannerName.includes("Live")},n.endLive=function(){this.wu.endLive()},n.getBitrateAtTime=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video";return"MediaSourceScanner"!==this.yu(this.wu)&&"HLSLiveScanner"!==this.yu(this.wu)||"audio"===n&&this.wu.ln[n].length<=1?0:this.wu.getBitrateAtTime(t,n)},n.showExternalDisplayPicker=function(t){this.wu.showExternalDisplayPicker(t)},n.supportsPresentationMode=function(t){return-1!==this.supportedPresentationModes.indexOf(t)},n.addChapter=function(t,n){this.wu.addChapter(t,n)},n.removeChapter=function(t){this.wu.removeChapter(t)},n.addCuePoint=function(t,n){return this.wu.addCuePoint(t,n)},n.removeCuePoint=function(t){return this.wu.removeCuePoint(t)},n.removeAllCuePoints=function(){return this.wu.removeAllCuePoints()},n.addVideoEventListeners=function(){return this.wu.addVideoEventListeners()},n.removeVideoEventListeners=function(){return this.wu.removeVideoEventListeners()},n.Eu=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.textTrackSupport,e=void 0!==i&&i,r=this.J.files.sort((function(t,n){return t.priority-n.priority})),o=this.pu,u=function(n){var i=r[n];for(var u in o){var a=o[u];if(a.supported&&(!e||a.supportsTextTracks)&&-1===t.bu.indexOf(t.yu(a))&&a.supportedVideoTypes.some((function(t){return i.mime===t})))return{v:a}}};for(var a in r){var s=u(a);if("object"===U(s))return s.v}return e?(this._t("TextTracksNotSupported","None of the scanners support text tracks in this browser."),this.bu=[],this.Eu()):null},n.Tu=function(t,n){var i=this;if(this.wu.constructor!==t||this.wu.video!==n){this.wu.deactivate();var e=new t(this.Z,this.tt);Object.keys(xi).forEach((function(t){var n=xi[t];e.on(n,(function(t){return i.xu(n,t,e)}))})),this.wu=e,n.currentScanner=e,this.wu.video=n;for(var r=Object.keys(this.mu),o=0;o<r.length;o++){var u=r[o];"paused"!==u?"currentTime"!==u&&(this.wu[u]=this.mu[u]):!1===this.mu.paused&&this.wu.play()}this.wu.addChapters(n.chapters,n.duration),this.fire(yi.SCANNER_CHANGE,this.yu(this.wu))}},n.Su=function(){if(null!==this.J){var t=this.Eu({textTrackSupport:this.J.textTracks.length>0});t?this.Tu(t,this.J):this._t("FilesNotPlayable","None of the files could be played in this browser.")}},n.xu=function(t,n,i){if(i===this.wu){switch(t){case wi.ERROR:return void(n instanceof TelecineError&&this.fire(wi.ERROR,n));case yi.SCANNER_ERROR:this._t("ScannerError","The current scanner can no longer be used because ".concat(n.reason)),this.bu.push(this.yu(this.wu)),this.Su([]);break;case yi.FILE_ERROR:this._t("FileError","The current file can no longer be used because ".concat(n.reason)),this.wu.kt();break;case yi.DOWNLOAD_ERROR:this._t("DownloadError",n),this.wu.kt();break;case yi.EME_UNSUPPORTED:this._t("DRMFailure",{text:null,code:"emeunsupported"});break;case yi.DRM_FAILURE:case yi.DRM_AUTH_FAILURE:this._t("DRMFailure",{text:n.text,code:n.code});break;case yi.DRM_OUTPUT_RESTRICTED:this._t("DRMFailure",{text:null,code:"outputrestricted"});break;case yi.DRM_AUTH_SUCCESS:this.fire(yi.DRM_AUTH_SUCCESS);break;case wi.TIME_UPDATE:this.mu.currentTime=this.wu.currentTime;break;case yi.MEDIA_URL_EXPIRED:this._t("MediaUrlExpired",n);break;case yi.MEDIA_URL_BAD_REQUEST:this._t("MediaUrlBadRequest",n);break;case Ti.BRAIN_ML_MODEL_ERR:this._t("MimirError",n);break;case Ti.BRAIN_ML_MODEL_NET_ERR:this._t("MimirNetworkError",n);break;case Ti.BRAIN_ML_MODEL_TIMEOUT:this._t("MimirNetworkTimeout",n);break;case ki.SPATIAL_UNSUPPORTED:this.getEffectByName("ThreeSixtyEffect").deactivate();break;case wi.ENDED:this.mu.paused=!0;break;case wi.WAITING:this.fire(wi.WAITING)}this.gu.forEach((function(n){"function"==typeof n["on".concat(t)]&&n["on".concat(t)]()})),this.fire(t,n)}},n._t=function(t,n){this.fire(wi.ERROR,new TelecineError(t,n))},n.yu=function(t){return t instanceof Ee?t.constructor.displayName:t.prototype.constructor.displayName},n.vu=function(){var t=this;this.ku&&this.ku.destroy(),this.ku=new no(this,this.tt),this.ku.on(yi.BUFFER_STARTED,(function(){t.fire(yi.BUFFER_STARTED)})),this.ku.on(yi.BUFFER_ENDED,(function(){t.fire(yi.BUFFER_ENDED)}))},n._u=function(t){return t instanceof zr?t.constructor.displayName:t.prototype.constructor.displayName},n.Au=function(t){"HLSLiveScanner"===this.yu(this.wu)&&this.wu.setCaptionsState(t)},H(t,[{key:"element",get:function(){return this.Z}},{key:"videoElement",get:function(){return this.wu.videoElement}},{key:"manifest",get:function(){return this.wu.manifest||{video:[]}}},{key:"supportsSettingVolume",get:function(){return this.pu.some((function(t){return t.supported&&t.supportsSettingVolume}))}},{key:"supportsPlaybackRate",get:function(){return this.wu.constructor.supportsPlaybackRate}},{key:"supportsTextTracks",get:function(){return this.pu.some((function(t){return t.supported&&t.supportsTextTracks}))}},{key:"activeEffects",get:function(){return this.gu}},{key:"isLowerProfileAvailable",get:function(){return this.wu.isLowerProfileAvailable}},{key:"buffered",get:function(){return this.wu.buffered}},{key:"bufferTarget",get:function(){return this.wu.bufferTarget},set:function(t){this.mu.bufferTarget=t,this.wu.bufferTarget=t}},{key:"presentationDelay",get:function(){return this.wu.presentationDelay},set:function(t){this.mu.presentationDelay=t,this.wu.presentationDelay=t}},{key:"manifestLoadDurations",get:function(){return this.wu.manifestLoadDurations?this.wu.manifestLoadDurations:[]}},{key:"successfulSegments",get:function(){return this.wu.successfulSegments?this.wu.successfulSegments:[]}},{key:"failedSegments",get:function(){return this.wu.failedSegments?this.wu.failedSegments:[]}},{key:"cuePoints",get:function(){return this.wu.cuePoints}},{key:"currentChapterID",get:function(){return this.wu&&this.wu.chaptersTrack&&this.wu.chaptersTrack.activeCues.length?this.wu.chaptersTrack.activeCues[0].id:null}},{key:"chapters",get:function(){return this.wu.chaptersTrack?this.wu.chaptersTrack.cues:[]}},{key:"chaptersTrack",get:function(){return this.wu.chaptersTrack}},{key:"currentFile",get:function(){return this.wu.currentFile},set:function(t){if("string"==typeof t&&(t=this.xt.filter((function(n){return n.id===t}))[0]),!t)throw new TelecineError("FileNotValid","The file is not valid.");this.wu.currentFile=t}},{key:"currentScannerName",get:function(){return this.yu(this.wu)}},{key:"currentTime",get:function(){return this.wu.currentTime},set:function(t){this.mu.currentTime=t,this.wu.currentTime=t}},{key:"duration",get:function(){return this.wu.duration}},{key:"ended",get:function(){return this.wu.ended}},{key:"externalDisplayAvailable",get:function(){return this.wu.externalDisplayAvailable}},{key:"externalDisplayActive",get:function(){return this.wu.externalDisplayActive}},{key:"loop",get:function(){return this.wu.loop},set:function(t){this.mu.loop=t,this.wu.loop=t}},{key:"muted",get:function(){return this.wu.muted},set:function(t){this.mu.muted=!!t,this.wu.muted=!!t}},{key:"playsinline",get:function(){return this.wu.playsinline},set:function(t){this.mu.playsinline=!!t,this.wu.playsinline=!!t}},{key:"paused",get:function(){return this.wu.paused}},{key:"played",get:function(){return this.wu.played}},{key:"seekable",get:function(){return this.wu.seekable}},{key:"seeking",get:function(){return this.wu.seeking}},{key:"defaultPlaybackRate",get:function(){return this.wu.defaultPlaybackRate},set:function(t){this.mu.defaultPlaybackRate=t,this.wu.defaultPlaybackRate=t}},{key:"playbackRate",get:function(){return this.wu.playbackRate},set:function(t){this.mu.playbackRate=t,this.wu.playbackRate=t}},{key:"preload",get:function(){return this.wu.preload},set:function(t){this.mu.preload=t,this.wu.preload=t}},{key:"presentationMode",get:function(){return this.wu.presentationMode},set:function(t){this.wu.presentationMode=t}},{key:"supportedPresentationModes",get:function(){return this.wu.supportedPresentationModes}},{key:"video",get:function(){return this.J},set:function(t){this.J&&this.J.deactivate(),this.bu=[],this.vu(),this.J=new TelecineVideo(t),this.Su()}},{key:"videoWidth",get:function(){return this.wu.videoWidth}},{key:"videoHeight",get:function(){return this.wu.videoHeight}},{key:"volume",get:function(){return this.wu.volume},set:function(t){if(t<0||t>1)throw new TelecineError("IndexSizeError","Failed to set the 'volume' property: The volume provided (".concat(t,") is outside of the range [0, 1]."));this.mu.volume=t,this.wu.volume=t}},{key:"brainDebug",get:function(){return this.wu.brainDebug}}]),t}(),ro=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).Mu=!1,i.J=i.Eo.wu.J,i}G(n,t),H(n,null,[{key:"displayName",get:function(){return"CanvasEffect"}},{key:"supported",get:function(){return!0}},{key:"supportedScanners",get:function(){return[Ee,Tr]}}]);var i=n.prototype;return i.activate=function(){this.Mu=!0,this.Ru=document.createElement("canvas"),this.Ru.className="vp-canvas-effect",this.Ru.style.cssText="\n position: absolute;\n top:0;\n left:0;\n bottom:0;\n right:0;\n ",this.Cu=this.Ru.getContext("2d",{alpha:!1}),this.Z.appendChild(this.Ru),this.Ou()},i.deactivate=function(){this.Ru&&this.Z.removeChild(this.Ru),this.Iu(),this.Mu=!1},i.Ou=function(){this.ju()},i.ju=function(){this.Du=window.requestAnimationFrame(this.Lu.bind(this))},i.Lu=function(){var t=this.J,n=this.Ru;n.width=t.clientWidth,n.height=t.clientHeight;var i=Math.floor(this.Nu()),e=Math.floor(this.Pu()),r=Math.floor((t.clientWidth-i)/2),o=Math.floor((t.clientHeight-e)/2);this.Cu.fillStyle="#000",this.Cu.fillRect(0,0,n.width,n.height),this.Cu.drawImage(t,r,o,i,e),this.ju()},i.Fu=function(){return this.J.videoHeight/this.J.videoWidth},i.Nu=function(){return Math.min(this.J.clientHeight/this.Fu(),this.J.clientWidth)},i.Pu=function(){return Math.min(this.J.clientWidth*this.Fu(),this.J.clientHeight)},i.Iu=function(){this.Du&&(window.cancelAnimationFrame(this.Du),this.Du=null)},n}(zr),oo=function(){function t(){}return H(t,null,[{key:"Equirect",get:function(){return"equirectangular"}}]),t}(),uo=function(){function t(){}return H(t,null,[{key:"Mono",get:function(){return"mono"}},{key:"TopBottom",get:function(){return"top-bottom"}}]),t}(),ao=function(){function t(t,n,i){switch(this.isStereo=n!==uo.Mono,this.Vu=null,this.Uu=null,t){case oo.Equirect:this.createEquirectProjection(i,n);break;default:this.createEquirectProjection(i,uo.Mono)}}var n=t.prototype;return n.createEquirectProjection=function(t,n){switch(n){case uo.Mono:this.Vu=this.Bu(t);break;case uo.TopBottom:this.Vu=this.Bu(t),this.Uu=this.Bu(t),this.Vu.layers.set(1),this.Uu.layers.set(2),this.Hu(this.Vu.geometry,.5,0),this.Hu(this.Uu.geometry,.5,.5)}},n.Bu=function(n,i,e,r){var o=new THREE.SphereBufferGeometry(i||t.SPHERE_RADIUS,e||t.TESSELATION_WIDTH,r||t.TESSELATION_HEIGHT);o.scale(-1,1,1);var u=new THREE.MeshBasicMaterial({map:n});return new THREE.Mesh(o,u)},n.Hu=function(t,n,i){for(var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=0;r<t.attributes.uv.array.length;r+=2)t.attributes.uv.array[r+e]*=n,t.attributes.uv.array[r+e]+=i},H(t,[{key:"left",get:function(){return this.Vu}},{key:"right",get:function(){return this.Uu}}],[{key:"TESSELATION_WIDTH",get:function(){return 120}},{key:"TESSELATION_HEIGHT",get:function(){return 80}},{key:"SPHERE_RADIUS",get:function(){return 500}}]),t}(),so=function(){function t(t){this.zu=t}var n=t.prototype;return n.hasVRHeadset=function(){var t=this;return Fi.webvr?navigator.getVRDisplays().then((function(n){return n.length>0?(t.zu.vr.setDevice(n[0]),n[0]):null})):null},n.enter=function(){return this.zu.vr.getDevice()&&this.zu.vr.getDevice().requestPresent([{source:this.zu.domElement}])},n.exit=function(){return this.zu.vr.getDevice()&&this.zu.vr.getDevice().exitPresent()},H(t,[{key:"supported",get:function(){return Fi.webvr}},{key:"device",get:function(){return this.zu&&this.zu.vr.getDevice()?this.zu.vr.getDevice():null}},{key:"isPresenting",get:function(){return!(!this.zu||!this.zu.vr.getDevice())&&this.zu.vr.getDevice().isPresenting}}]),t}(),co=function(t){function n(n){var i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(i=t.call(this,n,e)||this).Mu=!1,i.qu=null,i.Wu=null,i.zu=null,i.isUserInteracting=!1,i.Gu=0,i.$u=0,i._coordinates={lat:0,long:0},i.Ku={lat:0,long:0},i.Yu={lat:0,long:0},i.Ju=0,i.Xu=0,i.Zu=0,i.J=i.Eo.wu.J,i.Qu=null,i.ta={x:0,y:0},i.na={lat:0,long:0},i.ia={videoFps:i.tt.fps,motionRenderSpeed:60},i.ea=1e3/i.ia.videoFps,i.ra=[],i.oa=!1,i.aa=!1,i.sa=!1,i.ca={up:!1,down:!1,left:!1,right:!1},i}G(n,t),H(n,[{key:"isUserInteracting",set:function(t){t!==this.la&&(this.la=t,t?this.tt.isMobile||this.Eo.fire(ki.MOTION_START):this.tt.isMobile||this.Eo.fire(ki.MOTION_END))},get:function(){return this.la}}],[{key:"displayName",get:function(){return"ThreeSixtyEffect"}},{key:"supported",get:function(){try{var t=document.createElement("canvas");return!!window.WebGLRenderingContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(t){return this.Eo.wu.fire(ki.SPATIAL_UNSUPPORTED),!1}}},{key:"supportedScanners",get:function(){return[Ee,Tr]}}]),n.frustumSurfaceArea=function(t,n,i){var e=2*ao.SPHERE_RADIUS*2*Math.sin(Math.PI/180*(t/2));return e*(e*n/i)/(4*Math.PI*Math.pow(ao.SPHERE_RADIUS,2))};var i=n.prototype;return i.activate=function(){var t=this;return new r((function(n,i){if(window.THREE)n();else{var e=document.createElement("script");e.src=t.tt.threeUrl,document.body.appendChild(e),e.onload=function(){n()}}})).then((function(){return t.Vt()}))},i.Vt=function(){var t=this;this.Mu=!0,this.qu=new THREE.PerspectiveCamera(this.tt.fieldOfView,this.J.clientWidth/this.J.clientHeight,1,2*ao.SPHERE_RADIUS),this.qu.target=new THREE.Vector3(0,0,0),this.qu.layers.enable(1),this.fa(this.tt.directorTimeline),this.Wu=new THREE.Scene,this.da=new THREE.VideoTexture(this.J),this.da.generateMipmaps=!1,this.da.minFilter=THREE.NearestFilter,this.da.maxFilter=THREE.NearestFilter,this.da.format=THREE.RGBFormat,this.ha=new ao(this.tt.projection,this.tt.stereoMode,this.da),this.ha.isStereo&&this.Wu.add(this.ha.right),this.Wu.add(this.ha.left),this.zu=new THREE.WebGLRenderer,this.zu.vr.enabled=!0,this.zu.setPixelRatio(window.devicePixelRatio),this.va=document.createElement("div"),this.va.appendChild(this.zu.domElement),this.Z.appendChild(this.va),this.pa(),this.Eo.wu.J.setAttribute("crossorigin","anonymous"),this.Ou(),this.Eo.wu.paused||this.ma(),this.wa=new so(this.zu),this.wa.supported&&this.wa.hasVRHeadset().then((function(n){setTimeout((function(){t.Eo.fire(ki.WEBVR_HARDWARE_AVAILABLE,t.wa.device)}),100)})).catch((function(t){}))},i.toggleVR=function(){var t=this;if(this.wa.isPresenting)this.wa.exit().then((function(){t.adjustRenderSize()})).catch((function(t){}));else{if(this.Eo.wu.paused)return;this.wa.enter().then((function(){t.adjustRenderSize()})).catch((function(t){}))}},i.onplay=function(){this.Mu&&(this.ma(),this.adjustRenderSize())},i.deactivate=function(){this.va&&this.Z.removeChild(this.va),this.Iu(),this.Mu=!1},i.snapToCenter=function(){var t=this;this.ra.forEach((function(t){return clearTimeout(t)}));var n=((this._coordinates.long>=180?360:0)-this._coordinates.long)/11,i=(0-this._coordinates.lat)/11;this.Zu=0;for(var e=function(e){t.ra.push(setTimeout((function(){0===e&&(t.oa=!0,t.tt.isMobile||(t.ea=1e3/t.ia.motionRenderSpeed)),49===e&&(t.oa=!1,t.tt.isMobile||(t.ea=1e3/t.ia.videoFps)),t.ba(t._coordinates.lat+i/Math.pow(1.1,e),t._coordinates.long+n/Math.pow(1.1,e)),t.na.lat=THREE.Math.radToDeg(t.ta.x)+t._coordinates.lat+i/Math.pow(1.1,e),t.na.long=THREE.Math.radToDeg(t.ta.y)+t._coordinates.long+i/Math.pow(1.1,e)}),e*t.ea))},r=0;r<50;r++)e(r)},i.isStereo=function(){return!!this.ha&&this.ha.isStereo},i.fa=function(t){t&&t[0]&&void 0!==t[0].p&&"undefined"!==t[0].y&&this.ba(t[0].p,t[0].y)},i.ba=function(t,n){this.Ku.long=this._coordinates.long,this.Ku.lat=this._coordinates.lat,t%=360,this._coordinates.lat=Math.max(-85,Math.min(85,t)),n=(n%=360)>=0?n:360+n,this._coordinates.long=n},i.makeContact=function(t){this.isUserInteracting=!0,this.ra.forEach((function(t){return clearTimeout(t)})),this.oa=!1,this.ga={x:t.x,y:t.y},this.Yu.long=this._coordinates.long,this.Yu.lat=this._coordinates.lat,this.ya={long:this._coordinates.long,lat:this._coordinates.lat},this.tt.isMobile||(this.ea=1e3/this.ia.motionRenderSpeed)},i.move=function(t){this.na.lat=THREE.Math.radToDeg(this.ta.x)+this.Ku.lat,this.na.long=THREE.Math.radToDeg(this.ta.y)+this.Ku.long;var n=this.ya.lat-.2*(this.ga.y-t.y),i=.2*(this.ga.x-t.x)+this.ya.long;this.ba(n,i)},i.moveWheel=function(t){this.na.lat=THREE.Math.radToDeg(this.ta.x)+this.Ku.lat,this.na.long=THREE.Math.radToDeg(this.ta.y)+this.Ku.long;var n=this._coordinates.lat-.1*t.y,i=this._coordinates.long+.1*t.x;this.ba(n,i)},i.moveDevice=function(t,n,i,e){this.sa=!0;var r=new THREE.Quaternion,o=window.orientation;null===o&&(o=this.J.clientWidth>this.J.clientHeight?90:0),t=t?THREE.Math.degToRad(t):0,n=n?THREE.Math.degToRad(n):0,i=i?THREE.Math.degToRad(i):0;var u=o?THREE.Math.degToRad(o):0,a=new THREE.Vector3(0,0,1),s=new THREE.Euler,c=new THREE.Quaternion,l=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));s.set(n,t,-i,"YXZ"),r.setFromEuler(s),r.multiply(l),r.multiply(c.setFromAxisAngle(a,-u)),this.ta=(new THREE.Euler).setFromQuaternion(r,"YXZ"),this.Zu=this.ta.z,this.isUserInteracting||this.oa||this.ba(THREE.Math.radToDeg(this.ta.x)-this.na.lat,-THREE.Math.radToDeg(this.ta.y)+this.na.long),this.aa||(this.snapToCenter(),this.Eo.fire(ki.MOTION_START),this.aa=!0)},i.releaseContact=function(t){if(this.na.lat=THREE.Math.radToDeg(this.ta.x)-this._coordinates.lat,this.na.long=THREE.Math.radToDeg(this.ta.y)+this._coordinates.long,this.isUserInteracting=!1,this.ya&&!t){var n=Math.hypot(this._coordinates.long-this.ya.long,this._coordinates.lat-this.ya.lat);this._a(n)}},i.abandonMotion=function(){this.isUserInteracting=!1,this.ya=null},i.keyPress=function(t){this.ka()||(this.isUserInteracting=!0,this.ra&&this.ra.forEach((function(t){return clearTimeout(t)}))),this.ca[t]||(this.ca[t]=!0)},i.keyUp=function(t){this.ca[t]=!1,this.ka()||(this.isUserInteracting=!1,this._a(1/0))},i.Ea=function(){var t=this;Object.keys(this.ca).forEach((function(n){if(t.ca[n])switch(n){case"up":t.ba(t._coordinates.lat+2,t._coordinates.long);break;case"down":t.ba(t._coordinates.lat-2,t._coordinates.long);break;case"left":t.ba(t._coordinates.lat,t._coordinates.long-2);break;case"right":t.ba(t._coordinates.lat,t._coordinates.long+2)}}))},i.ka=function(){var t=this;return Object.keys(this.ca).map((function(n){return t.ca[n]})).some((function(t){return t}))},i._a=function(t){var n=this;t>=20&&function(){var i={long:n._coordinates.long-n.Ku.long,lat:n._coordinates.lat-n.Ku.lat};t===1/0&&(i.long/=2,i.lat/=2);for(var e=function(t){n.ra.push(setTimeout((function(){1===t&&(n.oa=!0),49===t&&(n.oa=!1,n.ea=1e3/n.ia.videoFps);var e=2/Math.pow(t,1.5);n.na.lat=THREE.Math.radToDeg(n.ta.x)+n._coordinates.lat+i.lat,n.na.long=THREE.Math.radToDeg(n.ta.y)+n._coordinates.long+i.long,n.ba(n._coordinates.lat+i.lat*e,n._coordinates.long+i.long*e)}),t*n.ea))},r=1;r<50;r++)e(r)}()},i.onseeked=function(){this.Mu&&this.Ta()},i.onresize=function(){this.adjustRenderSize(),this.isUserInteracting=!1},i.Ta=function(){this.isVRPresenting||(this.Ju=THREE.Math.degToRad(90+this._coordinates.lat),this.Xu=THREE.Math.degToRad(this._coordinates.long),this.qu.position.set(Math.sin(this.Ju)*Math.cos(this.Xu),Math.cos(this.Ju),Math.sin(this.Ju)*Math.sin(this.Xu)),this.qu.lookAt(this.qu.target),this.qu.rotation.z+=this.Zu,this.Eo.fire(ki.CAMERA_UPDATE,{lon:this._coordinates.long,lat:this._coordinates.lat})),this.zu.render(this.Wu,this.qu)},i.adjustRenderSize=function(){if(this.isVRPresenting)this.qu.aspect=this.J.clientWidth/this.J.clientHeight,this.qu.updateProjectionMatrix(),this.zu.setSize(this.J.clientWidth,this.J.clientHeight);else{this.J.clientWidth>this.J.clientHeight?this.qu.aspect=Math.max(1,Math.min(2,this.J.clientWidth/this.J.clientHeight)):this.qu.aspect=Math.max(1/3,Math.min(3,this.J.clientWidth/this.J.clientHeight)),this.qu.updateProjectionMatrix();var t=ae(this.J.clientWidth,this.J.clientHeight,this.qu.aspect,1);this.zu.setSize(t.width,t.height),this.va.style.paddingTop="".concat(t.top,"px")}},i.Ou=function(){var t=this;this.zu.setAnimationLoop((function(){t.ka()&&t.Ea(),t.Ta()}))},i.Iu=function(){this.zu.setAnimationLoop(null)},i.ma=function(){this.xa({backgroundColor:"#000",display:"block"})},i.pa=function(){this.xa({backgroundColor:"#000",display:"none"})},i.xa=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.backgroundColor,i=t.display;this.va.style.cssText="position:absolute;left:0;top:0;margin-left:auto;margin-right:auto;padding:0;background:".concat(n,";width:100%;height:100%;text-align:center;display:").concat(i)},H(n,[{key:"currentCoordinates",get:function(){return this._coordinates},set:function(t){var n=Q(t,2),i=n[0],e=n[1];if(i>90||i<-90)throw new RangeError("Latitude should be a float between -90 and 90.");if(e<0||e>360)throw new RangeError("Longitude should be a float between 0 and 360.");this.ba(i,e),this.Ta()}},{key:"isVRPresenting",get:function(){return this.wa&&this.wa.isPresenting}},{key:"fieldOfView",get:function(){return this.qu.fov},set:function(t){this.qu.fov=t,this.qu.updateProjectionMatrix(),this.zu.render(this.Wu,this.qu)}},{key:"hasVRHeadset",get:function(){return this.wa&&!!this.wa.device}}]),n}(zr);function lo(t){return"symbol"==U(t)||Mn(t)&&"[object Symbol]"==Ot(t)}var fo=/^\s+|\s+$/g,ho=/^[-+]0x[0-9a-f]+$/i,vo=/^0b[01]+$/i,po=/^0o[0-7]+$/i,mo=parseInt;function wo(t){if("number"==typeof t)return t;if(lo(t))return NaN;if(It(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=It(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(fo,"");var i=vo.test(t);return i||po.test(t)?mo(t.slice(2),i?2:8):ho.test(t)?NaN:+t}var bo=Tt?Tt.prototype:void 0,go=bo?bo.toString:void 0;function yo(t){if("string"==typeof t)return t;if(Dn(t))return function(t,n){for(var i=-1,e=null==t?0:t.length,r=Array(e);++i<e;)r[i]=n(t[i],i,t);return r}(t,yo)+"";if(lo(t))return go?go.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function _o(t){return null==t?"":yo(t)}var ko=Et.isFinite,Eo=Math.min,To=function(t){var n=Math.round;return function(t,i){if(t=wo(t),(i=null==i?0:Eo(function(t){var n=function(t){return t?(t=wo(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}(t),i=n%1;return n==n?i?n-i:n:0}(i),292))&&ko(t)){var e=(_o(t)+"e").split("e");return+((e=(_o(n(e[0]+"e"+(+e[1]+i)))+"e").split("e"))[0]+"e"+(+e[1]-i))}return n(t)}}();function xo(t){return!isNaN(t)}function So(t){return To(t,3)}var Ao=0;function Mo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"b",n=++Ao;return"".concat(t).concat(n)}Mo(),Mo();var Ro=Mo(),Co=Mo(),Oo=Mo(),Io=Mo(),jo=Mo(),Do=Mo(),Lo=Mo(),No=Mo(),Po=Mo(),Fo=Mo(),Vo=Mo(),Uo=Mo(),Bo=Mo(),Ho=Mo(),zo=Mo(),qo=Mo(),Wo=Mo(),Go=Mo(),$o=Mo(),Ko=Mo(),Yo=Mo(),Jo=Object.freeze({__proto__:null,CONFIG_CHANGED:Po,TELECINE_READY:Fo,TELECINE_VIDEO_INIT:Vo,PLAY_INITIATED:Uo,QUALITY_CHANGED:Bo,FORCED_QUALITY:Ho,CUE_CHANGED:zo,CAPTIONS_CHANGED:qo,SPATIAL_PLAYBACK_TOGGLED:Wo,PICTURE_IN_PICTURE_AVAILABLE:Go,PICTURE_IN_PICTURE_NOT_AVAILABLE:$o,PICTURE_IN_PICTURE_ACTIVATED:Ko,PICTURE_IN_PICTURE_DEACTIVATED:Yo}),Xo=Object.freeze({__proto__:null,EVENT_PENDING:"liveeventpending",EVENT_ACTIVE:"liveeventactive",EVENT_STARTING:"liveeventstarting",EVENT_STARTED:"liveeventstarted",EVENT_ENDED:"liveeventended",ARCHIVE_STARTED:"livearchivestarted",ARCHIVE_DONE:"livearchivedone",ARCHIVE_ERROR:"livearchiveerror"}),Zo={h264:"video/mp4",hls:"application/vnd.apple.mpegurl",hlsLive:"application/x-mpegURL",dash:"application/vnd.vimeo.dash+json",dashMpd:"video/vnd.mpeg.dash.mpd",vp6:"video/x-flv",vp8:"video/webm",webm:"video/webm",hds:"application/f4m"},Qo={"application/vnd.apple.mpegurl":"hls","application/vnd.vimeo.dash+json":"dash","video/vnd.mpeg.dash.mpd":"dash","video/mp4":"progressive","video/webm":"progressive","video/x-flv":"progressive","application/x-mpegURL":"hlslive"},tu=(W({},wi,{},yi,{},_i,{},Xo,{},ki,{},bi,{},Ei,{},Ti,{},Jo),W({},_i,{},Xo));function nu(t){var n;return"done"===(null==t||null==(n=t.archive)?void 0:n.status)}function iu(t){return"pending"===(null==t?void 0:t.status)}function eu(t){return"started"===(null==t?void 0:t.status)}function ru(t){return"ended"===(null==t?void 0:t.status)}function ou(t){return uu(t,"/playlist/refresh")}function uu(t,n){var i,e=null==(i=t.request.files.hls)?void 0:i.default_cdn,r=t.request,o=r.signature,u=r.timestamp,a=r.expires,s="https://".concat(t.player_url,"/live/").concat(t.video.id),c="?signature=".concat(o,"&time=").concat(u,"&expires=").concat(a,"&cdn=").concat(e);return"".concat(s).concat(n).concat(c)}var au=En(Object.keys,Object),su=Object.prototype.hasOwnProperty;function cu(t){if(!Sn(t))return au(t);var n=[];for(var i in Object(t))su.call(t,i)&&"constructor"!=i&&n.push(i);return n}var lu=qt(Et,"DataView"),fu=qt(Et,"Promise"),du=qt(Et,"Set"),hu=qt(Et,"WeakMap"),vu=Pt(lu),pu=Pt(tn),mu=Pt(fu),wu=Pt(du),bu=Pt(hu),gu=Ot;(lu&&"[object DataView]"!=gu(new lu(new ArrayBuffer(1)))||tn&&"[object Map]"!=gu(new tn)||fu&&"[object Promise]"!=gu(fu.resolve())||du&&"[object Set]"!=gu(new du)||hu&&"[object WeakMap]"!=gu(new hu))&&(gu=function(t){var n=Ot(t),i="[object Object]"==n?t.constructor:void 0,e=i?Pt(i):"";if(e)switch(e){case vu:return"[object DataView]";case pu:return"[object Map]";case mu:return"[object Promise]";case wu:return"[object Set]";case bu:return"[object WeakMap]"}return n});var yu=gu,_u=Object.prototype.hasOwnProperty;function ku(t){if(null==t)return!0;if(Nn(t)&&(Dn(t)||"string"==typeof t||"function"==typeof t.splice||Un(t)||ti(t)||jn(t)))return!t.length;var n=yu(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(Sn(t))return!cu(t).length;for(var i in t)if(_u.call(t,i))return!1;return!0}function Eu(t){return Nn(t)?si(t):cu(t)}function Tu(){return[]}var xu=Object.prototype.propertyIsEnumerable,Su=Object.getOwnPropertySymbols,Au=Su?function(t){return null==t?[]:(t=Object(t),function(t,n){for(var i=-1,e=null==t?0:t.length,r=0,o=[];++i<e;){var u=t[i];n(u)&&(o[r++]=u)}return o}(Su(t),(function(n){return xu.call(t,n)})))}:Tu;function Mu(t,n){for(var i=-1,e=n.length,r=t.length;++i<e;)t[r+i]=n[i];return t}var Ru=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)Mu(n,Au(t)),t=Tn(t);return n}:Tu;function Cu(t,n,i){var e=n(t);return Dn(t)?e:Mu(e,i(t))}function Ou(t){return Cu(t,Eu,Au)}function Iu(t){return Cu(t,li,Ru)}var ju=Object.prototype.hasOwnProperty,Du=/\w*$/,Lu=Tt?Tt.prototype:void 0,Nu=Lu?Lu.valueOf:void 0;var Pu=Zn&&Zn.isMap,Fu=Pu?Kn(Pu):function(t){return Mn(t)&&"[object Map]"==yu(t)},Vu=Zn&&Zn.isSet,Uu=Vu?Kn(Vu):function(t){return Mn(t)&&"[object Set]"==yu(t)},Bu={};function Hu(t,n,i,e,r,o){var u,a=1&n,s=2&n,c=4&n;if(i&&(u=r?i(t,e,r,o):i(t)),void 0!==u)return u;if(!It(t))return t;var l=Dn(t);if(l){if(u=function(t){var n=t.length,i=new t.constructor(n);return n&&"string"==typeof t[0]&&ju.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(t),!a)return yn(t,u)}else{var f=yu(t),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(Un(t))return mn(t,a);if("[object Object]"==f||"[object Arguments]"==f||d&&!r){if(u=s||d?{}:An(t),!a)return s?function(t,n){return ri(t,Ru(t),n)}(t,function(t,n){return t&&ri(n,li(n),t)}(u,t)):function(t,n){return ri(t,Au(t),n)}(t,function(t,n){return t&&ri(n,Eu(n),t)}(u,t))}else{if(!Bu[f])return r?t:{};u=function(t,n,i){var e=t.constructor;switch(n){case"[object ArrayBuffer]":return bn(t);case"[object Boolean]":case"[object Date]":return new e(+t);case"[object DataView]":return function(t,n){var i=n?bn(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}(t,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return gn(t,i);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(t);case"[object RegExp]":return function(t){var n=new t.constructor(t.source,Du.exec(t));return n.lastIndex=t.lastIndex,n}(t);case"[object Set]":return new e;case"[object Symbol]":return function(t){return Nu?Object(Nu.call(t)):{}}(t)}}(t,f,a)}}o||(o=new sn);var h=o.get(t);if(h)return h;o.set(t,u),Uu(t)?t.forEach((function(e){u.add(Hu(e,n,i,e,t,o))})):Fu(t)&&t.forEach((function(e,r){u.set(r,Hu(e,n,i,r,t,o))}));var v=c?s?Iu:Ou:s?keysIn:Eu,p=l?void 0:v(t);return function(t,n){for(var i=-1,e=null==t?0:t.length;++i<e&&!1!==n(t[i],i););}(p||t,(function(e,r){p&&(e=t[r=e]),ei(u,r,Hu(e,n,i,r,t,o))})),u}function zu(t){return Hu(t,5)}function qu(t){var n=this,i={},e={get attributes(){return Object.assign({},n)},get previousAttributes(){return i},clear:function(){r();var t=n.attributes;for(var i in t)delete n[i]},set:function(t){for(var i in r(),t=zu(t))n[i]=t[i]},clone:function(){return new qu(n.attributes)},toJSON:function(){return zu(n.attributes)}};function r(){ku(n.attributes)||(i=zu(n.attributes))}return e.set(t),et(n,e)}function Wu(t,n){var i=new qu(pi(t,n)),e=!1;return rt(i,{reset:function(t){return i.clear(),function(t){e=!0,i.set(t),pi(i,n)}(t),i},isNewVideo:function(){var t=i.previousAttributes;return!e||t.video.id!==i.video.id||t.video.version.current!==i.video.version.current||t.video.live_event&&!nu(t.video.live_event)&&nu(i.video.live_event)}})}Bu["[object Arguments]"]=Bu["[object Array]"]=Bu["[object ArrayBuffer]"]=Bu["[object DataView]"]=Bu["[object Boolean]"]=Bu["[object Date]"]=Bu["[object Float32Array]"]=Bu["[object Float64Array]"]=Bu["[object Int8Array]"]=Bu["[object Int16Array]"]=Bu["[object Int32Array]"]=Bu["[object Map]"]=Bu["[object Number]"]=Bu["[object Object]"]=Bu["[object RegExp]"]=Bu["[object Set]"]=Bu["[object String]"]=Bu["[object Symbol]"]=Bu["[object Uint8Array]"]=Bu["[object Uint8ClampedArray]"]=Bu["[object Uint16Array]"]=Bu["[object Uint32Array]"]=!0,Bu["[object Error]"]=Bu["[object Function]"]=Bu["[object WeakMap]"]=!1;var Gu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$u=/^\w*$/;function Ku(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var i=function i(){var e=arguments,r=n?n.apply(this,e):e[0],o=i.cache;if(o.has(r))return o.get(r);var u=t.apply(this,e);return i.cache=o.set(r,u)||o,u};return i.cache=new(Ku.Cache||an),i}Ku.Cache=an;var Yu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ju=/\\(\\)?/g,Xu=function(t){var n=Ku((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(Yu,(function(t,i,e,r){n.push(e?r.replace(Ju,"$1"):i||t)})),n}),(function(t){return 500===i.size&&i.clear(),t})),i=n.cache;return n}();function Zu(t,n){return Dn(t)?t:function(t,n){if(Dn(t))return!1;var i=U(t);return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!lo(t))||$u.test(t)||!Gu.test(t)||null!=n&&t in Object(n)}(t,n)?[t]:Xu(_o(t))}function Qu(t){if("string"==typeof t||lo(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function ta(t,n){for(var i=0,e=(n=Zu(n,t)).length;null!=t&&i<e;)t=t[Qu(n[i++])];return i&&i==e?t:void 0}function na(t,n,i){var e=null==t?void 0:ta(t,n);return void 0===e?i:e}var ia=navigator.userAgent.toLowerCase();function ea(t){t=t.toLowerCase();var n=new RegExp(t).test(ia);return"safari"===t?n&&new RegExp("version").test(ia):n}function ra(t){var n=document.createElement("div"),i=t.charAt(0).toUpperCase()+t.slice(1),e=(t+" "+["Webkit","Moz","O","ms"].join(i+" ")+i).split(" ");for(var r in e){var o=e[r];if(void 0!==n.style[o])return o}return t}var oa=!!ea("android")&&(parseFloat(ia.replace(/^.* android (\d+)\.(\d+).*$/,"$1.$2"))||!0),ua=window.devicePixelRatio||1,aa=!(!ea("windows phone")&&!ea("iemobile"))&&(parseFloat(ia.replace(/^.* windows phone (os )?(\d+)\.(\d+).*$/,"$2.$3"))||!0),sa=!!ea("msie")&&parseFloat(ia.replace(/^.*msie (\d+).*$/,"$1")),ca=!!ea("trident")&&parseFloat(ia.replace(/^.*trident\/(\d+)\.(\d+).*$/,"$1.$2"))+4,la=!!(ea("ipad;")||ea("iphone;")||ea("ipod touch;"))&&parseFloat(ia.replace(/^.* os (\d+)_(\d+).*$/,"$1.$2")),fa=ea("opera")||ea("opr");function da(){if(!ea("safari"))return[];var t=ia.split(" ").find((function(t){return/version\//.test(t)}));return t?t.replace("version/","").split(".").map((function(t){return parseInt(t,10)})):[]}var ha=ea("safari")&&ea("apple")&&!ea("chrome")&&!ea("android")&&da()[0]>=11,va={airPlay:"WebKitPlaybackTargetAvailabilityEvent"in window,android:oa,hasAutoplayPolicy:oa||la||ha||function(){if(!ea("chrome"))return[];var t=ia.split(" ").find((function(t){return la?/CriOS\//.test(t):/chrome\//.test(t)}));return t?t.replace("chrome/","").split(".").map((function(t){return parseInt(t,10)})):[]}()[0]>=66,iOS:la,mobileAndroid:oa&&ea("mobile"),browser:{bb10:ea("bb10"),chrome:ea("chrome"),firefox:ea("firefox"),ie:sa||ca,edge:ea("edge"),opera:fa,safari:ea("safari")&&ea("apple")&&!ea("chrome")&&!ea("android")},devicePixelRatio:ua,iPhone:ea("iphone;")||ea("ipod touch;")||ea("ipod;"),iPad:ea("ipad;"),iPadNonRetina:ea("ipad;")&&ua<2,mac:ea("mac os"),pointerEvents:window.navigator.pointerEnabled||window.navigator.msPointerEnabled||!1,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||ea("windows phone")||window.navigator.maxTouchPoints>1||window.navigator.msMaxTouchPoints||!1,transformProperty:ra("transform"),transitionProperty:ra("transition"),webp:function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),windowsPhone:aa},pa=/mac os x 10_13/.test(ia),ma=va.iOS&&va.iOS>=11,wa=va.iPhone&&812===window.screen.availHeight&&375===window.screen.availWidth,ba=va.iPhone&&896===window.screen.availHeight&&414===window.screen.availWidth,ga=va.iPad&&1112===window.screen.availWidth&&834===window.screen.availHeight,ya=va.iPad&&834===window.screen.availWidth&&1194===window.screen.availHeight,_a=va.iPad&&1024===window.screen.availWidth&&1366===window.screen.availHeight,ka=wa||ba||ga||ya||_a;function Ea(){return!!(ha&&pa||ha&&ma)||"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="hvc1"')}function Ta(){return!(va.iOS||va.iPad||va.browser.ie)&&(!ea("safari")||da()[0]>11||11===da()[0]&&(da()[2]>1||da()[1]>0))}function xa(t,n,i){return void 0===i&&(i=n,n=void 0),void 0!==i&&(i=(i=wo(i))==i?i:0),void 0!==n&&(n=(n=wo(n))==n?n:0),function(t,n,i){return t==t&&(void 0!==i&&(t=t<=i?t:i),void 0!==n&&(t=t>=n?t:n)),t}(wo(t),n,i)}function Sa(t){return t.quality||t.metadata.quality}function Aa(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=t.url;if("avc_url"in t&&(e=t.avc_url),i)return e;var r=n?va.spatialHEVC&&va.hevc:va.hevc,o=n?va.spatialHEVC&&va.hdr:va.hdr;return o&&"hevc_hdr_url"in t?e=t.hevc_hdr_url:r&&"hevc_sdr_url"in t?e=t.hevc_sdr_url:va.av1&&"av1_url"in t&&(e=t.av1_url),e}function Ma(t){if(ku(t.progressive))return[];var n=t.progressive;return"progressive_avc"in t&&(n=t.progressive_avc),n.filter(Ca(n))}function Ra(t){if("number"==typeof t)return t;var n=t.split("-");return 5===n.length?n[0]:parseInt(n[0],10)}function Ca(t){var n=t.filter(Oa).map(Sa);return function(t){return-1===n.indexOf(Sa(t))||Oa(t)}}function Oa(t){var n=t.fps;return"metadata"in t&&(n=t.metadata.fps),n>30}function Ia(t){return ja(t)>=720}function ja(t){return"string"!=typeof t&&(t=Sa(t)),parseInt(t,10)}function Da(t){var n=Ma(t.request.files).map((function(t){return t.quality}));return La(t,t.embed.quality,n)}function La(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t.embed.on_site||va.android||va.iOS||va.windowsPhone||!n||i.length&&-1===i.indexOf(n)?null:n}function Na(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desc";return function(n,i){var e=ja(n),r=Pa(n),o=ja(i),u=Pa(i);return"asc"===t?e-o||r-u:o-e||u-r}}function Pa(t){return"object"!==U(t)?0:"fps"in t?t.fps:"metadata"in t&&"fps"in t.metadata?t.metadata.fps:0}function Fa(t){var n=t.video.live_event,i=t.request.files;if(!ku(i.hls)){var e,r=i.hls.default_cdn,o=i.hls.cdns[r].json_url||(null==(e=n.playback)?void 0:e.hls_noredirect),u=t.request.flags.live_dash?2:1;return{id:"hls-".concat(r,"-").concat(t.video.id),src:o,mime:Zo.hlsLive,priority:u,metadata:{cdn:r,origin:i.hls.cdns[r].origin,quality:"sd"}}}return null}function Va(t,n){var i=[];if(n.video){var e=n.video.currentFile.mime;if(e===Zo.hlsLive)return n.manifest.video.map((function(t){return W({},t,{quality:"".concat(t.height,"p")})}));i=[Zo.dash,Zo.dashMpd].includes(e)?function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.streams;"streams_avc"in t&&(i=t.streams_avc);var e=n?va.spatialHEVC&&va.hevc:va.hevc,r=n?va.spatialHEVC&&va.hdr:va.hdr;return r&&"streams_hevc_hdr"in t?i=t.streams_hevc_hdr:e&&"streams_hevc_sdr"in t?i=t.streams_hevc_sdr:va.av1&&"streams_av1"in t&&(i=t.streams_av1),i}(t.request.files.dash,t.video.spatial):n.video.files.filter((function(t){return"progressive"===Qo[t.mime]}))}return i.filter(Ca(i)).sort(Na())}function Ua(t){return va.spatialPlayback&&t.video.spatial?35:50}va.hevc=Ea(),va.hdr=ha&&ma&&ka,va.vp9hdr=(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(color-gamut: rec2020)").matches)&&screen.colorDepth>=48&&(MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.01"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.01"')),va.av1="undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="av01.0.31M.08.0.110.01.01.01.0"'),va.webvr=!!(window.navigator&&"getVRDisplays"in window.navigator),va.webxr=!!(window.navigator&&"xr"in window.navigator&&"supportsSession"in window.navigator.xr),va.spatialPlayback=Ta(),va.spatialHEVC=!va.browser.safari&&Ta()&&Ea(),va.stereoscopic=va.spatialPlayback&&va.mobileAndroid;var Ba={captureException:function(t){},captureMessage:function(t){},captureBreadcrumb:function(){}},Ha=Ba,za=function(t){Ha=Object.assign({},Ba,t)},qa=function(t,n){return Ha.captureException(t,n)},Wa=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"backbone",e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"info";return Ha.captureBreadcrumb(t,n,i,e)};function Ga(t,n,i){var e=t.embed.playsinline&&(va.mobileAndroid||va.iOS>=10),r=!1,o=!1,u=!1,a=!0;function s(t){if(!a&&i.buffered&&i.buffered.length>0){t=t||i.currentTime;var e=function(t,n){var i=t.length-1;if(t.length>1)for(var e=0,r=t.length;e<r;e++)if(t.start(e)<=n&&t.end(e)>=n){i=e;break}return i}(i.buffered,t),o=i.buffered.end(e),s=o/i.duration,c=i.duration;if(n.fire(wi.PROGRESS,{loaded:o,duration:c,loadProgress:s}),u&&r&&o===i.duration)return void(r&&i.paused&&i.play().catch(qa))}}function c(n){if("auto"!==n){var e=Va(t,i).reverse().map((function(t){return t.quality})).indexOf(n);-1!==e&&(Wa("Switched to ".concat(n),{},"video"),i.video.currentFile.restrictedStreamIndexes=[e])}else i.video.currentFile.restrictedStreamIndexes=[]}function l(e){var r=Va(t,i).map((function(t){return t.quality})),o=La(t,t.embed.quality,r);o&&n.fire(Ho,o),c(o||"auto")}return n.on(Vo,(function(){i.playsinline=e,i.muted=t.embed.muted})),n.on(Co,(function(){a=!0,i.paused||i.pause(),o=!1,r=!1,setTimeout((function(){i.currentTime=0}),300)})),i.on(wi.PLAY,(function(){a=!1,n.fire(wi.PLAY,i.currentTime)})),i.on(wi.PAUSE,(function(){r=!1,n.fire(wi.PAUSE,i.currentTime,i.ended)})),i.on(wi.PLAYING,(function(t){s()})),i.on(wi.TIME_UPDATE,(function(t){var e=i.currentTime;if(!a){var r=i.duration,o=e/r,u=i.playbackRate;n.fire(wi.TIME_UPDATE,{currentTime:e,duration:r,timeProgress:o,playbackRate:u})}})),i.on(wi.ENDED,(function(t){i.loop?i.play().catch(qa):(r=!1,n.fire(wi.ENDED,t))})),i.on(wi.LOADED_METADATA,(function(n){var e=i.duration;if(isFinite(e)&&e>0){if(e<t.video.duration-1||e>t.video.duration+1)return;t.video.duration=e}t.video.video_width=i.videoWidth,t.video.video_height=i.videoHeight})),i.on(wi.DURATION_CHANGE,(function(n){var e=i.duration;isFinite(e)&&(t.video.duration>0&&(e<t.video.duration-1||e>t.video.duration+1)||(t.video.duration=e))})),i.on(wi.PROGRESS,s),i.on(yi.BUFFER_STARTED,(function(){u=!0})),i.on(yi.BUFFER_ENDED,(function(){u=!1})),n.on(Ro,(function(n,e){e||(e=(i.duration||t.video.duration)*xa(n,0,1)),e=xa(e,0,i.duration||t.video.duration),i.currentTime=e})),i.on(wi.SEEKING,(function(){var t=i.currentTime,e=i.duration,r=t/e;n.fire(wi.SEEKING,{currentTime:t,duration:e,timeProgress:r})})),i.on(wi.SEEKED,(function(){s();var t=i.currentTime,e=i.duration,r=t/e;n.fire(wi.SEEKED,{currentTime:t,duration:e,timeProgress:r})})),n.on(Io,(function(e){var r=i.video.currentFile.mime;if([Zo.dash,Zo.dashMpd,Zo.hlsLive].includes(r))c(e);else{var o=Va(t,i).filter((function(t){return t.metadata.quality===e}));o.length>0&&(a=!0,i.video.currentFile=o[0])}n.fire(Bo,e)})),i.on(yi.CURRENT_FILE_CHANGE,(function(e){Wa("Current file changed",{id:e.id,mime:e.mime,src:e.src,metadata:e.metadata},"video");var r=e.metadata.quality;[Zo.dash,Zo.dashMpd].includes(e.mime)&&l(),[Zo.hlsLive].includes(e.mime)?i.once(yi.STREAMS_LOADED,(function(){l()})):function(i){var e=Da(t);e&&n.fire(Ho,e)}(),n.fire(Bo,r)})),{play:function(){return r=!0,o||(n.fire(Uo),o=!0),i.play()},pause:function(){r=!1,i.pause()}}}function $a(t,n,i){var e=!1,r=i.presentationMode;function o(){!i.supportsPresentationMode("picture-in-picture")||va.spatialPlayback&&t.video.spatial?n.fire($o):n.fire(Go)}i.on(wi.LOADED_METADATA,(function(){e=!0})),i.on(wi.PLAY,(function(){e?o():i.once(wi.LOADED_METADATA,o)})),i.on(yi.PRESENTATION_MODE_CHANGE,(function(t){"inline"===r&&"picture-in-picture"===t&&n.fire(Ko),"picture-in-picture"===r&&"inline"===t&&n.fire(Yo),r=t,i.video.textTracks.forEach((function(n){"picture-in-picture"===t&&"hidden"===n.mode&&(n.mode="showing"),"inline"===t&&"showing"===n.mode&&(n.mode="hidden")}))})),n.on(Lo,(function(){i.supportsPresentationMode("picture-in-picture")&&(i.presentationMode="picture-in-picture")})),n.on(No,(function(){i.supportsPresentationMode("picture-in-picture")&&(i.presentationMode="inline")}))}function Ka(t,n,i){var e=null;va.spatialPlayback&&(n.on(Vo,(function(){e&&(i.deactivateEffect(co),e=null,n.fire(Wo,e));var r=t.video.spatial;r&&(t.request.drm||i.supportsEffect(co)&&(e=i.activateEffect(co,{threeUrl:t.request.urls.three_js,fps:t.video.fps,fieldOfView:r.fov,directorTimeline:r.director_timeline,projection:r.projection,stereoMode:r.stereo_mode,initialView:r.initial_view,isMobile:va.android,dimensions:t.embed.on_site?{width:1080,height:540}:{width:640,height:360}}),n.fire(Wo,e)))})),i.on(ki.SPATIAL_UNSUPPORTED,(function(){e&&(i.deactivateEffect(co),e=null,n.fire(Wo,e))})))}function Ya(t,n,i){var e=null;n.on(Vo,(function(){e&&(i.deactivateEffect(ro),e=null),t.video.canvas&&(t.request.drm||i.supportsEffect(ro)&&(e=i.activateEffect(ro)))}))}var Ja=hi((function(t,n,i){fi(t,n,i)}));function Xa(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}var Za=function(){function t(t,n,i){nt(this),this.Sa=zu(t),this.Aa=t.session_url||t.sessionUrl,this.Ma=n,this.Ra=i,this.Ca=!1,this.Oa=!1,this.Ia()}var n=t.prototype;return n.disable=function(){this.Oa=!0},n.forcePolling=function(){this.isForcePolling||(this.Ca=!0,this.Ia())},n.unforcePolling=function(){this.Ca=!1},n.Ia=function(){!1!==this.Sa.polling&&(this.ja()?this.Da():this.La()&&this.Na())},n.La=function(){var t;return!(ru(this.Sa)&&"started"!==(null==(t=this.Sa.archive)?void 0:t.status)||!this.isForcePolling&&eu(this.Sa))},n.ja=function(){return!this.Aa||!(!iu(this.Sa)||null!==this.Sa.id)},n.Pa=function(){try{var t=this;return Xa(Ke(t.Ma).json(),(function(n){return t.Aa=n.url,n.url}))}catch(t){return r.reject(t)}},n.Na=function(){try{var t=this;if(t.Oa)return;var n,i={};return va.browser.ie&&(i={Pragma:"no-cache","Cache-Control":"no-cache"}),function(t,n){return t&&t.then?t.then(n):n()}(function(e,r){try{var o=Xa(Ke({url:t.Aa,retry:3,retryStatus:function(t){return[410].includes(t)||Ae.retryStatus(t)},hooks:{beforeRetry:[t.Kt.bind(t)]},headers:i}).json(),(function(t){n=t}))}catch(t){return r()}return o&&o.then?o.then(void 0,r):o}(0,(function(){throw new Error("Hit max retries polling ".concat(t.Aa))})),(function(i){if(n.status!==t.Sa.status){var e;if(ru(n)&&"provision_expire"===n.terminate_reason)return;var r=(z(e={},"active",tu.EVENT_ACTIVE),z(e,"pending",tu.EVENT_PENDING),z(e,"started",tu.EVENT_STARTED),z(e,"ended",tu.EVENT_ENDED),e)[n.status];try{t.fire(r,n)}catch(t){throw new Error("Error firing live event status change ".concat(t))}}if(n.archive&&(!t.Sa.archive||n.archive.status!==t.Sa.archive.status)){var o,u=(z(o={},"started",tu.ARCHIVE_STARTED),z(o,"done",tu.ARCHIVE_DONE),z(o,"error",tu.ARCHIVE_ERROR),o)[n.archive.status];t.fire(u,n)}t.Sa=Ja(t.Sa,n),t.La()&&setTimeout(t.Na.bind(t),5e3)}))}catch(t){return r.reject(t)}},n.Kt=function(t,n){try{return Xa(this.Pa(),(function(n){t.url=n}))}catch(t){return r.reject(t)}},n.Da=function(){try{var t=this;if(t.Oa)return;return Xa(Ke(t.Ra).json(),(function(n){var i=!1;return function(e,r){var o=function(){if(null!==n.ingest.session_id)return t.Sa.id=n.ingest.session_id,Xa(t.Pa(),(function(){t.Na(),i=!0}))}();return o&&o.then?o.then(r):r(o)}(0,(function(n){if(i)return n;setTimeout(t.Da.bind(t),5e3)}))}))}catch(t){return r.reject(t)}},H(t,[{key:"isForcePolling",get:function(){return this.Ca}}]),t}();function Qa(){}function ts(t,n,i){var e,o,u=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}((function(t){return function(t){if(t&&t.then)return t.then(Qa)}(function(n,e){try{var u=function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(st("module/streamroot.js"),(function(n){o=n(i,{TelecineEvents:yi,VideoEvents:wi},t)}))}catch(t){return}return u&&u.then?u.then(void 0,e):u}(0,(function(t){})))}));function a(){i.endLive()}n.on(Po,(function(){o&&o.destroy(),t.video.p2p&&(u(t.video.p2p),i.bufferTarget=30,i.presentationDelay=30),e&&(e.disable(),e=null),t.video.live_event&&!nu(t.video.live_event)&&function(i){(e=new Za(i,function(t){return uu(t,"/session/refresh")}(t),function(t){return"https://".concat(t.vimeo_url,"/live_event/status?clip_id=").concat(t.video.id)}(t))).on(tu.EVENT_ENDED,a),Object.keys(tu).forEach((function(t){var i=tu[t];e.on(i,(function(t){n.fire(i,t)}))}))}(t.video.live_event)})),n.on(Oo,(function(){e&&e.disable()})),i.on(tu.STREAM_ONLINE,(function(){e.isForcePolling&&e.unforcePolling()})),i.on(tu.STREAM_OFFLINE,(function(){e.isForcePolling||e.forcePolling()}))}function ns(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||"null"===t||0===n.length)return{track:null};var i=t.split("."),e=Q(i,2),r=e[0],o=e[1],u=r.split(/[-_]/),a=Q(u,1),s=a[0],c=r!==s,l=n.filter((function(t){return c&&t.language===r||t.language===s})).sort((function(t,n){var i=2*(t.language===s&&t.kind===o)+2*(t.language===r)+1*(t.kind===o);return 2*(n.language===s&&n.kind===o)+2*(n.language===r)+1*(n.kind===o)-i}));return l.length>0?{track:l[0],exactMatch:l[0].language===r&&l[0].kind===o}:{track:null}}function is(t,n,i){var e;function r(){if(0!==n.video.textTracks.length){if(n.video.textTracks.forEach((function(t){t.on("cuechange",o),t.on("modechange",u)})),n.video.textTracks.language&&Q(n.video.textTracks.language.split(/[-_]/),1)[0]!=Q(n.video.textTracks.language.split(/[-_]/),1)[0]){var i="".concat(n.video.textTracks.language,".subtitles");if(ns(i,n.video.textTracks).track)return void t.fire(jo,i)}t.fire(Do)}else t.fire(Do)}function o(n){for(var i,e=n.target,r=e.activeCues,o=[],u=0,a=r.length;u<a;u++)""!==r[u].text.replace(/^\s+|\s+$/gm,"")&&((i=document.createElement("span")).appendChild(r[u].getCueAsHTML()),o.push({html:i.innerHTML.replace("\n","<br>"),text:r[u].text}));t.fire(zo,e,o)}function u(n){var e=n.target,r=i.querySelector("video");va.iOS&&function(t){var n=[document.fullscreenElement,document.webkitFullscreenElement,document.webkitCurrentFullScreenElement,document.mozFullScreenElement,document.msFullscreenElement].find((function(t){return void 0!==t}));return void 0!==n?!!n:t.webkitDisplayingFullscreen}(r)&&"showing"===e.mode&&t.fire(qo,e)}t.on(Vo,r),t.on(jo,(function(i){if(!e||e.id!==i){var r=n.video.textTracks.getTrackById(i),o=!0;if(!r){var u=ns(i,n.video.textTracks);r=u.track,o=u.exactMatch}r!==e&&setTimeout((function(){n.video&&n.video.textTracks.forEach((function(t){t.mode=t===r?"hidden":"disabled"})),t.fire(qo,r,!o),e=r}),0)}})),t.on(Do,(function(){setTimeout((function(){n.video&&n.video.textTracks.forEach((function(t){t.mode="disabled"})),t.fire(zo),e&&(e=null,t.fire(qo,null))}),0)})),t.on(yi.TEXT_TRACKS_AVAILABLE,r)}function es(t,n,i){var e,r;return e=new eo(i,[Tr,Vr,Hr,Ee],{externalDisplays:[AirPlayExternalDisplay],mediaSourceScanner:{droppedFrameSwitchPercent:Ua(t)},tests:t.request.ab_tests,fileCodecs:t.request.file_codecs,bufferTarget:t.video.buffer_target,presentationDelay:t.video.presentation_delay}),Object.values(wi).filter((function(t){return![wi.TIME_UPDATE,wi.PROGRESS,wi.SUSPEND,wi.ERROR].includes(t)})).forEach((function(t){e.on(t,(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Wa(t,n,"video event")}))})),e.on(yi.STREAMS_LOADED,(function(n){n.video.forEach((function(n){var i=function(t,n){return n.find((function(n){return Ra(n.id)===String(t)||Ra(n.id)===Ra(t)}))}(n.id,Va(t,e));i?(n.profile=i.profile,n.quality=i.quality,n.fps=i.fps):(n.profile=null,n.quality="".concat(n.height,"p"),n.fps=n.framerate)}))})),e.on(yi.STREAM_CHANGE,(function(t){var i=t.index,e=t.streams,r=e[i];Wa("Stream changed",r,"video"),n.fire(yi.STREAM_CHANGE,r,i,e)})),e.on(yi.STREAM_TARGET_CHANGE,(function(t){var i=t.index,e=t.streams,r=e[i];n.fire(yi.STREAM_TARGET_CHANGE,r,i,e)})),function(t,n,i){i.forEach((function(i){t(i,(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];n.apply(void 0,[i].concat(e))}))}))}(e.on,n.fire,[bi.ACTIVATED,bi.AVAILABLE,bi.DEACTIVATED,bi.UNAVAILABLE,_i.STREAM_OFFLINE,_i.STREAM_ONLINE,Ei.MEDIASESSION_PAUSE,Ei.MEDIASESSION_PLAY,Ei.MEDIASESSION_SEEK_BACKWARD,Ei.MEDIASESSION_SEEK_FORWARD,yi.AV_DURATION_MISMATCH,yi.BANDWIDTH,yi.BUFFER_ENDED,yi.BUFFER_OCCUPANCY,yi.BUFFER_STARTED,yi.CHAPTER_CUES_UPDATED,yi.CUE_POINT,yi.CURRENT_FILE_CHANGE,yi.DOWNLOAD_END,yi.DOWNLOAD_TIMEOUT,yi.DRM_AUTH_SUCCESS,yi.DROPPED_FRAMES,yi.MANIFEST_LOADED,yi.MANIFEST_TIMEOUT,yi.QUOTA_EXCEEDED_ERROR,yi.SCANNER_CHANGE,yi.STREAM_CHANGE_START,yi.STREAM_BUFFER_END,yi.STREAM_BUFFER_START,yi.TEXT_TRACKS_AVAILABLE,ki.CAMERA_UPDATE,ki.MOTION_END,ki.MOTION_START,ki.SPATIAL_UNSUPPORTED,ki.WEBVR_ENTER,ki.WEBVR_EXIT,ki.WEBVR_HARDWARE_AVAILABLE,Ti.BRAIN_ML_SWITCH_TO_SKYFIRE,Ti.BRAIN_ML_MODEL_INPUTS,wi.DURATION_CHANGE,wi.ERROR,wi.LOAD_START,wi.LOADED_DATA,wi.LOADED_METADATA,wi.PLAYING,wi.RATE_CHANGE,wi.STALLED,wi.VOLUME_CHANGE,wi.WAITING]),n.fire(Fo),new is(n,e,i),new $a(t,n,e),new Ka(t,n,e),new Ya(t,n,e),new ts(t,n,e),r=new Ga(t,n,e),n.on(Po,(function(){var r=t.video.live_event;if(!(iu(r)||function(t){return"active"===(null==t?void 0:t.status)}(r)||ru(r)&&!nu(r))&&(!eu(r)||!e.video||t.isNewVideo())){var o=eu(r)?function(t){var n=[],i=Fa(t);i&&n.push(i);var e=function(t){var n,i=t.video.live_event,e=t.request.files;if(ku(e.dash))return null;var r=e.dash.default_cdn,o=e.dash.cdns[r].url||(null==(n=i.playback)?void 0:n.dash_noredirect),u=t.request.flags.live_dash?2:1;return{id:"dash-".concat(r,"-").concat(t.video.id),src:o,mime:Zo.dashMpd,priority:u,metadata:{cdn:r,origin:e.dash.cdns[r].origin,quality:"sd"}}}(t);return e&&n.push(e),n}(t):function(t){var n=t.request.files,i=Ma(n),e=Da(t),r=t.request.cookie.quality||e||function(t){var n=Ma(t.request.files),i=n.some(Ia);va.mobileAndroid&&(i=!1);var e="720p";if(i){var r=n.map(Sa);-1!==r.indexOf("1080p")&&-1===r.indexOf("720p")&&(e="1080p")}return t.request.cookie.hd||t.video.default_to_hd?e:"360p"}(t),o=function(t){var n=t.files,i=void 0===n?[]:n,e=t.preference,r=void 0===e?"360p":e,o=t.priorityOffset,u=void 0===o?0:o;(i=V(i)).sort(Na());var a=i.map(Sa);if(r){-1===a.indexOf(r)&&(a.push(r),a.sort((function(t,n){return ja(n)-ja(t)})));var s=a.indexOf(r),c=a.splice(0,s);c.reverse(),a.push.apply(a,tt(c))}return i.map((function(t){return{id:t.id,src:t.url,mime:t.mime,priority:a.indexOf(t.quality)+1+u,metadata:{profile:t.profile,cdn:t.cdn,origin:t.origin,quality:t.quality,fps:t.fps}}}))}({files:i,preference:r,priorityOffset:2}),u=t.request.drm&&va.browser.safari;return(n.hls&&(va.iPhone||va.iPad)||u)&&(o=o.concat(function(t){var n=t.request.files,i=n.hls.default_cdn,e=t.request.drm,r=Aa(n.hls.cdns[i],t.video.spatial,e);return{id:"hls-".concat(i,"-").concat(t.video.id),src:r,mime:Zo.hls,priority:2,metadata:{cdn:i,origin:n.hls.cdns[i].origin,quality:"sd"}}}(t))),n.dash&&!u&&(o=o.concat(function(t){var n=t.request.files;return ku(n.dash)?[]:Object.keys(n.dash.cdns).map((function(i){var e=Aa(n.dash.cdns[i],t.video.spatial);return{id:"dash-".concat(i,"-").concat(t.video.id),src:e,mime:t.request.drm?Zo.dashMpd:Zo.dash,priority:i===n.dash.default_cdn?1:2,metadata:{cdn:i,origin:n.dash.cdns[i].origin,quality:"sd"}}}))}(t))),o}(t),u=function(t){return t.request.text_tracks.map((function(t){return{id:t.id,src:t.url,kind:t.kind,label:t.label,language:t.lang}}))}(t);!e.video||t.isNewVideo()?function(r,o){var u=t.video.live_event,a=i.getBoundingClientRect(),s=eu(u)?Fa(t):function(t){var n=t.request.files;if(!ku(n.hls)){var i=n.hls.default_cdn,e=n.hls.cdns[i],r=e.captions||e.avc_url;return r?{src:r,mime:Zo.hls,metadata:{cdn:i,origin:e.origin,quality:"sd"}}:null}return null}(t);e.video={id:t.video.id,title:t.video.title,subtitle:"from ".concat(t.video.owner.name),files:r,textTracks:o,chapters:na(t,"embed.chapters",[]),duration:t.video.duration,externalDisplayFiles:{AirPlay:s},metadata:{playlistRefreshUrl:ou(t),thumbnail:t.video.thumbs[640],useHls:t.request.drm&&va.browser.safari,drm:t.request.drm,p2p:t.video.p2p,percentShown:co.frustumSurfaceArea(t.video.spatial.fov,a.width,a.height)}},n.fire(Vo)}(o,u):function(t,n){t.forEach((function(t){var n=e.video.files.getFileById(t.id);n&&n.src!==t.src&&(n.src=t.src)})),n.forEach((function(t){var n=e.video.textTracks.getTrackById(t.id);n&&n.src!==t.src&&(n.src=t.src)}))}(o,u)}})),{telecine:e,play:function(){return r.play()},pause:function(){return r.pause()}}}function rs(t,n,i){this.constructorName="BackboneError",this.message=t,this.name=n,this.source=i}rs.prototype=new Error;var os={embed:{},request:{cookie:{},files:{},flags:{},urls:{},text_tracks:[],file_codecs:{}},video:{owner:{},thumbs:{},version:{}},user:{}};function us(t,n){var i,e,r,o=nt(),u=null,a=new Wu(n,os);function s(t){return o.fire(Po,t),t}var c={play:function(){return e.play()},pause:function(){return e.pause()},get currentTime(){return r.currentTime>.1?So(r.currentTime):0},set currentTime(t){if(t=parseFloat(t),isNaN(t)||t<0)throw new rs("Seconds must be a positive number less than the duration of the video.","RangeError","setCurrentTime");o.fire(Ro,null,t)},get duration(){return So(a.video.duration)},get enabledTextTrack(){return u},loadVideo:function(t){return a.reset(t),a=s(a),this},unload:function(){return o.fire(Co),this},destroy:function(){return o.fire(Oo),this},on:function(t,n){return o.on(t,n),this},once:function(t,n){return o.once(t,n),this},off:function(t,n){return o.off(t,n),this},hasTextTrack:function(t){var n,i,e=this.textTracks;if(xo(t))i=e.getTrackById(t);else{var r=t.split(".")[0];n=e.some((function(t){return t.language.toLowerCase()===r.toLowerCase()}))}return!(!i&&!n)},enableTextTrack:function(t){var n,i,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=this.textTracks;if(xo(t))u=a.getTrackById(t);else{var s=t.split("."),c=Q(s,2);n=c[0];var l=c[1];if(i=void 0===l?e:l,!this.hasTextTrack(t))throw new rs("There are no tracks for “".concat(n.toUpperCase(),"”."),"InvalidTrackLanguageError","enableTextTrack");var f=i?"".concat(n,".").concat(i):n;u=ns(f,a).track}if(!u||i&&u.kind!==i)throw new rs("There are no ".concat(i," tracks for “").concat(n.toUpperCase(),"”."),"InvalidTrackError","enableTextTrack");r.Au(!0),o.fire(jo,u.id)},disableTextTrack:function(){u=null,r.Au(!1),o.fire(Do)},set quality(t){o.fire(Io,t)},get playbackRate(){return r?r.playbackRate:1},set playbackRate(t){r.playbackRate=t,r.defaultPlaybackRate=t},get presentationMode(){return r.presentationMode},set presentationMode(t){"picture-in-picture"===t?o.fire(Lo):o.fire(No)},get textTracks(){return r.video?r.video.textTracks:[]},get representations(){return Va(a,r)},get volume(){return r?r.volume:So(a.request.cookie.volume)},set volume(t){if(t=parseFloat(t),isNaN(t)||t<0||t>1)throw new rs("Volume should be a number between 0 and 1.","RangeError","setVolume");r.volume=t},get videoId(){return a.video.id},get videoWidth(){return r.videoWidth||a.video.width},get videoHeight(){return r.videoHeight||a.video.height},get readyState(){return r.videoElement.readyState},get brainDebug(){return r.brainDebug}};return a=s(a),e=new es(a,o,t),r=e.telecine,i=Object.create(r),ot(i,c)}var as=navigator.userAgent.toLowerCase();function ss(t){t=t.toLowerCase();var n=new RegExp(t).test(as);return"safari"===t?n&&new RegExp("version").test(as):n}function cs(t){var n=document.createElement("div"),i=t.charAt(0).toUpperCase()+t.slice(1),e=(t+" "+["Webkit","Moz","O","ms"].join(i+" ")+i).split(" ");for(var r in e){var o=e[r];if(void 0!==n.style[o])return o}return t}var ls=!!ss("android")&&(parseFloat(as.replace(/^.* android (\d+)\.(\d+).*$/,"$1.$2"))||!0),fs=window.devicePixelRatio||1,ds=!(!ss("windows phone")&&!ss("iemobile"))&&(parseFloat(as.replace(/^.* windows phone (os )?(\d+)\.(\d+).*$/,"$2.$3"))||!0),hs=!!ss("msie")&&parseFloat(as.replace(/^.*msie (\d+).*$/,"$1")),vs=!!ss("trident")&&parseFloat(as.replace(/^.*trident\/(\d+)\.(\d+).*$/,"$1.$2"))+4,ps=!!(ss("ipad;")||ss("iphone;")||ss("ipod touch;"))&&parseFloat(as.replace(/^.* os (\d+)_(\d+).*$/,"$1.$2")),ms=ss("opera")||ss("opr"),ws=/^Mozilla\/5\.0 \(.* Mac OS X.*\(KHTML, like Gecko\)(?: Mobile\/[\S]*|)$/i.test(as);function bs(){if(!ss("safari"))return[];var t=as.split(" ").find((function(t){return/version\//.test(t)}));return t?t.replace("version/","").split(".").map((function(t){return parseInt(t,10)})):[]}var gs=ss("safari")&&ss("apple")&&!ss("chrome")&&!ss("android")&&bs()[0]>=11,ys={airPlay:"WebKitPlaybackTargetAvailabilityEvent"in window,android:ls,appleMail:ws,hasAutoplayPolicy:ls||ps||gs||function(){if(!ss("chrome"))return[];var t=as.split(" ").find((function(t){return ps?/CriOS\//.test(t):/chrome\//.test(t)}));return t?t.replace("chrome/","").split(".").map((function(t){return parseInt(t,10)})):[]}()[0]>=66,iOS:ps,mobileAndroid:ls&&ss("mobile"),browser:{bb10:ss("bb10"),chrome:ss("chrome"),firefox:ss("firefox"),ie:hs||vs,edge:ss("edge"),opera:ms,safari:ss("safari")&&ss("apple")&&!ss("chrome")&&!ss("android")},devicePixelRatio:fs,iPhone:ss("iphone;")||ss("ipod touch;")||ss("ipod;"),iPad:ss("ipad;"),iPadNonRetina:ss("ipad;")&&fs<2,mac:ss("mac os"),pointerEvents:window.navigator.pointerEnabled||window.navigator.msPointerEnabled||!1,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||ss("windows phone")||window.navigator.maxTouchPoints>1||window.navigator.msMaxTouchPoints||!1,transformProperty:cs("transform"),transitionProperty:cs("transition"),webp:function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),windowsPhone:ds},_s=/mac os x 10_13/.test(as),ks=ys.iOS&&ys.iOS>=11,Es=ys.iPhone&&812===window.screen.availHeight&&375===window.screen.availWidth,Ts=ys.iPhone&&896===window.screen.availHeight&&414===window.screen.availWidth,xs=ys.iPad&&1112===window.screen.availWidth&&834===window.screen.availHeight,Ss=ys.iPad&&834===window.screen.availWidth&&1194===window.screen.availHeight,As=ys.iPad&&1024===window.screen.availWidth&&1366===window.screen.availHeight,Ms=Es||Ts||xs||Ss||As;function Rs(){return!!(gs&&_s||gs&&ks)||"undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="hvc1"')}function Cs(){return!(ys.iOS||ys.iPad||ys.browser.ie)&&(!ss("safari")||bs()[0]>11||11===bs()[0]&&(bs()[2]>1||bs()[1]>0))}ys.hevc=Rs(),ys.hdr=gs&&ks&&Ms,ys.vp9hdr=(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(color-gamut: rec2020)").matches)&&screen.colorDepth>=48&&(MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.01"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.00"')||MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.18.09.01"')),ys.av1="undefined"!=typeof MediaSource&&MediaSource.isTypeSupported('video/mp4; codecs="av01.0.31M.08.0.110.01.01.01.0"'),ys.webvr=!!(window.navigator&&"getVRDisplays"in window.navigator),ys.webxr=!!(window.navigator&&"xr"in window.navigator&&"supportsSession"in window.navigator.xr),ys.spatialPlayback=Cs(),ys.spatialHEVC=!ys.browser.safari&&Cs()&&Rs(),ys.stereoscopic=ys.spatialPlayback&&ys.mobileAndroid;var Os="object"==typeof global&&global&&global.Object===Object&&global,Is="object"==typeof self&&self&&self.Object===Object&&self,js=(Os||Is||Function("return this")()).Symbol,Ds=Object.prototype,Ls=Ds.hasOwnProperty,Ns=Ds.toString,Ps=js?js.toStringTag:void 0,Fs=Object.prototype.toString,Vs=js?js.toStringTag:void 0;var Us=function(t,n){return function(i){return t(n(i))}}(Object.getPrototypeOf,Object),Bs=Function.prototype,Hs=Object.prototype,zs=Bs.toString,qs=Hs.hasOwnProperty,Ws=zs.call(Object),Gs=function(t){var n,i=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof i?i.observable?n=i.observable:(n=i("observable"),i.observable=n):n="@@observable",n}();function $s(t,n,i){var e;if("function"==typeof n&&void 0===i&&(i=n,n=void 0),void 0!==i){if("function"!=typeof i)throw new Error("Expected the enhancer to be a function.");return i($s)(t,n)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var r=t,o=n,u=[],a=u,s=!1;function c(){a===u&&(a=u.slice())}function l(){return o}function f(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var n=!0;return c(),a.push(t),function(){if(n){n=!1,c();var i=a.indexOf(t);a.splice(i,1)}}}function d(t){if(!function(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Vs&&Vs in Object(t)?function(t){var n=Ls.call(t,Ps),i=t[Ps];try{t[Ps]=void 0;var e=!0}catch(t){}var r=Ns.call(t);return e&&(n?t[Ps]=i:delete t[Ps]),r}(t):function(t){return Fs.call(t)}(t)}(t))return!1;var n=Us(t);if(null===n)return!0;var i=qs.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&zs.call(i)==Ws}(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,o=r(o,t)}finally{s=!1}for(var n=u=a,i=0;i<n.length;i++)(0,n[i])();return t}return d({type:"@@redux/INIT"}),(e={dispatch:d,subscribe:f,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");r=t,d({type:"@@redux/INIT"})}})[Gs]=function(){var t,n=f;return(t={subscribe:function(t){if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");function i(){t.next&&t.next(l())}return i(),{unsubscribe:n(i)}}})[Gs]=function(){return this},t},e}function Ks(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return 0===n.length?function(t){return t}:1===n.length?n[0]:n.reduce((function(t,n){return function(){return t(n.apply(void 0,arguments))}}))}var Ys=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t};function Js(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return function(t){return function(i,e,r){var o,u=t(i,e,r),a=u.dispatch,s={getState:u.getState,dispatch:function(t){return a(t)}};return o=n.map((function(t){return t(s)})),a=Ks.apply(void 0,o)(u.dispatch),Ys({},u,{dispatch:a})}}}function Xs(t){return!isNaN(t)&&parseInt(Number(t),10)==t&&!isNaN(parseInt(t,10))}var Zs=function(t){for(var n=this,i=function i(e){return e.length>=t.length?t.apply(n,e):function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i([].concat(tt(e),n))}},e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return i(r)}((function(t,n){return Object.keys(t).every((function(i){return t[i]===n[i]}))})),Qs=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(n){return n?t.find(Zs(n)):t},insert:function(n){return(t=t.concat(n)).slice(-1).pop()},getOrInsert:function(t){return this.get(t)||this.insert(t)},remove:function(n){return t.splice(t.findIndex(Zs(n)),1).pop()}}};function tc(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.styleSheets[0];try{i.insertRule?i.insertRule(t+"{"+n+"}",(i.cssRules||i.rules).length):i.addRule(t,n)}catch(t){}}function nc(t){if(t&&t.detail>0)try{document.activeElement.blur()}catch(t){}}function ic(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.activeElement,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{t.blur()}catch(t){n&&n(t)}}function ec(t){var n=t.getBoundingClientRect();return document.msFullscreenElement&&window.parent!==window&&t.offsetWidth<t.clientWidth&&(n={bottom:100*n.bottom,left:100*n.left,top:100*n.top,right:100*n.right,width:100*n.width,height:100*n.height}),n}function rc(t){try{return new URL(t).origin}catch(t){}var n=document.createElement("a");return n.href=t,n.origin?n.origin:"".concat(n.protocol.replace(":",""),"://").concat(n.host)}function oc(t){var n=t.width,i=t.height,e=t.elementWidth,r=t.elementHeight,o=t.threshold,u=void 0===o?10:o,a=1,s=n/i,c=e-r*s,l=r-e/s;if(c>0&&c<u||l>0&&l<u){var f=e/(e-c),d=r/(r-l);a=fc(Math.max(f,d),3)}return{extraWidth:c,extraHeight:l,scaleFactor:a}}function uc(t,n,i){return t>i?i:n>t?n:t}function ac(t,n,i){var e=i.width,r=i.height,o=i.scrollbars,u=void 0===o?"yes":o,a=i.resizable,s=void 0===a?"yes":a,c=i.toolbar,l=void 0===c?"no":c,f=(window.screenY||window.screenTop||0)+window.outerHeight/2-r/2,d=(window.screenX||window.screenLeft||0)+window.outerWidth/2-e/2;window.chrome&&-1!==window.navigator.userAgent.toLowerCase().indexOf("mac os x")&&(r+=27),window.safari&&(r+=47);var h="scrollbars=".concat(u,",resizable=").concat(s,",toolbar=").concat(l);return window.open(t,n,"width=".concat(e,",height=").concat(r,",left=").concat(d,",top=").concat(f,",").concat(h))}function sc(t){return function(t){return/^(https?:)?\/\/(.+)\.vimeo(ws)?\.(com|dev)(?=$|\/)/.test(t)}(t)?rc(t):""}function cc(t,n,i){if(function(t){return/^(https?:)?\/\/(.+)\.vimeo(ws)?\.(com|dev)\/video\/\d+\/config(?=$|\?)/.test(t)}(n))return n;var e=function(t){if(Xs(t))return parseInt(t,10);var n=t.match(/(video|\.com|\.dev)\/(\d+)/);if(!n||n.length<3)throw new Error("Please provide a Vimeo URL with a valid clip id.");return parseInt(n[2],10)}(n),r=ht(window.location.search),o=ht("".concat(n).split("?")[1]),u=Object.assign(r,o,i);return pt("".concat(t,"/video/").concat(e,"/config"),u)}function lc(t){for(var n,i,e=(t||document).querySelectorAll("[tabindex]"),r=[],o=0,u=0,a=e.length;u<a;u++)n=e[u],i=window.getComputedStyle(n,""),n.tabIndex>0&&"none"!==i.display&&i.opacity>0&&"hidden"!==i.visibility&&(r[o++]=n);var s=r.shift();s&&(s.focus(),s.blur())}function fc(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(t=parseFloat(t),isNaN(t))return 0;var i=Math.pow(10,n);return Math.round(t*i)/i}function dc(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^16*Math.random()>>t/4).toString(16)}))}function hc(t,n){return-1!==V(n).indexOf(t)}function vc(t){return t?V(t.parentNode.children).indexOf(t):-1}var pc=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.reduce((function(t,n){return function(){return t(n.apply(void 0,arguments))}}))}(vc,(function(t,n){for(;(null==(i=t)?void 0:i.parentElement)&&!hc(t,n);){var i;t=t.parentElement}return hc(t,n)?t:null}));function mc(t,n,i){if(void 0!==i)t.style[n]=i;else if(function(t){return"string"==typeof t||!Dn(t)&&Mn(t)&&"[object String]"==Ot(t)}(n))t.setAttribute("style",n);else for(var e in n)mc(t,e,n[e])}function wc(t,n,i){i.forEach((function(i){t(i,(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];n.apply(void 0,[i].concat(e))}))}))}function bc(t){for(var n=Object.keys(t),i=n.length,e=[],r=0;r<i;)e[r]=t[n[r]],r+=1;return e}function gc(t,n){return n&&0===n.indexOf(t)}var yc=0;function _c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p",n=++yc;return"".concat(t).concat(n)}function kc(t){var n=t;return!t||t instanceof Error||(n=new Error(t.message||t),t.name&&(n.name=t.name)),n}var Ec={Fa:_c(),Va:_c(),Ua:_c(),Ba:_c()},Tc={VIDEO_TITLE:"video-title",VIDEO_BYLINE:"video-byline",VIDEO_PORTRAIT:"video-portrait"},xc={h264:"video/mp4",hls:"application/vnd.apple.mpegurl",hlsLive:"application/x-mpegURL",dash:"application/vnd.vimeo.dash+json",dashMpd:"video/vnd.mpeg.dash.mpd",vp6:"video/x-flv",vp8:"video/webm",webm:"video/webm",hds:"application/f4m"},Sc={Ha:_c(),za:_c(),qa:_c(),Wa:_c(),_showOverlay:_c(),Ga:_c(),$a:_c(),Ka:_c(),Ya:_c(),Ja:_c(),Xa:_c(),Za:_c(),Qa:_c(),ts:_c(),ns:_c(),es:_c(),rs:_c(),os:_c(),us:_c(),as:_c(),_hideOutro:_c(),ss:_c(),_overrideControlbarBehavior:_c(),cs:_c(),ls:_c(),fs:_c(),ds:_c(),hs:_c(),vs:_c(),_addCard:_c(),_removeCard:_c(),ps:_c(),ms:_c()},Ac={will:"willLikeVideo",did:"didLikeVideo"},Mc={will:"willUnlikeVideo",did:"didUnlikeVideo"},Rc={will:"willAddToWatchLater",did:"didAddToWatchLater"},Cc={will:"willRemoveFromWatchLater",did:"didRemoveFromWatchLater"},Oc={will:"willOpenVodPurchaseForm",did:"didOpenVodPurchaseForm"},Ic={will:"willOpenShareOverlay",did:"didOpenShareOverlay"},jc={will:"willOpenLoginForm",did:"didOpenLoginForm"},Dc={will:"willOpenCollectionsOverlay",did:"didOpenCollectionsOverlay"},Lc={will:"willShowOutro",did:"didShowOutro"},Nc={will:"willSendPlayLog",did:"didSendPlayLog"},Pc={ws:_c(),bs:_c(),ys:_c(),_s:_c(),He:_c(),ks:_c(),Es:_c(),Ts:_c(),Ss:_c(),As:_c(),Ms:_c(),Rs:_c(),Cs:_c(),Os:_c(),Is:_c(),Ds:_c(),Ls:_c(),Ns:_c(),Ps:_c(),Fs:_c(),Vs:_c(),Us:_c(),Bs:_c(),Hs:_c(),zs:_c(),qs:_c(),Ws:_c(),Gs:_c(),$s:_c(),Ks:_c(),Ys:_c(),Js:_c(),Xs:_c(),Zs:_c(),Qs:_c(),tc:_c(),nc:_c(),ic:_c(),ec:_c(),rc:_c(),oc:_c(),uc:_c(),ac:_c(),sc:_c(),cc:_c(),lc:_c(),fc:_c(),dc:_c(),hc:_c(),vc:_c(),pc:_c(),mc:_c(),wc:_c(),bc:_c(),gc:_c(),yc:_c(),_c:_c(),kc:_c(),Ec:_c(),Tc:_c(),xc:_c(),Sc:_c(),Ac:_c(),Mc:_c(),Rc:_c(),Cc:_c(),Oc:_c(),Ic:_c(),jc:_c(),Dc:_c(),Lc:_c(),Nc:_c(),Pc:_c(),Fc:_c(),Vc:_c(),Uc:_c(),Bc:_c(),Hc:_c(),zc:_c(),qc:_c(),Wc:_c(),Gc:_c(),$c:_c(),Kc:_c(),Yc:_c(),Jc:_c(),Xc:_c(),Zc:_c(),Qc:_c(),tl:_c(),nl:_c(),il:_c(),el:_c(),rl:_c(),ol:_c(),ul:_c(),al:_c(),sl:_c(),cl:_c(),ll:_c(),fl:_c(),_loadVideo:_c(),dl:_c(),hl:_c(),vl:_c(),pl:_c(),ml:_c(),wl:_c(),bl:_c(),gl:_c(),yl:_c(),_l:_c(),kl:_c(),El:_c(),Tl:_c(),Sl:_c(),Al:_c(),Ml:_c(),Rl:_c(),Cl:_c(),Ol:_c(),Il:_c(),ue:_c(),jl:_c(),Dl:_c(),Ll:_c(),Nl:_c(),Pl:_c(),Fl:_c(),Vl:_c(),Ul:_c(),Bl:_c(),Hl:_c(),zl:_c(),ql:_c(),Wl:_c(),Gl:_c(),$l:_c(),Kl:_c(),Yl:_c()},Fc={Ha:_c(),Jl:_c(),Xl:_c(),Zl:_c()},Vc={"application/vnd.apple.mpegurl":"hls","application/vnd.vimeo.dash+json":"dash","video/vnd.mpeg.dash.mpd":"dash","video/mp4":"progressive","video/webm":"progressive","video/x-flv":"progressive","application/x-mpegURL":"hlslive"},Uc={AD_STARTED:"adstarted",AD_COMPLETED:"adcompleted",AD_ERROR:"aderror",AD_SKIPPED:"adskipped",AD_ALL_COMPLETED:"adallcompleted",BUFFER_END:"bufferend",BUFFER_START:"bufferstart",CHAPTER_CHANGE:"chapterchange",CHROMECAST_CONNECTED:"chromecastconnected",CONTROL_BAR_VISIBILITY_CHANGED:"controlbarvisibilitychanged",CUE_CHANGE:"cuechange",CUEPOINT:"cuepoint",DURATION_CHANGE:"durationchange",EMAIL_CAPTURE:"emailcapture",ENDED:"ended",ERROR:"error",FULLSCREENCHANGE:"fullscreenchange",LIVE_EVENT_ENDED:"liveeventended",LIVE_EVENT_STARTED:"liveeventstarted",LIVE_STREAM_OFFLINE:"livestreamoffline",LIVE_STREAM_ONLINE:"livestreamonline",LOADED_DATA:"loadeddata",LOAD_START:"loadstart",LOADED_METADATA:"loadedmetadata",LOADED:"loaded",MOTION_END:"motionend",MOTION_START:"motionstart",WEBVR_HARDWARE_AVAILABLE:"webvrhardwareavailable",ENTER_WEBVR:"enterwebvr",EXIT_WEBVR:"exitwebvr",SPATIAL_UNSUPPORTED:"spatialunsupported",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PLAYBACK_RATE_CHANGE:"playbackratechange",RATE_CHANGE:"ratechange",PROGRESS:"progress",READY:"ready",SEEKING:"seeking",SEEKED:"seeked",SPACE_CHANGE:"spacechange",TEXT_TRACK_CHANGE:"texttrackchange",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting"},Bc={playProgress:"timeupdate",loadProgress:"progress",finish:"ended",seek:"seeked"},Hc={MARKER_SEEKED:"seeked",MARKER_ENDED:"ended",MARKER_UPSWITCH:"upswitch",MARKER_DOWNSWITCH:"downswitch",MARKER_SWITCH_COMPLETE:"switchcomplete",MARKER_RESIZE:"resize",MARKER_SCANNER_CHANGE:"scannerchange",MARKER_FILE_CHANGE:"filechange",MARKER_STALLED:"stalled"},zc={MARKER_SEEKED:"#0088cc",MARKER_ENDED:"#503873",MARKER_UPSWITCH:"#5a9e02",MARKER_DOWNSWITCH:"#d93636",MARKER_RESIZE:"#FF8A00",MARKER_SCANNER_CHANGE:"#e9ff00",MARKER_FILE_CHANGE:"#b5d3e2",MARKER_STALLED:"#f44283"},qc={NOTHING:"nothing",BEGINNING:"beginning",EMAIL:"email",VOD:"vod",VIDEOS:"videos",LINK:"link",THREEVIDEOS:"threevideos",PROMOTED:"promoted",SHARE:"share"},Wc=function(){return{id:"error",title:"Erreur du player",message:"Le player a rencontré un problème. Nous le remettrons en service dès que possible.",modal:!0,final:!0}},Gc=Object.freeze({__proto__:null,BrowserNotSupported:function(){return{id:"not-supported",title:"Environnement de visualisation non compatible",message:'Votre système a des problèmes pour jouer cette vidéo. Pour plus d\'information, consultez notre <a href="https://help.vimeo.com/hc/en-us/articles/115015677227-Troubleshoot-player-error-messages" target="_blank" rel="noopener" aria-describedby="new-window">centre d\'aide</a>.',deferred:!0,final:!0}},DRMFailure:function(){return{id:"drm-failure",title:"Question de droits",message:"Nous rencontrons un problème pour autoriser la lecture de cette vidéo. ",final:!0}},FilesNotPlayable:function(){return{id:"not-supported",title:"Erreur du player",message:"Le player a rencontré un problème. Nous le remettrons en service dès que possible.",deferred:!0,final:!0}},MediaSrcNotSupportedError:function(){return{id:"not-supported",final:!1}},MediaDecodeError:function(){return{id:"decode",final:!1}},MediaNetworkError:function(){return{id:"network",title:"Erreur de réseau",message:'Un couac du réseau a interrompu la lecture. Veuillez <a href="javascript:window.location.reload()" rel="noopener">rafraîchir le player</a> et essayez à nouveau.',final:!0}},MediaUnknownError:function(){return{id:"unknown",title:"Erreur du navigateur",message:'Nous rencontrons un problème de lecture de ce fichier vidéo. Veuillez <a href="javascript:window.location.reload()" rel="noopener">rafraîchir le player</a> et essayez à nouveau.',final:!0}},FileError:function(){return{id:"telecine-file-error",final:!1}},DownloadError:function(){return{id:"telecine-download-error",final:!1}},MediaUrlExpired:function(){return{id:"media-url-expired",title:"Erreur de lecture",message:'Nous rencontrons un problème de lecture de ce fichier vidéo. Veuillez <a href="javascript:window.location.reload()" rel="noopener">rafraîchir le player</a> et essayez à nouveau.',final:!1}},ScannerError:function(){return{id:"scanner-error",final:!1}},PlayerError:Wc});function $c(){return void 0!==window.performance&&"function"==typeof window.performance.now?window.performance.now():Date.now()}function Kc(t){return $c()-t}function Yc(){var t=0,n=null,i=0,e=!1;function r(){return t/1e3}return{trackBufferStart:function(t,r){n=$c(),i++,e=!0,t(r)},trackBufferEnd:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var o=Kc(n);t+=o,r.buffer_duration=o/1e3,e=!1,i(r)}},trackVideoExit:function(i){e&&!i&&(t+=Kc(n))},resetLastBufferTime:function(){n=null},getBufferRatio:function(t){var n=r()/t*100;return isNaN(n)?0:Math.round(100*n)/100},getBufferCount:function(){return i},getTotalBufferDuration:r,isVideoBuffering:function(){return e}}}var Jc={VIDEO_BUFFER_END:"video-buffer-end",VIDEO_BUFFER_START:"video-buffer-start",VIDEO_ENDED:"video-ended",VIDEO_EXIT:"video-exit",VIDEO_LOAD_FAILURE:"video-load-failure",VIDEO_MINUTE_WATCHED:"video-minute-watched",VIDEO_PAUSED:"video-paused",VIDEO_PLAYED:"video-played",VIDEO_PLAYBACK_ERROR:"video-playback-error",VIDEO_READY:"video-ready",VIDEO_START_ATTEMPT:"video-start-attempt",VIDEO_START_FAILURE:"video-start-failure",VIDEO_START_TIME:"video-start-time",VIDEO_SEEK:"video-seek",VIDEO_SEEKED:"video-seeked",CHUNK_DOWNLOADED:"chunk_downloaded"};function Xc(t){function n(t,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"POST";return new r((function(r,o){"POST"===e&&navigator.sendBeacon?r({status:navigator.sendBeacon(t,n)}):Ke({url:t,body:n,method:e,async:i,headers:{"Content-Type":"text/plain; charset=UTF-8"}}).then((function(t){r({response:t,status:t.status})})).catch(o)}))}return{log:function(i){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];r&&(i.event_time=i.event_time||$c());var o=[i];return n(t,JSON.stringify(o),e)},logRequestPromiseWithUrl:n}}function Zc(t){var n=0,i=0,e=0,r=0,o=!1,u=-1,a=null,s=null,c=null,l={satisfied:0,tolerable:0,frustrated:0},f=null;function d(){var n=t.getBoundingClientRect(),i=t.videoWidth,e=t.videoHeight;if(0!==i||0!==e){var r="satisfied";if(n.width>i&&n.height>e&&(i/n.width<.4?r="satisfied":i/n.width<1?r="tolerable":i/n.width>1&&(r="frustrated")),s){var o=Kc(s);l[c]+=o}c=r,s=$c()}}function h(){return o?0:1}function v(){return-1===u?null:u>8e3||-1===u?0:u>2e3?.5:1}function p(){return f?(r=e/Kc(f),n>=4||r>=.12?0:n<4&&0!==n?r<.12?.5:0:1):null}function m(){if(-1===u)return null;switch(d(),Object.keys(l).reduce((function(t,n){return l[t]>l[n]?t:n}))){case"satisfied":return 1;case"tolerable":return.5;case"frustrated":return 0}return null}return t.addEventListener("playing",(function(){-1===u&&(a=$c())})),t.addEventListener("progress",(function(){-1===u&&(f=$c(),u=Kc(a)),d()})),{startupTimeScore:v,rebufferScore:p,failureScore:h,videoQualityScore:m,overallScore:function(){return Math.min(h(),v(),p(),m())},trackBufferStart:function(){-1!==u&&(n++,i=$c())},trackBufferEnd:function(){-1!==u&&(e+=Kc(i))},onError:function(t){t.final&&(o=!0)}}}function Qc(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(t=parseFloat(t),isNaN(t))return 0;var i=Math.pow(10,n);return Math.round(t*i)/i}function tl(t,n){var i,e,r,o,u,a,s,c,l,f,d,h,v=0;function p(){i=0,e=0,r=0,o=null,u=0,a=!1,s=!1,c=null,l=!1,f=new Zc(t),d=new Yc,h={bufferTracker:d,videoBufferCheck:function(){setInterval((function(){var n=t.currentTime;s&&!l&&!t.paused&&!h.bufferTracker.isVideoBuffering()&&n<r+.125&&h.bufferTracker.trackBufferStart(w),s&&!t.paused&&h.bufferTracker.isVideoBuffering()&&n>r+.125&&(h.bufferTracker.trackBufferEnd(b),h.bufferTracker.resetLastBufferTime()),r=n}),250)},addEventData:function(t){return null},playbackSessionTimer:function(){var n=$c();setInterval((function(){(!t.paused&&a||l||h.bufferTracker.isVideoBuffering())&&(u+=Kc(n)/1e3),n=$c()}),500)}}}function m(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};0===v&&(i=Object.assign(i,h.addEventData(t)),n(t,i))}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f.trackBufferStart(),m(Jc.VIDEO_BUFFER_START,t)}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f.trackBufferEnd(),m(Jc.VIDEO_BUFFER_END,t)}return p(),m(Jc.VIDEO_READY),function(){var n=Math.floor(60*Math.random());setInterval((function(){!t.paused&&a&&(i++,0!==e?i>=60&&(i=0,e++,m(Jc.VIDEO_MINUTE_WATCHED)):i===n&&(i=0,e++,m(Jc.VIDEO_MINUTE_WATCHED)))}),1e3)}(),window.addEventListener("unload",(function(n){h.bufferTracker.trackVideoExit(t.paused);var i={startup:f.startupTimeScore(),rebuffer:f.rebufferScore(),failure:f.failureScore(),quality:f.videoQualityScore(),overall:f.overallScore()};c&&m(Jc.VIDEO_EXIT,{vxs:i},!1)}),!1),t.addEventListener("playing",(function(){a=!0,l||s&&m(Jc.VIDEO_PLAYED)})),t.addEventListener("timeupdate",(function(){if(!s){var t={startup_duration:c?Qc(Kc(c)/1e3,2):null};m(Jc.VIDEO_START_TIME,t),s=!0}})),t.addEventListener("pause",(function(){a=!1,m(Jc.VIDEO_PAUSED)})),t.addEventListener("seeking",(function(){l||(o=$c(),l=!0,a=!1,m(Jc.VIDEO_SEEK))})),t.addEventListener("seeked",(function(){l=!1,t.paused||(a=!0),m(Jc.VIDEO_SEEKED,{seek_duration:Kc(o)/1e3}),o=null})),t.addEventListener("ended",(function(){m(Jc.VIDEO_ENDED)})),t.addEventListener("waiting",(function(){a=!1})),t.addEventListener("canplay",(function(){l||h.bufferTracker.isVideoBuffering()&&!a&&(h.bufferTracker.trackBufferEnd(b),h.bufferTracker.resetLastBufferTime())})),{globalProperties:function(){return{autoplay:t.autoplay,buffer_count:h.bufferTracker.getBufferCount(),total_buffer_duration:h.bufferTracker.getTotalBufferDuration(),buffer_ratio:h.bufferTracker.getBufferRatio(u),client_time:$c(),is_buffering:h.bufferTracker.isVideoBuffering(),looping:t.loop,minutes_watched:e,network_state:t.networkState,playback_rate:t.playbackRate,player_width:t.getBoundingClientRect().width,player_height:t.getBoundingClientRect().height,session_playback_duration:Qc(u,2),video_time:t.currentTime,video_height:t.videoHeight,video_width:t.videoWidth,volume:Qc(t.volume,2)}},logStartRequest:function(){c=$c(),m(Jc.VIDEO_START_ATTEMPT)},customizeHooks:function(t){h=Object.assign(h,t)},initHooks:function(){h.videoBufferCheck(),h.playbackSessionTimer()},logBufferStart:w,logBufferEnd:b,setDisplayContext:function(t){v=t},handleExternalError:function(t,n){a=!1,f.onError(n),m(s?Jc.VIDEO_PLAYBACK_ERROR:s?Jc.VIDEO_START_FAILURE:Jc.VIDEO_LOAD_FAILURE,t)},reset:p}}var nl=W({},Jc,{ALERT_DISPLAYED:"alert-displayed",ALERT_HIDDEN:"alert-hidden",CAPTIONS_ENABLED:"captions-enabled",CAPTIONS_DISABLED:"captions-disabled",CHROMECAST_CONNECTED:"chromecast-connected",CHROMECAST_DISCONNECTED:"chromecast-disconnected",ERROR_LINK_PRESSED:"error-link-pressed",MEDIASESSION_PLAY:"mediasession-play",MEDIASESSION_PAUSE:"mediasession-pause",MEDIASESSION_SEEK_FORWARD:"mediasession-seekforward",MEDIASESSION_SEEK_BACKWARD:"mediasession-seekbackward",SLATE_DISPLAYED:"slate-displayed",CLICK:"click",VIDEO_DURATION_MISMATCH:"video-duration-mismatch",VIDEO_FULLSCREEN_CHANGE:"video-fullscreen-change",VIDEO_MANIFEST_LOADED:"video-manifest-loaded",VIDEO_MANIFEST_TIMEOUT:"video-manifest-timeout",VIDEO_PLAYBACK_RATE_CHANGED:"video-playback-rate-changed",VIDEO_STREAM_CHANGE:"video-stream-change",VIDEO_SWITCH_BACK_TO_AUTO:"video-switch-back-to-auto",VIDEO_SWITCH_FROM_AUTO:"video-switch-from-auto",DOWNLOAD_TIMEOUT:"video-download-timeout",AD_BUFFERING:"ad-buffering",AD_COMPLETE:"ad-complete",AD_CLICKED:"ad-clicked",AD_ERROR:"ad-error",AD_PAUSED:"ad-paused",AD_RESUMED:"ad-resumed",AD_STARTED:"ad-started",AD_SKIPPED:"ad-skipped",OUTRO_VIDEO_SELECTED:"outro-video-selected",WEBVR_HARDWARE_AVAILABLE:"webvr-hardware-available",ENTER_WEBVR:"enter-webvr",EXIT_WEBVR:"exit-webvr"});function il(t){return t.config.video.p2p?"vimeo-live-ecdn":t.config.request.flags.ott?"vimeo-ott-vod":t.config.video.live_event?"vimeo-live":t.config.embed.context&&-1!==t.config.embed.context.indexOf("Stock")?"vimeo-stock-vod":t.config.video.vod?"vimeo-ondemand":"vimeo-vod"}function el(t){return"dev"===t.request.build.js?"dev":"3.20.11"}var rl,ol=new r((function(t){rl=t}));function ul(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return ol.then((function(e){return i/=.1,Math.random()<=i&&e.captureException(kc(t),n),e.lastEventId()}))}window.addEventListener("unhandledrejection",(function(t){t.preventDefault(),t.reason&&ul(t.reason).catch((function(t){}))}));var al={setUp:function(t){t.config.request.sentry.enabled&&st("module/sentry.js").then((function(n){var i="dev"===t.config.request.build.js?"dev":"production",e=[new n.Integrations.Dedupe,new n.Integrations.ExtraErrorData,new n.Integrations.Breadcrumbs({console:!1}),new n.Integrations.GlobalHandlers({onunhandledrejection:!1})];return n.init({dsn:t.config.request.sentry.url,release:el(t.config),environment:i,integrations:e,ignoreErrors:["NotAllowedError","AbortError","PlayInterrupted","Failed to load image"],blacklistUrls:[/^moz-extension/i,/^chrome-extension/i],beforeSend:function(i,e){var r;if(!t.config.request)return null;if(ys.appleMail)return null;if(gc("ReportingObserver",i.message)&&Math.random()>.01)return null;var o=null==(r=e.originalException)?void 0:r.error;return gc("Non-Error exception captured",i.message)&&o?(n.withScope((function(t){t.setExtra("nonErrorException",!0),n.captureException(o)})),null):(i.tags["document.visibilityState"]=document.visibilityState,t.config.request.sentry.enabled?i:null)}}),n.configureScope((function(n){if(n.setTag("session",t.config.request.session),n.setTag("locale",t.config.request.lang),n.setTag("debug_intent",t.config.request.sentry.debug_intent?1:0),n.setTag("product",il(t)),n.setTag("backend",t.config.request.build.backend),n.setTag("video_embed_permission",t.config.video.embed_permission),n.setTag("video_privacy",t.config.video.privacy),t.config.user.logged_in&&n.setUser({id:t.config.user.id}),t.config.request.ab_tests)for(var i in t.config.request.ab_tests){var e=t.config.request.ab_tests[i];for(var r in n.setTag("".concat(i,"_test"),1),n.setTag("".concat(i,"_group"),e.group),e.data)n.setTag("".concat(i,"_data_").concat(r),e.data[r])}})),t.config.request.sentry.debug_intent&&window.addEventListener("unload",(function(){n.captureMessage("Session debug",{level:"info"})}),!1),n})).then(rl).catch((function(t){}))},captureException:ul,captureMessage:function(t,n){return ol.then((function(i){return i.captureMessage(t,n),i.lastEventId()}))},captureBreadcrumb:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"player",e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"info";return ol.then((function(r){return r.addBreadcrumb({message:t,data:n,category:i,level:e})}))}};function sl(t){var n=t.events,i=null,e=null,o=null,u=null,a=null,s={video:{},request:{},embed:{}};function c(){return e&&e-6e4<=Date.now()}function l(t){var n=Date.now()+1e3*t;return a=setTimeout((function(){"onLine"in navigator&&!navigator.onLine||u||(u=d().catch(al.captureException))}),1e3*t-6e4-5e3),n}function f(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};clearTimeout(a);var u=i;if(isNaN(t)&&"string"!=typeof t)return e=l((i=t).request.expires),r.resolve({old:u,loaded:i});Date.now();var c=(s=Ja(s,i)).request.referrer;c&&(o.referrer=c);var f=(null==(n=i)?void 0:n.player_url)?"https://".concat(i.player_url):"",d=sc(t)||f,h=cc(d,t,o);return Ke(h,{withCredentials:!0,throwHttpErrors:!1}).json().then((function(t){return 7!==(i=t).view&&(e=l(i.request.expires),s.request.session&&i.video.id===s.video.id&&(i.request.session=s.request.session),c&&(i.request.referrer=c),s.embed.player_id&&(i.embed.player_id=s.embed.player_id),s.embed.on_site&&(i.embed.on_site=1,i.embed.context=s.embed.context)),Date.now(),{old:u,loaded:i}})).catch((function(t){al.captureException(t)}))}function d(){var t;clearTimeout(a),Date.now();var r=null==(t=i)?void 0:t.request.referrer,o=i.request,s=o.signature,c=o.session,f=o.timestamp,d=o.expires,h=i.request.ott_chromecast_token,v="https://".concat(i.player_url,"/video/").concat(i.video.id,"/config/request?session=").concat(c,"&signature=").concat(s,"&time=").concat(f,"&expires=").concat(d);return h&&(v="".concat(v,"&ott_chromecast_token=").concat(h)),r&&(v+="".concat(-1===v.indexOf("?")?"?":"&","referrer=").concat(encodeURIComponent(r))),Ke(v,{withCredentials:!0,retry:3}).json().then((function(t){return i.request=t,r&&(i.request.referrer=r),e=l(i.request.expires),Date.now(),u=null,n.fire(Pc.il),i.request})).catch((function(t){var i={id:"network",title:"Erreur de réseau",message:'Un couac du réseau a interrompu la lecture. Veuillez <a href="javascript:window.location.reload()" rel="noopener">rafraîchir le player</a> et essayez à nouveau.',final:!0};throw n.fire(Pc.bs,i.id,i),t}))}return window.addEventListener("online",(function(){c()&&(u=d().catch(al.captureException))})),n.on(Pc.bs,(function(t){u||"media-url-expired"!==t||(u=d().catch(al.captureException))})),{get isExpired(){return c()},load:function(t,n){return f(t,n)},reload:function(){var t;return(null==(t=i)?void 0:t.video.id)?f(i.video.id):r.reject(new Error("No config loaded."))},toJSON:function(){return i},get config(){return i},set config(t){i=t},verify:function(){return c()?(u||(u=d()),u):r.resolve(i.request)},get J(){return o},set J(t){o=t}}}var cl=function(){return Et.Date.now()},ll=Math.max,fl=Math.min;function dl(t,n,i){var e,r,o,u,a,s,c=0,l=!1,f=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(n){var i=e,o=r;return e=r=void 0,c=n,u=t.apply(o,i)}function v(t){return c=t,a=setTimeout(m,n),l?h(t):u}function p(t){var i=t-s;return void 0===s||i>=n||i<0||f&&t-c>=o}function m(){var t=cl();if(p(t))return w(t);a=setTimeout(m,function(t){var i=n-(t-s);return f?fl(i,o-(t-c)):i}(t))}function w(t){return a=void 0,d&&e?h(t):(e=r=void 0,u)}function b(){var t=cl(),i=p(t);if(e=arguments,r=this,s=t,i){if(void 0===a)return v(s);if(f)return clearTimeout(a),a=setTimeout(m,n),h(s)}return void 0===a&&(a=setTimeout(m,n)),u}return n=wo(n)||0,It(i)&&(l=!!i.leading,o=(f="maxWait"in i)?ll(wo(i.maxWait)||0,n):o,d="trailing"in i?!!i.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,e=s=r=a=void 0},b.flush=function(){return void 0===a?u:w(cl())},b}function hl(t,n){var i=t,e=n;return i%320!=0&&(i=100*Math.ceil(t/100),e=Math.round(i/t*n)),{width:i,height:e}}function vl(t){var n=t.width,i=t.height,e=t.baseUrl,r=t.crop,o=void 0!==r&&r,u=t.defaultExtension,a=void 0===u?".jpg":u,s=(e=e.replace(/\.[^/.]+$/,""))+(ys.webp?".webp":"".concat(a)),c={},l=parseInt(n,10),f=parseInt(i,10);return 0!==l&&(o?c.w=l:c.mw=l),0!==f&&(o?c.h=f:c.mh=f),ys.devicePixelRatio>1&&(c.q=70),pt(s,c)}function pl(t){return new r((function(n,i){var e=new Image;function r(){al.captureBreadcrumb("Load image: ".concat(t),{}),i(new Error("Failed to load image."))}e.onload=function(){e&&e.width>0&&e.height>0?n(e):r()},e.onerror=r,e.src=t}))}function ml(t){return pl(t).catch((function(n){return al.captureException(n,{extra:{imageUrl:t}}),new r((function(){}))}))}var wl={id:"7742C69E",name:"prod"},bl={id:"78077C77",name:"prod"},gl={connected:_c(),disconnected:_c(),playing:_c(),paused:_c(),buffering:_c(),idle:_c(),ended:_c(),sessionStateChanged:_c(),timeUpdated:_c(),mediaLoadedSuccess:_c(),mediaLoadedFailed:_c(),error:_c()},yl=function(){function t(t){var n=t.player,i=t.textAlert,e=void 0===i?null:i;this.Ql=e,this.tf=n,this.nf=this.onControlSeek.bind(this),this.if=this.onChangeVolume.bind(this),this.ef=this.onPlayOrPausePressed.bind(this),this.rf=this.onConfigChanged.bind(this),this.uf=this.onReset.bind(this),this.af=this.onPlayerStateChanged.bind(this),this.sf=this.onCurrentTimeChanged.bind(this),this.cf=this.onIsConnectedChanged.bind(this),this.lf=this.onSessionStateChanged.bind(this),this.ff=this.onIsMediaLoadedChanged.bind(this),this.df=this.onVolumeLevelChanged.bind(this),this.hf=this.onIsMutedChanged.bind(this),this.vf=this.onCaptionsChanged.bind(this),this.pf=this.onMessageReceived.bind(this),this.mf=this.preventPlayerDefaultEvent.bind(this),this.endVideo=dl(this.wf,500)}var n=t.prototype;return n.calculateStartTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=Number(t)||this.tf.backbone.currentTime-7;return n<0&&(n=0),this.isEndOfVideo&&(n=0),n},n.loadMedia=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.contentId,e=n.currentTime,o=void 0===e?null:e,u=n.duration,a=void 0===u?null:u,s=n.token,c=void 0===s?null:s,l=n.bypassToken,f=void 0===l?null:l,d=n.autoRequest,h=void 0!==d&&d,v=n.autoCaption,p=void 0===v||v,m=n.autoDisconnect,w=void 0===m||m,b=n.tracks,g=void 0===b?[]:b;if(kl.isLoadingMedia)return r.resolve(!1);var y=this.tf.config;i=i||y.video.id;var _,k=y.request,E=k.drm;if(null==E?void 0:E.fastly){var T=na(k,"files.dash.default_cdn");i=na(k,"files.dash.cdns.".concat(T,".url")),_=na(E,"cdms.widevine.license_url"),g=(k.text_tracks||[]).map((function(t){var n=vt(t.url),i=n.pathname,e=n.search;return W({},t,{url:"https://player.vimeo.com".concat(i).concat(e)})}))}var x=this.calculateStartTime(o);a=Number(a)||this.duration,c=c||y.user.vimeo_api_client_token,f=f||y.video.bypass_token,this.isEndOfVideo&&(this.bf=!1);var S={contentId:i,duration:a,autoRequest:h,tracks:g,currentTime:x,requestCustomData:{token:c,bypassToken:f,tokenType:"jwt"}};this.tf.config.request.ott_chromecast_token&&(S.requestCustomData.ottChromecastToken=this.tf.config.request.ott_chromecast_token);var A=_?this.Yo(_).then((function(t){return W({},S,{mediaCustomData:{widevineLicenseServerURL:t}})})):r.resolve(S);return A.then((function(t){return kl.loadMedia(t)})).then((function(){return kl.fire(gl.mediaLoadedSuccess),t.addRemotePlayerListenersOnPlaying(),t.tf.events.fire(Uo),t.tf.events.fire(Sc._hideOutro),t.gf=!1,p&&t.onCaptionsChanged(t.tf.backbone.enabledTextTrack),t.tf.backbone.paused||t.tf.backbone.pause(),!0})).catch((function(n){return kl.fire(gl.mediaLoadedFailed,n),w&&t.endCurrentSession(),r.reject(n)}))},n.Yo=function(t){return new r((function(n,i){var e=new XMLHttpRequest;e.open("GET",t),e.onload=function(){var t=function(t){return new Error("Error retrieving License Acquisition URL (LA_URL): ".concat(t))};if(e.status>=200&&e.status<300)try{n(e.response)}catch(n){i(t(n))}else i(t(e.status))},e.onerror=i,e.send()}))},n.init=function(){this.removeInitListeners(),this.addInitListeners()},n.addInitListeners=function(){this.addSessionStateListener(),this.addIsConnectedListener()},n.endCurrentSession=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];kl.castContext&&kl.castContext.endCurrentSession(t)},n.syncBackbone=function(){!this.isOutroRendered&&this.tf.backbone.paused&&(this.tf.backbone.currentTime=this.lastCurrentTime,this.syncTime())},n.stopBackbone=function(){this.tf.events.fire(Sc.$a)},n.enableUI=function(){if(this.Ql){var t,n=null==(t=kl.currentSessionObj)?void 0:t.receiver;n&&this.Ql.show("Casting on "+n.friendlyName)}this.tf.preview.show(),this.tf.element.classList.add("is-casting")},n.disableUI=function(){this.Ql&&this.Ql.hide(),this.isOutroRendered||(this.tf.preview.hide(),this.tf.backbone.element.classList.remove("invisible")),this.tf.element.classList.remove("is-casting")},n.syncTime=function(){var t=this.lastCurrentTime/this.duration;kl.fire(gl.timeUpdated,{currentTime:this.lastCurrentTime,duration:this.duration,percent:t}),t>0&&this.tf.events.fire(wi.TIME_UPDATE,{currentTime:this.lastCurrentTime,duration:this.duration,timeProgress:t})},n.wf=function(){var t=this;return this.bf=!0,this.tf.events.fire(Pc.Ts),this.removeRemotePlayerListenersOnPlaying(),this.isLooped?this.loadMedia().catch((function(){t.showOutro()})):this.showOutro(),kl.fire(gl.ended),!0},n.showOutro=function(){this.isOutroRendered||(this.gf=!0,this.tf.events.fire(Sc.as))},n.dispose=function(){this.endCurrentSession(),this.removeAllRemoteListeners()},n.onIsMediaLoadedChanged=function(t){!1===t.value?this.isTimeEnded&&this.endVideo():this.tf.backbone.paused||this.tf.backbone.pause()},n.onPlayerStateChanged=function(t){switch(null===t.value&&this.isTimeEnded&&this.endVideo(),t.value){case kl.PlayerState.PLAYING:kl.fire(gl.playing);break;case kl.PlayerState.PAUSED:kl.fire(gl.paused);break;case kl.PlayerState.BUFFERING:kl.fire(gl.buffering);break;case kl.PlayerState.IDLE:default:kl.fire(gl.idle)}},n.onVolumeLevelChanged=function(t){this.tf.events.fire(Sc.za,t.value,!0)},n.onIsMutedChanged=function(t){this.tf.events.fire(Sc.za,t.value?0:kl.remotePlayer.volumeLevel,!0)},n.onCurrentTimeChanged=function(t){this.isMediaLoaded&&(this.lt=t.value),this.syncTime(),this.isTimeEnded&&this.endVideo()},n.onChangeVolume=function(t){this.volumeLevel=t},n.onCaptionsChanged=function(t){var n=kl.currentSession;n&&n.sendMessage("urn:x-cast:com.vimeo.cast.media",{action:"setActiveByLanguage",value:null==t?void 0:t.language})},n.onSessionStateChanged=function(t){switch(t.sessionState){case kl.SessionState.SESSION_STARTING:this.addPreventLocalPlayerEvents();break;case kl.SessionState.SESSION_RESUMED:case kl.SessionState.SESSION_STARTED:this.loadMedia();break;case kl.SessionState.SESSION_ENDING:case kl.SessionState.SESSION_ENDED:break;case kl.SessionState.SESSION_START_FAILED:this.removePreventLocalPlayerEvents()}kl.fire(gl.sessionStateChanged,t.sessionState)},n.onIsConnectedChanged=function(t){t.value?this.onConnected():this.onDisconnected()},n.onConnected=function(){this.removePreventLocalPlayerEvents(),this.stopBackbone(),this.addLocalPlayerListeners(),this.addRemotePlayerListenersOnIdle(),this.addMessageListener(),this.enableUI(),kl.fire(gl.connected)},n.onDisconnected=function(){this.syncBackbone(),this.removeRemotePlayerListeners(),this.removeLocalPlayerListeners(),this.removeMessageListener(),this.disableUI(),kl.fire(gl.disconnected)},n.onConfigChanged=function(){this.loadMedia()},n.onReset=function(){this.loadMedia()},n.onPlayOrPausePressed=function(){this.isEndOfVideo?this.loadMedia():this.isPlayingOrPaused&&kl.remotePlayerController.playOrPause(),this.tf.events.halt()},n.onControlSeek=function(t,n){!n&&t&&(t>1&&(t=1),n=this.duration*t),this.currentTime=n,this.tf.events.halt()},n.addSessionStateListener=function(){kl.castContext&&kl.castContext.addEventListener(kl.CastContextEventType.SESSION_STATE_CHANGED,this.lf)},n.addMessageListener=function(){var t=kl.currentSession;t&&t.addMessageListener("urn:x-cast:com.vimeo.cast.media",this.pf)},n.onMessageReceived=function(t,n){"MEDIA_FINISHED"===(n=JSON.parse(n)).type&&("END_OF_STREAM"===n.endedReason?this.endVideo():"ERROR"===n.endedReason&&(this.endCurrentSession(),kl.fire(gl.error,new Error("Chromecast encountered an error and media finished."))))},n.addIsConnectedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.cf)},n.addPreventLocalPlayerEvents=function(){this.tf.events.prependOn([Pc.Fs,Pc.Ps,Pc.Gs,Pc.$s,yi.BUFFER_STARTED,yi.BUFFER_ENDED,Sc.Ha,Pc.Ss,Pc.Qs,Pc.Jc,Sc.$a],this.mf)},n.addRemotePlayerListenersOnIdle=function(){this.removeRemotePlayerListenersOnIdle(),this.addIsMediaLoadedChangedListener(),this.addVolumeLevelChangedListener()},n.addLocalPlayerListeners=function(){this.tf.events.prependOn(Pc.Fs,this.ef),this.tf.events.prependOn(Pc.Ps,this.ef),this.tf.events.prependOn(Pc.Gs,this.mf),this.tf.events.prependOn(Pc.$s,this.mf),this.tf.events.prependOn(yi.BUFFER_STARTED,this.mf),this.tf.events.prependOn(yi.BUFFER_ENDED,this.mf),this.tf.events.prependOn(Sc.Ha,this.nf),this.tf.events.prependOn(Pc.Ss,this.if),this.tf.events.on(Pc.Qs,this.vf),this.tf.events.on(Pc.Jc,this.rf),this.tf.events.on(Sc.$a,this.uf)},n.preventPlayerDefaultEvent=function(){this.tf.events.halt()},n.addCurrentTimeChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.sf)},n.addIsMediaLoadedChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,this.ff)},n.addPlayerStateChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.af)},n.addVolumeLevelChangedListener=function(){kl.remotePlayerController&&(kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.df),kl.remotePlayerController.addEventListener(kl.RemotePlayerEventType.IS_MUTED_CHANGED,this.hf))},n.addRemotePlayerListenersOnPlaying=function(){this.removeRemotePlayerListenersOnPlaying(),this.addCurrentTimeChangedListener(),this.addPlayerStateChangedListener()},n.removeRemotePlayerListenersOnIdle=function(){this.removeIsMediaLoadedChangedListener(),this.removeVolumeLevelChangedListener()},n.removeInitListeners=function(){kl.castContext&&kl.castContext.removeEventListener(kl.CastContextEventType.SESSION_STATE_CHANGED,this.lf),kl.remotePlayerController&&kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.cf)},n.removeRemotePlayerListenersOnPlaying=function(){this.removeCurrentTimeChangedListener(),this.removePlayerStateChangedListener()},n.removeMessageListener=function(){var t=kl.currentSession;t&&t.removeMessageListener("urn:x-cast:com.vimeo.cast.media",this.pf)},n.removeCurrentTimeChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.sf)},n.removeIsMediaLoadedChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,this.ff)},n.removePlayerStateChangedListener=function(){kl.remotePlayerController&&kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.af)},n.removeVolumeLevelChangedListener=function(){kl.remotePlayerController&&(kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.df),kl.remotePlayerController.removeEventListener(kl.RemotePlayerEventType.IS_MUTED_CHANGED,this.hf))},n.removePreventLocalPlayerEvents=function(){this.tf.events.off([Pc.Fs,Pc.Ps,Pc.Gs,Pc.$s,yi.BUFFER_STARTED,yi.BUFFER_ENDED,Sc.Ha,Pc.Ss,Pc.Qs,Pc.Jc,Sc.$a],this.mf)},n.removeLocalPlayerListeners=function(){this.tf.events.off(Pc.Fs,this.ef),this.tf.events.off(Pc.Ps,this.ef),this.tf.events.off(Pc.Gs,this.mf),this.tf.events.off(Pc.$s,this.mf),this.tf.events.off(yi.BUFFER_STARTED,this.mf),this.tf.events.off(yi.BUFFER_ENDED,this.mf),this.tf.events.off(Sc.Ha,this.nf),this.tf.events.off(Pc.Ss,this.if),this.tf.events.off(Pc.Qs,this.vf),this.tf.events.off(Pc.Jc,this.rf),this.tf.events.off(Sc.$a,this.uf)},n.removeRemotePlayerListeners=function(){this.removeRemotePlayerListenersOnPlaying(),this.removeRemotePlayerListenersOnIdle()},n.removeAllRemoteListeners=function(){this.removeRemotePlayerListeners(),this.removeInitListeners()},H(t,[{key:"lastCurrentTime",get:function(){return this.lt||0}},{key:"isTimeEnded",get:function(){return this.lastCurrentTime+.5>=this.duration}},{key:"isOutroRendered",get:function(){return this.gf||!1}},{key:"isLooped",get:function(){return this.tf.config.embed.loop}},{key:"isEndOfVideo",get:function(){return this.bf||!1}},{key:"currentTime",set:function(t){kl.remotePlayer&&kl.remotePlayerController&&(kl.remotePlayer.currentTime=t,kl.remotePlayerController.seek(),this.lt=t)}},{key:"volumeLevel",set:function(t){kl.remotePlayer&&kl.remotePlayerController&&(kl.remotePlayer.volumeLevel=t,kl.remotePlayerController.setVolumeLevel())}},{key:"duration",get:function(){return this.tf.config.video.duration}},{key:"isPlayingOrPaused",get:function(){return kl.remotePlayer?kl.remotePlayer.playerState===kl.PlayerState.PLAYING||kl.remotePlayer.playerState===kl.PlayerState.PAUSED:null}},{key:"isIdle",get:function(){return kl.remotePlayer?null===kl.remotePlayer.playerState||kl.remotePlayer.playerState===kl.PlayerState.IDLE:null}},{key:"isMediaLoaded",get:function(){return!!kl.remotePlayer&&kl.remotePlayer.isMediaLoaded}}]),t}(),_l={SETUP_DONE:"SETUP_DONE",NOT_SETUP:"NOT_SETUP"},kl=nt(new(function(t){function n(){return t.apply(this,arguments)||this}G(n,t);var i=n.prototype;return i.init=function(){var n,i=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=e.appId,u=e.chromecastPlayer,a=void 0===u?null:u;return o||(o=(null==a||null==(n=a.tf)?void 0:n.config.request.flags.ott)?bl.id:wl.id),this.chromecastPlayer=a,this.setup().then((function(n){return n&&(t.prototype.init.call(i,{receiverApplicationId:o,autoJoinPolicy:i.AutoJoinPolicy.PAGE_SCOPED}),i.chromecastPlayer&&i.chromecastPlayer.init()),n})).catch((function(t){return i.fire(gl.error,t),r.reject(t)}))},i.dispose=function(){this.chromecastPlayer=null},H(n,[{key:"chromecastPlayer",get:function(){return this.yf},set:function(t){if(t&&!(t instanceof yl))throw new SyntaxError("An invalid ChromecastPlayer was specified");this.chromecastPlayer&&this.chromecastPlayer.dispose(),this.yf=t}}]),n}(function(){function t(){this.version="1.2.36",this.remotePlayer=null,this.remotePlayerController=null,this.CastContextEventType=null,this.RemotePlayerEventType=null,this.CastState=_l,this.SessionState=null,this.PlayerState=null,this.currentLoadRequestId=null,this.currentLoadRequestPromise=null}var n=t.prototype;return n.init=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.receiverApplicationId,i=void 0===n?"":n,e=t.resumeSavedSession,r=void 0===e||e,o=t.language,u=void 0===o?null:o,a=t.autoJoinPolicy,s=void 0===a?"TAB_AND_ORIGIN_SCOPED":a;if(!this.isGCastApiAvailable)throw new Error("CAF is not available. Call setup() first.");if("string"!=typeof i||""===i.trim())throw new Error("Parameter 'receiverApplicationId' must be valid.");switch(s){case chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED:case chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED:case chrome.cast.AutoJoinPolicy.PAGE_SCOPED:break;default:s=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED}return this.CastContextEventType=cast.framework.CastContextEventType,this.RemotePlayerEventType=cast.framework.RemotePlayerEventType,this.CastState=Object.assign(this.CastState,cast.framework.CastState),this.SessionState=cast.framework.SessionState,this.PlayerState=chrome.cast.media.PlayerState,cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:i.trim(),resumeSavedSession:r,language:u,autoJoinPolicy:s}),this.isInitialized?this.remotePlayerController:this.initRemotePlayer()},n.initRemotePlayer=function(){if(!this.isGCastApiAvailable)throw new ReferenceError("CAF is not available. Call setup() first.");return this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer),this.remotePlayerController},n.setup=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.loadLibrary,e=void 0===i||i;return new r((function(n,i){if(t.isGCastApiAvailable)return t.AutoJoinPolicy=chrome.cast.AutoJoinPolicy,void n(!0);window.__onGCastApiAvailable=function(e,r){if(r){var o=new Error(r);i(o)}else t.AutoJoinPolicy=chrome.cast.AutoJoinPolicy,n(e)};try{if(!1===e)throw new ReferenceError("Cast is not available. Make sure the library has been loaded.");t.loadLibrary()||n(!1)}catch(t){var r=new Error(t);i(r)}}))},n.loadLibrary=function(){if(this.isGCastApiAvailable)return!0;if(null!==window.chrome&&void 0!==window.chrome&&"Google Inc."===window.navigator.vendor){var t="//www.gstatic.com/cv/js/sender/v1/cast_sender.js";if(!(document.querySelectorAll('script[src^="'+t+'"]').length>0)){t+="?loadCastFramework=1";var n=document.createElement("script");return n.src=t,n.async=!0,n.defer=!0,document.head.appendChild(n),!0}}return!1},n.loadMedia=function(t){var n=this,i=t.contentId,e=t.contentType,o=t.currentTime,u=void 0===o?0:o,a=t.duration,s=void 0===a?0:a,c=t.requestCustomData,l=void 0===c?null:c,f=t.mediaCustomData,d=void 0===f?null:f,h=t.autoRequest,v=void 0!==h&&h,p=t.tracks,m=void 0===p?[]:p;return i?this.isSessionEstablished?this.loadMediaOnSession(this.currentSession,{contentId:i,contentType:e,currentTime:u,duration:s,requestCustomData:l,mediaCustomData:d,tracks:m}):!0!==v?r.reject(new TypeError("Option 'autoRequest' must be true when session is not connected.")):this.requestSession().then((function(t){return n.loadMediaOnSession(t,{contentId:i,contentType:e,currentTime:u,duration:s,requestCustomData:l,mediaCustomData:d,tracks:m})})):r.reject(new TypeError("Option 'contentId' must be valid."))},n.loadMediaOnSession=function(t,n){var i=this,e=n.contentId,o=n.contentType,u=n.currentTime,a=void 0===u?0:u,s=n.duration,c=n.requestCustomData,l=void 0===c?null:c,f=n.mediaCustomData,d=void 0===f?null:f,h=n.tracks,v=void 0===h?[]:h;if(t&&t instanceof cast.framework.CastSession){var p=t.getSessionState();if(p!==this.SessionState.SESSION_STARTING&&p!==this.SessionState.SESSION_STARTED&&p!==this.SessionState.SESSION_RESUMED)return r.reject(new ReferenceError("Session must be established."));var m=this.createLoadRequest(e,o,a,s,l,d,v);return null!==this.currentLoadRequestId&&this.currentLoadRequestId===m.requestId||(this.currentLoadRequestId=m.requestId,this.currentLoadingMediaPromise=t.loadMedia(m).finally((function(){i.currentLoadRequestId=null,i.currentLoadingMediaPromise=null}))),this.currentLoadingMediaPromise}return r.reject(new ReferenceError("Session must be cast.framework.CastSession."))},n.requestSession=function(){var t=this;return this.isSessionEstablished?r.resolve(this.currentSession):this.castContext?this.castContext.requestSession().then((function(){return t.currentSession})):r.reject(new Error("CastContext is not available. Call setup() first."))},n.sendMessage=function(t){var n=this,i=t.namespace,e=t.data,o=void 0===e?{}:e,u=t.autoRequest,a=void 0!==u&&u;return this.isSessionEstablished?this.sendMessageOnSession(this.currentSession,{namespace:i,data:o}):!0!==a?r.reject(new TypeError("Option 'autoRequest' must be true when session is not connected.")):this.requestSession().then((function(t){return n.sendMessageOnSession(t,{namespace:i,data:o})}))},n.sendMessageOnSession=function(t,n){var i=n.namespace,e=n.data,o=void 0===e?{}:e;if(t||!(t instanceof cast.framework.CastSession)){var u=t.getSessionState();return u!==this.SessionState.SESSION_STARTING&&u!==this.SessionState.SESSION_STARTED&&u!==this.SessionState.SESSION_RESUMED?r.reject(new ReferenceError("Session must be established.")):t.sendMessage(i,o)}return r.reject(new ReferenceError("Session must be cast.framework.CastSession."))},n.createCastButton=function(t){var n=document.createElement("button","google-cast-button");return t&&t.style&&(null===t.style["--disconnected-color"]&&(t.style["--disconnected-color"]="#00ADEF"),null===t.style["--connected-color"]&&(t.style["--connected-color"]="#E5E500")),t&&Object.keys(t).forEach((function(i){if("string"==typeof t[i])n.setAttribute(i,t[i]);else if("style"===i&&"object"===U(t[i])){var e="";Object.keys(t[i]).forEach((function(n){e+=n+":"+t[i][n]+";"})),n.setAttribute(i,e)}})),n},n.createLoadRequest=function(t,n,i,e,r,o,u){var a=new chrome.cast.media.MediaInfo(t.toString(),n);a.customData=o,a.duration=e;var s={subtitles:chrome.cast.media.TextTrackType.SUBTITLES,captions:chrome.cast.media.TextTrackType.CAPTIONS};a.tracks=u.map((function(t){var n=new chrome.cast.media.Track(t.id,chrome.cast.media.TrackType.TEXT);return n.trackContentId=t.url,n.trackContentType="text/vtt",n.subtype=s[t.kind],n.name=t.label,n.language=t.lang,n}));var c=new chrome.cast.media.LoadRequest(a);return c.customData=r,c.currentTime=i||0,c},H(t,[{key:"isGCastApiAvailable",get:function(){return!!("undefined"!=typeof cast&&cast&&cast.framework&&cast.framework.VERSION)}},{key:"castState",get:function(){return this.castContext?this.castContext.getCastState():this.isGCastApiAvailable?this.CastState.SETUP_DONE:this.CastState.NOT_SETUP}},{key:"versionGCastApi",get:function(){return this.isGCastApiAvailable?cast.framework.VERSION:null}},{key:"castContext",get:function(){return this.isGCastApiAvailable?cast.framework.CastContext.getInstance():null}},{key:"currentSession",get:function(){return this.castContext?this.castContext.getCurrentSession():null}},{key:"currentSessionObj",get:function(){var t=this.currentSession;return t?t.getSessionObj():null}},{key:"isInitialized",get:function(){return!(!this.isGCastApiAvailable||!this.remotePlayerController)}},{key:"isSessionEstablished",get:function(){var t=this.currentSessionObj;return!!t&&t.status===chrome.cast.SessionStatus.CONNECTED}},{key:"isCastConnected",get:function(){return this.castState===this.CastState.CONNECTED}}]),t}())));function El(t,n,i){var e=null;function o(){return i.getAttribute("data-thumb")}function u(){return hl(n.get("ui.player.width")*ys.devicePixelRatio,n.get("ui.player.height")*ys.devicePixelRatio)}function a(){if(!t.config.video.thumbs.base)return r.resolve();var e=!t.config.embed.autoplay||kl.isCastConnected,a=u(),s=a.width,c=vl({width:s,height:a.height,baseUrl:t.config.video.thumbs.base});i.setAttribute("data-thumb",c),i.setAttribute("data-thumb-width",s);var l=ml(c).then((function(t){return n.dispatch(function(t,n){return{type:"PREVIEW_SET_SIZE",payload:{width:t,height:n}}}(t.width,t.height)),e&&(i.style.backgroundImage="url(".concat(o(),")")),t}));return e?r.race([l,new r((function(t){return setTimeout(t,2e3)}))]):r.resolve()}return e=a(),t.events.on(Pc.cc,(function(){i.classList.contains("vp-preview-invisible")&&"beginning"!==t.config.embed.outro||(e=a())})),n.watch("ui.player.width",dl((function(){e=e.then((function(){return function(){var t=u().width,n=i.getAttribute("data-thumb-width");return t<=parseInt(n,10)||0===t?r.resolve():a()}()})).catch((function(t){}))}),150)),n.watch("ui.preview.scaleFactor",(function(t){i.classList.toggle("vp-preview-cover",t>1)})),{show:function(){i.style.backgroundImage="url(".concat(o(),")"),i.classList.remove("vp-preview-invisible")},hide:function(){i.classList.add("vp-preview-invisible")},resetThumbnail:function(){i.setAttribute("data-thumb",""),i.setAttribute("data-thumb-width",""),i.style.backgroundImage=""},getThumbnail:o,loadThumbnail:a,thumbnailPromise:e}}function Tl(t){return!0===t||!1===t?Number(t):"null"===t?null:t}function xl(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;try{if(n&&""!==n)return n.split(";").reduce((function(n,i){return 0===(i=i.trim()).indexOf("".concat(t,"="))?decodeURIComponent(i.substr(t.length+1)):n}),null)}catch(t){}return null}var Sl=["quality","volume","captions"],Al=null;function Ml(t){var n=0!==t.config.request.urls.proxy.indexOf(window.location.origin),i=0;function e(t){var n=null;try{n=xl("player")}catch(t){}if(!n)return null;n=n.substring(1,n.length-1);var i={};n.split("&").forEach((function(t){t=t.split("="),i[t[0]]=Tl(decodeURIComponent(t[1]||""))}));var e=[].concat(t),r=e.reduce((function(t,n){if(n in i){var e=parseFloat(i[n]);return t[n]=isNaN(e)||"quality"===n?i[n]:e,t}return t[n]=null,t}),{});return 1===e.length?r[t]:r}function o(n,i){t.doNotTrackEnabled||(function(n,i){if(Al){var e={method:"set",key:"sync_".concat(n),val:i,session:t.config.request.session};return function(n){Al.then((function(i){var e=rc(t.config.request.urls.proxy);return i.contentWindow.postMessage(n,e),i})).catch((function(n){al.captureException(n,{extra:{proxyUrl:t.config.request.urls.proxy}})}))}(e),void function(n){t.config.embed.on_site&&window.postMessage(n,window.location.origin)}(e)}try{window.localStorage.setItem("sync_".concat(n),JSON.stringify(i))}catch(t){}}(n,i=Tl(i)),function(n,i){Sl.indexOf(n)>=0&&(t.config.request.cookie[n]=i);var r=[];Sl.indexOf(n)>=0&&null!==i&&r.push("".concat(n,"=").concat(i));var o=e(Sl);for(var u in o)u in o&&null!==o[u]&&u!==n&&r.push("".concat(u,"=").concat(o[u]));!function(t,n,i){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.samesite,o=e.secure,u=new Date;u.setFullYear(u.getFullYear()+1),u=u.toGMTString(),n=Tl(n);var a="".concat(t,"=").concat(n);a+=";expires=".concat(u),a+=";path=/",a+=";domain=".concat(i),o&&(a+=";secure"),r&&(a+=";samesite=".concat(r));try{document.cookie=a}catch(t){return!1}}("player",'"'.concat(r.join("&"),'"'),t.config.request.cookie_domain,{secure:!0,samesite:"none"})}(n,i))}function u(n,e){switch(n){case"sync_quality":t.events.fire(Sc.Ya,e,!0);break;case"sync_volume":if(t.config.embed.settings.background)break;t.events.fire(Sc.za,e,!0);break;case"sync_captions":if(null===e){t.events.fire(Sc.os,!0);break}t.events.fire(Sc.rs,e,!0);break;case"sync_login":!function(n){i>4||(i++,n&&!t.config.user.logged_in?t.events.fire(Pc.Wc):!n&&t.config.user.logged_in&&t.events.fire(Pc.$c))}(e);break;case"sync_active":null!==e&&e!==t.config.request.session&&t.config.embed.autopause&&t.events.fire(Pc.cl)}}return t.events.on(Pc.As,(function(t,n){n||o("quality",t)})),t.events.on(Pc.Ss,(function(n,i){t.config.request.cookie.volume=Tl(n),i||o("volume",n)})),t.events.on(Pc.Qs,(function(n,i){if(n){var e="".concat(n.language,".").concat(n.kind);return t.config.request.cookie.captions=Tl(e),void(i||o("captions",e))}t.config.request.cookie.captions=null,i||o("captions",null)})),t.events.on(Pc.Fs,(function(){t.config.embed.settings.background||(o("active",t.config.request.session),t.events.fire(Pc.sl))})),t.events.on([Pc.Ps,Pc.Ts],(function(){e("active")===t.config.request.session&&o("active",null)})),t.events.on(Pc.Gc,(function(){o("login",!0)})),n&&!Al&&(Al=function(n){return new r((function(i,e){document.createElement("a").href=t.config.request.urls.proxy;var r=document.createElement("iframe");r.src=n,r.setAttribute("title","Vimeo LocalStorage Proxy"),r.setAttribute("aria-hidden","true"),r.setAttribute("hidden",""),r.onload=function(n){var i=rc(t.config.request.urls.proxy);r.contentWindow.postMessage({method:"ping"},i)},r.onerror=function(t){e(t)};var o=setTimeout((function(){e()}),1e4);window.addEventListener("message",(function t(e){0!==n.indexOf(e.origin)||"ready"!==e.data&&"ping"!==e.data||(window.removeEventListener("message",t,!1),clearTimeout(o),i(r))}),!1),document.body.appendChild(r)}))}(t.config.request.urls.proxy)),n?window.addEventListener("message",(function(n){var i=rc(t.config.request.urls.proxy);n.origin===i&&"object"===U(n.data)&&"key"in n.data&&"newValue"in n.data?u(n.data.key,n.data.newValue):n.origin===window.location.origin&&n.data.session!==t.config.request.session&&u(n.data.key,n.data.val)}),!1):window.addEventListener("storage",(function(t){if(0===t.key.indexOf("sync_")&&t.oldValue!==t.newValue){try{if(window.localStorage.getItem(t.key)!==t.newValue)return}catch(t){}try{u(t.key,JSON.parse(t.newValue))}catch(n){al.captureException(n,{extra:{key:t.key,oldValue:t.oldValue,newValue:t.newValue}})}}}),!1),{reset:function(){o("login",!!t.config.user.logged_in)}}}var Rl=function(t){return{type:"LIVE_SET_START_TIME",payload:t}};function Cl(t){return t.replace(/(_\w)/g,(function(t){return t[1].toUpperCase()}))}function Ol(t){return function t(n,i){return Object.keys(i).reduce((function(e,r){return i[r]&&"object"===U(i[r])?e[n(r)]=t(n,i[r]):e[n(r)]=i[r],e}),{})}(Cl,t)}var Il=function(t){return{type:"CONFIG_LOAD",payload:W({},Ol(t))}};function jl(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=n.type,e=n.payload;switch(i){case"CONFIG_LOAD":return e.video.liveEvent?W({},t,{},e.video.liveEvent):null;case"LIVE_UPDATE":return W({},t,{},e);case"LIVE_SET_START_TIME":return W({},t,{ingest:W({},t.ingest,{startTime:e})});default:return t}}var Dl=function(t){var n;return!!(null==(n=t.liveEvent)?void 0:n.status)},Ll=function(t){var n;return null==(n=t.liveEvent)?void 0:n.status},Nl=function(t){var n,i;return(null==(n=t.liveEvent)||null==(i=n.ingest)?void 0:i.scheduledStartTime)||null},Pl=function(t){var n,i;return(null==(n=t.liveEvent)||null==(i=n.ingest)?void 0:i.startTime)||null},Fl=function(t){var n;return"pending"===(null==(n=t.liveEvent)?void 0:n.status)},Vl=function(t){var n;return"active"===(null==(n=t.liveEvent)?void 0:n.status)},Ul=function(t){var n;return"started"===(null==(n=t.liveEvent)?void 0:n.status)},Bl=function(t){var n;return"ended"===(null==(n=t.liveEvent)?void 0:n.status)},Hl=function(t){return Dl(t)&&!Bl(t)},zl=function(t){var n,i;return"done"===(null==(n=t.liveEvent)||null==(i=n.archive)?void 0:i.status)},ql=Object.freeze({__proto__:null,default:jl,liveExists:Dl,liveStatus:Ll,liveArchiveStatus:function(t){var n,i;return null==(n=t.liveEvent)||null==(i=n.archive)?void 0:i.status},dashLiveUrl:function(t){var n;return null==(n=t.liveEvent)?void 0:n.playback.dash_noredirect},hlsLiveUrl:function(t){var n;return null==(n=t.liveEvent)?void 0:n.playback.hls},scheduledLiveStartTime:Nl,liveStartTime:Pl,isLivePending:Fl,isLiveActive:Vl,isLiveStarted:Ul,isLiveEnded:Bl,liveInProgress:Hl,isLiveArchived:zl});function Wl(t,n){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={feature:n,$deeplink_path:"app.vimeo.com/"+t,$always_deeplink:!0,ref:"player",context:"player"},e="",r=[];for(var o in i)r.push("".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[o])));return e=r.join("&"),"https://bnc.lt/a/".concat("key_live_jpj6Duy53e6MhounkriNljdgsBhGbf0d","?").concat(e)}("videos/".concat(t),n)}function Gl(t,n,i){var e=t.events,o=t.backbone,u=!t.config.embed.playsinline&&(ys.mobileAndroid||ys.iOS&&!ys.iPad),a=ys.iOS>=8&&!ys.iPad,s=!1,c=!1,l=!1,f=!1,d=null,h=!1,v=!1,p=!1,m=!1,w=!1,b=!1;function g(t){o.element.classList.remove("invisible"),y()}function y(){var t=o.play();return b&&t.catch(_),t.catch(E).then(T)}function _(t){if(b=!1,k(t))return e.fire(Sc.qa,!0),o.play().then((function(){return e.fire(Pc.ac)}));throw t}function k(t){return t&&("NotAllowedError"===t.name||"AbortError"===t.name)}function E(t){return e.fire(Pc.ys,t),new r((function(){}))}function T(){e.fire(Pc._s)}function x(t){try{o.currentTime=t}catch(t){}}function S(){f||h||s&&o.paused&&y()}function A(){var n="none";("metadata"===t.config.request.flags.preload_video||u||ys.iOS>=8)&&(n="metadata"),"auto"===t.config.request.flags.preload_video&&(n="metadata","MediaSourceScanner"===o.currentScannerName&&(n="auto")),o.preload=n,e.on(Pc.Vc,(function(){t.config.request&&"metadata_on_hover"===t.config.request.flags.preload_video&&!l&&t.verifyConfig().then((function(){return o.preload="metadata",!0})).catch((function(t){}))}))}function M(){w=!1;var n=o.video;if(o.loadVideo(t.config),!n)if(t.config.embed.texttrack){var i=t.config.embed.texttrack;o.hasTextTrack(i)&&e.fire(Sc.rs,i,!0)}else e.on(yi.TEXT_TRACKS_AVAILABLE,(function(){r()})),r();function r(){null===t.config.request.cookie.captions||"null"===t.config.request.cookie.captions||o.hasTextTrack(t.config.request.cookie.captions)&&e.fire(Sc.rs,t.config.request.cookie.captions,!0)}}function R(t,n,i,e){if(c){var r=new XMLHttpRequest;r.open("DELETE","".concat(t,"/plays/").concat(n,"/").concat(i,"?token=").concat(e),!1),r.send(),c=!1}}function C(){if(t.config.embed.autoplay){if(n.get(Dl)&&!n.get(Ul))return;e.fire(Pc.Fs)}}o.element.classList.add("invisible"),a&&o.element.classList.add("hide-webkit-controls"),t.config.video.live_event&&i.classList.add("live-background"),t.config.embed.transparent&&i.classList.add("transparent"),n.watch(Ll,(function(t){switch(t){case"started":setTimeout((function(){M(),o.element.classList.remove("invisible"),e.fire(Pc.Fs)}),12e3)}})),n.watch(zl,(function(){t.loadVideo(t.config.video.id)})),n.watch("ui.video.scaleFactor",(function(t){o.element.classList.toggle("vp-telecine-cover",t>1)})),function n(){e.once(Pc.dl,n),wc((o=t.backbone).on,e.fire,[qo,zo,Ho,Ko,Go,Yo,$o,Uo,Wo,Fo,Vo,bi.ACTIVATED,bi.AVAILABLE,bi.DEACTIVATED,bi.UNAVAILABLE,tu.ARCHIVE_DONE,tu.EVENT_ACTIVE,tu.EVENT_ENDED,tu.EVENT_STARTED,tu.STREAM_OFFLINE,tu.STREAM_ONLINE,Ei.MEDIASESSION_PAUSE,Ei.MEDIASESSION_PLAY,Ei.MEDIASESSION_SEEK_BACKWARD,Ei.MEDIASESSION_SEEK_FORWARD,yi.AV_DURATION_MISMATCH,yi.BANDWIDTH,yi.BUFFER_ENDED,yi.BUFFER_OCCUPANCY,yi.BUFFER_STARTED,yi.CHAPTER_CUES_UPDATED,yi.CUE_POINT,yi.CURRENT_FILE_CHANGE,yi.DOWNLOAD_END,yi.DOWNLOAD_TIMEOUT,yi.DRM_AUTH_SUCCESS,yi.DROPPED_FRAMES,yi.MANIFEST_LOADED,yi.MANIFEST_TIMEOUT,yi.QUOTA_EXCEEDED_ERROR,yi.SCANNER_CHANGE,yi.STREAM_BUFFER_START,yi.STREAM_CHANGE,yi.STREAM_CHANGE_START,yi.STREAM_TARGET_CHANGE,yi.TEXT_TRACKS_AVAILABLE,ki.CAMERA_UPDATE,ki.MOTION_END,ki.MOTION_START,ki.SPATIAL_UNSUPPORTED,ki.WEBVR_ENTER,ki.WEBVR_EXIT,ki.WEBVR_HARDWARE_AVAILABLE,Ti.BRAIN_ML_SWITCH_TO_SKYFIRE,Ti.BRAIN_ML_MODEL_INPUTS,wi.DURATION_CHANGE,wi.ENDED,wi.ERROR,wi.LOAD_START,wi.LOADED_DATA,wi.LOADED_METADATA,wi.PAUSE,wi.PLAY,wi.PLAYING,wi.PROGRESS,wi.RATE_CHANGE,wi.SEEKED,wi.SEEKING,wi.STALLED,wi.TIME_UPDATE,wi.VOLUME_CHANGE,wi.WAITING])}(),wc(kl.on,e.fire,[gl.connected,gl.disconnected]),A(),e.on(wi.LOADED_METADATA,(function(n){t.config.video.duration=o.duration,t.config.video.video_width=o.videoWidth,t.config.video.video_height=o.videoHeight})),e.on(wi.DURATION_CHANGE,(function(n){t.config.video.duration=o.duration})),e.on(yi.SCANNER_CHANGE,(function(){A(),setTimeout((function(){e.fire(o.supportsSettingVolume?Sc.Qa:Sc.Za),e.fire(o.supportsTextTracks?Sc.ns:Sc.ts)}),0),al.captureBreadcrumb("Scanner changed to ".concat(o.currentScannerName),{},"video")})),e.on([tu.EVENT_ACTIVE,tu.EVENT_STARTED,tu.EVENT_ENDED,tu.ARCHIVE_DONE],(function(i){Object.assign(t.config.video.live_event,i),n.dispatch(function(t){return{type:"LIVE_UPDATE",payload:t}}(i))})),e.on(Pc.Fs,(function(){t.displayContext!==t.backbone?t.displayContext.play():function(){if("disable"!==t.config.video.privacy&&t.config.video.spatial&&ys.iOS&&!w||o.element.classList.remove("invisible"),d)return e.fire(Pc.bs,d),void t.preview.show();if(s=!0,h)t.preview.show();else{if(o.off(wi.PLAY,g),u&&(v=!0,e.fire(Sc.es)),n.get(Ul)&&(b=!0),!l)return t.config.video.spatial&&ys.iOS&&!w?(w=!0,e.fire(Sc._showOverlay,"app-redirect",{redirectUrl:t.doNotTrackEnabled?t.config.video.share_url:Wl(t.config.video.id,"player-spatial-redirect"),title:null,buttonText:"Regarder dans lapp Vimeo",ignoreText:null,bottomText:"La fonction 360° n'est pas supportée dans ce navigateur",newWindow:!t.config.embed.on_site}),void e.once(wi.PLAY,g)):void y();l&&S()}}()})).on(Pc.Ps,(function(){s=!1,t.displayContext.pause()})).on(Pc.cl,(function(){(window.location.search.indexOf("autopause=0")<0&&!o.paused&&!t.config.embed.settings.background||s)&&(s=!1,e.fire(Pc.Ps))})),e.on(wi.ERROR,(function(n){if(k(n)&&!b){if(t.config.embed.autoplay=0,o.pause(),t.config.embed.time)return x(t.config.embed.time),void e.fire(Pc.He,o.currentTime);if(0===o.currentTime)return void e.fire(Sc.$a);e.fire(Pc.He,o.currentTime)}})),e.on(wi.PLAY,(function(t){o.element.classList.remove("invisible")})),e.on(wi.PAUSE,(function(t,n){f||e.fire(Pc.He,t,n)})),e.on(wi.TIME_UPDATE,(function(t){t.currentTime})),e.on(wi.ENDED,(function(n){f||t.config.embed.loop||(v&&e.fire(Pc.Ns),s=!1,e.fire(Pc.Ts,n))})),e.on(yi.DRM_AUTH_SUCCESS,(function(){c=!0})),e.on(Uo,(function(){l=!0,e.once(wi.TIME_UPDATE,(function(){e.fire(Pc.Os)}))})),e.on(yi.BUFFER_STARTED,(function(){f||e.fire(Ec.Va)})),e.on(Ti.BRAIN_ML_SWITCH_TO_SKYFIRE,(function(){"ml_brain"in t.config.request.ab_tests&&delete t.config.request.ab_tests.ml_brain})),function(){var n=!1,i=!1;function r(o){if(!n&&!o.name.includes("PlayInterrupted"))if("TextTracksNotSupported"!==o.name){al.captureBreadcrumb(o.name,{message:o.message},"telecine error","error");var u=t.config.video.live_event?1:.001;if("MediaUrlBadRequest"===o.name&&!i){i=!0,u=1;var a=t.config.request,s=a.files,c=s.dash.cdns.fastly_skyfire.url,l=s.hls.cdns.fastly_skyfire.url,f=s.dash.cdns.akfire_interconnect_quic.url,h=s.hls.cdns.akfire_interconnect_quic.url,v=s.progressive.length?s.progressive[0].url:null,p=s.progressive.length?s.progressive[0].id:null,m=a.file_codecs,w=t.config.video.file_codecs,b=t.config.user.logged_in,g=a.build.js;al.captureBreadcrumb(o.name,{fastly_dash_url:c,fastly_hls_url:l,akamai_dash_url:f,akamai_hls_url:h,prog_url:v,prog_id:p,file_codecs:m,video_file_codecs:w,logged_in:b,version:g},"MediaUrlBadRequest config","error")}-1!==o.name.indexOf("Mimir")&&(u=1,al.captureBreadcrumb(o.name,o,"ABR","error"));var y=new Error(o.message);y.name=o.name,al.captureException(y,null,u);var _=Gc[o.name];if("function"==typeof _){var k=_();if(k.final&&e.off(wi.ERROR,r),d=k.deferred?k.id:null,"DRMFailure"===o.name){var E=t.config.request.dynamic_drm_translation_map,T=o.message.code;E&&T&&E[T]&&(k.title=E[T].title,k.message=E[T].msg),al.captureBreadcrumb("DRM failure",o,"video")}e.fire(Pc.bs,k.id,k)}}else e.fire(Sc.ts)}window.addEventListener("unload",(function(){n=!0}),!1),e.on(wi.ERROR,r),e.on("test-error",r)}(),e.on(Sc.Ka,(function(n){var i=!!n&&(!ys.iOS||ys.iOS>=10);t.config.embed.loop=i,o.loop=i})),e.fire(Sc.Ka,t.config.embed.loop),e.on(Pc.Bs,(function(n,i){t.events.fire(Pc.Hs,i),t.events.fire(Sc.Ha,null,n),l||e.fire(Pc.Fs)})),e.on(Pc.Gs,(function(){h||(s=!o.paused,f=!0,o.pause())})),e.on(Pc.$s,(function(t){f=!1,l?t||S():e.fire(Pc.Fs)})),e.on(Sc.Ha,(function(n,i){if(!h){i||(i=(o.duration||t.config.video.duration)*uc(n,0,1));var r=o.duration?i/o.duration:0;e.fire(Sc.vs,i,r)}})),e.on(Sc.vs,(function(t){x(t)})),function(){e.on(Sc.za,(function(n,i,e){e&&(n+=o.volume),n=uc(n,0,1),t.displayContext!==o&&(t.displayContext.volume=n),o.volume=n,o.muted=0===n,t.events.fire(Pc.Ss,n,i)})),e.on(Sc.qa,(function(n){o.muted=!!n,t.events.fire(Pc.Ss,o.volume,!0)})),e.on(wi.VOLUME_CHANGE,(function(){return e.fire(Pc.Ss,o.volume,!0)}));var n=t.config.request.cookie.volume;e.fire(Sc.za,n,!0),e.fire(Sc.qa,t.config.embed.muted)}(),e.on(Sc.Ya,(function(t,i){(o.video.currentFile.mime===xc.dash||n.get(Ul))&&(i=!0),o.quality=t,e.fire(Pc.As,t,i)})),function(){var t=o.playbackRate;e.on(wi.RATE_CHANGE,(function(n){o.playbackRate!==t&&(e.fire(Pc.Is,o.playbackRate,t),t=o.playbackRate)})),e.on(Sc.ps,(function(t){o.playbackRate=t})),e.on(Pc._loadVideo,(function(){try{o.playbackRate=1}catch(t){}}))}(),function(){function t(){h=!0,l&&!m&&(s=s||!o.paused,o.pause(),e.fire(Pc.He,o.currentTime))}function n(){h=!1,s&&!m&&(v||p||!u||e.fire(Sc.es),S())}e.on(Pc.gc,t),e.on(Pc.yc,n),e.on(Pc.Zs,(function(i,e){e.isCentered()&&(e.isVisible()?t():n())}))}(),e.on(Pc.Mc,(function(t){l&&!m&&(s=!o.paused,o.pause())})),e.on(Pc.Oc,(function(t){m||S()})),e.on(Pc.cc,(function(n,i){o.element.classList.remove("hide-webkit-controls"),n&&(p=!0),n||(l||ys.browser.safari||(o.poster=t.preview.getThumbnail()),v=!0,setTimeout((function(){o.textTracks.forEach((function(t){"hidden"===t.mode&&(t.mode="showing")}))}),500)),i||!ys.windowsPhone||ys.browser.edge||e.fire(Sc.us,!0)})),e.on(Pc.fc,(function(t){o.poster="",t||o.pause(),l||o.element.classList.add("invisible"),v=!1,p=!1,a&&o.element.classList.add("hide-webkit-controls"),o.textTracks.forEach((function(t){"showing"===t.mode&&(t.mode="hidden")}))})),e.on(Uo,(function(){o.poster=""})),e.on(Sc.us,(function(t){if(t)return o.controls=!0,void i.classList.add("native-controls");o.controls=!1,i.classList.remove("native-controls")})),e.on(Pc.il,(function(){M()})),e.on(Pc.Jc,(function(){M(),C()})),e.on(Sc.$a,(function(){o.unload(),e.fire(Pc.He,o.currentTime),t.preview.show(),o.element.classList.add("invisible"),l=!1,s=!1,d=null})),function(){var n;e.on(Sc.rs,(function(i){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n=e;try{t.config.request.flags.ott&&o.videoElement&&o.videoElement.setAttribute("crossorigin","anonymous"),o.enableTextTrack(i)}catch(t){}})).on(Sc.os,(function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n=i,t.config.request.flags.ott&&o.videoElement&&o.videoElement.removeAttribute("crossorigin"),o.disableTextTrack()})),e.on(qo,(function(t,i){e.fire(Pc.Qs,t,n||i)}))}(),e.on(bi.AVAILABLE,(function(n){var i=n.type;if(!t.config.request.drm)switch(i){case"AirPlay":e.fire(Pc.Ll)}})),e.on(bi.UNAVAILABLE,(function(n){var i=n.type;if(!t.config.request.drm)switch(i){case"AirPlay":e.fire(Pc.Nl)}})),e.on(bi.ACTIVATED,(function(t){var n=t.type;switch(m=!0,n){case"AirPlay":e.fire(Pc.Pl)}})),e.on(bi.DEACTIVATED,(function(t){var n=t.type;switch(m=!1,n){case"AirPlay":e.fire(Pc.Fl)}})),e.on(Pc.Vl,(function(){o.showExternalDisplayPicker("AirPlay")})),e.on(Sc.cs,(function(){o.supportsPresentationMode("picture-in-picture")&&(o.presentationMode="picture-in-picture")})),e.on(Sc.ls,(function(){o.supportsPresentationMode("picture-in-picture")&&(o.presentationMode="inline")})),M(),ys.spatialPlayback?(e.fire(Sc.fs),e.on([wi.PLAY,wi.SEEKED],(function(){e.fire(Sc.hs)})),e.on(ki.SPATIAL_UNSUPPORTED,(function(){l?e.fire(Ec.Ba,h):e.once(Pc.Os,(function(){e.fire(Ec.Ba,h)}))}))):e.once(Pc.Os,(function(){t.config.video.spatial&&e.fire(Ec.Ua,h)})),window.addEventListener("beforeunload",(function(){var n=t.config.request.drm;n&&R(n.hoover_url,n.user,n.asset,n.hoover_token)}),!1),e.on(Pc._loadVideo,(function(){var n=t.config.request&&t.config.request.drm;n&&R(n.hoover_url,n.user,n.asset,n.hoover_token)})),t.events.on(Sc.ms,(function(){return o.destroy()})),t.ready().then((function(){return setTimeout((function(){return C()}),0),t.config.embed.time>0&&e.fire(Sc.vs,t.config.embed.time,t.config.embed.time/o.duration),null})).catch((function(t){})),e.fire(Pc.Ml)}var $l,Kl=0,Yl=0,Jl={},Xl={};function Zl(t,n,i){return"_root"==n?i:t!==i?function(t){return $l||($l=t.matches?t.matches:t.webkitMatchesSelector?t.webkitMatchesSelector:t.mozMatchesSelector?t.mozMatchesSelector:t.msMatchesSelector?t.msMatchesSelector:t.oMatchesSelector?t.oMatchesSelector:ef.matchesSelector)}(t).call(t,n)?t:t.parentNode?(Kl++,Zl(t.parentNode,n,i)):void 0:void 0}function Ql(t,n,i,e){Jl[t.id]||(Jl[t.id]={}),Jl[t.id][n]||(Jl[t.id][n]={}),Jl[t.id][n][i]||(Jl[t.id][n][i]=[]),Jl[t.id][n][i].push(e)}function tf(t,n,i,e){if(Jl[t.id])if(n)if(e||i)if(e){if(Jl[t.id][n][i])for(var r=0;r<Jl[t.id][n][i].length;r++)if(Jl[t.id][n][i][r]===e){Jl[t.id][n][i].splice(r,1);break}}else delete Jl[t.id][n][i];else Jl[t.id][n]={};else for(var o in Jl[t.id])Jl[t.id].hasOwnProperty(o)&&(Jl[t.id][o]={})}function nf(t,n,i,e){if(this.element){t instanceof Array||(t=[t]),i||"function"!=typeof n||(i=n,n="_root");var r,o=this.id;for(r=0;r<t.length;r++)e?tf(this,t[r],n,i):(Jl[o]&&Jl[o][t[r]]||ef.addEvent(this,t[r],u(t[r])),Ql(this,t[r],n,i));return this}function u(t){return function(n){!function(t,n,i){if(Jl[t][i]){var e,r,o=n.target||n.srcElement,u={},a=0,s=0;for(e in Kl=0,Jl[t][i])Jl[t][i].hasOwnProperty(e)&&(r=Zl(o,e,Xl[t].element))&&ef.matchesEvent(i,Xl[t].element,r,"_root"==e,n)&&(Kl++,Jl[t][i][e].match=r,u[Kl]=Jl[t][i][e]);for(n.stopPropagation=function(){n.cancelBubble=!0},a=0;a<=Kl;a++)if(u[a])for(s=0;s<u[a].length;s++){if(!1===u[a][s].call(u[a].match,n))return void ef.cancel(n);if(n.cancelBubble)return}}}(o,n,t)}}}function ef(t,n){if(!(this instanceof ef)){for(var i in Xl)if(Xl[i].element===t)return Xl[i];return Yl++,Xl[Yl]=new ef(t,Yl),Xl[Yl]}this.element=t,this.id=n}ef.prototype.on=function(t,n,i){return nf.call(this,t,n,i)},ef.prototype.off=function(t,n,i){return nf.call(this,t,n,i,!0)},ef.matchesSelector=function(){},ef.cancel=function(t){t.preventDefault(),t.stopPropagation()},ef.addEvent=function(t,n,i){var e="blur"==n||"focus"==n;t.element.addEventListener(n,i,e)},ef.matchesEvent=function(){return!0};var rf=ef.addEvent,of=void 0===window.PointerEvent&&void 0!==window.MSPointerEvent,uf={pointerdown:"MSPointerDown",pointerup:"MSPointerUp",pointercancel:"MSPointerCancel",pointermove:"MSPointerMove",pointerenter:"MSPointerEnter",pointerleave:"MSPointerLeave",pointerover:"MSPointerOver",pointerout:"MSPointerOut"},af="onmspointerenter"in document,sf="onmspointerleave"in document;function cf(t,n){var i,e,r,o,u,a,s=0,c={},l=new Xc;function f(){return Date.now?Date.now():(new Date).getTime()}function d(){return t.config.video.spatial?"mono"!==t.config.video.spatial.stereo_mode?2:1:0}function h(){var n=t.backbone.getEffectByName("ThreeSixtyEffect");return ys.spatialPlayback&&n?n.isStereo()?2:1:0}function v(){i=!1,e=t.backbone?t.backbone.currentTime:0,r=0,o=0,u=0,a=!1}function p(n,i,e,r){t.verifyConfig().then((function(){var o=i;o.signature=t.config.request.signature,o.session=t.config.request.session,o.time=t.config.request.timestamp,o.expires=t.config.request.expires;var u=JSON.stringify(o),a="https://".concat(t.config.player_url).concat(n);return null===o.sessionTime&&(al.captureBreadcrumb("sessionTime is null breadcrumbs",{endpoint:n,allParams:o}),al.captureException("sessionTime is null when making stats request")),l.logRequestPromiseWithUrl(a,u,!e).then((function(o){if(200!==o.status&&r<2){if(410===o.status)return void t.events.once(Pc.il,(function(){p(n,i,e,r+1)}));setTimeout((function(){p(n,i,e,r+1)}),1e3)}})).catch((function(t){throw t}))})).catch((function(t){}))}function m(i,e,o){var u=t.backbone.currentFile||{},a=u.id,s=void 0===a?0:a,l=u.mime,f=void 0===l?xc.h264:l,v=u.metadata,m=(v=void 0===v?{}:v).profile,w=void 0===m?-1:m;if(f===xc.dash){var b=c,g=b.id;s=void 0===g?0:g;var y=b.profile;w=void 0===y?-1:y}t.performDelegateAction(Nc,(function(a){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=function(n){var a,l;p(i,W({referrer:t.config.request.referrer,embed:!t.config.embed.on_site,context:t.config.embed.context,autoplay:c.continuous?2:t.config.embed.autoplay,loop:t.config.embed.loop?1:0,id:t.config.video.id,vodId:(null==(a=t.config.video.vod)?void 0:a.id)?t.config.video.vod.id:null,vodSaleId:(null==(l=t.config.video.vod)?void 0:l.sale_id)?t.config.video.vod.sale_id:null,sessionTime:fc(r),videoShape:d(),spatialPlayback:h(),userId:t.config.user.id,userAccountType:t.config.user.account_type,userIsMod:t.config.user.mod?1:0,teamOriginUserId:t.config.user.team_origin_user_id?t.config.user.team_origin_user_id:null,teamId:t.config.user.team_id?t.config.user.team_id:null,ownerId:t.config.video.owner.id,ownerAccountType:t.config.video.owner.account_type,privacy:t.config.video.privacy,rating:t.config.video.rating?t.config.video.rating.id:null,type:"html",videoFileId:Number.isInteger(Number(s))?s:"0",delivery:Vc[f],profileId:w,quality:u.metadata?u.metadata.quality:null,duration:fc(t.config.video.duration),seconds:fc(e)},n,{playbackRate:t.backbone.playbackRate,build:el(t.config)}),o)},v=n.get(Hl)?1:0,m=n.get(Pl),b={isLive:v};if(v){if(!m)return void Ke("https://".concat(t.config.vimeo_url,"/live_event/status?clip_id=").concat(t.config.video.id)).json().then((function(t){return t&&t.ingest&&(n.dispatch(Rl(t.ingest.start_time)),m=n.get(Pl)),m&&(b.liveStartTime=m),l(b),t})).catch((function(t){}));b.liveStartTime=m}l(b)}))}function w(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t.playLoggingEnabled){var u=f();r&&o+1e3>u||(o=u,r&&!t.config.request.flags.partials||i||m("/log/partial",n,e))}}function b(n,i){var e,r;i=i||{};var o={referrer:t.config.request.referrer,embed:!t.config.embed.on_site,context:t.config.embed.context,id:t.config.video.id,vodId:(null==(e=t.config.video.vod)?void 0:e.id)?t.config.video.vod.id:null,vodSaleId:(null==(r=t.config.video.vod)?void 0:r.sale_id)?t.config.video.vod.sale_id:null,userId:t.config.user.id,userAccountType:t.config.user.account_type,userIsMod:t.config.user.mod?1:0,ownerId:t.config.video.owner?t.config.video.owner.id:0,duration:fc(t.config.video.duration),seconds:fc(t.backbone.currentTime),playbackRate:t.backbone.playbackRate,build:el(t.config)};for(var u in i)i.hasOwnProperty(u)&&(o[u]=i[u]);p("/log/"+n,o)}return v(),function(){t.events.on(wi.TIME_UPDATE,(function(t){var n=t.currentTime,o=(t.duration,t.timeProgress,t.playbackRate),a=Math.floor(n);!i&&u+1e3<f()&&(n>e&&(r+=(n-e)/o),e=n),a%30==0&&w(n)})),t.events.on(Pc.Is,(function(n,i){b("playback_rate_change",{oldPlaybackRate:i}),w(t.backbone.currentTime)})),t.events.on(Uo,(function(){!a&&t.playLoggingEnabled&&(a=!0,m("/log/play",0))})),t.events.on(Pc.He,(function(n){t.backbone.ended||w(n)})),t.events.on(wi.SEEKED,(function(t){var n=t.currentTime;s=n,i||w(s)})),t.events.on(Pc.Gs,(function(){u=f(),i=!0})),t.events.on(Pc.$s,(function(){e=t.backbone.currentTime,i=!1,w(s)})),t.events.on(Pc.Vs,(function(){w(t.backbone.currentTime)})),t.events.on(Pc.Ts,(function(){r+=t.config.video.duration-e,w(t.config.video.duration,!1,!1)})),t.events.on(yi.STREAM_CHANGE,(function(t){c=t}));var n=[],o=!1;function l(){n.length&&t.performDelegateAction(Nc,(function(i){var e,r;p("/log/spatial",{embed:!t.config.embed.on_site,id:t.config.video.id,context:t.config.embed.context,ownerId:t.config.video.owner?t.config.video.owner.id:0,referrer:t.config.request.referrer,vodId:(null==(e=t.config.video.vod)?void 0:e.id)?t.config.video.vod.id:null,vodSaleId:(null==(r=t.config.video.vod)?void 0:r.sale_id)?t.config.video.vod.sale_id:null,userId:t.config.user.id,userAccountType:t.config.user.account_type,userIsMod:t.config.user.mod?1:0,teamOriginUserId:t.config.user.team_origin_user_id?t.config.user.team_origin_user_id:null,teamId:t.config.user.team_id?t.config.user.team_id:null,build:el(t.config),motionLog:JSON.stringify(n)},!1)}))}t.events.on(ki.MOTION_START,(function(){o=!0,function i(){var e=t.backbone.getEffectByName("ThreeSixtyEffect").currentCoordinates,u=Math.round(100*e.lat)/100,a=Math.round(100*e.long)/100,s={sessionTime:r,videoTime:t.backbone.currentTime,coordinates:{lat:u,lon:a}};n.push(s),setTimeout((function(){o&&i()}),1e3)}()})),t.events.on(ki.MOTION_END,(function(){o=!1,l()})),t.events.on(Pc._loadVideo,(function(){l(),n=[]})),window.addEventListener("unload",(function(){t.backbone&&t.backbone.currentTime>0&&(w(t.backbone.currentTime,!0,!1),l())}),!1)}(),[{type:"share_press",event:Pc.vc},{type:"facebook_press",event:Pc.Ec},{type:"twitter_press",event:Pc.Tc},{type:"tumblr_press",event:Pc.xc},{type:"email_press",event:Pc.Sc},{type:"embed_press",event:Pc.pc},{type:"login_success",event:Pc.Gc},{type:"airplay",event:Pc.Pl},{type:"vod_press",event:Pc.mc},{type:"collection_press",event:Pc.wc},{type:"email_capture_submitted",event:Pc.Cc}].forEach((function(n){t.events.on(n.event,function(t){return function(){b(t)}}(n.type))})),t.events.on(Pc.ol,(function(n){var i={outroType:t.config.embed.outro,ownerAccountType:t.config.video.owner.account_type,playerWidth:t.element.clientWidth,playerHeight:t.element.clientHeight};(null==n?void 0:n.length)&&(i.outroVideos=n.join(",")),b("outro_displayed",i)})).on(Pc.al,(function(n){b("outro_video_press",{ownerAccountType:t.config.video.owner.account_type,videoId:n})})).on(Pc.bc,(function(){b("outro_follow_press",{add:!t.config.user.following})})).on(Pc.bl,(function(n){b("outro_cta_press",{ownerAccountType:t.config.video.owner.account_type,link:n})})).on(Pc.hl,(function(n){b("outro_link_press",{ownerAccountType:t.config.video.owner.account_type,link:n})})).on(Pc.wl,(function(n){b("outro_image_press",{ownerAccountType:t.config.video.owner.account_type,link:n})})).on(Pc.dc,(function(){b("like_press",{add:!t.config.user.liked})})).on(Pc.hc,(function(){b("watch_later_press",{add:!t.config.user.watch_later})})).on(Pc.Mc,(function(t){0===t.indexOf("login-")&&b("login_attempt")})).on(Pc.Qs,(function(t,n){n||(t?b("text_track_change",{textTrackLanguage:t.language,textTrackKind:t.kind}):b("text_track_change"))})).on(Pc.uc,(function(t){1!==t&&12!==t||b("badge_press",{badgeId:t})})).on(Pc.gc,(function(t){"email-capture"===t&&b("email_capture_displayed")})).on(Pc.yc,(function(t){"email-capture"===t&&b("email_capture_dismissed")})).on(Pc.yl,(function(n){b("card_press",{ownerAccountType:t.config.video.owner.account_type,cardId:n,cardType:"link"})})).on(Pc.gl,(function(n,i){t.config.embed.editor||b("card_displayed",{ownerAccountType:t.config.video.owner.account_type,cardId:n,cardType:i.url?"link":"text"})})),t.events.on(Pc.Jc,(function(t){t&&v()})),t.events.fire(Pc.Ol),{}}function lf(t,n){return null==t||t!=t?n:t}function ff(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"CONFIG_LOAD":return W({},t,{},n.payload);default:return t}}ef.addEvent=function(t,n,i){of&&uf[n]&&(n=uf[n]),"transitionend"===n&&(rf(t,"webkitTransitionEnd",i),rf(t,"otransitionend",i)),"mouseenter"===n&&(n="mouseover"),"mouseleave"===n&&(n="mouseout"),"MSPointerEnter"!==n||af||(n="MSPointerOver"),"MSPointerLeave"!==n||sf||(n="MSPointerOut"),rf(t,n,i)},ef.matchesEvent=function(t,n,i,e,r){return!("mouseenter"===t||"mouseleave"===t||!af&&"MSPointerEnter"===t||!sf&&"MSPointerLeave"===t)||function(t,n,i,e){return!e.relatedTarget||(!i||t===n)&&n!==e.relatedTarget&&!n.contains(e.relatedTarget)}(n,i,e,r)};var df={settings:{}};function hf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:df,n=arguments.length>1?arguments[1]:void 0,i=n.type,e=n.payload;switch(i){case"CONFIG_LOAD":return W({},t,{},e.embed);default:return t}}var vf=Object.freeze({__proto__:null,default:hf,transparent:function(t){return t.embed.transparent}});function pf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=n.type,e=n.payload;switch(i){case"CONFIG_LOAD":return W({},t,{},e.video);default:return t}}var mf=function(t){return t.video.height/t.video.width},wf=Object.freeze({__proto__:null,default:pf,ratio:mf});function bf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"CONTAINER_RESIZE":return W({},t,{width:n.payload.width,height:n.payload.height});default:return t}}var gf=function(t){return t.ui.container.width},yf=function(t){return t.ui.container.height},_f=Object.freeze({__proto__:null,default:bf,width:gf,height:yf});function kf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"PREVIEW_SET_SIZE":return W({},t,{width:n.payload.width,height:n.payload.height});default:return t}}var Ef=Object.freeze({__proto__:null,default:kf,scaleFactor:function(t){return oc({width:t.ui.preview.width,height:t.ui.preview.height,elementWidth:Hf(t),elementHeight:zf(t)}).scaleFactor}});function Tf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"CARDS_SET_SIZE":return W({},t,{size:n.payload});default:return t}}var xf=function(t){return t.ui.cards.size>0&&t.ui.container.width>=200&&t.ui.container.width<415},Sf=function(t){return xf(t)?60:0},Af=Object.freeze({__proto__:null,default:Tf,isCarouselVisible:xf,isCardsThumbVisible:function(t){return t.ui.cards.size>0&&t.ui.container.width>=300},getCarouselHeight:Sf}),Mf=i((function(t,n){function i(t,n){return t===n}function e(t,n,i){if(null===n||null===i||n.length!==i.length)return!1;for(var e=n.length,r=0;r<e;r++)if(!t(n[r],i[r]))return!1;return!0}function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,r=null,o=null;return function(){return e(n,r,arguments)||(o=t.apply(null,arguments)),r=arguments,o}}function o(t){var n=Array.isArray(t[0])?t[0]:t;if(!n.every((function(t){return"function"==typeof t}))){var i=n.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+i+"]")}return n}function u(t){for(var n=arguments.length,i=Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];return function(){for(var n=arguments.length,e=Array(n),u=0;u<n;u++)e[u]=arguments[u];var a=0,s=e.pop(),c=o(e),l=t.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(i)),f=r((function(){for(var t=[],n=c.length,i=0;i<n;i++)t.push(c[i].apply(null,arguments));return l.apply(null,t)}));return f.resultFunc=s,f.recomputations=function(){return a},f.resetRecomputations=function(){return a=0},f}}n._f=!0,n.defaultMemoize=r,n.createSelectorCreator=u,n.createStructuredSelector=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if("object"!=typeof t)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof t);var i=Object.keys(t);return n(i.map((function(n){return t[n]})),(function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return n.reduce((function(t,n,e){return t[i[e]]=n,t}),{})}))};var a=n.createSelector=u(r)}));!function(t){t&&t._f&&Object.prototype.hasOwnProperty.call(t,"default")&&t.default}(Mf),Mf.defaultMemoize,Mf.createSelectorCreator,Mf.createStructuredSelector;var Rf=Mf.createSelector,Cf=function(t){return Sf(t)},Of=function(t){return Math.min((yf(t)-Cf(t))/mf(t),gf(t))},If=function(t){return Math.min(gf(t)*mf(t)+Cf(t),yf(t))},jf=function(t){return oc({width:Of(t),height:If(t),elementWidth:gf(t),elementHeight:yf(t)}).scaleFactor},Df=function(t){return jf(t)>1},Lf=function(t){return t.embed.transparent&&!Df(t)?Of(t):gf(t)},Nf=function(t){return t.embed.transparent&&!Df(t)?If(t):yf(t)},Pf=function(t){return t.embed.transparent&&!Df(t)?"contain":"100% 100%"},Ff=Rf(Lf,Nf,(function(t,n){return{width:t,height:n}})),Vf=Rf(mf,Pf,Cf,(function(t,n,i){return{ratio:t,size:n,bottom:i}})),Uf=Object.freeze({__proto__:null,bottom:Cf,scaleFactor:jf,width:Lf,height:Nf,size:Pf,boundingRect:Ff,settings:Vf}),Bf={xxs:0,xs:390,sm:600,md:960,lg:1280,xl:1600,xxl:1920},Hf=function(t){return Lf(t)},zf=function(t){return Nf(t)-Cf(t)},qf=Rf(Hf,zf,(function(t,n){return{width:t,height:n}})),Wf=function(t){return zf(t)>Hf(t)},Gf=function(t){var n=Hf(t),i=zf(t);if(Wf(t))return n<225;var e=ku(t.embed.settings.customLogo)&&n<300||i<169,r=!ku(t.embed.settings.customLogo)&&(n<338||i<190);return e||r},$f=function(t){var n=Hf(t);if(Wf(t))return n<300;var i=ku(t.embed.settings.customLogo)&&n<=375,e=!ku(t.embed.settings.customLogo)&&n<=450;return i||e},Kf=function(t){var n=Hf(t);return n>=Bf.xxs&&n<Bf.xs},Yf=function(t){var n=Hf(t);return n>=Bf.xs&&n<Bf.sm},Jf=function(t){var n=Hf(t);return n>=Bf.sm&&n<Bf.md},Xf=function(t){var n=Hf(t);return n>=Bf.md&&n<Bf.lg},Zf=function(t){var n=Hf(t);return n>=Bf.lg&&n<Bf.xl},Qf=function(t){var n=Hf(t);return n>=Bf.xl&&n<Bf.xxl},td=function(t){return Hf(t)>=Bf.xxl},nd=Object.freeze({__proto__:null,breakpoints:Bf,width:Hf,height:zf,boundingRect:qf,isTinyMode:Gf,isMiniMode:$f,mode:function(t){return Gf(t)?"tiny":$f(t)?"mini":"normal"},xxs:Kf,xs:Yf,sm:Jf,md:Xf,lg:Zf,xl:Qf,xxl:td,breakpoint:function(t){var n={xxs:Kf,xs:Yf,sm:Jf,md:Xf,lg:Zf,xl:Qf,xxl:td};return Object.keys(Bf).find((function(i){return n[i](t)}))}}),id=Object.freeze({__proto__:null,scaleFactor:function(t){return oc({width:t.video.width,height:t.video.height,elementWidth:Hf(t),elementHeight:zf(t)}).scaleFactor}}),ed=Object.freeze({__proto__:null,size:function(t){return Math.max(10,Math.round(.045*zf(t)))}}),rd=Object.freeze({__proto__:null,isLinkTitleVisible:function(t){var n=t.ui;return n.container.width>=360&&n.container.height>=203||n.container.width>=415},isLinkDescriptionVisible:function(t){var n=t.ui;return n.container.width>=360&&n.container.height>=340||n.container.width>=415&&n.container.height>=234}}),od=Object.freeze({__proto__:null,isEmailCaptureVisible:function(t){var n=t.ui;return n.container.width>=300&&n.container.height>=169}}),ud=Object.freeze({__proto__:null,isPrefsMenuCentered:function(t){return ys.touch&&Hf(t)<415}});function ad(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{container:bf(t.container,n),preview:kf(t.preview,n),cards:Tf(t.cards,n)}}var sd=Object.freeze({__proto__:null,default:ad,container:_f,layout:Uf,player:nd,preview:Ef,video:id,cards:Af,outro:rd,overlay:od,controlbar:ud,captions:ed});function cd(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=W({},ff(t,n),{embed:hf(t.embed,n),video:pf(t.video,n),liveEvent:jl(t.liveEvent,n)});return W({},i,{ui:ad(t.ui,n,i)})}var ld=Object.freeze({__proto__:null,default:cd,embed:vf,video:wf,liveEvent:ql,ui:sd});function fd(t,n,i){var e=!1,r=!1;function o(t){i.style.fontSize="".concat(t,"px")}function u(){i.classList.add("hidden"),i.setAttribute("hidden","")}function a(){"picture-in-picture"!==t.backbone.presentationMode&&(t.config.embed.settings.background||(i.classList.remove("hidden"),i.removeAttribute("hidden")))}function s(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];i.firstChild;)i.removeChild(i.firstChild);if(t.length){var n=document.createDocumentFragment();t.forEach((function(t){var i=document.createElement("span"),e=t.html;i.innerHTML=e,n.appendChild(i)})),i.appendChild(n)}}return t.events.on(zo,(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(s(n),n.length)return e?void a():void(r=!0);u()})).on(Pc.Qs,(function(t){if(t)return i.setAttribute("lang",t.language),void i.setAttribute("dir",t.rtl?"rtl":"ltr");i.removeAttribute("dir"),i.removeAttribute("lang")})).on(Uo,(function(){e=!0,r&&(r=!1,a())})).on(Ko,(function(){u()})).on(Yo,(function(){a()})).on(Sc.$a,(function(){e=!1,u()})),n.watch("ui.captions.size",o),o(n.get("ui.captions.size")),t.events.on(Pc.Js,(function(t){t?i.classList.add("with-controls"):i.classList.remove("with-controls")})),t.events.on(Pc.gc,(function(){i.classList.add("invisible")})).on(Pc.yc,(function(){i.classList.remove("invisible")})),t.events.on(Pc.Ts,(function(){"nothing"!==t.config.embed.outro&&i.classList.add("invisible")})).on([wi.PLAY,Pc.Gs],(function(){i.classList.remove("invisible")})),{}}var dd=i((function(t){!function(){var n={templates:{},render:function(t,i){return n.templates[t]?n.templates[t].call(n,i||{}):""},map:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},escape:function(t){return null==t?"":String(t).replace(/[&<>"'\\/]/g,(function(t){return n.map[t]}))},helpers:{}};n.templates.adcountdown=function(t){return'<div class="vp-ads-tag hidden"><span class="vp-ads-countdown"></span></div>'},n.templates.stream_studder=function(t){var n="<h3> ";return(n+=this.render("icon_warning")||"")+' <span>Having issues? <button type="button" class="vp-alert-button-link button-link" aria-label="Switch to auto" data-alert-autofocus data-close data-context="suggestion">Switch to Auto</button> for smoother streaming.</span></h3>'},n.templates.warning_alert=function(t){var n="<h3> ";return(n+=this.render("icon_warning")||"")+" <span>"+t.strings.text+"<span></h3>"},n.templates.badge=function(t){var n="";return t.badge&&(t.badge.link&&(n+='<a href="'+t.badge.link+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=' aria-describedby="new-window">'),n+=' <img src="'+t.badge.img+'"',t.badge.margin&&(n+=' style="margin:'+t.badge.margin+'"'),n+=' width="'+t.badge.width+'" height="'+t.badge.height+'" alt="'+t.badge.name+' Badge"> ',t.badge.link&&(n+="</a>"),n+=""),n+""},n.templates.buffer_pattern=function(t){return'<pattern id="'+t.id+'" patternUnits="userSpaceOnUse" x="0" y="0" width="10" height="10" viewBox="0 0 10 10"><line x1="5" y1="-1" x2="-5" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /><line x1="10" y1="-1" x2="0" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /><line x1="15" y1="-1" x2="5" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /></pattern>'},n.templates.card=function(t){var n='<div class="card';return t.className&&(n+=" "+t.className),t.teaser&&(n+=" card-hasDetail"),n+='"> ',t.url&&(n+='<a class="card-link" href="',n+=this.escape(t.url)||"",n+='" target="_blank" rel="noopener" aria-describedby="new-window">'),n+=' <div class="card-inner"> ',t.image&&(n+=' <div class="card-imageWrap js-cardImageWrap"><img class="card-image" src="'+t.image+'" alt=""></div> '),n+=' <div class="card-body"><h3 class="card-text card-text--title"><span>',n+=this.escape(t.headline)||"",n+="</span> ",t.url&&(n+=this.render("icon_card_arrow")||""),n+=" </h3> ",t.teaser&&(n+=' <p class="card-text card-text--detail"> ',n+=this.escape(t.teaser)||"",n+=" </p> "),n+=" </div></div> ",t.url&&(n+="</a>"),n+"</div>"},n.templates.chapter_marker=function(t){var n='<div class="chapter-marker js-chapter-marker" data-time="'+t.chapter.startTime+'" style="left:'+t.chapter.startTime/t.duration*100+'%;"><div class="chapter-title-wrapper"><div class="chapter-title"><div class="js-chapter-content chapter-title-content-wrapper"><span class="chapter-number">'+t.index+"</span><span> ";return(n+=this.escape(t.chapter.text)||"")+" </span></div></div></div></div>"},n.templates.chapters=function(t){for(var n="",i=0;i<t.chapters.length;i++)n+=this.render("chapter_marker",{chapter:t.chapters[i],index:i+1,duration:t.duration})||"",n+="";return n+""},n.templates.compass=function(t){var n='<svg viewBox="0 0 36 36"> ';return 1==t.version?n+=' <circle class="compass-background" r="18" cx="18" cy="18"></circle><path class="compass-slice" transform="rotate(-45, 18, 18)" d="M0,0 m18,18 l12,0 A12,12 0 0,0 18,6 z"/><circle fill="none" class="compass-ring" stoke-width="3" r="14.5" cx="18" cy="18"></circle><polygon class="compass-dimple" points="16,3.5 18,1 20,3.5"/> ':n+=' <circle class="compass-background" r="18" cx="18" cy="18"></circle><path class="compass-slice" transform="rotate(-30, 18, 18)" d="M0,0 m18,18 l13,0 A13,13 0 0,0 11.500000000000004,6.741669750802297 z"/><circle class="compass-centercircle" r="3" cx="18" cy="18"></circle><path class="compass-line" stroke-linecap="round" d="M0,18 L36,18 z" /> ',n+"</svg>"},n.templates.controlbar_trailer=function(t){var n='<button type="button" class="play trailer rounded-box"><div><span class="play-icon">';return n+=this.render("icon_play")||"",n+="</span><p>"+t.text+"</p></div></button>",t.vimeoLogo.show&&(n+=' <div class="logo"> ',t.vimeoLogo.showLink&&(n+=' <a href="'+t.vimeoLogo.url+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=' aria-label="'+t.strings.watchOnVimeo+'" aria-describedby="new-window" data-clip-link> '),n+=this.render("logo")||"",t.vimeoLogo.showLink&&(n+=" </a> "),n+=" </div>"),n+="",t.customLogo&&(n+=' <div class="custom-logo',t.customLogo.sticky&&(n+=" sticky"),n+='" style="width:'+t.customLogo.width+"px;height:"+t.customLogo.height+'px"> ',t.customLogo.showLink&&(n+='<a href="',n+=this.escape(t.customLogo.url)||"",n+='" target="_blank" rel="noopener" aria-describedby="new-window">'),n+=' <img src="'+t.customLogo.img+'" alt=""> ',t.customLogo.showLink&&(n+="</a>"),n+=" </div>"),n+""},n.templates.controlbar=function(t){var n='<button type="button" class="play rounded-box state-'+t.playState+'"><div class="tiny-bars"><svg width="100%" height="100%" viewBox="0 0 65 40" focusable="false"><defs><clipPath id="rounded-border"><rect height="100%" width="100%" x="0" y="0" rx="5"/></clipPath> ';return n+=this.render("buffer_pattern",{id:"tiny-buffer"})||"",n+=' </defs><g clip-path="url(#rounded-border)"><rect class="buffer hidden" height="3" width="110%" x="0" y="37" fill="url(#tiny-buffer)"/><rect class="loaded" height="3" width="0" x="0" y="37" fill="#666"/><rect class="played fill" height="3" width="0" x="0" y="37"/></g></svg></div><div class="play-icon">'+t.playIcon+'</div><div class="pause-icon">'+t.pauseIcon+'</div><div class="replay-icon">'+t.replayIcon+'</div></button><div class="play-bar rounded-box" role="toolbar"> ',n+=this.render("live_status")||"",n+=this.render("live_viewer_count")||"",n+=' <div class="vp-progress"><div class="focus-target" role="slider" aria-label="Progress Bar" aria-valuemin="0" aria-valuemax="'+t.rawDuration+'" aria-valuenow="0" tabindex="0"></div><div class="loaded',t.rawDuration<60&&(n+=" short-video"),n+='"></div><div class="played"></div><div class="cuepoints"></div><div class="chapters"></div><div class="thumb-preview invisible hidden" role="presentation" aria-hidden="true"><div class="thumb"></div></div><div class="ghost-timecode invisible hidden" role="presentation" aria-hidden="true"><div class="box">00:00</div></div><div class="timecode" role="presentation" aria-hidden="true"><div class="box">'+t.duration+"</div></div></div> ",t.volume&&(n+=' <div class="volume" role="slider" title="'+t.strings.volume+'" aria-valuemin="0" aria-valuemax="1" tabindex="0"><div></div><div></div><div></div><div></div><div></div></div> '),t.castButton&&(n+=' <google-cast-launcher class="vp-cast-button" title="'+t.strings.chromecast+'" role="button" tabindex="0"></google-cast-launcher> '),t.ccButton&&(n+=' <button type="button" class="toggle cc '+(t.ccOn?"on":"off")+'" aria-haspopup="true"> '+t.captionsIcon+" </button> "),t.prefsButton&&(n+=' <button type="button" class="vp-prefs js-prefs" aria-haspopup="true"> '+t.settingsIcon+" </button> "),t.chapters&&(n+=' <button type="button" class="vp-chapter-button js-chapter-button" aria-haspopup="true"> '+t.chaptersIcon+" </button> "),t.airplayButton&&(n+=' <button type="button" class="toggle airplay off hidden" title="'+t.strings.airPlay+'" data-title-off="'+t.strings.airPlay+'" data-title-on="'+t.strings.airPlayOff+'" hidden> ',n+=this.render("icon_airplay")||"",n+=" </button> "),t.stereoscopicButton&&(n+=' <button type="button" class="toggle stereoscopic off" title="'+t.strings.stereoscopic+'" data-title-off="'+t.strings.stereoscopic+'" data-title-on="'+t.strings.stereoscopicOff+'"> ',n+=this.render("icon_stereoscopic")||"",n+=" </button> "),n+=' <button type="button" class="pip hidden enter" title="'+t.strings.pipEnter+'" data-title-enter="'+t.strings.pipEnter+'" data-title-return="'+t.strings.pipReturn+'" hidden> ',n+=this.render("icon_pip")||"",n+=' </button><button type="button" class="fullscreen',t.fullscreenButton||(n+=" only-in-fullscreen"),n+='"><div class="fullscreen-icon">'+t.fullscreenIcon+'</div><div class="unfullscreen-icon">'+t.unfullscreenIcon+"</div></button> ",t.vimeoLogo.show&&(n+=' <div class="logo"> ',t.vimeoLogo.showLink&&(n+=' <a href="'+t.vimeoLogo.url+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=' class="vp-logo-link" aria-label="'+t.strings.watchOnVimeo+'" aria-describedby="new-window" data-clip-link> '),n+=this.render("logo")||"",t.vimeoLogo.showLink&&(n+=" </a> "),n+=" </div> "),n+="</div> ",t.customLogo&&(n+=' <div class="custom-logo',t.customLogo.sticky&&(n+=" sticky"),n+='" style="max-width:'+t.customLogo.width+"px;height:"+t.customLogo.height+'px"> ',t.customLogo.showLink&&(n+='<a href="',n+=this.escape(t.customLogo.url||"")||"",n+='" target="_blank" rel="noopener" aria-describedby="new-window">'),n+=' <img src="'+t.customLogo.img+'" alt=""> ',t.customLogo.showLink&&(n+="</a>"),n+=" </div>"),n+""},n.templates.debug_panel=function(t){var n="<div class='vp-stats-debug-values'> ";return n+=this.render("debug_values",t)||"",n+="</div>",t.hideCloseButton||(n+='<button type="button" class="vp-stats-debug-close" aria-label="Close stats debug panel">',n+=this.render("icon_close")||"",n+="</button>"),n+='<input type="text" class="vp-stats-debug-code">',t.isCopyDisabled||(n+='<button type="button" class="vp-copy-debug"><span class="vp-copy-debug-label">Copy Debug Payload</span></button>'),n+="",t.isDNTEnabled&&(n+="No Debug Key available as Do Not Track is enabled."),n+""},n.templates.debug_values=function(t){var n="";return t.clipId&&(n+="<p><span>Clip ID:</span><b>"+t.clipId+"</b></p>"),n+="",t.delivery&&(n+="<p><span>Delivery:</span><b>"+t.delivery+"</b></p>"),n+="",t.codec&&(n+="<p><span>Codec:</span><b>"+t.codec+"</b></p>"),n+="",t.resolution&&(n+="<p><span>Playing:</span><b>"+t.resolution+"</b></p>"),n+="",t.embedSize&&(n+="<p><span>Embed size:</span><b>"+t.embedSize+"</b></p>"),n+="",t.isDash&&(n+="<p><span>Separate AV:</span><b>"+t.separateAudioVideo+"</b></p>"),n+="",(t.isDash||t.isLive)&&(n+="<p><span>Dropped frames:</span><b>"+t.droppedFrames+" / "+t.totalFrames+" - "+t.droppedFramesPercent+"</b></p>"),n+="",t.vrHeadsetName&&(n+="<p><span>VR Hardware:</span><b>"+t.vrHeadsetName+"</b></p>"),n+="",t.isLive&&(n+="<p><span>Live Latency:</span><b>"+t.liveLatency+"</b></p>"),n+="",t.isLive&&t.liveSessionID&&(n+="<p><span>Live Session ID:</span><b>"+t.liveSessionID+"</b></p>"),n+="",t.p2pSources&&(n+="<p><span>P2P sources:</span><b>"+t.p2pSources+" - "+t.p2pOffload+"</b></p>"),n+="<p><span>Playhead / buffer:</span><b>"+t.currentTime+" / "+t.bufferEnd+" / "+t.bufferAhead+"</b></p>",(t.isDash||t.isLive)&&(n+="<p><span>Bandwidth:</span><b>"+t.bandwidthKbps+'</b><div class="vp-stats-debug-bandwidth-minmax"> (<b class="vp-stats-debug-bandwidth-min">'+t.bandwidthMinKbps+'</b><b class="vp-stats-debug-bandwidth-max">'+t.bandwidthMaxKbps+'</b>) </div></p><div class="vp-stats-debug-time-series"> '+t.bandwidthSeriesSvg+"</div>"),n+="",t.sessionId&&t.showSessionId&&(n+='<p><span>Debug Key:</span><br><b class="vp-stats-debug-session-id">'+t.sessionId+"</b></p>"),n+""},n.templates.icon_airplay=function(t){return'<svg class="airplay-icon" viewBox="0 0 44 36" focusable="false"><polygon class="fill" points="0,0 44,0 44,27 34.5,27 31,23 40,23 40,4 4,4 4,23 13,23 9.5,27 0,27"/><polygon class="fill" points="7,36 22,18 37,36"/></svg>'},n.templates.icon_back=function(t){return'<svg class="icon-back" viewBox="0 0 64 64" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M0 32l32 32v-20h32l0-24h-32v-20z"/></svg>'},n.templates.icon_broken_heart=function(t){return'<svg class="unlike-icon" viewBox="0 0 110 81" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M82.496 1c-14.594 0-23.198 10.043-25.948 14.48l-6.77 10.727 13.661 8.543-13.661 12.535 5.695 15.348-9.686-15.348 11.389-11.975-11.969-7.402s4.22-14.27 4.621-15.521c.782-2.438.782-2.438-.813-3.289-5.516-2.944-12.608-8.098-21.509-8.098-16.299 0-27.506 15.037-27.506 27.885 0 12.795 12.562 22.558 22.245 27.592 9.186 4.771 30.601 18.349 32.755 24.523 2.154-6.174 23.57-19.752 32.753-24.523 9.684-5.034 22.247-14.797 22.247-27.592 0-12.848-11.208-27.885-27.504-27.885z"/></svg>'},n.templates.icon_card_arrow=function(t){return'<svg class="card-arrow" viewBox="0 0 10 10" preserveAspectRatio="xMidYMid" focusable="false"><polygon class="fill" points="10 8.337 10 0 1.663 0 1.663 1.603 7.263 1.603 0 8.866 1.134 10 8.397 2.737 8.397 8.337"/></svg>'},n.templates.icon_cc=function(t){return'<svg viewBox="0 0 20 14" focusable="false" aria-labelledby="cc-icon-title" role="img"><title id="cc-icon-title">'+t.title+'</title><path class="fill" fill-rule="evenodd" clip-rule="evenodd" d="M17 0h-14c-1.657 0-3 1.343-3 3v8c0 1.656 1.343 3 3 3h14c1.657 0 3-1.344 3-3v-8c0-1.657-1.343-3-3-3zm-7.271 8.282c-.145.923-.516 1.686-1.105 2.268-.597.591-1.369.89-2.294.89-1.138 0-2.049-.402-2.706-1.195-.647-.786-.975-1.866-.975-3.215 0-1.458.372-2.603 1.105-3.403.65-.708 1.487-1.067 2.487-1.067 1.33 0 2.321.482 2.947 1.435.34.53.526 1.072.553 1.611l.013.236h-1.984l-.044-.169c-.092-.355-.207-.622-.343-.793-.239-.298-.591-.443-1.076-.443-.483 0-.856.209-1.14.641-.298.455-.449 1.12-.449 1.977 0 .851.156 1.49.466 1.898.298.395.666.588 1.122.588.469 0 .814-.16 1.058-.491.138-.183.255-.472.351-.856l.042-.17h2.013l-.041.258zm7.582 0c-.145.923-.516 1.686-1.104 2.268-.598.591-1.369.89-2.294.89-1.139 0-2.049-.402-2.707-1.195-.646-.785-.975-1.865-.975-3.214 0-1.458.372-2.603 1.106-3.403.649-.708 1.485-1.067 2.486-1.067 1.33 0 2.32.482 2.946 1.435.34.53.526 1.072.554 1.611l.012.236h-1.9829999999999999l-.043-.169c-.092-.355-.208-.623-.344-.793-.238-.298-.591-.443-1.076-.443-.483 0-.856.209-1.139.641-.299.455-.45 1.12-.45 1.977 0 .851.157 1.49.467 1.898.299.395.666.588 1.121.588.469 0 .814-.16 1.058-.491.138-.183.256-.472.352-.856l.042-.17h2.012l-.041.257z"/></svg>'},n.templates.icon_chapters=function(t){return'<svg class="icon-chapter" viewBox="7 7 18 18" focusable="false" aria-labelledby="chapters-icon-title" role="img"><title id="chapters-icon-title">'+t.title+'</title><g class="icon-chapter-group"><rect class="fill" x="11" y="9" width="14" height="2" rx="1"></rect><rect class="fill" x="7" y="9" width="2" height="2" rx="1"></rect><rect class="fill" x="7" y="15" width="2" height="2" rx="1"></rect><rect class="fill" x="11" y="15" width="14" height="2" rx="1"></rect><rect class="fill" x="11" y="21" width="14" height="2" rx="1"></rect><rect class="fill" x="7" y="21" width="2" height="2" rx="1"></rect></g></svg>'},n.templates.icon_check=function(t){return'<svg class="check-icon" viewBox="0 0 12 12"><path class="fill" d="M10.9 2.9l-.7-.7c-.2-.2-.6-.2-.8-.1L5 6.6 2.6 4.1c-.2-.1-.6-.1-.7 0l-.8.8c-.1.1-.1.5 0 .7l3.1 3.1c.4.4 1 .4 1.4 0l5.1-5.1c.3-.2.3-.6.2-.7z"/></svg>'},n.templates.icon_clock=function(t){return'<svg class="watch-later-icon" viewBox="0 0 20 20" preserveAspectRatio="xMidYMid" focusable="false"><polyline class="fill hour-hand" points="9.64,4.68 10.56,4.68 11.28,11.21 8.93,11.21 9.64,4.68" /><polyline class="fill minute-hand" points="14.19,13.65 13.7,14.14 8.58,10.4 10.44,8.5 14.19,13.65" /><circle class="stroke" cx="10" cy="10" r="8" stroke-width="2" /></svg>'},n.templates.icon_close_new=function(t){return'<svg class="icon-close-new" viewBox="0 0 16 16" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M8.001 9.416l6.437 6.437a.497.497 0 0 0 .713-.001l.7-.7a.503.503 0 0 0 .002-.714L9.416 8.001l6.437-6.436a.497.497 0 0 0-.001-.713l-.7-.7a.503.503 0 0 0-.714-.002L8.001 6.587 1.565.15a.497.497 0 0 0-.713.001l-.7.7a.503.503 0 0 0-.002.714L6.587 8 .15 14.438a.497.497 0 0 0 .001.713l.7.7a.503.503 0 0 0 .714.002L8 9.416z"/></svg>'},n.templates.icon_close=function(t){return'<svg class="icon-close" viewBox="0 0 64 64" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M60 48.796l-16.812-16.796 16.812-16.796-11.204-11.204-16.796 16.804-16.804-16.804-11.196 11.204 16.796 16.796-16.796 16.796 11.196 11.204 16.804-16.804 16.796 16.804z"/></svg>'},n.templates.icon_collections=function(t){return'<svg class="collections-icon" viewBox="0 0 24 24" focusable="false"><path class="fill" d="M24 12c0-.3-.1-.6-.4-.8l-2.7-2.3 2.4-1c.4-.1.7-.5.7-.9 0-.3-.1-.6-.4-.8l-7-6c-.1-.1-.4-.2-.6-.2-.1 0-.3 0-.4.1l-15 6c-.3.1-.6.5-.6.9 0 .3.1.6.4.8l2.7 2.3-2.4 1c-.4.1-.7.5-.7.9 0 .3.1.6.4.8l2.7 2.3-2.4 1c-.4.1-.7.5-.7.9 0 .3.1.6.4.8l7 6c.1.1.4.2.6.2.1 0 .3 0 .4-.1l15-6c.4-.1.6-.5.6-.9 0-.3-.1-.6-.4-.8l-2.7-2.3 2.4-1c.4-.1.7-.5.7-.9zm-8.2-9.8l5.3 4.5-12.9 5.1-5.3-4.5 12.9-5.1zm5.3 14.5L8.2 21.8l-5.3-4.5 1.9-.8 2.6 2.2c.1.2.4.3.6.3.1 0 .3 0 .4-.1l10.5-4.2 2.2 2zm-12.9.1l-5.3-4.5 1.9-.8 2.6 2.2c.1.2.4.3.6.3.1 0 .3 0 .4-.1l10.5-4.2 2.3 1.9-13 5.2z"/></svg>'},n.templates.icon_embed=function(t){return'<svg class="embed-icon" viewBox="0 0 55 48" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="embed-icon-title" role="img"><title id="embed-icon-title">'+t.title+'</title><polygon class="fill" points="16.019,16.385 11.968,13.131 0,24.543 12.082,35.955 16.132,32.703 7.439,24.543"/><polygon class="fill" points="42.92,13.131 38.868,16.384 47.561,24.542 38.981,32.701 43.033,35.955 55,24.542"/><polygon class="fill" points="24.083,39.221 28.76,39.221 36.243,8.351 31.566,8.351"/></svg>'},n.templates.icon_facebook=function(t){return'<svg class="facebook-icon" viewBox="0 0 64 64" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="fb-icon-title" role="img"><title id="fb-icon-title">'+t.title+'</title><path class="fill" d="M35.992 64h-11.992v-32h-8v-11.028l8-0.004-0.013-6.497c0-8.997 2.44-14.471 13.037-14.471h8.824v11.030h-5.514c-4.127 0-4.325 1.541-4.325 4.418l-0.016 5.52h9.918l-1.169 11.028-8.741 0.004-0.008 32z"/></svg>'},n.templates.icon_fast_forward=function(t){return'<svg viewBox="0 0 40 20" preserveAspectRatio="xMidYMid" focusable="false"><polygon class="fill" points="1,0 20,10 1,20" /><polygon class="fill" points="20,0 40,10 20,20" /></svg>'},n.templates.icon_follow=function(t){return'<svg class="icon icon-follow" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid" focusable="false"><defs><clipPath id="icon-mask--check"><rect x="0" y="0" width="24" height="24" /></clipPath></defs><path class="icon-path icon-path--plus fill" d="M24 10h-10v-10h-4v10h-10v4h10v10h4v-10h10z"/><path class="icon-path icon-path--check fill" d="M9 21.035l-9-8.638 2.791-2.87 6.156 5.874 12.21-12.436 2.843 2.817z" clip-path="url(#icon-mask--check)"/><path class="icon-path icon-path--close fill" d="M23.954 21.03l-9.184-9.095 9.092-9.174-2.832-2.807-9.09 9.179-9.176-9.088-2.81 2.81 9.186 9.105-9.095 9.184 2.81 2.81 9.112-9.192 9.18 9.1z"/></svg>'},n.templates.icon_fullscreen=function(t){return'<svg viewBox="0 0 12 12" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="fullscreen-icon-title" role="img"><title id="fullscreen-icon-title">'+t.title+'</title><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(90)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(180)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(270)" /></svg>'},n.templates.icon_gear=function(t){return'<svg class="icon-gear" viewBox="0 0 16 16" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="settings-icon-title" role="img"><title id="settings-icon-title">'+t.title+'</title><defs><clipPath id="icon-gear-mask-hd"><polygon points="19 9.422 19 0 0 0 0 16 4.996 16 6 9.422 19 9.422"/></clipPath><clipPath id="icon-gear-mask-4k"><polygon points="19 0 0 0 0 16 .656 16 7.641 9.422 19 9.422"/></clipPath></defs><g class="icon-gear-group"><path class="icon-gear-cog fill" d="M8.75,0 L7.25,0 C6.69771525,0 6.25,0.44771525 6.25,1 L6.25,1.71 C6.24203899,2.03670262 6.03616565,2.32571712 5.73,2.44 C5.22486505,2.64787629 4.75048268,2.92375823 4.32,3.26 C4.06726048,3.46530794 3.71530155,3.4969447 3.43,3.34 L2.81,3 C2.57947626,2.86645499 2.30519371,2.83041629 2.04799634,2.89987835 C1.79079898,2.96934041 1.57195122,3.13856029 1.44,3.37 L1.44,3.37 L0.69,4.67 C0.438460777,5.14101477 0.601355467,5.72655514 1.06,6 L1.06,6 L1.68,6.36 C1.95609578,6.53006064 2.1022252,6.84996558 2.05,7.17 C1.97585362,7.71080372 1.97585362,8.25919628 2.05,8.8 C2.1022252,9.12003442 1.95609578,9.43993936 1.68,9.61 L1.06,10 C0.828560291,10.1319512 0.65934041,10.350799 0.589878348,10.6079963 C0.520416285,10.8651937 0.556454987,11.1394763 0.69,11.37 L0.69,11.37 L1.44,12.67 C1.72842942,13.137733 2.34023095,13.2851012 2.81,13 L2.81,13 L3.43,12.64 C3.71530155,12.4830553 4.06726048,12.5146921 4.32,12.72 C4.75048268,13.0562418 5.22486505,13.3321237 5.73,13.54 C6.03616565,13.6542829 6.24203899,13.9432974 6.25,14.27 L6.25,15 C6.25,15.5522847 6.69771525,16 7.25,16 L8.75,16 C9.30228475,16 9.75,15.5522847 9.75,15 L9.75,14.29 C9.75796101,13.9632974 9.96383435,13.6742829 10.27,13.56 C10.7751349,13.3521237 11.2495173,13.0762418 11.68,12.74 C11.9327395,12.5346921 12.2846984,12.5030553 12.57,12.66 L13.19,13.02 C13.4205237,13.153545 13.6948063,13.1895837 13.9520037,13.1201217 C14.209201,13.0506596 14.4280488,12.8814397 14.56,12.65 L14.56,12.65 L15.31,11.35 C15.5746773,10.8743026 15.4102265,10.2742794 14.94,10 L14.94,10 L14.32,9.64 C14.0439042,9.46993936 13.8977748,9.15003442 13.95,8.83 C14.0241464,8.28919628 14.0241464,7.74080372 13.95,7.2 C13.8977748,6.87996558 14.0439042,6.56006064 14.32,6.39 L14.94,6.03 C15.1714397,5.89804878 15.3406596,5.67920102 15.4101217,5.42200366 C15.4795837,5.16480629 15.443545,4.89052374 15.31,4.66 L15.31,4.66 L14.56,3.36 C14.426372,3.13025585 14.2067828,2.96315821 13.9497298,2.89561144 C13.6926768,2.82806466 13.4193087,2.86562606 13.19,3 L13.19,3 L12.57,3.36 C12.2846984,3.5169447 11.9327395,3.48530794 11.68,3.28 C11.2495173,2.94375823 10.7751349,2.66787629 10.27,2.46 C9.96383435,2.34571712 9.75796101,2.05670262 9.75,1.73 L9.75,1 C9.75,0.73478351 9.64464316,0.480429597 9.45710678,0.292893219 C9.2695704,0.10535684 9.01521649,-8.8817842e-16 8.75,0 Z M10.5,8 C10.5,9.38071187 9.38071187,10.5 8,10.5 C6.61928813,10.5 5.5,9.38071187 5.5,8 C5.5,6.61928813 6.61928813,5.5 8,5.5 C9.38071187,5.5 10.5,6.61928813 10.5,8 Z" /></g><g class="icon-gear-text icon-gear-text-hd"><polygon class="fill" points="10.17 12.38 10.46 10.43 12.22 10.43 11.36 16 9.6 16 9.95 13.76 8.09 13.76 7.77 16 6.01 16 6.85 10.43 8.61 10.43 8.32 12.38"/><path class="fill" d="M17.82,11.23 C17.65,10.98 17.32,10.43 15.93,10.43 L13.37,10.43 L12.51,16 L15.09,16 C16.1538092,16.0719871 17.159097,15.5065128 17.65,14.56 C18.1567595,13.5192032 18.2181336,12.3169925 17.82,11.23 Z M15.9,14.42 C15.6125419,14.6349311 15.2582986,14.7412041 14.9,14.72 L14.48,14.72 L14.9,11.72 L15.35,11.72 C15.6806309,11.6794538 16.0108877,11.7981978 16.24,12.04 C16.4818058,12.8447587 16.357466,13.7151373 15.9,14.42 Z"/></g><g class="icon-gear-text icon-gear-text-4k"><polygon class="fill" points="11.82 10.29 13.58 10.29 13.19 12.17 13.19 12.17 15.19 10.27 17.48 10.27 14.75 12.62 16.36 16 14.36 16 13.36 13.78 12.76 14.32 12.39 16 10.63 16"/><path class="fill" d="M7.86,14.9 L5.31,14.9 L5.61,13.41 L8.78,10.41 L10.36,10.41 L9.72,13.51 L10.44,13.51 L10.18,14.87 L9.45,14.87 L9.22,16 L7.63,16 L7.86,14.9 Z M8.19,13.54 L8.54,12 L8.54,12 L6.94,13.58 L8.19,13.54 Z"/></g></svg>'},n.templates.icon_heart=function(t){return'<svg class="like-icon" viewBox="0 0 110 81" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M82.496 1c-14.698 0-25.969 11.785-27.496 13.457-1.526-1.672-12.798-13.457-27.494-13.457-16.299 0-27.506 15.037-27.506 27.885 0 12.795 12.562 22.558 22.245 27.592 9.186 4.771 30.601 18.349 32.755 24.523 2.154-6.174 23.57-19.752 32.755-24.523 9.684-5.034 22.245-14.797 22.245-27.592 0-12.848-11.206-27.885-27.504-27.885z"/></svg>'},n.templates.icon_line_arrow=function(t){return'<svg class="icon-lineArrow" viewBox="0 0 24 15"><polygon class="fill" points="21 0 24 3.057 12 15 0 3.057 3 0 12 9"/></svg>'},n.templates.icon_live_viewers=function(t){return'<svg width="12" height="14" viewBox="0 0 12 14"><g transform="translate(-5 -4)" fill="#FFF" fill-rule="evenodd"><circle cx="11" cy="7" r="3"/><path d="M9 12h4a4 4 0 0 1 4 4v2H5v-2a4 4 0 0 1 4-4z"/></g></svg>'},n.templates.icon_lock=function(t){return'<svg viewBox="0 0 46 76" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill bolt" d="M5,42v-15C8,5 39,5 42,27v30h-7v-30C32,14 15,14 12,27v15z"/><rect class="fill" x="0" y="41" height="35" width="46" rx="4" ry="4"/></svg>'},n.templates.icon_mail=function(t){return'<svg class="mail-icon" viewBox="0 0 72 72" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="mail-icon-title" role="img"><title id="mail-icon-title">'+t.title+'</title><path class="fill" d="M71.754,57.6C71.9,57.169,72,56.718,72,56.241V16.759c0-0.453-0.092-0.881-0.225-1.291l-23.487,19.86L71.754,57.6z"/><path class="fill" d="M35.999,40.118l6.187-4.971l3.131-2.516L68.9,12.693c-0.387-0.113-0.789-0.193-1.213-0.193H4.312c-0.424,0-0.827,0.08-1.215,0.194l23.599,19.949l3.132,2.517L35.999,40.118z"/><path class="fill" d="M67.688,60.5c0.405,0,0.791-0.074,1.164-0.18L45.157,37.843l-9.159,7.361l-9.145-7.351L3.15,60.322C3.522,60.426,3.907,60.5,4.312,60.5H67.688z"/><path class="fill" d="M0.226,15.468C0.092,15.878,0,16.307,0,16.759v39.482c0,0.478,0.099,0.929,0.247,1.356l23.476-22.261L0.226,15.468z"/></svg>'},n.templates.icon_muted=function(t){return'<svg class="vp-icon-muted" viewBox="0 0 16 16"><path class="fill" d="M15.988 9.491l-1.49 1.491-1.491-1.491-1.491 1.491-1.49-1.491 1.49-1.491-1.49-1.491 1.49-1.491 1.491 1.491 1.491-1.491 1.49 1.491-1.49 1.491 1.49 1.491zM8.008 15.996l-3.998-3.998h-2.998c-0.552 0-0.999-0.447-0.999-0.999v-5.997c0-0.552 0.447-0.999 0.999-0.999h2.998l3.998-3.998c0 0 0.999-0.125 0.999 0.999 0 5.423 0 13.304 0 13.993 0 1.124-0.999 0.999-0.999 0.999zM7.009 4.002l-1.999 1.999h-2.998v3.998h2.998l1.999 1.999v-7.996z"></path></svg>'},n.templates.icon_pause=function(t){return'<svg viewBox="0 0 20 20" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="pause-icon-title" role="img"><title id="pause-icon-title">'+t.title+'</title><rect class="fill" width="6" height="20" x="0" y="0" /><rect class="fill" width="6" height="20" x="12" y="0" /></svg>'},n.templates.icon_pip=function(t){return'<svg class="pip-icon" viewBox="0 0 16 12"><polygon class="fill" points="6 8 1 8 1 1 14 1 14 6 15 6 15 0 0 0 0 9 6 9 6 8"/><rect class="fill" x="7" y="7" width="9" height="5"/><polyline class="fill enter" transform="translate(4, 4) rotate(180) translate(-4, -4)" points="5.33 2 5.33 3 3.67 3 5.67 5 5 5.67 3 3.67 3 5.33 2 5.33 2 2"/><polyline class="fill return" points="5.33 2 5.33 3 3.67 3 5.67 5 5 5.67 3 3.67 3 5.33 2 5.33 2 2"/></svg>'},n.templates.icon_play=function(t){return'<svg viewBox="0 0 20 20" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="play-icon-title" role="img"><title id="play-icon-title">'+t.title+'</title><polygon class="fill" points="1,0 20,10 1,20"/></svg>'},n.templates.icon_prev=function(t){return'<svg class="icon-prev" viewBox="0 0 27 48" preserveAspectRatio="xMidYMid" focusable="false"><path class="fill" d="M7.243,24L26.414,4.828c0.781-0.781,0.781-2.047,0-2.828L25,0.586 c-0.781-0.781-2.047-0.781-2.828,0L0.879,21.879c-1.172,1.172-1.172,3.071,0,4.243l21.293,21.293c0.781,0.781,2.047,0.781,2.828,0 L26.414,46c0.781-0.781,0.781-2.047,0-2.828L7.243,24z"/></svg>'},n.templates.icon_replay=function(t){return'<svg viewBox="-387 605 16 16" preserveAspectRatio="xMidYMid" aria-labelledby="replay-icon-title" role="img"><title id="replay-icon-title">'+t.title+'</title><path class="fill" d="M-387 606v4c0 .6.4 1 1 1h4c.6 0 1-.4 1-1s-.4-1-1-1h-1.5c1.1-1.2 2.7-2 4.5-2 3.3 0 6 2.7 6 6s-2.7 6-6 6c-2.3 0-4.4-1.3-5.4-3.4-.2-.5-.8-.7-1.3-.5-.5.2-.7.8-.5 1.3 1.3 2.8 4.2 4.6 7.2 4.6 4.4 0 8-3.6 8-8s-3.6-8-8-8c-2.3 0-4.5 1-6 2.7V606c0-.6-.4-1-1-1s-1 .4-1 1z"/></svg>'},n.templates.icon_share=function(t){return'<svg class="share-icon" viewBox="0 0 20 20" preserveAspectRatio="xMidYMid" focusable="false"><polygon class="fill" points="20,0 0,12 5,15 17,4 7,16 7,19 9,17 14,20"/></svg>'},n.templates.icon_spin=function(t){return'<svg class="vp-spin-trace" viewBox="0 0 50 50" focusable="false"><circle cx="50%" cy="50%" r="20"></circle></svg><svg class="vp-spin-circle" viewBox="0 0 50 50" focusable="false"><circle cx="50%" cy="50%" r="20"></circle></svg>'},n.templates.icon_stereoscopic=function(t){return'<svg viewBox="0 0 20 13" focusable="false"><path class="fill" d="M 18.74,0 1.2,0 C 0.55,0 0,0.57 0,1.27 L 0,11.73 C 0,12.43 0.55,13 1.23,13 L 6,13 c 0.54,0 1,-0.32 1.16,-0.79 L 8.55,8.74 C 8.79,8.16 9.35,7.75 10,7.75 c 0.65,0 1.21,0.41 1.45,0.99 l 1.39,3.47 c 0.19,0.47 0.62,0.79 1.11,0.79 l 4.79,0 C 19.45,13 20,12.43 20,11.73 L 20,1.27 C 20,0.57 19.45,0 18.74,0 M 5.22,8.58 C 4,8.58 3,7.55 3,6.29 3,5 4,4 5.22,4 6.44,4 7.43,5 7.43,6.29 7.43,7.55 6.44,8.58 5.22,8.58 m 9.56,0 C 13.56,8.58 12.57,7.55 12.57,6.29 12.57,5.03 13.56,4 14.78,4 16,4 17,5.03 17,6.29 17,7.55 16,8.58 14.78,8.58 Z" /></svg>'},n.templates.icon_tumblr=function(t){return'<svg class="tumblr-icon" viewBox="0 0 12 20" focusable="false" aria-labelledby="tumblr-icon-title" role="img"><title id="tumblr-icon-title">'+t.title+'</title><path class="fill" d="M7.865,19.958 C3.629,19.958 2.02,16.834 2.02,14.627 L2.02,8.105 L0,8.105 L0,5.527 C3.027,4.436 3.756,1.705 3.927,0.149 C3.938,0.042 4.022,0 4.07,0 L6.994,0 L6.994,5.084 L10.987,5.084 L10.987,8.105 L6.979,8.105 L6.979,14.318 C6.993,15.149 7.291,16.287 8.815,16.287 C8.843,16.287 8.872,16.287 8.9,16.286 C9.43,16.272 10.14,16.118 10.511,15.941 L11.471,18.788 C11.11,19.317 9.481,19.932 8.015,19.957 C7.964,19.958 7.915,19.958 7.865,19.958"/></svg>'},n.templates.icon_twitter=function(t){return'<svg class="twitter-icon" viewBox="0 0 274 223" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="twitter-icon-title" role="img"><title id="twitter-icon-title">'+t.title+'</title><path class="fill" d="M85.98,222 C54.305,222 24.822,212.715 0,196.801 C4.388,197.319 8.853,197.584 13.38,197.584 C39.658,197.584 63.843,188.617 83.039,173.574 C58.495,173.121 37.781,156.905 30.644,134.621 C34.068,135.276 37.582,135.627 41.196,135.627 C46.312,135.627 51.267,134.942 55.974,133.66 C30.314,128.508 10.981,105.838 10.981,78.662 C10.981,78.426 10.981,78.191 10.985,77.957 C18.548,82.158 27.196,84.681 36.391,84.972 C21.341,74.914 11.438,57.746 11.438,38.287 C11.438,28.008 14.204,18.373 19.032,10.089 C46.696,44.023 88.025,66.353 134.641,68.692 C133.685,64.587 133.188,60.306 133.188,55.91 C133.188,24.935 158.302,-0.178 189.279,-0.178 C205.411,-0.178 219.988,6.634 230.22,17.535 C242.996,15.019 255,10.351 265.837,3.924 C261.649,17.021 252.756,28.013 241.175,34.955 C252.521,33.599 263.331,30.584 273.39,26.123 C265.87,37.371 256.36,47.25 245.402,55.158 C245.51,57.563 245.564,59.982 245.564,62.414 C245.564,136.533 189.148,222 85.98,222"/></svg>'},n.templates.icon_unfullscreen=function(t){return'<svg viewBox="0 0 12 12" preserveAspectRatio="xMidYMid" focusable="false" aria-labelledby="unfullscreen-icon-title" role="img"><title id="unfullscreen-icon-title">'+t.title+'</title><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) "/><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(90)" /><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(180)" /><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(270)" /></svg>'},n.templates.icon_vod_download=function(t){return'<svg class="vod-download-icon" viewBox="0 0 32 32" focusable="false"><path class="fill" d="M21.707 24.707l-5 5c-.39.39-1.024.39-1.414 0l-5-5c-.39-.39-.39-1.024 0-1.414l1.06-1.06c.392-.392 1.025-.392 1.415 0L14 23.462V15c0-.552.448-1 1-1h2c.552 0 1 .448 1 1v8.464l1.232-1.232c.39-.39 1.024-.39 1.414 0l1.06 1.06c.392.39.392 1.025 0 1.415z"/><path class="fill" d="M27.894 12.31c.063-.43.106-.864.106-1.31 0-4.97-4.03-9-9-9-3.6 0-6.7 2.12-8.138 5.175C10.175 6.75 9.368 6.5 8.5 6.5 6.015 6.5 4 8.515 4 11c0 .445.067.874.187 1.28C1.76 13.05 0 15.318 0 18c0 3.314 2.686 6 6 6h1c0-2.42 1.718-4.436 4-4.9V15c0-2.21 1.79-4 4-4h2c2.21 0 4 1.79 4 4v4.1c2.282.464 4 2.48 4 4.9h1c3.314 0 6-2.686 6-6 0-2.65-1.72-4.896-4.106-5.69z"/></svg>'},n.templates.icon_vod_rent=function(t){return'<svg class="vod-rent-icon" viewBox="0 0 32 32" focusable="false"><path class="fill" d="M23 11H9c-.552 0-1 .448-1 1v8c0 .552.448 1 1 1h14c.552 0 1-.448 1-1v-8c0-.552-.448-1-1-1z"/><path class="fill" d="M32 22V10c-2.76 0-5-2.24-5-5H5c0 2.76-2.24 5-5 5v12c2.76 0 5 2.24 5 5h22c0-2.76 2.24-5 5-5zm-6-1c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V11c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2v10z"/></svg>'},n.templates.icon_vod_subscribe=function(t){return'<svg class="vod-subscribe-icon" viewBox="0 0 32 32" focusable="false"><path class="fill" d="M20 9v2c0 .552.448 1 1 1h10c.552 0 1-.448 1-1V1c0-.552-.448-1-1-1h-2c-.552 0-1 .448-1 1v4.445C24.98 2.01 20.523-.128 15.558.005 7.293.23.413 6.96.018 15.216-.42 24.41 6.905 32 16 32c8.47 0 15.404-6.583 15.964-14.912.04-.585-.413-1.088-1-1.088H28.96c-.514 0-.956.388-.994.9C27.506 23.107 22.326 28 16 28 9.217 28 3.748 22.37 4.01 15.53 4.246 9.284 9.47 4.147 15.72 4.003 19.38 3.92 22.674 5.483 24.926 8H21c-.552 0-1 .448-1 1z"/><path class="fill" d="M13 20v-8l8 4"/></svg>'},n.templates.icon_vod=function(t){return'<svg class="vod-icon" viewBox="0 0 21 23" focusable="false"><path class="fill" d="M19.602,4.716l-7.665-4.385C11.169-0.108,9.91-0.111,9.139,0.327L1.4,4.721C0.63,5.158,0,6.234,0,7.112v8.776c0,0.878,0.63,1.955,1.398,2.393l0.526,0.3l7.176,4.09c0.77,0.438,2.028,0.438,2.798,0l7.702-4.39c0.77-0.438,1.4-1.516,1.4-2.393V7.112C21,6.234,20.37,5.156,19.602,4.716z M7.336,15.761L7.337,7.24l8.008,4.26L7.336,15.761z"/></svg>'},n.templates.icon_warning=function(t){return'<svg class="warning-icon" focusable="false" width="36" height="32.326" viewBox="287.915 380.297 36 32.326"><path d="M309.646 382.963c-2.052-3.555-5.41-3.555-7.462 0L288.79 406.16c-2.05 3.555-.372 6.463 3.732 6.463h26.786c4.104 0 5.783-2.908 3.73-6.463l-13.392-23.197zm-2 23.224c0 .983-.804 1.788-1.788 1.788-.983 0-1.788-.805-1.788-1.788 0-.984.805-1.79 1.788-1.79s1.79.805 1.788 1.79zm-.317-7.76c-.254 2.604-.916 4.735-1.472 4.735-.557 0-1.22-2.13-1.477-4.735-.255-2.604-.464-5.72-.464-6.925 0-1.204.87-2.19 1.935-2.19 1.066 0 1.936.986 1.936 2.19s-.205 4.32-.457 6.925z"/></svg>'},n.templates.live_status=function(t){return'<div class="vp-live-status"><div class="vp-live-status-circle offline"></div><span>LIVE</span></div>'},n.templates.live_viewer_count=function(t){var n='<div class="vp-live-viewer-count"><div class="vp-live-viewer-count-person"> ';return(n+=this.render("icon_live_viewers")||"")+' </div><span class="vp-live-viewer-count-value">0</span></div>'},n.templates.logo=function(t){return'<svg viewBox="0 0 140 40" preserveAspectRatio="xMidYMid" role="img" focusable="false" aria-labelledby="logo-icon-title" role="img"><title id="logo-icon-title">Vimeo</title><g><path class="fill logo-v" d="M31.277 18.832c-.14 3.052-2.27 7.229-6.39 12.531-4.259 5.536-7.863 8.306-10.811 8.306-1.825 0-3.371-1.687-4.633-5.059l-2.529-9.275c-.938-3.372-1.943-5.06-3.019-5.06-.234 0-1.054.494-2.458 1.477l-1.474-1.901c1.546-1.358 3.071-2.717 4.572-4.078 2.062-1.783 3.609-2.72 4.642-2.814 2.438-.234 3.938 1.433 4.502 5.001.608 3.851 1.03 6.246 1.266 7.182.704 3.195 1.476 4.791 2.321 4.791.657 0 1.641-1.037 2.954-3.108 1.312-2.072 2.015-3.649 2.109-4.732.188-1.789-.516-2.686-2.109-2.686-.75 0-1.522.173-2.318.514 1.54-5.044 4.481-7.495 8.823-7.355 3.22.095 4.737 2.184 4.552 6.266z"/><path class="fill logo-i" d="M50.613 28.713c-1.313 2.484-3.119 4.733-5.417 6.748-3.143 2.718-6.285 4.076-9.425 4.076-1.456 0-2.57-.469-3.343-1.406-.773-.938-1.137-2.153-1.09-3.653.045-1.548.526-3.938 1.441-7.173.914-3.232 1.373-4.967 1.373-5.201 0-1.218-.423-1.828-1.266-1.828-.282 0-1.079.494-2.393 1.477l-1.618-1.901c1.501-1.358 3.001-2.717 4.502-4.078 2.017-1.783 3.518-2.72 4.504-2.814 1.546-.14 2.684.314 3.411 1.367.726 1.052.996 2.417.81 4.098-.61 2.852-1.268 6.472-1.972 10.864-.046 2.01.681 3.014 2.182 3.014.656 0 1.827-.693 3.518-2.083 1.406-1.156 2.555-2.243 3.447-3.262l1.336 1.755zm-6.12-25.016c-.047 1.168-.633 2.288-1.76 3.361-1.266 1.212-2.767 1.82-4.501 1.82-2.672 0-3.963-1.166-3.869-3.499.045-1.213.76-2.381 2.144-3.501 1.384-1.119 2.919-1.68 4.609-1.68.984 0 1.805.387 2.462 1.155.656.772.961 1.553.915 2.344z"/><path class="fill logo-m" d="M94.543 28.713c-1.314 2.484-3.117 4.733-5.416 6.748-3.145 2.718-6.285 4.076-9.426 4.076-3.051 0-4.527-1.687-4.432-5.06.045-1.501.338-3.306.877-5.415.539-2.108.832-3.748.879-4.921.049-1.779-.492-2.673-1.623-2.673-1.223 0-2.682 1.456-4.375 4.362-1.788 3.05-2.754 6.003-2.894 8.861-.095 2.02.103 3.568.592 4.645-3.272.096-5.565-.444-6.873-1.617-1.171-1.032-1.708-2.742-1.614-5.135.045-1.501.276-3.001.69-4.502.414-1.5.644-2.837.69-4.011.095-1.734-.54-2.604-1.9-2.604-1.177 0-2.444 1.339-3.806 4.011-1.361 2.673-2.113 5.465-2.253 8.371-.094 2.627.074 4.456.503 5.486-3.219.096-5.505-.582-6.857-2.035-1.122-1.214-1.634-3.06-1.539-5.54.044-1.214.258-2.911.645-5.084.386-2.175.603-3.87.647-5.087.093-.841-.119-1.263-.633-1.263-.281 0-1.079.475-2.393 1.424l-1.687-1.901c.234-.184 1.71-1.545 4.432-4.078 1.969-1.828 3.306-2.766 4.009-2.812 1.219-.095 2.204.409 2.954 1.511s1.126 2.38 1.126 3.834c0 .469-.047.915-.14 1.336.703-1.077 1.523-2.017 2.463-2.814 2.156-1.874 4.572-2.931 7.245-3.166 2.298-.187 3.938.352 4.925 1.617.795 1.033 1.17 2.511 1.125 4.433.329-.28.681-.586 1.056-.915 1.078-1.267 2.133-2.273 3.164-3.023 1.736-1.267 3.541-1.97 5.418-2.112 2.25-.187 3.867.35 4.852 1.611.844 1.028 1.219 2.5 1.127 4.415-.047 1.309-.363 3.213-.949 5.712-.588 2.501-.879 3.936-.879 4.31-.049.982.047 1.659.279 2.034.236.373.797.559 1.689.559.656 0 1.826-.693 3.518-2.083 1.406-1.156 2.555-2.243 3.447-3.262l1.337 1.757z"/><path class="fill logo-e" d="M120.922 28.642c-1.361 2.249-4.033 4.495-8.02 6.743-4.971 2.856-10.012 4.284-15.125 4.284-3.797 0-6.52-1.267-8.16-3.797-1.172-1.735-1.734-3.797-1.688-6.189.045-3.797 1.736-7.407 5.064-10.832 3.658-3.75 7.973-5.627 12.945-5.627 4.596 0 7.033 1.873 7.314 5.615.188 2.384-1.125 4.842-3.938 7.368-3.004 2.76-6.781 4.515-11.328 5.263.842 1.169 2.109 1.752 3.799 1.752 3.375 0 7.059-.855 11.045-2.574 2.859-1.207 5.111-2.461 6.754-3.76l1.338 1.754zm-15.969-7.345c.045-1.259-.469-1.89-1.547-1.89-1.406 0-2.83.969-4.283 2.906-1.451 1.936-2.201 3.789-2.248 5.562-.025 0-.025.305 0 .911 2.295-.839 4.287-2.122 5.971-3.849 1.357-1.491 2.06-2.707 2.107-3.64z"/><path class="fill logo-o" d="M140.018 23.926c-.189 4.31-1.781 8.031-4.783 11.169-3.002 3.137-6.73 4.706-11.186 4.706-3.705 0-6.52-1.195-8.441-3.585-1.404-1.777-2.182-4.001-2.32-6.668-.236-4.029 1.217-7.729 4.361-11.101 3.377-3.746 7.619-5.618 12.732-5.618 3.281 0 5.766 1.102 7.457 3.301 1.594 2.015 2.32 4.614 2.18 7.796zm-7.95-.264c.047-1.269-.129-2.434-.527-3.49-.4-1.057-.975-1.587-1.725-1.587-2.391 0-4.361 1.293-5.906 3.877-1.316 2.115-2.02 4.371-2.111 6.766-.049 1.176.164 2.21.633 3.104.514 1.032 1.242 1.549 2.182 1.549 2.109 0 3.914-1.244 5.416-3.735 1.267-2.068 1.945-4.23 2.038-6.484z"/></g></svg>'},n.templates.menu_list_panel=function(t){var n='<div class="vp-panel vp-panel-open vp-panel--'+t.id+'"><div class="vp-panel-title"><button type="button" class="vp-panel-button js-panelTitleButton" tabindex="0"><span class="vp-panel-button-text">'+t.title+'</span><span class="vp-panel-stat"><span class="vp-panel-stat-text js-panelStatText">'+t.active+"</span> ";n+=this.render("icon_line_arrow")||"",n+=' </span></button></div><div class="vp-panel-itemsWrap"><ul class="vp-panel-items js-panelItems"> ';for(var i=0;i<t.items.length;i++)n+=' <li class="vp-panel-item',t.items[i].active&&(n+=" vp-panel-item-on"),n+='" data-time="'+t.items[i].id+'" tabindex="0" role="menuitemradio" aria-checked="',t.items[i].active?n+="true":n+="false",n+='"> ',t.items[i].index&&(n+='<span class="vp-panel-item-index">'+t.items[i].index+"</span>"),n+=' <span class="vp-panel-item-label">'+t.items[i].label+"</span> ","chapters"===t.id&&(n+=' <span class="vp-chapters-active-indicator"></span> '),n+=" </li> ";return n+' </ul><div class="vp-indicator"></div></div></div>'},n.templates.menu=function(t){var n='<div class="vp-menu vp-menu-hidden vp-menu-invisible" role="menu" hidden><button type="button" class="vp-menu-close js-menuClose" aria-label="'+t.strings.close+'">';return(n+=this.render("icon_close_new")||"")+"</button></div>"},n.templates.nudge=function(t){var n='<div class="vp-nudge vp-nudge-backward invisible"><div class="vp-nudge-seconds"></div><div class="vp-nudge-symbol vp-nudge-backward-symbol"> ';return n+=this.render("icon_fast_forward")||"",n+=' </div></div><div class="vp-nudge vp-nudge-forward invisible"><div class="vp-nudge-seconds"></div><div class="vp-nudge-symbol vp-nudge-forward-symbol"> ',(n+=this.render("icon_fast_forward")||"")+" </div></div>"},n.templates.outer=function(t){var n='<div class="vp-video-wrapper"><div class="vp-video"><div class="vp-telecine"></div></div><div class="vp-preview"></div><div class="vp-shade vp-shade-invisible"></div><div class="vp-nudge-shade vp-nudge-shade-left vp-nudge-shade-invisible"></div><div class="vp-nudge-shade vp-nudge-shade-right vp-nudge-shade-invisible"></div><div class="vp-spin vp-spin-invisible"> ';return n+=this.render("icon_spin")||"",n+=' </div></div><div class="vp-text-alert-wrapper hidden"><div class="vp-alert-text"></div><div class="vp-alert-time"><div class="vp-live-start-time-title"></div><div class="vp-live-start-time-body"></div><div class="vp-live-start-time-footer"></div></div></div><div class="vp-target"></div><div class="vp-captions hidden with-controls" hidden aria-live="assertive"><span></span></div><div class="vp-cards-wrapper"><div class="vp-cards"></div></div><div class="vp-outro-wrapper hidden" hidden><div class="vp-outro" role="dialog" aria-live="assertive"></div></div><div class="vp-controls-wrapper"><div class="vp-badge"></div><div class="vp-title" role="contentinfo"></div><div class="vp-controls"></div><div class="vp-sidedock hidden" role="toolbar" hidden></div><div class="vp-unmute hidden" hidden></div></div><div class="vp-overlay-wrapper hidden" role="dialog" aria-live="assertive" hidden><div class="vp-overlay-bg"></div><div class="vp-overlay-cell"><div class="vp-overlay"></div><div class="vp-overlay-icon-wrapper hidden"><div class="vp-overlay-icon"></div></div><div class="vp-overlay-logo logo"></div></div><nav><button type="button" class="vp-nav-prevButton js-back cloaked" aria-label="'+t.strings.back+'">',n+=this.render("icon_prev")||"",n+='</button><button type="button" class="vp-nav-closeButton js-close" aria-label="'+t.strings.close+'">',(n+=this.render("icon_close_new")||"")+'</button></nav></div><div class="vp-notification-wrapper hidden" hidden><div class="vp-notification-cell"><div class="vp-notification" role="dialog" aria-live="assertive"></div></div></div><div class="vp-stats-debug rounded-box hidden" aria-hidden="true" hidden></div><div class="vp-nudge-wrapper hidden"></div><span id="new-window" hidden>This opens in a new window.</span>'},n.templates.sidedock=function(t){var n="";return t.vodButton&&(n+=' <div class="box" data-vod-expiring="'+t.vodPurchaseInfo.expiring+'" data-vod-purchased="'+t.purchased+'"><button type="button" class="vod-button rounded-box',t.purchased&&(n+=" on"),t.vodPurchaseInfo.expiring&&(n+=" expiring"),n+='" data-product-id="'+t.vodPurchaseInfo.product_id+'"><div class="vod-button-inner"><span class="vod-label">'+t.vodDisplayLabel+"</span> ",n+=this.render("icon_vod")||"",n+=' </div></button></div><div class="sidedock-inner">'),t.likeButton&&(n+=' <div class="box"><label class="rounded-box hidden like-label" role="presentation"><span>'+(t.liked?t.strings.unlike:t.strings.like)+'</span></label><button type="button" class="like-button rounded-box',t.liked&&(n+=" on"),n+='" aria-label="',t.loggedIn?n+=""+(t.liked?t.strings.unlike:t.strings.like):n+=""+t.strings.likeLoggedOut,n+='" data-label-add="'+t.strings.like+'" data-label-add-logged-out="'+t.strings.likeLoggedOut+'" data-label-remove="'+t.strings.unlike+'"> ',n+=this.render("icon_heart")||"",n+=" </button></div>"),t.watchLaterButton&&(n+=' <div class="box"><label class="rounded-box hidden watch-later-label" role="presentation"><span>'+(t.addedToWatchLater?t.strings.watchLaterRemove:t.strings.watchLaterAdd)+'</span></label><button type="button" class="watch-later-button rounded-box',t.addedToWatchLater&&(n+=" on"),n+='" aria-label="',t.loggedIn?n+=""+(t.addedToWatchLater?t.strings.watchLaterRemove:t.strings.watchLaterAdd):n+=""+t.strings.watchLaterAddLoggedOut,n+='" data-label-add="'+t.strings.watchLaterAdd+'" data-label-add-logged-out="'+t.strings.watchLaterAddLoggedOut+'" data-label-remove="'+t.strings.watchLaterRemove+'"> ',n+=this.render("icon_clock")||"",n+=" </button></div>"),t.collectionsButton&&(n+=' <div class="box"><label class="rounded-box hidden collections-label" role="presentation"><span>'+t.strings.collections+'</span></label><button type="button" class="collections-button rounded-box" aria-label="'+t.strings.collections+'"> ',n+=this.render("icon_collections")||"",n+=" </button></div>"),t.shareButton&&(n+=' <div class="box"><label class="rounded-box hidden share-label" role="presentation"><span>'+t.strings.share+'</span></label><button type="button" class="share-button rounded-box" aria-label="'+t.strings.share+'"> ',n+=this.render("icon_share")||"",n+=" </button></div>"),t.vodButton&&(n+=" </div>"),n+""},n.templates.app_redirect=function(t){var n='<div class="vp-overlay-content"> ';return t.strings.title&&(n+=' <div class="app-redirect-title">'+t.strings.title+"</div> "),t.hideRedirectButton||(n+=' <div class="'+(t.strings.title?"":"app-redirect--topspace")+'"><a class="app-redirect-button" href="'+t.redirectUrl+'" role="button"',t.newWindow&&(n+=' data-new-window="1" target="_blank" rel="noopener"'),n+=' aria-describedby="new-window">'+t.strings.buttonText+"</a></div> "),t.strings.ignoreText&&(n+=' <div class="app-redirect-ignore">'+t.strings.ignoreText+"</div> "),t.strings.bottomText&&(n+=' <div class="app-redirect-bottom-text">'+t.strings.bottomText+"</div> "),n+"</div>"},n.templates.email_capture=function(t){var n='<div class="vp-email-capture-wrapper"><div class="vp-email-capture"> ';return t.customLogo&&(n+=' <div class="vp-email-capture-logoWrap"><img src="',n+=this.escape(t.customLogo)||"",n+='" alt="" class="vp-email-capture-logo"></div> '),n+=' <h1 class="vp-email-capture-title">',n+=this.escape(t.text)||"",n+="</h1> ",t.subtitle&&(n+=' <p class="vp-email-capture-subtitle">',n+=this.escape(t.subtitle)||"",n+="</p> "),n+=' <form class="vp-email-capture-form" action="'+t.action+'" method="post" novalidate><div class="vp-validation-bubble hidden"><div class="vp-validation-bubble-arrowClipper"><div class="vp-validation-bubble-arrow"></div></div><div class="vp-validation-bubble-message"></div></div><input class="vp-email-capture-form-input vp-email-capture-form-input--email js-email-capture-form-input" type="email" name="email" placeholder="'+t.strings.email+'" aria-label="'+t.strings.email+'" required aria-required="true"><input class="vp-email-capture-form-input" type="text" name="name" placeholder="'+t.strings.fullName+'" aria-label="'+t.strings.fullName+'" pattern="^[^!@#$%^*+=?<>]+$" maxlength="180"><input type="hidden" name="referrer" value="'+t.referrer+'"><input type="hidden" name="signature" value=""><input type="hidden" name="time" value=""><input type="hidden" name="expires" value=""><div class="vp-email-capture-form-buttons"> ',t.allowSkip&&(n+=' <input class="vp-email-capture-form-button vp-email-capture-form-button--cancel" type="button" value="'+t.strings.nothanks+'"> '),n+=' <input class="vp-email-capture-form-button vp-email-capture-form-button--submit" type="submit" value="'+t.strings.submit+'"></div></form><div class="vp-email-capture-disclaimer"> '+t.strings.disclaimer+' </div></div><div class="vp-email-capture-confirm vp-email-capture-confirm-hidden"><div class="vp-email-capture-confirm-box"><h1 class="vp-email-capture-confirm-title">',(n+=this.escape(t.confirmation)||"")+"</h1></div></div></div>"},n.templates.error=function(t){var n='<div class="vp-overlay-content error"> ';return t.title&&(n+=" <h1>"+t.title+"</h1> "),t.message&&(n+=" <p>"+t.message+"</p> "),n+"</div>"},n.templates.help=function(t){var n='<div class="vp-overlay-content help"><h1>'+t.strings.title+'</h1><dl><div class="volume-up secondary"><dt class="arrow">↑</dt><dd>'+t.strings.volumeUp+'</dd></div><div class="volume-down secondary"><dt class="arrow">↓</dt><dd>'+t.strings.volumeDown+'</dd></div><div class="scrub-forward secondary"><dt class="arrow">→</dt><dd>'+t.strings.scrubForward+'</dd></div><div class="scrub-backwards secondary"><dt class="arrow">←</dt><dd>'+t.strings.scrubBackwards+'</dd></div><div class="like"><dt>L</dt><dd>'+t.strings.like+'</dd></div><div class="share"><dt>S</dt><dd>'+t.strings.share+'</dd></div><div class="watch-later"><dt>W</dt><dd>'+t.strings.watchLater+'</dd></div><div class="toggle-captions"><dt>C</dt><dd>'+t.strings.captions+'</dd></div><div class="toggle-prefs"><dt>H</dt><dd>'+t.strings.prefs+'</dd></div><div class="fullscreen"><dt>F</dt><dd>'+t.strings.fullscreen+"</dd></div> ";return t.onSite||(n+='<div class="view-on-vimeo"><dt>V</dt><dd>'+t.strings.viewOnVimeo+"</dd></div>"),n+" </dl></div>"},n.templates.outro_email=function(t){var n='<div class="vp-outro-bg"';return t.bgimage&&(n+=' style="background-image: url('+t.bgimage+');"'),n+'></div><div class="vp-outro-content vp-outro-content--email vp-outro-shade js-outro-content"></div>'},n.templates.outro_image=function(t){var n='<div class="vp-outro-content vp-outro-content--image js-outro-content"> ';return t.url&&(n+='<a class="vp-outro-imageLink js-imageLink" href="'+t.url+'" target="_blank" rel="noopener" aria-describedby="new-window">'),t.bgimage&&(n+='<div class="vp-outro-image" style="background-image: url('+t.bgimage+');"',t.alt_text&&(n+=' aria-label="',n+=this.escape(t.alt_text)||"",n+='" role="img"'),n+="></div>"),t.url&&(n+="</a>"),n+"</div>"},n.templates.outro_link=function(t){var n='<div class="vp-outro-bg"';return t.bgimage&&(n+=' style="background-image: url('+t.bgimage+');"'),n+='></div><div class="vp-outro-content vp-outro-content--link vp-outro-shade js-outro-content"><div class="vp-outro-linkWrapper js-outro-linkWrapper"> ',t.title&&(n+='<h1 class="vp-outro-textTitle js-outro-title">',n+=this.escape(t.title)||"",n+="</h1>"),t.description&&(n+='<p class="vp-outro-textDescription js-outro-text">',n+=this.escape(t.description)||"",n+="</p>"),t.text&&t.url&&(n+=' <div class="vp-outro-buttonWrap"><a class="vp-outro-button js-cta" href="'+t.url+'" target="_blank" rel="noopener" aria-describedby="new-window"><span>',n+=this.escape(t.text)||"",n+="</span></a></div> "),t.text2&&t.url2&&(n+=' <div class="vp-outro-linkWrap js-outro-linkWrap"><a class="vp-outro-link js-link" href="'+t.url2+'" target="_blank" rel="noopener" aria-describedby="new-window">',n+=this.escape(t.text2)||"",n+="</a></div> "),n+" </div></div>"},n.templates.outro_nothing=function(t){return'<div class="vp-outro-bg"></div><div class="vp-outro-content vp-outro-content--nothing vp-outro-shade js-outro-content"></div>'},n.templates.outro_share=function(t){var n='<div class="vp-outro-bg"';return t.bgimage&&(n+=' style="background-image: url('+t.bgimage+');"'),n+='></div><div class="vp-outro-content vp-outro-content--share vp-outro-shade js-outro-content"></div><nav class="panel-nav"><button type="button" class="vp-nav-prevButton js-back cloaked" aria-label="'+t.strings.back+'">',(n+=this.render("icon_prev")||"")+"</button></nav>"},n.templates.outro_staticimage=function(t){var n='<div class="vp-outro-content vp-outro-content--staticImage js-outro-content"><div class="vp-outro-staticImageWrapper"> ';return t.url&&(n+='<a class="vp-outro-staticImageLink" href="'+t.url+'" target="_blank" rel="noopener" aria-describedby="new-window">'),n+=' <img class="vp-outro-staticImage" src="'+t.svg_url+'"> ',t.url&&(n+="</a>"),n+" </div></div>"},n.templates.outro_text=function(t){return'<div class="vp-outro-content vp-outro-content--text vp-outro-shade js-outro-content"><div class="vp-outro-textWrapper"><div class="vp-outro-text">'+t.text+"</div></div></div>"},n.templates.outro_videos=function(t){var n='<div class="vp-outro-bg"';t.bgimage&&(n+=' style="background-image: url('+t.bgimage+');"'),n+='></div><div class="vp-outro-content vp-outro-content--videos vp-outro-shade js-outro-content"> ';var i=0;for(t.contexts.length;i<t.length;i++){var e=t.contexts[i];n+=' <div class="vp-outro-videosSection vp-outro-videosSection--'+e.videos.length,e.promoted&&(n+=" vp-outro-videosSection--promoted"),n+='"><div class="vp-outro-videosHeaderWrapper"><header class="vp-outro-videosHeader"><h1 class="vp-outro-videosTitle">'+e.context+"</h1> ",t.showFollowButton&&!e.promoted&&(n+=' <div class="vp-outro-followWrap js-outro-followWrap"><button type="button" class="vp-outro-follow js-outro-follow" aria-label="'+t.strings.follow+'" aria-pressed="',t.following?n+="true":n+="false",n+='"> ',n+=this.render("icon_follow")||"",n+=' <span class="vp-outro-follow-text" data-label-follow="'+t.strings.follow+'" data-label-following="'+t.strings.following+'" data-label-unfollow="'+t.strings.unfollow+'"></span></button></div> '),n+=' </header></div><ul class="vp-outro-videos vp-outro-videos--'+e.videos.length+'"> ';var r=0;for(e.videos.length;r<t.videosLength;r++)n+=' <li><a class="vp-outro-videoLink js-videoLink',1==i&&(n+=" hovered"),n+='" href="'+e.videos[r].url+'" ',t.target&&(n+=' target="_blank" rel="noopener" '),n+=' data-video-id="'+e.videos[r].id+'" aria-describedby="new-window" ><div class="vp-outro-imgWrapper" style="background-image: url('+e.videos[r].thumbnail+')"></div><header class="vp-outro-videoHeader" id="vp-outro-videoHeader"><h1 class="vp-outro-videoTitle">',n+=this.escape(e.videos[r].title)||"",n+="</h1> ",e.videos[r].byline&&(n+=' <h2 class="vp-outro-videoByline">',n+=this.escape(e.videos[r].byline)||"",n+="</h2> "),n+=" </header></a> ";n+=" </ul></div> "}return n+"</div>"},n.templates.outro_vod=function(t){var n='<div class="vp-outro-content vp-outro-content--vod vp-outro-shade js-outro-content"><div class="vp-outro-vodWrapper"><h1 class="vp-outro-vodHeader" aria-describedby="new-window"><a href="'+t.url+'" target="_blank" rel="noopener">';n+=this.escape(t.title)||"",n+="</a></h1> ";var i=t.countries,e=t.country;if(this.helpers.isAvailableInCountry(i,e))if(t.purchased)n+=' <a class="vp-outro-vodButton vp-outro-vodButton--watch js-vod-watch" role="button" href="'+t.url+'" target="_blank" rel="noopener" aria-describedby="new-window">'+t.strings.watch+"</a> ";else{if(!t.isComingSoon){n+=' <ul class="vp-outro-vod"> ';var r=0;for(t.buttons.length;r<t.length;r++){n+=' <li class="vp-outro-vod-item"><a class="vp-outro-vodButton vp-outro-vodButton--'+t.buttons[r].type+' js-vod-button" role="button" href="'+t.url+"#buy="+t.buttons[r].product_id+'" target="_blank" rel="noopener" data-product-id="'+t.buttons[r].product_id+'" aria-describedby="new-window" ><div class="vp-outro-vodIcon"> ',"buy"===t.buttons[r].type?n+=this.render("icon_vod_download")||"":"rent"===t.buttons[r].type?n+=this.render("icon_vod_rent")||"":"subscribe"===t.buttons[r].type?n+=this.render("icon_vod_subscribe")||"":n+=this.render("icon_vod")||"",n+=" </div> ";var o=t.currency,u=t.buttons[r];n+=" <p>"+this.helpers.formatVodLabel(t.translationMap,"outro_string",o,u)+"</p></a></li> "}n+=" </ul> "}(t.isPreorder||t.isComingSoon)&&(n+=" <p>"+t.strings.preRelease+"</p> ")}return n+" </div></div>"},n.templates.password=function(t){return'<div class="vp-overlay-content password form"><h1 class="header">'+t.strings.title+'</h1><p class="subtitle">'+t.strings.subtitle+'</p><form action="'+t.action+'" method="post" novalidate><div class="vp-validation-bubble hidden"><div class="vp-validation-bubble-arrow-clipper"><div class="vp-validation-bubble-arrow"></div></div><div class="vp-validation-bubble-message"></div></div><input class="js-password" type="password" name="password" placeholder="'+t.strings.password+'" required aria-required="true" aria-label="'+t.strings.password+'"><input type="submit" value="'+t.strings.watch+'"></form></div>'},n.templates.private_locked=function(t){return'<div class="vp-overlay-content login"><h1>'+t.strings.title+'</h1><p class="subtitle">'+t.strings.subtitle+'</p><a href="'+t.action+'" class="popup js-login" target="_blank" rel="noopener" role="button" aria-describedby="new-window">'+t.strings.logIn+"</a></div>"},n.templates.private_unlocked=function(t){return'<div class="vp-overlay-content form unlocked"><h1>'+t.strings.title+'</h1><p class="subtitle">'+t.strings.subtitle+'</p><button class="js-watch" type="button">'+t.strings.watch+"</button></div>"},n.templates.share=function(t){var n='<div class="vp-share-wrapper js-share"><section class="vp-share-screen vp-share-screen--share'+(t.embedOnly?" cloaked":"")+' js-share-screen"><h1 class="vp-share-title vp-share-title--share">'+t.strings.share+'</h1><ul class="vp-share-buttons"><li class="vp-share-buttons-item"><a class="vp-share-button vp-share-button--facebook js-facebook" href="'+t.playerShareUrl+'/facebook" target="_blank" rel="noopener" role="button" aria-describedby="new-window" > '+t.facebookIcon+' </a><li class="vp-share-buttons-item"><a class="vp-share-button vp-share-button--twitter js-twitter" href="'+t.playerShareUrl+'/twitter" target="_blank" rel="noopener" role="button" aria-describedby="new-window" > '+t.twitterIcon+' </a><li class="vp-share-buttons-item"><a class="vp-share-button vp-share-button--tumblr js-tumblr" href="'+t.playerShareUrl+'/tumblr" target="_blank" rel="noopener" role="button" aria-describedby="new-window" > '+t.tumblrIcon+" </a> ";return t.url&&(n+=' <li class="vp-share-buttons-item"><a class="vp-share-button vp-share-button--email js-email" href="mailto:?subject=',n+=encodeURIComponent(t.strings.emailSubject)||"",n+="&amp;body=",n+=encodeURIComponent(t.strings.emailBody)||"",n+='" role="button" aria-describedby="new-window" > '+t.emailIcon+" </a> "),n+=" </ul> ",t.embed&&(n+=' <ul class="vp-share-buttons"><li class="vp-share-buttons-item"><a class="vp-share-button vp-share-button--embed js-embed" href="'+t.url+'#share" target="_blank" rel="noopener" role="button" > '+t.embedIcon+" </a></li></ul> "),t.url&&(n+=' <p class="vp-share-footnote vp-share-footnote--share"><a class="clip_url" href="'+t.shareUrl+'" target="_blank" rel="noopener" aria-describedby="new-window">'+t.shareUrl+"</a></p> "),n+=" </section> ",t.embed&&(n+=' <section class="vp-share-screen vp-share-screen--embed'+(t.embedOnly?"":" cloaked")+' js-embed-screen"><div class="vp-share-embedWrapper"><h1 class="vp-share-title vp-share-title--embed">'+t.strings.embedTitle+'</h1><p class="vp-share-subtitle vp-share-subtitle--embed">'+t.strings.embedSubtitle+'</p><div class="vp-share-embedCode form"><div><input class="vp-share-embedInput js-embed-input" type="text" name="embed_code" title="Embed code" value="'+t.embedCode+'" spellcheck="false" aria-readonly="true"',t.readOnly&&(n+=" readonly"),n+="></div> ",t.copyButton&&(n+=' <button type="button" class="vp-share-embedCopy js-embedCopy" data-clipboard-text=\''+t.embedCode+"' data-label=\""+t.strings.copy+'" data-success-label="'+t.strings.copySuccess+'">'+t.strings.copy+"</button> "),n+=" </div> ",t.customizeEmbed&&(n+=' <p class="vp-share-footnote vp-share-footnote--embed">'+t.strings.customize+"</p> "),n+=" </div></section> "),n+"</div>"},n.templates.threesixty_reminder=function(t){var n='<div class="intro-wrap text-only"><div> ';return t.showArrows&&(n+=' <div class="key-wrapper"><div class="key-row"><div class="key"><div class="arrow arrow-top"></div></div></div><div class="key-row"><div class="key"><div class="arrow arrow-left"></div></div><div class="key"><div class="arrow arrow-down"></div></div><div class="key"><div class="arrow arrow-right"></div></div></div></div> '),n+" <div>"+t.text+"</div></div></div>"},n.templates.time_series_graph=function(t){return'<svg width="'+t.width+'" height="'+t.height+'" viewBox="0 0 '+t.width+" "+t.height+'"><g><polyline stroke="white" fill="none" points="'+t.points+'"></polyline></g><g> '+t.markers+" </g></svg>"},n.templates.title_byline_badge=function(t){var n="";return t.displayBadge&&(n+="&nbsp;",t.link&&(n+='<a tabindex="-1" href="'+t.link+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener" aria-describedby="new-window"'),n+=">"),n+=' <span class="byline-badge '+t.cssClass+'">'+t.cssClass+"</span>",t.link&&(n+="</a>"),n+=""),n+""},n.templates.title_owner_byline=function(t){var n="";return t.linkToOwner?(n+='<a href="'+t.ownerLink+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=' data-track-click="'+t.ClickTargets.VIDEO_BYLINE+'" aria-describedby="new-window">',n+=this.escape(t.owner)||"",n+="</a>"):(n+='<span class="user">',n+=this.escape(t.owner)||"",n+="</span>"),n+""},n.templates.title=function(t){var n='<header class="vp-title-header"> ';return t.showPortrait&&(n+=' <div class="vp-portrait" aria-hidden="true"> ',t.linkToOwner&&(n+='<a tabindex="-1" href="'+t.ownerLink+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=">"),n+=' <img src="'+t.portraitImg+'" alt="'+t.portraitAlt+'" width="60" height="60" data-track-click="'+t.ClickTargets.VIDEO_PORTRAIT+'"> ',t.linkToOwner&&(n+="</a>"),n+=" </div> "),n+=' <div class="headers"> ',t.showTitle&&(n+=' <h1 aria-describedby="new-window"> ',t.showTitleLink&&(n+='<a href="'+t.titleLink+'"',t.targetBlank&&(n+=' target="_blank" rel="noopener"'),n+=' data-track-click="'+t.ClickTargets.VIDEO_TITLE+'">'),n+=this.escape(t.title)||"",t.showTitleLink&&(n+="</a>"),t.is360&&(n+='<div class="threesix-badge-title">360</div>'),t.hasHDR&&(n+='<div class="hashdr-badge-title">HDR</div>'),n+=" </h1> "),t.showByline&&(n+=' <div class="sub-title"><h2 class="byline-from">'+t.strings.byline+"</h2> ",t.is360&&!t.showTitle&&(n+=' <div class="threesix-badge-byline">360</div> '),t.hasHDR&&!t.showTitle&&(n+=' <div class="hashdr-badge-byline">HDR</div> '),n+=" </div> "),!t.is360||t.showByline||t.showTitle||(n+=' <div class="threesix-badge-loner">360</div> '),!t.hasHDR||t.showByline||t.showTitle||(n+=' <div class="hashdr-badge-loner">HDR</div> '),n+" </div></header>"},n.templates.unmute_button=function(t){var n='<button type="button" class="vp-unmute-button"> ';return(n+=this.render("icon_muted")||"")+' <span class="vp-unmute-button-title">'+t.title+"</span></button>"},t.exports?t.exports=n:window.Aftershave=n}()}));function hd(t,n){var i,e=t.querySelector(".vp-shade"),r=t.querySelector(".vp-spin");function o(){clearTimeout(i),e.classList.add("vp-shade-invisible"),r.classList.add("vp-spin-invisible")}return n.on(yi.BUFFER_STARTED,(function(){clearTimeout(i),i=setTimeout((function(){e.classList.remove("vp-shade-invisible"),r.classList.remove("vp-spin-invisible")}),600)})),n.on([yi.BUFFER_ENDED,Pc.He],o),kl.on(gl.buffering,(function(){r.classList.remove("vp-spin-invisible")})),kl.on([gl.playing,gl.paused],(function(){clearTimeout(i),r.classList.add("vp-spin-invisible")})),kl.on(gl.connected,(function(){e.classList.remove("vp-shade-invisible")})),kl.on(gl.disconnected,(function(){o()})),{}}var vd=function(t){return function(n){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return e.forEach((function(i){for(var e in i){var r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,Object.assign(r,t))}})),n}}({enumerable:!0,configurable:!0,writeable:!1});function pd(){return void 0!==window.performance&&"function"==typeof window.performance.now?window.performance.now():Date.now()}function md(t){return wd()-t}function wd(){return parseInt(pd()/1e3,10)}function bd(t){return parseInt(Date.now()/1e3,10)-t}function gd(t){var n=t.getHours(),i=t.getMinutes(),e=n>=12?"PM":"AM";return(n=(n%=12)||12)+":"+(i=i<10?"0"+i:i)+" "+e}function yd(t,n){var i=Math.floor(t/3600%60),e=Math.floor(t/60%60);if(t=Math.floor(t%60),n){var r=t+" second"+(1===t?"":"s");return e>0&&(r=e+" minute"+(1===e?"":"s")+", "+r),i>0&&(r=i+" hour"+(1===i?"":"s")+", "+r),r}return(i>0?i+":":"")+_d(e,2)+":"+_d(t,2)}function _d(t,n,i){return t=String(t),new Array(n-t.length+1).join(i||"0")+t}function kd(t,n,i){var e=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return It(i)&&(e="leading"in i?!!i.leading:e,r="trailing"in i?!!i.trailing:r),dl(t,n,{leading:e,maxWait:n,trailing:r})}var Ed=function(){if(void 0!==L)return L;function t(t,n){var i=-1;return t.some((function(t,e){return t[0]===n&&(i=e,!0)})),i}return(function(){function n(){this.kf=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.kf.length},enumerable:!0,configurable:!0}),n.prototype.get=function(n){var i=t(this.kf,n),e=this.kf[i];return e&&e[1]},n.prototype.set=function(n,i){var e=t(this.kf,n);~e?this.kf[e][1]=i:this.kf.push([n,i])},n.prototype.delete=function(n){var i=this.kf,e=t(i,n);~e&&i.splice(e,1)},n.prototype.has=function(n){return!!~t(this.kf,n)},n.prototype.clear=function(){this.kf.splice(0)},n.prototype.forEach=function(t,n){void 0===n&&(n=null);for(var i=0,e=this.kf;i<e.length;i++){var r=e[i];t.call(n,r[1],r[0])}},n}())}(),Td="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,xd="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Sd="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(xd):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Ad=["top","right","bottom","left","width","height","size","weight"],Md="undefined"!=typeof MutationObserver,Rd=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,n){var i=!1,e=!1,r=0;function o(){i&&(i=!1,t()),e&&a()}function u(){Sd(o)}function a(){var t=Date.now();if(i){if(t-r<2)return;e=!0}else i=!0,e=!1,setTimeout(u,20);r=t}return a}(this.refresh.bind(this))}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var n=this.observers_,i=n.indexOf(t);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Td&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Md?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Td&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=void 0===n?"":n;Ad.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Cd=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];Object.defineProperty(t,r,{value:n[r],enumerable:!1,writable:!1,configurable:!0})}return t},Od=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||xd},Id=Pd(0,0,0,0);function jd(t){return parseFloat(t)||0}function Dd(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.reduce((function(n,i){return n+jd(t["border-"+i+"-width"])}),0)}var Ld="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Od(t).SVGGraphicsElement}:function(t){return t instanceof Od(t).SVGElement&&"function"==typeof t.getBBox};function Nd(t){return Td?Ld(t)?function(t){var n=t.getBBox();return Pd(0,0,n.width,n.height)}(t):function(t){var n=t.clientWidth,i=t.clientHeight;if(!n&&!i)return Id;var e=Od(t).getComputedStyle(t),r=function(t){for(var n={},i=0,e=["top","right","bottom","left"];i<e.length;i++){var r=e[i],o=t["padding-"+r];n[r]=jd(o)}return n}(e),o=r.left+r.right,u=r.top+r.bottom,a=jd(e.width),s=jd(e.height);if("border-box"===e.boxSizing&&(Math.round(a+o)!==n&&(a-=Dd(e,"left","right")+o),Math.round(s+u)!==i&&(s-=Dd(e,"top","bottom")+u)),!function(t){return t===Od(t).document.documentElement}(t)){var c=Math.round(a+o)-n,l=Math.round(s+u)-i;1!==Math.abs(c)&&(a-=c),1!==Math.abs(l)&&(s-=l)}return Pd(r.left,r.top,a,s)}(t):Id}function Pd(t,n,i,e){return{x:t,y:n,width:i,height:e}}var Fd=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Pd(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Nd(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Vd=function(t,n){var i=function(t){var n=t.x,i=t.y,e=t.width,r=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(o.prototype);return Cd(u,{x:n,y:i,width:e,height:r,top:i,right:n+e,bottom:r+i,left:n}),u}(n);Cd(this,{target:t,contentRect:i})},Ud=function(){function t(t,n,i){if(this.activeObservations_=[],this.observations_=new Ed,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Od(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Fd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Od(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(n){n.isActive()&&t.activeObservations_.push(n)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map((function(t){return new Vd(t.target,t.broadcastRect())}));this.callback_.call(t,n,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Bd=void 0!==N?new N:new Ed,Hd=function t(n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Rd.getInstance(),e=new Ud(n,i,this);Bd.set(this,e)};["observe","unobserve","disconnect"].forEach((function(t){Hd.prototype[t]=function(){var n;return(n=Bd.get(this))[t].apply(n,arguments)}}));var zd=void 0!==xd.ResizeObserver?xd.ResizeObserver:Hd;function qd(t,n,i){var e=u()?i.parentElement:i,r=kd(o,150);function o(){var t=ec(e),i=t.width,r=t.height;n.dispatch(function(t,n){return{type:"CONTAINER_RESIZE",payload:{width:t,height:n}}}(i,r))}function u(){return i.parentElement===document.body}function a(t){var n=t.size,r=t.ratio,o=t.bottom;u()&&(e.classList.toggle("vp-center","contain"===n),function(t,n){[].concat(["height","max-width","max-height","bottom"]).map((function(n){return t.style.removeProperty(n)}))}(i),"contain"!==n?o>0&&mc(i,{height:"calc(100% - ".concat(o,"px)"),bottom:"".concat(o/2,"px")}):mc(i,o>0?{maxWidth:"calc((100vh - ".concat(o,"px) / ").concat(r,")"),maxHeight:"calc(100vh - ".concat(o,"px)"),height:"calc(".concat(r," * 100vw)"),bottom:"".concat(o/2,"px")}:{maxWidth:"calc(100vh / ".concat(r,")"),height:"calc(".concat(r," * 100vw)")}))}n.watch("ui.layout.bottom",(function(n){t.events.fire(Pc._l,[{bottom:n}])})),n.watch("ui.layout.settings",a),a(n.get("ui.layout.settings")),new zd(r).observe(e),window.addEventListener("orientationchange",r),t.events.on(Pc.cc,r),t.events.on(Pc.fc,r),o()}function Wd(t,n,i){this.constructorName="MessageApiError",this.message=t,this.name=n,this.source=i}function Gd(t){return t}function $d(t){if(!t||""===t)return{};if("object"===U(t))return t;try{return JSON.parse(t)}catch(t){return{}}}function Kd(t){}Wd.prototype=new Error;var Yd={captureException:function(t){},captureMessage:function(t){},captureBreadcrumb:function(){}},Jd=Yd,Xd=function(t){Jd=Object.assign({},Yd,t)},Zd=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"backbone",e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"info";return Jd.captureBreadcrumb(t,n,i,e)};function Qd(t){var n=function(t){var n=document.referrer||t;try{n=decodeURIComponent(n)}catch(t){n=unescape(n)}return n}(t),i={},e={},o={parseMessage:$d,buildMessage:Gd,logError:Kd},u={},a={get methods(){return i},extendMethods:function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];ot.apply(void 0,[i].concat(n))},get listeners(){return u},set listeners(t){u=t},emit:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];if(s.apply(void 0,[t].concat(i))){var r={event:t};i&&i[0]&&(r.data=i[0]),c(r)}},filter:function(t,n){n||"function"!=typeof t||(n=t,t=null),t?function(t,n){e.event=e.event||{},e.event[t]=e.event[t]||[],e.event[t].push(n)}(t,n):function(t){e.global=e.global||[],e.global.push(t)}(n)},hooks:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return ot.apply(void 0,[o].concat(n))}};function s(){if(e){for(var t,n,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];if(e.global&&e.global.length)for(t=0;t<e.global.length;t++)if(!(n=e.global[t]).apply(n,r))return!1;var u=r[0];if(e.event&&e.event[u]&&e.event[u].length)for(t=0;t<e.event[u].length;t++)if(!(n=e.event[u][t]).apply(n,r))return!1}return!0}function c(t){if(window.postMessage&&window.parent.postMessage&&(t=o.buildMessage(t),window.parent!=window))try{var i=n&&"null"!==n?n:"*";window.parent.postMessage(t,i)}catch(t){}}return window.addEventListener("message",(function(t){if(t.source===window.parent){var n=o.parseMessage(t.data),e=n.method,u=n.value;if(!(void 0===e||"string"!=typeof e||e.indexOf("_")>-1))try{var a=function(t,n){if(!t)return null;var i=Object.getOwnPropertyDescriptor(n,t);if(i&&"function"==typeof i.value)return i.value;if(i&&"function"==typeof i.get)return i.get;var e=t.substr(0,3),r=t.substr(3,1).toLowerCase()+t.substr(4);return i=Object.getOwnPropertyDescriptor(n,r),"get"===e&&i&&"function"==typeof i.get?i.get:"set"===e&&i&&"function"==typeof i.set?i.set:null}(e,i);if(!a)throw new Wd("“".concat(t,"” is not a valid method. Valid methods are: ").concat(function(t){return Object.keys(t).reduce((function(n,i){var e=Object.getOwnPropertyDescriptor(t,i);return"function"==typeof e.value?(n.push(i),n):("function"==typeof e.get&&n.push("get"+i.charAt(0).toUpperCase()+i.slice(1)),"function"==typeof e.set&&n.push("set"+i.charAt(0).toUpperCase()+i.slice(1)),n)}),[]).sort()}(i).join(", "),"."),"TypeError",e);Zd("API message received",n,"api"),r.resolve(a.call(t,u)).then((function(t){return c({method:e,value:null==t?u:t})})).catch(o.logError)}catch(t){o.logError(t)}}}),!1),a}var th=self!==top,nh=function(){var t=document.createElement("video"),n={request:["requestFullscreen","webkitRequestFullscreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"],exit:["exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],enabled:["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],element:["fullscreenElement","webkitFullscreenElement","webkitCurrentFullScreenElement","mozFullScreenElement","msFullscreenElement"],change:["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],error:["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"]},i={};for(var e in n)for(var r=0,o=n[e].length;r<o;r++)if(n[e][r]in t||n[e][r]in document||"on"+n[e][r].toLowerCase()in document){i[e]=n[e][r];break}return i}(),ih={ENTER:"enter",EXIT:"exit",CHANGE:"change",ERROR:"error"},eh=[],rh={};function oh(){var t=Array.prototype.slice.apply(arguments),n=t.shift();rh[n].forEach((function(n){"function"==typeof n&&n.apply(n,t)}))}function uh(t){return function(n,i){-1!==eh.indexOf(n)&&t.call(this,n,i)}}function ah(t){var n=null;if("VIDEO"===t.tagName)n=t;else{var i=t.getElementsByTagName("video");i[0]&&(n=i[0])}return n}Object.keys(ih).forEach((function(t){eh.push(ih[t]),rh[ih[t]]=[]}));var sh=null,ch=function(){},lh=[];function fh(t){var n=ah(t);if(n&&n.webkitEnterFullscreen){try{n.readyState<n.HAVE_METADATA?(n.addEventListener("loadedmetadata",(function i(){n.removeEventListener("loadedmetadata",i,!1);try{n.webkitEnterFullscreen()}catch(n){return vh("cannot_enter_fullscreen",t)}}),!1),n.load()):n.webkitEnterFullscreen(),sh=n}catch(n){return vh("not_supported",t)}return!0}return vh(void 0===nh.request?"not_supported":"not_enabled",t)}var dh=function(t){var n=lh[lh.length-1];n&&(t!==n.element&&t!==sh||!n.hasEntered)&&("VIDEO"===t.tagName&&(sh=t),1===lh.length&&ph.onenter(ph.element),n.enter.call(n.element,t||n.element),n.hasEntered=!0,oh(ih.ENTER,ph.element))},hh=function(){sh=null;var t=lh.pop();t&&(t.exit.call(t.element),oh(ih.EXIT,t.element),ph.element||(lh.forEach((function(t){t.exit.call(t.element),oh(ih.EXIT,t.element)})),lh=[],ph.onexit()))},vh=function(t,n){if(lh.length>0){var i=lh.pop();n=n||i.element,i.error.call(n,t),ph.onerror(n,t),oh(ih.ERROR,n,t)}},ph={request:function(t,n,i,e){if(t=t||document.body,lh.push({element:t,enter:n||ch,exit:i||ch,error:e||ch}),void 0===nh.request)return fh(t);if(th&&!1===document[nh.enabled])return fh(t);try{t[nh.request]()}catch(n){vh("not_enabled",t)}},exit:function(){!document[nh.exit]&&ph.element?ph.element[nh.exit]():document[nh.exit]()},toggle:function(t,n,i,e){ph.element?ph.exit():ph.request(t,n,i,e)},videoEnabled:function(t){if(ph.enabled)return!0;var n=ah(t=t||document.body);return!(!n||void 0===n.webkitSupportsFullscreen)&&(n.readyState<n.HAVE_METADATA?"maybe":n.webkitSupportsFullscreen)},on:uh((function(t,n){rh[t].push(n)})),off:uh((function(t,n){var i=rh[t].indexOf(n);i>-1&&rh[t].splice(i,1)})),onenter:ch,onexit:ch,onchange:ch,onerror:ch};try{Object.defineProperties(ph,{element:{enumerable:!0,get:function(){return sh&&sh.webkitDisplayingFullscreen?sh:document[nh.element]||null}},enabled:{enumerable:!0,get:function(){return document[nh.enabled]||!1}}})}catch(t){ph.element=null,ph.enabled=!1}function mh(t){return"string"==typeof(t=t.replace("#",""))&&(3===t.length||6===t.length)&&!isNaN(parseInt(t,16))}function wh(t){var n=/rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*([\d.]+))?\)/.exec(t);if(!n)throw new Error("Invalid rgb value");return{red:parseInt(n[1],10),green:parseInt(n[2],10),blue:parseInt(n[3],10),alpha:parseFloat(n[5])||1}}function bh(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(1===n.length&&n[0]instanceof bh){var e=n[0];return this.red=e.red,this.green=e.green,this.blue=e.blue,this.alpha=e.alpha,this.hue=e.hue,this.saturation=e.saturation,this.lightness=e.lightness,this}if(1===n.length){if("string"==typeof n[0]&&n[0].indexOf("rgb")>=0)return this.rgba=wh(n[0]),this;if(!mh("".concat(n[0])))throw new Error("Invalid hex value");return this.hex=n[0],this}if(3===n.length||4===n.length){for(var r=0;r<3;r++)if(isNaN(parseInt(n[r],10))||parseInt(n[r],10)<0||parseInt(n[r],10)>255)throw new Error("Invalid rgb value");if(n[3]&&parseFloat(n[3])<0||parseFloat(n[3])>1)throw new Error("Invalid alpha value");return this.rgba={red:n[0],green:n[1],blue:n[2],alpha:parseFloat(n[3])||1},this}throw new Error("Invalid color")}function gh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||"null"===t||0===n.length)return{track:null};var i=t.split("."),e=Q(i,2),r=e[0],o=e[1],u=r.split(/[-_]/),a=Q(u,1),s=a[0],c=r!==s,l=n.filter((function(t){return c&&t.language===r||t.language===s})).sort((function(t,n){var i=2*(t.language===s&&t.kind===o)+2*(t.language===r)+1*(t.kind===o);return 2*(n.language===s&&n.kind===o)+2*(n.language===r)+1*(n.kind===o)-i}));return l.length>0?{track:l[0],exactMatch:l[0].language===r&&l[0].kind===o}:{track:null}}function yh(t,n){switch(t.view){case 2:throw new Wd("The video is private.","PrivacyError",n);case 4:throw new Wd("The video is password-protected. The viewer must enter the password first.","PasswordError",n);case 7:throw new Wd(t.message,"NotFoundError",n)}}function _h(t){for(var n=[],i=0;i<t.length;i++)n.push([t.start(i),t.end(i)]);return n}function kh(t){var n,i,e,o=t.events,u=nt(),a=!1,s=!1,c=null,l=!1,f=null,d=null;function h(n){i!==n&&(i=n,t.config.embed.api=n)}var v={ping:function(){return t.config.video.id},on:function(t,i){t in Bc&&(t=Bc[t]);var e=bc(Uc);if(e.indexOf(t)<0)throw new Wd("“".concat(t,"” is not a valid event. Valid events are: ").concat(e.join(", "),"."),"TypeError","on");i&&u.on(t,i),n&&(n.listeners[t]=!0),t===Uc.LOADED&&y()},off:function(t,i){i&&u.off(t,i),n&&(n.listeners[t]=!1)},play:function(){return new r((function(n,i){o.once(Pc._s,n),o.once(Pc.ys,(function(t){i(new Wd(t.message,t.name,"play"))})),yh(t.config,"play"),o.fire(Fc.Jl),o.fire(Pc.Fs)}))},destroy:function(){o.fire(Sc.ms)},pause:function(){yh(t.config,"pause"),o.fire(Fc.Xl),o.fire(Pc.Ps)},loadVideo:function(n){var i=function(t){if(!t)return{};if(Xs(t))return{id:parseInt(t,10),params:{}};if("string"==typeof t)return 0!==t.indexOf("https://")?{}:{url:t,params:{}};if("url"in t){if(0!==t.url.indexOf("https://"))return{};var n=t.url;return delete t.url,{url:n,params:t}}if("id"in t){if(!Xs(t.id))return{};var i=t.id;return delete t.id,{id:parseInt(i,10),params:t}}return{}}(n),e=i.id,r=i.url,o=i.params;if(!e&&!r)throw new Wd("The video id must be an integer.","TypeError","loadVideo");if(r&&r.match(null===new RegExp("^https?://".concat(t.config.player_url,"/video/([0-9]+)/config"))))throw new Wd("The config url must be a valid Vimeo url.","TypeError","loadVideo");return t.loadVideo(r||e,o).then((function(){return n})).catch((function(){throw yh(t.config,"loadVideo"),new Wd("An error occurred loading the video.","Error","loadVideo")}))},unload:function(){1!==t.config.view&&3!==t.config.view||o.fire(Sc.$a)},addCuePoint:function(n,i){if(n=parseFloat(n),isNaN(n)||n<0||n>t.config.video.duration)throw new Wd("Cue point time must be positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","addCuePoint");try{var e=t.backbone.addCuePoint(n,i);return setTimeout((function(){o.fire(Pc.tc,e)}),0),e.id}catch(t){if("CuePointsNotSupported"===t.name)throw new Wd("Cue points are not supported in the current player.","UnsupportedError","addCuePoint");throw new Wd("Unable to add cue point","InvalidCuePoint","addCuePoint")}},removeCuePoint:function(n){var i=t.backbone.cuePoints.filter((function(t){return t.id===n}))[0];if(!i)throw new Wd("Cue point “".concat(n,"” was not found."),"InvalidCuePoint","removeCuePoint");t.backbone.removeCuePoint(i),setTimeout((function(){o.fire(Pc.nc,i)}),0)},enableTextTrack:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,u=("text_tracks"in t.config.request?t.config.request.text_tracks:[]).map((function(t){return t.language=t.lang,t})),a=u.some((function(t){return t.language.toLowerCase()===n.toLowerCase()}));if(!a)throw new Wd("There are no tracks for “".concat(n.toUpperCase(),"”."),"InvalidTrackLanguageError","enableTextTrack");var s=e?"".concat(n,".").concat(e):n,c=gh(s,u),l=c.track;if(!l||e&&l.kind!==e)throw new Wd("There are no ".concat(e," tracks for “").concat(n.toUpperCase(),"”."),"InvalidTrackError","enableTextTrack");return o.fire(Sc.rs,l.id),i<3?null:new r((function(t,n){o.once(Pc.Qs,(function(n,i){t({label:n.label,language:n.language,kind:n.kind})}))}))},disableTextTrack:function(){o.fire(Sc.os)},toggleFullscreen:function(t){var n={not_supported:{name:"UnsupportedError",msg:"Fullscreen is not supported at all or for this element."},not_enabled:{name:"Error",msg:"The request was made from an iframe that does not allow fullscreen."},not_allowed:{name:"NotAllowedError",msg:"The request failed, probably because it was not called from a user-initiated event."}};return new r((function(i,e){if(!ph.element===t)return ph.on("enter",(function t(){ph.off("enter",t),i()})),ph.on("error",(function i(r,o){ph.off("error",i);var u=n[o]||n.not_supported;e(new Wd(u.msg,u.name,"".concat(t?"request":"exit","Fullscreen")))})),void o.fire(Pc.Ns);i()}))},requestFullscreen:function(){return v.toggleFullscreen(!0)},exitFullscreen:function(){return v.toggleFullscreen(!1)},get fullscreen(){return!!ph.element},get autopause(){return!!t.config.embed.autopause},set autopause(n){t.config.embed.autopause=!!n},get chromecasting(){return!!kl.currentSession},get color(){return t.config.embed.color.replace("#","")},set color(n){if(t.config.embed.settings.color&&!t.config.embed.on_site)throw new Wd("The creator of the video has chosen to always use ".concat(new bh(t.config.embed.color).hex,"."),"EmbedSettingsError","setColor");try{var i=new bh(n);o.fire(Sc.Xa,i.hex)}catch(t){throw new Wd("The color should be 3- or 6-digit hex value.","TypeError","setColor")}var e=new bh(23,35,34,.75);if(e.contrast(i).ratio<3){var r=i.clone().lighten(5,3,e);throw new Wd("".concat(i.hex," does not meet minimum contrast ratio. We recommend using brighter colors. (You could try ").concat(r.hex," instead.) See WCAG 2.0 guidelines: http://www.w3.org/TR/WCAG/#visual-audio-contrast"),"ContrastError","setColor")}},get cuePoints(){return t.backbone.cuePoints.map((function(t){return{time:t.time,data:t.data,id:t.id}}))},get currentTime(){return t.currentTime},set currentTime(n){if(n=parseFloat(n),isNaN(n)||n<0||n>t.config.video.duration)throw new Wd("Seconds must be a positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","setCurrentTime");return o.fire(Fc.Ha),o.fire(Sc.Ha,null,n),o.fire(Pc.Vc),i<3?null:new r((function(t,n){o.once(wi.SEEKED,(function(n){var i=n.currentTime;t(i)}))}))},get duration(){return fc(t.config.video.duration)},get ended(){return!!t.backbone.ended},get loop(){return!!t.config.embed.loop},set loop(t){o.fire(Sc.Ka,t)},set muted(n){t.backbone.muted=n},get muted(){return t.backbone.muted},get paused(){return!(t.backbone&&"paused"in t.backbone&&!t.backbone.paused)},get buffered(){return _h(t.backbone.buffered)},get played(){return _h(t.backbone.played)},get seekable(){return _h(t.backbone.seekable)},get seeking(){return t.backbone.seeking},get playbackRate(){return t.backbone?t.backbone.playbackRate:1},set playbackRate(n){if(!t.config.embed.settings.speed)throw new Wd("Setting the playback rate is not enabled for this video.","Error","setPlaybackRate");if(isNaN(n)||n>2)throw new Wd("Playback rate should be a number below or equal to ".concat(2,"."),"RangeError","setPlaybackRate");o.fire(Sc.ps,n)},get textTracks(){return(t.backbone?t.backbone.video.textTracks:[]).map((function(t){return{label:t.label,language:t.language,kind:t.kind,mode:t===f?"showing":"disabled"}}))},get videoEmbedCode(){return t.config.video.embed_code},get videoHeight(){return t.backbone.videoHeight||t.config.video.height},get videoId(){return t.config.video.id},get videoTitle(){return t.config.video.title},get videoWidth(){return t.backbone.videoWidth||t.config.video.width},get videoUrl(){if(!t.config.video.url)throw new Wd("The URL is not available because of the videos privacy settings.","PrivacyError","getVideoUrl");return t.config.video.url},get volume(){var n=fc(t.config.request.cookie.volume);return 1===i?Math.round(100*n):n},set volume(t){if(t=parseFloat(t),1===i&&(t/=100),isNaN(t)||t<0||t>1)throw new Wd("Volume should be a number between 0 and 1.","RangeError","setVolume");d=t,o.fire(Sc.za,t,!0)},_loadVideo:function(n,i){return t.loadVideo(n,i)},get _like(){return!!t.config.user.liked},set _like(n){if(t.config.embed.on_site){if(t.config.user.liked===n)return;o.fire(Pc.dc,n)}},get _watchLater(){return!!t.config.user.watch_later},set _watchLater(n){if(t.config.embed.on_site){if(t.config.user.watch_later===n)return;o.fire(Pc.hc,n)}},get currentChapter(){var n=t.backbone.currentChapterID;if(!n)return null;var i=V(t.backbone.chapters),e=i.findIndex((function(t){return n===t.id}));return{startTime:i[e].startTime,title:i[e].text,index:e+1}},get chapters(){return V(t.backbone.chapters).map((function(t,n){return{startTime:t.startTime,title:t.text,index:n+1}}))},_addChapter:function(n,i){if(n=parseFloat(n),isNaN(n)||n<0||n>t.config.video.duration)throw new Wd("Chapter timecode must be positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","addCuePoint");try{t.backbone.addChapter(n,i)}catch(t){if("ChaptersNotSupported"===t.name)throw new Wd(t.message,"UnsupportedError","_addChapter");throw new Wd("Unable to add chapter","InvalidChapter","_addChapter")}},_removeChapter:function(n){var i;try{i=t.backbone.chapters.getCueById(n)}catch(t){throw new Wd("Chapters are not supported in this browser.","UnsupportedError","_removeChapter")}if(!i)throw new Wd("Chapter was not found.","InvalidChapter","_removeChapter");try{t.backbone.removeChapter(i)}catch(t){if("ChaptersNotSupported"===t.name)throw new Wd("Chapters are not supported in this browser.","UnsupportedError","_removeChapter");throw new Wd("Unable to remove chapter","InvalidChapter","_removeChapter")}},_addCard:function(t){o.fire(Sc._addCard,t)},_removeCard:function(t){o.fire(Sc._removeCard,t)},_setOutro:function(n,i){t.config.embed.outro!==n?(o.fire(Sc._hideOutro),setTimeout((function(){t.config.embed.outro=n,o.fire(Sc.as,n,i)}),400)):o.fire(Sc.as,n,i)},_hideOutro:function(){o.fire(Sc._hideOutro)},_setEmailCapture:function(n){if(n){if(t.config.embed.email=t.config.embed.email||{},t.config.embed.email.position=n.position.toLowerCase(),"after"===n.position.toLowerCase())return t.config.embed.outro="email",void o.fire(Sc.as,"email",{version:2,data:n});t.config.embed.email.timecode=n.timecode,n.nohide=!0,n.noblur=!0,n.nofocus=na(n,"nofocus",!0),v._showOverlay("email-capture",n)}else v._unsetEmailCapture()},_unsetEmailCapture:function(){t.config.embed.outro&&(o.fire(Sc._hideOutro),delete t.config.embed.outro),t.config.embed.email&&(o.fire(Sc.Wa,{unmakeModal:!0}),delete t.config.embed.email)},_showOverlay:function(t,n){o.fire(Sc._showOverlay,t,n)},_fireEvent:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];o.fire.apply(null,n)},_setEmbedEditor:function(n){t.config.embed.editor=!!n},_setEmbedSettings:function(n){t.config.embed.on_site&&(Object.keys(n).forEach((function(i){var r=n[i];r="object"===U(r)?r:Number(r),"badge"===i&&(r?r=e:e=t.config.embed.settings.badge),t.config.embed.settings[i]=r,o.fire(Pc.el,i,r)})),o.fire(Pc.Jc,!1,t.config))},_setEmbedSetting:function(n,i){t.config.embed.on_site&&(i="object"===U(i)?i:Number(i),"badge"===n&&(i?i=e:e=t.config.embed.settings.badge),t.config.embed.settings[n]=i,o.fire(Pc.el,n,i),o.fire(Pc.Jc,!1,t.config))},_setOTTVideoMetadata:function(n){t.config.request.flags.ott&&(t.ottVideoMetadata=n,o.fire(Pc.rl,n))},_toggleDebugPanel:function(){o.fire(Pc.Rc)},_overrideControlbarBehavior:function(t){o.fire(Sc._overrideControlbarBehavior,t)},_setControlbarVisibility:function(t){o.fire(Sc.ss,t)},get _fieldOfView(){var n=t.backbone.getEffectByName("ThreeSixtyEffect");if(t.backbone&&!n)throw new Wd("Field of view is not available in the current player.","UnsupportedError","getFieldOfView");return n.fieldOfView},set _fieldOfView(n){var i=t.backbone.getEffectByName("ThreeSixtyEffect");if(t.backbone&&!i)throw new Wd("Field of view is not available in the current player.","UnsupportedError","setFieldOfView");t.backbone.getEffectByName("ThreeSixtyEffect").fieldOfView=n},get _coordinates(){var n=t.backbone.getEffectByName("ThreeSixtyEffect");if(t.backbone&&!n)throw new Wd("Coordinates are not available in the current player.","UnsupportedError","getCoordinates");return n.currentCoordinates},set _coordinates(n){var i=t.backbone.getEffectByName("ThreeSixtyEffect");if(t.backbone&&!i)throw new Wd("Coordinates are not available in the current player.","UnsupportedError","setCoordinates");try{t.backbone.getEffectByName("ThreeSixtyEffect").currentCoordinates=n}catch(t){throw new Wd(t.message,"RangeError","setCoordinates")}},_setChromecastUI:function(t){var n=kl.currentSession;n&&Gn(t)&&n.sendMessage("urn:x-cast:com.vimeo.cast.media",{action:"setCustomUIStyles",value:t})},addEventListener:function(){v.on.apply(v,arguments)},removeEventListener:function(){v.off.apply(v,arguments)},seekTo:function(t){v.currentTime=t},changeColor:function(t){v.color=t}},p={addCuePoint:function(t){var n=t.time,i=t.data;return v.addCuePoint(n,i)},enableTextTrack:function(t){var n=t.language,i=t.kind,e=void 0===i?null:i;v.enableTextTrack(n,e)}};function m(t,i){n&&n.emit(t,i),u.fire(t,i)}var w=function(t,n){return function(){var i=n?n.apply(void 0,arguments):void 0;m(t,i)}};function b(t){var n=t.currentTime,i=t.duration,e=t.timeProgress;return{seconds:fc(n),percent:fc(e),duration:fc(i)}}function g(t){return{playbackRate:t}}function y(){m(Uc.LOADED,l?null:(l=!0,{id:t.config.video.id}))}function _(t){return k(function(t){switch(t){case"BrowserNotSupported":case"FilesNotPlayable":case"MediaSrcNotSupportedError":return new Wd("This video is not supported in this browser.","NotSupportedError");case"FileError":return new Wd("There was an error loading the files for this video.","FileError")}return new Wd("An error occurred during playback.","PlaybackError")}(c=t))}function k(t){var n={message:"An error occurred.",name:"Error",method:t.source};return"MessageApiError"===t.constructorName&&(n={message:t.message,name:t.name,method:t.source}),n}return function(){if(!t.config.embed.on_site){h(t.config.embed.api);var i=t.config.request.referrer;(n=new Qd(i)).listeners=bc(Uc).reduce((function(t,n){return W({},t,z({},n,!1))}),{}),n.listeners[Uc.READY]=!0,n.listeners[Uc.ERROR]=!0,n.filter((function(t){return n.listeners[t]}))}}(),function(){if(n){var e=vd({},v,p);n.extendMethods(e),n.hooks({logError:function(t){m(Uc.ERROR,k(t))},parseMessage:function(t){if(!t||""===t)return{};if(Gn(t))return h(3),t;try{var n=JSON.parse(t);return h(2),n}catch(t){return h(null),m(Uc.ERROR,"The Vimeo Froogaloop v1 API is no longer supported.\n Please follow the upgrade instructions here: https://goo.gl/mueGRR"),{}}},buildMessage:function(n){var e;(null==(e=t.config.embed)?void 0:e.player_id)&&(n.player_id=t.config.embed.player_id);try{2===i&&(n=function(t){if(t.event){for(var n in Bc)if(Bc[n]===t.event){t.event=n;break}"cuechange"===t.event&&(t.data.text=t.data.cues[0].text,t.data.html=t.data.cues[0].html,delete t.data.cues)}return JSON.stringify(t)}(n)),Gn(n)&&"ready"===n.event&&(n=JSON.stringify(n))}catch(t){}return n}})}}(),o.on(yi.BUFFER_STARTED,w(Uc.BUFFER_START)),o.on(yi.BUFFER_ENDED,w(Uc.BUFFER_END)),o.on(yi.CUE_POINT,w(Uc.CUEPOINT,(function(t){return{time:t.time,data:t.data,id:t.id}}))),o.on(zo,w(Uc.CUE_CHANGE,(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=t||{},e=i.language,r=void 0===e?null:e,o=i.label,u=void 0===o?null:o,a=i.kind,s=void 0===a?null:a;return{label:u,language:r,kind:s,cues:n}}))),o.on(Pc.Ws,w(Uc.CHAPTER_CHANGE,(function(n){var i=V(t.backbone.chapters).findIndex((function(t){return n===t.id}));return i>=0?{startTime:t.backbone.chapters[i].startTime,title:t.backbone.chapters[i].text,index:i+1}:null}))),o.on(Pc.Ts,w(Uc.ENDED,(function(){return s=!1,{seconds:fc(t.config.video.duration),percent:1,duration:fc(t.config.video.duration)}}))),o.on(Pc.He,w(Uc.PAUSE,(function(n){return s=!1,{seconds:fc(n),percent:fc(n/t.config.video.duration),duration:fc(t.config.video.duration)}}))),o.on(Pc.Is,w(Uc.PLAYBACK_RATE_CHANGE,g)),o.on(Pc.Is,w(Uc.RATE_CHANGE,g)),o.on(Pc.Qs,w(Uc.TEXT_TRACK_CHANGE,(function(t){f=t;var n=t||{},i=n.language,e=void 0===i?null:i,r=n.label,o=void 0===r?null:r,u=n.kind;return{label:o,language:e,kind:void 0===u?null:u}}))),o.on(Pc.Ss,w(Uc.VOLUME_CHANGE,(function(t){return{volume:fc(t)}}))),o.on(Pc.Js,w(Uc.CONTROL_BAR_VISIBILITY_CHANGED,(function(t){return{visible:t}}))),o.on(Pc.Jc,(function(t){d&&setTimeout((function(){o.fire(Sc.za,d,!0)}),0),t&&y()})),o.on(Pc.bs,(function(t){var n=_(t);a&&m(Uc.ERROR,n)})),o.on(Pc.cc,w(Uc.FULLSCREENCHANGE,(function(){return{fullscreen:!0}}))),o.on(Pc.fc,w(Uc.FULLSCREENCHANGE,(function(){return{fullscreen:!1}}))),o.on(Pc.Gl,w(Uc.AD_STARTED)),o.on(Pc.Bl,w(Uc.AD_COMPLETED)),o.on(Pc.zl,w(Uc.AD_ERROR)),o.on(Pc.$l,w(Uc.AD_SKIPPED)),o.on(Pc.Kl,w(Uc.AD_ALL_COMPLETED)),o.once(Pc.ue,(function(){a=!0,m(Uc.READY),c&&(m(Uc.ERROR,_(c)),c=null)})),o.on(tu.EVENT_ENDED,w(Uc.LIVE_EVENT_ENDED)),o.on(tu.EVENT_STARTED,w(Uc.LIVE_EVENT_STARTED)),o.on(tu.STREAM_OFFLINE,w(Uc.LIVE_STREAM_OFFLINE)),o.on(tu.STREAM_ONLINE,w(Uc.LIVE_STREAM_ONLINE)),o.on(ki.MOTION_END,w(Uc.MOTION_END)),o.on(ki.MOTION_START,w(Uc.MOTION_START)),o.on(ki.WEBVR_HARDWARE_AVAILABLE,w(Uc.WEBVR_HARDWARE_AVAILABLE)),o.on(ki.WEBVR_ENTER,w(Uc.ENTER_WEBVR)),o.on(ki.WEBVR_EXIT,w(Uc.EXIT_WEBVR)),o.on(ki.SPATIAL_UNSUPPORTED,w(Uc.SPATIAL_UNSUPPORTED)),o.on(wi.PLAY,w(Uc.PLAY,(function(n){return s?null:(s=!0,{seconds:fc(n),percent:fc(n/t.config.video.duration),duration:fc(t.config.video.duration)})}))),o.on(wi.PLAYING,w(Uc.PLAYING,(function(){return s?{seconds:fc(t.currentTime),percent:fc(t.currentTime/t.config.video.duration),duration:fc(t.config.video.duration)}:null}))),o.on(wi.PROGRESS,w(Uc.PROGRESS,(function(t){var n=t.loaded,e=t.duration,r=t.loadProgress,o={seconds:fc(n),percent:fc(r),duration:fc(e)};return i<3&&(o.bytesLoaded=-1,o.bytesTotal=-1),o}))),o.on(wi.SEEKING,w(Uc.SEEKING,b)),o.on(wi.SEEKED,w(Uc.SEEKED,b)),o.on(wi.TIME_UPDATE,w(Uc.TIME_UPDATE,(function(t){var n=t.currentTime,i=t.duration,e=t.timeProgress;return{seconds:fc(n),percent:fc(e),duration:fc(i)}}))),o.on(wi.LOADED_METADATA,w(Uc.LOADED_METADATA)),o.on(wi.DURATION_CHANGE,w(Uc.DURATION_CHANGE,(function(n){return{duration:t.backbone.duration}}))),o.on(wi.WAITING,w(Uc.WAITING)),o.on(wi.LOADED_DATA,w(Uc.LOADED_DATA)),o.on(wi.LOAD_START,w(Uc.LOAD_START)),o.on(gl.connected,w(Uc.CHROMECAST_CONNECTED)),o.on(Sc.$a,(function(){c=null,l=!1})),t.doNotTrackEnabled||o.on(Pc.fl,(function(){m(Uc.EMAIL_CAPTURE)})),o.on(Pc._l,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n&&(n.listeners[Uc.SPACE_CHANGE]=!0,m(Uc.SPACE_CHANGE,t))})),o.fire(Pc.Il),v}nh.change&&document.addEventListener(nh.change,(function(t){if(ph.onchange(ph.element),oh(ih.CHANGE,ph.element),ph.element){var n=lh[lh.length-2];n&&n.element===ph.element?hh():dh(ph.element)}else hh()}),!1),document.addEventListener("webkitbeginfullscreen",(function(t){var n=!0;if(lh.length>0)for(var i=0,e=lh.length;i<e;i++)if(ah(lh[i].element)===t.srcElement){n=!1;break}n&&lh.push({element:t.srcElement,enter:ch,exit:ch,error:ch}),ph.onchange(t.srcElement),oh(ih.CHANGE,ph.srcElement),dh(t.srcElement)}),!0),document.addEventListener("webkitendfullscreen",(function(t){ph.onchange(t.srcElement),oh(ih.CHANGE,t.srcElement),hh(t.srcElement)}),!0),nh.error&&document.addEventListener(nh.error,(function(t){vh("not_allowed")}),!1),bh.prototype={get complement(){var t=this.clone();return t.rgb={red:255-this.red,green:255-this.green,blue:255-this.blue},t},get hex(){return bh.rgbToHex(this.red,this.green,this.blue)},set hex(t){return this.rgba=bh.hexToRgb(t),this},get hsl(){return"hsl("+this.hue+","+this.saturation+"%,"+Math.round(this.lightness)+"%)"},set hsl(t){this.hue=t.hue,this.saturation=t.saturation,this.lightness=t.lightness;var n=bh.hslToRgb(t.hue,t.saturation,t.lightness);return this.red=n.red,this.green=n.green,this.blue=n.blue,this.alpha=n.alpha,this},get luminance(){function t(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*t(this.red/255)+.7152*t(this.green/255)+.0722*t(this.blue/255)},get rgb(){return"rgb("+this.red+","+this.green+","+this.blue+")"},set rgb(t){return this.rgba=t,this},get rgba(){return"rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")"},set rgba(t){this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha||1;var n=bh.rgbToHsl(t.red,t.green,t.blue);return this.hue=n.hue,this.saturation=n.saturation,this.lightness=n.lightness,this},get yiq(){return(299*this.red+587*this.green+114*this.blue)/1e3},clone:function(){return new bh(this)},lighten:function(t,n,i){if(this.hsl={hue:this.hue,saturation:this.saturation,lightness:this.lightness+t},n&&i)for(var e=i.contrast(this).ratio;e<n&&(this.lighten(5),e=i.contrast(this).ratio,!(this.lightness>=100)););return this},darken:function(t,n,i){if(this.hsl={hue:this.hue,saturation:this.saturation,lightness:this.lightness-t},n&&i)for(var e=i.contrast(this).ratio;e<n&&(this.darken(5),e=i.contrast(this).ratio,!(this.lightness<=0)););return this},overlayOn:function(t){if(this.alpha>=1)return this;var n=this.clone();return n.rgba={red:n.red*this.alpha+t.red*t.alpha*(1-this.alpha),green:n.green*this.alpha+t.green*t.alpha*(1-this.alpha),blue:n.blue*this.alpha+t.blue*t.alpha*(1-this.alpha),alpha:n.alpha+t.alpha*(1-this.alpha)},n},contrast:function(t){var n=this.alpha;if(n>=1){t.alpha<1&&(t=t.overlayOn(this));var i=this.luminance+.05,e=t.luminance+.05,r=i/e;return e>i&&(r=1/r),{ratio:r=Math.round(10*r)/10,error:0,min:r,max:r}}var o=this.overlayOn(bh.white).contrast(t).ratio,u=this.overlayOn(bh.black).contrast(t).ratio,a=Math.max(o,u),s={red:Math.min(Math.max(0,(t.red-this.red*n)/(1-n)),255),green:Math.min(Math.max(0,(t.green-this.green*n)/(1-n)),255),blue:Math.min(Math.max(0,(t.blue-this.blue*n)/(1-n)),255)},c=this.clone();c.rgb=s;var l=this.overlayOn(c).contrast(t).ratio;return{ratio:Math.round((l+a)/2*10)/10,error:Math.round((a-l)/2*10)/10,min:l,max:a,closest:c,farthest:u===a?bh.white:bh.black}},wcagAACompliant:function(t){return this.contrast(t).ratio>=4.5},wcagAAACompliant:function(t){return this.contrast(t).ratio>=7},yiqContrastColor:function(){return this.yiq>=120?new bh(0,0,0):new bh(255,255,255)}},bh.hexToRgb=function(t){var n;return 3===(t=String(t)).length||4===t.length?(n=/^#?([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(t))&&(n[1]+=n[1],n[2]+=n[2],n[3]+=n[3]):n=/^#?([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(t),n?{red:parseInt(n[1],16),green:parseInt(n[2],16),blue:parseInt(n[3],16),alpha:1}:null},bh.rgbToHex=function(t,n,i){return"#"+((1<<24)+(Math.round(t)<<16)+(Math.round(n)<<8)+Math.round(i)).toString(16).slice(1)},bh.rgbToHsl=function(t,n,i){t/=255,n/=255,i/=255;var e,r=Math.max(t,n,i),o=Math.min(t,n,i),u=(r+o)/2,a=u;if(r===o)return{hue:0,saturation:0,lightness:100*a};var s=r-o;return e=a>.5?s/(2-r-o):s/(r+o),r===t?u=(n-i)/s+(n<i?6:0):r===n?u=(i-t)/s+2:r===i&&(u=(t-n)/s+4),u/=6,{hue:Math.round(360*u),saturation:Math.round(100*e),lightness:Math.round(100*a)}},bh.hslToRgb=function(t,n,i){function e(t,n,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+6*(2/3-i)*(n-t):t}if(t/=360,i/=100,0==(n/=100))return{red:Math.floor(255*i),green:Math.floor(255*i),blue:Math.floor(255*i)};var r=i<.5?i*(1+n):i+n-n*i,o=2*i-r;return{red:Math.floor(255*e(o,r,t+1/3)),green:Math.floor(255*e(o,r,t)),blue:Math.floor(255*e(o,r,t-1/3))}},bh.hslToHex=function(t,n,i){var e=bh.hslToRgb(t,n,i);return bh.rgbToHex(e.red,e.green,e.blue)},bh.white=new bh("fff"),bh.black=new bh("000");var Eh=function(){function t(t){this.alertTextElement=t.querySelector(".vp-text-alert-wrapper"),this.alertContentElement=this.alertTextElement.querySelector(".vp-alert-text")}var n=t.prototype;return n.show=function(t){this.alertContentElement.innerHTML=t,this.alertContentElement.classList.remove("hidden"),this.alertTextElement.classList.remove("hidden")},n.hide=function(){this.alertContentElement.classList.add("hidden"),this.alertTextElement.classList.add("hidden")},t}(),Th=i((function(t){!function(){var i="undefined"!=typeof window&&window===this?this:void 0!==n&&null!=n?n:this,e="function"==typeof Object.defineProperties?Object.defineProperty:function(t,n,i){t!=Array.prototype&&t!=Object.prototype&&(t[n]=i.value)};function o(){o=function(){},i.Symbol||(i.Symbol=a)}var u=0;function a(t){return"jscomp_symbol_"+(t||"")+u++}function s(){o();var t=i.Symbol.iterator;t||(t=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&e(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),s=function(){}}function c(t){var n=0;return function(t){return s(),(t={next:t})[i.Symbol.iterator]=function(){return this},t}((function(){return n<t.length?{done:!1,value:t[n++]}:{done:!0}}))}function l(t){s();var n=t[D.iterator];return n?n.call(t):c(t)}function f(t){if(!(t instanceof Array)){t=l(t);for(var n,i=[];!(n=t.next()).done;)i.push(n.value);t=i}return t}var d=0,h="img script iframe link audio video source".split(" ");function v(t,n){for(var i=(t=l(t)).next();!i.done;i=t.next())if(i=i.value,n.includes(i.nodeName.toLowerCase())||v(i.children,n))return!0;return!1}function p(t,n){if(2<t.length)return performance.now();for(var i=[],e=(n=l(n)).next();!e.done;e=n.next())e=e.value,i.push({timestamp:e.start,type:"requestStart"}),i.push({timestamp:e.end,type:"requestEnd"});for(e=(n=l(t)).next();!e.done;e=n.next())i.push({timestamp:e.value,type:"requestStart"});for(i.sort((function(t,n){return t.timestamp-n.timestamp})),t=t.length,n=i.length-1;0<=n;n--)switch((e=i[n]).type){case"requestStart":t--;break;case"requestEnd":if(2<++t)return e.timestamp;break;default:throw Error("Internal Error: This should never happen")}return 0}function m(t){t=t||{},this.w=!!t.useMutationObserver,this.u=t.minValue||null,t=window.__tti&&window.__tti.e;var n=window.__tti&&window.__tti.o;this.a=t?t.map((function(t){return{start:t.startTime,end:t.startTime+t.duration}})):[],n&&n.disconnect(),this.b=[],this.f=new L,this.j=null,this.v=-1/0,this.i=!1,this.h=this.c=this.s=null,function(t,n){var i=XMLHttpRequest.prototype.send,e=d++;XMLHttpRequest.prototype.send=function(r){for(var o=[],u=0;u<arguments.length;++u)o[u-0]=arguments[u];var a=this;return t(e),this.addEventListener("readystatechange",(function(){4===a.readyState&&n(e)})),i.apply(this,o)}}(this.m.bind(this),this.l.bind(this)),function(t,n){var i=fetch;fetch=function(e){for(var o=[],u=0;u<arguments.length;++u)o[u-0]=arguments[u];return new r((function(e,r){var u=d++;t(u),i.apply(null,[].concat(f(o))).then((function(t){n(u),e(t)}),(function(t){n(t),r(t)}))}))}}(this.m.bind(this),this.l.bind(this)),function(t){t.c=new PerformanceObserver((function(n){for(var i=(n=l(n.getEntries())).next();!i.done;i=n.next())if("resource"===(i=i.value).entryType&&(t.b.push({start:i.fetchStart,end:i.responseEnd}),b(t,p(t.g,t.b)+5e3)),"longtask"===i.entryType){var e=i.startTime+i.duration;t.a.push({start:i.startTime,end:e}),b(t,e+5e3)}})),t.c.observe({entryTypes:["longtask","resource"]})}(this),this.w&&(this.h=function(t){var n=new MutationObserver((function(n){for(var i=(n=l(n)).next();!i.done;i=n.next())("childList"==(i=i.value).type&&v(i.addedNodes,h)||"attributes"==i.type&&h.includes(i.target.tagName.toLowerCase()))&&t(i)}));return n.observe(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]}),n}(this.B.bind(this)))}function w(t){t.i=!0;var n=0<t.a.length?t.a[t.a.length-1].end:0,i=p(t.g,t.b);b(t,Math.max(i+5e3,n))}function b(t,n){!t.i||t.v>n||(clearTimeout(t.j),t.j=setTimeout((function(){var n=performance.timing.navigationStart,i=p(t.g,t.b);if(n=(window.a&&window.a.A?1e3*window.a.A().C-n:0)||performance.timing.domContentLoadedEventEnd-n,t.u)var e=t.u;else e=performance.timing.domContentLoadedEventEnd?(e=performance.timing).domContentLoadedEventEnd-e.navigationStart:null;var r=performance.now();null===e&&b(t,Math.max(i+5e3,r+1e3));var o=t.a;(i=5e3>r-i||5e3>r-(i=o.length?o[o.length-1].end:n)?null:Math.max(i,e))&&(t.s(i),clearTimeout(t.j),t.i=!1,t.c&&t.c.disconnect(),t.h&&t.h.disconnect()),b(t,performance.now()+1e3)}),n-performance.now()),t.v=n)}m.prototype.getFirstConsistentlyInteractive=function(){var t=this;return new r((function(n){t.s=n,"complete"==document.readyState?w(t):window.addEventListener("load",(function(){w(t)}))}))},m.prototype.m=function(t){this.f.set(t,performance.now())},m.prototype.l=function(t){this.f.delete(t)},m.prototype.B=function(){b(this,performance.now()+5e3)},i.Object.defineProperties(m.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(f(this.f.values()))}}});var g={getFirstConsistentlyInteractive:function(t){return t=t||{},"PerformanceLongTaskTiming"in window?new m(t).getFirstConsistentlyInteractive():r.resolve(null)}};t.exports?t.exports=g:window.ttiPolyfill=g}()}));function xh(t){return t.quality||t.metadata.quality}function Sh(t){return gc("av01",t)?"AV1":gc("hvc1",t)?"HEVC":gc("avc1",t)?"AVC":null}function Ah(t){var n=xh(t),i={"1440p":"2K","2160p":"4K","2700p":"5K","3240p":"6K","3780p":"7K","4320p":"8K"};for(var e in i)n=n.replace(e,i[e]);return n}function Mh(t,n){var i,e;return(null==t||null==(i=t.request)||null==(e=i.ab_tests)?void 0:e[n])?t.request.ab_tests[n]:{}}function Rh(t,n,i,e){var o,u,a,s,c=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{return r.resolve(t.apply(this,n))}catch(t){return r.reject(t)}}}((function(n){var i=n.identifier,e=n.data,o=e.request,u=e.response,a=u.headers;return function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(u.arrayBuffer(),(function(n){if("video"===i.type){var e=t.backbone.representations.reverse(),r=e[i.stream];if(!r)return;var s=function(n,i,e,r,o,u){var a=e.headers;delete a[""];var s={};Object.keys(a).forEach((function(t){var n=a[t],i=t.replace(f,"_");s[i]=n}));var c=u.slice();return c.forEach((function(t){t.profile=String(t.profile||"")||null,t.id=String(t.id||"")||null})),{duration:i.data.duration,size:r.byteLength,index:n.segment,session_id:t.config.request.session,profile_id:String(o.profile||"")||null,quality:o.quality,streams:c,clip_id:t.config.video.id,video_file_id:String(o.id||"")||null,headers:s,buffered:fc(dt(t.backbone.currentTime,t.backbone.buffered),2),ttfb:it(e),request_id:i.data.uuid?i.data.uuid:""}}(i,o,u,n,r,e);t.events.fire(Pc.Yl,{name:nl.CHUNK_DOWNLOADED,data:s}),Mh(t.config,"chunk_logging").group&&t.config.request.urls.fresnel_chunk_url&&function(t,n,i){var e=Date.now(),r=[{uuid:dc(),created_at:e,event:{name:nl.CHUNK_DOWNLOADED,version:1,ts_ms:e,fields:n},tracker:{name:"vimeo-player",version:i}}];new Xc(t).logRequestPromiseWithUrl(t,JSON.stringify(r),!0)}(t.config.request.urls.fresnel_chunk_url+"?beacon=1",s,el(t.config)),Y+=n.byteLength}"akamai-edge-ip"in a&&(L=a["akamai-edge-ip"]),"quic-version"in a&&(P=a["quic-version"]),"x-vim-cachebc"in a&&(F=a["x-vim-cachebc"]),"x-akamai-request-id"in a&&(U=a["x-akamai-request-id"]),function(t){var n=t.headers,i=t.url;if("x-cache-hits"in n){var e=n["x-cache-hits"].match(/(0|1)(?:, (0|1))?/);null!==e&&(B={url:i,servedBy:n["x-served-by"],edge:e[1]?!!parseInt(e[1],10):null,tier1:e[2]?!!parseInt(e[2],10):null,tier2:null})}else if("x-vim-cachebc"in n){var r=n["x-vim-cachebc"].match(/E:(m|h)(?:,TD0:(m|h))?(?:,TD1:(m|h))?(?:,TD2:(m|h))?/);if(null!==r)for(var o in B={url:i,edge:r[1]?r[1]:null,tier1:r[2]?r[2]:null,tier2:r[3]?r[3]:null})"edge"!==o&&"tier1"!==o&&"tier2"!==o||("h"===B[o]?B[o]=!0:"m"===B[o]&&(B[o]=!1))}}(u);var c={};L&&(c.akamai_edge_ip=L),P&&(c.quic_version=P),F&&(c.akamai_cache_debug=F),U&&(c.akamai_request_id=U),c.manifest_load_durations=t.backbone.manifestLoadDurations,c.successful_segment_count=t.backbone.successfulSegments.length,c.failed_segment_count=t.backbone.failedSegments.length,q=c}))})),l=new N,f=new RegExp("-","g"),d=null,h=null,v=!1,p=!0,m=!1,w=!1,b="auto",g={},y={},_=null,k=null,E=null,T=[],x=null,S={},A=!1,M=!1,R="none",C=!1,O=0,I=0,j=0,D=0,L=null,P=null,F=null,U=null,B=null,H=!1,z=null,q=null,W=null,G=null,$=!1,K=!1,Y=0;function J(){var n=l.get(t.backbone.videoElement);if(n)return u=n.Ef,void(a=n.Tf);a=new Yc,u=new tl(t.backbone.videoElement,Z),X(),l.set(t.backbone.videoElement,{Ef:u,Tf:a})}function X(){var n=a;u.customizeHooks({bufferTracker:n,videoBufferCheck:function(){t.events.on(yi.BUFFER_STARTED,(function(){v&&($||H||(H=!0,n.trackBufferStart(u.logBufferStart,{lower_profile_available:t.backbone.isLowerProfileAvailable})))})),t.events.on(yi.BUFFER_ENDED,(function(){v&&H&&(H=!1,n.trackBufferEnd(u.logBufferEnd,{cdn_data:B}),n.resetLastBufferTime())}))},addEventData:function(t){var n=K;switch(K=!1,t){case nl.VIDEO_START_TIME:return q;case nl.VIDEO_SEEK:var i=W;return W=null,i;case nl.VIDEO_EXIT:return{tti:z};case nl.VIDEO_PLAYED:case nl.VIDEO_PAUSED:return{api_call:n}}return null}}),u.initHooks()}function Z(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(i=Object.assign(Q(),u?u.globalProperties():void 0,i)).name=n,t.events.fire(Pc.Yl,{name:n,data:i}),o.log(i).catch((function(t){}))}function Q(){return Object.assign(function(){var n,e,r,o,u,a,s={autoplay:1===t.config.embed.autoplay,background:!!t.config.embed.settings.background,clip_id:t.config.video.id,context:t.config.embed.context,device_pixel_ratio:window.devicePixelRatio||1,drm:t.config.request.drm||!1,embed:!t.config.embed.on_site,is_mod:!!t.config.user.mod,is_spatial:!(!ys.spatialPlayback||!t.config.video.spatial),logged_in:!!t.config.user.logged_in,looping:!!t.config.embed.loop,owner_id:null==(n=t.config.video)||null==(e=n.owner)?void 0:e.id,product:il(t),referrer:t.config.request.referrer,session_id:t.config.request.session,stayed_on_auto:p,version:el(t.config),version_backend:t.config.request.build.backend,viewer_id:null==(r=t.config.user)?void 0:r.id,viewer_team_id:null==(o=t.config.user)?void 0:o.team_id,viewer_team_origin_user_id:null==(u=t.config.user)?void 0:u.team_origin_user_id,vuid:xl("vuid")};return t.config.video.owner&&(s.account_type=t.config.video.owner.account_type),t.config.embed.api&&(s.api_version=t.config.embed.api),t.config.embed.app_id&&(s.app_id=String(t.config.embed.app_id)),t.config.video.privacy&&(s.privacy=t.config.video.privacy),i.get(Hl)&&(s.live_session_id=null==(a=t.config.video.live_event)?void 0:a.id),ys.webvr&&t.config.video.spatial&&(s.webvr_support=!0),ys.webxr&&t.config.video.spatial&&(s.webxr_support=!0),s}(),function(){var n=t.backbone.video?t.backbone.video.currentFile:{},e=function(){var n={},i=pd(),e=Na("asc"),r="MediaSourceScanner"===t.backbone.currentScannerName,o="HTMLScanner"===t.backbone.currentScannerName,u="HLSLiveScanner"===t.backbone.currentScannerName,a=[];o&&(a=na(t.config,"request.files.progressive")||na(t.config,"request.files.hls")||[]),r&&(a=na(t.config,"request.files.dash.streams",[])),u&&(a=t.backbone.video.currentFile.mime===xc.dashMpd?na(t.config,"request.files.dash.streams",[]):na(t.config,"request.files.hls.streams",[]));var s=V(a).sort(e).map((function(t){return t.profile})),c=-1,l=0,f=null;if(Object.keys(y).forEach((function(t){var n=s.indexOf(parseInt(t,10));n>c&&(c=n);var e=y[t].reduce((function(t,n){return((n.end||i)-n.start)/1e3+t}),0);e>l&&(l=e,f=t)})),n.highest_profile=s[c],n.highest_available_profile=s[s.length-1],n.most_used_profile=f,(r||u)&&T){n.max_speed=Math.round(Math.max.apply(Math,tt(T)))/1e3,n.min_speed=Math.round(Math.min.apply(Math,tt(T)))/1e3;var d=T.reduce((function(t,n){return t+n}),0);n.average_speed=Math.round(d/T.length)/1e3}return n}(),r=n.id,o=void 0===r?0:r,u=n.mime,a=void 0===u?xc.h264:u,s=n.metadata,c=(s=void 0===s?{}:s).profile,l=void 0===c?null:c,f=!1,v=!1;switch(a){case xc.dash:0===n.restrictedStreamIndexes.length&&(f=!0),na(t.config,"request.files.dash.separate_av")&&(v=!0),l=g?g.profile:null;break;case xc.hls:f=!0}var p,m={audio_bitrate:t.backbone.getBitrateAtTime(t.backbone.currentTime,"audio")/1e3,auto:f,average_speed:e.average_speed||0,cdn:n.metadata?n.metadata.cdn:"akamai",delivery:"live"!==Vc[a]?Vc[a]:"dash",dropped_frames:D,dropped_frame_percent:j,event_time:d+md(h),ended:M,forced_embed_quality:R,fullscreen:C,highest_available_profile:e.highest_available_profile?String(e.highest_available_profile):null,highest_profile:e.highest_profile?String(e.highest_profile):null,max_speed:isFinite(e.max_speed)?e.max_speed:0,mime:n.mime||null,min_speed:isFinite(e.min_speed)?e.min_speed:0,most_used_profile:e.most_used_profile?String(e.most_used_profile):null,origin:n.metadata?n.metadata.origin:"",profile_id:l?String(l):null,codec:ku(g)?"":Sh(g.codecs),quality:g?g.quality:null,quality_downswitch_count:I,quality_upswitch_count:O,quality_switch_count:O+I,separate_av:v,target_profile_id:G,ttfb:nt(),video_bitrate:t.backbone.getBitrateAtTime(t.backbone.currentTime,"video")/1e3,video_duration:fc(t.config.video.duration),video_file_id:Number.isInteger(Number(o))?parseInt(o,10):null};i.get(Hl)&&(m.ecdn=!!t.config.video.p2p,m.ecdn&&(m.ecdn_peers=null==(p=window.Streamroot)?void 0:p.instances[0].stats.realtime.dnaSources));return m}(),function(){var n={};if(t.config.request.ab_tests)for(var i in t.config.request.ab_tests){var e=t.config.request.ab_tests[i];for(var r in n["".concat(i,"_test")]=1,n["".concat(i,"_group")]=e.group,e.data)n["".concat(i,"_data_").concat(r)]=e.data[r]}return n}())}function nt(){var t=-1;if(void 0!==window.performance&&"function"==typeof window.performance.getEntriesByType){var n=window.performance.getEntriesByType("resource");if(n){var i=n.filter((function(t){return null!==t.name.split("?")[0].match(/\.m4s$|\.ts$/)}));t=i.map((function(t){return t.responseStart-t.connectStart})).reduce((function(t,n){return t+n}),0)/(i.length||1)}}return fc(t,2)}function it(t){var n=t.url,i=-1;if(window.performance){var e=window.performance.getEntriesByType("resource");if(e.length){var r=e.filter((function(t){return t.name===n})).sort((function(t,n){return t.connectStart-n.connectStart}));if(r.length){var o=r[r.length-1];i=o.responseStart-o.connectStart}}}return fc(i,2)}h=wd(),d=t.config.request.timestamp,o=new Xc(function(){var n="?beacon=1&session-id=".concat(t.config.request.session);return t.config.request.urls.fresnel+n}()),t.events.on(Pc.bs,(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{final:!0},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e={error_type:t,error_reason:i};u.handleExternalError(e,n)})),t.events.on(Sc.$a,(function(){A=!1})),t.events.on(Sc.Ha,(function(){$=!0})),t.events.on(Pc.vl,(function(t,n){Z(nl.ERROR_LINK_PRESSED,{error_type:n,error_url:t})})),t.events.on(Pc.cc,(function(){C=!0,Z(nl.VIDEO_FULLSCREEN_CHANGE)})),t.events.on(Pc.fc,(function(){C=!1,Z(nl.VIDEO_FULLSCREEN_CHANGE)})),t.events.on(Pc.Dl,(function(t,n){Z(t?nl.ALERT_DISPLAYED:nl.ALERT_HIDDEN)})),t.events.on(Pc.Jc,(function(){d=t.config.request.timestamp,h=wd(),v=!1,p=!0,m=!1,w=!1,b="auto",g={},y={},_=null,k=null,E=null,T=[],x=null,S={},A=!1,M=!1,R="none",C=!1,O=0,I=0,j=0,D=0,L=null,P=null,F=null,B=null,z=null,G=null,Y=0,u&&(u.reset(),X())})),t.events.on(Pc.Ds,(function(){W={seek_type:"nudge"}})),t.events.on(Pc.Gs,(function(t,n){W={seek_type:n}})),t.events.on(Pc.Hs,(function(t){W={seek_type:"chapter-".concat(t)}})),t.events.on(Pc.al,(function(t){Z(nl.OUTRO_VIDEO_SELECTED,{selected_video_id:t})})),t.events.on(Uo,(function(){A||kl.isCastConnected||(t.performDelegateAction(Nc,(function(t){A=!0,s.then((function(){return u.logStartRequest()})).catch((function(){}))})),Mh(t.config,"chunk_logging").group&&t.config.request.urls.fresnel_manifest_url&&function(t,n,i,e){var r=Date.now(),o=[{uuid:dc(),created_at:r,event:{name:"session_manifest",version:1,ts_ms:r,fields:{sessionID:n,manifest:i}},tracker:{name:"vimeo-player",version:e}}];new Xc(t).logRequestPromiseWithUrl(t,JSON.stringify(o),!0)}(t.config.request.urls.fresnel_manifest_url+"?beacon=1",t.config.request.session,t.backbone.manifest,el(t.config)))})),t.events.on(Pc.gc,(function(t){"email-capture"===t&&Z(nl.SLATE_DISPLAYED,{slate_type:"email"})})),t.events.on(Pc.Is,(function(t,n){Z(nl.VIDEO_PLAYBACK_RATE_CHANGED,{previous_playback_rate:n})})),t.events.on(Pc.Cs,(function(t){Z(nl.CLICK,{click_target:t})})),t.events.on(Sc.Ya,(function(n){"auto"!==n&&(p=!1),t.backbone.video.currentFile.mime===xc.dash&&("auto"===n||m?"auto"===n&&m&&!w&&(Z(nl.VIDEO_SWITCH_BACK_TO_AUTO,{quality:b,auto:1}),w=!0):(Z(nl.VIDEO_SWITCH_FROM_AUTO,{quality:n,auto:0}),m=!0),b=n)})),t.events.on(Sc.rs,(function(t){x!==t&&(x=t,Z(nl.CAPTIONS_ENABLED,{captions_id:String(t)}))})),t.events.on(Sc.os,(function(){x&&(x=null,Z(nl.CAPTIONS_DISABLED))})),t.events.on(gl.connected,(function(){Z(nl.CHROMECAST_CONNECTED)})),t.events.on(gl.disconnected,(function(){Z(nl.CHROMECAST_DISCONNECTED)})),t.events.on(yi.STREAM_CHANGE,(function(t,n,i){g=t;var e=t.profile?t.profile:t.id,r=pd();if(y[e]=y[e]||[],_){var o=y[_].length-1;y[_][o]&&(y[_][o].end=r)}k&&(i[n].bitrate>k?O+=1:I+=1),y[e].push({start:r}),S[e]={bitrate:i[n].bitrate,width:i[n].width,height:i[n].height},Z(nl.VIDEO_STREAM_CHANGE,{previous_audio_bitrate:E/1e3,previous_video_bitrate:k/1e3,previous_profile_id:String(_)}),_=e,k=i[n].bitrate,E=i[n].audioBitrate})),t.events.on(yi.STREAM_TARGET_CHANGE,(function(t){t&&(G=String(t.profile||"")||null)})),t.events.on(Ho,(function(t){R=t})),t.events.on(wi.PLAYING,(function(){$=!1})),t.events.once(Pc.Os,(function(){v=!0})),t.events.on(Pc.Ul,(function(){Z(nl.AD_BUFFERING)})),t.events.on(Pc.Bl,(function(){Z(nl.AD_COMPLETE)})),t.events.on(Pc.Hl,(function(){Z(nl.AD_CLICKED)})),t.events.on(Pc.zl,(function(t){Z(nl.AD_ERROR,{error_type:t.errorType,error_reason:t.errorReason})})),t.events.on(Pc.ql,(function(){Z(nl.AD_PAUSED)})),t.events.on(Pc.Wl,(function(){Z(nl.AD_RESUMED)})),t.events.on(Pc.Gl,(function(t){Z(nl.AD_STARTED,{startup_duration:t.time?fc(t.time/1e3,2):null})})),t.events.on(Pc.$l,(function(){Z(nl.AD_SKIPPED)})),t.events.on(Pc.ks,(function(){ys.iPhone&&u.setDisplayContext(1)})),t.events.on(Pc.Es,(function(){ys.iPhone&&u.setDisplayContext(0)})),t.events.on(yi.DROPPED_FRAMES,(function(t){var n=t.dropped/t.total*100;j=Math.round(100*n)/100,D=t.dropped})),t.events.on(yi.BANDWIDTH,(function(t){var n=t.speed;T.push(n),T.length>500&&T.shift()})),t.events.on(yi.MANIFEST_TIMEOUT,(function(){Z(nl.VIDEO_MANIFEST_TIMEOUT)})),t.events.on(yi.MANIFEST_LOADED,(function(){Z(nl.VIDEO_MANIFEST_LOADED)})),t.events.on(yi.DOWNLOAD_END,c),t.events.on(yi.DOWNLOAD_TIMEOUT,(function(){Z(nl.DOWNLOAD_TIMEOUT)})),t.events.on(yi.SCANNER_CHANGE,(function(){B=null})),t.events.on(yi.AV_DURATION_MISMATCH,(function(t){Z(nl.VIDEO_DURATION_MISMATCH,{duration_difference:Math.round(100*t)/100})})),t.events.on(yi.QUOTA_EXCEEDED_ERROR,(function(t){var n=t.buffered,i={error_type:yi.QUOTA_EXCEEDED_ERROR};i.buffered=fc(dt(0,n),2),i.bytes_loaded=Y,Z(nl.VIDEO_PLAYBACK_ERROR,i)})),t.events.on(Ei.MEDIASESSION_PLAY,(function(){Z(nl.MEDIASESSION_PLAY)})),t.events.on(Ei.MEDIASESSION_PAUSE,(function(){Z(nl.MEDIASESSION_PAUSE)})),t.events.on(Ei.MEDIASESSION_SEEK_FORWARD,(function(){Z(nl.MEDIASESSION_SEEK_FORWARD)})),t.events.on(Ei.MEDIASESSION_SEEK_BACKWARD,(function(){Z(nl.MEDIASESSION_SEEK_BACKWARD)})),t.events.on(Fc.Ha,(function(){W={seek_type:"api"}})),t.events.on(Fc.Jl,(function(){K=!0})),t.events.on(Fc.Xl,(function(){K=!0})),t.events.on(ki.WEBVR_HARDWARE_AVAILABLE,(function(t){Z(nl.WEBVR_HARDWARE_AVAILABLE,{vr_hardware:t.displayName})})),t.events.on(ki.WEBVR_ENTER,(function(){Z(nl.ENTER_WEBVR,!0)})),t.events.on(ki.WEBVR_EXIT,(function(){Z(nl.EXIT_WEBVR,!0)})),t.events.on(Ti.BRAIN_ML_MODEL_INPUTS,(function(n){var i;(null==(i=n.geolocation)?void 0:i.length)&&n.geolocation[0].length?n.geolocation=n.geolocation[0][0]:n.geolocation="",t.config.request.urls.fresnel_mimir_inputs_url&&function(t,n,i,e){var r={chunk_request_id:i.chunkRequestID,duration:i.duration,available_qualities:i.availableQualities,next_chunk_sizes:i.nextChunkSizes,last_buffer_sizes:i.lastBufferSizes,last_chunk_download_times:i.lastChunkDownloadTimes,last_chunk_sizes:i.lastChunkSizes,last_chunk_qualities:i.lastChunkQualities,num_remaining_chunks:i.numRemainingChunks,last_playback_heads:i.lastPlaybackHeads,geolocation:i.geolocation,session_id:n},o=Date.now(),u=[{uuid:dc(),created_at:o,event:{name:"mimir_inputs",version:1,ts_ms:o,fields:r},tracker:{name:"vimeo-player",version:e}}];new Xc(t).logRequestPromiseWithUrl(t,JSON.stringify(u),!0)}(t.config.request.urls.fresnel_mimir_inputs_url+"?beacon=1",t.config.request.session,n,el(t.config))})),(s=new r((function(n,i){var e;(null==(e=t.backbone)?void 0:e.video)&&n(),t.events.on(Vo,n)}))).then(J).catch((function(){})),t.events.on(Pc.dl,J),Th.getFirstConsistentlyInteractive().then((function(t){z=fc(t)})).catch((function(){}))}var Ch=function(){function t(t,n,i){this.player=t,this.element=n,this.store=i,this.muxClient=null,this.xf()&&(Math.random()>.75||this.Sf())}var n=t.prototype;return n.Af=function(){return!!this.player.config.request.flags.ott},n.xf=function(){return!(this.player.doNotTrackEnabled||!this.Af()&&!this.store.get(Hl))},n.Sf=function(){var t=this;if(!document.getElementById("vp-mux-client")){var n=document.createElement("script");n.setAttribute("id","vp-mux-client"),n.setAttribute("src",this.player.config.request.urls.mux_url),n.onreadystatechange=n.onload=function(){t.Mf(),t.store.get(Hl)||t.Rf()},document.getElementsByTagName("head")[0].appendChild(n)}},n.Mf=function(){var t=this;this.player.events.on(Pc.Jc,(function(n){if(t.xf()&&n&&"undefined"!=typeof mux){var i=t.player.backbone.video?t.player.backbone.video.currentFile:{},e=t.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];mux.emit(e,"videochange",{video_title:t.player.config.video.title,video_id:t.player.config.video.id,video_duration:1e3*t.player.config.video.duration,video_cdn:i.metadata?i.metadata.cdn:"akamai",video_stream_type:t.store.get(Hl)?"live":"vod",viewer_user_id:t.player.config.request.session})}})),this.player.events.on(tu.STREAM_ONLINE,(function(){t.Rf()})),this.player.events.on(tu.STREAM_OFFLINE,(function(){var n=t.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];mux.emit(n,"ended")}))},n.Rf=function(){if("undefined"!=typeof mux){var t=this.player.backbone.video?this.player.backbone.video.currentFile:{},n=this.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];null!==this.muxClient&&mux.destroyMonitor(n);var i="dev"===this.player.config.request.build.js?"6eq01ih8u9u8fkk4hbindded5":"73cngs5ov03sbnck36isdkndt";this.store.get(Ul)&&(i="dev"===this.player.config.request.build.js?"kghblrf3bb9uk33lv58ompm3k":"md0ig7ssl8unl2kpl0h6p0drn");var e={property_key:i,player_name:"Vimeo Player",player_init_time:Date.now(),player_version:el(this.player.config),video_title:this.player.config.video.title,video_id:this.player.config.video.id,video_duration:1e3*this.player.config.video.duration,video_cdn:t.metadata?t.metadata.cdn:"akamai",video_stream_type:this.store.get(Hl)?"live":"vod",viewer_user_id:this.player.config.request.session};this.Af()&&(e.property_key="dev"===this.player.config.request.build.js?"3tb8rggvj5m71caj9jfpiidos":"lrc6o7kvhc6npvqq2r5iks5u4",this.player.config.ott&&(e=Object.assign(e,this.player.config.ott))),this.muxClient=mux.monitor(n,{debug:!1,minimumRebufferDuration:500,data:e})}},t}();function Oh(t){var n,i,e,o,u,a="https://collector.vhx.tv/events.gif",s=new Xc(a),c=t.config.ott||{};function l(){c=t.config.ott||{},e=null,o=null,u=null,i=!1,n=!1}function f(i,e){(e=Object.assign({},e,{name:c.video_title,user_id:c.viewer_user_id,channel_id:c.video_series,user_agent:navigator.userAgent,url:top===self?window.location.href:document.referrer,referrer:t.config.request.referrer,session_id:t.config.request.session,device:"html5"},{type:"video",video_id:c.video_id,current_src:t.backbone.currentFile.src,current_subtitle:"none",current_type:c.video_content_type,duration:c.video_duration,is_drm:t.config.request.drm?1:0,is_fullscreen:n?1:0,is_trailer:c.is_trailer?1:0,is_chromecast:kl.isCastConnected?1:0,is_live:t.config.video.live_event,seconds:10,timecode:t.currentTime})).name=i,void 0===e.timestamp&&(e.timestamp=Math.round(.001*Date.now()));var r=pt(a,e);return s.logRequestPromiseWithUrl(r,{},!0,"GET").catch((function(t){}))}function d(){t.events.on(wi.ENDED,h),t.events.on(wi.ERROR,v),t.events.on(wi.PAUSE,p),t.events.on(wi.PLAY,m),t.events.on(wi.SEEKED,w),t.events.on(wi.WAITING,b),t.events.on(Pc.cc,g),t.events.on(Pc.fc,y),t.events.on(Pc.Ul,_),t.events.on(Pc.Bl,k),t.events.on(Pc.Hl,E),t.events.on(Pc.zl,T),t.events.on(Pc.ql,x),t.events.on(Pc.Wl,S),t.events.on(Pc.Gl,A),t.events.on(Pc.$l,M)}function h(){clearTimeout(u),f("ended")}function v(){clearTimeout(u),f("error")}function p(){clearTimeout(u),f("pause")}function m(){if(function t(){o=Date.now(),clearTimeout(u),u=setTimeout((function(){!function(t){var n=t.elapsedTime,i=Math.round(.001*n);null!==e&&e(),f("timeupdate",Object.assign({seconds:i}))}({elapsedTime:Date.now()-o}),t()}),1e4)}(),!i)return i=!0,void f("firstplay");f("play")}function w(){f("seeked")}function b(){f("waiting")}function g(){n=!0}function y(){n=!1}function _(){f(nl.AD_BUFFERING)}function k(){f(nl.AD_COMPLETE)}function E(){f(nl.AD_CLICKED)}function T(){f(nl.AD_ERROR)}function x(){f(nl.AD_PAUSED)}function S(){f(nl.AD_RESUMED)}function A(){f(nl.AD_STARTED)}function M(){f(nl.AD_SKIPPED)}return l(),t.config.ott?d():new r((function(n,i){t.ottVideoMetadata?n():t.events.on(Pc.rl,(function(t){n()}))})).then((function(){c=t.ottVideoMetadata,d()})).catch((function(t){})),t.events.on(Pc.Jc,l),{reset:function(){clearTimeout(u),o=null,u=null}}}var Ih=function(t){return function(n){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];return e.forEach((function(i){for(var e in i){var r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,Object.assign(r,t))}})),n}}({enumerable:!0,configurable:!0,writeable:!1});function jh(t,n){var i,e,r,o,u,a=nt();function s(t){var r=new i.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.uiElements=[],e=t.getAdsManager(n.videoPlayer,r),a.fire("ads-manager-loaded"),e.addEventListener(i.AdErrorEvent.Type.AD_ERROR,w),e.addEventListener(i.AdEvent.Type.CONTENT_PAUSE_REQUESTED,c),e.addEventListener(i.AdEvent.Type.CONTENT_RESUME_REQUESTED,l),e.addEventListener(i.AdEvent.Type.AD_BUFFERING,f),e.addEventListener(i.AdEvent.Type.STARTED,d),e.addEventListener(i.AdEvent.Type.COMPLETE,h),e.addEventListener(i.AdEvent.Type.CLICK,v),e.addEventListener(i.AdEvent.Type.SKIPPED,p),e.addEventListener(i.AdEvent.Type.ALL_ADS_COMPLETED,m)}function c(t){a.fire("content-pause-requested",t)}function l(t){a.fire("content-resume-requested",t)}function f(t){a.fire("ad-buffering",t)}function d(t){a.fire("ad-started",t)}function h(t){a.fire("ad-complete",t)}function v(t){e.pause(),a.fire("ad-click",t)}function p(t){a.fire("ad-skipped",t)}function m(t){a.fire("all-ads-completed",t)}function w(t){a.fire("ad-error",t.getError()),e&&e.destroy()}var b={start:function(t,n){return u.initialize(),e.init(t,n,i.ViewMode.NORMAL),e.start()},stop:function(){return e.stop()},pause:function(){return e.pause()},play:function(){return e.resume()},skip:function(){return e.skip()},resize:function(t,n,r){return r?e.resize(t,n,i.ViewMode.FULLSCREEN):e.resize(t,n,i.ViewMode.NORMAL)},destroy:function(){a.off(),e.destroy(),r.destroy(),u.destroy()},get volume(){return e.getVolume()},set volume(t){e.setVolume(t)},get adsManager(){return e},get adsLoader(){return r},get remainingTime(){return e.getRemainingTime()},setContentComplete:function(){r.contentComplete()},on:function(t,n){return a.on(t,n),this},off:function(t,n){return a.off(t,n),this}};return function(t,n,i){if(document.getElementById("vp-ima-sdk"))i();else{var e=document.createElement("script");e.id="vp-ima-sdk",e.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",e.onreadystatechange=e.onload=function(){i&&i()},document.getElementsByTagName("body")[0].appendChild(e)}}(0,0,(function(){i=google.ima;var e=ys.iOS?n.videoPlayer.videoElement:n.videoPlayer;u=new i.AdDisplayContainer(t,e),(r=new i.AdsLoader(u)).addEventListener(i.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,s),r.addEventListener(i.AdErrorEvent.Type.AD_ERROR,w),o=new i.AdsRequest,n.adUrl&&(o.adTagUrl=n.adUrl),o.linearAdSlotWidth=n.width.linear,o.linearAdSlotHeight=n.height.linear,o.nonLinearAdSlotWidth=n.width.nonlinear,o.nonLinearAdSlotHeight=n.height.nonlinear,r.requestAds(o)})),Ih(this,b)}function Dh(t,n){var i,e,o,u,a,s,c,l,f,d,h,v,p=!1,m=nt(),w={};function b(){e&&(C(),e=null),u&&(u.destroy(),u=null),o&&clearInterval(o),a=null,s=!1,c=!1,f=!1,l=!1,d=!1,p=!1,v=new r((function(t,n){h=t})),t.events.once(Uo,(function(){d=!0})),t.events.on(wi.ERROR,(function(t){!t||"NotAllowedError"!==t.name&&"AbortError"!==t.name||(d=!1)})),(i=document.querySelector(".vp-ads-wrapper"))||((i=document.createElement("div")).classList.add("vp-ads-wrapper"),document.querySelector(".player").appendChild(i),i.innerHTML=dd.render("adcountdown")),e=i.querySelector(".vp-ads-tag"),w={adCode:t.config.request.ads.adcode||null,adUnit:t.config.request.ads.adunit||null,adUrl:t.config.request.ads.adurl||null,videoPlayer:t.backbone,width:{linear:488,nonlinear:488},height:{linear:252,nonlinear:150}},(u=new jh(i,w)).on("ads-manager-loaded",(function(){u.on("ad-buffering",g),u.on("ad-complete",_),u.on("ad-click",y),u.on("ad-error",k),u.on("ad-started",E),u.on("ad-skipped",T),u.on("all-ads-completed",x),u.on("content-pause-requested",S),u.on("content-resume-requested",A),function(){if(!d){if(p)return;t.events.once(Uo,(function(){h(),d=!0}))}v.then(I).catch((function(t){})),t.events.on(wi.ENDED,(function(){p||(s=!0,u.setContentComplete())}))}(),t.store.watch("ui.player.width",j),t.events.on(Pc.cc,j,!0),t.events.on(Pc.fc,j,!1),d&&h()}))}function g(){c&&t.events.fire(Pc.Ul)}function y(){t.events.fire(Pc.Hl)}function _(){ys.iPhone&&t.backbone.addVideoEventListeners(),o&&clearInterval(o),c=!1,t.events.fire(Pc.Bl)}function k(n){var i={errorType:n.o,errorReason:n.l};t.events.fire(Pc.zl,i),"adPlayError"===i.errorType&&t.events.fire(Pc.Es)}function E(n){ys.iPhone&&t.backbone.removeVideoEventListeners();var e=n.getAd();e.isLinear()&&(o=setInterval((function(){var t="AD "+function(t){if(t<0)return"00:00";var n=Math.floor(t/60),i=Math.round(t%60);return(n=n<10?"0"+n:n)+":"+(i<10?"0"+i:i)}(u.remainingTime);i.querySelector(".vp-ads-countdown").innerHTML=t}),1e3),setTimeout(R,1e3)),c=!0;var r={type:e.isLinear()?"linear":"nonlinear"};a&&(r.time=Date.now()-a,a=null),t.events.fire(Pc.Gl,r)}function T(n){t.events.fire(Pc.$l,n)}function x(n){f=!0,ys.iPhone||u.destroy(),t.events.fire(Pc.Kl,n)}function S(){t.events.fire(Pc.ks),a=Date.now(),s||(l=!0,t.backbone.paused?t.events.once(wi.PLAYING,(function(){t.backbone.pause()})):t.backbone.pause())}function A(){C(),t.events.fire(Pc.Es),ys.iPhone&&f&&u.destroy(),s||M()}function M(){l=!1,t.backbone.play()}function R(){(e=i.querySelector(".vp-ads-tag")).classList.remove("hidden"),e.removeAttribute("hidden")}function C(){e.classList.add("hidden"),e.setAttribute("hidden","")}function O(){return{width:n.getBoundingClientRect().width,height:n.getBoundingClientRect().height}}function I(){var n=O(),i=n.width,e=n.height;try{u.start(i,e)}catch(n){s&&t.events.fire(Pc.Bl),l&&M()}}function j(t){var n=O(),i=n.width,e=n.height;u.resize(i,e,t)}var D={pause:function(){return t.events.fire(Pc.ql),u.pause()},play:function(){return t.events.fire(Pc.Wl),u.play()},get volume(){return u.volume},set volume(t){u.volume=t},toggleCastingState:function(t){(p=!!t)&&u.destroy()},events:m};return b(),t.events.on(Pc.Jc,b),D}function Lh(t){var n=t.element,i=t.delegate,e=void 0===i?{}:i,o=t.cssLoadedPromise,u=void 0===o?r.resolve(null):o,a=t.name,s=void 0===a?null:a;za(al);var c=$s(cd,Ks((function(t){return function(){var n=t.apply(void 0,arguments),i=Qs();function e(t,n){return u(t,(function(t){var e=i.get({selector:t,listener:n});if(!e){var r=o(t,n);e=i.insert({selector:t,listener:n,unsubscribe:r})}return e.unsubscribe}))}function r(t,n){return u(t,(function(t){var e=i.get({selector:t,listener:n});return e&&e.unsubscribe()}))}function o(t,i){var e=t(n.getState());return n.subscribe((function(){var r=t(n.getState());if(e!==r){var o=e;i(e=r,o,n.getState())}}))}function u(t,i){return(t=[].concat(t)).map((function(t){return i(n.createGetter(t))}))}return W({},n,{watch:e,unwatch:r})}}),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){return function(){var i=n.apply(void 0,arguments);function e(){return t}var r=Ku((function(t){if(jt(t))return t;var n=na(e(),t);return jt(n)?n:function(n){return na(n,t)}}));function o(t,n){var e=(t=r(t))(i.getState());return void 0!==n&&(e=lf(e,n)),e}return W({},i,{getSelectors:e,createGetter:r,get:o})}}}(ld),Js.apply(void 0,[]))),l=new L,f=nt(),d=new sl({events:f}),h=dc();n.classList.add("player-".concat(h)),n.classList.add("loading"),n.id||(n.id="player".concat(h)),n.innerHTML=dd.render("outer",{strings:{back:"Retour",close:"Fermer lincrustation"}});var v=n.querySelector(".vp-telecine");if(ys.iOS){var p=document.createElement("video");v.appendChild(p);try{p.setAttribute("muted",""),p.setAttribute("playsinline",""),p.load()}catch(t){al.captureException(t)}}var m,w,b,g,y,_=null,k=null,E=null,T=null,x=null,S=null,A={},M=new r((function(t,n){y=t})).then((function(){return f.fire(Pc.ue),null})),R={get config(){return d.config},set config(t){d.config=t},get delegate(){return e},set delegate(t){e=t},ready:function(t){if(!t)return M;M.then((function(){return t()})).catch((function(t){al.captureException(t)}))},get sessionId(){return d.config.request.session}};function C(t){var n=t.old,i=t.loaded;if(function(t,n){t&&s&&"".concat(s," ")}(!n),window.parent!==window){var e,r="Private Video on Vimeo";1!==i.view&&3!==i.view||(r="".concat(i.video.title," from ").concat(i.video.owner.name," on Vimeo")),document.title=r,(null==(e=history)?void 0:e.replaceState)&&i.video&&n&&history.replaceState({id:i.video.id},"","/video/".concat(i.video.id).concat(window.location.search))}if(1!==i.view&&3!==i.view)throw new Error("Config not authorized: ".concat(i.view));(null==n?void 0:n.embed)&&n.embed.color!==i.embed.color&&f.fire(Sc.Xa,i.embed.color),T&&T.reset();var o=!n||!n.video||n.video.id!==i.video.id||n.video.version.current!==i.video.version.current;return function(t){ut=t.substring(0,t.lastIndexOf("/")+1)}(i.request.urls.js),m=null,b=_,f.fire(Sc.$a),c.dispatch(Il(i)),f.fire(Pc.Jc,o,i),t}function O(t){if("opacity"===t.propertyName){var n=document.querySelector(".vp-placeholder");n&&(ef(n).off("transitionend",O),n.parentNode.removeChild(n))}}function I(){!function(){var t=document.querySelector(".vp-placeholder");t&&(ef(t).on("transitionend",O),t.classList.add("vp-placeholder-fadeout"))}(),n.classList.remove("loading"),y()}function j(t){return u.then((function(){if(N(t),k&&k.resetThumbnail(),"function"!=typeof A.authorizationHandler)throw new Error("Config was not authorized.");return A.authorizationHandler(I)})).then((function(t){return d.config=t,m=null,c.dispatch(Il(d.config)),f.fire(Sc.$a),f.fire(Pc.Jc,!0,d.config),t}))}function D(t){(function(){var t=document.location.hash,n=function(t){var n,i=t.match(/\ba?t=([0-9hms:]+)/);null!==i&&(t=i[1]);var e=!1,r=0,o=0,u=0;if((null==(n=i=t.match(/^([0-9]+)$/))?void 0:n.length)&&(e=!0,u=i[1]),!1===e&&null!==(i=t.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s)?/))&&""!==i[0]){e=!0;var a=Q(i,4),s=a[1];r=void 0===s?0:s;var c=a[2];o=void 0===c?0:c;var l=a[3];u=void 0===l?0:l}if(!1===e&&null!==(i=t.match(/^([0-9:]+)/))){e=!0;var f=Q(t.split(":").reverse(),3);u=f[0];var d=f[1];o=void 0===d?0:d;var h=f[2];r=void 0===h?0:h}return e?60*parseInt(r,10)*60+60*parseInt(o,10)+parseInt(u,10):null}(t);null!==n&&(d.config.embed.time=uc(n,0,d.config.video.duration),-1!==t.indexOf("at=")&&history&&history.replaceState&&history.replaceState("","",window.location.pathname+window.location.search))})(),f.on(Pc.Wc,(function(t){d.reload().then((function(n){if(!d.config.user.logged_in)return f.fire(Pc.Kc),n;switch(f.fire(Pc.Gc,t),t){case"like":d.config.user.liked&&f.fire(Pc.Bc);break;case"watch-later":d.config.user.watch_later&&f.fire(Pc.zc);break;case"private":f.fire(Pc.Zc)}return n})).catch((function(t){al.captureException(t)}))})),f.on(Pc.$c,(function(){d.reload().catch((function(t){al.captureException(t)}))})),function(t){var i,e;new qd(t,c,n),k=new El(t,c,n.querySelector(".vp-preview")),f.on([yi.BUFFER_ENDED,wi.PLAYING],(function(){k.hide()})),_=new us(v,d.config),b=_,new Gl(t,c,n.querySelector(".vp-video-wrapper")),new fd(t,c,n.querySelector(".vp-captions")),new hd(n,f),P(t),t.doNotTrackEnabled||(d.config.request.urls.test_imp&&function(t,n){if(t.config.request.ab_tests){var i=new Xc(n);for(var e in t.config.request.ab_tests){var r=t.config.request.ab_tests[e];if(r.track){var o={session_id:t.config.request.session,test_id:e,test_group:String(r.group)};i.log(o,!0,!1).catch((function(t){}))}}}}(t,"".concat(d.config.request.urls.test_imp,"?beacon=1")),new Rh(t,n,c,d.config.request.urls.fresnel),new cf(t,c),new Ch(t,n,c),new Oh(t)),T=new Ml(t),(t.config.request.flags.ott||(null==(i=t.config.request.ab_tests)||null==(e=i.chromecast)?void 0:e.group))&&function(t){if(!t.config.video.spatial&&"stock"!==t.config.video.privacy){var i=new yl({textAlert:new Eh(n),player:t});kl.init({chromecastPlayer:i}),kl.on([gl.error,gl.mediaLoadedFailed],(function(t){al.captureException(t)}))}}(t),N(t)}(t)}function N(t){E||(E=new kh(t),vd(R,E),Xd(al))}function P(t){var i=d.config.request.ads;i&&(i.adcode&&i.adunit||i.adurl)&&(x=new Dh(t,n.querySelector(".vp-video-wrapper")),f.on(Pc.ks,(function(){b=x,f.fire(Pc.El)})),f.on(Pc.Es,(function(){b=_,f.fire(Pc.El)})),kl&&(kl.on(gl.connected,(function(){x.toggleCastingState(!0)})),kl.on(gl.disconnected,(function(){x.toggleCastingState(!1)}))))}function F(t,n){var i=t;return isNaN(t)&&"string"!=typeof t||(i=cc(sc(t),t,n)),i}var V={get store(){return c},get config(){return d.config},get element(){return n},get events(){return f},get uuid(){return h},get expose(){return R},get backbone(){return _},get adHandler(){return x},get displayContext(){return b},get preview(){return k},get doNotTrackEnabled(){return d.config.embed.dnt||d.config.request.flags.dnt},get playLoggingEnabled(){return d.config.embed.log_plays&&d.config.request.flags.plays},get currentTime(){return kl.isCastConnected?kl.chromecastPlayer.lastCurrentTime:_.currentTime},get ottVideoMetadata(){return S},set ottVideoMetadata(t){S=t},init:function(t,n){return w||(A=n,w=d.load(t).then(C).catch((function(t){return j(V)})).then((function(){return"function"==typeof A.initializationHandler?r.resolve(n.initializationHandler()):null})).then((function(){return D(V),"function"==typeof A.postInitializationHandler?r.resolve(n.postInitializationHandler()):null})).then((function(){return r.all([k.thumbnailPromise,u])})).then(I).then((function(){return al.setUp(V),null})).catch((function(t){al.captureException(t)})))},loadVideo:function(t,i){if(g===t&&m)return m;if(k&&k.resetThumbnail(),null==i?void 0:i.video_version){var e=d.config.video.version.available;if(!e||!Array.isArray(e))return r.reject("No available video versions");if(-1===(e=e.map((function(t){return t.id}))).indexOf(i.video_version))return r.reject("Invalid version id specified")}f.fire(Pc._loadVideo),g=t,n.classList.add("loading");var o=F(t,i),u=l.get(o);return t=u?u.Cf.loaded:t,m=d.load(t,i).then((function(t){if(u){var n=_.element;(_=u.Of).element.style.visibility="visible",n.parentNode.replaceChild(_.element,n),f.fire(Pc.dl)}return t=C(t),x||P(V),t})).catch((function(t){return j(V)})).then((function(t){var n=k.loadThumbnail();return r.resolve(n)})).then(I)},preloadVideo:function(t,n,i){var e=F(n,i),o=l.get(e);return o?r.resolve(o):new sl({events:f}).load(n,i).then((function(n){var i=_.element.cloneNode(!1);i.style.visibility="hidden",_.element.parentNode.insertBefore(i,_.element);var r=new us(i,n.loaded);r.loadVideo(n.loaded),r.preload=t;var o={Of:r,Cf:n};return l.set(e,o),o}))},performDelegateAction:function(t){var n,i,r,o,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];null!=(n=e)&&n[t.will]&&!1===(r=(o=e)[t.will].apply(o,[d.config.video.id].concat(tt(a))))||(u.apply(void 0,[d.config.video.id].concat(tt(a),[r])),(null==(i=e)?void 0:i[t.did])&&e[t.did]())},ready:function(){return M},verifyConfig:function(){return d.verify()},updatePhpTokens:function(){return new r((function(t,n){var i=d.config.user,e=i.vimeo_api_client_token,r=i.vimeo_api_interaction_tokens,o=i.vimeo_live_client_token,u=i.vimeo_bucketed_live_client_token,a=!1;if(e)try{a=bd(JSON.parse(atob(e.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP client token expiration"))}if(r)try{var s=JSON.parse(atob(r.likes.split(".")[1])).exp,c=JSON.parse(atob(r.watch_later.split(".")[1])).exp,l=JSON.parse(atob(r.following.split(".")[1])).exp;a=bd(s)>=0||bd(c)>=0||bd(l)>=0}catch(t){return void n(new Error("Failed to parse PHP interaction tokens expiration"))}if(o)try{a=bd(JSON.parse(atob(o.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP Live token expiration"))}if(u)try{a=bd(JSON.parse(atob(u.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP Live token expiration"))}if(a){var f=d.config.request,h=f.signature,v=f.session,p=f.timestamp,m=f.expires;Ke("https://".concat(d.config.player_url,"/video/").concat(d.config.video.id,"/token/refresh?signature=").concat(h,"&session=").concat(v,"&time=").concat(p,"&expires=").concat(m),{withCredentials:!0}).json().then((function(n){return d.config.user.vimeo_api_client_token=n?n.vimeo_api_client_token:null,d.config.user.vimeo_api_interaction_tokens=n?n.vimeo_api_interaction_tokens:null,d.config.user.vimeo_live_client_token=n?n.vimeo_live_client_token:null,d.config.user.vimeo_bucketed_live_client_token=n?n.vimeo_bucketed_live_client_token:null,t()})).catch((function(t){al.captureBreadcrumb("Failed to refresh JWT token",{},"auth","error"),n(t)}))}else t()}))}};return V}function Nh(t,n,i,e){var r=!1;e="function"==typeof n?i:e,i="function"==typeof n?n:i;var o=function(t){var n=!0;if(t.changedTouches){var o=t.changedTouches[0].pageX-window.pageXOffset,u=t.changedTouches[0].pageY-window.pageYOffset,a=document.elementFromPoint(o,u);null!==a&&this.contains(a)&&(n=i.call(this,t))}return"function"==typeof e&&e.call(this,t),r=!0,n},u=function(t){if(!r)return i.call(this,t);r=!1};(n="function"==typeof n?null:n)?ef(t).on("click",n,u).on("touchend",n,o):ef(t).on("click",u).on("touchend",o)}function Ph(t,n){var i,e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=[],u=!1;function a(){i=c(),r.forEach(v),Nh(i,".js-menuClose",E),ef(window).on("resize",S)}function s(){ef(window).off("resize",S)}function c(){var t=document.createElement("div");return t.innerHTML=dd.render("menu",{strings:{close:"Fermer le menu"}}),t.children[0]}function l(){return i.classList.contains("vp-menu-center")}function f(){return i.classList.contains("vp-menu-fullwidth")}function d(){return i.classList.contains("vp-menu-carousel")}function h(){var t=o.length>1&&!d();o.forEach((function(n){n.setCollapsible(t),n.resetCarousel(d())}))}function v(t){o.push(t),i.insertBefore(t.element,i.lastChild),h(),t.on("open",m),t.on(["open","close"],w),t.on(["openEnd","closeEnd"],b),t.on("select",_)}function p(t){return o.find((function(n){return n.id===t}))}function m(t){o.filter((function(t){return t.isOpen()})).forEach((function(t){return t.close()}))}function w(t){u=!0,A()}function b(t){u=!1}function g(){return n&&"true"===n.getAttribute("aria-expanded")}function y(r){g()||(r=r||n.contains(document.activeElement),n.setAttribute("aria-expanded","true"),i.removeAttribute("hidden"),t.events.fire(Pc.Zs,!0,e),S(),h(),i.classList.remove("vp-menu-hidden"),window.requestAnimationFrame((function(){if(i.classList.remove("vp-menu-invisible"),r){var t=R();t.length>0&&t[0].focus()}})))}function _(){d()||E()}function k(){R().some((function(t){return t===document.activeElement}))&&n.focus()}function E(){g()&&setTimeout((function(){k(),n.setAttribute("aria-expanded","false"),t.events.fire(Pc.Zs,!1,e),i.classList.add("vp-menu-invisible")}),100)}function T(t){i.classList.add("vp-menu-hidden"),i.setAttribute("hidden","")}function x(t){return g()?(E(),!1):(y(t),!0)}function S(){if(!f()){var n=ec(t.element),e=ec(i),r=window.getComputedStyle(i),o=parseFloat(r.fontSize),u=e.bottom-i.scrollHeight,a=Math.max(n.top,0)-u;if(a>0){var s=i.scrollHeight-a-o;return i.style.height="".concat(s/o,"em"),void i.classList.add("vp-menu-scroll")}i.style.height="auto",i.classList.remove("vp-menu-scroll")}}function A(){S(),u&&requestAnimationFrame(A)}function M(){ef(i).on("transitionend",(function(t){this===i&&"opacity"===t.propertyName&&i.classList.contains("vp-menu-invisible")&&T()})),ef(document).on("click",(function(t){null!==n&&(!g()||n.contains(t.target)||i.contains(t.target)||E())})),window.addEventListener("blur",E,!1)}function R(){return o.reduce((function(t,n){return t.concat(n.getTabindexItems())}),[])}return a(),M(),e={element:i,button:n,isCentered:l,isVisible:g,isFullwidth:f,show:y,hide:E,toggle:x,retargetFocusFromChild:k,setPanelModes:h,addPanel:v,getPanel:p,getTabindexItems:R,destroy:s}}var Fh=function(t){return function(n){return null==t?void 0:t[n]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),Vh=/[&<>"']/g,Uh=RegExp(Vh.source);function Bh(t){return(t=_o(t))&&Uh.test(t)?t.replace(Vh,Fh):t}function Hh(t){nt(this);var n,i,e,r=this,o={x:0,y:0},u={x:0,y:0},a={x:0,y:0},s=0;function c(n){t.style["".concat(ys.transitionProperty,"Duration")]=n}function l(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.children.length-1,r=-Math.round(n/d());return Math.min(Math.max(r,i),e)}function f(){return!1}function d(){var n=t.children[0],i=getComputedStyle(n);return n.offsetWidth+parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function h(t){var n=[t.clientX,t.clientY],i=n[0],e=n[1];if(t.targetTouches&&t.targetTouches.length>0){var r=[t.touches[0].pageX,t.touches[0].pageY];i=r[0],e=r[1]}return{x:i,y:e}}function v(t){t.stopImmediatePropagation();var i=h(t),r=i.x,a=i.y;u.x=r-o.x,u.y=a-o.y,n=!1,(e=function(t){return function(n){var i=n?"on":"off",e={pointerdown:["pointermove","pointerup"],MSPointerDown:["pointermove","pointerup"],touchstart:["touchmove","touchend"],mousedown:["mousemove","mouseup"]};ef(window)[i](e[t.type][0],p),ef(window)[i](e[t.type][1],m)}}(t))(!0),c("0ms")}function p(t){var s=h(t),c=s.x,f=s.y;if(a.x=o.x,a.y=o.y,o.x=c-u.x,o.y=f-u.y,Math.abs(o.x-a.x)>=.15*Math.abs(o.y-a.y))return t.preventDefault(),n=!0,r.fire("touchMove"),i=Date.now(),void y(o.x);e(!1),w(l(o.x))}function m(u){if(u.stopImmediatePropagation(),e(!1),n){u.preventDefault();var c=o.x-a.x,f=Date.now()-i+1;return o.x+=50*c/f,w(l(o.x)),void r.fire("touchEnded")}!function(n){n.preventDefault();var i=pc(n.target,t.children);if(-1!==i){if(i!==s)return void w(i);r.fire("tap",i)}}(u)}function w(t){g(t),r.fire("slide",t)}function b(){g(s,"0ms")}function g(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=d();-1!==t&&i>0&&(c(n),o.x=-t*i,y(o.x))}function y(n){var i=l(n,-1,t.children.length);i!==s&&(r.fire("focus",i),s=i),t.style[ys.transformProperty]="translateX(".concat(n,"px)")}return{setUp:function(n){ef(t).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],v),ef(t).on("click","a",f),ef(window).on("resize",b),b(),function(t){void 0!==t&&g(t,"0ms")}(n)},show:function(t){g(vc(t))},resize:b,destroy:function(){ef(t).off(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],v),ef(t).off("click","a",f),ef(window).off("resize",b),t.style.removeProperty(ys.transformProperty)},on:this.on}}function zh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.items.forEach((function(t){void 0!==t.label&&(t.label=Bh(t.label))}));var i,e,r,o,u,a,s=nt(),c=n.id,l=n.items,f=!1;function d(){h(),i=v(),e=i.querySelector(".js-panelItems"),(r=new Hh(e)).on("slide",A),r.on("tap",M),Nh(i,".js-panelTitleButton",S),Nh(i,"li",R),ef(i).on("keydown",C),ef(i).on("keypress",C),ef(i).on("transitionend",(function(t){t.target===i&&(_()?E():x())}))}function h(){n=Object.assign(n,{get active(){return D()?D().label:""}})}function v(){var t=document.createElement("div");return t.innerHTML=dd.render("menu_list_panel",n),t.children[0]}function p(t){var n=V(i.querySelectorAll(".vp-panel-item"));return n[t]||n}function m(t){t!==w()&&(i.classList.toggle("vp-panel-open",!t),i.classList.toggle("vp-panel-collapsible",t),t?e.setAttribute("hidden",""):(e.removeAttribute("hidden"),i.style.removeProperty("height")))}function w(){return i.classList.contains("vp-panel-collapsible")}function b(t){if(f=t,u=i.querySelector(".vp-indicator"),r.destroy(),u.classList.remove("vp-indicator-visible"),f){var n=l.findIndex((function(t){return t.active}));r.setUp(n),g(),u.classList.add("vp-indicator-visible")}}function g(){r.on("touchMove",(function(){u.classList.add("vp-indicator-inactive")})),r.on("touchEnded",(function(){u.classList.remove("vp-indicator-inactive")}))}function y(){i.classList.add("vp-panel-pinTitle")}function _(){return i.classList.contains("vp-panel-open")}function k(){if(w()){s.fire("open",o),t.events.fire(Pc.ec,!0,o),e.removeAttribute("hidden"),i.classList.add("vp-panel-open");var n=window.getComputedStyle(i),r=parseFloat(n.fontSize);i.style.height="".concat(i.scrollHeight/r,"em");var u="".concat(ys.transitionProperty,"Delay");p().forEach((function(t,n){var i=40*n+100;t.style[u]="".concat(i,"ms"),t.classList.add("vp-panel-item-in")}))}}function E(t){s.fire("openEnd",o)}function T(){w()&&(s.fire("close",o),t.events.fire(Pc.rc,!1,o),i.classList.remove("vp-panel-open"),i.style.removeProperty("height"),j())}function x(t){e.setAttribute("hidden",""),p().forEach((function(t,n){t.classList.remove("vp-panel-item-in")})),s.fire("closeEnd",o)}function S(t){return t.preventDefault(),_()?T():k()}function A(t){s.fire("select",l[t].id)}function M(t){s.fire("select",l[t].id)}function R(t){if(!f){var n=pc(t.target,p());s.fire("select",l[n].id)}}function C(t){if("keypress"===t.type&&13===t.which||"keydown"===t.type&&32===t.which){var n=pc(t.target,p());if(-1!==n)return s.fire("select",l[n].id),!1}return null}function O(t){var n=l.findIndex((function(t){return t.active}));if(-1!==n){l[n].active=!1;var e=p(n);e.classList.remove("vp-panel-item-on"),e.setAttribute("aria-checked","false")}var r=l.findIndex((function(n){return"".concat(n.id)==="".concat(t)}));if(-1!==r){l[r].active=!0;var o=p(r);o.classList.add("vp-panel-item-on"),o.setAttribute("aria-checked","true"),i.querySelector(".js-panelStatText").innerHTML=l[r].label}u.classList.remove("vp-indicator-inactive")}function I(t){j(),a=t,t&&p(l.findIndex((function(t){return"".concat(t.id)==="".concat(a)}))).classList.add("vp-".concat(c,"-item-hover"))}function j(){if(a){var t=p(l.findIndex((function(t){return"".concat(t.id)==="".concat(a)})));t.length||t.classList.remove("vp-".concat(c,"-item-hover"))}}function D(){return l.find((function(t){return t.active}))}function L(t){D()&&"auto"!==D().id||(i.querySelector(".js-panelStatText").innerHTML=t)}function N(){return V(i.querySelectorAll('.vp-panel-collapsible button[tabindex="0"], .vp-panel-open li[tabindex="0"]'))}return d(),o={id:c,element:i,setCollapsible:m,resetCarousel:b,pinTitle:y,isOpen:_,open:k,close:T,setActiveItem:O,setHoverState:I,clearHoverState:j,setTitleStat:L,getTabindexItems:N,on:s.on,off:s.off}}function qh(t){var n,i=0,e=!1,r=null,o=null,u=null;function a(){if(ys.touch&&!t.store.get(Hl)&&!t.config.video.spatial){var n=null,a=10;(r=t.element.querySelector(".vp-nudge-wrapper")).classList.remove("hidden"),r.innerHTML=dd.render("nudge"),o=t.element.querySelector(".vp-nudge-forward"),u=t.element.querySelector(".vp-nudge-backward"),Nh(o,(function(t){t.preventDefault(),l("right"),n=setTimeout(f,250)})),Nh(u,(function(t){t.preventDefault(),l("left"),n=setTimeout(f,250)})),t.events.on(Pc.Os,(function(){e=!0}))}function l(t){if(["left","right"].includes(t)){var e="right"===t?s:c,r="right"===t?o:u;i++,clearTimeout(n),i>=2&&(d(r,t,a),2===i&&e(10),e(10*(i-2)),i>2&&(d(r,t,a+=10),i=2))}}function f(){i>=2&&t.events.fire(Pc.Ls),i=0,a=10}}function s(n){l((t.currentTime||0)+n)}function c(n){var i=(t.currentTime||0)-n;l(i>=0?i:0)}function l(n){t.events.fire(Pc.Ds),t.events.fire(Sc.Ha,null,n),e||t.events.fire(Pc.Fs)}function f(n,i){var e=t.currentTime||0,r="right"===i?"+":"-";return"right"===i&&e>t.config.video.duration-10||e<=10&&"left"===i?null:"".concat(r," ").concat(n)}function d(i,e,r){if(["left","right"].includes(e)){var o=t.element.querySelector(".vp-nudge-shade-".concat(e)),u=i.querySelector(".vp-nudge-seconds");f(r,e)&&(u.innerHTML=f(r,e),clearTimeout(n),i.classList.remove("invisible"),o.classList.remove("vp-nudge-shade-invisible"),n=setTimeout((function(){o.classList.add("vp-nudge-shade-invisible"),i.classList.add("invisible")}),500))}}return t.events.on(Pc.Jc,(function(){[o,u].forEach((function(t){t&&ef(t).off("click").off("touchend")})),a()})),a(),{}}var Wh=/^(%20|\s)*(javascript|data)/im,Gh=/[^\x20-\x7E]/gim,$h=/^([^:]+):/gm,Kh=[".","/"];function Yh(t){var n=t.match($h);return null==n?void 0:n[0]}function Jh(t){return t?decodeURI(encodeURI(function(t){var n=Yh(t=t.trim());return t&&!n&&(t="http://".concat(t)),t}(function(t){var n=t.replace(Gh,"");if(function(t){return Kh.indexOf(t[0])>-1}(n))return n;var i=Yh(n);return i&&Wh.test(i)?"":n}(t)))):null}function Xh(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];tv.apply(void 0,["hidden"].concat(n))}function Zh(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Qh.apply(void 0,["hidden"].concat(n))}function Qh(t){nv(t);for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];i.forEach((function(n){iv(n),n.classList.add(t)}))}function tv(t){nv(t);for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];i.forEach((function(n){iv(n),n.classList.remove(t)}))}function nv(t){if(""===(t=String(t)))throw new SyntaxError("An invalid string was specified");if(/\s/.test(t))throw new SyntaxError("String contains invalid character")}function iv(t){if(!function(t){return null!=t&&t instanceof HTMLElement}(t))throw new SyntaxError("An invalid HTMLElement was specified")}function ev(t,n){var i=null;function e(n){var i=n.target.activeCues[0]?n.target.activeCues[0].id:null;t.events.fire(Pc.Ws,i)}function r(t){var n=!!t&&"menu"===t.position,e=t?t.id:null;i.forEach((function(t){var i=t.dataset.time===e;t.classList.toggle("chapter-marker-hover",i),t.classList.toggle("chapter-marker-hover-no-text",i&&n)}))}function o(t){i.forEach((function(n){n.classList.toggle("chapter-marker-active",n.dataset.time===t)}))}return{renderChapterMarkers:function(){var u,a=n.querySelector(".chapters");a.innerHTML=dd.render("chapters",{chapters:t.backbone?t.backbone.chapters:[],duration:t.config.video.duration}),t.events.off(Pc.zs),t.events.off(Pc.qs),function(){for(var t=n.querySelectorAll(".chapter-title"),i=0;i<t.length;i++){var e=t[i];if(240===ec(e).width){var r=ec(n.querySelector(".js-chapter-content")).width;e.style.width=r+"px"}var o=ec(e),u=o.left,a=o.right,s=ec(n),c=s.left-u,l=a-s.right;c>0&&(e.style.left=c+"px"),l>0&&(e.style.right=l+"px")}}(),function(n){ef(n).on("mouseenter",".js-chapter-marker",(function(n){t.events.fire(Pc.zs,{id:n.target.dataset.time,position:"marker"})})).on("mouseleave",".js-chapter-marker",(function(n){t.events.fire(Pc.qs)})),t.events.on([Pc.zs,Pc.qs],r),t.events.on(Pc.Ws,o)}(a),i=V(n.querySelectorAll(".js-chapter-marker")),(null==(u=t.backbone)?void 0:u.chaptersTrack)&&t.backbone.chaptersTrack.addEventListener("cuechange",e)}}}function rv(t,n,i){var e,r,o,u,a,s,c,l,f,d,h,v,p,m,w,b,g,y,_,k,E,T,x,S,A,M,R,C=!1,O=!1,I=!1,j=!1,L=!1,P=!1,F=!1,U=!1,B=!1,H=!1,z=!1,q=!1,W=!0,G=!1,$=!1,K=null,Y=null,J=[],X=null,Z=null,tt=null,nt=!1,it=!1,et=n.get(Ul),rt=[],ot=new ev(t,i),ut=t.config.embed.autoplay&&t.config.request.flags.autohide_controls,at=[{id:.5,label:"0.5x"},{id:.75,label:"0.75x"},{id:1,label:"Normal"},{id:1.25,label:"1.25x"},{id:1.5,label:"1.5x"},{id:2,label:"2x"}],st=ys.touch?300:0;function ct(){K=null,Y=null}function lt(){if(!Y){var t=ec(c).left,n=parseInt(window.getComputedStyle(c,"").borderLeftWidth,10);Y=t+n}return Y}function ft(){if(!K){var t=ec(c).right,n=parseInt(window.getComputedStyle(c,"").borderRightWidth,10);K=t-n}return K}function dt(t){var n=lt();return uc((t-n)/(ft()-n),0,1)}function ht(n){var i=J,e=Array.isArray(i),r=0;for(i=e?i:i[D.iterator]();;){var o;if(e){if(r>=i.length)break;o=i[r++]}else{if((r=i.next()).done)break;o=r.value}var u=o,a=ec(u),s=a.left,c=a.right;if(n>=s&&n<=c)return parseFloat(u.getAttribute("data-time"))/t.config.video.duration}return dt(n)}function vt(n,i){O&&!q&&(i=i||t.config.video.duration*n||0,window.requestAnimationFrame((function(){pt(n,i),mt(n,i)})))}function pt(t,i){(!n.get(Dl)||G&&0!==i)&&(n.get(Hl)&&(t=100),v.style.left=Math.min(fc(100*t),100)+"%",p.innerHTML=yd(i),v.style.display="block")}function mt(i,e){n.get(Hl)&&(i=100);var r=Math.min(fc(100*i),100);d.style.width="".concat(r,"%"),l.setAttribute("aria-valuenow",Math.round(e)),l.setAttribute("aria-valuetext","".concat(yd(e)," of ").concat(yd(t.config.video.duration))),a.setAttribute("width","".concat(r,"%"))}function wt(t,i){n.get(Hl)&&(t=100);var e=Math.min(fc(100*t),100);f.style.width="".concat(e,"%"),f.setAttribute("aria-valuenow",fc(i)),f.setAttribute("aria-valuetext","".concat(yd(i,!0)," loaded")),u.setAttribute("width","".concat(e,"%"))}function bt(){G=!1,r.classList.remove("state-playing"),r.classList.add("state-paused")}function gt(){G=!0,$&&At(),r.classList.remove("state-paused"),r.classList.add("state-playing")}function yt(){W=!1,rt.forEach((function(t){return t.retargetFocusFromChild()})),t.events.fire(Pc.Js,W),i.classList.add("invisible")}function _t(){setTimeout((function(){W=!0,t.events.fire(Pc.Js,W),i.classList.remove("invisible")}),st)}function kt(){j||W&&(C||(O&&z||L||ut)&&(I||(!nt&&!it||L)&&(L&&3===t.config.view||U||P||yt())))}function Et(){j||W||L||_t()}function Tt(t){return rt.push(t),t.button.parentNode.insertBefore(t.element,t.button.nextSibling),t}function xt(t){rt=rt.filter((function(n){return n!==t})),t.destroy()}function St(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(y){var n,i=1/_.length,e=t/i,r=Math.ceil(e),o=e%1;o<=.33&&(n="fill1"),o>.33&&o<=.66&&(n="fill2"),_.forEach((function(t,i){t.classList.remove("fill0"),t.classList.remove("fill1"),t.classList.remove("fill2"),i===r-1&&o&&o<=.66?t.classList.add(n):i>r-1&&t.classList.add("fill0")})),y.setAttribute("aria-valuenow",t.toFixed(3)),y.setAttribute("aria-valuetext",Math.round(100*t)+"%")}}function At(){var e;if(1===t.config.view||3===t.config.view){x&&(xt(x),x=null),X&&(xt(X),X=null);var C=t.backbone||{},j=t.config.embed.settings,D={show:j.logo,showLink:!!t.config.video.url,url:t.config.video.url},L=function(){if(!t.config.embed.settings.custom_logo)return null;var n=t.config.embed.settings.custom_logo,i=n.img;return ys.devicePixelRatio>=2&&(i=i.replace(/(mw|mh)=(\d+)/g,(function(t,n,i){return n+"="+2*parseInt(i,10)}))),{showLink:null!==n.url,url:Jh(n.url),img:i,sticky:n.sticky,width:n.width,height:n.height}}();if(!j.watch_trailer||O||G||t.config.embed.autoplay||!t.config.embed.on_site){var N=!t.backbone||t.backbone.supportsSettingVolume,P=!t.backbone||t.backbone.supportsTextTracks,F=Mh(t.config,"chromecast").group&&ys.browser.chrome&&(void 0===j.chromecast||j.chromecast)&&!t.config.video.spatial&&"stock"!==t.config.video.privacy,U=t.displayContext===t.backbone,B=C.supportsPlaybackRate&&j.speed,H=U&&(B||C.representations&&C.representations.length>0),z="disable"!==t.config.video.privacy&&(ys.webvr||ys.stereoscopic)&&t.config.video.spatial&&Mh(t.config,"webvr").group,q=!!t.backbone&&(null==(e=t.backbone.textTracks)?void 0:e.length);t.events.on(yi.TEXT_TRACKS_AVAILABLE,(function(){var n;q=!!t.backbone&&(null==(n=t.backbone.textTracks)?void 0:n.length),At()}));var K={targetBlank:0===t.config.embed.on_site,playState:G?"playing":"paused",volume:N&&j.volume,ccButton:P&&q&&U,castButton:F,ccOn:null!==tt,prefsButton:H,airplayButton:ys.airPlay,stereoscopicButton:z,fullscreenButton:j.fullscreen,vimeoLogo:U?D:{},duration:yd(t.config.video.duration),rawDuration:t.config.video.duration,captionsIcon:dd.render("icon_cc",{title:"Choisir les légendes"}),settingsIcon:dd.render("icon_gear",{title:"Paramètres"}),fullscreenIcon:dd.render("icon_fullscreen",{title:"Afficher en plein écran"}),unfullscreenIcon:dd.render("icon_unfullscreen",{title:"Quitter le mode plein écran"}),playIcon:dd.render("icon_play",{title:"Lire"}),pauseIcon:dd.render("icon_pause",{title:"Pause"}),replayIcon:dd.render("icon_replay",{title:"Lire"}),chaptersIcon:dd.render("icon_chapters",{title:"Chapters"}),chapters:!!C.chapters&&C.chapters.length,strings:{loadedBar:"chargé",playedBar:"lue",volume:"Volume (utiliser les flèches pour changer)",airPlay:"Choisir un appareil AirPlay",airPlayOff:"Désactiver AirPlay",pipEnter:"Afficher la fonction Incrustation (PIP)",pipReturn:"Quitter la fonction Incrustation",fullscreen:"Plein écran",chromecast:"Cast",watchOnVimeo:"Regarder sur vimeo.com",stereoscopic:"Activer la lecture stéréoscopique",stereoscopicOff:"Désactiver la lecture stéréoscopique"}};if(L&&(K.customLogo=L),i.classList.remove("trailer"),$=!1,i.innerHTML=dd.render("controlbar",K),r=i.querySelector(".play"),o=r.querySelector(".buffer"),u=r.querySelector(".loaded"),a=r.querySelector(".played"),s=i.querySelector(".play-bar"),c=i.querySelector(".vp-progress"),l=s.querySelector(".focus-target"),f=s.querySelector(".loaded"),d=s.querySelector(".played"),h=s.querySelector(".cuepoints"),v=i.querySelector(".timecode"),p=v.querySelector(".box"),m=i.querySelector(".ghost-timecode"),w=m.querySelector(".box"),b=i.querySelector(".thumb-preview"),g=i.querySelector(".thumb"),(y=i.querySelector(".volume"))&&(_=V(y.querySelectorAll("div")),t.config.embed.muted?St(0):St(t.config.request.cookie.volume)),T=i.querySelector(".play-bar .cc"),E=i.querySelector(".js-chapter-button"),(k=i.querySelector(".js-prefs"))&&kl.isCastConnected&&Zh(k),S=i.querySelector(".pip"),ys.airPlay&&(A=i.querySelector(".airplay")),(ys.webvr||ys.stereoscopic)&&t.config.video.spatial&&(M=i.querySelector(".stereoscopic")),R=i.querySelector(".fullscreen"),I=!1,W&&t.events.fire(Pc.Js,W),ut&&kt(),Mt(),n.get(Hl)){var Y=i.querySelector(".vp-live-status");Y.style.display="block";var J=Y.querySelector(".vp-live-status-circle");et?(J.classList.remove("offline"),J.classList.add("online"),k&&!kl.isCastConnected&&Xh(k)):(J.classList.add("offline"),J.classList.remove("online"),k&&Zh(k)),p.style.cursor="default",c.classList.add("disabled")}ot.renderChapterMarkers()}else!function(n,e){i.classList.add("trailer");var o={vimeoLogo:n,text:t.config.video.vod.button_text||"Voir la bande-annonce",strings:{watchOnVimeo:"Regarder sur vimeo.com"}};e&&(o.customLogo=e),i.innerHTML=dd.render("controlbar_trailer",o),r=i.querySelector(".play"),$=!0}(D,L)}}function Mt(){if(n.get(Hl)){var i=G&&t.config.duration>0;v.style.display=i?"block":"none"}}function Rt(){var e;function r(n){if(q=!1,e===n.pointerId&&!1!==n.isPrimary){var i=n.clientX;n.targetTouches&&n.targetTouches.length>0&&(i=n.targetTouches[0].clientX,n.preventDefault());var r=ht(i);vt(r),t.events.fire(Sc.Ha,r)}}function o(n){var e=n.type;"pointerup"===e||"MSPointerUp"===e?ef(i).off("pointermove",".vp-progress",r).off("pointerup",".vp-progress",o):"touchend"===n.type?ef(i).off("touchmove",r).off("touchend",o):ef(document).off("mousemove",r).off("mouseup",o),t.events.fire(Pc.$s),t.element.classList.remove("scrubbing")}t.events.on(wi.TIME_UPDATE,(function(n){var i=n.currentTime,e=n.timeProgress;q&&(0===t.config.embed.time||t.config.embed.time>0&&i>=t.config.embed.time)&&(q=!1),P||vt(e,i)})),t.events.on(Pc.Gs,(function(t){P=!0,F=t})),t.events.on(Pc.$s,(function(){P=!1,F=!1})),t.events.on(wi.SEEKED,(function(t){var n=t.timeProgress;F&&vt(n)})),n.get(Dl)&&!n.get(Bl)||(ef(i).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],".vp-progress",(function(n){if(!(n.button&&2===n.button||n.target.classList.contains("js-chapter-marker"))){var u=n.type;if(t.element.classList.add("scrubbing"),t.events.fire(Pc.Gs,!1,u),"pointerdown"===u||"MSPointerDown"===u){e=n.pointerId;try{n.target.msSetPointerCapture?n.target.msSetPointerCapture(e):n.target.setPointerCapture(e)}catch(t){}ef(i).on("pointermove",".vp-progress",r).on("pointerup",".vp-progress",o)}else"touchstart"===u?ef(i).on("touchmove",r).on("touchend",o):ef(document).on("mousemove",r).on("mouseup",o);var a=n.clientX;n.targetTouches&&n.targetTouches.length>0&&(a=n.targetTouches[0].clientX,n.preventDefault());var s=ht(a);if(O)vt(s);else{var c=t.config.video.duration*s;pt(s,c),mt(s,c),q=!0}return t.events.fire(Sc.Ha,s,null),!1}})),t.events.on(Sc.vs,(function(n,i){n=uc(n,0,t.config.video.duration),i||(i=n/t.config.video.duration),window.requestAnimationFrame((function(){pt(i,n),mt(i,n)}))})))}function Ct(n){if(n.element.parentElement){if(n.isFullwidth())return n.element.style.right="",n.element.style.bottom="",void(n.element.style.height="");var i=ec(t.element),e=ec(n.button),r=ec(n.element.parentElement),o=ec(n.element),u=0,a=e.right-e.width/2+o.width/2;a<r.right&&(u=r.right-a);var s=window.getComputedStyle(n.element),c=parseFloat(s.fontSize);if(n.isCentered()){var l=i.right-r.right,f=i.bottom-r.bottom,d=(i.width-o.width)/2,h=(i.height-o.height)/2;n.element.style.right="".concat((d-l)/c,"em"),n.element.style.bottom="".concat((h-f)/c,"em")}else n.element.style.right="".concat(u/c,"em"),n.element.style.bottom="".concat(r.height/c,"em")}}function Ot(){n.get(Dl)&&!n.get(Bl)&&(t.events.on(tu.STREAM_ONLINE,(function(){et=!0,At()})),t.events.on([tu.STREAM_OFFLINE,tu.EVENT_ENDED],(function(){et=!1,At()})))}return At(),Nh(i,".play, .replay",(function(){return O=!0,$&&(W=!1,i.classList.add("invisible"),At(),Et()),r.classList.contains("state-playing")?(t.events.fire(Pc.Ps),bt()):(t.events.fire(Pc.Fs),gt()),!ys.android})),t.events.on([Pc.Fs,Pc.ks,Uo,wi.PLAY],gt),t.events.on([Pc.Ps,Pc.Es,Pc.Hl,Sc.$a],bt),t.events.on(Pc.He,(function(){t.displayContext!==t.backbone?gt():bt()})),t.events.on(Pc.Ts,(function(){q=!1,bt(),vt(1)})),t.events.on(Pc.gc,(function(t){"not-supported"===t&&bt()})),n.get(Dl)&&!et&&(r.classList.add("hidden"),t.events.once(tu.STREAM_ONLINE,(function(){r.classList.remove("hidden")}))),t.events.on(tu.EVENT_ENDED,(function(){r.classList.add("hidden")})),Rt(),t.events.on(yi.BUFFER_STARTED,(function(){o.setAttribute("class",o.getAttribute("class").replace(/\s+hidden/,"")),U=!0,ut||Et()})),t.events.on(yi.BUFFER_ENDED,(function(){f.classList.remove("hidden"),n.get(Hl)&&d.classList.remove("hidden"),o.setAttribute("class",o.getAttribute("class")+" hidden"),U=!1})),function(){var e,o=null,u=!1;function a(){return e||(e=t.verifyConfig().then((function(t){return ml(t.thumb_preview.url)}))),e.then((function(n){var i=t.config.request.thumb_preview;return g.style.backgroundImage||(g.style.width="".concat(i.frame_width/2,"px"),g.style.height="".concat(i.frame_height/2,"px"),g.style.backgroundImage="url(".concat(i.url,")"),g.style.backgroundSize="".concat(i.width/2,"px ").concat(i.height/2,"px")),n}))}function l(n){if(n.target===s){var i=dt(n.clientX);vt(i),t.events.fire(Sc.Ha,i)}}function f(t){return m.classList.contains("hidden")||(b.classList.remove("hidden"),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){b.classList.remove("invisible")}))}))),t}function d(n){if(t.config.request.thumb_preview&&null===o&&!u){var i=ec(c).width,e=document.querySelector(".player").clientHeight;if(!(o=e>=215&&i>=185))return void b.classList.add("hidden");a().then(f).catch((function(){}))}if(H){var l=function(t){var n=J,i=Array.isArray(n),e=0;for(n=i?n:n[D.iterator]();;){var r;if(i){if(e>=n.length)break;r=n[e++]}else{if((e=n.next()).done)break;r=e.value}var o=r,u=ec(o),a=u.left,s=u.right,c=u.width;if(t>=a&&t<=s)return{clientX:a+c/2,snappedTo:o}}return{clientX:t,snappedTo:null}}(n.clientX),d=l.clientX,v=l.snappedTo,p=dt(d),y=t.config.video.duration*p;J.forEach((function(t){return t.classList.toggle("active",t===v)})),t.config.request.thumb_preview&&o&&!u&&a().then((function(n){var i=Q(function(n){var i=t.config.video.duration/t.config.request.thumb_preview.frames,e=Math.min(t.config.request.thumb_preview.frames-1,Math.ceil(n/i)),r=e%t.config.request.thumb_preview.columns,o=Math.floor(e/t.config.request.thumb_preview.columns);return[-r*t.config.request.thumb_preview.frame_width/2,-o*t.config.request.thumb_preview.frame_height/2]}(y),2),e=i[0],r=i[1];return window.requestAnimationFrame((function(){g.style.backgroundPosition="".concat(e,"px ").concat(r,"px")})),n})).catch((function(){})),window.requestAnimationFrame((function(){w.innerHTML=yd(y);var t=(100*p).toFixed(3);m.style.left="".concat(t,"%"),function(t){var n=Q(function(){var t=ec(r).left,n=ec(s).right,i=ec(b).width,e=t+Math.ceil(i/2),o=n-Math.ceil(i/2),u=lt(),a=ft()-u;return[(e-u)/a,(o-u)/a]}(),2),i=n[0],e=n[1],o=(100*Math.max(i,Math.min(e,t))).toFixed(3);b.style.left="".concat(o,"%")}(p),n.clientX>ft()+10&&!b.contains(document.elementFromPoint(n.clientX,n.clientY))&&h()}))}}function h(){m&&(m.classList.add("invisible"),b.classList.add("invisible")),H=!1,ef(s).off("click",l)}n.get(Dl)&&!n.get(Bl)||ef(i).on("mouseenter",".vp-progress",(function(n){H||B||(m.classList.remove("hidden"),H=!0,d(n),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){m.classList.remove("invisible")}))})),t.config.request.thumb_preview&&o&&!u&&a().then(f).catch((function(){})),ef(s).on("click",l))})).on("mousemove",".play-bar",d).on("mouseleave",".play-bar",h).on("mouseenter",".js-chapter-marker",(function(){u=!0})).on("mouseleave",".js-chapter-marker",(function(){u=!1,o=null})),ef(i).on("transitionend",".ghost-timecode",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(m.classList.add("hidden"),b.classList.add("hidden"))}),!1),t.events.on(Pc.Fc,h),t.events.on(Pc.Jc,(function(){e=null}))}(),function(){var n;function e(n){var i=n.clientX;n.targetTouches&&(i=n.targetTouches[0].clientX,n.preventDefault());var e=o(i);t.events.fire(Sc.za,e),St(e)}function r(n){B=!1,t.events.fire(Pc.Ys),t.element.classList.remove("scrubbing");var o=n.type;"pointerup"===o||"MSPointerUp"===o?ef(i).off("pointermove",".volume",e).off("pointerup",".volume",r):"touchend"===n.type?ef(document).off("touchmove",e).off("touchend",r):ef(document).off("mousemove",e).off("mouseup",r),y.setAttribute("tabindex",y.getAttribute("data-tabindex")),y.removeAttribute("data-tabindex")}function o(t){var n=ec(y).left;return uc((t-n)/(ec(y).right-n),0,1)}ef(i).on("mousemove",".volume",(function(t){var n=t.srcElement;if(-1===_.indexOf(n)){var i=ec(y),e=t.clientX,r=i.bottom-2;if(n=document.elementFromPoint(e,r),-1===_.indexOf(n))return}n.classList.add("hover"),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){n.classList.remove("hover"),n.classList.add("animate")}))}))})),ef(i).on("transitionend",".volume div",(function(t){"height"===t.propertyName&&this.classList.remove("animate")})),ef(document).on("contextmenu",".volume",(function(){this.blur()})),ef(i).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],".volume",(function(u){if(1===u.which){y.setAttribute("data-tabindex",y.getAttribute("tabindex")),y.removeAttribute("tabindex"),B=!0,t.element.classList.add("scrubbing"),t.events.fire(Pc.Ks);var a=u.type;if("pointerdown"===a||"MSPointerDown"===a){n=u.pointerId;try{u.target.msSetPointerCapture?u.target.msSetPointerCapture(n):u.target.setPointerCapture(n)}catch(t){}ef(i).on("pointermove",".volume",e).on("pointerup",".volume",r)}else"touchstart"===a?ef(document).on("touchmove",e).on("touchend",r):ef(document).on("mousemove",e).on("mouseup",r);var s=u.clientX;u.targetTouches&&(s=u.targetTouches[0].clientX);var c=o(s);t.events.fire(Sc.za,c),St(c)}})),t.events.on(Pc.Ss,(function(n){t.backbone.muted?St(0):!B&&_&&St(n)})).on([Sc.Qa,Sc.Za],(function(){At()}))}(),Nh(i,".js-chapter-marker",(function(n){var i=parseFloat(n.target.dataset.time)+.001;t.events.fire(Pc.Bs,i,"controlbar")})),t.events.on(yi.CHAPTER_CUES_UPDATED,(function(){ot.renderChapterMarkers()})),function(){function e(){var n=t.backbone.chapters,i=0;return V(n).map((function(n){var e=t.currentTime;return{index:"".concat(i+=1),label:n.text,id:n.id,active:e>=n.startTime&&e<n.endTime}}))}Nh(i,".js-chapter-button",(function(){if(E){if(!Z)return void(Z=function(){var i=new zh(t,{id:"chapters",title:"Chapters",items:e()},!1);i.pinTitle();var r=new Ph(t,E,[i]),o=t.element;function u(n){r.element.classList.toggle("vp-menu-fullwidth",n),t.events.fire(Pc.oc,r.isCentered(),r),n?o.insertBefore(r.element,o.children[0]):Tt(r)}return r.element.classList.add("vp-menu-chapters"),ef(i.element).on("mouseenter",".vp-panel-item",(function(n){t.events.fire(Pc.zs,{id:n.target.dataset.time,position:"menu"})})).on("mouseleave",".vp-panel-item",(function(n){t.events.fire(Pc.qs)})),t.events.on(Pc.zs,(function(t){i.setHoverState(t.id)})),t.events.on(Pc.qs,(function(t){i.clearHoverState()})),n.watch("ui.controlbar.isPrefsMenuCentered",u),u(n.get("ui.controlbar.isPrefsMenuCentered")),i.on("select",(function(n){t.events.fire(Pc.qs),t.events.fire(Pc.Bs,parseFloat(n)+.001,"menu")})),t.events.on(Pc.Ws,(function(t){Z&&Z.getPanel("chapters")&&Z.getPanel("chapters").setActiveItem(t)})),r}()).show();Z.toggle(),t.events.fire(Pc.qs)}}))}(),t.events.on(yi.CHAPTER_CUES_UPDATED,(function(){Z&&(Z.destroy(),Z=null),t.backbone.chapters.length<2&&At()})),Nh(i,".cc",(function(){t.events.fire(Pc.Us)})),t.events.on(Pc.Us,(function(n){x?x.toggle(n):(x=Tt(function(n){var i=[];t.backbone.textTracks&&(t.backbone.textTracks.forEach((function(t){var n="CC"===t.label.substring(t.label.length-2),e="captions"!==t.kind||n?"":" CC";i.push({label:t.label+e,id:"".concat(t.id),active:tt==="".concat(t.id)})})),i.push({label:"Aucun",id:"off",active:null===tt}));var e=new zh(t,{items:i,id:"cc",title:"Légendes"});return e.on("select",(function(n){"off"!==n?t.events.fire(Sc.rs,n):t.events.fire(Sc.os)})),new Ph(t,n,[e])}(T))).show(n)})),t.events.on(Pc.Qs,(function(t){t?function(t){tt=t,x&&x.getPanel("cc")&&(x.getPanel("cc").setActiveItem(t),setTimeout((function(){x.hide()}),100)),T&&(T.classList.add("on"),T.classList.remove("off"))}(t.id):(tt=null,x&&x.getPanel("cc")&&(x.getPanel("cc").setActiveItem("off"),setTimeout((function(){x.hide()}),100)),T&&(T.classList.add("off"),T.classList.remove("on")))})).on([Sc.ns,Sc.ts],(function(){At()})).on(Pc.El,(function(){At()})),function(){var e,r;function o(){var n=t.backbone.representations.map((function(t){var n=xh(t);return{id:n,label:Ah(t),active:e===n}})),i=t.backbone.video.currentFile.mime;return[xc.dash,xc.dashMpd,xc.hlsLive].includes(i)&&n.unshift({id:"auto",label:"Auto",active:!e||"auto"===e}),n}Nh(i,".js-prefs",(function(){t.events.fire(Pc.Vs)})),t.events.on(Pc.Vs,(function(i){if(k){if(!X)return void(X=Tt(function(){var i=[];if(t.backbone.representations&&t.backbone.representations.length>0){var e=new zh(t,{id:"quality",title:"Qualité",items:o()});e.on("select",(function(n){t.events.fire(Sc.Ya,n)})),r&&e.setTitleStat(r),e.pinTitle(),i.push(e)}if(t.backbone.supportsPlaybackRate&&t.config.embed.settings.speed){var u=at.map((function(n){return n.active=n.id===t.backbone.playbackRate,n})),a=new zh(t,{id:"speed",title:"Vitesse",items:u});a.on("select",(function(n){t.events.fire(Sc.ps,n)})),a.pinTitle(),i.push(a)}var s=new Ph(t,k,i);function c(n){s.element.classList.toggle("vp-menu-center",n),t.events.fire(Pc.oc,s.isCentered(),s)}return n.watch("ui.controlbar.isPrefsMenuCentered",c),c(n.get("ui.controlbar.isPrefsMenuCentered")),ys.touch&&s.element.classList.add("vp-menu-carousel"),s}())).show(i);X.toggle(i)}})),t.events.on(Pc.As,(function(t){e=t,X&&X.getPanel("quality")&&X.getPanel("quality").setActiveItem(t)})),t.events.on(yi.STREAM_CHANGE,(function(t){var n=t.quality||"".concat(t.height,"p");r=n,X&&X.getPanel("quality")&&X.getPanel("quality").setTitleStat(Ah(t))})),t.events.on(Pc.Is,(function(t){X&&X.getPanel("speed")&&X.getPanel("speed").setActiveItem(t)}))}(),Nh(i,".pip",(function(){"picture-in-picture"!==t.backbone.presentationMode?t.events.fire(Sc.cs):t.events.fire(Sc.ls)})),t.events.on(Go,(function(){S&&(S.classList.remove("hidden"),S.hidden=!1,ct())})).on($o,(function(){S&&(S.classList.add("hidden"),S.hidden=!0,ct())})).on(Ko,(function(){it=!0,S&&(S.classList.add("return"),S.classList.remove("enter"),S.setAttribute("title",S.getAttribute("data-title-return")))})).on(Yo,(function(){it=!1,S&&(S.classList.add("enter"),S.classList.remove("return"),S.setAttribute("title",S.getAttribute("data-title-enter")))})),ys.airPlay&&(Nh(i,".airplay",(function(){t.events.fire(Pc.Vl)})),t.events.on(Pc.Ll,(function(){A&&(A.classList.remove("hidden"),A.hidden=!1,ct())})).on(Pc.Nl,(function(){A&&(A.classList.add("hidden"),A.hidden=!0,ct())})).on(Pc.Pl,(function(){nt=!0,A&&(A.classList.remove("off"),A.classList.add("on"),A.setAttribute("title",A.getAttribute("data-title-on"))),Et()})).on(Pc.Fl,(function(){nt=!1,A&&(A.classList.remove("on"),A.classList.add("off"),A.setAttribute("title",A.getAttribute("data-title-off")))}))),Nh(i,".fullscreen",(function(){t.events.fire(Pc.Ns)})),t.events.on(Pc.cc,(function(){C=!1,i.classList.remove("tiny")})),t.events.on(Pc.fc,(function(t){if(R){var n=R.cloneNode(!0);R.parentNode.replaceChild(n,R),R=n}t||(C=!0),e&&i.classList.add("tiny")})),t.events.on([Pc.Vc,Pc.Gs,Sc.za],Et).on([Pc.Fc,Pc.Uc],kt).on(Pc.sc,(function(){I=!1,kt()})).on(Pc.lc,(function(){I=!1})).on(Pc.Ms,(function(){z=!0,kt()})).on(Sc.za,(function(t,n){n||Et()})),ef(i).on(["pointerenter","pointerleave","mouseenter","mouseleave"],[".play",".play-bar",".custom-logo",".vp-menu"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(I="pointerenter"===t.type||"MSPointerEnter"===t.type):ys.touch||(I="mouseover"===t.type)})),t.events.on(Sc._overrideControlbarBehavior,(function(n){j=n,n?t.events.on(Sc.ss,(function(t){t?_t():yt()})):t.events.off(Sc.ss)})),t.events.on(Pc.gc,(function(t){if("not-supported"!==t&&"private-unlocked"!==t&&"help"!==t)L=!0,kt();else for(var n=i.querySelectorAll("a, button, input, [tabindex]"),e=0,r=n.length;e<r;e++){var o=n[e].getAttribute("tabindex");o&&n[e].setAttribute("data-tabindex",o),n[e].setAttribute("tabindex","-1")}})).on(Pc.yc,(function(){L=!1,Et();for(var t=i.querySelectorAll("[tabindex]"),n=0,e=t.length;n<e;n++){var r=t[n].getAttribute("data-tabindex");r&&"null"!==r?t[n].setAttribute("tabindex",r):t[n].removeAttribute("tabindex"),t[n].removeAttribute("data-tabindex")}})),t.events.on(Pc.ol,(function(){i.classList.add("controls-outro")})).on(Pc.ul,(function(){i.classList.remove("controls-outro")})),function(){function n(){rt.filter((function(t){return t.isVisible()})).forEach((function(t){return t.hide()}))}t.events.on([Pc.oc,Pc.Zs],(function(t,n){Ct(n),n.isCentered()&&n.isVisible()&&i.classList.add("controls-centerMenu"),n.isCentered()&&n.isVisible()||i.classList.remove("controls-centerMenu")})).on(Pc.fc,n).on(Pc.Js,(function(t){t||n()})),ef(window).on("resize",(function(){rt.forEach(Ct)}))}(),new qh(t),t.events.on(Pc.Jc,(function(n,i){Ot(),Rt(),At(),3===t.config.view&&Et(),ct()})),t.events.on(Sc.$a,(function(){window.requestAnimationFrame((function(){Mt(),pt(0,t.config.video.duration),mt(0,0),wt(0,0)})),Et(),O=!1,I=!1,P=!1,B=!1,q=!1,C=!1,z=!1,x&&(xt(x),x=null),X&&(xt(X),X=null)})),ef(window).on("resize",(function(){ct()})),t.events.on(Pc.Qc,(function(){e=!0,i.classList.add("tiny")})).on(Pc.tl,(function(){e=!1,i.classList.remove("tiny")})).on(Pc.nl,(function(){e=!1,i.classList.remove("tiny")})),function(){if(t.config.embed.on_site){var n=new N;t.events.on(Pc.tc,(function(e){if(e.data.visible){var r=document.createElement("div");r.setAttribute("id","cuepoint-".concat(e.id)),r.setAttribute("data-time",e.time),r.classList.add("cuepoint"),r.classList.add("out"),r.appendChild(document.createElement("div"));var o=e.time/t.config.video.duration*100;r.style.left="".concat(o,"%"),n.set(e,r),h.appendChild(r),J=V(i.querySelectorAll(".cuepoint")),window.requestAnimationFrame((function(){return r.classList.remove("out")}))}})),t.events.on(Pc.nc,(function(t){var i=n.get(t);i&&(n.delete(t),i.classList.add("out"))})),ef(i).on("transitionend",".cuepoint",(function(t){this.classList.contains("out")&&(h.removeChild(this),J=V(i.querySelectorAll(".cuepoint")))}))}}(),M&&(Nh(i,".stereoscopic",(function(){t.events.fire(Pc.ic)})),M.classList.remove("hidden"),M.hidden=!1),Ot(),kl.on(gl.connected,(function(){k&&Zh(k)})),kl.on(gl.disconnected,(function(){k&&Xh(k)})),kl.on(gl.playing,gt),kl.on([gl.error,gl.idle,gl.paused,gl.ended,gl.disconnected],bt),t.events.on(Uo,(function(){t.events.on(wi.PROGRESS,(function(t){var n=t.loaded,i=(t.duration,t.loadProgress);C||window.requestAnimationFrame((function(){wt(i,n)}))})),O=!0;var n=t.config.embed.time||t.backbone.currentTime;vt(n/t.config.video.duration,n),q=!0})),t.events.fire(Pc.Al),{}}var ov=function(){function t(t,n){var i=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;nt(this),this.version=e,this.visible=!1;var r=this.If=document.createElement("div");r.classList.add("compass-wrapper"),r.innerHTML=dd.render("compass",{version:e}),r.classList.add("cloaked"),t.appendChild(r),n&&r.addEventListener("click",n),this.jf=r.querySelector(".compass-slice"),this.Df=r.querySelector(".compass-line");var o=function(){i.Lf=!0},u=function(t){return function(){setTimeout((function(){i.Lf||(i.fade(),i.Lf=!1)}),t)}};ef(this.If).on("mousein",o).on("pointerin",o).on("mouseout",u(1e3)).on("pointerout",u(1e3)),u(2500)()}var n=t.prototype;return n.setAngle=function(t,n){var i=this;this.Du&&window.cancelAnimationFrame(this.Du);var e=0;1===this.version?e=-45:2===this.version&&(e=-30);var r="".concat(e+n),o=(t+85)/170;this.Du=window.requestAnimationFrame((function(){i.jf.setAttribute("transform","rotate(".concat(r,", ").concat(18,", ").concat(18,")")),i.Df&&i.Df.setAttribute("d",i.Nf(o,18))}))},n.Nf=function(t,n){var i=2*n-Math.round(2*n*t),e=(2*n-2*Math.sqrt(2*i*n-Math.pow(i,2)))/2,r=2*n-e-5;return"M".concat(e+5,",").concat(i," L").concat(r,",").concat(i," z")},n.reveal=function(){var t=this;this.If.classList.remove("cloaked"),window.requestAnimationFrame((function(){t.If.classList.add("in")})),this.visible=!0},n.fade=function(){this.If.classList.add("fade"),this.visible=!0},n.hide=function(){var t=this;this.If.classList.remove("in"),this.If.classList.remove("fade"),this.If.classList.add("leaving"),ef(this.If).on("transitionend",(function n(){"opacity"===event.propertyName&&(t.If.classList.remove("leaving"),t.If.classList.add("cloaked"),t.visible=!1),ef(t.If).off("transitionend",n)}))},n.updatePosition=function(t){if(t){var n=ec(t);if(n.height<265)return this.If.classList.remove("align-bottom"),void this.If.classList.add("hidden");if(n.height<336)return this.If.classList.remove("hidden"),void this.If.classList.add("align-bottom");this.If.classList.remove("hidden"),this.If.classList.remove("align-bottom")}},n.getWrapper=function(){return this.If},t}();function uv(t,n,i){var e=null,r=ys.touch?4500:2e3,o=!0,u=!0,a=!1,s=null,c=null,l=[],f=!1,d=null,h=null,v=!0,p=!1,m=!1,w=!1,b=!1,g=!1,y=i.querySelector(".vp-target"),_=i.querySelector(".vp-sidedock"),k=i.querySelector(".vp-controls"),E=i.querySelector(".vp-title"),T=i.querySelector(".vp-video"),x=V(i.querySelectorAll(".vp-nudge")),S=!!ys.touch&&x.some((function(t){return!t.classList.contains("invisible")})),A=t.config.embed.autoplay&&t.config.request.flags.autohide_controls,M=ys.touch?300:0,R=null,C=Mh(t.config,"webvr").group||!1;function O(){clearTimeout(e),e=null}function I(){g&&(clearTimeout(e),e=setTimeout(D,r))}function j(){ph.element&&ph.element.classList.contains("js-player-fullscreen")&&(a||(i.classList.add("player-cursor-hide"),u=!0,a=!0))}function D(n){(p||v)&&(w||(O(),document.activeElement&&document.body.classList.contains("showfocus")&&(_.contains(document.activeElement)||k.contains(document.activeElement))||(t.events.fire(n?Pc.Fc:Pc.Uc),u=!0,ys.spatialPlayback&&t.config.video.spatial||(y.classList.add("hidden"),y.setAttribute("hidden","")),o=!0,j())))}function L(){I(),S||b||p&&v||(t.events.fire(Pc.Vc),y.classList.remove("hidden"),y.removeAttribute("hidden"))}function N(){p||v?i.removeAttribute("tabindex"):p||v||m||i.setAttribute("tabindex","0")}function P(){t.events.on([wi.TIME_UPDATE,wi.SEEKED],(function n(i){i.currentTime>=1.75&&null===e&&(t.events.fire(Pc.Ms),t.events.off([wi.TIME_UPDATE,wi.SEEKED],n))}))}function F(){T.classList.remove("threesixty-video"),t.element.classList.remove("grabbable"),t.element.classList.remove("grabbing"),s&&s.hide()}function U(){l.forEach((function(t){return clearTimeout(t)})),l=[]}function B(t){t&&(t.classList.remove("cloaked"),window.requestAnimationFrame((function(){t.classList.add("in")})))}function H(t){t&&(t.classList.add("leaving"),window.requestAnimationFrame((function(){ef(t).on("transitionend",(function n(i){"opacity"===i.propertyName&&(t.classList.remove("in"),t.classList.remove("leaving"),t.classList.add("cloaked"),ef(t).off("transitionend",n))}))})))}function z(t){ec(_).width>60?t.classList.add("vp-alert-bumpdown"):t.classList.remove("vp-alert-bumpdown")}return function(){var n=!0;function e(){L()}function c(e){var s;if(r=2e3,u)u=!1;else if(a&&(i.classList.remove("player-cursor-hide"),a=!1),0!==e.screenX&&e.screenX!==screen.width-1&&0!==e.screenY&&e.screenY!==screen.height-1){if(n=!0,ys.spatialPlayback&&(null==(s=t.config.video)?void 0:s.spatial)){var c=ec(t.element),l=e.clientX-c.left,d=e.clientY-c.top,h=d>t.element.clientHeight-55,v=l>t.element.clientWidth-45&&d<180;if(f||!h&&!v)return}o&&L(),I()}else O(),j(),n&&(D(!0),n=!1)}function l(){D(!0)}function d(t){var n=k.contains(t.target)||_.contains(t.target),i=s&&s.getWrapper().contains(t.target);p&&v||i?n||!p&&!v||D(!0):(clearTimeout(R),R=setTimeout(L,M))}ys.pointerEvents?ef(i).on("pointerenter",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return r=2e3,e();r=4500,d(t)})).on("pointermove",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return c(t)})).on("pointerleave",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return l()})):ef(i).on("touchmove",(function(){r=4500,I()})).on("touchend",d).on("mouseenter",e).on("mousemove",c).on("mouseleave",l)}(),t.events.on(wi.PLAY,(function(t){A||0===t||L()})).on(Pc.He,L).on([yi.BUFFER_ENDED,wi.SEEKED,Pc.$s,Pc.Ss,Pc.ec],I).on(Uo,(function(){g=!0})),t.events.on(Pc.Zs,(function(t){t&&I()})),t.events.on(Pc.gc,N).on(Pc.Js,(function(t){v=t,N()})).on(Pc.Xs,(function(t){p=t,N()})),t.events.on(Pc.ol,(function(){w=!0,L()})).on(Pc.ul,(function(){w=!1})),function(){var e=!1,r=!1,o=0;t.events.on(Pc.Zs,(function(t){r=t})),ef(i).on(ys.pointerEvents?"pointerup":"click",(function(i){if(!r&&2!==i.button&&i.target.classList&&function(t){return(t.classList.contains("vp-title")||t.classList.contains("vp-target")||E.contains(t.parentNode)&&"HEADER"===t.parentNode.tagName||T.contains(t))&&!_.contains(t)}(i.target)){var e=("pointerup"===i.type||"MSPointerUp"===i.type)&&"mouse"!==i.pointerType&&i.pointerType!==i.MSPOINTER_TYPE_MOUSE,u=g&&ys.spatialPlayback&&t.config.video.spatial&&c;if(ys.touch||e){var a=-1!==t.backbone.supportedPresentationModes.indexOf("inline")&&!ys.mobileAndroid;if(!u){if(g&&a)return;return void t.events.fire(Pc.Fs)}}1==++o&&setTimeout((function(){if(u){var e=h&&h.x===i.clientX&&h.y===i.clientY;return 1===o&&e&&!ys.mobileAndroid&&t.events.fire(t.backbone.paused?Pc.Fs:Pc.Ps),1!==o&&t.backbone.getEffectByName("ThreeSixtyEffect").snapToCenter(),void(o=0)}if(1===o){if(n.get(Dl)&&!n.get(Ul))return;t.events.fire(t.backbone.paused?Pc.Fs:Pc.Ps)}else t.events.fire(Pc.Ns);o=0}),200)}})),ef(i).on("mousedown",".vp-video-wrapper",(function(t){var n;if(!e)return y.classList.remove("hidden"),y.removeAttribute("hidden"),2!==t.button&&document.createEvent&&((n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),y.dispatchEvent(n)),!1})).on("contextmenu",".vp-video",(function(t){return y.classList.remove("hidden"),y.removeAttribute("hidden"),!1})),t.events.on(Sc.us,(function(t){if(t)return e=!0,void y.classList.add("hidden");e=!1,y.classList.remove("hidden")}))}(),function(){var n,e;ys.touch||(ef(i).on("focus","a, button, input, [tabindex]",(function(){e=this,clearTimeout(n),n=null,document.activeElement===this&&L()})),ef(i).on("blur","a, button, input, [tabindex]",(function(){document.activeElement===this&&(n=setTimeout(D,50))})),i.addEventListener("focus",(function(t){L(),e&&e.focus()}),!1),t.events.on(Pc.gc,(function(){m=!0,i.removeAttribute("tabindex")})),t.events.on(Pc.yc,(function(){m=!1})))}(),t.events.on(Pc.cc,(function(t){j(),c&&c.adjustRenderSize(),w&&L()})).on(Pc.fc,(function(t){o=!0,c&&c.adjustRenderSize(),t?D():(L(),O())})),P(),t.events.on(Sc.$a,(function(){o=!0,u=!0,v=!0,p=!1,b=!1,g=!1,P(),O()})),t.events.on(Sc.fs,(function(){var n=function(t){return function(){c&&t.apply(void 0,arguments)}},e=n((function(n){var i=t.element.classList.contains("webvr");c&&i&&c.toggleVR()})),r=n((function(n){c.isVRPresenting?setTimeout((function(){t.events.fire(ki.WEBVR_ENTER)}),100):setTimeout((function(){t.events.fire(ki.WEBVR_EXIT)}),100)}));t.events.on(Sc.hs,n((function(){var n=t.element.classList.contains("webvr");n||t.element.classList.add("grabbable"),s&&s.updatePosition(t.element),!s||s.visible||n||s.reveal()}))),t.events.on(Pc.Ts,n((function(){F(),ys.webvr&&c.isVRPresenting&&C&&c.toggleVR()}))),t.events.on(ki.CAMERA_UPDATE,n((function(t){s&&s.setAngle(t.lat,t.lon)}))),t.events.on(Uo,n((function(){t.config.video.spatial?function(){function n(t){d&&(d.innerHTML=dd.render("threesixty_reminder",t))}var e=t.backbone.getEffectByName("ThreeSixtyEffect");t.config.embed.settings.spatial_compass?(s||(s=new ov(t.element.querySelector(".vp-controls-wrapper"),(function(){e.snapToCenter()}))),s.updatePosition(t.element),s.reveal()):s&&s.hide(),t.events.once(Pc.Os,(function(){var i=t.config.embed.cards;(null==i?void 0:i.length)&&i[0].timecode<15||(l.push(setTimeout((function(){n({showArrows:!1,text:ys.android?"Regarder autour":"Cliquez et faites glisser pour voir autour"}),z(d),B(d),setTimeout((function(){return H(d)}),3e3)}),7e3)),ys.android||l.push(setTimeout((function(){n({showArrows:!1,text:ys.android?"Regarder autour":"Utilisez les touches de flèches pour en voir davantage"}),z(d),B(d),setTimeout((function(){return H(d)}),3e3)}),14e3)))})),function(){var t=i;if(!d){var n=d=document.createElement("div");n.classList.add("cloaked"),n.classList.add("vp-alert-round"),n.classList.add("vp-alert-round--top"),n.classList.add("vp-alert-round--threesixty"),t.appendChild(n)}}()}():!t.config.video.spatial&&s&&(F(),U())}))),(ys.webvr||ys.stereoscopic||ys.webxr)&&(ys.webvr&&window.addEventListener("vrdisplaypresentchange",r,!1),t.events.on(Pc.ic,n((function(){U(),ys.webvr&&c.hasVRHeadset&&C?c.toggleVR():t.events.fire(Pc.Nc)}))),t.events.on(ki.WEBVR_HARDWARE_AVAILABLE,n((function(t){var n=i.querySelector(".stereoscopic");n&&n.classList.contains("off")&&C&&n.classList.remove("off")}))),t.events.on(ki.WEBVR_ENTER,n((function(n){window.addEventListener("vrdisplaydisconnect",e,!1),window.addEventListener("vrdisplaydeactivate",e,!1);var r=i.querySelector(".stereoscopic");r&&r.classList.add("on"),s&&s.hide(),t.element.classList.remove("grabbable"),t.element.classList.add("webvr"),c.isUserInteracting=!1}))),t.events.on(ki.WEBVR_EXIT,n((function(n){window.removeEventListener("vrdisplaydisconnect",e),window.removeEventListener("vrdisplaydeactivate",e);var r=i.querySelector(".stereoscopic");r&&r.classList.remove("on"),s&&s.reveal(),t.element.classList.add("grabbable"),t.element.classList.remove("webvr"),c.isUserInteracting=!0}))));var o=null,u=n((function(n){var i=t.element.classList.contains("webvr");f||i||(f=!0,n.preventDefault(),t.element.classList.add("grabbing"),h={x:n.clientX,y:n.clientY},c.makeContact(h))})),a=n((function(n){var i=t.element.classList.contains("webvr");f&&!i&&(U(),c.move({x:n.clientX,y:n.clientY}))})),v=n((function(n){var i=t.element.classList.contains("webvr");f&&!i&&(t.element.classList.remove("grabbing"),c.releaseContact(!1),f=!1)})),p=n((function(n){n.preventDefault(),t.element.classList.contains("webvr")||(c.isUserInteracting||(c.isUserInteracting=!0),null!==o&&clearTimeout(o),U(),o=setTimeout((function(){t.element.classList.remove("player-cursor-hide"),t.element.classList.add("grabbable"),c.isUserInteracting=!1}),500),t.element.classList.add("player-cursor-hide"),t.element.classList.remove("grabbable"),c.moveWheel({x:n.deltaX,y:n.deltaY}))})),m=n((function(t){f||(f=!0,c.makeContact({x:t.touches[0].clientX,y:t.touches[0].clientY}))})),w=n((function(t){f&&(t.preventDefault(),U(),c.move({x:t.touches[0].clientX,y:t.touches[0].clientY}))})),b=n((function(t){c.releaseContact(!0),f=!1})),g=n((function(t){f||U(),c.moveDevice(t.alpha,t.beta,t.gamma,t.orientation)})),_=n((function(n){f=!1,t.element.classList.remove("grabbing"),c.abandonMotion()}));t.events.on(Uo,(function(){ys.android&&c&&window.addEventListener("deviceorientation",g,!1)})),t.events.once(Uo,(function(){if(t.store.watch("ui.player.boundingRect",(function(){s&&s.updatePosition(t.element),c&&c.adjustRenderSize(),f=!1})),ys.pointerEvents)ef(y).on("pointerdown",u),window.addEventListener("pointermove",a),window.addEventListener("pointerup",v),window.addEventListener("pointerleave",_);else{ef(y).on("mousedown",u).on("wheel",p);var n=!(ys.browser.ie||ys.browser.edge);window.addEventListener("touchstart",m,!!n&&{passive:!1}),window.addEventListener("touchmove",w,!!n&&{passive:!1}),window.addEventListener("touchend",b,!!n&&{passive:!1}),window.addEventListener("mousemove",a),window.addEventListener("mouseup",v),window.addEventListener("mouseleave",_)}}))})),t.events.on(Wo,(function(t){F(),c=t,U()})),t.events.on(Pc.Ds,(function(){b=!0,clearTimeout(R),R=null})),t.events.on(Pc.Ls,(function(){b=!1})),{}}function av(t,n,i,e){if(!It(t))return t;for(var r=-1,o=(n=Zu(n,t)).length,u=o-1,a=t;null!=a&&++r<o;){var s=Qu(n[r]),c=i;if(r!=u){var l=a[s];void 0===(c=e?e(l,s,a):void 0)&&(c=It(l)?l:ui(n[r+1])?[]:{})}ei(a,s,c),a=a[s]}return t}function sv(t,n){return null!=t&&n in Object(t)}function cv(t,n){return function(t,n,i){for(var e=-1,r=n.length,o={};++e<r;){var u=n[e],a=ta(t,u);i(0,u)&&av(o,Zu(u,t),a)}return o}(t,n,(function(n,i){return function(t,n){return null!=t&&function(t,n,i){for(var e=-1,r=(n=Zu(n,t)).length,o=!1;++e<r;){var u=Qu(n[e]);if(!(o=null!=t&&i(t,u)))break;t=t[u]}return o||++e!=r?o:!!(r=null==t?0:t.length)&&Ln(r)&&ui(u,r)&&(Dn(t)||jn(t))}(t,n,sv)}(t,i)}))}var lv=Tt?Tt.isConcatSpreadable:void 0;function fv(t){return Dn(t)||jn(t)||!!(lv&&t&&t[lv])}function dv(t){return null!=t&&t.length?function t(n,i,e,r,o){var u=-1,a=n.length;for(e||(e=fv),o||(o=[]);++u<a;){var s=n[u];i>0&&e(s)?i>1?t(s,i-1,e,r,o):Mu(o,s):r||(o[o.length]=s)}return o}(t,1):[]}var hv=function(t){return Kt(gt(t,void 0,dv),t+"")}((function(t,n){return null==t?{}:cv(t,n)})),vv=["clip_id","profile_id","player_size","dropped_frames","total_frames","bandwidth","markers","streams","files","video_dims","min_bandwidth","max_badwidth","buffer_occupancy","live_latency","scanner","vr_headset"],pv=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.tf=t,this.Pf={},this.Ff=n,this.Vf=null}var n=t.prototype;return n.init=function(){this.Uf(),this.Bf(),this.Hf(),this.zf()},n.reset=function(){this.Uf(),this.zf(),this.Ff()},n.qf=function(t,n){return this.Pf[t]=[n],this.Ff(),this.Pf[t]},n.Wf=function(t,n){return this.Pf[t].push(n),this.Pf[t].length>300&&this.Pf[t].splice(0,25),this.Ff(),this.Pf[t]},n.getCurrent=function(t){return this.Pf[t].slice(-1)[0]},n.getSeries=function(t){return this.Pf[t]},n.Gf=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,i=Ja({},t.data),e=this.$f(n,i);this.Kf(n,n,e)},n.$f=function(t,n){if(t===nl.CHUNK_DOWNLOADED){var i={};i.duration=fc(n.duration,2),i.size=n.size,i.index=n.index,i.profile_id=n.profile_id,i.quality=n.quality,i.buffered=fc(n.buffered,2),i.ttfb=fc(n.ttfb,2),i.headers=hv(n.headers,["x_vim_cachebc","x_cache","akamai_edge_ip","x_akamai_request_id","content_type"]);var e=0,r=0,o=0,u=i.headers.x_vim_cachebc,a=i.headers.x_cache;return u?u.split(",").forEach((function(t){var n=Q(t.split(":"),2),i=n[0],e=n[1];"E"!==i||"h"!==e?"h"!==e||(r=1):o=1})):a&&(r="HIT"===a.substr(0,3),o="HIT"===a.substr(-3)),o?e=2:r&&(e=1),i.cache_hit=e,i}if(t===nl.VIDEO_PLAYBACK_ERROR||t===nl.VIDEO_LOAD_FAILURE||t===nl.VIDEO_START_FAILURE||t===nl.VIDEO_READY)return n;if(void 0!==n.autoplay&&void 0!==n.looping){var s={};return s.cdn=n.cdn,s.quality=n.quality,s}return n},n.Kf=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=this.tf.backbone.currentTime,r=Date.now(),o=fc(dt(e,this.tf.backbone.buffered),2);this.Wf("markers",{type:t,title:n,vt:e,t:r,bt:o,data:i})},n.Bf=function(){this.tf.events.on(yi.BANDWIDTH,this.Yf.bind(this)),this.tf.events.on(yi.BUFFER_OCCUPANCY,this.Jf.bind(this)),this.tf.events.on(yi.CURRENT_FILE_CHANGE,this.Xf.bind(this)),this.tf.events.on(yi.DROPPED_FRAMES,this.Zf.bind(this)),this.tf.events.on(yi.SCANNER_CHANGE,this.Qf.bind(this)),this.tf.events.on(yi.STREAM_CHANGE,this.td.bind(this)),this.tf.events.on(yi.STREAM_CHANGE_START,this.nd.bind(this)),this.tf.events.on(wi.TIME_UPDATE,this.ed.bind(this)),this.tf.events.on(ki.WEBVR_HARDWARE_AVAILABLE,this.rd.bind(this)),this.tf.events.on(Pc.Yl,this.Gf.bind(this))},n.rd=function(t){t.displayName&&this.qf("vr_headset",t.displayName)},n.od=function(){var t=this;this.Vf=setInterval((function(){var n=t.tf.backbone.buffered,i=t.tf.backbone.videoElement;if(n&&n.length&&i&&i.currentTime){var e=n.end(n.length-1)-i.currentTime;t.qf("live_latency",e)}else t.qf("live_latency",0)}),500)},n.ud=function(){clearInterval(this.Vf)},n.Hf=function(){var t=this;this.tf.store.watch("ui.player.boundingRect",(function(n){var i=t.getCurrent("video_dims"),e=t.ad(n);t.Wf("video_dims",e);var r=i?"Resized from ".concat(i," to ").concat(e):"Resized to ".concat(e);t.Kf(Hc.MARKER_RESIZE,r)}))},n.ad=function(t){var n="".concat(Math.round(t.width),"px"),i="".concat(Math.round(t.height),"px"),e=window.devicePixelRatio&&window.devicePixelRatio>1?"@".concat(fc(window.devicePixelRatio,3),"x"):"";return n&&i?"".concat(parseInt(n,10),"×").concat(parseInt(i,10)," ").concat(e):""},n.Uf=function(){this.Pf=vv.reduce((function(t,n){return t[n]=[],t}),{})},n.zf=function(){var t=this.tf.backbone.currentFile;this.Wf("files",t),this.Wf("scanner",this.tf.backbone.currentScannerName),"HLSLiveScanner"===this.tf.backbone.currentScannerName&&this.od(),this.qf("min_bandwidth",0),this.qf("max_badwidth",0);var n=this.tf.store.get("ui.player.boundingRect"),i=this.ad(n);this.Wf("video_dims",i)},n.Yf=function(t){var n=Math.round(100*t.speed)/100;this.Wf("bandwidth",{videoTime:this.tf.backbone.currentTime,time:Date.now(),value:n});var i=this.getCurrent("max_badwidth"),e=this.getCurrent("min_bandwidth");(!e||n<e)&&this.qf("min_bandwidth",n),(!i||n>i)&&this.qf("max_badwidth",n)},n.Zf=function(t){var n=t.dropped,i=t.total;this.qf("total_frames",i),this.qf("dropped_frames",n)},n.su=function(){this.Kf(Hc.MARKER_SEEKED,"Seeked to ".concat(this.tf.backbone.currentTime))},n.sd=function(){this.Kf(Hc.MARKER_ENDED,"Ended")},n.nd=function(t){var n=t.previousStreamIndex,i=t.index,e=t.streams,r=e[i],o=e[n],u=o?o.bitrate:null;if(u!==r.bitrate&&null!==u){var a=this.ld(o),s=this.ld(r);r.bitrate<u?this.Kf(Hc.MARKER_DOWNSWITCH,"Starting Downswitch from ".concat(a," to ").concat(s)):r.bitrate>u&&this.Kf(Hc.MARKER_UPSWITCH,"Starting Upswitch from ".concat(a," to ").concat(s))}},n.td=function(t,n,i){var e=i[n],r=this.ld(e);this.Kf(Hc.MARKER_SWITCH_COMPLETE,"Completed switch to ".concat(r)),this.Wf("streams",{profile:void 0!==t?t.profile:null,quality:void 0!==t?t.quality:"".concat(e.height,"p"),bitrate:e.bitrate,framerate:e.framerate,height:e.height,width:e.width,id:e.id,codec:Sh(e.codecs)})},n.Xf=function(){var t=this.getCurrent("files"),n=this.tf.backbone.currentFile;this.Wf("files",n);var i=n.metadata.cdn,e=t?t.metadata.cdn:null,r=t?Vc[t.mime]:null,o=Vc[n.mime],u="CDN to ".concat(i,"/").concat(o);e&&(u="CDN from ".concat(e,"/").concat(r," to ").concat(i,"/").concat(o)),this.Kf(Hc.MARKER_FILE_CHANGE,u)},n.Jf=function(t){var n=Math.round(1e3*t)/1e3;this.Wf("buffer_occupancy",{videoTime:this.tf.backbone.currentTime,time:Date.now(),value:n})},n.Qf=function(){var t=this.getCurrent("scanner"),n=this.tf.backbone.currentScannerName;this.qf("scanner",n),t&&this.Kf(Hc.MARKER_SCANNER_CHANGE,"Scanner change to ".concat(n)),"HLSLiveScanner"===n?this.od():this.ud()},n.fd=function(){this.Kf(Hc.MARKER_STALLED,"Stalled")},n.ld=function(t){return"".concat(t.width,"×").concat(t.height,"@").concat(Math.round(t.framerate)," ").concat(Math.round(t.bitrate/1e3).toLocaleString()," Kbps")},n.ed=function(){this.Ff()},H(t,[{key:"onDataChange",set:function(t){this.Ff=t}}]),t}(),mv=function(t,n,i){return Math.min(Math.max(t,n),i)},wv=function(){function t(t,n){var i=this;this.Z=t,this.tf=n,this.dd=new pv(this.tf),this.dd.onDataChange=function(){i.vd()},this.dd.init(),this.Sn(),this.Y=!1,this.pd=!1,this.wd=!1}var n=t.prototype;return n.render=function(){if(this.Y){var t={};try{t=this.bd()}catch(t){}this.Z.innerHTML=dd.render("debug_panel",t)}},n.vd=function(){if(this.Y)try{var t=this.bd();this.Z.querySelector(".vp-stats-debug-values").innerHTML=dd.render("debug_values",t)}catch(t){}},n.resetData=function(){this.dd.reset(),this.render()},n.Sn=function(){var t=this;this.tf.events.on(Pc.Rc,(function(){"tiny"!==t.tf.store.get("ui.player.mode")&&(t.Z.classList.contains("hidden")?t.showPanel():t.hidePanel())})),Nh(this.Z,".vp-copy-debug",this.gd.bind(this)),this.tf.events.on(Pc.Jc,(function(){t.resetData()})),Nh(this.Z,".vp-stats-debug-close",(function(){t.hidePanel()})),this.tf.store.watch("ui.player.mode",this.toggleVisibility.bind(this))},n.hidePanel=function(){this.Z.classList.add("hidden"),this.Z.setAttribute("hidden",""),this.Z.setAttribute("aria-hidden","true"),this.Y=!1},n.showPanel=function(){this.Z.classList.remove("hidden"),this.Z.removeAttribute("hidden"),this.Z.setAttribute("aria-hidden","false"),this.Y=!0,this.render()},n.toggleVisibility=function(t){if("tiny"===t&&this.Y)return this.pd=!0,void this.hidePanel();this.pd&&(this.showPanel(),this.pd=!1)},n.bd=function(){var t,n,i,e=this.dd.getCurrent("scanner"),r="MediaSourceScanner"===e,o="HLSLiveScanner"===e,u=this.dd.getCurrent("video_dims"),a=!(!this.tf.config.request.files||!this.tf.config.request.files.dash)&&this.tf.config.request.files.dash.separate_av,s=r||o?this.yd():null,c=r||o?this._d(s):null,l=this.dd.getCurrent("vr_headset")||null,f=this.tf.currentTime,d=ft(f,this.tf.backbone.buffered),h=f+d,v=this.kd(this.tf.backbone.buffered),p=this.tf.backbone.brainDebug,m={playerVersion:el(this.tf.config),sessionId:this.tf.config.request.session,clientIp:null==(t=this.tf.config.request)||null==(n=t.client)?void 0:n.ip,showSessionId:this.wd,clipId:this.tf.config.video.id,isDash:r,isLive:o,embedSize:u,separateAudioVideo:a,bandwidthSeriesSvg:c,isCopyDisabled:!!this.tf.doNotTrackEnabled||this.tf.config.embed.settings.background,isDNTEnabled:this.tf.doNotTrackEnabled,hideCloseButton:!!this.tf.config.embed.settings.background,vrHeadsetName:l,currentTime:fc(f,3),bufferAhead:fc(d,3),bufferEnd:fc(h,3),readyState:this.tf.backbone.readyState,support:JSON.stringify(ys),ua:null==(i=navigator)?void 0:i.userAgent,bufferedRanges:JSON.stringify(v),brainDebug:JSON.stringify(p)};return Object.assign(m,this.Ed(),this.Td(),this.xd(),this.Sd(),this.Ad(),this.Md(o),this.Rd())},n.Md=function(t){return t?{liveLatency:"".concat(this.dd.getCurrent("live_latency").toFixed(2)," seconds"),liveSessionID:this.tf.config.video.live_event.id}:null},n.Rd=function(){if(!this.tf.config.video.p2p)return null;var t=na(window,"Streamroot.instances[0].stats"),n=na(t,"realtime.dnaSources");if(void 0===n)return null;var i=na(t,"currentContent.cdnDownload"),e=na(t,"currentContent.dnaDownload");return{p2pSources:n,p2pOffload:"".concat(fc(e/(i+e)*100,1),"%")}},n.Ad=function(){var t=this.dd.getCurrent("files");return t?{delivery:t.mime}:null},n.Ed=function(){var t=this.dd.getCurrent("bandwidth");return{bandwidthKbps:t?"".concat(Math.floor(t.value/1e3).toLocaleString()," Kbps"):0,bandwidthMinKbps:"".concat(Math.floor(this.dd.getCurrent("min_bandwidth")/1e3).toLocaleString()," Kbps"),bandwidthMaxKbps:"".concat(Math.floor(this.dd.getCurrent("max_badwidth")/1e3).toLocaleString()," Kbps")}},n.Td=function(){var t=this.dd.getCurrent("streams");return{codec:t?t.codec:null,resolution:t?"".concat(t.width,"×").concat(t.height,"@").concat(Math.round(t.framerate)," ").concat(Math.round(t.bitrate/1e3).toLocaleString()," Kbps"):null}},n.Sd=function(){var t=this.dd.getCurrent("total_frames")||0,n=this.dd.getCurrent("dropped_frames")||0;return{totalFrames:t,droppedFrames:n,droppedFramesPercent:0!==t?"".concat((n/t*100).toFixed(2),"%"):0}},n.xd=function(){var t=this;return{testGroup:Object.keys(this.tf.config.request.ab_tests).map((function(n){return"".concat(n,": ").concat(t.tf.config.request.ab_tests[n].group)})).join(", ")}},n.yd=function(){return{timeSeries:this.dd.getSeries("bandwidth"),max:this.dd.getCurrent("max_badwidth")}},n.Cd=function(){return{timeSeries:this.dd.getSeries("buffer_occupancy")}},n._d=function(t){for(var n=t.timeSeries,i=t.max||1,e=n.length,r=e<100?0:e-100,o=n[r],u=n[e-1],a=o?o.time:0,s=u?u.time:0,c=[],l=r;l<e;l++){var f=n[l],d=(f.time-a)/(s-a)*250,h=14-14*f.value/i;isNaN(h)&&(h=0),isNaN(d)&&(d=0),c.push("".concat(d,",").concat(mv(h,0,14)))}var v={height:14,width:250,points:c.join(" "),markers:this.Od(a,s)};return dd.render("time_series_graph",v)},n.Id=function(t){var n=Object.keys(Hc).find((function(n){return Hc[n]===t}));return zc[n]},n.Od=function(t,n){var i=this,e=this.dd.getSeries("markers")||[];return 0===e.length?null:e.map((function(e){var r=e.t;if(r<t||r>n)return"";var o=(r-t)/(n-t)*250;return isNaN(o)&&(o=0),"<g>\n <title>".concat(e.title,'</title>\n <line class="stats-debug-marker" x1="').concat(o,'" y1="',0,'" x2="').concat(o,'" y2="').concat(14,'" stroke-width="1" stroke="').concat(i.Id(e.type),'" />\n </g>')})).join("")},n.jd=function(){this.wd=!0,this.vd()},n.Dd=function(t,n){var i=n.getAttribute("data-original-text"),e=n.innerText,r=i;i||(n.setAttribute("data-original-text",e),r=e);var o=document.createElement("textarea");if(o.value=t,this.Z.appendChild(o),o.select(),document.execCommand("copy")){n.innerHTML="Copied",this.Z.removeChild(o);var u=setTimeout((function(){n.innerHTML=r,clearTimeout(u)}),1500);return!0}return this.Z.removeChild(o),!1},n.gd=function(){var t=this.Z.querySelector(".vp-copy-debug-label"),n=this.bd(),i=this.dd.getSeries("markers");delete n.bandwidthSeriesSvg;var e={version:2,tpl:n,mark:i},r=btoa(JSON.stringify(e));this.Dd(r,t)||this.jd()},n.kd=function(t){if(!t)return null;for(var n=t.length,i=0,e=[];i<n;i++){var r=t.start(i),o=t.end(i);e.push({i:i,start:r,end:o})}return e},t}(),bv=function(){function t(t){this.alertTextElement=t.querySelector(".vp-text-alert-wrapper"),this.alertContentTitle=this.alertTextElement.querySelector(".vp-live-start-time-title"),this.alertContentTime=this.alertTextElement.querySelector(".vp-live-start-time-body"),this.alertContentFooter=this.alertTextElement.querySelector(".vp-live-start-time-footer")}var n=t.prototype;return n.show=function(t,n,i){this.alertContentTitle.innerHTML=t,this.alertContentTime.innerHTML=n,this.alertContentFooter.innerHTML=i,this.alertContentTitle.classList.remove("hidden"),this.alertContentTime.classList.remove("hidden"),this.alertContentFooter.classList.remove("hidden"),this.alertTextElement.classList.remove("hidden")},n.hide=function(){this.alertContentTitle.classList.add("hidden"),this.alertContentTime.classList.add("hidden"),this.alertContentFooter.classList.add("hidden"),this.alertTextElement.classList.add("hidden")},t}(),gv=function(){function t(t,n,i){this.textAlert=new Eh(t),this.timeAlert=new bv(t),this.player=n,this.store=i,this.startTime=new Date(this.store.get(Nl,null)),this.Oa=!1,this.Ld(),this.Nd()}var n=t.prototype;return n.disable=function(){this.hide(),this.Oa=!0},n.hide=function(){this.textAlert.hide(),this.timeAlert.hide()},n.Nd=function(){(this.store.get(Fl)||this.store.get(Vl))&&this.Pd(),this.store.get(Bl)&&this.Fd()},n.Ld=function(){this.player.events.on(tu.EVENT_ACTIVE,this.Pd.bind(this)),this.player.events.on(tu.STREAM_ONLINE,this.Vd.bind(this)),this.player.events.on(tu.STREAM_OFFLINE,this.Ud.bind(this)),this.player.events.once(tu.EVENT_ENDED,this.Fd.bind(this))},n.Pd=function(){this.Bd()>6e4?(this.textAlert.hide(),this.Hd()):(this.timeAlert.hide(),this.textAlert.show("Cet évènement n'a pas encore commencé"))},n.Hd=function(){var t=this.zd();this.timeAlert.show(t[0],t[1],t[2]),!this.store.get(Fl)&&!this.store.get(Vl)||this.Oa||setTimeout(this.Nd.bind(this),3e4)},n.Bd=function(){return this.startTime-new Date},n.zd=function(){var t=this.Bd(),n=(t/6e4).toFixed(0),i=(t/36e5).toFixed(0),e=(t/864e5).toFixed(0),r=(new Date).toDateString()===this.startTime.toDateString();if(e>1||!r)return["This event is scheduled for","".concat(["January","February","March","April","May","June","July","August","September","October","November","December"][this.startTime.getMonth()]," ").concat(this.startTime.getDate()),"at ".concat(gd(this.startTime))];if(i>1&&r)return["This event is scheduled for","Today","at ".concat(gd(this.startTime))];var o=n>1?"minutes":"minute";return["This event will start in","".concat(n," ").concat(o),""]},n.Vd=function(){this.hide()},n.Ud=function(){this.textAlert.show("Le live stream est déconnecté"),ys.iOS&&ph.element&&(this.player.events.fire(Pc.lc),ph.exit())},n.Fd=function(){this.textAlert.show("L'évènement live a fini")},t}();function yv(t,n){var i,e=n.querySelector(".vp-notification");function r(t,r){if(null!==n.parentElement.offsetParent){n.classList.remove("hidden"),n.removeAttribute("hidden"),n.setAttribute("data-name",t);var u=function(t){var i="watchlater"===t||"unwatchlater"===t?.5:.4,e=n.clientHeight;return n.clientHeight>n.clientWidth&&(e=n.clientWidth),{height:Math.round(e*i),width:Math.round(e*i*1.6)}}(t),a="width:"+u.width+"px;height:"+u.height+"px";e.style.cssText=a,e.innerHTML=r,"watchlater"!==t&&"unwatchlater"!==t||function(t,n){var i=t.querySelector(".hour-hand"),e=t.querySelector(".minute-hand");if(i&&e){var r=n?1:-1,o=new Date,u=Math.abs(o.getHours()-12),a=o.getMinutes(),s=a/60*360-135,c=u/12*360+a/60*5,l=c+45*r,f=s+540*r;i.style[ys.transformProperty]="rotate("+c+"deg)",e.style[ys.transformProperty]="rotate("+s+"deg)",window.requestAnimationFrame((function(){t.classList.add("animate"),ys.browser.firefox||ys.browser.opera||window.requestAnimationFrame((function(){i.style[ys.transformProperty]="rotate("+l+"deg)",e.style[ys.transformProperty]="rotate("+f+"deg)"}))}))}}(e,"watchlater"===t),clearTimeout(i),n.classList.remove("animate"),window.requestAnimationFrame((function(){n.classList.remove("invisible"),i=setTimeout(o,750)}))}}function o(){n.classList.add("animate"),n.classList.add("invisible")}function u(){n.classList.remove("animate"),n.classList.remove("invisible"),n.classList.add("hidden"),n.setAttribute("hidden",""),n.removeAttribute("data-name"),e.innerHTML="",e.classList.remove("filled"),e.classList.remove("animate"),t.events.fire(Pc.jl)}return ef(n).on("transitionend",(function(t){e.contains(t.target)&&"height"===t.propertyName?setTimeout(o,100):t.target===n&&"opacity"===t.propertyName&&window.requestAnimationFrame(u)})),t.events.on(Pc.Bc,(function(t){t||r("like",dd.render("icon_heart"))})),t.events.on(Pc.Hc,(function(t){t||r("unlike",dd.render("icon_broken_heart"))})),t.events.on(Pc.zc,(function(t){t||r("watchlater",dd.render("icon_clock"))})),t.events.on(Pc.qc,(function(t){t||r("unwatchlater",dd.render("icon_clock"))})),t.events.fire(Pc.Cl),{}}function _v(t){return t.account_type&&"basic"!==t.account_type&&!/_lapsed|_expired/.test(t.account_type)}function kv(t,n){var i=nt(),e=!1;function r(t){ac(t,"facebook",{width:580,height:400})}function o(t){ac(t,"twitter",{width:550,height:420})}function u(t){ac(t,"tumblr",{width:540,height:600})}var a={get events(){return i},setup:function(){var i;n.classList.remove("vp-share-embed-active","vp-share-embed-only"),(null==(i=t.config.embed.settings.share)?void 0:i.embed_only)&&n.classList.add("vp-share-embed-only");var e=n.querySelector(".js-embedCopy");e&&(e.style.width=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;n=Object.keys(n).map((function(t){return n[t]}));var e=t.cloneNode();e.style.visibility="hidden",e.style.padding=0,t.parentElement.appendChild(e);var r=n.map((function(t){return e.innerText=t,e.clientWidth})),o=Math.max.apply(Math,tt(r)),u=window.getComputedStyle(t),a=parseFloat(u.fontSize);return t.parentElement.removeChild(e),"".concat((o+i)/a,"em")}(e,["Copier","Copié !"])),t.events.on(Pc.Ec,r).on(Pc.Tc,o).on(Pc.xc,u)},destroy:function(){t.events.off(Pc.Ec,r).off(Pc.Tc,o).off(Pc.xc,u)},getShareData:function(){var n,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.config.video.title,u=t.config.video.owner.name,a=t.config.video.share_url;return e=document.queryCommandSupported&&document.queryCommandSupported("copy"),r.template=dd.render("share",{url:t.config.video.url,shareUrl:a,playerShareUrl:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/share"),title:o,owner:u,embed:"public"===t.config.video.embed_permission&&t.config.embed.settings.embed,embedOnly:null==(n=t.config.embed.settings.share)?void 0:n.embed_only,embedCode:Bh(t.config.video.embed_code),copyButton:e,customizeEmbed:!!t.config.video.url,readOnly:!ys.touch,facebookIcon:dd.render("icon_facebook",{title:"Partager sur Facebook"}),twitterIcon:dd.render("icon_twitter",{title:"Partager sur Twitter"}),tumblrIcon:dd.render("icon_tumblr",{title:"Partager sur Tumblr"}),emailIcon:dd.render("icon_mail",{title:"Partager par e-mail"}),embedIcon:dd.render("icon_embed",{title:"Obtenir le code dintégration"}),strings:{share:"Partager",emailSubject:"Découvrez « "+o+" » de "+u+" sur Vimeo",emailBody:"Découvrez « "+o+" » de "+u+" sur Vimeo.\n\nLa vidéo est disponible et peut être vue depuis "+a+"\n\nSi vous aimez cette vidéo, partagez-là !\n\nVimeo regorge de vidéos incroyables. Voir dautres vidéos sur https://vimeo.com.",embedTitle:"Intégration",embedSubtitle:"Ajoutez cette vidéo à votre site en utilisant le code dintégration ci-dessous.",copy:"Copier",copySuccess:"Copié !",customize:'<a href="'.concat(t.config.video.url,'#embed" target="_blank" rel="noopener" aria-describedby="new-window">')+"Personnalisez cette intégration</a> sur Vimeo"}}),r.qd=".js-facebook",(null==(i=t.config.embed.settings.share)?void 0:i.embed_only)&&(r.wrapperClass="embed-only",r.qd=".js-embed-input"),r},showShareView:function(){n.querySelector(".js-share-screen").classList.remove("cloaked"),n.classList.remove("vp-share-embed-active"),i.fire(Pc.Ic)},showEmbedView:function(){t.config.embed.settings.share.embed_only||(n.querySelector(".js-embed-screen").classList.remove("cloaked"),n.classList.add("vp-share-embed-active")),i.fire(Pc.jc)}};return function(){var r;ef(n).on("transitionend",".js-share-screen",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(i.fire(Pc.Lc),this.classList.add("cloaked"))})).on("transitionend",".js-embed-screen",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(i.fire(Pc.Dc),this.classList.add("cloaked"),lc(n))})).on("copy","input[name=embed_code]",(function(){t.events.fire(Pc.Ac)})),Nh(n,".js-facebook",(function(){return t.events.fire(Pc.Ec,this.href),ic(),!1})),Nh(n,".js-twitter",(function(){return t.events.fire(Pc.Tc,this.href),ic(),!1})),Nh(n,".js-tumblr",(function(){return t.events.fire(Pc.xc,this.href),ic(),!1})),Nh(n,".js-email",(function(){return t.events.fire(Pc.Sc),window.top.location=this.href,ic(),!1})),Nh(n,".js-embed",(function(){return t.events.fire(Pc.pc),a.showEmbedView(),ic(),!1})),Nh(n,".js-embedCopy",(function(){if(e){n.querySelector("input[name=embed_code]").select();try{document.execCommand("copy")&&function(){t.events.fire(Pc.Ac);var i=n.querySelector(".js-embedCopy");i.innerHTML=i.getAttribute("data-success-label"),clearTimeout(r),r=setTimeout((function(){i.innerHTML=i.getAttribute("data-label")}),2e3)}()}catch(t){}return document.activeElement.blur(),!1}})),ys.touch?ef(n).on("focus","input[name=embed_code]",(function(){var t=this;setTimeout((function(){t.setSelectionRange(0,9999),t.setAttribute("readonly","readonly")}),0)})).on("blur","input",(function(){this.removeAttribute("readonly")})):ef(n).on("click","input[name=embed_code]",(function(){this.setSelectionRange(0,9999)}))}(),a}function Ev(t,n,i){var e,o,u,a=i.querySelector(".vp-outro"),s=null,c=!1,l=!1,f=!1,d=!1,h=!1,v=kd(x,250),p=null,m=t.config.request.ads instanceof Object,w=!1;function b(){return!h&&null===s&&!t.config.embed.loop}function g(){return t.config.embed.outro===qc.VOD?(o=qc.VOD,s=y(o),!0===d&&E(),r.resolve(s)):(h=!0,Ke("https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/outro?on_site=").concat(t.config.embed.on_site,"&type=").concat(t.config.embed.outro,"&email=").concat(t.config.embed.email?1:0),{withCredentials:!0}).json().then((function(n){return o=n.type,(s=y(o,n.data))&&(s.bgimage&&ml(s.bgimage),s.contexts&&s.contexts.forEach((function(t){t.videos.forEach((function(t){ml(t.thumbnail)}))}))),_v(t.config.video.owner)&&function(n,i){[qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(n)&&i.contexts&&i.contexts.forEach((function(n){n.videos.reduce((function(n,i){return n.then(function(n){return function(){return t.preloadVideo("auto",n.id,{autoplay:!0}).catch((function(t){}))}}(i))}),r.resolve())}))}(o,s),s})))}function y(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=hl(t.element.clientWidth*ys.devicePixelRatio,t.element.clientHeight*ys.devicePixelRatio),r=e.width,o=e.height;if(i.img_base&&(i.bgimage=vl({width:r,height:o,baseUrl:i.img_base})),n===qc.VOD){var u=void 0!==t.config.video.vod.is_preorder?t.config.video.vod.is_preorder:!!t.config.video.vod.date_available,a=t.config.video.vod.is_coming_soon,s=t.config.video.vod.date_available_formatted_datetime||t.config.video.vod.date_available,c="Bientôt disponible sur Vimeo On Demand.";a&&s&&(c="Disponible sur Vimeo On Demand le "+s+" !"),u&&(c="Précommander maintenant. Disponible le "+s+"."),i={purchased:t.config.user.purchased,title:t.config.video.vod.feature_title,url:t.config.video.vod.url,currency:t.config.request.currency,countries:t.config.video.vod.countries,country:t.config.request.country,buttons:t.config.video.vod.purchase_options,translationMap:t.config.request.dynamic_translation_map,isPreorder:u,isComingSoon:a,releaseDate:s,strings:{watch:u?"Disponible le "+s:"Regarder",preRelease:c}}}return[qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(n)&&(t.config.user.following=i.following,(i={contexts:Array.isArray(i)?i:[i],owner:t.config.video.owner.id,bgimage:i.bgimage,following:i.following}).contexts&&i.contexts.forEach((function(t){t.videos.forEach((function(n){if(n.fullTitle=n.title,n.byline="",n.owner.id!==i.owner&&(n.fullTitle=n.title+" de "+n.owner.name,n.byline="de "+n.owner.name),n.thumbnail_base){var e=Math.round(r/t.videos.length);n.thumbnail=vl({width:e,height:Math.round(e/1.778),baseUrl:n.thumbnail_base})}}))}))),n===qc.LINK&&(i.url=Jh(i.url),i.url2=Jh(i.url2)),n===qc.SHARE&&(i.strings={back:"Retour"}),i}function _(t){a.classList.toggle("vp-outro--link-medium",t)}function k(t){a.classList.toggle("vp-outro--link-large",t)}function E(){if(c=!0,o===qc.BEGINNING)return a.innerHTML="",void t.events.fire(Sc.$a);if(b())g().then((function(){return E()})).catch((function(){}));else{var r=function(){if([qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(o)){var n;if(0===((null==(n=s)?void 0:n.contexts)||[]).reduce((function(t,n){return t+n.videos.length}),0))return null;s.showFollowButton=!t.config.user.owner&&t.config.user.logged_in,s.strings={follow:"Suivre",following:"Abonné",unfollow:"Ne plus suivre"}}return s&&(s.target=!t.config.embed.on_site),p=o,[qc.THREEVIDEOS,qc.PROMOTED].includes(o)&&(p=qc.VIDEOS),dd.render("outro_"+p,s)}();r&&(a.innerHTML=r,a.setAttribute("data-type",p),i.classList.remove("hidden"),i.removeAttribute("hidden"),l=!0,[qc.VIDEOS,qc.THREEVIDEOS].includes(o)?function(){var t=document.querySelector(".js-outro-followWrap");if(t){var n=window.getComputedStyle(t),i=parseFloat(n.fontSize);t.style.width="".concat(t.clientWidth/i,"em")}}():o===qc.LINK?(n.watch("ui.outro.isLinkTitleVisible",_),n.watch("ui.outro.isLinkDescriptionVisible",k),_(n.get("ui.outro.isLinkTitleVisible")),k(n.get("ui.outro.isLinkDescriptionVisible"))):o===qc.SHARE&&function(){var t=i.querySelector(".js-outro-content"),n=e.getShareData();t.innerHTML=n.template,e.setup()}(),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){i.classList.add("in"),x()}))})))}}function T(){if(l)return e.destroy(),c=!1,f=!1,l=!1,void window.requestAnimationFrame((function(){i.classList.remove("in"),t.events.fire(Pc.ul),A()}));c&&(c=!1,t.events.fire(Pc.ul))}function x(){var n;if(!f&&i.clientWidth){ef(window).off("resize",v),f=!0;var e=[];(null==(n=s)?void 0:n.contexts)&&s.contexts.forEach((function(t){t.videos&&t.videos.forEach((function(t){var n=t.id,i=a.querySelector('[data-video-id="'+n+'"]');i&&i.clientWidth>0&&e.push(n)}))})),t.events.fire(Pc.ol,e)}}function S(){u=setTimeout((function(){var n=t.config.embed.email||{};n&&"after"===n.position?(t.events.fire(Pc.Pc),t.events.on(Pc.kl,(function(){t.events.fire(Sc.as)}))):t.events.fire(Sc.as)}),250)}function A(){ef(window).off("resize",v),ef(window).on("resize",v)}return t.events.on(wi.TIME_UPDATE,(function(t){var n=t.currentTime,i=t.duration;t.timeProgress,d=!1,b()&&n>=i-10&&g().catch((function(){}))})),t.events.on(Uo,(function(){[qc.NOTHING,qc.BEGINNING,qc.EMAIL].includes(t.config.embed.outro)&&(o=t.config.embed.outro,s=!1)})),t.events.on(Pc.Kl,(function(){w=!0})),t.events.on(Pc.Ts,(function(){if(m&&!w)return t.events.on(Pc.Kl,S),void(m=!1);S()})),t.events.on(Pc._loadVideo,(function(){clearTimeout(u)})),t.events.on(Sc.as,(function(n,i){t.performDelegateAction(Lc,(function(){n&&(o=n,s=null,h=!1),i&&i.data&&(s=y(n,i.data)),d=!0,E()}))})),ef(i).on("click",".js-videoLink",(function(n){var i=parseInt(this.getAttribute("data-video-id"),10);t.events.fire(Pc.al,i),_v(t.config.video.owner)&&(n.preventDefault(),t.loadVideo(i,{autoplay:!0}))})),ef(i).on("click",".js-cta",(function(n){t.events.fire(Pc.bl,this.href)})),ef(i).on("click",".js-link",(function(n){t.events.fire(Pc.hl,this.href)})),ef(i).on("click",".js-imageLink",(function(n){t.events.fire(Pc.wl,this.href)})),ef(i).on("transitionend",(function(t){i.classList.contains("in")||(i.classList.add("hidden"),i.setAttribute("hidden",""))}),!1),t.events.on([Sc._hideOutro,Sc.$a,wi.PLAY,wi.SEEKED,Pc.Gs],T),t.events.on(Pc.ol,(function(){t.element.classList.add("player-outroVisible")})).on(Pc.ul,(function(){t.element.classList.remove("player-outroVisible")})),Nh(i,".js-outro-follow",(function(){t.events.fire(Pc.bc)})),ef(i).on("mouseleave",".js-outro-follow",(function(t){var n=document.querySelector(".js-outro-follow");n&&n.classList.remove("vp-outro-follow--activated")})),t.events.on(Pc.pl,(function(){var t=document.querySelector(".js-outro-follow");t&&(t.setAttribute("aria-pressed",!0),t.classList.add("vp-outro-follow--activated"))})),t.events.on(Pc.ml,(function(){var t=document.querySelector(".js-outro-follow");t&&t.setAttribute("aria-pressed",!1)})),t.events.on(Sc._showOverlay,(function(){setTimeout((function(){i.classList.add("hidden")}),150)})),t.events.on(Pc.yc,(function(){i.classList.contains("in")&&i.classList.remove("hidden")})),t.events.on(Sc.$a,(function(){s=null,h=!1,m=t.config.request.ads instanceof Object})),Nh(i,".js-vod-button",(function(){var n=this.getAttribute("data-product-id");return t.events.fire(Pc.mc,n),!1})),Nh(i,".js-vod-watch",(function(){if(!("date_available"in t.config.video.vod))return T(),t.events.fire(Pc.mc),!1})),a&&((e=new kv(t,a)).events.on(Pc.jc,(function(){t.config.embed.settings.share.embed_only||(i.querySelector(".js-back").classList.remove("cloaked"),i.classList.add("embed-active"))})).on(Pc.Ic,(function(){i.classList.remove("embed-active")})),Nh(i,".js-back",(function(){return e.showShareView(),!1})),e.events.on(Pc.Dc,(function(){i.querySelector(".js-back").classList.add("cloaked")}))),A(),{}}function Tv(t,n){var i,e=nt();function r(t){if("yes"===t.form.getAttribute("data-bubble")){t.form.setAttribute("data-bubble","no");var i=n.querySelector(".vp-validation-bubble");i.querySelector(".vp-validation-bubble-message").innerHTML=t.validationMessage||"Cette saisie comporte une erreur.";var e=ec(t),r=ec(t.form);i.style.left=e.left-r.left+"px",i.style.top=e.height+1+"px",i.classList.remove("hidden"),t.focus(),window.requestAnimationFrame((function(){i.classList.add("vp-validation-bubble-animate")})),o()}}function o(t){var e=n.querySelector(".vp-validation-bubble");if(e){if(t)return clearTimeout(i),void e.classList.remove("vp-validation-bubble-animate");clearTimeout(i),i=setTimeout((function(){e.classList.remove("vp-validation-bubble-animate")}),5e3)}}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.showBubble,e=void 0===i||i,u=n.querySelector("input[type=email]"),a=n.querySelector("input[type=text]");return u.setAttribute("aria-invalid","false"),u.setCustomValidity(""),u.checkValidity&&!u.checkValidity()?(u.setAttribute("aria-invalid","true"),u.validity.valueMissing&&u.setCustomValidity("Veuillez saisir votre adresse e-mail."),u.validity.typeMismatch&&u.setCustomValidity("Veuillez saisir une adresse e-mail valide."),e&&r(u),!1):(a.setAttribute("aria-invalid","false"),a.setCustomValidity(""),a.checkValidity&&!a.checkValidity()?(a.setAttribute("aria-invalid","true"),a.validity.typeMismatch&&a.setCustomValidity("Veuillez saisir un nom valide."),!1):(o(!0),!0))}var a=function(){e.fire(Pc.kl)};function s(i){if(!u())return!1;var e=i.querySelector("input[type=email]"),o=i.querySelector("input[type=submit]"),s={signature:"signature",time:"timestamp",expires:"expires"};function c(t){o.classList.remove("loading"),e.setCustomValidity("Uh oh. There was a problem. Please try again."),e.setAttribute("aria-invalid","true"),r(e)}Object.keys(s).forEach((function(n){i.querySelector("input[name=".concat(n,"]")).value=t.config.request[s[n]]})),o.classList.add("loading"),function(i,e,r){lc(n);var o=V(i.querySelectorAll("input")).map((function(t){return t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):encodeURIComponent(t.value)})).join("&"),u=new XMLHttpRequest;u.open(i.method,i.action+window.location.search,!0),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.withCredentials=!0,u.timeout=3e3,u.onload=function(){var i;try{i=JSON.parse(u.responseText)}catch(t){}!function(i,e){!1!==i?(t.config.embed.email=null,t.events.fire(Pc.fl),function(){var t=n.querySelector(".vp-email-capture"),i=n.querySelector(".vp-email-capture-confirm");t.classList.add("vp-email-capture-invisible"),i.classList.remove("vp-email-capture-confirm-hidden"),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){i.classList.add("in"),setTimeout(a,2250)}))}))}()):c(e.status)}(i,u)},u.onerror=function(t){r(t)},u.send(o)}(i,0,c)}var c={get events(){return e},getData:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.config.embed.email||{},r=i.custom_logo||e.custom_logo;if(r)var o=vl({width:150,height:75,baseUrl:r,defaultExtension:".png"});return n.template=dd.render("email_capture",{allowSkip:i.allow_skip||e.allow_skip,customLogo:o,text:i.text||e.text||"",action:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/submit-email"),confirmation:i.confirmation||e.confirmation||"Merci ! Votre e-mail a été enregistré.",referrer:t.config.request.referrer,strings:{email:"Adresse e-mail",fullName:"Nom (optionnel)",nothanks:"Non merci",submit:"Envoyer",disclaimer:"Partagez votre adresse e-mail avec le propriétaire de cette vidéo"}}),n.qd=".js-email-capture-form-input",n.modal=!0,n.logo=!1,n.preventBackgroundClose=!0,n.noblur=i.noblur,n.nofocus=i.nofocus,n}};return Nh(n,".vp-email-capture-form-button--cancel",(function(){a()})),Nh(n,".vp-email-capture-form-button--submit",(function(){this.form.classList.add("vp-email-capture-form-submitted"),this.form.setAttribute("data-bubble","yes"),u()})),ef(n).on("submit",".vp-email-capture-form",(function(){return t.events.fire(Pc.Cc),s(this),!1})).on(["focus","input"],".vp-email-capture-form-input[type=email]",(function(){u({showBubble:!1})})),c}function xv(t,n,i){var e,r,o,u=i.querySelector(".vp-overlay-cell"),a=i.querySelector(".vp-overlay"),s=i.querySelector(".vp-overlay-icon-wrapper"),c=s.querySelector(".vp-overlay-icon"),l=i.querySelector(".vp-overlay-logo"),f=!1,d=null,h=null,v=new kv(t,a),p=new Tv(t,a),m=!1,w=!1;function b(){var t=ec(i),n=ec(a),e=ec(l),r=n.bottom+(t.height-n.bottom)/2;return t.height-r-e.height/2+"px"}function g(){var t=ec(i),n=ec(a),e=ec(s),r=t.height/2,o=t.height-(t.bottom-n.bottom)/2;return{top:r-e.height/2+"px",transform:"translateY("+(o-r)+"px)"}}function y(n,e){i.setAttribute("data-name",n),a.innerHTML=e.template,ys.iOS&&ph.element&&(t.events.fire(Pc.lc),ph.exit()),e.noblur||ic(o=document.activeElement),e.modal&&(i.classList.add("modal"),i.setAttribute("data-modal","true")),e.preventBackgroundClose&&i.setAttribute("data-background-close","false"),e.wrapperClass&&i.classList.add(e.wrapperClass),e.icon.type&&(e.logo&&(l.classList.remove("hidden"),s.classList.add("cloaked"),window.requestAnimationFrame((function(){l.innerHTML=dd.render("logo"),l.style.bottom=b()}))),s.classList.remove("hidden"),c.innerHTML=e.icon.html,window.requestAnimationFrame((function(){var t=g();s.style.top=t.top,s.style[ys.transformProperty]=t.transform})),i.setAttribute("data-icon",e.icon.type),s.setAttribute("data-icon",e.icon.type),c.setAttribute("data-icon",e.icon.type),"private-unlocked"===n&&c.classList.add("open")),i.classList.add("invisible"),i.classList.remove("hidden"),i.removeAttribute("hidden"),i.classList.add("in"),h=e,d=n,f=!0,t.events.fire(Pc.gc,n),t.element.classList.add("player-overlayVisible"),["share","hd-not-allowed"].indexOf(n)>-1&&lc(i),window.requestAnimationFrame((function(){i.classList.remove("invisible"),!e.nofocus&&t.element.contains(document.activeElement)&&function(t){if(t){var n=i.querySelector(t);n&&n.focus()}}(e.qd),window.requestAnimationFrame((function(){a.classList.add("in"),u.classList.add("in")}))}))}function _(){a.classList.remove("in"),a.classList.add("out")}function k(n){if("true"!==i.getAttribute("data-modal")&&f){i.removeAttribute("data-background-close"),u.classList.remove("in"),u.classList.add("out"),_(),i.classList.remove("in"),i.classList.add("out"),clearTimeout(e),e=setTimeout(E,200),(null==n?void 0:n.preventDefault)&&n.preventDefault();var r=i.querySelector(".js-back");r&&r.classList.add("cloaked"),v.destroy(),t.events.fire(Pc.yc,d),t.element.classList.remove("player-overlayVisible"),f=!1,d=null,h=null,window.requestAnimationFrame((function(){o&&(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.activeElement,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{t.focus()}catch(t){n&&n(t)}}(o),o=null)}))}}function E(){i.setAttribute("hidden",""),i.removeAttribute("data-name"),i.removeAttribute("data-icon"),i.classList.add("hidden"),i.classList.remove("out"),i.classList.remove("embed-active"),i.classList.remove("modal"),i.classList.remove("embed-only"),u.classList.remove("out"),u.classList.remove("in"),s.removeAttribute("data-icon"),s.classList.add("hidden"),s.classList.remove("animate"),c.removeAttribute("data-icon"),c.innerHTML="",l.classList.add("hidden"),a.classList.remove("out"),a.innerHTML="",t.events.fire(Pc._c)}function T(){i.setAttribute("data-modal","false")}function x(t){if("yes"===t.form.getAttribute("data-bubble")){t.form.setAttribute("data-bubble","no");var n=i.querySelector(".vp-validation-bubble");n.querySelector(".vp-validation-bubble-message").innerHTML=t.validationMessage||"There is an error with this input.";var e=ec(t),r=ec(t.form);n.style.left=e.left-r.left+"px",n.style.top=e.height+1+"px",n.classList.remove("hidden"),t.focus(),window.requestAnimationFrame((function(){n.classList.add("vp-validation-bubble-animate")})),S()}}function S(t){var n=i.querySelector(".vp-validation-bubble");if(n){if(t)return clearTimeout(r),void n.classList.remove("vp-validation-bubble-animate");clearTimeout(r),r=setTimeout((function(){n.classList.remove("vp-validation-bubble-animate")}),5e3)}}function A(t){var n=i.querySelector("input[type=password]");return n.form.classList.contains("submitted")?(n.setAttribute("aria-invalid","false"),n.setCustomValidity(""),n.checkValidity&&!n.checkValidity()?(n.setAttribute("aria-invalid","true"),n.validity.valueMissing&&n.setCustomValidity("Veuillez saisir le mot de passe."),t||x(n),!1):(S(!0),!0)):null}function M(){R(),s.classList.remove("cloaked"),s.classList.add("animate"),window.requestAnimationFrame((function(){s.style[ys.transformProperty]="translateY(-10px)"})),T(),_()}function R(){l.classList.add("animate")}function C(){c.classList.add("open")}function O(){c.classList.add("pulled-back")}function I(n){return n.icon={type:"lock",html:dd.render("icon_lock")},n.qd=".js-login",n.modal=!0,n.logo=!0,n.template=dd.render("private_locked",{action:"https://".concat(t.config.vimeo_url,"/log_in"),strings:{title:"Vidéo privée",subtitle:"Connectez-vous pour visionner (si vous avez la permission)",logIn:"Se connecter"}}),n}function j(n){return n.icon={type:"lock",html:dd.render("icon_lock")},n.template=dd.render("password",{action:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/check-password?referrer=").concat(t.config.request.referrer),strings:{title:"Mot de passe requis",subtitle:"Si vous lavez, saisissez-le ci-dessous",password:"Mot de passe ",watch:"Regarder cette vidéo"}}),n.qd=".js-password",n.modal=!0,n.logo=!!t.config.embed.settings.logo,n}function D(t){return t.icon={type:"lock",html:dd.render("icon_lock")},t.template=dd.render("private_unlocked",{strings:{title:"Vidéo privée",subtitle:"Vous êtes connecté et avez la permission de visionner le contenu (félicitations).",watch:"Regarder cette vidéo"}}),t.qd=".js-watch",t}function L(t,n){return t.template=dd.render("error",{title:n.title,message:n.message}),t.qd=".js-close",t.modal=!!n.modal,t.logo=!!n.logo,n.icon&&"lock"===n.icon&&(t.icon={type:"lock",html:dd.render("icon_lock")}),t}function N(n){return n.template=dd.render("help",{onSite:t.config.embed.on_site,strings:{title:"Raccourcis clavier",volumeUp:"Augmenter le volume",volumeDown:"Baisser le volume",scrubForward:"Avancer",scrubBackwards:"Revenir en arrière",like:"Jaime",share:"Partager",watchLater:"Regarder plus tard",captions:"Activer les légendes",prefs:"Activer le Menu Préférences",fullscreen:"Activer le plein écran",viewOnVimeo:"Regarder sur Vimeo"}}),n.qd=".js-close",n}function P(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=i.redirectUrl,r=i.title,o=i.buttonText,u=i.ignoreText,a=i.bottomText,s=i.newWindow,c=hc(t.config.video.privacy,["disable","unlisted"]);return n.template=dd.render("app_redirect",{hideRedirectButton:c,redirectUrl:e,newWindow:s,strings:{title:r,buttonText:o,ignoreText:u,bottomText:a}}),n.modal=!1,n.logo=!1,n.preventBackgroundClose=!0,n}function F(){var n=t.config.embed.email||{};if(t.backbone){var i=n.timecode||0;m=t.backbone.currentTime>i}n&&"before"===n.position&&!m&&U()}function U(){n.get("ui.overlay.isEmailCaptureVisible")?t.events.fire(Sc._showOverlay,"email-capture"):w=!0}return t.events.on(Sc.Wa,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.unmakeModal&&T(),k()})),t.events.on(Sc._showOverlay,(function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=function(){var t={modal:!1,template:null,logo:!1,icon:{type:null,html:null}};switch(n){case"share":return y(n,v.getShareData(t,i)),void v.setup();case"private-locked":return void y(n,I(t));case"password":return void y(n,j(t));case"private-unlocked":return void y(n,D(t));case"error":return void y(n,L(t,i));case"help":return void y(n,N(t));case"email-capture":return void y(n,p.getData(t,i));case"app-redirect":return void y(n,P(t,i))}};if(f&&!i.nohide)return"share"!==d&&"help"!==d&&"hd-not-allowed"!==d||d!==n?(t.events.once(Pc._c,e),T(),void k()):void k();e()})),ef(i).on("input","input",(function(){this.form.classList.add("interacted")})).on(["focus","blur"],"input",(function(){S(!0)})).on("transitionend",".vp-validation-bubble",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&this.classList.add("hidden")})),t.events.on([Pc.kc,wi.PLAY],k),t.events.on(Pc.Zc,(function(){"private-locked"===d&&(T(),k())})),t.events.on(Pc.Jc,(function(){"share"===d&&(h=v.getShareData({modal:!1,template:null,logo:!1,icon:{type:null,html:null}}),a.innerHTML=h.template,v.setup())})),ef(window).on("resize",(function(){if(f){l.style.bottom=b();var t=g();s.style.top=t.top,s.style[ys.transformProperty]=t.transform}})),ef(i).on("transitionend",".vp-overlay-logo",(function(t){"opacity"===t.propertyName&&this.classList.contains("animate")&&(l.classList.add("hidden"),l.classList.remove("animate"))})),ef(i).on("transitionend",".vp-overlay-icon-wrapper",(function(t){t.propertyName.indexOf("transform")>-1&&(""===this.style[ys.transformProperty]?(this.classList.remove("centered"),"lock"!==this.getAttribute("data-icon")||c.classList.contains("open")||c.querySelector("canvas")?O():setTimeout(C,100)):"translateY(-10px)"===this.style[ys.transformProperty]&&(s.classList.add("centered"),s.style[ys.transformProperty]=""))})),ef(i).on("transitionend",".vp-overlay-icon",(function(t){t.propertyName.indexOf("transform")>-1&&(this.classList.contains("out")?(T(),k()):this.classList.contains("pulled-back")?(c.classList.add("out"),c.classList.remove("pulled-back")):this.classList.contains("open")&&O())})),n.watch("ui.overlay.isEmailCaptureVisible",(function(n){!n&&f&&"email-capture"===d?(w=f,T(),k()):n&&w&&(w=!1,t.events.fire(Sc._showOverlay,"email-capture"))})),t.events.on(Pc.ue,F),t.events.on(Pc.Jc,F),t.events.on(wi.TIME_UPDATE,(function(n){var i=n.currentTime,e=void 0===i?0:i,r=t.config.embed.email||{};r&&"during"===r.position&&(e<r.timecode&&(m=!1),e>=r.timecode&&!m&&(m=!0,U()))})),t.events.on(Pc.Pc,(function(){U()})),p.events.on(Pc.kl,(function(){t.events.fire(Pc.kl),T(),k()})),v.events.on(Pc.jc,(function(){t.config.embed.settings.share.embed_only||(i.querySelector(".js-back").classList.remove("cloaked"),i.classList.add("embed-active"))})).on(Pc.Ic,(function(){i.classList.remove("embed-active")})),Nh(i,".js-back",(function(){return v.showShareView(),!1})),v.events.on(Pc.Dc,(function(){i.querySelector(".js-back").classList.add("cloaked")})),ys.stereoscopic&&(t.events.on(Pc.Nc,(function(){t.events.fire(Sc._showOverlay,"app-redirect",{redirectUrl:t.doNotTrackEnabled?t.config.video.share_url:Wl(t.config.video.id,"player-spatial-redirect"),title:"Headset viewing isnt currently supported in your mobile browser.",buttonText:"Regarder dans lapp Vimeo",ignoreText:null,bottomText:null,newWindow:!t.config.embed.on_site})})),ef(a).on("click",".app-redirect-ignore",(function(){k()})),ef(a).on("click","[data-new-window]",(function(t){return window.open(document.querySelector(".app-redirect-button").getAttribute("href")),!1}))),ef(a).on("click",".popup",(function(){return t.events.fire(Sc.Ga,"login-private-locked"),!1})),ef(a).on("click",".password input[type=submit]",(function(){this.form.classList.add("submitted"),this.form.setAttribute("data-bubble","yes"),A(!0)})).on("submit",".password form",(function(){return function(n){if(!A())return!1;var e=n.querySelector("input[type=password]"),r=n.querySelector("input[type=submit]");function o(t){r.classList.remove("loading"),e.setCustomValidity("Oh oh... Nous avons rencontré un problème. Veuillez réessayer."),e.setAttribute("aria-invalid","true"),x(e)}r.classList.add("loading"),function(t,n,e){lc(i);var r=V(t.querySelectorAll("input")).map((function(t){return t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(window.btoa(function(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,n){return String.fromCharCode("0x"+n)}))}(t.value))):encodeURIComponent(t.value)})).join("&"),o=new XMLHttpRequest;o.open(t.method,t.action+window.location.search,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.withCredentials=!0,o.timeout=3e3,o.onload=function(){var t;try{t=JSON.parse(o.responseText)}catch(t){}n(t,o)},o.onerror=function(t){e(t)},o.send(r)}(n,(function(n,i){if(!1!==n){if(t.events.fire(Pc.Xc,n),"icon-hidden"===window.getComputedStyle(u,":after").content)return T(),void k();M()}else o(i.status)}),o)}(this),!1})).on(["focus","input"],[".password input[type=email]",".password input[type=password]"],(function(){A()})),Nh(a,".unlocked button",(function(){0===ec(c).width?(R(),T(),k()):M(),ys.iPad||ys.iPhone||t.events.once(Pc._c,(function(){t.events.fire(Pc.Fs)}))})),function(){var n;t.events.on(Pc.bs,(function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{modal:!0,final:!0};if(!1!==e.final){n=i;var r={modal:!1,template:null,logo:!1,icon:{type:null,html:null}};if(r.modal=e.modal,r.template=dd.render("error",{title:e.title,message:e.message}),r.qd=".js-close",f)return k(),void t.events.once(Pc._c,(function(){return y(i,r)}));y(i,r)}})),ef(a).on("click",".error",(function(i){t.events.fire(Pc.vl,i.target.href,n)}))}(),t.events.on(Pc.Jc,(function(){window.requestAnimationFrame((function(){T(),k()}))})),Nh(i,".js-close",(function(){t.events.fire(Pc.kc)})),ef(i).on(["click","touchend"],[".vp-overlay-content",".js-share",".vp-overlay-logo"],(function(t){t.stopPropagation()})).on(["click","touchend"],[".vp-overlay-cell","nav"],(function(){return"false"===i.getAttribute("data-background-close")||(t.events.fire(Pc.kc),!1)})),t.events.on(Sc.as,(function(){i.classList.add("hidden")})),t.events.on(Pc.ul,(function(){i.classList.contains("in")&&i.classList.remove("hidden")})),t.events.fire(Pc.Rl),{}}var Sv=[".vp-title a"],Av=[".vp-title a:hover"],Mv=["a",".button-link",".vp-overlay-wrapper .footnote.share a:hover",".vp-title h1",".vp-title span.user",".menu li:hover",".menu li.active",".vp-outro-link:hover",".vp-outro-videosTitle a:hover","li.vp-panel-item:hover","li.vp-panel-item-on",".vp-share-footnote a:hover",".card-link span",".vp-panel-collapsible .vp-panel-button:hover"],Rv=["a:hover",".button-link:hover"],Cv=[".vp-overlay-wrapper .close:hover .fill",".vp-overlay-wrapper .back:hover .fill",".stats-debug-close:hover .fill",".stats-debug-copy:hover",".card-link:hover .fill"],Ov=[".play-bar .on .fill",".play-bar a:hover .fill",".play-bar button:not(.toggle):hover .fill",".tiny-bars .fill",".vp-sidedock .on .fill",".controls-outro a:hover .fill",".card-link .fill",".vp-panel-collapsible .vp-panel-button:hover .fill"],Iv=[".vp-controls .play-bar .vp-cast-button"],jv=[".vp-sidedock .on:hover .fill"],Dv=[".play-bar .on .stroke",".vp-sidedock .on .stroke"],Lv=[".vp-sidedock .on:hover .stroke"],Nv=[".vp-sidedock button:hover",".vp-sidedock button.selected","&.touch-support .vp-sidedock button:active",".vp-controls .play:hover",".vp-controls .play-bar .played","&.no-playbar .play-bar button:not(.toggle):hover",".vp-controls.tiny .play-bar button:not(.toggle):hover",".vp-controls .volume div",".vp-overlay .buttons li",".vp-overlay .vp-overlay-content button",'.vp-overlay .vp-overlay-content input[type="submit"]','.vp-overlay .vp-overlay-content a[role="button"]',"li.vp-panel-item-on:before",".vp-controls .replay:hover",".vp-share-buttons li","button.vp-share-embedCopy",".vp-outro-button","a.vp-outro-vodButton",".vp-email-capture-form-button--submit",".vp-email-capture-checkIconWrapper",".chapter-marker",".vp-chapters-active-indicator"],Pv=["li.vp-panel-item-on:before"],Fv=[".vp-overlay .vp-overlay-content button",'.vp-overlay .vp-overlay-content input[type="submit"]','.vp-overlay .vp-overlay-content a[role="button"]',".vp-sidedock button:hover",".vp-sidedock button.selected",".vp-sidedock button:hover .vod-label",".vp-sidedock button.selected .vod-label",".play:hover",".vp-share-footnote--embed a",".vp-outro-button",".vp-outro-button:hover",".vp-outro-wrapper .vp-outro-link:hover","button.vp-share-embedCopy",".vp-outro-vodWrapper a.vp-outro-vodButton",".vp-outro-vodWrapper a.vp-outro-vodButton:hover","li.vp-panel-item:hover","li.vp-panel-item-on",".vp-panel-collapsible .vp-panel-button:hover","input.vp-email-capture-form-button--submit"],Vv=[".vp-controls .play:hover .fill",".vp-sidedock button:hover .fill",".vp-sidedock button.selected .fill",".play-bar a:hover .fill",".play-bar button:not(.toggle):hover .fill","&.no-playbar .play-bar button:not(.toggle):hover .fill",".vp-controls.tiny .play-bar button:not(.toggle):hover .fill",".vp-sidedock .on .fill",'.vp-share-wrapper a[role="button"] .fill',".vp-outro-vodButton .fill",".vp-email-capture-checkIconWrapper .fill",".vp-panel-collapsible .vp-panel-button:hover .fill"],Uv=[".vp-controls .play:hover .stroke",".vp-sidedock button:hover .stroke",".vp-sidedock button.selected .stroke",".vp-sidedock .on .stroke"],Bv=["li.vp-panel-item-on:before"],Hv=["li.vp-panel-item-on:before"],zv=['.vp-overlay-wrapper .vp-overlay a[role="button"]',".vp-sidedock button:hover",".vp-sidedock button.selected",".play:hover","button.vp-share-embedCopy",".vp-outro-button",".vp-outro-button:hover",".vp-outro-vodWrapper a.vp-outro-vodButton",".vp-outro-vodWrapper a.vp-outro-vodButton:hover","input.vp-email-capture-form-button--submit"],qv=[".vp-controls .play:hover .fill",".vp-sidedock button:hover .fill",".vp-sidedock button.selected .fill",".vp-controls .play-bar .fullscreen.tiny:hover .fill",".vp-share-button .fill",".vp-outro-vodButton .fill"],Wv=[".vp-sidedock button:hover .stroke",".vp-sidedock button.selected .stroke"],Gv=["li.vp-panel-item-on:before"],$v=['.vp-overlay .vp-overlay-content input[type="submit"]:active','.vp-overlay a[role="button"]:active',".vp-sidedock button:active",".vp-outro-vodWrapper a.vp-outro-vodButton:active"];function Kv(t,n){var i=n.uuid,e=n.id,r=n.isMobileDevice,o=null;function u(t,n){var o=".player-".concat(i," "),u=o+t.join(","+o);if(n){var a="".concat(e," ");u+=",".concat(a).concat(t.join(","+a))}return r&&(u=u.replace(/:hover/g,":active")),u.replace(/ &/g,"")}return t.events.on(Sc.Xa,(function(n){var e;try{e=new bh(n)}catch(t){e=new bh("00adef")}var r=function(t){o?function(){for(;o.cssRules.length>0;)o.deleteRule(0)}():function(){var t=document.createElement("style");t.setAttribute("data-player",i),document.querySelector("head").appendChild(t),o=t.sheet}();var n=t.complement,e=new bh(23,35,34,.75),r=new bh(0,0,0,.15).overlayOn(t);e.contrast(n).ratio<3&&n.lighten(5,3,e);var a,s=t.lightness<40?t.clone().lighten(15,3,t):t.clone().darken(15,3,t);return tc(u(Sv,!0),"color:"+t.hex+" !important",o),tc(u(Av,!0),"color:"+n.hex+" !important",o),tc(u(Mv),"color:"+t.hex,o),tc(u(Ov),"fill:"+t.hex,o),tc(u(Iv),"--connected-color:"+t.hex,o),tc(u(Dv),"stroke:"+t.hex,o),tc(u(Nv),"background-color:"+t.hex,o),tc(u(Pv),"border-color:"+t.hex,o),tc(u(Rv),"color:"+n.hex,o),tc(u(Cv),"fill:"+n.hex,o),tc(u(jv),"fill:"+s.hex,o),tc(u(Lv),"stroke:"+s.hex,o),tc(u(Gv),"border-color:"+r.hex,o),tc(u($v),"background-color:"+r.hex,o),t.luminance>.95&&(n=t.clone().darken(15,3,t),tc(u(Fv),"color:"+n.hex,o),tc(u(Vv),"fill:"+n.hex,o),tc(u(Uv),"stroke:"+n.hex,o),tc(u(Bv),"background-color:"+n.hex,o),tc(u(Hv),"border-color:"+n.hex,o),s=n.clone().darken(15,3,n),tc(u(jv),"fill:"+s.hex,o),tc(u(Lv),"stroke:"+s.hex,o)),t.yiq>175&&t.luminance<.95&&(a=s.clone().darken(15,3,s),tc(u(jv),"fill:"+a.hex,o),tc(u(Lv),"stroke:"+a.hex,o),tc(u(zv),"color:"+s.hex,o),tc(u(qv),"fill:"+s.hex,o),tc(u(Wv),"stroke:"+s.hex,o)),{main:t.hex,selected:s.hex,sidedockHover:a?s.hex:t.luminance>.95?n.hex:bh.white.hex,sidedockSelected:t.luminance>.95?n.hex:t.hex,sidedockSelectedHover:a?a.hex:s.hex}}(e);t.config.Wd=r,t.config.embed.color=r.main.replace("#",""),t.events.fire(Pc.Yc,t.config.embed.color)})),t.events.fire(Sc.Xa,t.config.embed.color),{}}function Yv(t){var n=null;return t.events.on(Sc.Ga,(function(i,e){var r="https://".concat(t.config.player_url),o="".concat(r,"/video/").concat(t.config.video.id);switch(i){case"login-like":n=ac("".concat(o,"/login/like"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"login-watch-later":n=ac("".concat(o,"/login/watch-later"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"login-private-locked":n=ac("".concat(o,"/login/private"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"purchase":var u="".concat(r,"/video/").concat(t.config.video.vod.feature_id||t.config.video.id,"/purchase/vod");(null==e?void 0:e.productId)&&(u+="/".concat(e.productId)),u+="?referrer=".concat(encodeURIComponent(t.config.request.referrer)),n=ac(u,"purchase",{width:790,height:670}),t.events.fire(Pc.Mc,i)}})),window.closePopup=function(i){if(n){try{n.close(),t.events.fire(Pc.Oc,i)}catch(t){}n=null}},t.config.embed.on_site||(window.confirmPurchase=function(n,i,e){i?t.loadVideo(n):e&&t.events.fire(Pc.Fs)}),t.config.embed.on_site||(window.confirmLoginAction=function(n,i){t.events.fire(Pc.Wc,i)}),{}}function Jv(t,n,i,e){var r=e[n];return r?(r=Xv(r=Qv(t,r),i,e.prices),e.expires_in_duration_str&&(r=r.replace("{TIME}",e.expires_in_duration_str)),e.available_on_formatted&&(r=r.replace("{DATE}",e.available_on_formatted)),r):null}function Xv(t,n,i){var e=i.USD;return n in i&&(e=i[n]),-1!==t.indexOf("${price}")?t.replace("${price}",e):-1!==t.indexOf("{PRICE}")?t.replace("{PRICE}",e):t}function Zv(t,n){return!t||0===t.length||-1!==t.indexOf(n)}function Qv(t,n){return void 0!==t&&void 0!==t[n]?t[n]:n}var tp=Object.freeze({__proto__:null,formatVodLabel:Jv,getDisplayPrice:Xv,isAvailableInCountry:Zv,translateFromRequest:Qv});function np(t,n){var i,e,r,o,u,a,s,c,l,f=!1,d=!1,h=!1,v=!1,p=!1,m=!1,w=!1,b=!1,g=[],y=[],_=null,k=!1,E=!1,T=null,x=t.config.embed.autoplay&&t.config.request.flags.autohide_controls;function S(){return v||w||b}function A(){f&&(E||(d&&k||S()||x)&&(h||(!p&&!m||S())&&(f=!1,t.events.fire(Pc.Xs,f),(T||n).classList.add("invisible"))))}function M(){if(!f&&!S()){var i=T||n;i.classList.add("invisible"),i.classList.remove("hidden"),i.removeAttribute("hidden"),n.classList.remove("hidden"),n.removeAttribute("hidden"),n.classList.contains("vod")&&n.classList.remove("vod"),setTimeout((function(){f=!0,t.events.fire(Pc.Xs,f),i.classList.remove("invisible")}),0)}}function R(n,i,e){var r="data-label-"+e,o="add"!==e||t.config.user.logged_in?r:"data-label-add-logged-out";n.setAttribute("aria-label",n.getAttribute(o)),i.classList.add("hidden"),i.setAttribute("hidden",""),i.firstChild.innerHTML=n.getAttribute(r)}function C(){var t="BUTTON"===this.tagName?this:this.querySelector("button"),n=g.indexOf(t);n>=0&&y[n]&&(_&&(window.cancelAnimationFrame(_),_=null),y[n].classList.add("invisible"))}function O(){if(i){var t=i.parentElement;T.insertBefore(t,T.firstChild)}}function I(){var d;if(1===t.config.view||3===t.config.view){var h=t.config.embed.settings,v=t.config.video.vod&&"purchase_options"in t.config.video.vod&&t.config.video.vod.purchase_options.length,p=v&&t.config.video.vod.is_coming_soon,m="ondemand.main"===t.config.embed.context||"Vimeo\\Controller\\OnDemandController.main"===t.config.embed.context,w=t.config.video.vod&&t.config.user.purchased?1:0,b=v&&h.vod&&Zv(t.config.video.vod.countries,t.config.request.country);b&&p&&m&&(b=!1);var _=v&&t.config.video.vod.purchase_options[0],k=null;_&&(k=Jv(t.config.request.dynamic_translation_map,"label_string",t.config.request.currency,_)),n.innerHTML=dd.render("sidedock",{loggedIn:!!t.config.user.logged_in,vodButton:b,purchased:w,vodPurchaseInfo:_,vodDisplayLabel:k,likeButton:h.like,liked:t.config.user.liked,watchLaterButton:h.watch_later,addedToWatchLater:t.config.user.watch_later,collectionsButton:h.collections,shareButton:h.share,strings:{like:"Jaime",likeLoggedOut:"Like (this opens in a new window)",unlike:"Je naime plus",watchLaterAdd:"Ajouter à la liste Regarder plus tard",watchLaterAddLoggedOut:"Add to Watch Later (this opens in a new window)",watchLaterRemove:"Enlever de la liste Regarder plus tard",collections:"Ajouter aux collections",share:(null==(d=h.share)?void 0:d.embed_only)?"Intégration":"Partager"}}),i=n.querySelector(".vod-button"),b&&(T=n.querySelector(".sidedock-inner"),w&&O());var E=T||n;v&&b&&!t.config.embed.settings.instant_sidedock?n.classList.add("vod"):ys.touch&&(f=!0,t.events.fire(Pc.Xs,f),E.classList.remove("hidden"),E.removeAttribute("hidden"),E.classList.remove("invisible")),e=n.querySelector(".like-button"),r=n.querySelector(".like-label"),o=n.querySelector(".watch-later-button"),u=n.querySelector(".watch-later-label"),a=n.querySelector(".collections-button"),s=n.querySelector(".collections-label"),c=n.querySelector(".share-button"),l=n.querySelector(".share-label"),g=[i,e,o,c,a],y=[null,r,u,l,s]}}return I(),function(){var n=t.config.embed.settings.instant_sidedock,i=t.config.video.vod,e=i&&"purchase_options"in i&&i.purchase_options.length,r=i&&Zv(t.config.video.vod.countries,t.config.request.country);(n||e&&r)&&(x||M())}(),Nh(n,".vod-button",(function(){var n=i.getAttribute("data-product-id");t.events.fire(Pc.mc,n)}),C),t.events.on(Pc.ol,(function(){O(),n.classList.add("sidedock-outro"),"share"===t.config.embed.outro&&(t.config.embed.settings.share=0,I())})),t.events.on(Pc.ul,(function(){!function(){if(i){var t=i.parentElement;n.insertBefore(t,T)}}(),n.classList.remove("sidedock-outro"),"share"===t.config.embed.outro&&(t.config.embed.settings.share=1,I())})),Nh(n,".like-button",(function(){t.events.fire(Pc.dc)}),C),t.events.on(Pc.Bc,(function(){e&&(e.classList.add("on"),R(e,r,"remove"))})),t.events.on(Pc.Hc,(function(){e&&(e.classList.remove("on"),R(e,r,"add"))})),Nh(n,".watch-later-button",(function(){t.events.fire(Pc.hc)}),C),t.events.on(Pc.zc,(function(){o&&(o.classList.add("on"),R(o,u,"remove"))})),t.events.on(Pc.qc,(function(){o&&(o.classList.remove("on"),R(o,u,"add"))})),Nh(n,".collections-button",(function(){t.events.fire(Pc.wc)}),C),Nh(n,".share-button",(function(){return t.events.fire(t.config.embed.settings.share.embed_only?Pc.pc:Pc.vc),!1}),C),ef(n).on("blur","button",C).on("mouseleave",".box",C).on(["focus","pointerdown","touchstart","mouseenter"],"button",(function(){var t=g.indexOf(this);y.forEach((function(n,i){i!==t&&n&&n.classList.add("invisible")})),t>=0&&y[t]&&(y[t].classList.add("invisible"),y[t].classList.remove("hidden"),y[t].removeAttribute("hidden",""),_=window.requestAnimationFrame((function(){_=window.requestAnimationFrame((function(){y[t].classList.remove("invisible"),y[t].classList.add("visible")}))})))})).on("transitionend","label",(function(t){"opacity"===t.propertyName&&t.target.classList.contains("invisible")&&(t.target.classList.add("hidden"),t.target.setAttribute("hidden",""),t.target.classList.remove("visible"))})),Nh(n,"label",(function(){var t=y.indexOf(this);t>=0&&g[t].click()})),t.events.on([Pc.Fc,Pc.Uc,Pc.Ds],A).on(Pc.Vc,M).on(Pc.Ms,(function(){k=!0,A()})).on(wi.PLAY,(function(){d=!0})),ef(n).on(["pointerenter","pointerleave","mouseenter","mouseleave"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(h="pointerenter"===t.type||"MSPointerEnter"===t.type):h="mouseover"===t.type})),ef(n).on("transitionend",(function(t){var e=T||n;"opacity"===t.propertyName&&e.classList.contains("invisible")&&(e.classList.add("hidden"),e.setAttribute("hidden",""),i&&e.contains(i)&&(n.classList.add("hidden"),n.setAttribute("hidden","")))})),t.events.on(Pc.sc,(function(){h=!1,A()})).on(Pc.fc,(function(t){t||(E=!0)})),t.events.on([Pc.Pl],(function(){p=!0,M()})).on([Pc.Fl],(function(){p=!1})),t.events.on(Ko,(function(){m=!0,M()})).on(Yo,(function(){m=!1})),t.events.on(Pc.gc,(function(){v=!0,h=!1,A()})).on(Pc.yc,(function(){v=!1,M()})),t.events.on(Pc.Dl,(function(t){w=t,t&&A()})),t.events.on([Pc.oc,Pc.Zs],(function(t,n){n.isCentered()&&n.isVisible()&&(b=!0,h=!1,A()),n.isCentered()&&n.isVisible()||(b=!1,M())})),t.events.on(Pc.Jc,(function(){I()})),t.events.on(Sc.$a,(function(){h=!1,k=!1,A(),d=!1,h=!1,E=!1})),t.events.fire(Pc.Sl),{}}function ip(t,n){var i=!0,e=!1,r=!1,o=!1,u=!1,a=!1,s=!1,c=!0,l=!1,f=!1,d=!1;function h(){i=!1,n.classList.add("invisible")}function v(){n.classList.remove("hidden"),n.removeAttribute("hidden"),setTimeout((function(){i=!0,n.classList.remove("invisible")}),0)}function p(){return r||o||u}function m(){i&&(p()||l?h():a||s&&(c&&e||h()))}function w(){var n;i||(!a||p()?c&&!f&&(l||(s||p()?(null==(n=t.config.embed)?void 0:n.settings.info_on_pause)&&c&&!p()&&v():v())):v())}function b(){if(1===t.config.view||3===t.config.view){var i=!!t.config.embed.settings.byline,e=null!==t.config.video.owner.url,r=t.config.video.owner.url,o=0===t.config.embed.on_site,u=t.config.embed.settings.spatial_label,a=t.config.request.file_codecs||t.config.video.file_codecs,s=void 0!==a,c={ClickTargets:Tc,linkToOwner:e,ownerLink:r,targetBlank:o,showPortrait:!!t.config.embed.settings.portrait,portraitImg:t.config.video.owner[ys.devicePixelRatio>1?"img_2x":"img"],showByline:i,portraitAlt:"Lien vers le profil du propriétaire de la vidéo",showTitle:!!t.config.embed.settings.title,showTitleLink:null!==t.config.video.url,titleLink:t.config.video.url,title:t.config.video.title,is360:t.config.video.spatial&&u,hasHDR:s&&a.hevc.hdr.length>0,strings:{}};if(t.config.embed.settings.byline){var l=t.config.embed.settings.byline_badge,f="";(null==l?void 0:l.type)&&(f=dd.render("title_byline_badge",{targetBlank:o,cssClass:l.type,link:l.url||!1,displayBadge:!t.config.video.live_event})),c.strings.byline="de "+dd.render("title_owner_byline",{ClickTargets:Tc,linkToOwner:e,ownerLink:r,targetBlank:o,owner:t.config.video.owner.name})+f}t.config.embed.settings.badge&&(c.showPortrait=!1),t.config.embed.autoplay&&(n.classList.add("hidden"),n.setAttribute("hidden","")),n.innerHTML=dd.render("title",c)}}return b(),t.events.on([Pc.Fc,Pc.Uc],m).on(Pc.Vc,w).on(Uo,(function(){s=!0,c=!1,m()})).on([Pc.Fs,wi.PLAY],(function(){c=!1,f=!1,m()})).on(Pc.He,(function(t,n){n||(c=!0,w())})).on(Pc.Ts,(function(){l=!0,m()})).on(Pc.Gs,(function(){d=c,f=!0})).on(Pc.$s,(function(){d&&(f=!1)})).on(Pc.sc,(function(){m()})).on(Pc.fc,(function(t){t||w()})),ef(n).on(["pointerenter","pointerleave","mouseenter","mouseleave"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(e="pointerenter"===t.type||"MSPointerEnter"===t.type):e="mouseover"===t.type})),ef(n).on("transitionend",(function(t){"opacity"===t.propertyName&&n.classList.contains("invisible")&&(n.classList.add("hidden"),n.setAttribute("hidden",""))}),!1),t.events.on(Pc.Ts,(function(t){m()})),t.events.on([Pc.Pl],(function(){a=!0,w()})).on([Pc.Fl],(function(){a=!1,m()})),t.events.on(Pc.gc,(function(t){"not-supported"!==t&&"private-unlocked"!==t&&"help"!==t&&(r=!0,e=!1,m())})).on(Pc.yc,(function(){r=!1,e=!1,setTimeout(w,0)})),t.events.on(Pc.ol,(function(t){o=!0,e=!1,m()})).on(Pc.ul,(function(){o=!1,e=!1,setTimeout(w,0)})),t.events.on([Pc.oc,Pc.Zs],(function(t,n){n.isCentered()&&n.isVisible()&&(u=!0,e=!1,m()),n.isCentered()&&n.isVisible()||(u=!1,e=!1,w())})),t.events.on(Pc.Jc,(function(){b(),3===t.config.view&&w()})),t.events.on(Sc.$a,(function(){s=!1,c=!0,l=!1,f=!1,w()})),t.events.fire(Pc.Tl),{}}function ep(t,n){function i(){n.classList.remove("hidden"),n.removeAttribute("hidden"),n.classList.remove("invisible")}function e(){ef(n).on("transitionend",(function(){ef(n).off("transitionend"),n.classList.contains("invisible")&&(n.classList.add("hidden"),n.setAttribute("hidden",""))})),n.classList.add("invisible")}return function(){var r=t.config.embed.settings.badge;if(r){var o=ys.devicePixelRatio>1?"img_2x":"img";ys.svg&&r.svg&&(o="svg"),n.innerHTML=dd.render("badge",{showPortrait:!1,targetBlank:0===t.config.embed.on_site,badge:{link:r.link,img:r[o],margin:r.margin||!1,width:r.width,height:r.height,name:r.name,shadow:r.shadow||!1}}),Nh(n,".vp-badge",(function(){t.events.fire(Pc.uc,r.id)})),t.config.embed.autoplay?e():i()}else e()}(),{show:i,hide:e}}function rp(t,n){var i=t.events;function e(t){t.preventDefault(),i.fire(Sc.qa,!1)}function r(){n.classList.add("invisible"),n.classList.remove("hidden"),n.removeAttribute("hidden"),setTimeout((function(){n.classList.remove("invisible")}),0),i.once(Pc.Ss,o)}function o(t){t>0&&!n.classList.contains("invisible")&&u()}function u(){ef(n).on("transitionend",a),n.classList.add("invisible")}function a(){ef(n).off("transitionend",a),n.classList.add("hidden"),n.setAttribute("hidden","")}return function(){var t={title:ys.touch?"Touchez l'écran pour rétablir le son":"Cliquez pour rétablir le son"};n.innerHTML=dd.render("unmute_button",t),Nh(n,e),Nh(n,".vp-unmute-button",e),i.once(Pc.ac,r),i.on(tu.EVENT_ENDED,u)}(),{}}function op(t,n){var i=null,e=!1;function r(){var r=n.querySelector(".vp-badge");if(i=new ep(t,r),r.innerHTML)return 16===t.config.embed.settings.badge.id?(i.show(),void t.events.on(Pc.Js,(function(t){t?i.show():i.hide()}))):void t.events.on([Pc.Fs,wi.PLAY],(function(){e&&i.hide()})).on(Uo,(function(){e=!0,i.hide()})).on(Pc.Ts,i.hide).on(Pc.gc,(function(t){"not-supported"!==t&&"private-unlocked"!==t&&"help"!==t&&i.hide()})).on(Pc.yc,(function(){e||i.show()}))}r(),function(){var i=n.querySelector(".vp-unmute");new rp(t,i)}(),t.events.on(Pc.Jc,(function(){r()})),t.events.on(Sc.$a,(function(){e=!1,r()}))}var up=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=6,e=76,r=parseInt(e*ys.devicePixelRatio,10),o=parseFloat(n.timecode);if(isNaN(o))throw new TypeError("Time must be a number.");if(o<0)throw new TypeError("Time must be a positive number.");this.time=o,this.data=n,this.id=n.id,this.displayTime=n.display_time||i,n.url&&(this.data.url=Jh(n.url)),n.image_url&&(n.image=vl({width:r,height:r,baseUrl:Jh(n.image_url),crop:!0})),this.renderTemplate()}var n=t.prototype;return n.renderTemplate=function(){var t=this,n=document.createElement("div");n.innerHTML=dd.render("card",this.data),this.element=n.children[0],this.data.image&&pl(this.data.image).catch((function(n){t.element.querySelector(".js-cardImageWrap").style.display="none"}))},n.isActive=function(t){return t>=this.time&&t<this.end},H(t,[{key:"end",get:function(){return this.time+this.displayTime}}]),t}(),ap=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t,n){return t<n};this.Gd={},this.$d=[],this.Kd=t}var n=t.prototype;return n.Yd=function(t){var n=this.$d.length;if(0===n)this.$d.push(t);else{for(var i=0;i<n;i++)if(this.Kd(t,this.$d[i])){this.$d[i-1]!==t&&this.$d.splice(i,0,t);break}i===n&&this.$d[i-1]!==t&&this.$d.splice(i,0,t)}},n.Jd=function(t,n,i,e){if(e<i)return-1;var r=parseInt(i+(e-i)/2,10);return t[r]>n?this.Jd(t,n,i,r-1):t[r]<n?this.Jd(t,n,r+1,e):r},n.delete=function(t){var n=this.Jd(this.$d,t,0,this.$d.length);if(-1===n)throw new Error("key does not exist");this.$d.splice(n,1),delete this.Gd[t]},n.set=function(t,n){return this.Gd[t]=n,this.Yd(t),this},n.get=function(t){return this.Gd[t]},n.keys=function(){return this.$d.slice()},n.values=function(){var t=this;return this.keys().map((function(n){return t.Gd[n]}))},n.forEach=function(t){for(var n=this.$d.length,i=0;i<n&&!1!==t(this.Gd[this.$d[i]],this.$d[i],this);i++);},H(t,[{key:"size",get:function(){return this.$d.length}}]),t}();function sp(t,n,i){var e,r,o=i.querySelector(".vp-cards"),u=new ap,a=!1,s=function(t){return function(){u.size>0&&t.apply(void 0,arguments)}};function c(){v(),u.forEach((function(t,n){t.element.parentNode.removeChild(t.element)})),u=new ap,Array.isArray(t.config.embed.cards)&&t.config.embed.cards.length&&(t.config.video.title&&t.config.embed.settings.title&&l(-1,{className:"card--contentInfo",timecode:0,headline:t.config.video.title,teaser:t.config.embed.settings.byline?t.config.video.owner.name:"",image:t.config.video.owner[ys.devicePixelRatio>1?"img_2x":"img"],id:"title-card"}),t.config.embed.cards.forEach((function(t){l(t.timecode,t)})))}function l(i,e){var r=u.get(i),a=new up(t,e);if(u.set(i,a),r)return o.replaceChild(a.element,r.element),a;var s=u.keys().indexOf(i);return o.insertBefore(a.element,o.children[s]),n.dispatch(function(t){return{type:"CARDS_SET_SIZE",payload:t}}(u.size)),a}function f(n){t.element.classList.toggle("player-cardsCarousel",n),t.element.classList.toggle("player-cardsCorner",!n),e.destroy(),n&&e.setUp()}function d(n,i){n&&(i?n.element.classList.add("card-animating"):n.element.classList.remove("card-animating"),n.element.classList.add("card-active"),ef(n.element.childNodes[1]).on("mouseover",(function(){a=!0})),ef(n.element.childNodes[1]).on("mouseout",(function(){a=!1})),e.show(n.element),t.events.fire(Pc.gl,n.id,n.data))}function h(t){a||t.classList.remove("card-active")}function v(){V(i.querySelectorAll(".card-active")).forEach(h)}return e=new Hh(o),n.watch("ui.cards.size",(function(n){t.element.classList.toggle("player-withCards",n>0)})),n.watch("ui.cards.isCarouselVisible",f),n.watch("ui.cards.isCardsThumbVisible",(function(t){i.classList.toggle("cards-wrapper--withThumbnails",t)})),f(n.get("ui.cards.isCarouselVisible")),t.events.on(Pc.Jc,c),t.events.on(Sc._addCard,(function(t){var n=l(t.timecode,t);v(),d(n)})),t.events.on(Sc._removeCard,(function(t){v();var n=u.get(t.timecode).element;n.parentNode.removeChild(n),u.delete(t.timecode)})),e.on("slide",s((function(n){var i=u.values()[n];"title-card"!==i.id&&t.events.fire(Pc.gl,i.id,i.data),t.events.fire(Sc.vs,i.time)}))),e.on("tap",s((function(n){var i=u.values()[n];i.data.url&&"title-card"!==i.id&&(t.events.fire(Pc.yl,i.id,i.data),t.backbone.paused||t.events.fire(Pc.Ps),window.open(i.data.url))}))),t.events.on(wi.TIME_UPDATE,s((function(t){var i=function(t){var i=u.values().filter((function(n){return n.isActive(t)})).slice(-1)[0];if(i)return i;if(n.get("ui.cards.isCarouselVisible")){var e=u.values().slice(-1)[0];if(e&&t>e.end)return e}return null}(t.currentTime);i!==r&&(!i&&a||(a=!1,v(),(r=i)&&"title-card"===r.id?n.get("ui.cards.isCarouselVisible")&&d(r,!0):d(r,!0)))}))),t.events.on(Pc.Ts,s(v)),Nh(document,".player-cardsCorner .card",s((function(n){n.preventDefault();var i=pc(n.target,o.children),e=u.values()[i];e.data.url&&"title-card"!==e.id&&(t.events.fire(Pc.yl,e.id,e.data),t.backbone.paused||t.events.fire(Pc.Ps),window.open(e.data.url))}))),c(),{}}var cp={16:"shift",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down"};function lp(t,n,i){var e,r=!!t.config.embed.on_site,o=i.querySelector(".volume"),u=!1,a=null,s=t.config.video.fps/5,c=Math.max(s,.618*t.config.video.duration),l=s,f=0,d=!1,h=kd(g,80);function v(){return!r&&(1===t.config.view||3===t.config.view)}function p(){u&&"help"===e&&t.events.fire(Pc.kc)}function m(t){return"number"!=typeof t.which&&(t.which=t.keyCode),t}function w(t){if("keypress"===t.type){var n=String.fromCharCode(t.which);return t.shiftKey||(n=n.toLowerCase()),n}return t.which in cp?cp[t.which]:String.fromCharCode(t.which).toLowerCase()}function b(n){if(t.config.embed.settings.background)return!0;var i=n.target||n.srcElement;return"INPUT"===i.tagName||"SELECT"===i.tagName||"TEXTAREA"===i.tagName||i.isContentEditable}function g(i,e){if(!n.get(Dl)){d||(e&&!t.backbone.paused&&t.events.fire(Pc.Ps),t.events.fire(Pc.Gs,!0,"keyboard"),d=!0),!function(t){var n=t,i=Math.ceil(s),e=Math.ceil(c-s);l=function(t,n,i,e){return t/=100,i*(--t*t*t+1)+n}(n,i,e)}(f),1==++f&&(l=5*t.config.video.fps);var r=e?1:l,o="right"===i?r:-r;!function(n){var i=n/t.config.video.fps;t.events.fire(Sc.Ha,null,i)}(Math["right"===i?"ceil":"floor"](t.currentTime*t.config.video.fps)+o)}}function y(t){var n=a.getTabindexItems(),i=n.indexOf(document.activeElement),e="up"===t?i-1:i+1,r=null;return!(r=e>=n.length?n[0]:e<0?n[n.length-1]:n[e])||(r.focus(),!1)}function _(){if(a)return!0;if(n.get(Dl)&&!n.get(Ul))return!0;if(!document.activeElement||document.activeElement===document.body){var i=t.backbone.paused?Pc.Fs:Pc.Ps;return t.events.fire(i),p(),!1}}function k(){return a?(a.element.contains(document.activeElement)&&a.button.focus(),a.hide(),!1):u?(t.events.fire(Pc.kc),!1):void 0}function E(){return a?!a.element.contains(document.activeElement)||y("up"):ys.spatialPlayback&&t.config.video.spatial?(t.backbone.getEffectByName("ThreeSixtyEffect").keyPress("up"),!1):!(!t.config.embed.on_site||!document.activeElement||i.contains(document.activeElement))||(p(),t.events.fire(Sc.za,.05,!1,!0),!1)}function T(){return a?!a.element.contains(document.activeElement)||y("down"):ys.spatialPlayback&&t.config.video.spatial?(t.backbone.getEffectByName("ThreeSixtyEffect").keyPress("down"),!1):!(!t.config.embed.on_site||!document.activeElement||i.contains(document.activeElement))||(p(),t.events.fire(Sc.za,-.05,!1,!0),!1)}function x(n,i){if(a)return!a.element.contains(document.activeElement)||y("left"===i?"up":"down");if(p(),ys.spatialPlayback&&t.config.video.spatial)return t.backbone.getEffectByName("ThreeSixtyEffect").keyPress(i),!1;if(document.activeElement&&document.activeElement===o){var e="left"===i?-.05:.05;return t.events.fire(Sc.za,e,!1,!0),!1}n.shiftKey||0===f?g(i,n.shiftKey):h(i,n.shiftKey)}return t.events.on(Pc.gc,(function(t){u=!0,e=t,"not-supported"===t&&(r=!0)})),t.events.on(Pc.yc,(function(){u=!1,e=null})),t.events.on(Pc.Zs,(function(t,n){t||a!==n?t&&(a=n):a=null})),t.events.on(Pc.Jc,(function(t){t&&(r=!1)})),function(){var i={l:Pc.dc,w:Pc.hc,s:Pc.vc,c:[Pc.Us,!0],h:[Pc.Vs,!0],f:Pc.Ns,d:Pc.Rc,space:_,up:E,down:T,left:x,right:x,esc:k,"?":[Sc._showOverlay,"help"]};function r(n){if(m(n),function(t){return!(t.ctrlKey||t.metaKey||t.altKey)&&(t.which in cp?"keydown"===t.type:"keypress"===t.type)}(n)&&!b(n)&&v()){var r=w(n);if(r in i){if("function"==typeof i[r])return void(!1===i[r](n,r)&&(n.preventDefault(),n.stopPropagation()));!1===function(n){if(n=Array.isArray(n)?n:[n],u&&"help"===e){if(t.events.fire(Pc.kc),n[0]===Sc._showOverlay&&"help"===n[1])return!1;if(n[0]!==Sc.Ja)return setTimeout((function(){t.events.fire.apply(null,n)}),250),!1}return t.events.fire.apply(null,n),!1}(i[r])&&(n.preventDefault(),n.stopPropagation())}}}t.config.embed.on_site||(i.v=Sc.Ja),document.addEventListener("keydown",r,!1),document.addEventListener("keypress",r,!1),document.addEventListener("keyup",(function(i){if(m(i),!b(i)&&v()){var e=w(i);!ys.spatialPlayback||!t.config.video.spatial||"left"!==e&&"right"!==e&&"up"!==e&&"down"!==e?n.get(Dl)||"left"!==e&&"right"!==e||function(n){l=s,f=0;var i=n.shiftKey;t.events.fire(Pc.$s,i),d=!1}(i):t.backbone.getEffectByName("ThreeSixtyEffect").keyUp(e)}}),!1)}(),t.events.on(Pc.sl,(function(){r=!1})).on(Pc.cl,(function(){r=!0})),t.config.embed.on_site&&document.querySelector(".player")===i&&(r=!1),function(){var t,n=!1;document.body.addEventListener("keyup",(function(t){9!==t.which||document.body.classList.contains("showfocus")||document.body.classList.add("showfocus")})),document.body.addEventListener("keydown",(function(i){32!==i.which&&13!==i.which||(n=!0,clearTimeout(t),t=setTimeout((function(){n=!1}),200))})),document.body.addEventListener("click",(function(t){n||document.body.classList.remove("showfocus")}))}(),{pause:function(){r=!0},unpause:function(){r=!1}}}var fp=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.displayTimeout,e=void 0===i?0:i,r=n.label,o=void 0===r?"Alert":r;nt(this),this.Xd=t,this.Zd=!1,this.Qd=null,this.th=null,this.nh=o;var u=Math.round(e/1e3);0!==u&&(this.nh="".concat(o," Will be dismissed in ").concat(u," seconds")),this.ih=null,this.eh=e,this.rh(),this.Sn()}var n=t.prototype;return n.show=function(t){var n=this;!0!==this.Zd&&(clearTimeout(this.ih),this.th.classList.remove("hidden"),this.th.removeAttribute("hidden"),window.requestAnimationFrame((function(){n.th.classList.add("in")})),(this.th.querySelector("[data-alert-autofocus]")||this.th).focus(),this.Zd=!0,this.fire("show",t),0!==this.eh&&(this.ih=setTimeout((function(){n.hide("timeout")}),this.eh)))},n.hide=function(t){var n=this;!1!==this.Zd&&(clearTimeout(this.ih),this.th.classList.add("leaving"),window.requestAnimationFrame((function(){var t=n;n.oh(),ef(n.th).on("transitionend",(function n(i){"opacity"===i.propertyName&&(t.th.classList.remove("leaving"),t.th.classList.add("hidden"),t.th.setAttribute("hidden",""),ef(t.th).off("transitionend",n))}))})),this.Zd=!1,this.fire("hide",t))},n.oh=function(){this.th.classList.remove("in")},n.rh=function(){this.th||(this.th=document.createElement("div"),this.th.classList.add("vp-alert"),this.th.setAttribute("role","alertdialog"),this.th.setAttribute("aria-label",this.nh),this.th.setAttribute("aria-atomic","true"),this.th.classList.add("hidden"),this.th.setAttribute("hidden",""),this.Xd.appendChild(this.th),this.oh()),this.Qd instanceof HTMLElement?(this.th.innerHTML="",this.th.appendChild(this.Qd)):(this.th.textContent=this.Qd,this.th.innerHTML=this.Qd);var t=document.createElement("button");t.setAttribute("data-close",""),t.setAttribute("aria-label","Close alert"),t.classList.add("close"),t.innerHTML=dd.render("icon_close"),this.th.appendChild(t)},n.Sn=function(){var t=this;ef(this.th).on("click","[data-close]",(function(n){t.hide(n)}))},H(t,[{key:"visible",get:function(){return this.Zd}},{key:"message",get:function(){return this.Qd},set:function(t){t instanceof HTMLElement&&this.Qd&&t.textContent===this.Qd.textContent||t!==this.Qd&&(this.Qd=t,this.rh())}}]),t}(),dp=function(){function t(t,n,i){this.player=t,this.backbone=n,this.isBufferingTooLong=!1,this.isBufferingTooFrequent=!1,this.autoAlertWasDismissed=!1,this.bufferCount=-1,this.badPlaybackTimer=null,this.uh(i),this.ah()}var n=t.prototype;return n.handleBufferStarted=function(){this.bufferCount+=1,this.sh()},n.handleBufferEnded=function(){clearTimeout(this.badPlaybackTimer),this.badPlaybackTimer=null,this.isBufferingTooLong=!1},n.ah=function(){var t=this;this.player.events.on(Ec.Ua,(function(n){t.lh(n)})),this.player.events.on(Ec.Ba,(function(n){t.fh(n)})),this.player.events.on(Ec.Va,this.handleBufferStarted.bind(this)),this.player.events.on(yi.BUFFER_ENDED,this.handleBufferEnded.bind(this)),this.player.events.on(Ec.Fa,(function(){t.autoAlertWasDismissed||(t.showAlert("stream_studder"),al.captureBreadcrumb("Alert shown",{message:"stream_studder"},"video"))})),this.player.events.on(Pc.As,(function(n){"auto"===n&&t.alertUI.hide("qualitymenuauto")}))},n.lh=function(t){t||this.showAlert("warning_alert",{strings:{text:'Accédez à une <a href="https://help.vimeo.com/hc/en-us/articles/115001878167#browsers" target="_blank" rel="noopener" aria-describedby="new-window">liste de navigateurs</a> supportant le visionnage à 360°.'}})},n.fh=function(t){t||this.showAlert("warning_alert",{strings:{text:'Vous souhaitez regarder une vidéo à 360° ? Consultez <a href="https://help.vimeo.com/hc/en-us/articles/115001878167#browsers" target="_blank" rel="noopener" aria-describedby="new-window">les navigateurs et les paramètres supportés</a>.'}})},n.showAlert=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.alertUI&&!this.player.config.embed.settings.background&&(this.alertUI.message=dd.render(t,n),this.alertUI.show())},n.uh=function(t){var n=this;this.alertUI=new fp(t),this.alertUI.on("show",(function(t){n.player.events.fire(Pc.Dl,!0,t)})),this.alertUI.on("hide",(function(t){var i=t.target,e=i&&"function"==typeof i.getAttribute;if(e)switch(i.getAttribute("data-context")){case"suggestion":n.player.events.fire(Sc.Ya,"auto"),t="suggestion";break;default:t="close"}(e||"qualitymenuauto"===t)&&(n.autoAlertWasDismissed=!0),n.player.events.fire(Pc.Dl,!1,t)}))},n.sh=function(){var t=this;null===this.badPlaybackTimer&&0!==this.bufferCount&&(this.badPlaybackTimer=setTimeout((function(){t.isBufferingTooLong=!0,t.dh()}),1e4))},n.dh=function(){"MediaSourceScanner"===this.backbone.currentScannerName&&(this.isBufferingTooLong||this.isBufferingTooFrequent)&&(this.backbone.video.currentFile.restrictedStreamIndexes.length<=0||(this.isBufferingTooLong,this.isBufferingTooFrequent,this.player.events.fire(Ec.Fa),this.bufferCount=0,this.badPlaybackTimer=null,this.isBufferingTooFrequent=!1,this.isBufferingTooLong=!1))},t}();function hp(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}function vp(t,n){try{var i=t()}catch(t){return n(t)}return i&&i.then?i.then(void 0,n):i}function pp(){}var mp=function(){function t(t,n){this.tf=t,this.hh=n,this.vh=0,this.ph()}var n=t.prototype;return n.wh=function(){this.hh.get(Ul)&&(this.tf.element.querySelector(".vp-live-viewer-status-wrapper")||(this.If=document.createElement("div"),this.If.classList.add("vp-live-viewer-status-wrapper","invisible"),this.If.innerHTML=dd.render("live_status"),this.If.querySelector(".vp-live-status-circle").classList.remove("offline"),this.tf.element.querySelector(".vp-controls-wrapper").appendChild(this.If)))},n.bh=function(){var t=this.tf.element.querySelector(".vp-live-viewer-status-wrapper");t&&this.tf.element.querySelector(".vp-controls-wrapper").removeChild(t)},n.ph=function(){var t=this;this.hh.watch(zl,(function(){return t.bh()})),this.tf.events.on(Pc.Jc,(function(){t.tf.config.video.live_event?t.wh():t.bh()})),this.tf.events.on(tu.STREAM_ONLINE,(function(){t.wh(),t.gh()})),this.tf.events.on(Pc.Js,(function(n){var i;null==(i=t.If)||i.classList.toggle("invisible",n)}))},n.gh=function(){try{var t=this;if(!t.hh.get(Ul)||!t.tf.config.video.live_event.show_viewer_count)return;var n=setTimeout((function(){t.gh()}),3e4),i="".concat(t.tf.config.video.id);"unlisted"===t.tf.config.video.privacy&&(i+=":".concat(t.tf.config.video.unlisted_hash));var e="https://".concat(t.tf.config.vimeo_api_url,"/videos/").concat(i,"/stats/live"),o={jwt_token:t.tf.config.user.vimeo_bucketed_live_client_token};return wp(vp((function(){return hp(t.tf.updatePhpTokens(),(function(){return wp(vp((function(){return hp(Ke({url:e,searchParams:o}).json(),(function(n){n.viewers?(t.vh=0,t.yh(n.viewers.current)):t.vh++}))}),(function(){t.vh++,t._h()&&clearTimeout(n)})))}))}),(function(i){al.captureException(i),t.vh++,t._h()&&clearTimeout(n)})))}catch(t){return r.reject(t)}},n.yh=function(t){this.tf.config.video.live_event.show_viewer_count&&(this.If.querySelector(".vp-live-viewer-count")||(this.tf.element.querySelector(".vp-live-viewer-count").style.display="block",this.If.innerHTML+=dd.render("live_viewer_count")),V(this.tf.element.querySelectorAll(".vp-live-viewer-count-value")).forEach((function(n){return n.innerHTML=function(t){return t=parseFloat(t),isNaN(t)||t<0?"0":t<1e3?t.toString():t>=1e3&&t<1e6?Math.floor(t/1e3)+","+Math.round(t%1e3/100)+"k":Math.floor(t/1e6)+","+Math.round(t%1e6/1e5)+"M"}(t)})))},n._h=function(){return this.vh>3&&(V(this.tf.element.querySelectorAll(".vp-live-viewer-count")).forEach((function(t){return t.classList.add("hidden")})),!0)},t}();function wp(t){if(t&&t.then)return t.then(pp)}t.BigScreen=ph,t.VimeoPlayer=function(t,n,i,e){dd.helpers=tp;var o=function(t){if(!0===t)return r.resolve(null);var n=!1;return new r((function(i,e){t.link.addEventListener("load",(function(){if(!n){n=!0;var e=(new Date).getTime()-t.startTime;setTimeout((function(){return i(e)}),100)}}),!1)}))}(i),u=new Lh({element:t,delegate:e,cssLoadedPromise:o}),a=u.store;t.classList.add("js-player-fullscreen");var s=u.expose,c=null,l=null,f=null,d=null,h=null,v=null,p=t.querySelector(".vp-controls"),m=t.querySelector(".vp-sidedock"),w=t.querySelector(".vp-title"),b=t.querySelector(".vp-cards-wrapper"),g=ys.mobileAndroid||ys.iPhone||ys.windowsPhone||ys.browser.bb10,y={tiny:Pc.Qc,mini:Pc.tl,normal:Pc.nl,none:Pc.nl};function _(n){n&&void 0!==y[n]&&(u.events.fire(y[n]),t.classList.toggle("player-normal","normal"===n),t.classList.toggle("player-mini","mini"===n),t.classList.toggle("player-tiny","tiny"===n))}function k(n){Object.keys(Bf).forEach((function(i){return t.classList.toggle("player-".concat(i),n===i)}))}function E(){var n=u.config.embed.settings,i=(1===u.config.view||3===u.config.view)&&n&&!n.playbar;t.classList.toggle("no-playbar",i),t.classList.toggle("with-fullscreen",!!n.fullscreen);var e=n.custom_logo;t.classList.toggle("with-custom-logo",!!e),t.classList.toggle("with-sticky-custom-logo",e&&e.sticky),t.classList.toggle("hide-controls-mode",!!n.background||0===n.controls),t.classList.toggle("touch-support",ys.touch)}function T(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.config.video.url;if(!(!n||t&&t.metaKey)){if(-1===n.indexOf("#")&&u.backbone.currentTime>0&&u.backbone.currentTime<u.config.video.duration-30&&!u.backbone.paused&&(n+="#at=".concat(Math.floor(u.backbone.currentTime))),!u.config.embed.on_site)return window.open(n),nc(t),u.events.fire(Pc.Ps),!1;window.location=n}}function x(){if(!u.config.video.live_event)return h&&(h.disable(),h=null),void(v&&(v=null));a.get(Bl)||a.get(zl)?h&&(h.disable(),h=null):(h=new gv(t,u,a),v=new mp(u,a))}function S(){E(),d=new r((function(t,n){var i=null,e=function n(){clearTimeout(i),window.innerWidth>0&&window.innerHeight>0?t():i=setTimeout(n,250)};u.events.once(Pc.ue,e),u.events.once(Pc.bs,e)})),function(){var t=function(t,n){return u.verifyConfig().then((function(){var i=u.config.request,e=i.signature,r=i.session,o=i.timestamp,a=i.expires;return Ke("https://".concat(u.config.player_url,"/video/").concat(u.config.video.id,"/").concat(t,"?signature=").concat(e,"&session=").concat(r,"&time=").concat(o,"&expires=").concat(a),{method:n,withCredentials:!0})})).catch((function(i){al.captureException(i,{extra:{action:t,method:n}})}))},n=function(t,n){return u.updatePhpTokens().then((function(){var i="following"===t?u.config.video.owner.id:u.config.video.id,e=u.config.user.vimeo_api_interaction_tokens,r="";if(e)switch(r="?auth=",t){case"likes":r+=e.likes;break;case"watchlater":r+=e.watch_later;break;case"following":r+=e.following}var o=u.config.video.unlisted_hash&&"following"!==t?":".concat(u.config.video.unlisted_hash):"";return Ke("https://".concat(u.config.vimeo_api_url,"/users/").concat(u.config.user.id,"/").concat(t,"/").concat(i).concat(o).concat(r),{method:n,jwt:u.config.user.vimeo_api_client_token}).catch((function(i){al.captureException(i,{extra:{action:t,method:n}})}))})).catch((function(t){al.captureException(t)}))};u.events.on(Pc.mc,(function(t){if(u.config.user.purchased)return!u.config.video.vod.is_feature&&u.config.video.vod.feature_id?void u.loadVideo(u.config.video.vod.feature_id).then((function(){return u.events.fire(Pc.Fs),u.config.video.vod.feature_id})).catch((function(t){al.captureException(t),u.events.fire(Sc._showOverlay,"error",{title:"Désolé",message:"Un problème sest produit. Veuillez essayer à nouveau."})})):void u.events.fire(Pc.Fs);u.config.video.vod&&u.config.video.vod.is_coming_soon?T(null,u.config.video.vod.url):u.performDelegateAction(Oc,(function(){u.events.fire(Sc.Ga,"purchase",{productId:t})}),[t])})),u.events.on(Pc.dc,(function(){u.config.user.logged_in?u.config.user.id!==u.config.video.owner.id&&(u.config.user.liked?u.performDelegateAction(Mc,(function(){"disable"!==u.config.video.privacy?n("likes","DELETE"):t("like","DELETE"),u.config.user.liked=!1,u.events.fire(Pc.Hc)})):u.performDelegateAction(Ac,(function(){"disable"!==u.config.video.privacy?n("likes","PUT"):t("like","PUT"),u.config.user.liked=!0,u.events.fire(Pc.Bc)}))):u.performDelegateAction(jc,(function(){u.events.fire(Sc.Ga,"login-like")}))})),u.events.on(Pc.hc,(function(){(u.config.video.url||"unlisted"===u.config.video.privacy)&&(u.config.user.logged_in?u.config.user.watch_later?u.performDelegateAction(Cc,(function(){n("watchlater","DELETE"),u.config.user.watch_later=!1,u.events.fire(Pc.qc)})):u.performDelegateAction(Rc,(function(){n("watchlater","PUT"),u.config.user.watch_later=!0,u.events.fire(Pc.zc)})):u.performDelegateAction(jc,(function(){u.events.fire(Sc.Ga,"login-watch-later")})))})),u.events.on(Pc.wc,(function(){u.performDelegateAction(Dc,(function(){u.config.video.vod&&u.config.video.vod.url?T(null,"".concat(u.config.video.vod.url,"#collections")):u.config.video.url&&T(null,"".concat(u.config.video.url,"#collections"))}))})),u.events.on(Pc.vc,(function(){var t=u.config.embed.settings.share&&u.config.embed.settings.share.embed_only,n=function(){u.events.fire(Sc._showOverlay,"share",t)};ph.element?n():u.performDelegateAction(Ic,n)})),u.events.on(Pc.pc,(function(){u.config.embed.settings.share.embed_only&&u.performDelegateAction(Ic,(function(){u.events.fire(Sc._showOverlay,"share",!0)}))})),u.events.on(Pc.bc,(function(){if(u.config.user.logged_in&&u.config.user.id!==u.config.video.owner.id){if(u.config.user.following)return n("following","DELETE"),u.config.user.following=!1,void u.events.fire(Pc.ml);n("following","PUT"),u.config.user.following=!0,u.events.fire(Pc.pl)}}))}(),u.events.on(Pc.ks,(function(){t.classList.add("player-ad")})),u.events.on([Pc.Es,Sc.$a],(function(){t.classList.remove("player-ad")})),function(){var n=function(){return function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(d,(function(){var n=function(){var n=ec(t),i=n.width,e=n.height;return g?e<=200?"10px":i<450?"12px":i<=1024?"11px":"10px":"10px"}();p.style.fontSize=n,m.style.fontSize=n,w.style.fontSize=n}))};u.events.on(Pc.cc,n),u.events.on(Pc.fc,n),window.addEventListener("orientationchange",n),g&&(t.classList.add("mobile"),n())}(),a.watch("ui.player.mode",_),a.watch("ui.player.breakpoint",k),function(){function n(){var n=t;if(e&&e.getFullscreenElement&&"function"==typeof e.getFullscreenElement){var i=e.getFullscreenElement();i&&i instanceof HTMLElement&&i.contains(t)&&i.classList.contains("js-player-fullscreen")&&(n=i)}return n}u.config.embed.fullscreen=!0,ys.iPad&&t.classList.add("no-fullscreen-api-support");var i=u.config.embed.playsinline&&ys.iOS>=10,r=ys.iPad||i;ph.enabled||r||(t.classList.add("no-fullscreen-support"),ys.iOS||(u.config.embed.fullscreen=!1));var o=!1,a=!1,s=!1;u.events.on([Ko,Yo],(function(){s=!0})),u.events.on(Sc.es,(function(){ph.enabled||ph.videoEnabled(t)?(u.events.fire(Pc.sc),a=!1,ph.request(n())):u.events.fire(Sc.us,!0)})),u.events.on(Pc.Ns,(function(){"picture-in-picture"===u.backbone.presentationMode&&u.events.fire(Sc.ls),ph.element?(u.events.fire(Pc.lc),ph.exit()):(u.events.fire(Pc.sc),a=!0,ph.request(n()))}));var c=ph.onenter,l=ph.onexit;if(ph.onenter=function(t){o||(n().contains(t)?function(t,i){s?s=!1:o||(o=!0,u.events.fire(Pc.cc,n()===t,a))}(t):"function"==typeof c&&c(t))},ph.onexit=function(){o?s?s=!1:o&&(o=!1,u.events.fire(Pc.fc,a),a||u.events.fire(Sc.us,!1),a=!1):"function"==typeof l&&l()},ef(t).on("click","a",(function(t){ph.element===n()&&ph.exit()})),ef(t).on("gestureend",(function(t){t.scale>1&&u.events.fire(Pc.Ns)})),"undefined"!=typeof MSGesture){var f=1,d=new MSGesture;d.target=t,ef(t).on("pointerdown",(function(t){d.addPointer(t.pointerId)})).on(["MSGestureChange"],(function(t){f*=t.scale})).on(["MSGestureEnd"],(function(){(!o&&f>=2||o&&f<1)&&u.events.fire(Pc.Ns),f=1}))}}(),Nh(t,"a[data-clip-link]",T),u.events.on(Sc.Ja,T),Nh(t,"[data-track-click]",(function(t){var n=t.target.dataset.trackClick;u.events.fire(Pc.Cs,n)})),x(),u.events.on(Pc.Jc,(function(){E(),x()})),u.events.on(Sc.ms,(function(){h.disable()}))}function A(){c||(c=new xv(u,a,t.querySelector(".vp-overlay-wrapper")))}function M(){l||(l=new Kv(u,{uuid:u.uuid,id:t.id,isMobileDevice:!1}))}function R(){f||(f=new Yv(u))}var C={initializationHandler:function(){return function(){A(),M(),R(),new rv(u,a,p),new uv(u,a,t);var n=new lp(u,a,t);new yv(u,t.querySelector(".vp-notification-wrapper")),new Ev(u,a,t.querySelector(".vp-outro-wrapper")),new np(u,m),new ip(u,w),new op(u,t),Object.defineProperties(s,{pauseKeyboard:{enumerable:!0,value:n.pause},unpauseKeyboard:{enumerable:!0,value:n.unpause}})}(),S(),r.resolve()},postInitializationHandler:function(){return u.backbone&&(new wv(t.querySelector(".vp-stats-debug"),u),new sp(u,a,b),new dp(u,u.backbone,t)),r.resolve()},authorizationHandler:function(t){t(),A(),M();var n="Error",i="Unhandled video privacy";switch(u.config.view){case 4:return new r((function(t,n){u.events.fire(Sc._showOverlay,"password"),u.events.once(Pc.Xc,(function(n){t(n)}))}));case 2:R();var e="private-locked",o=null;return u.config.user.logged_in&&(e="error",o={title:"Vidéo privée",message:"Désolé, vous navez pas la permission de regarder.",modal:!0,logo:!!u.config.embed.settings.logo,icon:"lock"}),u.events.fire(Sc._showOverlay,e,o),r.reject();case 7:n=u.config.title,i=u.config.message}return u.events.fire(Sc._showOverlay,"error",{title:n,message:i,modal:!0}),r.reject()}};return u.init(n,C).then((function(){return 3!==u.config.view||u.config.embed.autoplay||u.events.fire(Sc._showOverlay,"private-unlocked"),!0})).catch((function(n){al.captureException(n),A(),M(),t.classList.remove("loading"),u.events.fire(Pc.bs,Wc.id,Wc)})),s},t.requestModule=er}(this.window=this.window||{});