@tivio/sdk-js 2.0.0-alpha3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -12,14 +12,19 @@ yarn add @tivio/sdk-js
12
12
 
13
13
  # Changelog
14
14
 
15
- * 2.0.0-alpha2
16
- * add fetch polyfill
17
- * requires core-js at least 1.12.0
18
- * force using cloud fn instead of resolver
19
- * major: rename positionMs to startFromPosition
20
- * minor: add streamStart to TvProgramSource
21
- * minor: add continueFromPosition to TvProgramSource, TivioVodSource, OtherSource and LiveTvChannelSource
22
- * minor: live_tv_channel source type does pass-through instead of stopping the setSource action
15
+ * 2.0.0
16
+ * requires core-js at least 1.13.0
17
+ * major: remove `createPlayerWrapper` from Tivio API object
18
+ * major: rename `positionMs` to `startFromPosition`
19
+ * minor: add `createPlayerWrapper` to the root of the @tivio-sdk-js package, it's not necessary to wait until
20
+ `createTivio` is finished before using it but it is still necessary to call `createTivio` at some point
21
+ * minor: add (optional) `capabilitiesOptions` and `deviceCapabilities` options to Tivio config
22
+ * minor: add fetch polyfill
23
+ * minor: better source types documentation
24
+ * minor: add `streamStart` to `TvProgramSource`
25
+ * minor: add `continueFromPosition` to `TvProgramSource`, `TivioVodSource`, `OtherSource` and `LiveTvChannelSource`
26
+ * minor: `live_tv_channel` source type does pass-through instead of stopping the `setSource` action
27
+ * minor: add `forceCloudFnResolver` option to Tivio config
23
28
  * 1.1.0
24
29
  * minor: fallback to fetch bundle by cloud fn when indexedDB not supported
25
30
  * minor: transpile to es5
@@ -137,14 +137,22 @@ declare type AdMetadata = {
137
137
  declare enum PlayerWrapperEventType {
138
138
  adMetadata = "adMetadata"
139
139
  }
140
- declare type TivioPlayerWrapper = {
140
+ interface TivioPlayerWrapper {
141
141
  addEventListener: (eventType: PlayerWrapperEventType.adMetadata, listener: (metadata: AdMetadata) => void) => void;
142
142
  reportError: (error: Error) => void;
143
143
  reportPlaybackEnded: () => void;
144
144
  reportTimeProgress: (ms: number) => void;
145
145
  seekTo: (ms: number) => void;
146
146
  setSource: (source: Source | null) => void;
147
- };
147
+ }
148
+ interface PlayerInterfaceForPlayerWrapper {
149
+ /**
150
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
151
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
152
+ */
153
+ seekTo: (ms: number) => void;
154
+ setSource: (source: Source | null) => void;
155
+ }
148
156
  declare type ExposedApi = {
149
157
  AdSource: any;
150
158
  ChannelSource: any;
@@ -269,9 +277,6 @@ declare type ExposedApi = {
269
277
  * @param password
270
278
  */
271
279
  signInWithEmailAndPassword: (email: string, password: string) => Promise<void>;
272
- createPlayerWrapper: (playerImplementation: {
273
- setSource: (source: Source | null) => void;
274
- seekTo: (ms: number) => void;
275
- }) => TivioPlayerWrapper;
280
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
276
281
  };
277
- export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerWrapperEventType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, };
282
+ export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, };
package/dist/conf.d.ts CHANGED
@@ -5,7 +5,28 @@
5
5
  import { Logger } from './services/logger';
6
6
  import { FetchPackage } from './services/packageLoader';
7
7
  import { Conf as ExternalConf } from './types';
