@clickview/exchange 0.10.0-rc.7 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/scripts/127-61329501b3-exchange.chunk.js +1 -0
- package/dist/scripts/13-74942e89ec-exchange.chunk.js +1 -0
- package/dist/scripts/165-4d86be0aaf-exchange.chunk.js +2 -0
- package/dist/scripts/254-8e73f1e8d3-exchange.chunk.js +1 -0
- package/dist/scripts/409-a81cd52172-exchange.chunk.js +1 -0
- package/dist/scripts/544-a61266c048-exchange.chunk.js +1 -0
- package/dist/scripts/63-1c15a9e4cd-exchange.chunk.js +1 -0
- package/dist/scripts/636-3b2c777459-exchange.chunk.js +2 -0
- package/dist/scripts/662-e2c628351d-exchange.chunk.js +1 -0
- package/dist/scripts/665-3d56821bc0-exchange.chunk.js +1 -0
- package/dist/scripts/690-7ae4a5a80f-exchange.chunk.js +1 -0
- package/dist/scripts/806-482546ea68-exchange.chunk.js +1 -0
- package/dist/scripts/85-67040d94eb-exchange.chunk.js +1 -0
- package/dist/scripts/854-d35134c97b-exchange.chunk.js +1 -0
- package/dist/scripts/{954-f5fb38bd2c-exchange.chunk.js → 954-5b558583ba-exchange.chunk.js} +1 -1
- package/dist/scripts/979-15942d8f39-exchange.chunk.js +2 -0
- package/dist/scripts/bundle-e2cf3e26c9.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +39 -39
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +11 -11
- package/dist/scripts/127-a6c0df48ef-exchange.chunk.js +0 -1
- package/dist/scripts/13-209bc1dd7e-exchange.chunk.js +0 -1
- package/dist/scripts/165-adbe9f6e64-exchange.chunk.js +0 -2
- package/dist/scripts/254-0282b72783-exchange.chunk.js +0 -1
- package/dist/scripts/409-2247c0be54-exchange.chunk.js +0 -1
- package/dist/scripts/544-bedcb5f1c5-exchange.chunk.js +0 -1
- package/dist/scripts/63-aa5a5e9bf5-exchange.chunk.js +0 -1
- package/dist/scripts/636-f0abef5736-exchange.chunk.js +0 -2
- package/dist/scripts/662-a0ccc2d504-exchange.chunk.js +0 -1
- package/dist/scripts/665-8d5363dedc-exchange.chunk.js +0 -2
- package/dist/scripts/690-156f0a308e-exchange.chunk.js +0 -1
- package/dist/scripts/806-9af813501e-exchange.chunk.js +0 -1
- package/dist/scripts/85-2a5efab527-exchange.chunk.js +0 -1
- package/dist/scripts/854-d6b410b34c-exchange.chunk.js +0 -1
- package/dist/scripts/923-cd7764743c-exchange.chunk.js +0 -1
- package/dist/scripts/bundle-36bc8a20f7.min.js +0 -2
- /package/dist/css/{665-exchange-5d3ec54337.chunk.css → 979-exchange-5d3ec54337.chunk.css} +0 -0
- /package/dist/scripts/{165-adbe9f6e64-exchange.chunk.js.LICENSE.txt → 165-4d86be0aaf-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{439-a1bfef6a86-exchange.chunk.js → 439-74ec08660e-exchange.chunk.js} +0 -0
- /package/dist/scripts/{442-86f05b08c6-exchange.chunk.js → 442-c20430f56e-exchange.chunk.js} +0 -0
- /package/dist/scripts/{636-f0abef5736-exchange.chunk.js.LICENSE.txt → 636-3b2c777459-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{665-8d5363dedc-exchange.chunk.js.LICENSE.txt → 979-15942d8f39-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-36bc8a20f7.min.js.LICENSE.txt → bundle-e2cf3e26c9.min.js.LICENSE.txt} +0 -0
package/jest.config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const getBaseConfig = require('../../libs/testing/jest.base.config');
|
|
2
|
-
const { compilerOptions } = require('./tsconfig');
|
|
3
|
-
|
|
4
|
-
const paths = {
|
|
5
|
-
...compilerOptions.paths,
|
|
6
|
-
'shared/*': ['./src/shared/*'],
|
|
7
|
-
'apps/*': ['./src/apps/*']
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
delete paths['*'];
|
|
11
|
-
|
|
1
|
+
const getBaseConfig = require('../../libs/testing/jest.base.config');
|
|
2
|
+
const { compilerOptions } = require('./tsconfig');
|
|
3
|
+
|
|
4
|
+
const paths = {
|
|
5
|
+
...compilerOptions.paths,
|
|
6
|
+
'shared/*': ['./src/shared/*'],
|
|
7
|
+
'apps/*': ['./src/apps/*']
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
delete paths['*'];
|
|
11
|
+
|
|
12
12
|
module.exports = getBaseConfig(paths);
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clickview/exchange",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "ClickView exchange",
|
|
5
|
-
"main": "dist/scripts/bundle.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "cross-env NODE_ENV=development webpack -w --config ./tooling/webpack.config.js",
|
|
8
|
-
"build": "cross-env NODE_ENV=production webpack --config ./tooling/webpack.config.js",
|
|
9
|
-
"test": "jest",
|
|
10
|
-
"test-watch": "jest --watch"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://gitlab.cvinternal.net/front-end/clickview"
|
|
15
|
-
},
|
|
16
|
-
"cv": {
|
|
17
|
-
"publishable": true,
|
|
18
|
-
"rebuildable": true
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"moment-timezone": "0.5.43"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/moment-timezone": "0.5.30"
|
|
25
|
-
},
|
|
26
|
-
"author": "Shale Kuzmanovski",
|
|
27
|
-
"license": "ISC",
|
|
28
|
-
"babel": {
|
|
29
|
-
"presets": [
|
|
30
|
-
[
|
|
31
|
-
"@babel/preset-env",
|
|
32
|
-
{
|
|
33
|
-
"corejs": 3,
|
|
34
|
-
"useBuiltIns": "entry"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clickview/exchange",
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "ClickView exchange",
|
|
5
|
+
"main": "dist/scripts/bundle.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "cross-env NODE_ENV=development webpack -w --config ./tooling/webpack.config.js",
|
|
8
|
+
"build": "cross-env NODE_ENV=production webpack --config ./tooling/webpack.config.js",
|
|
9
|
+
"test": "jest",
|
|
10
|
+
"test-watch": "jest --watch"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://gitlab.cvinternal.net/front-end/clickview"
|
|
15
|
+
},
|
|
16
|
+
"cv": {
|
|
17
|
+
"publishable": true,
|
|
18
|
+
"rebuildable": true
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"moment-timezone": "0.5.43"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/moment-timezone": "0.5.30"
|
|
25
|
+
},
|
|
26
|
+
"author": "Shale Kuzmanovski",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"babel": {
|
|
29
|
+
"presets": [
|
|
30
|
+
[
|
|
31
|
+
"@babel/preset-env",
|
|
32
|
+
{
|
|
33
|
+
"corejs": 3,
|
|
34
|
+
"useBuiltIns": "entry"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
interface SetLanguageOptions {
|
|
2
|
-
validate: boolean;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface LanguageSet {
|
|
6
|
-
[languagecode: string]: Language;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Language {
|
|
10
|
-
englishName: string;
|
|
11
|
-
nativeName: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface ICVLanguages {
|
|
15
|
-
VERSION: string;
|
|
16
|
-
|
|
17
|
-
getEnglishName(languageCode: string): string;
|
|
18
|
-
getNativeName(languageCode: string): string;
|
|
19
|
-
getFullEnglishName(languageCode: string): string;
|
|
20
|
-
getFullNativeName(languageCode: string): string;
|
|
21
|
-
getEnglishNameContains(englishName: string): Language[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare let CVLanguages: ICVLanguages;
|
|
1
|
+
interface SetLanguageOptions {
|
|
2
|
+
validate: boolean;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface LanguageSet {
|
|
6
|
+
[languagecode: string]: Language;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Language {
|
|
10
|
+
englishName: string;
|
|
11
|
+
nativeName: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ICVLanguages {
|
|
15
|
+
VERSION: string;
|
|
16
|
+
|
|
17
|
+
getEnglishName(languageCode: string): string;
|
|
18
|
+
getNativeName(languageCode: string): string;
|
|
19
|
+
getFullEnglishName(languageCode: string): string;
|
|
20
|
+
getFullNativeName(languageCode: string): string;
|
|
21
|
+
getEnglishNameContains(englishName: string): Language[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare let CVLanguages: ICVLanguages;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare function cloneDeep<T>(obj: T): T;
|
|
2
|
-
|
|
3
|
-
declare module 'lodash.clonedeep' {
|
|
4
|
-
export = cloneDeep;
|
|
1
|
+
declare function cloneDeep<T>(obj: T): T;
|
|
2
|
+
|
|
3
|
+
declare module 'lodash.clonedeep' {
|
|
4
|
+
export = cloneDeep;
|
|
5
5
|
}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
|
|
5
|
-
|
|
6
|
-
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
|
|
7
|
-
Exposed=Window]
|
|
8
|
-
interface IntersectionObserver {
|
|
9
|
-
readonly attribute Element? root;
|
|
10
|
-
readonly attribute DOMString rootMargin;
|
|
11
|
-
readonly attribute sequence<double> thresholds;
|
|
12
|
-
void observe(Element target);
|
|
13
|
-
void unobserve(Element target);
|
|
14
|
-
void disconnect();
|
|
15
|
-
sequence<IntersectionObserverEntry> takeRecords();
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
|
|
19
|
-
interface IntersectionObserverEntry {
|
|
20
|
-
readonly attribute DOMHighResTimeStamp time;
|
|
21
|
-
readonly attribute DOMRectReadOnly rootBounds;
|
|
22
|
-
readonly attribute DOMRectReadOnly boundingClientRect;
|
|
23
|
-
readonly attribute DOMRectReadOnly intersectionRect;
|
|
24
|
-
readonly attribute double intersectionRatio;
|
|
25
|
-
readonly attribute Element target;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
dictionary IntersectionObserverEntryInit {
|
|
29
|
-
required DOMHighResTimeStamp time;
|
|
30
|
-
required DOMRectInit rootBounds;
|
|
31
|
-
required DOMRectInit boundingClientRect;
|
|
32
|
-
required DOMRectInit intersectionRect;
|
|
33
|
-
required double intersectionRatio;
|
|
34
|
-
required Element target;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
dictionary IntersectionObserverInit {
|
|
38
|
-
Element? root = null;
|
|
39
|
-
DOMString rootMargin = "0px";
|
|
40
|
-
(double or sequence<double>) threshold = 0;
|
|
41
|
-
};
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
interface Bounds {
|
|
45
|
-
readonly height: number;
|
|
46
|
-
readonly width: number;
|
|
47
|
-
readonly top: number;
|
|
48
|
-
readonly left: number;
|
|
49
|
-
readonly right: number;
|
|
50
|
-
readonly bottom: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface IntersectionObserverEntry {
|
|
54
|
-
readonly time: number;
|
|
55
|
-
readonly rootBounds: Bounds;
|
|
56
|
-
readonly boundingClientRect: Bounds;
|
|
57
|
-
readonly intersectionRect: Bounds;
|
|
58
|
-
readonly intersectionRatio: number;
|
|
59
|
-
readonly target: Element;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
type IntersectionObserverCallback = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
|
|
63
|
-
|
|
64
|
-
interface IntersectionObserverInit {
|
|
65
|
-
root?: Element | null;
|
|
66
|
-
rootMargin?: string;
|
|
67
|
-
threshold?: number;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
declare class IntersectionObserver {
|
|
71
|
-
readonly root: Element | null;
|
|
72
|
-
readonly rootMargin: string;
|
|
73
|
-
readonly thresholds: number[];
|
|
74
|
-
|
|
75
|
-
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
|
|
76
|
-
|
|
77
|
-
observe(target: Element): void;
|
|
78
|
-
unobserve(target: Element): void;
|
|
79
|
-
disconnect(): void;
|
|
80
|
-
takeRecords(): IntersectionObserverEntry[];
|
|
81
|
-
}
|
|
82
|
-
|
|
1
|
+
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
|
|
5
|
+
|
|
6
|
+
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
|
|
7
|
+
Exposed=Window]
|
|
8
|
+
interface IntersectionObserver {
|
|
9
|
+
readonly attribute Element? root;
|
|
10
|
+
readonly attribute DOMString rootMargin;
|
|
11
|
+
readonly attribute sequence<double> thresholds;
|
|
12
|
+
void observe(Element target);
|
|
13
|
+
void unobserve(Element target);
|
|
14
|
+
void disconnect();
|
|
15
|
+
sequence<IntersectionObserverEntry> takeRecords();
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
|
|
19
|
+
interface IntersectionObserverEntry {
|
|
20
|
+
readonly attribute DOMHighResTimeStamp time;
|
|
21
|
+
readonly attribute DOMRectReadOnly rootBounds;
|
|
22
|
+
readonly attribute DOMRectReadOnly boundingClientRect;
|
|
23
|
+
readonly attribute DOMRectReadOnly intersectionRect;
|
|
24
|
+
readonly attribute double intersectionRatio;
|
|
25
|
+
readonly attribute Element target;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
dictionary IntersectionObserverEntryInit {
|
|
29
|
+
required DOMHighResTimeStamp time;
|
|
30
|
+
required DOMRectInit rootBounds;
|
|
31
|
+
required DOMRectInit boundingClientRect;
|
|
32
|
+
required DOMRectInit intersectionRect;
|
|
33
|
+
required double intersectionRatio;
|
|
34
|
+
required Element target;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
dictionary IntersectionObserverInit {
|
|
38
|
+
Element? root = null;
|
|
39
|
+
DOMString rootMargin = "0px";
|
|
40
|
+
(double or sequence<double>) threshold = 0;
|
|
41
|
+
};
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
interface Bounds {
|
|
45
|
+
readonly height: number;
|
|
46
|
+
readonly width: number;
|
|
47
|
+
readonly top: number;
|
|
48
|
+
readonly left: number;
|
|
49
|
+
readonly right: number;
|
|
50
|
+
readonly bottom: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface IntersectionObserverEntry {
|
|
54
|
+
readonly time: number;
|
|
55
|
+
readonly rootBounds: Bounds;
|
|
56
|
+
readonly boundingClientRect: Bounds;
|
|
57
|
+
readonly intersectionRect: Bounds;
|
|
58
|
+
readonly intersectionRatio: number;
|
|
59
|
+
readonly target: Element;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type IntersectionObserverCallback = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
|
|
63
|
+
|
|
64
|
+
interface IntersectionObserverInit {
|
|
65
|
+
root?: Element | null;
|
|
66
|
+
rootMargin?: string;
|
|
67
|
+
threshold?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class IntersectionObserver {
|
|
71
|
+
readonly root: Element | null;
|
|
72
|
+
readonly rootMargin: string;
|
|
73
|
+
readonly thresholds: number[];
|
|
74
|
+
|
|
75
|
+
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
|
|
76
|
+
|
|
77
|
+
observe(target: Element): void;
|
|
78
|
+
unobserve(target: Element): void;
|
|
79
|
+
disconnect(): void;
|
|
80
|
+
takeRecords(): IntersectionObserverEntry[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
83
|
export = IntersectionObserver;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare namespace trackJs {
|
|
2
|
-
declare function track(error: string | Error): void;
|
|
1
|
+
declare namespace trackJs {
|
|
2
|
+
declare function track(error: string | Error): void;
|
|
3
3
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import videojs from 'video.js';
|
|
2
|
-
|
|
3
|
-
declare module 'video.js' {
|
|
4
|
-
export interface VideoJsPlayer {
|
|
5
|
-
qualityLevels(): QualityLevelList;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare module 'videojs-contrib-quality-levels' {
|
|
10
|
-
export interface QualityLevelList extends videojs.EventTarget {
|
|
11
|
-
[id: string]: QualityLevel;
|
|
12
|
-
selectedIndex: number;
|
|
13
|
-
length: number;
|
|
14
|
-
addQualityLevel(representation: Representation): QualityLevel;
|
|
15
|
-
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
16
|
-
getQualityLevelById(id: string): QualityLevel;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface QualityLevel {
|
|
20
|
-
id: string;
|
|
21
|
-
label: string;
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface Representation {
|
|
26
|
-
id: string;
|
|
27
|
-
enabled(enabled: boolean): boolean;
|
|
28
|
-
}
|
|
1
|
+
import videojs from 'video.js';
|
|
2
|
+
|
|
3
|
+
declare module 'video.js' {
|
|
4
|
+
export interface VideoJsPlayer {
|
|
5
|
+
qualityLevels(): QualityLevelList;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module 'videojs-contrib-quality-levels' {
|
|
10
|
+
export interface QualityLevelList extends videojs.EventTarget {
|
|
11
|
+
[id: string]: QualityLevel;
|
|
12
|
+
selectedIndex: number;
|
|
13
|
+
length: number;
|
|
14
|
+
addQualityLevel(representation: Representation): QualityLevel;
|
|
15
|
+
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
16
|
+
getQualityLevelById(id: string): QualityLevel;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QualityLevel {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Representation {
|
|
26
|
+
id: string;
|
|
27
|
+
enabled(enabled: boolean): boolean;
|
|
28
|
+
}
|
|
29
29
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define our templates as a module so that we can use
|
|
3
|
-
* import statements just the same as we do for other
|
|
4
|
-
* ts/js code.
|
|
5
|
-
*/
|
|
6
|
-
declare module '*.scss';
|
|
7
|
-
declare module '*.svg';
|
|
8
|
-
|
|
9
|
-
declare module '*.json' {
|
|
10
|
-
export const value: any;
|
|
11
|
-
export default value;
|
|
1
|
+
/**
|
|
2
|
+
* Define our templates as a module so that we can use
|
|
3
|
+
* import statements just the same as we do for other
|
|
4
|
+
* ts/js code.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.scss';
|
|
7
|
+
declare module '*.svg';
|
|
8
|
+
|
|
9
|
+
declare module '*.json' {
|
|
10
|
+
export const value: any;
|
|
11
|
+
export default value;
|
|
12
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[127],{69834:(t,e,r)=>{r.d(e,{r:()=>j});var n=r(50242),o=r(81886),a=r(67058),i=r(23481),u=r(64364);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(o)?o:String(o)),n)}var o}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p="shared.privateResourceError",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(n);if(o){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(p,"title"))}return e=u,(r=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(p,"heading")}},{key:"description",get:function(){return i.T.getPhrase(p,"description")}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==d(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===d(o)?o:String(o)),n)}var o}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g="shared.regionLockedResourceError",h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m(n);if(o){var r=m(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(g,"title"))}return e=u,(r=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(g,"heading")}},{key:"description",get:function(){return i.T.getPhrase(g,"description")}}])&&v(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H),O=r(49075),w={notFound:a.d,forbidden:{rating:y,yearLevel:y,region:h,privacy:y},badRequest:O._};function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var a;a="number"==typeof t?t:t.status;var i=Object.assign(Object.assign({},w),e);a&&o.Q.Ry.isStatusCodeError(a)&&(a!==n.o.NotFound?a!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new i.badRequest):r.forbidden||o.Q.Ry.throw(new i.forbidden.privacy):r.notFound||o.Q.Ry.throw(new i.notFound))}}},91286:(t,e,r)=>{r.d(e,{v:()=>i});var n=r(32735),o=r(69834);function a(t){return t.map((function(t){return t.statusCode})).join(":")}function i(t,e,r){var i=Array.isArray(t)?t:[t];(0,n.useEffect)((function(){i.forEach((function(t){(0,o.r)(t.statusCode,e,r)}))}),[a(i),e,r])}},5353:(t,e,r)=>{r.d(e,{i:()=>f});var n,o=r(99940),a=r(97395),i=r(110);!function(t){t[t.AllResults=0]="AllResults",t[t.Subtitles=1]="Subtitles",t[t.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var u=r(55812);function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t){return Object.entries(t).reduce((function(t,e){var r,n,o=(n=2,function(t){if(Array.isArray(t))return t}(r=e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}}(r,n)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return t[a.charAt(0).toLowerCase()+a.slice(1)]=i,t}),{})}function l(t){return t?Array.isArray(t)?function(t){return t.map(s)}(t):s(t):null}var f={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(t){return{url:"/api/tv/api/v2/regions/".concat(t),key:"tv:region:".concat(t),normalize:!1,formatData:l}},dateRange:function(t){return{url:"/api/tv/api/v2/regions/".concat(t,"/daterange"),key:"tv:region:".concat(t,":daterange"),normalize:!1,formatData:l}},channels:function(t){return{url:a._.urlBuilder("/api/tv/api/v2/channels",{region:t}),key:"tv:channels:".concat(t),normalize:!1,formatData:function(t){return l(t).sort((function(t,e){return t.sortOrder-e.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},programsByChannel:function(t,e,r,n){return{url:a._.urlBuilder("/api/tv/api/v3/regions/".concat(t,"/channels/programs"),{channel:e,startDate:r,endDate:n}),key:["tv:programs:by:channel",t,e,r,n].join(":"),normalize:!1,formatData:l}},programsByLetter:function(t,e,r,n){return{url:a._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:t,startsWith:e,startDate:r,endDate:n}),key:["tv:programs:by:letter",t,e,r,n].join(":"),normalize:!1,formatData:l}},program:function(t){return{url:"/api/tv/api/v3/programs/".concat(t),key:"tv:programs:".concat(t),normalize:!1,formatData:function(t){var e=l(t);return e.region=l(t.Region),e}}},search:function(t,e,r){var o=e.query,i=e.dateBroadcast,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(e,["query","dateBroadcast"]),s=r||1,f=c.filter||n.AllResults;return{url:a._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:t,query:o,filter:f},u.a.getDateBroadcastParams(i)),c),{page:s,size:25})),key:["tv:search",o,t,Object.values(Object.assign({filter:f,dateBroadcast:i},c)).join(":"),s].join(":"),normalize:!1,formatData:function(t){var e=l(t);return e.results=l(t.Results),e.page=s,e}}},addFullVideo:function(t,e){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:o.k.POST,data:t,invalidationKeys:"tv:workspace:video:".concat(e)}},addAdFreeVideo:function(t,e){return{url:a._.urlBuilder("/api/tv/v4/programs/".concat(t.id,"/ad-free"),{customerId:t.customerId,userId:t.userId}),key:"tv:add:ad:free:video",normalize:!1,type:o.k.POST,invalidationKeys:"tv:workspace:video:".concat(e)}},adFreeCredits:function(t,e){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=i.O.add(r,1,"day");return{url:a._.urlBuilder("/api/tv/api/v1/user-requests",{username:t,region:e,from:i.O.convertUTCToLocal(r).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(t){return{url:a._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:t.userId,customerId:t.customerId}),key:"tv:create:add:free:request",normalize:!1,type:o.k.POST,data:{programId:t.programId,regionCode:t.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(t,e,r){return{url:a._.urlBuilder("/api/tv/v4/workspace/programs/".concat(t),{userId:e,customerId:r}),key:"tv:workspace:video:".concat(t),formatData:l}},requestProgram:function(t){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:o.k.POST,data:t}}}},55812:(t,e,r)=>{r.d(e,{a:()=>o});var n=r(110),o={getFormattedDateRange:function(t,e){return"".concat(n.O.format(t,"Do MMMM yyyy")," - ").concat(n.O.format(e,"Do MMMM yyyy"))},getDateBroadcastParams:function(t){var e=function(t){return n.O.format(t,"YYYY-MM-DD")},r=e(new Date);switch(t){case"yesterday":return{from:e(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:e(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:e(n.O.subtract(r,14,"days")),to:r}}}}},82127:(t,e,r)=>{r.r(e),r.d(e,{TvHomeView:()=>l});var n=r(32735),o=r(81886),a=r(20354),i=r(91286),u=r(73818),c=r(82329),s=r(5353);function l(){var t=a.a.useBasicFetch(s.i.regions());return(0,i.v)(t),n.useEffect((function(){var e;(null===(e=t.data)||void 0===e?void 0:e.length)&&o.Q.C$.trigger({application:c.O.TV,action:u.e.Tv.CHANNELS,args:[t.data[0].code]},{replace:!0})}),[t.data]),n.createElement(n.Fragment,null)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[13],{78681:(e,t,n)=>{n.d(t,{Z:()=>a});var a={ratings:function(){return{url:"/api/domain/v2/me/ratings",key:"ratings"}}}},47399:(e,t,n)=>{n.d(t,{n:()=>d});var a=n(32735),i=n(81886),r=n(83914),l=n(35223),o=n(73818),s=n(82329);const c={searchBar:"YbmeO"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function d(e){var t,n,d,m=(n=a.useState(null!==(t=e.query)&&void 0!==t?t:""),d=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(n,d)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(n,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],v=m[1];return a.createElement("form",{onSubmit:function(e){e.preventDefault(),p&&i.Q.C$.trigger({application:s.O.EXCHANGE,action:o.e.Exchange.SEARCH,params:{query:p}})}},a.createElement("div",{className:"".concat(c.searchBar," d-flex border border-dark rounded align-items-center mb-3")},a.createElement(r.x,{svgName:l.vn.Search}),a.createElement("input",{type:"text",className:"form-control h-100 w-100 py-0 border-0 shadow-none",placeholder:"Search for resources in the Exchange Archive",value:p,onChange:function(e){return v(e.target.value)},autoComplete:"off"})))}},16757:(e,t,n)=>{n.r(t),n.d(t,{ExchangeSearchResultsView:()=>Ut});var a=n(32735),i=n(20354),r=n(65858),l=n(68050),o=n(69111),s=n(75896),c=n(57408),u=n(33101),d=n(83345),m=n(79967),p="search.collectionVideoList";function v(e){var t,n=(t=(0,m.k)()).xs?2:t.sm?1:3,i={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return a.createElement(a.Fragment,null,a.createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,n).map((function(t){var n,r=!!t.episodeNumber&&!!(null===(n=t.season)||void 0===n?void 0:n.id);return a.createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},a.createElement(c.F,Object.assign({},i,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&a.createElement(a.Fragment,null,a.createElement(u.Qn,{video:t})," "),t.name))}))),a.createElement(c.F,Object.assign({},i,{className:"info-link",appLink:e.appLink}),a.createElement(d.x,{namespace:p,phrase:"seeAll"})))}var g=n(64887),f=n(29254),y=n(17464),h=n(85473),b=n(85177),E=n(54569),A=n(9977),k=n(54610);function S(e){var t,n,i,l,s=(0,m.k)(),u="sm"===A.O.getSize(s,"md"),p=!!(null===(n=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),S=p&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),O=(l=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),S&&(l.videoId=S.id,l.videoName=S.name),l),w="series"===e.collectionType;return a.createElement("div",{className:"row g-0 ".concat(u?"":"py-2")},a.createElement(o.Z,Object.assign({},A.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(u?"pb-2 pe-2":"mb-1 px-2")}),a.createElement("div",{className:"position-relative overflow-hidden ".concat(u?"rounded":"rounded-3")},a.createElement(h.Z,{data:null==S?void 0:S.thumbnail,appLink:e.appLink,imageType:k.__.Thumbnails,analyticsData:O,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Thumbnail})},a.createElement(E.z,{type:e.maskType}),a.createElement(b.oy,{type:e.imageFallbackType}),a.createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat("AZSmh")},a.createElement(d.x,{namespace:"search.collectionThumbnail",phrase:"seeAll"}))))),a.createElement(o.Z,Object.assign({},A.O.getDetailsColumns(),{className:u?"pb-2":"px-2"}),!e.isPlugin&&a.createElement(g.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-end mt-n1",actionsDropdownClassName:"btn btn-link ms-1"}),a.createElement(c.F,{appLink:e.appLink,analyticsData:O,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Title})},a.createElement("h5",{className:"m-0 mb-1"},a.createElement("span",{className:"clamp-1"},e.collection.name))),w&&!e.hideBadges&&a.createElement(y.c,null,a.createElement(f.C,{type:f.g.Rating,data:e.collection.rating}),a.createElement(f.C,{type:f.g.ProductionYear,data:null===(i=e.collection.metadata)||void 0===i?void 0:i.year})),p&&a.createElement(v,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:O,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Link}),getVideoAppLink:e.getVideoAppLink})))}const O={playlistItem:"CaRJx",playlistItemGradient:"BI7p2",playlistMetadata:"eDk1l",partialHeading:"w4lWh",ownerAvatarContainer:"JImqE"};var w=["second","minute","hour","day","week","month","year"],x=["秒","分钟","小时","天","周","个月","年"],L={},C=function(e,t){L[e]=t},j=[60,60,24,7,365/7/12,12];function N(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var I=function(e,t,n){var a=function(e,t){return(+(t?N(t):new Date)-+N(e))/1e3}(e,n&&n.relativeDate);return function(e,t){for(var n=e<0?1:0,a=e=Math.abs(e),i=0;e>=j[i]&&i<j.length;i++)e/=j[i];return(e=Math.floor(e))>(0==(i*=2)?9:1)&&(i+=1),t(e,i,a)[n].replace("%s",e.toString())}(a,function(e){return L[e]||L.en_US}(t))};C("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=w[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),C("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=x[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}));var T=n(23481),P=n(110);const F={fontSmall:"OYBRp"};var _="playlists.playlistCount";function R(e){var t=function(e){var t,n,a,i,r,l;return!!e&&(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.count)&&void 0!==n?n:0)+(null!==(i=null===(a=e.interactives)||void 0===a?void 0:a.count)&&void 0!==i?i:0)+(null!==(l=null===(r=e.clips)||void 0===r?void 0:r.count)&&void 0!==l?l:0)}(e.playlist);return!1===t||Number.isNaN(t)?a.createElement(a.Fragment,null):a.createElement("span",{className:F.fontSmall},a.createElement(d.x,{namespace:_,phrase:"count",options:{smartCount:t}}))}var D=n(91374),U=n(2786);const V={avatar:"_N1vT"};function q(){return a.createElement("div",{className:V.avatar},a.createElement(U.Sd,null))}var M=n(55452);function H(e){var t,n,i,r=e.playlist._liteOwner;if(null===(t=e.playlist._isClickViewPlaylist)||void 0===t?void 0:t.value)return a.createElement(q,null);if(!(null==r?void 0:r.id)||!(null===(n=e.currentUser)||void 0===n?void 0:n.id))return a.createElement(a.Fragment,null);if(r.id.toString()===e.currentUser.id.toString())return a.createElement(a.Fragment,null);var l="string"==typeof r.avatar?r.avatar:null===(i=r.avatar)||void 0===i?void 0:i.url;return a.createElement(D.q,{imageUrl:l,imageCdnUrl:e.imageCdnUrl,initials:M.l.getInitials(r.name,r.surname)})}var Z=n(70498),G=n(38326),B=n(9085),$=n(67453),W="playlists.playlistList";function z(e){var t,n,i=$.j.createUrl(e.data.cover&&e.data.cover.url,{size:k.h2.Medium,resizeType:k.Nq.Cover}),l=e.data.subjectPresentationAudiences&&e.data.subjectPresentationAudiences.data,o=(0,G.n)(l,e.presentationAudiences),s=O.playlistItem,u=!!i||!!e.showFallbackImage;u&&(s+=" ".concat(O.playlistItemGradient)),!u&&e.bgColourClassNames&&(s+=" ".concat(O.playlistItem," ").concat((0,B.x)(e.data.name,e.bgColourClassNames))),"round"===e.itemStyle&&(s+=" rounded-3 overflow-hidden"),"round-left"===e.itemStyle&&(s+=" rounded-start-lg overflow-hidden");var d=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),m=Object.assign(Object.assign({},e.analyticsOptions),{entity:r.py.Playlist});return a.createElement(c.F,{appLink:e.appLink,analyticsData:d,analyticsOptions:m,title:function(){var t;return!e.data.contentModifiedDate||(null===(t=e.data._isClickViewPlaylist)||void 0===t?void 0:t.value)?"":T.T.getPhrase(W,"lastUpdated",{timeago:I(P.O.convertUTCToLocal(e.data.contentModifiedDate))})}()},a.createElement(h.Z,{data:i,alt:e.data.name,className:s},!!e.showFallbackImage&&a.createElement(b.oy,{type:b.mS.Playlist}),a.createElement("div",{className:"text-white ".concat(O.playlistMetadata)},!!e.showCount&&a.createElement(R,{playlist:e.data}),a.createElement("h5",{className:"mb-0 ".concat(e.titleClassName||"")},a.createElement("span",{className:"clamp-2"},e.data.name)),!!l&&!!l.length&&!!o&&a.createElement(Z.P,{className:"".concat(e.audienceLabelClass?e.audienceLabelClass:""," mt-1"),audience:o,border:"white"})),!!e.showOwner&&!!e.imageCdnUrl&&a.createElement("div",{className:O.ownerAvatarContainer},a.createElement(H,{playlist:e.data,currentUser:e.currentUser,imageCdnUrl:e.imageCdnUrl}))))}z.defaultProps={itemStyle:"square"},r.Vw.Click,r.py.Playlist,r.LZ.PlaylistListItem,r._S.Cover;var Y=n(55577),X=n(7733);function Q(e){var t,n=(t=(0,m.k)()).xl||t.xxl?3:2,i=e.playlist.videos.data.slice(0,n),s={actionType:r.Vw.Click,entity:r.py.Playlist,location:r.LZ.PlaylistWithVideos},u=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(l.Z,{className:"g-0 border border-light rounded-3"},a.createElement(o.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(z,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:X.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),a.createElement(o.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat("eEZEe")},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},u),{videoId:t.id,videoName:t.name});return a.createElement(Y.m,{key:t.id,video:t,getSeriesAppLink:e.getSeriesAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(c.F,{className:"info-link fw-semibold",appLink:e.playlistAppLink,analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Link})},a.createElement(d.x,{namespace:"search.playlistWithVideos",phrase:"seeAllVideos"})))))))}var J=n(49439);const K={labelContainer:"ieonz",hoverActive:"vqHCl",mask:"qEOPN",largeHoverTitle:"ZYApF",smallHoverTitle:"qcfHO",largeHoverDescription:"Uh4gM",smallHoverDescription:"TiqqV"};function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function te(e){var t,n,i=(t=(0,J.L)({className:K.hoverActive}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],l=i[1],o=e.series&&e.series.subjectPresentationAudiences&&e.series.subjectPresentationAudiences.data||[],s=(0,G.n)(o,e.presentationAudiences),c=!!(o&&o.length&&s);return a.createElement("div",{ref:r},l&&a.createElement("div",{className:"py-3 text-white text-center mb-3 ".concat(K.mask)},a.createElement("h3",{className:"fw-semibold ".concat(K.hoverTitle," ").concat(e.isSmall?K.smallHoverTitle:K.largeHoverTitle)},a.createElement("span",{className:"clamp-3"},e.series.name)),!!e.series.description&&a.createElement("p",{className:"".concat(K.hoverDescription," ").concat(e.isSmall?K.smallHoverDescription:K.largeHoverDescription," mb-0")},e.series.description)),a.createElement(h.Z,{data:e.series.tallPoster,alt:e.series.name,imageType:k.__.TallPosters,preload:e.preloadImage,imageOptions:{size:k.h2.Large},imageClassName:e.imageClass?e.imageClass:"rounded-3"},a.createElement(b.oy,{type:b.mS.Series}),a.createElement("div",{className:"position-absolute text-white ".concat(K.labelContainer)},c?a.createElement(Z.P,{audience:s,border:"white"}):a.createElement(f.C,{type:f.g.Rating,data:e.series.rating}))))}function ne(e){var t,n=(t=(0,m.k)()).xl||t.xxl?5:t.lg||t.md?4:3,i=e.series.videos.data.slice(0,n),s={actionType:r.Vw.Click,entity:r.py.Series,location:r.LZ.SeriesWithVideos},u=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(l.Z,{className:"g-0 border border-light rounded-3"},a.createElement(o.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(c.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.TallPoster})},a.createElement(te,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-start-lg"}))),a.createElement(o.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat("UT8bc")},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},u),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),a.createElement(Y.m,{key:t.id,video:t,getSeriesAppLink:function(){return e.seriesAppLink},canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(c.F,{className:"info-link fw-semibold",appLink:e.seriesAppLink,analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Link})},a.createElement(d.x,{namespace:"search.seriesWithVideos",phrase:"seeAllVideos"})))))))}var ae=n(1048);function ie(e){return ie="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},ie(e)}function re(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||se(e)||le(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function se(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var ce={"featured-result":1,"topic-list":8,company:8,"playlist-with-videos":1,"series-with-videos":1,"series-thumbnail":1,"playlist-thumbnail":1,"video-item":1,"companies-and-topics":16},ue={flattenResults:function(e){return e?e.results?Object.assign(Object.assign({},e),{results:s.m.flatten(e.results)}):Object.assign(Object.assign({},e),{results:[]}):null},getContextualSearchQueryParams:function(e){return e&&e.get("filterParam")?(t={},n=e.get("filterParam"),a=e.get("filterValue"),(n=function(e){var t=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==ie(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ie(t)?t:String(t)}(n))in t?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a,t):{};var t,n,a},mapMaxScoreToSearchResults:function(e,t){return e.map((function(e){return t?Object.assign(Object.assign({},e),{_maxScore:t}):e}))},groupResults:function(e,t,n,a,i){var r,l;if(!(null==e?void 0:e.length)&&!(null===(r=null==t?void 0:t.results)||void 0===r?void 0:r.length)&&!(null===(l=null==n?void 0:n.results)||void 0===l?void 0:l.length))return[];var o,s,c,u,d=function(e){if(Array.isArray(e))return e}(u=e)||se(u)||le(u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=d[0],p=d.slice(1),v=i.xs||i.sm,g=function(e,t,n,a,i){var r,l,o,s,c,u,d,m=i?"playlist-thumbnail":"playlist-with-videos",p=i?"series-thumbnail":"series-with-videos",v=[{type:"companies-and-topics",items:null!==(c=[].concat(re(null!==(l=null===(r=null==n?void 0:n.results)||void 0===r?void 0:r.slice(0,ce.company))&&void 0!==l?l:[]),re(null!==(s=null===(o=null==t?void 0:t.results)||void 0===o?void 0:o.slice(0,ce["topic-list"]))&&void 0!==s?s:[])))&&void 0!==c?c:[]},{type:"featured-result",items:ae.t.isEmpty(a)?[]:[a]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:m,items:[]},{type:p,items:[]},{heading:T.T.getPhrase("sharedSearch.utils","relatedTopics"),type:"topic-list",items:null!==(d=null===(u=null==t?void 0:t.results)||void 0===u?void 0:u.slice(ce["topic-list"],2*ce["topic-list"]))&&void 0!==d?d:[]}],g=!1;return null==e||e.forEach((function(e){var t=de(e,i);if(!e._featured||g||"video"!==e._index)if(v[2].items.length<ce["video-item"]&&"video-item"===t)v[2].items.push(e);else if(v[3].items.length<ce["video-item"]&&"video-item"===t)v[3].items.push(e);else if(v[4].items.length<ce["video-item"]&&"video-item"===t)v[4].items.push(e);else if(v[5].items.length<ce[m]&&t===m)v[5].items.push(e);else if(v[6].items.length<ce[p]&&t===p)v[6].items.push(e);else{var n=v[v.length-1];if((null==n?void 0:n.type)===t){var a=ce[t];n.items.length>=a?v.push({type:t,items:[e]}):n.items.push(e)}else v.push({type:t,items:[e]})}else g=!0})),v.filter((function(e){var t;return null===(t=e.items)||void 0===t?void 0:t.length}))}(m,t,n,a,v);return(null==p?void 0:p.length)?(s=g,c=v,(o=p)?(o.forEach((function(e){var t=s[s.length-1],n=!0;e.forEach((function(e){var a=de(e,c);if(n&&t.type===a)t.items.length>=ce[a]?(n=!1,s.push({type:a,items:[e]})):t.items.push(e);else{var i=s[s.length-1];(null==i?void 0:i.type)===a?i.items.length>=ce[a]?s.push({type:a,items:[e]}):i.items.push(e):s.push({type:a,items:[e]})}}))})),s):s):g}};function de(e,t){var n;return"video"===e._index||"interactive"===e._index||"clip"===e._index?"video-item":"series"===e._index?(null===(n=e.tallPoster)||void 0===n?void 0:n.id)&&!t?"series-with-videos":"series-thumbnail":"classification"===e._index?"topic-list":"playlist"===e._index?t?"playlist-thumbnail":"playlist-with-videos":void 0}var me=n(49985),pe=n(92452),ve=n(12788),ge=n(78479),fe=function(e){return e.xs||e.sm};function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var be=a.forwardRef((function(e,t){var n=ye(a.useState(!1),2),i=n[0],r=n[1],l=ye(a.useState(null),2),o=l[0],s=l[1],c=a.useRef(),u=ye((0,J.X)(),2),d=u[0],p=u[1],v=(0,m.k)(),g=a.useCallback((function(){p||e.show||e.tagIsHovering?r(!0):(r(!1),s(null))}),[p,e.show,e.tagIsHovering]),f=a.useCallback((function(){var n,a,i,r,l=null===(n=c.current)||void 0===n?void 0:n.getBoundingClientRect(),o=null===(a=t.current)||void 0===a?void 0:a.getBoundingClientRect(),u=null===(r=null===(i=e.containerRef)||void 0===i?void 0:i.current)||void 0===r?void 0:r.getBoundingClientRect();if(l){var d=function(e,t,n,a,i){var r={padding:"".concat(10,"px 0"),visibility:"visible"},l=a.top-n.bottom;if(fe(i)){var o=t.height+l+20,s=document.documentElement.clientWidth-n.right+10,c=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:c,right:s,height:o})}switch(e){case ge.f.ThumbnailHeroMedia:var u=t.height+(l+20),d=document.documentElement.clientWidth-n.right+10,m=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:m,right:d,height:u});case ge.f.ThumbnailFeaturedMedia:var p=t.height+20,v=document.documentElement.clientWidth-n.right-t.width-20,g=n.bottom+window.scrollY-t.height-a.height-20;return Object.assign(Object.assign({},r),{top:g,right:v,height:p});case ge.f.ThumbnailFixedListMediaLarge:var f=n.height+l,y=document.documentElement.clientWidth-n.right+10,h=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:h,right:y,height:f})}}(e.widgetTemplate,l,u,o,v);s(d)}}),[c.current,t.current,e.containerRef,e.widgetTemplate,v]);if(a.useEffect((function(){var e=setTimeout(g,150),t=setTimeout(f,200);return function(){clearTimeout(e),clearTimeout(t)}}),[g,f]),!t.current)return a.createElement(a.Fragment,null);var y=e.childComponent;return i?(0,ve.createPortal)(a.createElement("div",{ref:d,className:"gZ3Ae",style:o},a.createElement(y,Object.assign({ref:c,isShowing:i&&o},e.childProps))),document.body):a.createElement(a.Fragment,null)}));function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ae=function(e){var t,n,i=(t=a.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],l=i[1];return a.useEffect((function(){l(!!e)}),[e]),{active:r,setActive:l}},ke=n(98495),Se=n(83914);function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function we(e){var t,n,i,r,l=(i=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(i,r)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,t):void 0}}(i,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=l[0],s=l[1],c=(0,m.k)(),u=null===(n=null===(t=e.containerRef)||void 0===t?void 0:t.current)||void 0===n?void 0:n.getBoundingClientRect(),d=function(e,t,n){return fe(n)?(null==e?void 0:e.height)-20:t===ge.f.ThumbnailFeaturedMedia?(null==e?void 0:e.height)-52+20:(null==e?void 0:e.height)-20}(u,e.widgetTemplate,c),p=function(e,t,n){if(fe(n))return{width:e.width-20};switch(t){case ge.f.ThumbnailHeroMedia:return{width:480,maxWidth:e.width-20};case ge.f.ThumbnailFeaturedMedia:return{width:null==e?void 0:e.width};case ge.f.ThumbnailFixedListMediaLarge:return{width:(null==e?void 0:e.width)-20}}}(u,e.widgetTemplate,c);return a.createElement("div",{className:"bg-white rounded-3 box-shadow overflow-hidden",style:Object.assign({maxHeight:d},p)},a.createElement("div",{className:"".concat("kiea4"," d-flex align-items-center px-3 py-2 ").concat(o?"box-shadow":"")},a.createElement("div",{className:"".concat("C3rvx"," bg-").concat(e.iconVariant," text-white rounded-circle")},a.createElement(Se.x,{svgName:e.svgName,size:Se.S.Large})),a.createElement("h2",{className:"h6 mb-0 ps-2"},e.heading)),a.createElement(ke.ZP,{onUpdate:function(e){var t=e.top;o&&0===t?s(!1):!o&&t>0&&s(!0)},autoHeight:!0,autoHeightMax:d-52},a.createElement("div",{className:"pb-3 px-3"},e.children)))}var xe=n(35223),Le=n(92827),Ce=T.T.encloseNamespace("shared.whatsIncluded"),je=a.forwardRef((function(e,t){return a.createElement("div",{ref:t},a.createElement(we,{iconVariant:"blue",heading:Ce("whatsIncluded"),svgName:xe.vn.Video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},a.createElement(Le.V,{video:e.video,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.imageErrorFallbackUrl,isShowing:e.isShowing})))})),Ne=n(6296),Ie=n(40370);function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Pe(e){var t,n,i=(t=(0,J.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],l=i[1],o=Ae(l),s=o.active,c=o.setActive;return a.useMemo((function(){return Ie.M.showWhatsIncluded(e.video)}),[e.video])?a.createElement(a.Fragment,null,a.createElement(Ne.V,{ref:r,active:s}),a.createElement(be,{childComponent:je,childProps:{video:e.video,imageCdnUrl:e.imageCdnUrl,imageErrorFallbackUrl:e.resourceThumbnailFallbackImageUrl,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},show:s,ref:r,setActive:c,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,tagIsHovering:l})):a.createElement(a.Fragment,null)}var Fe=n(20684),_e=T.T.encloseNamespace("shared.whyThisVideo"),Re=a.forwardRef((function(e,t){return a.createElement("div",{ref:t},a.createElement(we,{iconVariant:"navy",heading:_e("whyThisVideo"),svgName:xe.vn.StarOutline,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},a.createElement(Fe.p,{video:e.video,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest})))})),De=n(16226);function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Ve(e){var t,n,i=(t=(0,J.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ue(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],l=i[1],o=Ae(l),s=o.active,c=o.setActive;return a.useMemo((function(){return Ie.M.showWhyThisVideo(e.video)}),[e.video])?a.createElement(a.Fragment,null,a.createElement(De.A,{ref:r,active:s}),a.createElement(be,{childComponent:Re,childProps:{video:e.video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest},show:s,ref:r,setActive:c,tagIsHovering:l,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate})):a.createElement(a.Fragment,null)}var qe=n(85784),Me=n(70872),He=n(68626);function Ze(e){var t,n=e.video,i=e.presentationAudiences,s=e.videoAppLink,c=e.seriesAppLink,d=e.hideInteractiveBadge,m=null===(t=null==n?void 0:n.subjectPresentationAudiences)||void 0===t?void 0:t.data,p=(0,G.n)(m,i),v=(null==n?void 0:n.series)&&!!(null==n?void 0:n.series.id),g=me.k.mergeOptions(e.analyticsOptions,{location:r.LZ.ClassificationHero,entity:Ie.M.getAnalyticsEntity(n)}),h=a.useRef();return n?a.createElement(l.Z,null,a.createElement(o.Z,{xs:12,md:6},a.createElement("div",{ref:h},a.createElement(pe.u,{analyticsData:e.analyticsData,analyticsOptions:g,video:n,appLink:s,seriesAppLink:v?c:null,imageOptions:{size:k.h2.Medium},textPosition:He.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,audience:"thumbnail"===e.badgePosition?p:null,newDurationStyle:e.newDurationStyle,hideRating:"thumbnail"!==e.badgePosition||!!p}))),a.createElement(o.Z,{xs:12,md:6,className:"".concat("MRyVe"," position-relative")},a.createElement(qe.Q,{analyticsData:e.analyticsData,analyticsOptions:g,video:n}),a.createElement(u.Mr,{analyticsData:e.analyticsData,analyticsOptions:g,video:n,appLink:c,className:"text-reset"}),a.createElement(Me.u,{video:n,analyticsData:e.analyticsData,analyticsOptions:g,appLink:s,linkClassName:"d-inline-block",textClassName:"h4",yearGroups:e.yearGroups}),"info-panel"===e.badgePosition&&a.createElement(y.c,{className:"pb-1"},!d&&a.createElement(f.C,{type:f.g.Interactive,data:n.interactives}),a.createElement(f.C,{type:f.g.Rating,data:n.rating}),a.createElement(f.C,{type:f.g.ProductionYear,data:n.productionYear})),a.createElement("p",{className:"mb-1"},a.createElement("span",{className:"zejMP"},n.description)),"info-panel"===e.badgePosition&&a.createElement(Z.P,{audience:p,className:"mt-1",border:"dark"}),e.showVideoGuidance&&a.createElement("div",{className:"d-flex ".concat("Ax9h2")},a.createElement(Ve,{containerRef:h,widgetTemplate:ge.f.ThumbnailFeaturedMedia,video:n,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest}),a.createElement(Pe,{containerRef:h,widgetTemplate:ge.f.ThumbnailFeaturedMedia,video:n,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl})))):a.createElement(a.Fragment,null)}Ze.defaultProps={newDurationStyle:!0,badgePosition:"thumbnail"};var Ge=n(50333),Be=n(54293),$e=n(45157);const We={appLink:"fFjKN",name:"A_by9",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"};var ze=function(e){var t=e.name,n=e.multiline,i="".concat(We.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),r="";return n?r+=" ".concat(We.clamped," clamp-2"):(i+=" text-nowrap",r+=" text-truncate"),a.createElement("div",{className:i},a.createElement("small",{className:"text-muted"},a.createElement(d.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),a.createElement("p",{className:"".concat(We.name," h6")},a.createElement("span",{className:r},t)))},Ye=function(e){var t=e.name,n=e.multiline,i=e.subtitle,r="px-3 d-flex flex-column justify-content-center",l="".concat(We.name," h6");return n?l+=" clamp-2 text-start":(r+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),a.createElement("div",{className:r},i&&a.createElement("div",{className:"text-secondary clamp-1 ".concat(We.text)},i),a.createElement("div",{className:l,title:n?"":t},t))};function Xe(e){var t=$.j.createUrl(e.coverUrl,{size:e.isLarge?k.h2.Medium:k.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return a.createElement("div",{className:"border d-flex position-relative ".concat(We.widgetItem),id:"".concat(e.data.id,"-").concat($e.Y.getRandomInt())},a.createElement("div",{className:"".concat(We.imagePanel," ").concat(e.isLarge?We.large:"")},a.createElement("div",{className:We.image,style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),a.createElement(b.oy,{type:b.mS.Subject,extraClasses:e.isLarge?We.large:""})),e.isComingSoon?a.createElement(ze,Object.assign({},n)):a.createElement(Ye,Object.assign({},n)))}function Qe(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return a.createElement(a.Fragment,null,n?a.createElement(c.F,{className:We.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},a.createElement(Xe,Object.assign({},e))):a.createElement(Xe,Object.assign({},e)))}var Je,Ke=n(52641);!function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(Je||(Je={}));var et=a.memo((function(e){var t,n,i,l,o,s=(null===(t=e.data)||void 0===t?void 0:t.status)===Je.ComingSoon,c=function(e,t){var n;if((null==t?void 0:t.length)>=Ke._.MULTI_PRESENTATION_THRESHOLD)return null===(n=null==t?void 0:t.find((function(t){return t.id===e})))||void 0===n?void 0:n.name}(e.data.presentationId,null==e?void 0:e.availablePresentations),u=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(i=e.data)||void 0===i?void 0:i.name,presentationId:e.data.presentationId,comingSoon:!!s}),d=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Classification,descriptor:r._S.Cover});return a.createElement(Qe,Object.assign({},e,{analyticsData:u,analyticsOptions:d,coverUrl:null===(l=e.data.cover)||void 0===l?void 0:l.url,subtitle:(null===(o=e.getSubtitle)||void 0===o?void 0:o.call(e,e.data))||c,isComingSoon:s}))}));function tt(e){var t,n,i,l=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),o=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Company,descriptor:r._S.Cover});return a.createElement(Qe,Object.assign({},e,{analyticsData:l,analyticsOptions:o,coverUrl:null===(i=e.data.logo)||void 0===i?void 0:i.url}))}r.Vw.Click,r.py.UserSetting,r._S.Tile,r.Vw.Click,r.py.Url,r._S.Tile;var nt=n(51365);const at="ZhLPS";var it=a.memo((function(e){var t,n,i,c=(0,m.k)();if(!(null===(t=e.results)||void 0===t?void 0:t.totalResults)&&!(null===(n=e.topics)||void 0===n?void 0:n.totalResults)&&!(null===(i=e.companies)||void 0===i?void 0:i.totalResults))return a.createElement(a.Fragment,null);var u=e.featuredResult,d=void 0===u?{}:u,p=ue.groupResults(e.results.results,e.topics,e.companies,d,c),v=e.availablePresentations;return a.createElement("div",{className:"position-relative"},p.map((function(t,n){switch(t.type){case"featured-result":if(!d||"video"!==d._index)return a.createElement(a.Fragment,{key:"featured-result"});var i=d;return a.createElement("div",{key:"featured-result",className:"pb-3"},a.createElement(nt.M.Provider,{value:e.getVideoItemActions},a.createElement(Ze,{key:"featured-result",video:i,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(i),seriesAppLink:e.appLinks.getSeriesAppLink(i.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:i._score,maxScore:i._maxScore,featured:i._featured},pagePositionIndex:n},hideInteractiveBadge:!0,yearGroups:e.yearGroups})));case"companies-and-topics":var c=t.items.length<4;return a.createElement(a.Fragment,{key:"".concat(t.type,":").concat(n)},a.createElement(l.Z,{className:"g-0 pb-3 mx-n1"},t.items.map((function(t,i){switch(t.type){case"company":return a.createElement(o.Z,{key:t.id,sm:6,md:c?6:4,lg:c?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(tt,{data:t,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:e.appLinks.getCompanyAppLinkOptions,analyticsData:{itemIndex:i,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:c})));case"Subject":return a.createElement(o.Z,{key:t.id,sm:6,md:c?6:4,lg:c?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(et,{data:t,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){return e.appLinks.getClassificationAppLinkOptions(t)},availablePresentations:v,analyticsData:{itemIndex:i,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:c})))}}))));case"video-item":var u=s.m.first(t.items),m=function(e){return Ie.M.isClip(e)?Ge.I:Ie.M.isInteractive(e)?Be.H:Y.m}(u);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"position-relative ".concat(at)},a.createElement(nt.M.Provider,{value:e.getVideoItemActions},a.createElement(m,{video:u,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:u._score,maxScore:u._maxScore,featured:u._featured},pagePositionIndex:n}})));case"playlist-with-videos":var p=s.m.first(t.items);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},a.createElement(Q,{playlist:p,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(p),presentationAudiences:e.audiences,analyticsData:{search:{query:e.query,score:p._score,maxScore:p._maxScore,featured:p._featured},pagePositionIndex:n},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSeriesAppLink:e.appLinks.getSeriesAppLink,getVideoAppLink:e.appLinks.getVideoAppLink}));case"playlist-thumbnail":var g=s.m.first(t.items);return a.createElement("div",{className:"position-relative ".concat(at),key:"".concat(t.type,":").concat(n)},a.createElement(S,{analyticsData:{search:{query:e.query,score:g._score,maxScore:g._maxScore,featured:g._featured},pagePositionIndex:n},analyticsOptions:{entity:r.py.Playlist,actionType:r.Vw.Click,location:r.LZ.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(g),showActions:e.showActions,collection:g,collectionType:"playlist",maskType:E.O.Playlist,imageFallbackType:b.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}));case"series-with-videos":var f=s.m.first(t.items);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},a.createElement(ne,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:f,seriesAppLink:e.appLinks.getSeriesAppLink(f),getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.query,score:f._score,maxScore:f._maxScore,featured:f._featured},pagePositionIndex:n},preloadImage:!0}));case"series-thumbnail":var y=s.m.first(t.items);return a.createElement("div",{className:"position-relative ".concat(at),key:"".concat(t.type,":").concat(n)},a.createElement(S,{analyticsData:{search:{query:e.query,score:y._score,maxScore:y._maxScore,featured:y._featured},pagePositionIndex:n},analyticsOptions:{entity:r.py.Series,actionType:r.Vw.Click,location:r.LZ.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(y),collectionType:"series",collection:y,showActions:e.showActions,maskType:E.O.Series,imageFallbackType:b.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}})))})),rt=n(44854),lt="search.searchSubstitute";function ot(e){return e.substitute?a.createElement("p",{className:"mb-3"},a.createElement(d.x,{namespace:lt,phrase:"showingFor"})," ",a.createElement(c.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):a.createElement(a.Fragment,null)}var st="search.searchSuggestions";function ct(e){return e.suggestions.length?a.createElement("div",{className:"d-flex align-items-center mb-3"},a.createElement(d.x,{namespace:st,phrase:"didYouMean"})," ",e.suggestions.map((function(t,n){return a.createElement(a.Fragment,{key:"".concat(t,":").concat(n)},0!==n&&a.createElement("span",{className:"mx-1"},"•"),a.createElement(c.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):a.createElement(a.Fragment,null)}ct.defaultProps={suggestions:[],queryParams:{}};var ut=n(97395),dt={search:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l="search:".concat(e,":").concat(t,":").concat(a);l+=Object.keys(n).map((function(e){return n[e]})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=a?a:void 0,query:e},n));return{url:ut._.urlBuilder("{gateway}/v3/search",o),publicUrl:ut._.urlBuilder("/api/search",o),key:l,formatData:function(e){var t,n,a,i=e.totalResults,r=null!==(n=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,n,a,r,l,o,s,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(n=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||(null===(r=null===(a=u.interactives)||void 0===a?void 0:a.data)||void 0===r?void 0:r.length)||(null===(o=null===(l=u.videos)||void 0===l?void 0:l.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(s=e.videos)||void 0===s?void 0:s.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==n?n:[];e.results=r,e.totalResults=i;var l=null===(a=r[0])||void 0===a?void 0:a._score;return Object.assign(Object.assign({},e),{results:ue.mapMaxScoreToSearchResults(r,l)})},normalize:!1,success:i,error:r}},tagsAndClassifications:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l=Object.assign({},Object.assign({index:t,cursor:a,query:e},n));return{url:ut._.urlBuilder("{gateway}/v3/search/tags-and-classifications",l),publicUrl:ut._.urlBuilder("/api/search/tags-and-classifications",l),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(a),success:i,error:r,normalize:!1}}},mt=n(32299),pt=n(97764),vt=n(63545),gt=n(71471),ft=n(69834),yt=n(39151),ht=n(78681),bt=n(31949),Et=n(8843),At=n(79612),kt=n(73818),St=n(82329),Ot=n(47399),wt=n(83145),xt=n(71925),Lt=n(28400),Ct=n(2997);function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Nt={useOnFilterChange:function(e,t){var n=Object.assign({},t);delete n.query;var i=Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){return e-t}));a.useEffect((function(){e()}),[i.join(":")])},getCollectionActions:function(e,t,n,a){return[]},getSeriesAppLink:function(e){return(null==e?void 0:e.id)?{application:St.O.EXCHANGE,action:kt.e.Exchange.SERIES,args:[e.id,Lt.m.slugify(e.name)]}:null},getVideoAppLink:function(e){return(null==e?void 0:e.id)?{application:St.O.EXCHANGE,action:kt.e.Exchange.PREVIEW,args:[e.id,Lt.m.slugify(e.name)]}:null},getAppliedIndices:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type;if(e){if(!Array.isArray(e))return[e];if(e.length)return e}return["video"]},getNestedCategoryIds:function(e,t){var n=function(e){var n=[],a=t.find((function(t){return+t.data.id==+e}));return(null==a?void 0:a.children.length)?(function e(t){t&&(t.data&&n.push(t.data.id),t.children.length&&t.children.forEach((function(t){e(t)})))}(a),n):[e]};if(!Array.isArray(e))return n(e);var a,i=(a=e,function(e){if(Array.isArray(e))return jt(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return n(e)}));return s.m.flatten(i)},buildBackendFilterParams:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3?arguments[3]:void 0;if(t.categoryId){var i=null==t?void 0:t.categoryId;t.categoryId=this.getNestedCategoryIds(i,a)}var r=pt.qr.buildBackendFilterParams(t,n,null,!1);return r["".concat(Ct.w.FILTER_PARAM_PREFIX,"library")]=e,r}},It=n(15800),Tt=n(99742),Pt="exchange.searchResultsEmptyState";function Ft(e){return a.createElement(d.D.Provider,{value:Pt},a.createElement(It.u,null,a.createElement(It.u.Image,{src:Tt.W.EmptyStates.SEARCH}),a.createElement(It.u.Heading,null,e.query?a.createElement(d.x,{phrase:"headingWithQuery",options:{query:e.query}}):a.createElement(d.x,{phrase:"headingWithoutQuery"})),a.createElement(It.u.Info,null,a.createElement(d.x,{phrase:"info"}),a.createElement(c.F,{className:"info-link",appLink:{application:St.O.EXCHANGE,action:kt.e.Exchange.INDEX}},a.createElement(d.x,{phrase:"topicsAppLink"})))))}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||Rt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(e,t){if(e){if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(e,t):void 0}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Ut(e){var t,n,l,o,s=e.queryParams,c=s.query,u=i.a.useGetFetch(),d=_t(a.useState(null),2),m=d[0],p=d[1],v=_t(a.useState(!1),2),g=v[0],f=v[1],y=_t(a.useState(),2),h=y[0],b=y[1],E=_t(a.useState(null),2),A=E[0],k=E[1],S=_t(a.useState(!1),2),O=S[0],w=S[1],x=!!(null===(n=null===(t=null==m?void 0:m.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next),L=i.a.useBasicFetch(bt.N.currentUser()),C=i.a.useBasicFetch(wt.U.exchange()),j=i.a.useBasicFetch(yt.L.config()),N=i.a.useBasicFetch(ht.Z.ratings()),I=i.a.useBasicFetch(wt.U.categories()),T=function(e,t){var n,a=ue.flattenResults(e),r=null===(n=null==a?void 0:a.results)||void 0===n?void 0:n.find((function(e){return!!e._featured&&"video"===e._index})),l=i.a.useBasicFetch(r&&"video"===r._index?mt.R.video(r.id):null);if(l.data){var o=r._index,s=r._score,c=r._featured;return Object.assign(Object.assign({},l.data),{_index:o,_score:s,_featured:c,_maxScore:t})}}(m,h);(0,At.M)({title:null!=c?c:""}),(0,Et.M)({fetchNextPage:function(){var e,t;return _(null===(t=null===(e=m.pagination)||void 0===e?void 0:e.cursors)||void 0===t?void 0:t.next)},hasMore:x,isFetching:g}),Nt.useOnFilterChange(_,s);var P=(0,xt.A)("video-list"),F=L.hasCompleted&&j.hasCompleted&&N.hasCompleted&&C.data&&I.hasCompleted;function _(e){if(F){f(!0),e||w(!0);var t=Nt.buildBackendFilterParams(C.data.id,s,N.data,I.data),n=Nt.getAppliedIndices(s);if(!n.length)return p({results:[],totalResults:0,pagination:null}),f(!1),void w(!1);u(dt.search(c,n,t,e,(function(t){var n,a;if(e)p(Object.assign(Object.assign({},m),{results:[].concat((a=m.results,function(e){if(Array.isArray(e))return Dt(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Rt(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[ue.mapMaxScoreToSearchResults(t.results,h)]),pagination:t.pagination}));else{var i=null===(n=null==t?void 0:t.results[0])||void 0===n?void 0:n._score;b(i),p(Object.assign(Object.assign({},t),{results:[ue.mapMaxScoreToSearchResults(t.results,i)]}))}f(!1)}),(function(e){(0,ft.r)(e.status),f(!1)}))),e||u(dt.tagsAndClassifications(c,n,t,e,(function(e){k(e),w(!1)}),(function(){w(!1)})))}}a.useEffect((function(){_()}),[c,F]);var R=[pt.x$.Categories(I.data),pt.x$.Rating(N.data,null),pt.x$.HasResources(),pt.x$.HasSubtitles(),pt.x$.TagOrClassification(A)],D=pt.qr.getMoreFilters([pt.x$.ProductionYear(),pt.x$.IsHD(),pt.x$.Duration()]),U=function(e,t){return{application:St.O.EXCHANGE,action:kt.e.Exchange.SEARCH,params:Object.assign(Object.assign({},t),{query:e})}};return a.createElement(a.Fragment,null,a.createElement(Ot.n,{query:c}),m&&a.createElement(a.Fragment,null,a.createElement(ot,{substitute:m.substituteQuery,queryParams:s,getAppLink:U}),!m.substituteQuery&&a.createElement(ct,{suggestions:null==m?void 0:m.suggestions,queryParams:s,getAppLink:U})),a.createElement(rt.J,{queryParams:s,mainFilters:R,moreFilters:D,analyticsOptions:{entity:r.py.SearchResults,location:r.LZ.SearchFilters},appLink:{application:St.O.EXCHANGE,action:kt.e.Exchange.SEARCH},isFetchingOptions:O}),F&&m?a.createElement("section",null,m.totalResults?a.createElement(it,{query:c,results:m,topics:null,featuredResult:T,getVideoItemActions:P,setFavourite:function(){},canFavourite:function(){return!1},audiences:null,currentUser:L.data,imageCdnUrl:j.data.imageCdnUrl,availablePresentations:null,showActions:!0,yearGroups:null,isPlugin:!1,companies:null,appLinks:{getCollectionActions:Nt.getCollectionActions,getSeriesAppLink:Nt.getSeriesAppLink,getVideoAppLink:Nt.getVideoAppLink,getClassificationAppLink:function(){return null},getClassificationAppLinkOptions:function(){return null},getPlaylistAppLink:function(){return null},getCompanyAppLink:function(){return null}}}):a.createElement(Ft,{query:c}),x&&a.createElement(vt._,{isFetching:g,fetchNext:_,nextCursor:null===(o=null===(l=m.pagination)||void 0===l?void 0:l.cursors)||void 0===o?void 0:o.next})):a.createElement("div",{className:"mx-n2"},a.createElement(gt.S,null)))}Ut.defaultProps={queryParams:{}}}}]);
|