8
+ export interface PlayerCapability {
9
+ codec: 'h264' | 'h265';
10
+ encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
11
+ protocol: 'dash' | 'hls';
12
+ }
8
13
  export declare type InternalConf = {
14
+ /**
15
+ * Tells Tivio which technologies/protocols etc. is the device capable to play.
16
+ * If not provided, Tivio will try to guess it (based on the browser).
17
+ */
18
+ deviceCapabilities?: PlayerCapability[];
19
+ /**
20
+ * Additional options for deviceCapabilities
21
+ */
22
+ capabilitiesOptions?: {
23
+ /**
24
+ * Should the player prefer HTTP sources instead HTTPs if they are available.
25
+ * This can be used on platforms that support mixed content but do not support
26
+ * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
27
+ */
28
+ preferHttp?: boolean;
29
+ };
9
30
  secret: string;
10
31
  resolverUrl: string;
11
32
  logger?: Logger | null;
@@ -13,7 +34,13 @@ export declare type InternalConf = {
13
34
  language?: string;
14
35
  sdkVersion: string;
15
36
  /**
16
- * Defaults to true
37
+ * Can force using bundle resolver method which doesn't depend on indexedDB (useful when some polyfill
38
+ * for indexedDB is used but indexedDB is not fully supported - it leads to situation where check for indexedDB
39
+ * presence passes but resolver fails anyway).
40
+ */
41
+ forceCloudFnResolver?: boolean;
42
+ /**
43
+ * Can turn off Tivio's Sentry logging, defaults to true.
17
44
  */
18
45
  enableSentry?: boolean;
19
46
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import 'whatwg-fetch';
2
+ import 'es7-object-polyfill';
2
3
  export * from './services/bundleLoader';
3
4
  export * from './types';
4
5
  export * from './api.types';
6
+ export { createPlayerWrapper } from './services/playerWrapper';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mobx"),require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore")):"function"==typeof define&&define.amd?define("@tivio/sdk-js",["mobx","@sentry/browser","firebase/app","firebase/auth","firebase/firestore"],t):"object"==typeof exports?exports["@tivio/sdk-js"]=t(require("mobx"),require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore")):e["@tivio/sdk-js"]=t(e.mobx,e["@sentry/browser"],e["firebase/app"],e["firebase/auth"],e["firebase/firestore"])}(this,(function(e,t,n,r,o){return function(){var i={194:function(e,t,n){var r,o;e.exports=(r=n(259),o=n(784),function(){var e={2096:function(e){"use strict";function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function r(r,o){"string"!=typeof r&&(o=r,r=e.exports.ISO8601_FORMAT),o||(o=e.exports.now());var i,a,s,u,c=n(o.getDate()),l=n(o.getMonth()+1),f=n(o.getFullYear()),d=n(f.substring(2,4)),p=r.indexOf("yyyy")>-1?f:d,h=n(o.getHours()),g=n(o.getMinutes()),y=n(o.getSeconds()),v=t(o.getMilliseconds(),3),b=(i=o.getTimezoneOffset(),a=Math.abs(i),s=String(Math.floor(a/60)),u=String(a%60),1===s.length&&(s="0"+s),1===u.length&&(u="0"+u),i<0?"+"+s+u:"-"+s+u);return r.replace(/dd/g,c).replace(/MM/g,l).replace(/y{1,4}/g,p).replace(/hh/g,h).replace(/mm/g,g).replace(/ss/g,y).replace(/SSS/g,v).replace(/O/g,b)}function o(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var i=t.indexOf("O")<0,a=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){o(e,"FullYear",t,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Month",t-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Date",t,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Hours",t,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){o(e,"Minutes",t,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){o(e,"Seconds",t,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){o(e,"Milliseconds",t,i)}},{pattern:/O/,regexp:"[+-]\\d{3,4}|Z",fn:function(e,t){"Z"===t&&(t=0);var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],s=a.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),u=a.filter((function(e){return e.index>-1}));u.sort((function(e,t){return e.index-t.index}));var c=new RegExp(s.regexp).exec(n);if(c){var l=r||e.exports.now();return u.forEach((function(e,t){e.fn(l,c[t+1])})),l}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"},187:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.gtag=t.install=void 0,t.install=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="ga-gtag";if(!document.getElementById(r)){var o=document.head,i=document.createElement("script");i.id=r,i.type="text/javascript",i.async=!0,i.src="https://www.googletagmanager.com/gtag/js?id=".concat(e),o.insertBefore(i,o.firstChild),window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",e,t)}};var n=function(){window.dataLayer.push(arguments)};t.gtag=n;var r=n;t.default=r},421:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}n.r(t),n.d(t,{default:function(){return z}});var h={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},g=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||h,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),y=new g,v=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function m(e){return null==e?"":""+e}function O(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function _(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function P(e,t,n){var r=_(e,t,Object);r.obj[r.k]=n}function S(e,t){var n=_(e,t),r=n.obj,o=n.k;if(r)return r[o]}function w(e,t,n){var r=S(e,n);return void 0!==r?r:S(t,n)}function E(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):E(e[r],t[r],n):e[r]=t[r]);return e}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function x(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return T[e]})):e}var L="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),L&&v.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),S(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),P(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=S(this.data,s)||{};r?E(u,n,o):u=i({},u,n),P(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(v),k={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},C={},I=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),L&&v.call(c(n)),O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=y.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var h=n.nsSeparator||this.options.nsSeparator;return f+h+c}return c}var g=this.resolve(e,n),y=g&&g.res,v=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,m=Object.prototype.toString.apply(y),O=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject;if(P&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&O.indexOf(m)<0&&("string"!=typeof _||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var S="[object Array]"===m,w=S?[]:{},E=S?b:v;for(var j in y)if(Object.prototype.hasOwnProperty.call(y,j)){var T="".concat(E).concat(s).concat(j);w[j]=this.translate(T,i({},n,{joinArrays:!1,ns:l})),w[j]===T&&(w[j]=y[j])}y=w}}else if(P&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,n,o));else{var x=!1,L=!1,A=void 0!==n.count&&"string"!=typeof n.count,k=t.hasDefaultValue(n),C=A?this.pluralResolver.getSuffix(d,n.count):"",I=n["defaultValue".concat(C)]||n.defaultValue;!this.isValidLookup(y)&&k&&(x=!0,y=I),this.isValidLookup(y)||(L=!0,y=c);var R=k&&I!==y&&this.options.updateMissing;if(L||x||R){if(this.logger.log(R?"updateKey":"missingKey",d,f,c,R?I:y),s){var M=this.resolve(c,i({},n,{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var B=0;B<D.length;B++)N.push(D[B]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);var F=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,R?r:y,R,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,R?r:y,R,n),a.emit("missingKey",e,f,t,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?N.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){F([e],c+t,n["defaultValue".concat(t)]||I)}))})):F(N,c,I))}y=this.extendTranslation(y,e,n,g,o),L&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(c)),L&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(y))}return y}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=k.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!C["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(C["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(l+i),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(v);function R(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=y.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=R(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],D={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function B(){var e={};return N.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:D[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=y.create("pluralResolver"),this.rules=B()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=y.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:x,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=w(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(w(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=m(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i({},a);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,s)).replace(/'/g,'"');try{s=JSON.parse(o),t&&(s=i({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(u.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=m(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return o.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),V=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),L&&v.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=y.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=_(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(v);function H(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function W(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function G(){}var K=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),L&&v.call(c(e)),e.options=W(n),e.services={},e.logger=y,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},H(),this.options,W(t)),this.format=this.options.interpolation.format,n||(n=G),!this.options.isClone){this.modules.logger?y.init(r(this.modules.logger),this.options):y.init(null,this.options);var o=new M(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=y,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new U(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new V(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new I(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=b(),c=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=G),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&k.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new I(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(v),z=new K},6160:function(e,t,n){e=n.nmd(e);var r,o,i,a="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",l="[object DataView]",f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=d||p||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,v=y&&y.exports===g,b=Function.prototype,m=Object.prototype,O=h["__core-js_shared__"],_=(r=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",P=b.toString,S=m.hasOwnProperty,w=m.toString,E=RegExp("^"+P.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=v?h.Buffer:void 0,T=m.propertyIsEnumerable,x=j?j.isBuffer:void 0,L=(o=Object.keys,i=Object,function(e){return o(i(e))}),A=V(h,"DataView"),k=V(h,"Map"),C=V(h,"Promise"),I=V(h,"Set"),R=V(h,"WeakMap"),M=!T.call({valueOf:1},"valueOf"),N=W(A),D=W(k),B=W(C),F=W(I),U=W(R);function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||function(e){return!!_&&_ in e}(e))return!1;var t=Y(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?E:f;return t.test(W(e))}(n)?n:void 0}var H=function(e){return w.call(e)};function W(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(A&&H(new A(new ArrayBuffer(1)))!=l||k&&H(new k)!=a||C&&H(C.resolve())!=s||I&&H(new I)!=u||R&&H(new R)!=c)&&(H=function(e){var t=w.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?W(n):void 0;if(r)switch(r){case N:return l;case D:return a;case B:return s;case F:return u;case U:return c}return t});var G=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Y(e)}var z=x||function(){return!1};function Y(e){var t=q(e)?w.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(K(e)&&(G(e)||"string"==typeof e||"function"==typeof e.splice||z(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}(e)&&S.call(e,"callee")&&(!T.call(e,"callee")||"[object Arguments]"==w.call(e))}(e)))return!e.length;var t=H(e);if(t==a||t==u)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||m)}(e))return!L(e).length;for(var n in e)if(S.call(e,n))return!1;return!0}},3099:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentManagementHeaderScriptDebug=t.ConsentManagementHeaderScript=t.appendCmpScriptToHeadOnce=t.ConsentManagementHelmet=t.ConsentSettings=void 0;var u=a(n(8156)),c=new(n(6797).Logger)("ConsentSettings"),l="tivio-cmp-script",f="//assets.adobedtm.com/e949270ea86e/06f76135b050/launch-facbe9b48c75.min.js",d=l,p="//cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",h=l,g="UTF-8",y="text/javascript";t.ConsentSettings=function(e){var n=e.as,o=s(e,["as"]),i=(0,u.useRef)(null);return u.default.createElement(u.default.Fragment,null,u.default.createElement(t.ConsentManagementHelmet,null),u.default.createElement("button",{id:"ot-sdk-btn",className:"ot-sdk-show-settings",ref:i,style:{display:"none"}}),u.default.createElement(n,r({onClick:function(){var e;return null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.click()}},o)))},t.ConsentManagementHelmet=function(){return(0,t.appendCmpScriptToHeadOnce)(),null},t.appendCmpScriptToHeadOnce=function(){if(!document.getElementById(l)){var e="localhost"===window.location.hostname;c.info("Injecting "+(e&&"DEBUG")+" CMP script to <head/>..."),e?b():v()}};var v=function(){var e=document.createElement("script");e.id=d,e.src=f,e.async=!0,document.head.appendChild(e)},b=function(){var e=document.createElement("script");e.id=h,e.src=p,e.type=y,e.charset=g,e.dataset.domainScript="a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",e.async=!0;var t=document.createElement("script");t.id="tivio-cmp-script-2",t.type="text/javascript",t.text="function OptanonWrapper() { }",document.head.appendChild(e),document.head.appendChild(t)};t.ConsentManagementHeaderScript=function(){return u.default.createElement("script",{id:d,src:f,async:!0})},t.ConsentManagementHeaderScriptDebug=function(){return u.default.createElement(u.default.Fragment,null,u.default.createElement("script",{id:h,src:p,type:y,charSet:g,"data-domain-script":"a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",async:!0}),u.default.createElement("script",{type:"text/javascript"},"function OptanonWrapper() "))}},9281:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3099),t)},7723:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3902),t)},3902:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=void 0,function(e){e.ETARGET_PREBID="etarget-prebid",e.MALL_TV_PREBID="malltv-prebid",e.IMPRESSION_MEDIA_PREBID="impressionMedia-prebid",e.MALL_TV="malltv",e.FALLBACK_MP4="fallback",e.FALLBACK_HLS="fallback-hls",e.JOJ="joj",e.PRIMA="prima"}(n=t.VastProvider||(t.VastProvider={})),t.VAST_PROVIDERS=[{id:n.ETARGET_PREBID,name:"Etarget Prebid"},{id:n.MALL_TV_PREBID,name:"MALL.TV Prebid"},{id:n.IMPRESSION_MEDIA_PREBID,name:"Impression Media Prebid"},{id:n.MALL_TV,name:"MALL.TV"},{id:n.JOJ,name:"JOJ"},{id:n.PRIMA,name:"Prima"},{id:n.FALLBACK_MP4,name:"Fallback (MP4)",development:!0},{id:n.FALLBACK_HLS,name:"Fallback (HLS)",development:!0}]},2509:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2951),t)},2951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.firestoreObjectFilters=void 0;var r=n(543);t.firestoreObjectFilters={isTranscoded:{field:"transcodingStatus",operator:"==",value:r.TRANSCODING_STATUS.DONE},isPublished:{field:"publishedStatus",operator:"==",value:r.PUBLISHED_STATUS.PUBLISHED}},t.firestoreArrayFilters={isTranscoded:Object.values(t.firestoreObjectFilters.isTranscoded),isPublished:Object.values(t.firestoreObjectFilters.isPublished)},t.firestoreJavascriptFilters={isTranscoded:function(e){return e===r.TRANSCODING_STATUS.DONE},isPublished:function(e){return e===r.PUBLISHED_STATUS.PUBLISHED}}},7515:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3556),t),o(n(6557),t),o(n(1321),t),o(n(3370),t)},3556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useBottomListener=void 0;var r=n(8156);t.useBottomListener=function(e){var t=e.onBottom,n=e.onCloseToBottom,o=e.closeThreshold,i=void 0===o?400:o,a=(0,r.useState)(!1),s=a[0],u=a[1],c=(0,r.useState)(!1),l=c[0],f=c[1],d=(0,r.useCallback)((function(){var e=("innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight)+window.pageYOffset,t=document.body,n=document.documentElement,r=Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight);u(e>=r),f(e+i>=r)}),[s,u]);return(0,r.useEffect)((function(){return window.addEventListener("scroll",d),function(){window.removeEventListener("scroll",d)}}),[]),(0,r.useEffect)((function(){l&&(null==n||n())}),[l]),(0,r.useEffect)((function(){s&&(null==t||t())}),[s]),{isBottom:s,isCloseToBottom:l}}},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImageLoader=void 0;var r=n(8156);t.useImageLoader=function(e,t){var n=(0,r.useState)(e),o=n[0],i=n[1],a=(0,r.useState)(!1),s=a[0],u=a[1];return(0,r.useEffect)((function(){if(t){var e=new Image;e.src=t,e.onload=function(){i(t),u(!0)}}}),[t]),{loadedImageSrc:o,imageIsLoaded:s}}},6557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoading=void 0;var r=n(8156);t.useLoading=function(e){void 0===e&&(e=!1);var t=(0,r.useState)(e),n=t[0],o=t[1],i=(0,r.useRef)(n),a=function(e){o(e),i.current=e};return{loading:n,startLoading:function(){i.current||a(!0)},stopLoading:function(){i.current&&a(!1)}}}},3370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOnChange=t.usePrevious=void 0;var r=n(8156);function o(e){var t,n=(0,r.useState)([]),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(o.concat(e).slice(-2))}),[e]),null!==(t=o[o.length-2])&&void 0!==t?t:null}t.usePrevious=o,t.useOnChange=function(e,t){var n=o(e);n!==e&&t(n,e)}},3895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagePicker=void 0;var a=i(n(8156)),s=n(6915);t.LanguagePicker=function(){var e=(0,s.useLanguageOptions)(),t=e.language,n=e.languages,r=e.selectLanguage,o=(0,a.useCallback)((function(e){r(e.target.value)}),[r]);return a.default.createElement("select",{name:"tivio-language-select","data-e2e":"tivio-language-select",value:t,onChange:o},n.map((function(e){return a.default.createElement("option",{key:e,value:e},e)})))}},6915:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useLanguage=t.useLanguageOptions=t.useT=t.useI18n=void 0;var o=n(8156),i=n(6255),a=n(6009),s=n(5318);t.useI18n=function(){return(0,o.useContext)(a.I18nContext).i18n},t.useT=function(){var e=(0,t.useI18n)();return e?e.t.bind(e):function(e){return e}},t.useLanguageOptions=function(){var e=(0,o.useContext)(s.LanguageContext);return r(r({},e),{languages:i.languages})},t.useLanguage=function(){return(0,o.useContext)(s.LanguageContext).language}},6009:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nContextProvider=t.I18nContext=void 0;var s=a(n(421)),u=i(n(8156)),c=n(6797),l=n(5318),f=new c.Logger("language");t.I18nContext=(0,u.createContext)({i18n:null}),t.I18nContextProvider=function(e){var n=e.children,r=e.translations,o=(0,u.useState)({i18n:null}),i=o[0],a=o[1],c=(0,u.useContext)(l.LanguageContext).language;return(0,u.useLayoutEffect)((function(){f.info("initializing language",c),function(e,t){return new Promise((function(n,r){n(s.default.createInstance({lng:t,resources:e},(function(e){e&&r(e)})))}))}(r,c).then((function(e){a({i18n:e})}))}),[]),(0,u.useLayoutEffect)((function(){i.i18n&&(f.info("changing language",c),i.i18n.changeLanguage(c),a({i18n:i.i18n}))}),[c]),u.default.createElement(t.I18nContext.Provider,{value:i},n)}},4045:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6915),t),o(n(6009),t),o(n(5318),t),o(n(8133),t),o(n(3895),t)},5318:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageContextProvider=t.LanguageContext=void 0;var a=i(n(8156)),s=n(6255),u=n(6797),c=n(8683),l=new u.Logger("language");t.LanguageContext=(0,a.createContext)({language:s.Language.EN,selectLanguage:function(){}}),t.LanguageContextProvider=function(e){var n=e.language,r=e.children,o=(0,a.useState)((0,c.normalizeLanguage)(n)),i=o[0],s=o[1];(0,a.useLayoutEffect)((function(){var e=(0,c.normalizeLanguage)(n);s(e),l.info("Setting language (passed as prop): "+e+" (before normalization: "+n+")")}),[n]);var u=(0,a.useCallback)((function(e){l.info("Setting language: "+e),s(e)}),[]);return a.default.createElement(t.LanguageContext.Provider,{value:{language:i,selectLanguage:u}},r)}},8133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8683:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLanguage=void 0;var r=n(6255),o=new(n(6797).Logger)("i18n");t.normalizeLanguage=function(e){if(null==e)return r.Language.EN;var t=e.toLocaleLowerCase();return"cs"===t||"cz"===t||"cze"===t||"ces"===t?r.Language.CS:"sk"===t||"slk"===t||"slo"===t?r.Language.SK:("en"===t||"eng"===t||o.warn("Unrecognized language (input: "+e+"). Falling back to ENG"),r.Language.EN)}},1920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=t.LanguagePicker=t.useLanguageOptions=t.I18nContextProvider=t.LanguageContextProvider=t.useT=t.firestoreObjectFilters=t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.random=t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=t.onceAsync=t.once=t.executeAsNewEventLoopJob=t.removeAccents=t.normalizeText=t.formatCurrency=t.formatEpisode=t.toTwoPlaces=t.preloadImages=t.preloadImage=t.Cache=t.twoPlaces=t.parseCzechDate=t.getQueryByWhereFilters=t.getQueryByFilter=t.isInThePast=t.getSecs=t.getRelativeTime=t.getMinsSecsHours=t.getMinsSecs=t.getMins=t.getHours=t.getDuration=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=t.Analytics=t.createLogger=t.Logger=t.replaceWithoutOverwritingValues=t.notEmptyFilter=t.chunkArray=t.Pagination=t.RefsPagination=void 0;var i=n(1645),a=n(4291);Object.defineProperty(t,"RefsPagination",{enumerable:!0,get:function(){return a.RefsPagination}}),Object.defineProperty(t,"Pagination",{enumerable:!0,get:function(){return a.Pagination}}),o(n(7515),t);var s=n(6797);Object.defineProperty(t,"chunkArray",{enumerable:!0,get:function(){return s.chunkArray}}),Object.defineProperty(t,"notEmptyFilter",{enumerable:!0,get:function(){return s.notEmptyFilter}}),Object.defineProperty(t,"replaceWithoutOverwritingValues",{enumerable:!0,get:function(){return s.replaceWithoutOverwritingValues}}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.Logger}}),Object.defineProperty(t,"createLogger",{enumerable:!0,get:function(){return s.createLogger}}),Object.defineProperty(t,"Analytics",{enumerable:!0,get:function(){return s.Analytics}}),Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return s.addDays}}),Object.defineProperty(t,"addHours",{enumerable:!0,get:function(){return s.addHours}}),Object.defineProperty(t,"addMinutes",{enumerable:!0,get:function(){return s.addMinutes}}),Object.defineProperty(t,"addMs",{enumerable:!0,get:function(){return s.addMs}}),Object.defineProperty(t,"addSeconds",{enumerable:!0,get:function(){return s.addSeconds}}),Object.defineProperty(t,"getDuration",{enumerable:!0,get:function(){return s.getDuration}}),Object.defineProperty(t,"getHours",{enumerable:!0,get:function(){return s.getHours}}),Object.defineProperty(t,"getMins",{enumerable:!0,get:function(){return s.getMins}}),Object.defineProperty(t,"getMinsSecs",{enumerable:!0,get:function(){return s.getMinsSecs}}),Object.defineProperty(t,"getMinsSecsHours",{enumerable:!0,get:function(){return s.getMinsSecsHours}}),Object.defineProperty(t,"getRelativeTime",{enumerable:!0,get:function(){return s.getRelativeTime}}),Object.defineProperty(t,"getSecs",{enumerable:!0,get:function(){return s.getSecs}}),Object.defineProperty(t,"isInThePast",{enumerable:!0,get:function(){return s.isInThePast}}),Object.defineProperty(t,"getQueryByFilter",{enumerable:!0,get:function(){return s.getQueryByFilter}}),Object.defineProperty(t,"getQueryByWhereFilters",{enumerable:!0,get:function(){return s.getQueryByWhereFilters}}),Object.defineProperty(t,"parseCzechDate",{enumerable:!0,get:function(){return s.parseCzechDate}}),Object.defineProperty(t,"twoPlaces",{enumerable:!0,get:function(){return s.twoPlaces}}),Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return s.Cache}}),Object.defineProperty(t,"preloadImage",{enumerable:!0,get:function(){return s.preloadImage}}),Object.defineProperty(t,"preloadImages",{enumerable:!0,get:function(){return s.preloadImages}}),Object.defineProperty(t,"toTwoPlaces",{enumerable:!0,get:function(){return s.toTwoPlaces}}),Object.defineProperty(t,"formatEpisode",{enumerable:!0,get:function(){return s.formatEpisode}}),Object.defineProperty(t,"formatCurrency",{enumerable:!0,get:function(){return s.formatCurrency}}),Object.defineProperty(t,"normalizeText",{enumerable:!0,get:function(){return s.normalizeText}}),Object.defineProperty(t,"removeAccents",{enumerable:!0,get:function(){return s.removeAccents}}),Object.defineProperty(t,"executeAsNewEventLoopJob",{enumerable:!0,get:function(){return s.executeAsNewEventLoopJob}}),Object.defineProperty(t,"once",{enumerable:!0,get:function(){return s.once}}),Object.defineProperty(t,"onceAsync",{enumerable:!0,get:function(){return s.onceAsync}}),Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return s.isBrowser}}),Object.defineProperty(t,"isCookiesEnabled",{enumerable:!0,get:function(){return s.isCookiesEnabled}}),Object.defineProperty(t,"isIndexedDbSupported",{enumerable:!0,get:function(){return s.isIndexedDbSupported}}),Object.defineProperty(t,"random",{enumerable:!0,get:function(){return s.random}}),o(n(3854),t);var u=n(2509);Object.defineProperty(t,"firestoreArrayFilters",{enumerable:!0,get:function(){return u.firestoreArrayFilters}}),Object.defineProperty(t,"firestoreJavascriptFilters",{enumerable:!0,get:function(){return u.firestoreJavascriptFilters}}),Object.defineProperty(t,"firestoreObjectFilters",{enumerable:!0,get:function(){return u.firestoreObjectFilters}});var c=n(4045);Object.defineProperty(t,"useT",{enumerable:!0,get:function(){return c.useT}}),Object.defineProperty(t,"LanguageContextProvider",{enumerable:!0,get:function(){return c.LanguageContextProvider}}),Object.defineProperty(t,"I18nContextProvider",{enumerable:!0,get:function(){return c.I18nContextProvider}}),Object.defineProperty(t,"useLanguageOptions",{enumerable:!0,get:function(){return c.useLanguageOptions}}),Object.defineProperty(t,"LanguagePicker",{enumerable:!0,get:function(){return c.LanguagePicker}});var l=n(7723);Object.defineProperty(t,"VastProvider",{enumerable:!0,get:function(){return l.VastProvider}}),Object.defineProperty(t,"VAST_PROVIDERS",{enumerable:!0,get:function(){return l.VAST_PROVIDERS}}),o(n(6895),t),o(n(9281),t),(0,i.polyfill)()},3331:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pagination=void 0;var i=n(259),a=(0,n(6797).createLogger)("Pagination");t.Pagination=function(e,t,n){var s,u,c=this;this.query=e,this.creator=t,this.options=n,this.lastDocumentSnapshot=null,this.items=[],this.hasNextPage=!0,this.loading=!1,this.limit=10,this.fetchMore=function(){c.loading?a.info("loading ..."):c.hasNextPage?(a.info("fetch more"),c.fetchData()):a.info("no more data")},this.fetchData=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:a.info("fetch data"),n.label=1;case 1:return n.trys.push([1,3,4,5]),this.startLoading(),[4,this.makeQuery()];case 2:return e=n.sent(),a.info("fetched "+e.size+" docs, going to create entities"),this.items=this.items.concat(this.querySnapshotToEntities(e)),this.lastDocumentSnapshot=this.getLastSnapshotFromQuerySnapshot(e),[3,5];case 3:return t=n.sent(),console.error(t),[3,5];case 4:return this.stopLoading(),[7];case 5:return[2]}}))}))},this.querySnapshotToEntities=function(e){return e.docs.map((function(e){return c.creator(e.ref,e.data())}))},this.makeQuery=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){return e=this.query,(null===(t=this.options)||void 0===t?void 0:t.noLimit)?(a.info("fetch all documents without pagination"),this.hasNextPage=!1):this.lastDocumentSnapshot?(a.info("making query with limit",this.limit),e=e.limit(this.limit).startAfter(this.lastDocumentSnapshot)):(a.info("making first query with limit",this.limit),e=e.limit(this.limit)),[2,e.get()]}))}))},this.getLastSnapshotFromQuerySnapshot=function(e){var t=e.size;return c.hasNextPage=!e.empty&&e.size==c.limit,t>0?e.docs[t-1]:null},this.startLoading=function(){c.loading=!0},this.stopLoading=function(){c.loading=!1},this.addItemToEnd=function(e){c.hasNextPage?a.info("ignoring of adding an item to pagination locally because not all items are loaded"):(a.info("add item to end"),c.items=c.items.concat([e]))},this.addItemToStart=function(e){a.info("add item to start"),c.items=[e].concat(c.items)},(0,i.makeObservable)(this,{items:i.observable}),this.limit=null!==(u=null===(s=this.options)||void 0===s?void 0:s.limit)&&void 0!==u?u:this.limit,this.fetchData()}},4291:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2523),t),o(n(3331),t)},2523:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.RefsPagination=void 0;var i=n(259),a=n(6797),s=(0,a.createLogger)("RefsPagination"),u=function(){function e(e,t,n,u,c){var l=this;if(void 0===n&&(n=!0),void 0===u&&(u=10),void 0===c&&(c=!0),this.refs=e,this.creator=t,this.initialized=n,this.limit=u,this.items=[],this.currentItems=[],this.currentPage=0,this.hasNextPage=!0,this.loading=!1,this.error=null,this.fetchMore=function(){return r(l,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.isLoading?[2]:(this.currentPage++,[4,this.fetchData()]);case 1:return e.sent(),[2]}}))}))},this.fetchData=function(){return r(l,void 0,void 0,(function(){var e,t,n,i,u,c,l=this;return o(this,(function(f){switch(f.label){case 0:if(this.isLoading||!this.hasNextPage)return[2];f.label=1;case 1:return f.trys.push([1,4,5,6]),s.info("fetchData"),e=this.currentPage*this.limit,t=e+this.limit,0!==this.items.slice(e,t).length?[3,3]:(n=this.refs.slice(e,t),t>=this.refs.length&&(this.hasNextPage=!1),this.startLoading(),[4,Promise.all(n.map((function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return[4,e.get()];case 1:return t=r.sent(),(n=t.data())?[2,this.creator(e,n)]:[2,null]}}))}))})))]);case 2:return i=f.sent(),u=i.filter(a.notEmptyFilter),s.info("fetched "+u.length+" items of "+n.length+" refs"),this.endLoading(),this.setCurrentItems=u,this.setItems=this.items.concat(u),[3,3];case 3:return[3,6];case 4:return c=f.sent(),s.error(c),this.setError=c,[3,6];case 5:return this.endLoading(),[7];case 6:return[2]}}))}))},this.addItemToStart=function(e,t){l.refs=l.refs.concat([t]),l.getItems.unshift(e)},this.addItem=function(e,t){l.refs.length===l.items.length&&(l.setItems=l.items.concat([e])),l.refs=l.refs.concat([t])},this.getItem=function(e){return r(l,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return(t=this.refs.find((function(t){return t.id===e})))?[4,t.get()]:[3,2];case 1:return n=o.sent(),(r=n.data())?[2,this.creator(n.ref,r)]:[3,3];case 2:throw new Error("ref-not-found");case 3:return[2]}}))}))},this.limit>1e3)throw new Error("Limit cannot be greater than 1000");c&&this.fetchData(),(0,i.makeObservable)(this,{items:i.observable,refs:i.observable,loading:i.observable,error:i.observable,hasNextPage:i.observable})}return e.prototype.startLoading=function(){this.setLoading=!0},e.prototype.endLoading=function(){this.setLoading=!1},Object.defineProperty(e.prototype,"getError",{get:function(){return this.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getCurrentItems",{get:function(){return this.currentItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItems",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getRefs",{get:function(){return this.refs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getHasNextPage",{get:function(){return this.hasNextPage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItemsCount",{get:function(){return this.refs.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setItems",{set:function(e){this.items=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setLoading",{set:function(e){this.loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setCurrentItems",{set:function(e){this.currentItems=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setIsInitialized",{set:function(e){this.initialized=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setError",{set:function(e){this.error=e},enumerable:!1,configurable:!0}),e}();t.RefsPagination=u},1645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(){"object"==typeof window&&"object"==typeof document&&window.addEventListener("load",(function(){var e=document.createElement("script");e.src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize",e.id="tivio-polyfill-string-prototype-normalize",document.head.appendChild(e)}))}},3690:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PLATFORM=t.CUSTOMER_BUILD=void 0,function(e){e.OKTAGON="OKTAGON",e.JOJ="JOJ",e.MALL="MALL",e.GARAZ="GARAZ",e.U_KULATEHO_STOLU="U_KULATEHO_STOLU"}(n||(n={})),t.CUSTOMER_BUILD=n,function(e){e.MOBILE="MOBILE",e.WEB="WEB",e.TV="TV"}(r||(r={})),t.PLATFORM=r},9352:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8757),t),o(n(3690),t)},8757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6255:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.languages=t.Language=void 0,function(e){e.CS="cs",e.DE="de",e.EN="en",e.FR="fr",e.PL="pl",e.SK="sk",e.SP="sp"}(n=t.Language||(t.Language={})),t.languages=Object.values(n)},7245:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_PRESET_PLACEMENTS=t.AssetPresetPlacement=void 0,function(e){e.TV_CHANNEL="tvChannel",e.CHANNEL="channel",e.SECTION="section",e.VIDEO="video",e.TAG="tag"}(n=t.AssetPresetPlacement||(t.AssetPresetPlacement={})),t.ASSET_PRESET_PLACEMENTS=Object.values(n)},5761:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},543:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7245),t),o(n(5761),t),o(n(1435),t),o(n(2778),t),o(n(8496),t),o(n(5925),t),o(n(2226),t),o(n(1281),t),o(n(7371),t),o(n(800),t),o(n(2062),t),o(n(557),t),o(n(4338),t),o(n(4757),t)},1435:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2778:function(e,t){"use strict";var n,r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdProfileType=t.OnlineSkippability=t.StreamSkippability=t.MONETIZATION_FREQUENCY=void 0,(i=t.MONETIZATION_FREQUENCY||(t.MONETIZATION_FREQUENCY={})).ONE_TIME_PAYMENT="ONE_TIME_PAYMENT",i.DAILY="DAILY",i.WEEKLY="WEEKLY",i.MONTHLY="MONTHLY",i.ANNUALLY="ANNUALLY",(o=t.StreamSkippability||(t.StreamSkippability={})).SKIPPABLE="SKIPPABLE",o.NOT_SKIPPABLE="NOT_SKIPPABLE",o.AUTO_SKIP="AUTO_SKIP",(r=t.OnlineSkippability||(t.OnlineSkippability={})).SKIPPABLE="SKIPPABLE",r.NOT_SKIPPABLE="NOT_SKIPPABLE",r.VAST_BASED="VAST_BASED",(n=t.AdProfileType||(t.AdProfileType={})).ONLINE="ONLINE",n.STREAM="STREAM"},8496:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4757:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentGateway=t.PurchaseStatus=t.CURRENCIES=void 0,t.CURRENCIES=["CZK","EUR","USD"],(n=t.PurchaseStatus||(t.PurchaseStatus={})).NEW="NEW",n.PAID="PAID",n.CANCELLED="CANCELLED",n.ERROR="ERROR",(t.PaymentGateway||(t.PaymentGateway={})).QERKO="qerko"},557:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.ORDER_BY_FIELD_PATH=t.WHERE_FILTER_FIELD_PATH=t.WHERE_FILTER_OPERATOR=t.ORDER_BY_DIRECTION=t.ROW_TYPE=t.FILTER_COLLECTION=t.ROW_ITEM_COMPONENT=t.ROW_COMPONENT=void 0,function(e){e.ROW="ROW",e.BANNER="BANNER"}(n||(n={})),t.ROW_COMPONENT=n,function(e){e.ROW_ITEM_PORTRAIT="ROW_ITEM_PORTRAIT",e.ROW_ITEM_LANDSCAPE="ROW_ITEM_LANDSCAPE",e.ROW_ITEM_CIRCLED="ROW_ITEM_CIRCLED"}(r||(r={})),t.ROW_ITEM_COMPONENT=r,function(e){e.VIDEOS="videos",e.TAGS="tags"}(o||(o={})),t.ROW_TYPE=o,function(e){e.DESC="desc",e.ASC="asc"}(i||(i={})),t.ORDER_BY_DIRECTION=i,function(e){e.LESS="<",e.LESS_OR_EQUAL="<=",e.EQUAL="==",e.NOT_EQUAL="!=",e.GREATER_OR_EQUAL=">=",e.GREATER=">",e.ARRAY_CONTAINS="array-contains",e.IN="in",e.ARRAY_CONTAINS_ANY="array-contains-any",e.NOT_IN="not-in"}(a||(a={})),t.WHERE_FILTER_OPERATOR=a,function(e){e.CREATED="created",e.TAGS="tags",e.TAG_TYPE_REF="tagTypeRef"}(s||(s={})),t.WHERE_FILTER_FIELD_PATH=s,function(e){e.VIDEOS="videos",e.TAGS="tags",e.TV_CHANNELS="tvChannels"}(u||(u={})),t.FILTER_COLLECTION=u,function(e){e.CREATED="created"}(c||(c={})),t.ORDER_BY_FIELD_PATH=c},2062:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5925:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4338:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TagMetadataFieldType=t.TagSimplicityType=void 0,(r=t.TagSimplicityType||(t.TagSimplicityType={})).SIMPLE="SIMPLE",r.COMPOSED="COMPOSED",(n=t.TagMetadataFieldType||(t.TagMetadataFieldType={})).STRING="STRING",n.TRANSLATION="TRANSLATION",n.NUMBER="NUMBER",n.BOOLEAN="BOOLEAN"},2226:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TvStream=void 0,(n=t.TvStream||(t.TvStream={})).STARTOVER="startover",n.TIMESHIFT="timeshift",n.LIVE="live",n.ALL="all"},1281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7371:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.USER_TYPE=void 0,function(e){e.ORGANIZATION_USER="ORGANIZATION_USER",e.TIVIO_USER="TIVIO_USER"}(n||(n={})),t.USER_TYPE=n},800:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.NewVideoSourceCodec=t.NewVideoSourceEncrytion=t.NewVideoSourceProtocol=t.ELEMENT_TYPE=t.DATA_SOURCE=t.TRANSCODING_STATUS=t.PUBLISHED_STATUS=t.PlacementType=void 0,function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"}(n||(n={})),t.PUBLISHED_STATUS=n,function(e){e.ON_HOLD="CREATED",e.IN_PROGRESS="ENCODING",e.DONE="ENCODING_DONE",e.ERROR="ERROR"}(r||(r={})),t.TRANSCODING_STATUS=r,function(e){e.MALL_TV="MALL_TV",e.TIVIO_ADMIN="TIVIO_ADMIN",e.EPG_IMPORT="EPG_IMPORT"}(o||(o={})),t.DATA_SOURCE=o,function(e){e.PLAYLIST="PLAYLIST",e.VIDEO="VIDEO",e.TV_PROGRAM="TV_PROGRAM"}(i||(i={})),t.ELEMENT_TYPE=i,(c=t.PlacementType||(t.PlacementType={})).VIDEO="video",c.SECTION="section",c.CHANNEL="channel",c.CONDITION="condition",function(e){e.HLS="hls",e.DASH="dash",e.MP4="mp4"}(a||(a={})),t.NewVideoSourceProtocol=a,function(e){e.NONE="none",e.WIDEVINE="widevine",e.FAIRPLAY="fairplay",e.PLAYREADY="playready"}(s||(s={})),t.NewVideoSourceEncrytion=s,function(e){e.H264="h264",e.H265="h265"}(u||(u={})),t.NewVideoSourceCodec=u},9396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9786:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9363),t),o(n(2635),t),o(n(786),t),o(n(3910),t),o(n(190),t),o(n(4906),t),o(n(3948),t),o(n(7535),t),o(n(3161),t),o(n(5656),t),o(n(9614),t),o(n(9396),t),o(n(1738),t),o(n(5129),t),o(n(3959),t),o(n(7605),t)},3959:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1738:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7535:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ROW_ITEM_TYPES=void 0,(n=t.ROW_ITEM_TYPES||(t.ROW_ITEM_TYPES={})).VIDEO="VIDEO",n.TAG="TAG",n.TV_CHANNEL="TV_CHANNEL"},3161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7605:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ALGOLIA_INDEX_NAME=void 0,(n=t.ALGOLIA_INDEX_NAME||(t.ALGOLIA_INDEX_NAME={})).VIDEOS="videos",n.TAGS="tags",n.TV_CHANNELS="tvChannels"},190:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5656:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9363:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3948:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2635:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2010:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2010),t),o(n(543),t),o(n(9786),t),o(n(9352),t),o(n(6255),t)},9075:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var o=n(187),i=new(n(6222).Logger)("analytics"),a=function(){function e(){this.eventNames=null,this.gaMeasurementId=null}return e.prototype.init=function(e,t){this.gaMeasurementId=e,this.eventNames=t,(0,o.install)(e)},e.prototype.trackAnalytic=function(e,t,n){if(this.isInitialized()){var r=this.eventNames[e];r&&(i.info("Tracking analytic "+e+" under "+r,t,n),this.trackEvent(r,t,n))}else i.warn("Failed to track event, because analytics are not initialized yet",e,t)},e.prototype.isInitialized=function(){return null!=this.eventNames&&null!=this.gaMeasurementId},e.prototype.trackEvent=function(e,t,n){var i=r(r({},null!=t?t:{}),{send_to:this.gaMeasurementId});n?(0,o.gtag)("event",e,i,n):(0,o.gtag)("event",e,i)},e}();t.Analytics=a},4511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceWithoutOverwritingValues=t.chunkArray=t.notEmptyFilter=void 0,t.notEmptyFilter=function(e){return!!e},t.chunkArray=function(e,t){var n,r=e.length,o=[];for(n=0;n<r;n+=t){var i=e.slice(n,n+t);o.push(i)}return o},t.replaceWithoutOverwritingValues=function(e,t,n){var r=[];return t.forEach((function(t){var o=e.find((function(e){return n(t,e)}));r.push(null!=o?o:t)})),r}},7607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var n=function(){function e(e){var t,n;this.enabled=!0,this.map=new Map,this.max=null!==(t=null==e?void 0:e.max)&&void 0!==t?t:1e3,this.convertKey=null!==(n=null==e?void 0:e.convertKey)&&void 0!==n?n:function(e){return e}}return e.prototype.set=function(e,t){this.enabled&&(this.map.size>this.max&&this.map.clear(),this.map.set(this.convertKey(e),t))},e.prototype.get=function(e){var t;return null!==(t=this.map.get(this.convertKey(e)))&&void 0!==t?t:null},e.prototype.has=function(e){return!!this.enabled&&this.map.has(this.convertKey(e))},e.prototype.getSize=function(){return this.map.size},e.prototype.disable=function(){this.enabled=!1},e}();t.Cache=n},3489:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.onceAsync=t.once=void 0,t.once=function(e){var t=!1;return function(){t||(e(),t=!0)}},t.onceAsync=function(e){var t=!1;return function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return t?[3,2]:(t=!0,[4,e()]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}}},7500:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.stringComparator=t.booleanComparator=t.numberComparator=t.SortDirection=void 0,function(e){e.ASC="ASC",e.DESC="DESC"}(n=t.SortDirection||(t.SortDirection={})),t.numberComparator=function(e,t,r){return r===n.ASC?e-t:t-e},t.booleanComparator=function(e,t){return e&&t?0:e&&!t?-1:!e&&t?1:0},t.stringComparator=function(e,t){return e<t?-1:1}},3854:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7500),t),o(n(9153),t),o(n(9924),t)},9153:function(e,t,n){"use strict";var r,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.strategiesComparator=t.expirationComparator=t.placementTypeComparator=t.PLACEMENT_TYPE_PRIORITIES=void 0;var i=n(7500),a=n(6895),s=o(n(6160));t.PLACEMENT_TYPE_PRIORITIES=((r={})[a.PlacementType.VIDEO]=3,r[a.PlacementType.CONDITION]=2,r[a.PlacementType.SECTION]=1,r[a.PlacementType.CHANNEL]=0,r),t.placementTypeComparator=function(e,n,r){return void 0===r&&(r=i.SortDirection.DESC),(0,i.numberComparator)(t.PLACEMENT_TYPE_PRIORITIES[e.placementType],t.PLACEMENT_TYPE_PRIORITIES[n.placementType],r)},t.expirationComparator=function(e,t,n){var r,o;return void 0===n&&(n=i.SortDirection.ASC),(0,i.numberComparator)(null!==(r=e.expirationDaysSincePublished)&&void 0!==r?r:Number.MAX_VALUE,null!==(o=t.expirationDaysSincePublished)&&void 0!==o?o:Number.MAX_VALUE,n)},t.strategiesComparator=function(e,t){return(0,i.numberComparator)((0,s.default)(e.strategies)?0:1,(0,s.default)(t.strategies)?0:1,i.SortDirection.ASC)}},9924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalsFirstRestAlphabeticallyComparator=t.alphabeticComparator=t.sortAlphabetically=void 0;var r=n(7500);t.sortAlphabetically=function(e){return e.sort((function(e,t){return(0,r.stringComparator)(e.name,t.name)}))},t.alphabeticComparator=function(e,t){return(0,r.stringComparator)(e.name,t.name)},t.globalsFirstRestAlphabeticallyComparator=function(e,t){var n,o;return(0,r.booleanComparator)(null!==(n=e.isGlobal)&&void 0!==n&&n,null!==(o=t.isGlobal)&&void 0!==o&&o)||(0,r.stringComparator)(e.name,t.name)}},3918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=void 0,t.isBrowser=function(){return"object"==typeof window&&"object"==typeof document},t.isCookiesEnabled=function(){if(!(0,t.isBrowser)()||"string"!=typeof document.cookie)return!1;document.cookie="tiviocookietest=1";var e=-1!=document.cookie.indexOf("tiviocookietest=");return document.cookie="tiviocookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},t.isIndexedDbSupported=function(){return window&&null!=window.indexedDB&&null!=window.IDBCursor&&null!=window.IDBCursorWithValue&&null!=window.IDBDatabase&&null!=window.IDBFactory&&null!=window.IDBIndex&&null!=window.IDBKeyRange&&null!=window.IDBObjectStore&&null!=window.IDBOpenDBRequest&&null!=window.IDBRequest&&null!=window.IDBTransaction&&null!=window.IDBVersionChangeEvent}},711:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeAsNewEventLoopJob=void 0,t.executeAsNewEventLoopJob=function(e){setTimeout(e)}},8399:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatCurrency=t.formatEpisode=t.toTwoPlaces=void 0,t.toTwoPlaces=function(e){return e<10?"0"+e:""+e},t.formatEpisode=function(e,n){return"S"+(0,t.toTwoPlaces)(e)+"E"+(0,t.toTwoPlaces)(n)},t.formatCurrency=function(e){switch(e){case"CZK":return"Kč";case"EUR":return"€";case"USD":return"$"}}},3434:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preloadImages=t.preloadImage=void 0,t.preloadImage=function(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=t,r.onerror=function(){n("image failed to load (uri:"+e+")")}}))},t.preloadImages=function(e){return Promise.all(e.map(t.preloadImage))}},6797:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4511),t),o(n(9075),t),o(n(6222),t),o(n(8029),t),o(n(7607),t),o(n(3854),t),o(n(6845),t),o(n(3434),t),o(n(8399),t),o(n(2729),t),o(n(711),t),o(n(3489),t),o(n(3918),t),o(n(6971),t)},6222:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=void 0;var r=function(){function e(e){this.name=e,this.isEnabled=!0}return e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["error"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["info"],e,!1))},e.prototype.off=function(){this.isEnabled=!1},e.prototype.on=function(){this.isEnabled=!0},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["warn"],e,!1))},e.prototype.forceInfo=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];console.info.apply(console,n([e.prefix+":"+this.name],t,!1))},e.prototype.log=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e.enabled&&this.isEnabled&&console[t].apply(console,n([e.prefix+":"+this.name],r,!1))},e.enabled=!0,e.prefix="tivio",e}();t.Logger=r,t.createLogger=function(e){return new r(e)}},6971:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.random=void 0,t.random=function(e){return Math.round(Math.random()*e)}},6845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryByFilter=t.getQueryByWhereFilters=void 0;var n=function(e,t){return e.reduce((function(e,t){return Array.isArray(t.value)&&0===t.value.length?e:e.where(t.fieldPath,t.opStr,t.value)}),t)};t.getQueryByWhereFilters=n,t.getQueryByFilter=function(e,t){return n(e.where,t).orderBy(e.orderBy.fieldPath,e.orderBy.directionStr)}},2729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeText=t.toKebabCase=t.toSnakeCase=t.removeAccents=void 0,t.removeAccents=function(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")},t.toSnakeCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"_")},t.toKebabCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"-")},t.normalizeText=function(e,n){void 0===n&&(n="snake-case");var r=(0,t.removeAccents)(e);return"snake-case"===n?(0,t.toSnakeCase)(r):(0,t.toKebabCase)(r)}},8029:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeTime=t.getDuration=t.getMinsSecsHours=t.getMinsSecs=t.twoPlaces=t.getHours=t.getMins=t.getSecs=t.parseCzechDate=t.isInThePast=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=void 0;var a=i(n(2096));function s(e,t){return u(e,60*t)}function u(e,t){return l(e,60*t)}function c(e,t){return new Date(e.getTime()+t)}function l(e,t){return c(e,1e3*t)}function f(e,t){var n=null!=e?Math.floor(e/1e3):0;return t?n%60:n}function d(e,t){var n=null!=e?Math.floor(f(e)/60):0;return t?n%60:n}function p(e,t){var n=null!=e?Math.floor(d(e)/60):0;return t?n%24:n}function h(e){return e>=10?e:"0"+e}t.addDays=function(e,t){return s(e,24*t)},t.addHours=s,t.addMinutes=u,t.addMs=c,t.addSeconds=l,t.isInThePast=function(e){return e<new Date},t.parseCzechDate=function(e){var t=a.parse("dd.MM.yyyy hh:mm",e),n=1e3*t.getSeconds()+t.getMilliseconds();return new Date(t.getTime()-n)},t.getSecs=f,t.getMins=d,t.getHours=p,t.twoPlaces=h,t.getMinsSecs=function(e){if(e<0)return{mins:0,secs:0,text:"",textWordy:""};var t=d(e),n=f(e,!0),r="";return n&&(r=n+" s"),t&&(r=t+" min"+(r.length>0?" "+r:"")),{mins:t,secs:n,text:t+":"+h(n),textWordy:r}},t.getMinsSecsHours=function(e){var t=p(e),n=d(e,!0),r=f(e,!0),o=n+":"+h(r);return t>0&&(4===o.length&&(o="0"+o),o=t+":"+o),{hours:t,mins:n,secs:r,text:o}},t.getDuration=function(e){return null==e||e<0?null:Math.round(e/60)+" MIN"},t.getRelativeTime=function(e){if(null==e)return"";var t=((new Date).getTime()-e.getTime())/36e5,n=Math.floor(t);if(n<1)return"";if(n<24)return n+" HOURS AGO";var r=t/24,o=Math.floor(r);if(o<7)return o+" DAYS AGO";var i=r/7,a=Math.floor(i);if(a<5)return a+" WEEKS AGO";var s=r/30,u=Math.floor(s);if(u<12)return u+" MONTHS AGO";var c=r/365;return Math.ceil(c)+" YEARS AGO"}},259:function(e){"use strict";e.exports=r},8156:function(e){"use strict";e.exports=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(1920)}())},320:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},426:function(e,t,n){"use strict";var r=n(320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var m=b.prototype=new v;m.constructor=b,r(m,y.prototype),m.isPureReactComponent=!0;var O={current:null},_=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!P.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:O.current}}function w(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var E=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+j(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),T(a,t,n,"",(function(e){return e}))):null!=a&&(w(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+j(s=e[c],c);u+=T(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=T(s=s.value,t,n,l=r+j(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function x(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function k(){var e=A.current;if(null===e)throw Error(p(321));return e}var C={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:x,forEach:function(e,t,n){x(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!w(e))throw Error(p(143));return e}},t.Component=y,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=O.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)_.call(t,l)&&!P.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=w,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return k().useCallback(e,t)},t.useContext=function(e,t){return k().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return k().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return k().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return k().useLayoutEffect(e,t)},t.useMemo=function(e,t){return k().useMemo(e,t)},t.useReducer=function(e,t,n){return k().useReducer(e,t,n)},t.useRef=function(e){return k().useRef(e)},t.useState=function(e){return k().useState(e)},t.version="17.0.2"},784:function(e,t,n){"use strict";e.exports=n(426)},992:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapperEventType=void 0,function(e){e.adMetadata="adMetadata"}(n||(n={})),t.PlayerWrapperEventType=n},958:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createInternalConf=t.defaultConf=void 0;var o=n(782),i=n(373);t.defaultConf={resolverUrl:"https://tivio-resolver-production.tiv.io/serveBundle/resolver2.js",fetchPackage:i.fetchPackage},t.createInternalConf=function(e){var n,i=null===(n=e.enableSentry)||void 0===n||n;return r(r(r({},t.defaultConf),e),{logger:void 0!==e.logger?e.logger:(0,o.createLogger)({isConsoleEnabled:!0,isSentryEnabled:i}),sdkVersion:"2.0.0-alpha3"})}},920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),n(168),o(n(643),t),o(n(173),t),o(n(992),t)},643:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTivio=t.createRemotePackageLoader=t.fetchBundleViaResolver=void 0;var i=n(194),a=n(958),s=n(229),u=n(614),c=new i.Logger("bundleLoader");t.fetchBundleViaResolver=function(e){return r(void 0,void 0,void 0,(function(){var t,n;return o(this,(function(r){return t=e.resolverUrl,n=e.fetchPackage,c.info("Fetching bundle via resolver"),[2,n(t).then((function(t){var n,r={},o={exports:r};try{new Function("require","module","exports",t)(s.resolveShared,o,r)}catch(e){throw new Error("Cannot load Tivio Resolver "+e)}if("function"!=typeof(null===(n=o.exports.tivio)||void 0===n?void 0:n.fetch))throw new Error("Invalid Tivio Resolver export");return o.exports.tivio.fetch(e.secret,e.sdkVersion)}))]}))}))},t.createRemotePackageLoader=function(){return function(e){return function(e){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(a){switch(a.label){case 0:return n="",(0,i.isIndexedDbSupported)(),[4,(s=e.secret,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle via cloudfn, because indexedDB is not supported"),[4,fetch("https://europe-west3-tivio-production.cloudfunctions.net/getRemoteBundle",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:s})})];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),[2,(n=e.bundleUrl,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle by url",n),[4,fetch(n)];case 1:if(!((r=(e=t.sent()).status)>=200&&r<=400))throw new Error("Failed to fetch bundleUrlOverride "+n+", HTTP error status code: "+e.status);return[4,e.text()];case 2:return[2,t.sent()]}var r}))})))]}var n}))})))];case 1:return n=a.sent(),[3,4];case 2:return[4,(0,t.fetchBundleViaResolver)(e)];case 3:n=a.sent(),a.label=4;case 4:return[2,n]}var s}))}))}(e).then((function(e){var t={},n={exports:t};try{new Function("require","module","exports",e)(s.resolveShared,n,t)}catch(e){throw new Error("Cannot load module "+e)}if("object"!=typeof n.exports.Tivio)throw new Error('Tivio package does not export "Tivio" namespace');if("function"!=typeof n.exports.Tivio.setUser)throw new Error('Tivio namespace does not export "setUser" member');if("function"!=typeof n.exports.Tivio.init)throw new Error('Tivio namespace does not export "init" member');return n.exports.Tivio}))}},t.createTivio=function(){var e=(0,t.createRemotePackageLoader)(),n=!1;return function(t){return r(void 0,void 0,void 0,(function(){var i,s;return o(this,(function(c){return i=(0,a.createInternalConf)(t),s=(0,u.createSettings)(i),[2,e(i).then((function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return n?[3,2]:[4,e.init(i)];case 1:t.sent(),n=!0,t.label=2;case 2:return s.onSetUser(e.setUser),[2,{state:"ready",error:null,settings:s,conf:i,AdSource:e.AdSource,ChannelSource:e.ChannelSource,VodTivioSource:e.VodTivioSource,getChannelById:e.getChannelById,getPlayer:e.getPlayer,getSectionById:e.getSectionById,getVideoById:e.getVideoById,getWidgetById:e.getWidgetById,setLanguage:e.setLanguage,setUser:e.setUser,subscribeToWidget:e.subscribeToWidget,subscribeToChannel:e.subscribeToChannel,subscribeToSection:e.subscribeToSection,subscribeToVideo:e.subscribeToVideo,subscribeToVideosInSection:e.subscribeToVideosInSection,subscribeToSectionsInChannel:e.subscribeToSectionsInChannel,subscribeToChannelsInWidget:e.subscribeToChannelsInWidget,subscribeToScreen:e.subscribeToScreen,subscribeToItemsInRow:e.subscribeToItemsInRow,createUserWithEmailAndPassword:e.createUserWithEmailAndPassword,signInWithEmailAndPassword:e.signInWithEmailAndPassword,createPlayerWrapper:e.createPlayerWrapper}]}}))}))})).catch((function(e){var t;return null===(t=i.logger)||void 0===t||t.exception(e),{state:"error",error:""+e,conf:i,settings:s}}))]}))}))}}},229:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveShared=void 0;var s=a(n(937));n(703),n(462);var u=i(n(259)),c=i(n(970)),l={mobx:u,firebase:s.default,"firebase/app":s.default,"firebase/auth":null,"firebase/firestore":null,timers:c};t.resolveShared=function(e){if(!(e in l))throw new Error("Could not resolve shared dependency "+e);return l[e]}},782:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=void 0;var a=i(n(356));t.createLogger=function(e){var t=!1!==e.isSentryEnabled&&!0;t&&(a.init({dsn:"https://f318b29129f84c459ea756907bc1a2e6@o507550.ingest.sentry.io/5600272",release:"@tivio/sdk-js@2.0.0-alpha3",tracesSampleRate:1}),window.sentry=a),console.info("Sentry "+(t?"on":"off"));var n=function(n,r){e.isConsoleEnabled&&console[n]("Tivio sdk-js "+r.join(" ")),t&&a.captureMessage(""+r,a.Severity.fromString(n))};return{error:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("error",e)},info:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("info",e)},warn:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("warn",e)},debug:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("debug",e)},exception:function(n){e.isConsoleEnabled&&console.error(n),t&&a.captureException(n)}}}},373:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPackage=void 0;var o={cache:"no-store"},i=function(e){var t=e.headers.get("content-type");return 200!==e.status?Promise.reject('Incorrect status "'+e.status+'" was obtained while fetching the module.'):t&&(t.includes("application/javascript")||t.includes("text/javascript"))?e.text():Promise.reject('Incorrect content "'+t+'" was obtained while fetching the module.')},a=function(e){return Promise.reject("Network failure: "+e)};t.fetchPackage=function(e){return n(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,fetch(e,o).then(i).catch(a)]}))}))}},614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSettings=void 0,t.createSettings=function(e){var t=null,n=null;return{onSetUser:function(r){var o;"function"!=typeof r?null===(o=e.logger)||void 0===o||o.exception("Tivio Bundle setUser handler must be a function"):(t=r,null!==n&&r(n.userId,n.userPayload))},setUser:function(e,r){"function"==typeof t?(n=null,t(e,r)):n={userId:e,userPayload:r}}}}},173:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},168:function(e,t,n){"use strict";n.r(t),n.d(t,{Headers:function(){return h},Request:function(){return _},Response:function(){return S},DOMException:function(){return E},fetch:function(){return j}});var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,o="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,u="ArrayBuffer"in r;if(u)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(v)}),this.text=function(){var e,t,n,r=g(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=y(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(P)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=f(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[f(e)]},h.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},h.prototype.set=function(e,t){this.map[f(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,o=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),O.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function P(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},m.call(_.prototype),m.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];S.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})};var E=r.DOMException;try{new E}catch(e){(E=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function j(e,t){return new Promise((function(n,o){var i=new _(e,t);if(i.signal&&i.signal.aborted)return o(new E("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;setTimeout((function(){n(new S(o,r))}),0)},s.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){o(new E("Aborted","AbortError"))}),0)},s.open(i.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&(a?s.responseType="blob":u&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof h?i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){s.setRequestHeader(e,d(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}j.polyfill=!0,r.fetch||(r.fetch=j,r.Headers=h,r.Request=_,r.Response=S)},356:function(e){"use strict";e.exports=t},937:function(e){"use strict";e.exports=n},703:function(e){"use strict";e.exports=r},462:function(e){"use strict";e.exports=o},259:function(t){"use strict";t.exports=e},970:function(){}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,s),n.exports}return s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s(920)}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mobx"),require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore")):"function"==typeof define&&define.amd?define("@tivio/sdk-js",["mobx","@sentry/browser","firebase/app","firebase/auth","firebase/firestore"],t):"object"==typeof exports?exports["@tivio/sdk-js"]=t(require("mobx"),require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore")):e["@tivio/sdk-js"]=t(e.mobx,e["@sentry/browser"],e["firebase/app"],e["firebase/auth"],e["firebase/firestore"])}(this,(function(e,t,n,r,o){return function(){var i={194:function(e,t,n){var r,o;e.exports=(r=n(259),o=n(784),function(){var e={2096:function(e){"use strict";function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function r(r,o){"string"!=typeof r&&(o=r,r=e.exports.ISO8601_FORMAT),o||(o=e.exports.now());var i,a,s,u,c=n(o.getDate()),l=n(o.getMonth()+1),f=n(o.getFullYear()),p=n(f.substring(2,4)),d=r.indexOf("yyyy")>-1?f:p,h=n(o.getHours()),g=n(o.getMinutes()),y=n(o.getSeconds()),v=t(o.getMilliseconds(),3),b=(i=o.getTimezoneOffset(),a=Math.abs(i),s=String(Math.floor(a/60)),u=String(a%60),1===s.length&&(s="0"+s),1===u.length&&(u="0"+u),i<0?"+"+s+u:"-"+s+u);return r.replace(/dd/g,c).replace(/MM/g,l).replace(/y{1,4}/g,d).replace(/hh/g,h).replace(/mm/g,g).replace(/ss/g,y).replace(/SSS/g,v).replace(/O/g,b)}function o(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var i=t.indexOf("O")<0,a=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){o(e,"FullYear",t,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Month",t-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Date",t,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Hours",t,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){o(e,"Minutes",t,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){o(e,"Seconds",t,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){o(e,"Milliseconds",t,i)}},{pattern:/O/,regexp:"[+-]\\d{3,4}|Z",fn:function(e,t){"Z"===t&&(t=0);var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],s=a.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),u=a.filter((function(e){return e.index>-1}));u.sort((function(e,t){return e.index-t.index}));var c=new RegExp(s.regexp).exec(n);if(c){var l=r||e.exports.now();return u.forEach((function(e,t){e.fn(l,c[t+1])})),l}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"},187:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.gtag=t.install=void 0,t.install=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="ga-gtag";if(!document.getElementById(r)){var o=document.head,i=document.createElement("script");i.id=r,i.type="text/javascript",i.async=!0,i.src="https://www.googletagmanager.com/gtag/js?id=".concat(e),o.insertBefore(i,o.firstChild),window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",e,t)}};var n=function(){window.dataLayer.push(arguments)};t.gtag=n;var r=n;t.default=r},421:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}n.r(t),n.d(t,{default:function(){return K}});var h={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},g=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||h,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),y=new g,v=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function m(e){return null==e?"":""+e}function O(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function P(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function _(e,t,n){var r=P(e,t,Object);r.obj[r.k]=n}function w(e,t){var n=P(e,t),r=n.obj,o=n.k;if(r)return r[o]}function S(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function E(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):E(e[r],t[r],n):e[r]=t[r]);return e}function T(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function x(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return j[e]})):e}var L="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),L&&v.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return d(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),w(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),_(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=w(this.data,s)||{};r?E(u,n,o):u=i({},u,n),_(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(v),k={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},I={},C=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),L&&v.call(c(n)),O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=y.create("translator"),n}return d(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],p=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var h=n.nsSeparator||this.options.nsSeparator;return f+h+c}return c}var g=this.resolve(e,n),y=g&&g.res,v=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,m=Object.prototype.toString.apply(y),O=["[object Number]","[object Function]","[object RegExp]"],P=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&O.indexOf(m)<0&&("string"!=typeof P||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var w="[object Array]"===m,S=w?[]:{},E=w?b:v;for(var T in y)if(Object.prototype.hasOwnProperty.call(y,T)){var j="".concat(E).concat(s).concat(T);S[T]=this.translate(j,i({},n,{joinArrays:!1,ns:l})),S[T]===j&&(S[T]=y[T])}y=S}}else if(_&&"string"==typeof P&&"[object Array]"===m)(y=y.join(P))&&(y=this.extendTranslation(y,e,n,o));else{var x=!1,L=!1,A=void 0!==n.count&&"string"!=typeof n.count,k=t.hasDefaultValue(n),I=A?this.pluralResolver.getSuffix(p,n.count):"",C=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(y)&&k&&(x=!0,y=C),this.isValidLookup(y)||(L=!0,y=c);var R=k&&C!==y&&this.options.updateMissing;if(L||x||R){if(this.logger.log(R?"updateKey":"missingKey",p,f,c,R?C:y),s){var M=this.resolve(c,i({},n,{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var B=0;B<D.length;B++)N.push(D[B]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);var F=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,R?r:y,R,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,R?r:y,R,n),a.emit("missingKey",e,f,t,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?N.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){F([e],c+t,n["defaultValue".concat(t)]||C)}))})):F(N,c,C))}y=this.extendTranslation(y,e,n,g,o),L&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(c)),L&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(y))}return y}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,d="string"==typeof p?[p]:p;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=k.handle(d,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!I["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(I["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&d.push(l+=i));u=d.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(v);function R(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=y.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=R(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],D={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function B(){var e={};return N.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:D[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=y.create("pluralResolver"),this.rules=B()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=y.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:x,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?T(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?T(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?T(t.nestingPrefix):t.nestingPrefixEscaped||T("$t("),this.nestingSuffix=t.nestingSuffix?T(t.nestingSuffix):t.nestingSuffixEscaped||T(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=S(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(S(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=m(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i({},a);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,s)).replace(/'/g,'"');try{s=JSON.parse(o),t&&(s=i({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(u.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=m(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return o.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),W=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),L&&v.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=y.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return d(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=P(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(v);function V(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function H(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function z(){}var G=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),L&&v.call(c(e)),e.options=H(n),e.services={},e.logger=y,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return d(t,e),u(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},V(),this.options,H(t)),this.format=this.options.interpolation.format,n||(n=z),!this.options.isClone){this.modules.logger?y.init(r(this.modules.logger),this.options):y.init(null,this.options);var o=new M(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=y,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new U(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new W(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new C(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=b(),c=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=z),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&k.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new C(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(v),K=new G},6160:function(e,t,n){e=n.nmd(e);var r,o,i,a="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",l="[object DataView]",f=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=p||d||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,v=y&&y.exports===g,b=Function.prototype,m=Object.prototype,O=h["__core-js_shared__"],P=(r=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=b.toString,w=m.hasOwnProperty,S=m.toString,E=RegExp("^"+_.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=v?h.Buffer:void 0,j=m.propertyIsEnumerable,x=T?T.isBuffer:void 0,L=(o=Object.keys,i=Object,function(e){return o(i(e))}),A=W(h,"DataView"),k=W(h,"Map"),I=W(h,"Promise"),C=W(h,"Set"),R=W(h,"WeakMap"),M=!j.call({valueOf:1},"valueOf"),N=H(A),D=H(k),B=H(I),F=H(C),U=H(R);function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!Y(e)||function(e){return!!P&&P in e}(e))return!1;var t=q(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?E:f;return t.test(H(e))}(n)?n:void 0}var V=function(e){return S.call(e)};function H(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(A&&V(new A(new ArrayBuffer(1)))!=l||k&&V(new k)!=a||I&&V(I.resolve())!=s||C&&V(new C)!=u||R&&V(new R)!=c)&&(V=function(e){var t=S.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?H(n):void 0;if(r)switch(r){case N:return l;case D:return a;case B:return s;case F:return u;case U:return c}return t});var z=Array.isArray;function G(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!q(e)}var K=x||function(){return!1};function q(e){var t=Y(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(G(e)&&(z(e)||"string"==typeof e||"function"==typeof e.splice||K(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&G(e)}(e)&&w.call(e,"callee")&&(!j.call(e,"callee")||"[object Arguments]"==S.call(e))}(e)))return!e.length;var t=V(e);if(t==a||t==u)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||m)}(e))return!L(e).length;for(var n in e)if(w.call(e,n))return!1;return!0}},3099:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentManagementHeaderScriptDebug=t.ConsentManagementHeaderScript=t.appendCmpScriptToHeadOnce=t.ConsentManagementHelmet=t.ConsentSettings=void 0;var u=a(n(8156)),c=new(n(6797).Logger)("ConsentSettings"),l="tivio-cmp-script",f="//assets.adobedtm.com/e949270ea86e/06f76135b050/launch-facbe9b48c75.min.js",p=l,d="//cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",h=l,g="UTF-8",y="text/javascript";t.ConsentSettings=function(e){var n=e.as,o=s(e,["as"]),i=(0,u.useRef)(null);return u.default.createElement(u.default.Fragment,null,u.default.createElement(t.ConsentManagementHelmet,null),u.default.createElement("button",{id:"ot-sdk-btn",className:"ot-sdk-show-settings",ref:i,style:{display:"none"}}),u.default.createElement(n,r({onClick:function(){var e;return null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.click()}},o)))},t.ConsentManagementHelmet=function(){return(0,t.appendCmpScriptToHeadOnce)(),null},t.appendCmpScriptToHeadOnce=function(){if(!document.getElementById(l)){var e="localhost"===window.location.hostname;c.info("Injecting "+(e&&"DEBUG")+" CMP script to <head/>..."),e?b():v()}};var v=function(){var e=document.createElement("script");e.id=p,e.src=f,e.async=!0,document.head.appendChild(e)},b=function(){var e=document.createElement("script");e.id=h,e.src=d,e.type=y,e.charset=g,e.dataset.domainScript="a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",e.async=!0;var t=document.createElement("script");t.id="tivio-cmp-script-2",t.type="text/javascript",t.text="function OptanonWrapper() { }",document.head.appendChild(e),document.head.appendChild(t)};t.ConsentManagementHeaderScript=function(){return u.default.createElement("script",{id:p,src:f,async:!0})},t.ConsentManagementHeaderScriptDebug=function(){return u.default.createElement(u.default.Fragment,null,u.default.createElement("script",{id:h,src:d,type:y,charSet:g,"data-domain-script":"a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",async:!0}),u.default.createElement("script",{type:"text/javascript"},"function OptanonWrapper() "))}},9281:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3099),t)},7723:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3902),t)},3902:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=void 0,function(e){e.ETARGET_PREBID="etarget-prebid",e.MALL_TV_PREBID="malltv-prebid",e.IMPRESSION_MEDIA_PREBID="impressionMedia-prebid",e.MALL_TV="malltv",e.FALLBACK_MP4="fallback",e.FALLBACK_HLS="fallback-hls",e.JOJ="joj",e.PRIMA="prima"}(n=t.VastProvider||(t.VastProvider={})),t.VAST_PROVIDERS=[{id:n.ETARGET_PREBID,name:"Etarget Prebid"},{id:n.MALL_TV_PREBID,name:"MALL.TV Prebid"},{id:n.IMPRESSION_MEDIA_PREBID,name:"Impression Media Prebid"},{id:n.MALL_TV,name:"MALL.TV"},{id:n.JOJ,name:"JOJ"},{id:n.PRIMA,name:"Prima"},{id:n.FALLBACK_MP4,name:"Fallback (MP4)",development:!0},{id:n.FALLBACK_HLS,name:"Fallback (HLS)",development:!0}]},2509:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2951),t)},2951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.firestoreObjectFilters=void 0;var r=n(543);t.firestoreObjectFilters={isTranscoded:{field:"transcodingStatus",operator:"==",value:r.TRANSCODING_STATUS.DONE},isPublished:{field:"publishedStatus",operator:"==",value:r.PUBLISHED_STATUS.PUBLISHED}},t.firestoreArrayFilters={isTranscoded:Object.values(t.firestoreObjectFilters.isTranscoded),isPublished:Object.values(t.firestoreObjectFilters.isPublished)},t.firestoreJavascriptFilters={isTranscoded:function(e){return e===r.TRANSCODING_STATUS.DONE},isPublished:function(e){return e===r.PUBLISHED_STATUS.PUBLISHED}}},7515:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6557),t),o(n(1321),t),o(n(3370),t)},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImageLoader=void 0;var r=n(8156);t.useImageLoader=function(e,t){var n=(0,r.useState)(e),o=n[0],i=n[1],a=(0,r.useState)(!1),s=a[0],u=a[1];return(0,r.useEffect)((function(){if(t){var e=new Image;e.src=t,e.onload=function(){i(t),u(!0)}}}),[t]),{loadedImageSrc:o,imageIsLoaded:s}}},6557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoading=void 0;var r=n(8156);t.useLoading=function(e){void 0===e&&(e=!1);var t=(0,r.useState)(e),n=t[0],o=t[1],i=(0,r.useRef)(n),a=function(e){o(e),i.current=e};return{loading:n,startLoading:function(){i.current||a(!0)},stopLoading:function(){i.current&&a(!1)}}}},3370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOnChange=t.usePrevious=void 0;var r=n(8156);function o(e){var t,n=(0,r.useState)([]),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(o.concat(e).slice(-2))}),[e]),null!==(t=o[o.length-2])&&void 0!==t?t:null}t.usePrevious=o,t.useOnChange=function(e,t){var n=o(e);n!==e&&t(n,e)}},3895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagePicker=void 0;var a=i(n(8156)),s=n(6915);t.LanguagePicker=function(){var e=(0,s.useLanguageOptions)(),t=e.language,n=e.languages,r=e.selectLanguage,o=(0,a.useCallback)((function(e){r(e.target.value)}),[r]);return a.default.createElement("select",{name:"tivio-language-select","data-e2e":"tivio-language-select",value:t,onChange:o},n.map((function(e){return a.default.createElement("option",{key:e,value:e},e)})))}},6915:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useLanguage=t.useLanguageOptions=t.useT=t.useI18n=void 0;var o=n(8156),i=n(6255),a=n(6009),s=n(5318);t.useI18n=function(){return(0,o.useContext)(a.I18nContext).i18n},t.useT=function(){var e=(0,t.useI18n)();return e?e.t.bind(e):function(e){return e}},t.useLanguageOptions=function(){var e=(0,o.useContext)(s.LanguageContext);return r(r({},e),{languages:i.languages})},t.useLanguage=function(){return(0,o.useContext)(s.LanguageContext).language}},6009:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nContextProvider=t.I18nContext=void 0;var s=a(n(421)),u=i(n(8156)),c=n(6797),l=n(5318),f=new c.Logger("language");t.I18nContext=(0,u.createContext)({i18n:null}),t.I18nContextProvider=function(e){var n=e.children,r=e.translations,o=(0,u.useState)({i18n:null}),i=o[0],a=o[1],c=(0,u.useContext)(l.LanguageContext).language;return(0,u.useLayoutEffect)((function(){f.info("initializing language",c),function(e,t){return new Promise((function(n,r){n(s.default.createInstance({lng:t,resources:e},(function(e){e&&r(e)})))}))}(r,c).then((function(e){a({i18n:e})}))}),[]),(0,u.useLayoutEffect)((function(){i.i18n&&(f.info("changing language",c),i.i18n.changeLanguage(c),a({i18n:i.i18n}))}),[c]),u.default.createElement(t.I18nContext.Provider,{value:i},n)}},4045:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6915),t),o(n(6009),t),o(n(5318),t),o(n(8133),t),o(n(3895),t)},5318:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageContextProvider=t.LanguageContext=void 0;var a=i(n(8156)),s=n(6255),u=n(6797),c=n(8683),l=new u.Logger("language");t.LanguageContext=(0,a.createContext)({language:s.Language.EN,selectLanguage:function(){}}),t.LanguageContextProvider=function(e){var n=e.language,r=e.children,o=(0,a.useState)((0,c.normalizeLanguage)(n)),i=o[0],s=o[1];(0,a.useLayoutEffect)((function(){var e=(0,c.normalizeLanguage)(n);s(e),l.info("Setting language (passed as prop): "+e+" (before normalization: "+n+")")}),[n]);var u=(0,a.useCallback)((function(e){l.info("Setting language: "+e),s(e)}),[]);return a.default.createElement(t.LanguageContext.Provider,{value:{language:i,selectLanguage:u}},r)}},8133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8683:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLanguage=void 0;var r=n(6255),o=new(n(6797).Logger)("i18n");t.normalizeLanguage=function(e){if(null==e)return r.Language.EN;var t=e.toLocaleLowerCase();return"cs"===t||"cz"===t||"cze"===t||"ces"===t?r.Language.CS:"sk"===t||"slk"===t||"slo"===t?r.Language.SK:("en"===t||"eng"===t||o.warn("Unrecognized language (input: "+e+"). Falling back to ENG"),r.Language.EN)}},1920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.firestoreObjectFilters=t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.random=t.isMobileBrowser=t.isTizen=t.isWebos=t.isArris=t.isSmartTv=t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=t.onceAsync=t.once=t.executeAsNewEventLoopJob=t.toKebabCase=t.toSnakeCase=t.removeAccents=t.normalizeText=t.formatCurrency=t.formatEpisode=t.toTwoPlaces=t.preloadImages=t.preloadImage=t.Cache=t.twoPlaces=t.parseCzechDate=t.getQueryByWhereFilters=t.getQueryByFilter=t.isInThePast=t.getSecs=t.getRelativeTime=t.getMinsSecsHours=t.getMinsSecs=t.getMins=t.getHours=t.getDuration=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=t.Analytics=t.createLogger=t.Logger=t.replaceWithoutOverwritingValues=t.notEmptyFilter=t.chunkArray=t.Pagination=t.RefsPagination=void 0,t.VAST_PROVIDERS=t.VastProvider=t.LanguagePicker=t.useLanguageOptions=t.I18nContextProvider=t.LanguageContextProvider=t.useT=void 0;var i=n(1645),a=n(4291);Object.defineProperty(t,"RefsPagination",{enumerable:!0,get:function(){return a.RefsPagination}}),Object.defineProperty(t,"Pagination",{enumerable:!0,get:function(){return a.Pagination}}),o(n(7515),t);var s=n(6797);Object.defineProperty(t,"chunkArray",{enumerable:!0,get:function(){return s.chunkArray}}),Object.defineProperty(t,"notEmptyFilter",{enumerable:!0,get:function(){return s.notEmptyFilter}}),Object.defineProperty(t,"replaceWithoutOverwritingValues",{enumerable:!0,get:function(){return s.replaceWithoutOverwritingValues}}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.Logger}}),Object.defineProperty(t,"createLogger",{enumerable:!0,get:function(){return s.createLogger}}),Object.defineProperty(t,"Analytics",{enumerable:!0,get:function(){return s.Analytics}}),Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return s.addDays}}),Object.defineProperty(t,"addHours",{enumerable:!0,get:function(){return s.addHours}}),Object.defineProperty(t,"addMinutes",{enumerable:!0,get:function(){return s.addMinutes}}),Object.defineProperty(t,"addMs",{enumerable:!0,get:function(){return s.addMs}}),Object.defineProperty(t,"addSeconds",{enumerable:!0,get:function(){return s.addSeconds}}),Object.defineProperty(t,"getDuration",{enumerable:!0,get:function(){return s.getDuration}}),Object.defineProperty(t,"getHours",{enumerable:!0,get:function(){return s.getHours}}),Object.defineProperty(t,"getMins",{enumerable:!0,get:function(){return s.getMins}}),Object.defineProperty(t,"getMinsSecs",{enumerable:!0,get:function(){return s.getMinsSecs}}),Object.defineProperty(t,"getMinsSecsHours",{enumerable:!0,get:function(){return s.getMinsSecsHours}}),Object.defineProperty(t,"getRelativeTime",{enumerable:!0,get:function(){return s.getRelativeTime}}),Object.defineProperty(t,"getSecs",{enumerable:!0,get:function(){return s.getSecs}}),Object.defineProperty(t,"isInThePast",{enumerable:!0,get:function(){return s.isInThePast}}),Object.defineProperty(t,"getQueryByFilter",{enumerable:!0,get:function(){return s.getQueryByFilter}}),Object.defineProperty(t,"getQueryByWhereFilters",{enumerable:!0,get:function(){return s.getQueryByWhereFilters}}),Object.defineProperty(t,"parseCzechDate",{enumerable:!0,get:function(){return s.parseCzechDate}}),Object.defineProperty(t,"twoPlaces",{enumerable:!0,get:function(){return s.twoPlaces}}),Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return s.Cache}}),Object.defineProperty(t,"preloadImage",{enumerable:!0,get:function(){return s.preloadImage}}),Object.defineProperty(t,"preloadImages",{enumerable:!0,get:function(){return s.preloadImages}}),Object.defineProperty(t,"toTwoPlaces",{enumerable:!0,get:function(){return s.toTwoPlaces}}),Object.defineProperty(t,"formatEpisode",{enumerable:!0,get:function(){return s.formatEpisode}}),Object.defineProperty(t,"formatCurrency",{enumerable:!0,get:function(){return s.formatCurrency}}),Object.defineProperty(t,"normalizeText",{enumerable:!0,get:function(){return s.normalizeText}}),Object.defineProperty(t,"removeAccents",{enumerable:!0,get:function(){return s.removeAccents}}),Object.defineProperty(t,"toSnakeCase",{enumerable:!0,get:function(){return s.toSnakeCase}}),Object.defineProperty(t,"toKebabCase",{enumerable:!0,get:function(){return s.toKebabCase}}),Object.defineProperty(t,"executeAsNewEventLoopJob",{enumerable:!0,get:function(){return s.executeAsNewEventLoopJob}}),Object.defineProperty(t,"once",{enumerable:!0,get:function(){return s.once}}),Object.defineProperty(t,"onceAsync",{enumerable:!0,get:function(){return s.onceAsync}}),Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return s.isBrowser}}),Object.defineProperty(t,"isCookiesEnabled",{enumerable:!0,get:function(){return s.isCookiesEnabled}}),Object.defineProperty(t,"isIndexedDbSupported",{enumerable:!0,get:function(){return s.isIndexedDbSupported}}),Object.defineProperty(t,"isSmartTv",{enumerable:!0,get:function(){return s.isSmartTv}}),Object.defineProperty(t,"isArris",{enumerable:!0,get:function(){return s.isArris}}),Object.defineProperty(t,"isWebos",{enumerable:!0,get:function(){return s.isWebos}}),Object.defineProperty(t,"isTizen",{enumerable:!0,get:function(){return s.isTizen}}),Object.defineProperty(t,"isMobileBrowser",{enumerable:!0,get:function(){return s.isMobileBrowser}}),Object.defineProperty(t,"random",{enumerable:!0,get:function(){return s.random}}),o(n(3854),t);var u=n(2509);Object.defineProperty(t,"firestoreArrayFilters",{enumerable:!0,get:function(){return u.firestoreArrayFilters}}),Object.defineProperty(t,"firestoreJavascriptFilters",{enumerable:!0,get:function(){return u.firestoreJavascriptFilters}}),Object.defineProperty(t,"firestoreObjectFilters",{enumerable:!0,get:function(){return u.firestoreObjectFilters}});var c=n(4045);Object.defineProperty(t,"useT",{enumerable:!0,get:function(){return c.useT}}),Object.defineProperty(t,"LanguageContextProvider",{enumerable:!0,get:function(){return c.LanguageContextProvider}}),Object.defineProperty(t,"I18nContextProvider",{enumerable:!0,get:function(){return c.I18nContextProvider}}),Object.defineProperty(t,"useLanguageOptions",{enumerable:!0,get:function(){return c.useLanguageOptions}}),Object.defineProperty(t,"LanguagePicker",{enumerable:!0,get:function(){return c.LanguagePicker}});var l=n(7723);Object.defineProperty(t,"VastProvider",{enumerable:!0,get:function(){return l.VastProvider}}),Object.defineProperty(t,"VAST_PROVIDERS",{enumerable:!0,get:function(){return l.VAST_PROVIDERS}}),o(n(6895),t),o(n(9281),t),(0,i.polyfill)()},3331:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pagination=void 0;var i=n(259),a=(0,n(6797).createLogger)("Pagination");t.Pagination=function(e,t,n){var s,u,c=this;this.query=e,this.creator=t,this.options=n,this.lastDocumentSnapshot=null,this.items=[],this.hasNextPage=!0,this.loading=!1,this.limit=10,this.fetchMore=function(){c.loading?a.info("loading ..."):c.hasNextPage?(a.info("fetch more"),c.fetchData()):a.info("no more data")},this.fetchData=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:a.info("fetch data"),n.label=1;case 1:return n.trys.push([1,3,4,5]),this.startLoading(),[4,this.makeQuery()];case 2:return e=n.sent(),a.info("fetched "+e.size+" docs, going to create entities"),this.setItems(this.items.concat(this.querySnapshotToEntities(e))),this.lastDocumentSnapshot=this.getLastSnapshotFromQuerySnapshot(e),[3,5];case 3:return t=n.sent(),console.error(t),[3,5];case 4:return this.stopLoading(),[7];case 5:return[2]}}))}))},this.querySnapshotToEntities=function(e){return e.docs.map((function(e){return c.creator(e.ref,e.data())}))},this.makeQuery=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){return e=this.query,(null===(t=this.options)||void 0===t?void 0:t.noLimit)?(a.info("fetch all documents without pagination"),this.hasNextPage=!1):this.lastDocumentSnapshot?(a.info("making query with limit",this.limit),e=e.limit(this.limit).startAfter(this.lastDocumentSnapshot)):(a.info("making first query with limit",this.limit),e=e.limit(this.limit)),[2,e.get()]}))}))},this.getLastSnapshotFromQuerySnapshot=function(e){var t=e.size;return c.hasNextPage=!e.empty&&e.size==c.limit,t>0?e.docs[t-1]:null},this.startLoading=function(){c.loading=!0},this.stopLoading=function(){c.loading=!1},this.addItemToEnd=function(e){c.hasNextPage?a.info("ignoring of adding an item to pagination locally because not all items are loaded"):(a.info("add item to end"),c.setItems(c.items.concat([e])))},this.addItemToStart=function(e){a.info("add item to start"),c.setItems([e].concat(c.items))},this.setItems=function(e){c.items=e},(0,i.makeObservable)(this,{items:i.observable,loading:i.observable,hasNextPage:i.observable,setItems:i.action}),this.limit=null!==(u=null===(s=this.options)||void 0===s?void 0:s.limit)&&void 0!==u?u:this.limit,this.fetchData()}},4291:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2523),t),o(n(3331),t)},2523:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.RefsPagination=void 0;var i=n(259),a=n(6797),s=(0,a.createLogger)("RefsPagination"),u=function(){function e(e,t,n,u,c){var l=this;if(void 0===n&&(n=!0),void 0===u&&(u=10),void 0===c&&(c=!0),this.refs=e,this.creator=t,this.initialized=n,this.limit=u,this.items=[],this.currentItems=[],this.currentPage=0,this.hasNextPage=!0,this.loading=!1,this.error=null,this.fetchMore=function(){return r(l,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.isLoading?[2]:(this.currentPage++,[4,this.fetchData()]);case 1:return e.sent(),[2]}}))}))},this.fetchData=function(){return r(l,void 0,void 0,(function(){var e,t,n,i,u,c,l=this;return o(this,(function(f){switch(f.label){case 0:if(this.isLoading||!this.hasNextPage)return[2];f.label=1;case 1:return f.trys.push([1,4,5,6]),s.info("fetchData"),e=this.currentPage*this.limit,t=e+this.limit,0!==this.items.slice(e,t).length?[3,3]:(n=this.refs.slice(e,t),t>=this.refs.length&&(this.hasNextPage=!1),this.startLoading(),[4,Promise.all(n.map((function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return[4,e.get()];case 1:return t=r.sent(),(n=t.data())?[2,this.creator(e,n)]:[2,null]}}))}))})))]);case 2:return i=f.sent(),u=i.filter(a.notEmptyFilter),s.info("fetched "+u.length+" items of "+n.length+" refs"),this.endLoading(),this.setCurrentItems=u,this.setItems=this.items.concat(u),[3,3];case 3:return[3,6];case 4:return c=f.sent(),s.error(c),this.setError=c,[3,6];case 5:return this.endLoading(),[7];case 6:return[2]}}))}))},this.addItemToStart=function(e,t){l.refs=l.refs.concat([t]),l.getItems.unshift(e)},this.addItem=function(e,t){l.refs.length===l.items.length&&(l.setItems=l.items.concat([e])),l.refs=l.refs.concat([t])},this.getItem=function(e){return r(l,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return(t=this.refs.find((function(t){return t.id===e})))?[4,t.get()]:[3,2];case 1:return n=o.sent(),(r=n.data())?[2,this.creator(n.ref,r)]:[3,3];case 2:throw new Error("ref-not-found");case 3:return[2]}}))}))},this.limit>1e3)throw new Error("Limit cannot be greater than 1000");c&&this.fetchData(),(0,i.makeObservable)(this,{items:i.observable,refs:i.observable,loading:i.observable,error:i.observable,hasNextPage:i.observable})}return e.prototype.startLoading=function(){this.setLoading=!0},e.prototype.endLoading=function(){this.setLoading=!1},Object.defineProperty(e.prototype,"getError",{get:function(){return this.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getCurrentItems",{get:function(){return this.currentItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItems",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getRefs",{get:function(){return this.refs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getHasNextPage",{get:function(){return this.hasNextPage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItemsCount",{get:function(){return this.refs.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setItems",{set:function(e){this.items=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setLoading",{set:function(e){this.loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setCurrentItems",{set:function(e){this.currentItems=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setIsInitialized",{set:function(e){this.initialized=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setError",{set:function(e){this.error=e},enumerable:!1,configurable:!0}),e}();t.RefsPagination=u},1645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(){"object"==typeof window&&"object"==typeof document&&window.addEventListener("load",(function(){var e=document.createElement("script");e.src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize",e.id="tivio-polyfill-string-prototype-normalize",document.head.appendChild(e)}))}},3690:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PLATFORM=t.CUSTOMER_BUILD=void 0,function(e){e.OKTAGON="OKTAGON",e.JOJ="JOJ",e.MALL="MALL",e.GARAZ="GARAZ",e.U_KULATEHO_STOLU="U_KULATEHO_STOLU"}(n||(n={})),t.CUSTOMER_BUILD=n,function(e){e.MOBILE="MOBILE",e.WEB="WEB",e.TV="TV"}(r||(r={})),t.PLATFORM=r},9352:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8757),t),o(n(3690),t)},8757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6255:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.languages=t.Language=void 0,function(e){e.CS="cs",e.DE="de",e.EN="en",e.FR="fr",e.PL="pl",e.SK="sk",e.SP="sp"}(n=t.Language||(t.Language={})),t.languages=Object.values(n)},7245:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_PRESET_PLACEMENTS=t.AssetPresetPlacement=void 0,function(e){e.TV_CHANNEL="tvChannel",e.CHANNEL="channel",e.SECTION="section",e.VIDEO="video",e.TAG="tag"}(n=t.AssetPresetPlacement||(t.AssetPresetPlacement={})),t.ASSET_PRESET_PLACEMENTS=Object.values(n)},5761:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},543:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7245),t),o(n(5761),t),o(n(1435),t),o(n(2778),t),o(n(8496),t),o(n(5925),t),o(n(2226),t),o(n(1281),t),o(n(7371),t),o(n(800),t),o(n(2062),t),o(n(557),t),o(n(4338),t),o(n(4757),t)},1435:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2778:function(e,t){"use strict";var n,r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdProfileType=t.OnlineSkippability=t.StreamSkippability=t.MONETIZATION_FREQUENCY=void 0,(i=t.MONETIZATION_FREQUENCY||(t.MONETIZATION_FREQUENCY={})).ONE_TIME_PAYMENT="ONE_TIME_PAYMENT",i.DAILY="DAILY",i.WEEKLY="WEEKLY",i.MONTHLY="MONTHLY",i.ANNUALLY="ANNUALLY",(o=t.StreamSkippability||(t.StreamSkippability={})).SKIPPABLE="SKIPPABLE",o.NOT_SKIPPABLE="NOT_SKIPPABLE",o.AUTO_SKIP="AUTO_SKIP",(r=t.OnlineSkippability||(t.OnlineSkippability={})).SKIPPABLE="SKIPPABLE",r.NOT_SKIPPABLE="NOT_SKIPPABLE",r.VAST_BASED="VAST_BASED",(n=t.AdProfileType||(t.AdProfileType={})).ONLINE="ONLINE",n.STREAM="STREAM"},8496:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4757:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentGateway=t.PurchaseStatus=t.CURRENCIES=void 0,t.CURRENCIES=["CZK","EUR","USD"],(n=t.PurchaseStatus||(t.PurchaseStatus={})).NEW="NEW",n.PAID="PAID",n.CANCELLED="CANCELLED",n.ERROR="ERROR",(t.PaymentGateway||(t.PaymentGateway={})).QERKO="qerko"},557:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.ORDER_BY_FIELD_PATH=t.WHERE_FILTER_FIELD_PATH=t.WHERE_FILTER_OPERATOR=t.ORDER_BY_DIRECTION=t.ROW_TYPE=t.FILTER_COLLECTION=t.ROW_ITEM_COMPONENT=t.ROW_COMPONENT=void 0,function(e){e.ROW="ROW",e.BANNER="BANNER"}(n||(n={})),t.ROW_COMPONENT=n,function(e){e.ROW_ITEM_PORTRAIT="ROW_ITEM_PORTRAIT",e.ROW_ITEM_LANDSCAPE="ROW_ITEM_LANDSCAPE",e.ROW_ITEM_CIRCLED="ROW_ITEM_CIRCLED"}(r||(r={})),t.ROW_ITEM_COMPONENT=r,function(e){e.VIDEOS="videos",e.TAGS="tags"}(o||(o={})),t.ROW_TYPE=o,function(e){e.DESC="desc",e.ASC="asc"}(i||(i={})),t.ORDER_BY_DIRECTION=i,function(e){e.LESS="<",e.LESS_OR_EQUAL="<=",e.EQUAL="==",e.NOT_EQUAL="!=",e.GREATER_OR_EQUAL=">=",e.GREATER=">",e.ARRAY_CONTAINS="array-contains",e.IN="in",e.ARRAY_CONTAINS_ANY="array-contains-any",e.NOT_IN="not-in"}(a||(a={})),t.WHERE_FILTER_OPERATOR=a,function(e){e.CREATED="created",e.TAGS="tags",e.TAG_TYPE_REF="tagTypeRef"}(s||(s={})),t.WHERE_FILTER_FIELD_PATH=s,function(e){e.VIDEOS="videos",e.TAGS="tags",e.TV_CHANNELS="tvChannels"}(u||(u={})),t.FILTER_COLLECTION=u,function(e){e.CREATED="created"}(c||(c={})),t.ORDER_BY_FIELD_PATH=c},2062:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5925:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4338:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TAG_LANDSCAPE_COVER_ASSET_NAME=t.TAG_PORTRAIT_COVER_ASSET_NAME=t.TAG_COVER_ASSET_NAME=t.TAG_BANNER_ASSET_NAME=t.TagMetadataFieldType=t.TagSimplicityType=void 0,(r=t.TagSimplicityType||(t.TagSimplicityType={})).SIMPLE="SIMPLE",r.COMPOSED="COMPOSED",(n=t.TagMetadataFieldType||(t.TagMetadataFieldType={})).STRING="STRING",n.TRANSLATION="TRANSLATION",n.NUMBER="NUMBER",n.BOOLEAN="BOOLEAN",t.TAG_BANNER_ASSET_NAME="tag_banner",t.TAG_COVER_ASSET_NAME="tag_cover",t.TAG_PORTRAIT_COVER_ASSET_NAME="tag_portrait_cover",t.TAG_LANDSCAPE_COVER_ASSET_NAME="tag_landscape_cover"},2226:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TvStream=void 0,(n=t.TvStream||(t.TvStream={})).STARTOVER="startover",n.TIMESHIFT="timeshift",n.LIVE="live",n.ALL="all"},1281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7371:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.USER_TYPE=void 0,function(e){e.ORGANIZATION_USER="ORGANIZATION_USER",e.TIVIO_USER="TIVIO_USER"}(n||(n={})),t.USER_TYPE=n},800:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.VIDEO_DETAIL_ASSET_NAME=t.NewVideoSourceCodec=t.NewVideoSourceEncrytion=t.NewVideoSourceProtocol=t.ELEMENT_TYPE=t.DATA_SOURCE=t.TRANSCODING_STATUS=t.PUBLISHED_STATUS=t.PlacementType=void 0,t.VIDEO_DETAIL_ASSET_NAME="video_detail",function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"}(n||(n={})),t.PUBLISHED_STATUS=n,function(e){e.ON_HOLD="CREATED",e.IN_PROGRESS="ENCODING",e.DONE="ENCODING_DONE",e.ERROR="ERROR"}(r||(r={})),t.TRANSCODING_STATUS=r,function(e){e.MALL_TV="MALL_TV",e.TIVIO_ADMIN="TIVIO_ADMIN",e.EPG_IMPORT="EPG_IMPORT"}(o||(o={})),t.DATA_SOURCE=o,function(e){e.PLAYLIST="PLAYLIST",e.VIDEO="VIDEO",e.TV_PROGRAM="TV_PROGRAM"}(i||(i={})),t.ELEMENT_TYPE=i,(c=t.PlacementType||(t.PlacementType={})).VIDEO="video",c.SECTION="section",c.CHANNEL="channel",c.CONDITION="condition",function(e){e.HLS="hls",e.DASH="dash",e.MP4="mp4"}(a||(a={})),t.NewVideoSourceProtocol=a,function(e){e.NONE="none",e.WIDEVINE="widevine",e.FAIRPLAY="fairplay",e.PLAYREADY="playready"}(s||(s={})),t.NewVideoSourceEncrytion=s,function(e){e.H264="h264",e.H265="h265"}(u||(u={})),t.NewVideoSourceCodec=u},9396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9786:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9363),t),o(n(2635),t),o(n(786),t),o(n(3910),t),o(n(190),t),o(n(4906),t),o(n(3948),t),o(n(7535),t),o(n(3161),t),o(n(5656),t),o(n(9614),t),o(n(9396),t),o(n(1738),t),o(n(5129),t),o(n(3959),t),o(n(7605),t)},3959:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1738:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7535:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ROW_ITEM_TYPES=void 0,(n=t.ROW_ITEM_TYPES||(t.ROW_ITEM_TYPES={})).VIDEO="VIDEO",n.TAG="TAG",n.TV_CHANNEL="TV_CHANNEL"},3161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7605:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ALGOLIA_INDEX_NAME=void 0,(n=t.ALGOLIA_INDEX_NAME||(t.ALGOLIA_INDEX_NAME={})).VIDEOS="videos",n.TAGS="tags",n.TV_CHANNELS="tvChannels"},190:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5656:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9363:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3948:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2635:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2010:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2010),t),o(n(543),t),o(n(9786),t),o(n(9352),t),o(n(6255),t)},9075:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var o=n(187),i=new(n(6222).Logger)("analytics"),a=function(){function e(){this.eventNames=null,this.gaMeasurementId=null}return e.prototype.init=function(e,t){this.gaMeasurementId=e,this.eventNames=t,(0,o.install)(e)},e.prototype.trackAnalytic=function(e,t,n){if(this.isInitialized()){var r=this.eventNames[e];r&&(i.info("Tracking analytic "+e+" under "+r,t,n),this.trackEvent(r,t,n))}else i.warn("Failed to track event, because analytics are not initialized yet",e,t)},e.prototype.isInitialized=function(){return null!=this.eventNames&&null!=this.gaMeasurementId},e.prototype.trackEvent=function(e,t,n){var i=r(r({},null!=t?t:{}),{send_to:this.gaMeasurementId});n?(0,o.gtag)("event",e,i,n):(0,o.gtag)("event",e,i)},e}();t.Analytics=a},4511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceWithoutOverwritingValues=t.chunkArray=t.notEmptyFilter=void 0,t.notEmptyFilter=function(e){return!!e},t.chunkArray=function(e,t){var n,r=e.length,o=[];for(n=0;n<r;n+=t){var i=e.slice(n,n+t);o.push(i)}return o},t.replaceWithoutOverwritingValues=function(e,t,n){var r=[];return t.forEach((function(t){var o=e.find((function(e){return n(t,e)}));r.push(null!=o?o:t)})),r}},7607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var n=function(){function e(e){var t,n;this.enabled=!0,this.map=new Map,this.max=null!==(t=null==e?void 0:e.max)&&void 0!==t?t:1e3,this.convertKey=null!==(n=null==e?void 0:e.convertKey)&&void 0!==n?n:function(e){return e}}return e.prototype.set=function(e,t){this.enabled&&(this.map.size>this.max&&this.map.clear(),this.map.set(this.convertKey(e),t))},e.prototype.get=function(e){var t;return null!==(t=this.map.get(this.convertKey(e)))&&void 0!==t?t:null},e.prototype.has=function(e){return!!this.enabled&&this.map.has(this.convertKey(e))},e.prototype.getSize=function(){return this.map.size},e.prototype.disable=function(){this.enabled=!1},e}();t.Cache=n},3489:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.onceAsync=t.once=void 0,t.once=function(e){var t=!1;return function(){t||(e(),t=!0)}},t.onceAsync=function(e){var t=!1;return function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return t?[3,2]:(t=!0,[4,e()]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}}},7500:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.stringComparator=t.booleanComparator=t.numberComparator=t.SortDirection=void 0,function(e){e.ASC="ASC",e.DESC="DESC"}(n=t.SortDirection||(t.SortDirection={})),t.numberComparator=function(e,t,r){return r===n.ASC?e-t:t-e},t.booleanComparator=function(e,t){return e&&t?0:e&&!t?-1:!e&&t?1:0},t.stringComparator=function(e,t){return e<t?-1:1}},3854:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7500),t),o(n(9153),t),o(n(9924),t)},9153:function(e,t,n){"use strict";var r,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.strategiesComparator=t.expirationComparator=t.placementTypeComparator=t.PLACEMENT_TYPE_PRIORITIES=void 0;var i=n(7500),a=n(6895),s=o(n(6160));t.PLACEMENT_TYPE_PRIORITIES=((r={})[a.PlacementType.VIDEO]=3,r[a.PlacementType.CONDITION]=2,r[a.PlacementType.SECTION]=1,r[a.PlacementType.CHANNEL]=0,r),t.placementTypeComparator=function(e,n,r){return void 0===r&&(r=i.SortDirection.DESC),(0,i.numberComparator)(t.PLACEMENT_TYPE_PRIORITIES[e.placementType],t.PLACEMENT_TYPE_PRIORITIES[n.placementType],r)},t.expirationComparator=function(e,t,n){var r,o;return void 0===n&&(n=i.SortDirection.ASC),(0,i.numberComparator)(null!==(r=e.expirationDaysSincePublished)&&void 0!==r?r:Number.MAX_VALUE,null!==(o=t.expirationDaysSincePublished)&&void 0!==o?o:Number.MAX_VALUE,n)},t.strategiesComparator=function(e,t){return(0,i.numberComparator)((0,s.default)(e.strategies)?0:1,(0,s.default)(t.strategies)?0:1,i.SortDirection.ASC)}},9924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalsFirstRestAlphabeticallyComparator=t.alphabeticComparator=t.sortAlphabetically=void 0;var r=n(7500);t.sortAlphabetically=function(e){return e.sort((function(e,t){return(0,r.stringComparator)(e.name,t.name)}))},t.alphabeticComparator=function(e,t){return(0,r.stringComparator)(e.name,t.name)},t.globalsFirstRestAlphabeticallyComparator=function(e,t){var n,o;return(0,r.booleanComparator)(null!==(n=e.isGlobal)&&void 0!==n&&n,null!==(o=t.isGlobal)&&void 0!==o&&o)||(0,r.stringComparator)(e.name,t.name)}},3918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIndexedDbSupported=t.isSmartTv=t.isArris=t.isWebos=t.isTizen=t.isCookiesEnabled=t.isMobileBrowser=t.isBrowser=void 0;var n="undefined";t.isBrowser=function(){return typeof window!==n&&typeof document!==n},t.isMobileBrowser=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},t.isCookiesEnabled=function(){if(!(0,t.isBrowser)()||"string"!=typeof document.cookie)return!1;document.cookie="tiviocookietest=1";var e=-1!=document.cookie.indexOf("tiviocookietest=");return document.cookie="tiviocookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},t.isTizen=function(){return(0,t.isBrowser)()&&typeof window.tizen!==n},t.isWebos=function(){return(0,t.isBrowser)()&&typeof window.webOS!==n},t.isArris=function(){return(0,t.isBrowser)()&&typeof window.toi!==n},t.isSmartTv=function(){return(0,t.isTizen)()||(0,t.isWebos)()||(0,t.isArris)()},t.isIndexedDbSupported=function(){return window&&null!=window.indexedDB&&null!=window.IDBCursor&&null!=window.IDBCursorWithValue&&null!=window.IDBDatabase&&null!=window.IDBFactory&&null!=window.IDBIndex&&null!=window.IDBKeyRange&&null!=window.IDBObjectStore&&null!=window.IDBOpenDBRequest&&null!=window.IDBRequest&&null!=window.IDBTransaction&&null!=window.IDBVersionChangeEvent}},711:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeAsNewEventLoopJob=void 0,t.executeAsNewEventLoopJob=function(e){setTimeout(e)}},8399:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatCurrency=t.formatEpisode=t.toTwoPlaces=void 0,t.toTwoPlaces=function(e){return e<10?"0"+e:""+e},t.formatEpisode=function(e,n){return"S"+(0,t.toTwoPlaces)(e)+"E"+(0,t.toTwoPlaces)(n)},t.formatCurrency=function(e){switch(e){case"CZK":return"Kč";case"EUR":return"€";case"USD":return"$"}}},3434:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preloadImages=t.preloadImage=void 0,t.preloadImage=function(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=t,r.onerror=function(){n("image failed to load (uri:"+e+")")}}))},t.preloadImages=function(e){return Promise.all(e.map(t.preloadImage))}},6797:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4511),t),o(n(9075),t),o(n(6222),t),o(n(8029),t),o(n(7607),t),o(n(3854),t),o(n(6845),t),o(n(3434),t),o(n(8399),t),o(n(2729),t),o(n(711),t),o(n(3489),t),o(n(3918),t),o(n(6971),t)},6222:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=void 0;var r=function(){function e(e){this.name=e,this.isEnabled=!0}return e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["error"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["info"],e,!1))},e.prototype.off=function(){this.isEnabled=!1},e.prototype.on=function(){this.isEnabled=!0},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["warn"],e,!1))},e.prototype.forceInfo=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];console.info.apply(console,n([e.prefix+":"+this.name],t,!1))},e.prototype.log=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e.enabled&&this.isEnabled&&console[t].apply(console,n([e.prefix+":"+this.name],r,!1))},e.enabled=!0,e.prefix="tivio",e}();t.Logger=r,t.createLogger=function(e){return new r(e)}},6971:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.random=void 0,t.random=function(e){return Math.round(Math.random()*e)}},6845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryByFilter=t.getQueryByWhereFilters=void 0;var n=function(e,t){return e.reduce((function(e,t){return Array.isArray(t.value)&&0===t.value.length?e:e.where(t.fieldPath,t.opStr,t.value)}),t)};t.getQueryByWhereFilters=n,t.getQueryByFilter=function(e,t){return n(e.where,t).orderBy(e.orderBy.fieldPath,e.orderBy.directionStr)}},2729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeText=t.toKebabCase=t.toSnakeCase=t.removeAccents=void 0,t.removeAccents=function(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")},t.toSnakeCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"_").replace("-","_")},t.toKebabCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"-")},t.normalizeText=function(e,n){void 0===n&&(n="snake-case");var r=(0,t.removeAccents)(e);return"snake-case"===n?(0,t.toSnakeCase)(r):(0,t.toKebabCase)(r)}},8029:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeTime=t.getDuration=t.getMinsSecsHours=t.getMinsSecs=t.twoPlaces=t.getHours=t.getMins=t.getSecs=t.parseCzechDate=t.isInThePast=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=void 0;var a=i(n(2096));function s(e,t){return u(e,60*t)}function u(e,t){return l(e,60*t)}function c(e,t){return new Date(e.getTime()+t)}function l(e,t){return c(e,1e3*t)}function f(e,t){var n=null!=e?Math.floor(e/1e3):0;return t?n%60:n}function p(e,t){var n=null!=e?Math.floor(f(e)/60):0;return t?n%60:n}function d(e,t){var n=null!=e?Math.floor(p(e)/60):0;return t?n%24:n}function h(e){return e>=10?e:"0"+e}t.addDays=function(e,t){return s(e,24*t)},t.addHours=s,t.addMinutes=u,t.addMs=c,t.addSeconds=l,t.isInThePast=function(e){return e<new Date},t.parseCzechDate=function(e){var t=a.parse("dd.MM.yyyy hh:mm",e),n=1e3*t.getSeconds()+t.getMilliseconds();return new Date(t.getTime()-n)},t.getSecs=f,t.getMins=p,t.getHours=d,t.twoPlaces=h,t.getMinsSecs=function(e){if(e<0)return{mins:0,secs:0,text:"",textWordy:""};var t=p(e),n=f(e,!0),r="";return n&&(r=n+" s"),t&&(r=t+" min"+(r.length>0?" "+r:"")),{mins:t,secs:n,text:t+":"+h(n),textWordy:r}},t.getMinsSecsHours=function(e){var t=d(e),n=p(e,!0),r=f(e,!0),o=n+":"+h(r);return t>0&&(4===o.length&&(o="0"+o),o=t+":"+o),{hours:t,mins:n,secs:r,text:o}},t.getDuration=function(e){return null==e||e<0?null:Math.round(e/60)+" MIN"},t.getRelativeTime=function(e){if(null==e)return"";var t=((new Date).getTime()-e.getTime())/36e5,n=Math.floor(t);if(n<1)return"";if(n<24)return n+" HOURS AGO";var r=t/24,o=Math.floor(r);if(o<7)return o+" DAYS AGO";var i=r/7,a=Math.floor(i);if(a<5)return a+" WEEKS AGO";var s=r/30,u=Math.floor(s);if(u<12)return u+" MONTHS AGO";var c=r/365;return Math.ceil(c)+" YEARS AGO"}},259:function(e){"use strict";e.exports=r},8156:function(e){"use strict";e.exports=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(1920)}())},916:function(e,t,n){e.exports=function(){"use strict";var e=n(350),t=Function.bind.call(Function.call,Array.prototype.reduce),r=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),o=Function.bind.call(Function.call,Array.prototype.concat);return Object.values||(Object.values=function(n){return t(e(n),(function(e,t){return o(e,"string"==typeof t&&r(n,t)?[n[t]]:[])}),[])}),Object.entries||(Object.entries=function(n){return t(e(n),(function(e,t){return o(e,"string"==typeof t&&r(n,t)?[[t,n[t]]]:[])}),[])}),Object}()},320:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},426:function(e,t,n){"use strict";var r=n(320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var p="function"==typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var m=b.prototype=new v;m.constructor=b,r(m,y.prototype),m.isPureReactComponent=!0;var O={current:null},P=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)P.call(t,r)&&!_.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:O.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var E=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function j(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+T(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),j(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+T(s=e[c],c);u+=j(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=j(s=s.value,t,n,l=r+T(s,c++),a);else if("object"===s)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function x(e,t,n){if(null==e)return e;var r=[],o=0;return j(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function k(){var e=A.current;if(null===e)throw Error(d(321));return e}var I={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:x,forEach:function(e,t,n){x(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(d(143));return e}},t.Component=y,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,n){if(null==e)throw Error(d(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=O.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)P.call(t,l)&&!_.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return k().useCallback(e,t)},t.useContext=function(e,t){return k().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return k().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return k().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return k().useLayoutEffect(e,t)},t.useMemo=function(e,t){return k().useMemo(e,t)},t.useReducer=function(e,t,n){return k().useReducer(e,t,n)},t.useRef=function(e){return k().useRef(e)},t.useState=function(e){return k().useState(e)},t.version="17.0.2"},784:function(e,t,n){"use strict";e.exports=n(426)},350:function(e){"object"==typeof Reflect&&"function"==typeof Reflect.ownKeys?e.exports=Reflect.ownKeys:"function"==typeof Object.getOwnPropertySymbols?e.exports=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:e.exports=Object.getOwnPropertyNames},992:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapperEventType=void 0,function(e){e.adMetadata="adMetadata"}(n||(n={})),t.PlayerWrapperEventType=n},958:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createInternalConf=t.defaultConf=void 0;var o=n(782),i=n(373);t.defaultConf={resolverUrl:"https://tivio-resolver-production.tiv.io/serveBundle/resolver2.js",fetchPackage:i.fetchPackage},t.createInternalConf=function(e){var n,i=null===(n=e.enableSentry)||void 0===n||n;return r(r(r({},t.defaultConf),e),{logger:void 0!==e.logger?e.logger:(0,o.createLogger)({isConsoleEnabled:!0,isSentryEnabled:i}),sdkVersion:"2.0.0"})}},920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createPlayerWrapper=void 0,n(168),n(916),o(n(643),t),o(n(173),t),o(n(992),t);var i=n(697);Object.defineProperty(t,"createPlayerWrapper",{enumerable:!0,get:function(){return i.createPlayerWrapper}})},643:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTivio=t.createRemotePackageLoader=t.fetchBundleViaResolver=void 0;var i=n(194),a=n(958),s=n(229),u=n(697),c=n(614),l=new i.Logger("bundleLoader");t.fetchBundleViaResolver=function(e){return r(void 0,void 0,void 0,(function(){var t,n;return o(this,(function(r){return t=e.resolverUrl,n=e.fetchPackage,l.info("Fetching bundle via resolver"),[2,n(t).then((function(t){var n,r={},o={exports:r};try{new Function("require","module","exports",t)(s.resolveShared,o,r)}catch(e){throw new Error("Cannot load Tivio Resolver "+e)}if("function"!=typeof(null===(n=o.exports.tivio)||void 0===n?void 0:n.fetch))throw new Error("Invalid Tivio Resolver export");return o.exports.tivio.fetch(e.secret,e.sdkVersion)}))]}))}))};var f=function(e){return r(void 0,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return[4,fetch("https://europe-west3-tivio-production.cloudfunctions.net/getRemoteBundle",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:e})})];case 1:return[4,n.sent().json()];case 2:return t=n.sent(),[2,(i=t.bundleUrl,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return l.info("Fetching bundle by url",i),[4,fetch(i)];case 1:if(!((n=(e=t.sent()).status)>=200&&n<=400))throw new Error("Failed to fetch bundleUrlOverride "+i+", HTTP error status code: "+e.status);return[4,e.text()];case 2:return[2,t.sent()]}var n}))})))]}var i}))}))};t.createRemotePackageLoader=function(){return function(e){return function(e){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return n="",(0,i.isIndexedDbSupported)()?[3,2]:(l.info("Fetching bundle via cloudfn, because indexedDB is not supported"),[4,f(e.secret)]);case 1:return n=r.sent(),[3,6];case 2:return e.forceCloudFnResolver?(l.info("Fetching bundle via cloudfn (forced by config)"),[4,f(e.secret)]):[3,4];case 3:return n=r.sent(),[3,6];case 4:return[4,(0,t.fetchBundleViaResolver)(e)];case 5:n=r.sent(),r.label=6;case 6:return[2,n]}}))}))}(e).then((function(e){var t={},n={exports:t};try{new Function("require","module","exports",e)(s.resolveShared,n,t)}catch(e){throw new Error("Cannot load module "+e)}if("object"!=typeof n.exports.Tivio)throw new Error('Tivio package does not export "Tivio" namespace');if("function"!=typeof n.exports.Tivio.setUser)throw new Error('Tivio namespace does not export "setUser" member');if("function"!=typeof n.exports.Tivio.init)throw new Error('Tivio namespace does not export "init" member');return n.exports.Tivio}))}},t.createTivio=function(){var e=(0,t.createRemotePackageLoader)(),n=!1;return function(t){return r(void 0,void 0,void 0,(function(){var i,s;return o(this,(function(l){return i=(0,a.createInternalConf)(t),s=(0,c.createSettings)(i),[2,e(i).then((function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return n?[3,2]:[4,e.init(i)];case 1:t.sent(),n=!0,t.label=2;case 2:return s.onSetUser(e.setUser),(0,u.onCreatePlayerWrapperReady)(e.createPlayerWrapper),[2,{state:"ready",error:null,settings:s,conf:i,AdSource:e.AdSource,ChannelSource:e.ChannelSource,VodTivioSource:e.VodTivioSource,getChannelById:e.getChannelById,getPlayer:e.getPlayer,getSectionById:e.getSectionById,getVideoById:e.getVideoById,getWidgetById:e.getWidgetById,setLanguage:e.setLanguage,setUser:e.setUser,subscribeToWidget:e.subscribeToWidget,subscribeToChannel:e.subscribeToChannel,subscribeToSection:e.subscribeToSection,subscribeToVideo:e.subscribeToVideo,subscribeToVideosInSection:e.subscribeToVideosInSection,subscribeToSectionsInChannel:e.subscribeToSectionsInChannel,subscribeToChannelsInWidget:e.subscribeToChannelsInWidget,subscribeToScreen:e.subscribeToScreen,subscribeToItemsInRow:e.subscribeToItemsInRow,createUserWithEmailAndPassword:e.createUserWithEmailAndPassword,signInWithEmailAndPassword:e.signInWithEmailAndPassword}]}}))}))})).catch((function(e){var t;return null===(t=i.logger)||void 0===t||t.exception(e),{state:"error",error:""+e,conf:i,settings:s}}))]}))}))}}},229:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveShared=void 0;var s=a(n(937));n(703),n(462);var u=i(n(259)),c=i(n(970)),l={mobx:u,firebase:s.default,"firebase/app":s.default,"firebase/auth":null,"firebase/firestore":null,timers:c};t.resolveShared=function(e){if(!(e in l))throw new Error("Could not resolve shared dependency "+e);return l[e]}},782:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=void 0;var a=i(n(356));t.createLogger=function(e){var t=!1!==e.isSentryEnabled&&!0;t&&(a.init({dsn:"https://f318b29129f84c459ea756907bc1a2e6@o507550.ingest.sentry.io/5600272",release:"@tivio/sdk-js@2.0.0",tracesSampleRate:1}),window.sentry=a),console.info("Sentry "+(t?"on":"off"));var n=function(n,r){e.isConsoleEnabled&&console[n]("Tivio sdk-js "+r.join(" ")),t&&a.captureMessage(""+r,a.Severity.fromString(n))};return{error:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("error",e)},info:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("info",e)},warn:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("warn",e)},debug:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("debug",e)},exception:function(n){e.isConsoleEnabled&&console.error(n),t&&a.captureException(n)}}}},373:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPackage=void 0;var o={cache:"no-store"},i=function(e){var t=e.headers.get("content-type");return 200!==e.status?Promise.reject('Incorrect status "'+e.status+'" was obtained while fetching the module.'):t&&(t.includes("application/javascript")||t.includes("text/javascript"))?e.text():Promise.reject('Incorrect content "'+t+'" was obtained while fetching the module.')},a=function(e){return Promise.reject("Network failure: "+e)};t.fetchPackage=function(e){return n(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,fetch(e,o).then(i).catch(a)]}))}))}},697:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPlayerWrapper=t.onCreatePlayerWrapperReady=t.PlayerWrapper=void 0;var r=n(194),o=n(846),i=new r.Logger("SDK player wrapper:"),a=function(){function e(e){this.internalPlayerWrapper=e}return e.prototype.addEventListener=function(e,t){this.internalPlayerWrapper.addEventListener(e,t)},e.prototype.reportError=function(e){this.internalPlayerWrapper.reportError(e)},e.prototype.reportPlaybackEnded=function(){this.internalPlayerWrapper.reportPlaybackEnded()},e.prototype.reportTimeProgress=function(e){this.internalPlayerWrapper.reportTimeProgress(e)},e.prototype.seekTo=function(e){this.internalPlayerWrapper.seekTo(e)},e.prototype.setSource=function(e){this.internalPlayerWrapper.setSource(e)},e}();t.PlayerWrapper=a;var s=new function(){var e=this;this.internalPlayerWrappers=new Map,this.getNumberOfPlayerWrapperInstances=function(){return e.internalPlayerWrappers.size},this.getPlayerWrapper=function(t,n){if(e.internalPlayerWrappers.has(n))return i.info("Returning existing player wrapper."),e.internalPlayerWrappers.get(n);i.info("Creating new player wrapper.");var r=new o.InternalPlayerWrapper(t,n),s=new a(r);return e.internalPlayerWrappers.set(n,r),s},this.registerPlayerWrapperToAllInternalPlayerWrappers=function(t){e.internalPlayerWrappers.forEach((function(e){e.onPlayerWrapperReady(t)}))}};t.onCreatePlayerWrapperReady=function(e){i.info("onCreatePlayerWrapperReady called."),s.registerPlayerWrapperToAllInternalPlayerWrappers(e)},t.createPlayerWrapper=function(e){return s.getPlayerWrapper(e,"internalPlayerWrapper "+(s.getNumberOfPlayerWrapperInstances()+1))}},846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InternalPlayerWrapper=void 0;var r=new(n(194).Logger)("SDK player wrapper internal:"),o=function(){function e(e,t){this.playerImplementation=e,this.id=t,this.corePlayerWrapperInstance=null,this.listenersWaitingToRegister=[]}return e.prototype.addEventListener=function(e,t){this.corePlayerWrapperInstance?(r.info("Calling addEventListener on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.addEventListener(e,t)):(r.info("addEventListener: real player wrapper is not ready yet, saving listener for later usage."),this.listenersWaitingToRegister.push({eventType:e,listener:t}))},e.prototype.reportError=function(e){this.corePlayerWrapperInstance?(r.info("Calling reportError on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.reportError(e)):r.info("reportError: real player wrapper is not ready yet, nothing to do.")},e.prototype.reportPlaybackEnded=function(){this.corePlayerWrapperInstance?(r.info("Calling reportPlaybackEnded on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.reportPlaybackEnded()):r.info("reportPlaybackEnded: real player wrapper is not ready yet, nothing to do.")},e.prototype.reportTimeProgress=function(e){this.corePlayerWrapperInstance?(r.info("Calling reportTimeProgress on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.reportTimeProgress(e)):r.info("reportTimeProgress: real player wrapper is not ready yet, nothing to do.")},e.prototype.seekTo=function(e){this.corePlayerWrapperInstance?(r.info("Calling seekTo on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.seekTo(e)):(r.info("Player wrapper is not ready yet, calling seekTo without any interruption (pass-through)."),this.playerImplementation.seekTo(e))},e.prototype.setSource=function(e){this.corePlayerWrapperInstance?(r.info("Calling setSource on real player wrapper (from core-js)."),this.corePlayerWrapperInstance.setSource(e)):(r.info("Player wrapper is not ready yet, calling setSource without any interruption (pass-through)."),this.playerImplementation.setSource(e))},e.prototype.onPlayerWrapperReady=function(e){var t=this;r.info('Creating real player wrapper. (InternalPlayerWrapper "'+this.id+'")'),this.corePlayerWrapperInstance=e(this.playerImplementation),this.listenersWaitingToRegister.forEach((function(e){var n;r.info("Real player wrapper (from core-js) is ready, calling addEventListener."),null===(n=t.corePlayerWrapperInstance)||void 0===n||n.addEventListener(e.eventType,e.listener)}))},e}();t.InternalPlayerWrapper=o},614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSettings=void 0,t.createSettings=function(e){var t=null,n=null;return{onSetUser:function(r){var o;"function"!=typeof r?null===(o=e.logger)||void 0===o||o.exception("Tivio Bundle setUser handler must be a function"):(t=r,null!==n&&r(n.userId,n.userPayload))},setUser:function(e,r){"function"==typeof t?(n=null,t(e,r)):n={userId:e,userPayload:r}}}}},173:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},168:function(e,t,n){"use strict";n.r(t),n.d(t,{Headers:function(){return h},Request:function(){return P},Response:function(){return w},DOMException:function(){return E},fetch:function(){return T}});var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,o="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,u="ArrayBuffer"in r;if(u)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(v)}),this.text=function(){var e,t,n,r=g(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=y(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=f(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[f(e)]},h.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},h.prototype.set=function(e,t){this.map[f(e)]=p(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(e,t){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,o=(t=t||{}).body;if(e instanceof P){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),O.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})},m.call(P.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})};var E=r.DOMException;try{new E}catch(e){(E=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function T(e,t){return new Promise((function(n,o){var i=new P(e,t);if(i.signal&&i.signal.aborted)return o(new E("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;setTimeout((function(){n(new w(o,r))}),0)},s.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){o(new E("Aborted","AbortError"))}),0)},s.open(i.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&(a?s.responseType="blob":u&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof h?i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){s.setRequestHeader(e,p(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}T.polyfill=!0,r.fetch||(r.fetch=T,r.Headers=h,r.Request=P,r.Response=w)},356:function(e){"use strict";e.exports=t},937:function(e){"use strict";e.exports=n},703:function(e){"use strict";e.exports=r},462:function(e){"use strict";e.exports=o},259:function(t){"use strict";t.exports=e},970:function(){}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,s),n.exports}return s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s(920)}()}));
@@ -18,7 +18,7 @@ export declare type RemoteBundleState = {
18
18
  error: string | null;
19
19
  conf: InternalConf;
20
20
  settings: Settings;
21
- } & Partial<ExposedApi>;
21
+ } & Omit<Partial<ExposedApi>, 'createPlayerWrapper'>;
22
22
  export declare type Api = RemoteBundleState;
23
23
  export declare const fetchBundleViaResolver: (conf: InternalConf) => Promise<string>;
24
24
  /**
@@ -0,0 +1,29 @@
1
+ import { AdMetadata, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper } from '../api.types';
2
+ import { InternalPlayerWrapper } from './playerWrapperInternal';
3
+ import type { CreatePlayerWrapperType } from './playerWrapperInternal';
4
+ /**
5
+ * Player wrapper which instances are exposed to SDK user.
6
+ */
7
+ export declare class PlayerWrapper implements TivioPlayerWrapper {
8
+ private internalPlayerWrapper;
9
+ constructor(internalPlayerWrapper: InternalPlayerWrapper);
10
+ addEventListener(eventType: PlayerWrapperEventType.adMetadata, listener: (metadata: AdMetadata) => void): void;
11
+ reportError(error: Error): void;
12
+ reportPlaybackEnded(): void;
13
+ reportTimeProgress(ms: number): void;
14
+ seekTo(ms: number): void;
15
+ setSource(source: Source | null): void;
16
+ }
17
+ /**
18
+ * Called when tivio is initialized (remote bundle is ready).
19
+ *
20
+ * @param {CreatePlayerWrapperType} createPlayerWrapper - functions which creates player wrapper in core-js
21
+ */
22
+ export declare const onCreatePlayerWrapperReady: (createPlayerWrapper: CreatePlayerWrapperType) => void;
23
+ /**
24
+ * Public method accessible in SDK.
25
+ *
26
+ * @param {PlayerInterfaceForPlayerWrapper} playerImplementation - player implementation from SDK user
27
+ * @returns player wrapper instance
28
+ */
29
+ export declare const createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => PlayerWrapper;
@@ -0,0 +1,28 @@
1
+ import { AdMetadata, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper } from '../api.types';
2
+ export declare type CreatePlayerWrapperType = (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
3
+ /**
4
+ * Responsible for handling of all player wrapper methods (it's called through PlayerWrapper).
5
+ * Also handles state when player wrapper from core-js is not ready yet and situation when it becomes ready.
6
+ */
7
+ export declare class InternalPlayerWrapper implements TivioPlayerWrapper {
8
+ private playerImplementation;
9
+ private id;
10
+ corePlayerWrapperInstance: TivioPlayerWrapper | null;
11
+ listenersWaitingToRegister: {
12
+ eventType: PlayerWrapperEventType.adMetadata;
13
+ listener: (metadata: AdMetadata) => void;
14
+ }[];
15
+ constructor(playerImplementation: PlayerInterfaceForPlayerWrapper, id: string);
16
+ addEventListener(eventType: PlayerWrapperEventType.adMetadata, listener: (metadata: AdMetadata) => void): void;
17
+ reportError(error: Error): void;
18
+ reportPlaybackEnded(): void;
19
+ reportTimeProgress(ms: number): void;
20
+ seekTo(ms: number): void;
21
+ setSource(source: Source | null): void;
22
+ /**
23
+ * Set instance of the real player wrapper (from core-js).
24
+ *
25
+ * @param createPlayerWrapper - create player wrapper method from core-js
26
+ */
27
+ onPlayerWrapperReady(createPlayerWrapper: CreatePlayerWrapperType): void;
28
+ }
package/dist/types.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * Export public client side API
7
7
  */
8
8
  import { InternalConf } from './conf';
9
- export declare type Conf = Pick<InternalConf, 'secret' | 'logger' | 'language' | 'enableSentry'>;
9
+ export { PlayerCapability } from './conf';
10
+ export declare type Conf = Pick<InternalConf, 'capabilitiesOptions' | 'deviceCapabilities' | 'enableSentry' | 'forceCloudFnResolver' | 'language' | 'logger' | 'secret'>;
10
11
  export declare type Empty = Promise<void> | void;
11
12
  export declare type Disposer = () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-js",
3
- "version": "2.0.0-alpha3",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@sentry/browser": "^6.1.0",
21
+ "es7-object-polyfill": "^1.0.1",
21
22
  "firebase": "^8.2.3",
22
23
  "mobx": "^6.0.4",
23
24
  "whatwg-fetch": "^3.6.2"