@clickview/streamable-learning 0.6.0 → 0.6.1-dev.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 +2 -2
- package/dist/css/{301-streamable-learning-5712ab61bb.chunk.css → 301-streamable-learning-b344f90d44.chunk.css} +1 -1
- package/dist/css/{329-streamable-learning-014b4ff2a3.chunk.css → 383-streamable-learning-e5ebcbe12f.chunk.css} +15 -12
- package/dist/css/{252-streamable-learning-d56cd82334.chunk.css → 399-streamable-learning-f9aeb30a42.chunk.css} +6 -4
- package/dist/css/{596-streamable-learning-75ed3a71dd.chunk.css → 596-streamable-learning-2c51a5f976.chunk.css} +1 -1
- package/dist/css/{734-streamable-learning-ad53f9c394.chunk.css → 734-streamable-learning-76d0adfd6b.chunk.css} +3 -3
- package/dist/css/{69-streamable-learning-d7dbd63ed2.chunk.css → 928-streamable-learning-fc568e783a.chunk.css} +10 -7
- package/dist/css/{471-streamable-learning-e350c2e320.chunk.css → 950-streamable-learning-6d57bcc3a4.chunk.css} +7 -5
- package/dist/css/{streamable-learning-23eaf207bf.css → streamable-learning-099f29c974.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/127-37ea795bd6-streamable-learning.chunk.js +1 -0
- package/dist/scripts/146-d2948b12b4-streamable-learning.chunk.js +1 -0
- package/dist/scripts/153-76de89bd09-streamable-learning.chunk.js +1 -0
- package/dist/scripts/{254-3001531288-streamable-learning.chunk.js → 254-24c5a6ba42-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/{301-5eb55b7c69-streamable-learning.chunk.js → 301-414dcdbc20-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/383-fd5f7f5bdb-streamable-learning.chunk.js +2 -0
- package/dist/scripts/{252-3ee8c3f5e9-streamable-learning.chunk.js → 399-3763d83faa-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/423-45e5d01976-streamable-learning.chunk.js +1 -0
- package/dist/scripts/482-4bddab396f-streamable-learning.chunk.js +1 -0
- package/dist/scripts/596-ae8f0b95aa-streamable-learning.chunk.js +1 -0
- package/dist/scripts/662-cceda2d1a3-streamable-learning.chunk.js +1 -0
- package/dist/scripts/689-3d3106a994-streamable-learning.chunk.js +1 -0
- package/dist/scripts/700-605dd99776-streamable-learning.chunk.js +1 -0
- package/dist/scripts/734-2da505d80c-streamable-learning.chunk.js +1 -0
- package/dist/scripts/784-3d7299131a-streamable-learning.chunk.js +1 -0
- package/dist/scripts/790-bb3aab5247-streamable-learning.chunk.js +1 -0
- package/dist/scripts/{815-543f5cd4ed-streamable-learning.chunk.js → 815-325bef3b7a-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/843-df52c4b539-streamable-learning.chunk.js +2 -0
- package/dist/scripts/{872-1a6ac191ff-streamable-learning.chunk.js → 872-8af2e1eb75-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/928-66d8e03c32-streamable-learning.chunk.js +2 -0
- package/dist/scripts/933-ca4f584716-streamable-learning.chunk.js +1 -0
- package/dist/scripts/942-71bf1ee4a5-streamable-learning.chunk.js +1 -0
- package/dist/scripts/{471-a5f39f4b0b-streamable-learning.chunk.js → 950-1acae393bb-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/954-c783b727cc-streamable-learning.chunk.js +1 -0
- package/dist/scripts/958-adb98da502-streamable-learning.chunk.js +1 -0
- package/dist/scripts/987-7f87266445-streamable-learning.chunk.js +1 -0
- package/dist/scripts/bundle-ec8a73bab0.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +33 -33
- 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/146-939f8dac63-streamable-learning.chunk.js +0 -1
- package/dist/scripts/153-96e5857ce1-streamable-learning.chunk.js +0 -1
- package/dist/scripts/173-aaf002a53f-streamable-learning.chunk.js +0 -1
- package/dist/scripts/329-00fb8431cf-streamable-learning.chunk.js +0 -2
- package/dist/scripts/423-d0f77bfc79-streamable-learning.chunk.js +0 -1
- package/dist/scripts/482-30fe80151a-streamable-learning.chunk.js +0 -1
- package/dist/scripts/492-fa9976ecca-streamable-learning.chunk.js +0 -1
- package/dist/scripts/596-3a766e941c-streamable-learning.chunk.js +0 -1
- package/dist/scripts/662-f1e8035d1a-streamable-learning.chunk.js +0 -1
- package/dist/scripts/689-fc0bcc83d9-streamable-learning.chunk.js +0 -1
- package/dist/scripts/69-25405a6330-streamable-learning.chunk.js +0 -2
- package/dist/scripts/700-0520b39fbf-streamable-learning.chunk.js +0 -1
- package/dist/scripts/734-2b25ce71e4-streamable-learning.chunk.js +0 -1
- package/dist/scripts/784-17e5eff951-streamable-learning.chunk.js +0 -1
- package/dist/scripts/790-4a93486228-streamable-learning.chunk.js +0 -1
- package/dist/scripts/843-ca49109b7e-streamable-learning.chunk.js +0 -2
- package/dist/scripts/933-909f880119-streamable-learning.chunk.js +0 -1
- package/dist/scripts/954-6234e0b250-streamable-learning.chunk.js +0 -1
- package/dist/scripts/958-dfc761af0c-streamable-learning.chunk.js +0 -1
- package/dist/scripts/987-034dcdfa02-streamable-learning.chunk.js +0 -1
- package/dist/scripts/bundle-313feffeea.min.js +0 -2
- /package/dist/scripts/{329-00fb8431cf-streamable-learning.chunk.js.LICENSE.txt → 383-fd5f7f5bdb-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{69-25405a6330-streamable-learning.chunk.js.LICENSE.txt → 843-df52c4b539-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{843-ca49109b7e-streamable-learning.chunk.js.LICENSE.txt → 928-66d8e03c32-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-313feffeea.min.js.LICENSE.txt → bundle-ec8a73bab0.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,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clickview/streamable-learning",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Streamable Learning",
|
|
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
|
-
"author": "Shale Kuzmanovski",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"babel": {
|
|
23
|
-
"presets": [
|
|
24
|
-
[
|
|
25
|
-
"@babel/preset-env",
|
|
26
|
-
{
|
|
27
|
-
"corejs": 3,
|
|
28
|
-
"useBuiltIns": "entry"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clickview/streamable-learning",
|
|
3
|
+
"version": "0.6.1-dev.1",
|
|
4
|
+
"description": "Streamable Learning",
|
|
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
|
+
"author": "Shale Kuzmanovski",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"babel": {
|
|
23
|
+
"presets": [
|
|
24
|
+
[
|
|
25
|
+
"@babel/preset-env",
|
|
26
|
+
{
|
|
27
|
+
"corejs": 3,
|
|
28
|
+
"useBuiltIns": "entry"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -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_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[146],{10587:(e,a,t)=>{t.d(a,{y:()=>l});var r=t(54610);function n(e){return n="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},n(e)}function i(e,a,t){var r;return r=function(e,a){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a),(a="symbol"==n(r)?r:String(r))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var l=i(i(i(i(i(i(i(i(i({},r.__.Thumbnails,{width:1280,height:720}),r.__.Banners,{width:1200,height:222}),r.__.Covers,{width:512,height:512}),r.__.Posters,{width:1e3,height:1500}),r.__.TallPosters,{width:1080,height:1920}),r.__.HeroBanners,{width:1920,height:640}),r.__.None,{width:1,height:1}),r.__.Avatars,{width:256,height:256}),r.__.Logos,{width:128,height:128})},78446:(e,a,t)=>{t.r(a),t.d(a,{ProfileDetailsView:()=>$});var r=t(32735),n=t(70680),i=t(23481),l=t(20354),o=t(92582),c=t(65858),s=t(54610),u=t(39151),m=t(99940),d={uploadBase64Image:function(e,a,t,r){return{url:"/api/image/upload?type=".concat(e),key:"upload:image",data:a,type:m.k.POST,success:t,always:r}}},p=t(31949),f=t(55110),g=t(97395),v=t(83345),h=t(44645),y=t(51934),b=t.n(y),E=t(58960),N=t(13876),w=t(10587);function _(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,l,o=[],c=!0,s=!1;try{if(i=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=i.call(t)).done)&&(o.push(r.value),o.length!==a);c=!0);}catch(e){s=!0,n=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw n}}return o}}(e,a)||function(e,a){if(e){if("string"==typeof e)return S(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,a):void 0}}(e,a)||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 S(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,r=new Array(a);t<a;t++)r[t]=e[t];return r}var k=i.T.encloseNamespace("shared.imageCropper"),I=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function C(e){var a=_(r.useState(!1),2),t=a[0],n=a[1],i=_(r.useState(!1),2),l=i[0],o=i[1],c=r.useRef(),s=r.useRef();return r.useEffect((function(){var a=new Image;a.src=e.src;var t=c.current.offsetWidth/a.width,r=w.y[e.imageType],i={viewMode:2,autoCropArea:1,ready:function(){return n(!0)}};return r&&(i.minCropBoxWidth=r.width*t,i.minCropBoxHeight=r.height*t,i.aspectRatio=r.width/r.height),s.current=new(b())(c.current,i),function(){s.current.destroy()}}),[]),r.createElement(E.G,{title:k("title"),closePopup:e.closePopup,size:e.popupSize},r.createElement("div",null,r.createElement("img",{src:e.src,alt:e.alt,ref:c,className:"img img-fluid"})),r.createElement(N.u,null,r.createElement(N.u.Cancel,{onClick:e.closePopup}),r.createElement(N.u.Submit,{onClick:function(){if(t){var a=s.current.getCroppedCanvas().toDataURL(function(e){var a=e.match(I);if(a)return a[1]}(e.src));o(!0),e.onClickCrop(a,e.closePopup)}},text:k("crop"),variant:"dark",showSpinner:l})))}C.defaultProps={popupSize:"lg"};var x={renderCropper:function(e){var a=(0,h.s)(document.getElementById("dialog-region"));a.render(r.createElement(C,Object.assign({},e,{closePopup:function(){return a.unmount()}})))}},A=t(67453),P=t(91967),T={onFileSelect:function(e,a,t,r){if(a&&a.length){var n=new FileReader;n.addEventListener("load",(function(){return T.onReaderLoad(n,e,t,r)})),n.readAsDataURL(a[0])}},onReaderLoad:function(e,a,t,r){var n,i,l=new Image;l.src=e.result;var o=null!==(n=null==r?void 0:r.width)&&void 0!==n?n:w.y[a].width,c=null!==(i=null==r?void 0:r.height)&&void 0!==i?i:w.y[a].height;l.addEventListener("load",(function(){T.isImageValid(a,l,r)&&P.q.isFunction(t)?t(l):alert("Image too small: minimum dimensions are ".concat(o," x ").concat(c))}))},isImageValid:function(e,a,t){var r,n,i=null!==(r=null==t?void 0:t.width)&&void 0!==r?r:w.y[e].width,l=null!==(n=null==t?void 0:t.height)&&void 0!==n?n:w.y[e].height;return!(i&&a.width<i||l&&a.height<l)},mapImageTypeToString:function(e){switch(e){case s.__.Avatars:return"avatars";case s.__.Thumbnails:return"thumbnails";case s.__.Logos:return"logos";case s.__.Covers:return"covers";case s.__.Posters:return"posters";case s.__.TallPosters:return"tallposters";case s.__.HeroBanners:return"herobanners";case s.__.None:default:return""}}},U=t(64818);const R={profileImage:"e1vsK"};var L="settings.editAvatar";function j(e){var a,t,n,i,l=r.useRef(null),o=(null===(a=e.user.avatar)||void 0===a?void 0:a.url)?e.user.avatar.url:(n=e.imageCdnUrl,i=U.l.getInitials(e.user.name,e.user.surname),A.j.createUrl(g._.safeUrlConcat(n,"/v1/profile-images?initials=".concat(i)),{size:s.h2.Medium}));return r.createElement(v.D.Provider,{value:L},r.createElement("div",{className:"col-auto form-group d-flex flex-column align-items-center ps-4"},r.createElement("label",{className:"align-self-start"},r.createElement(v.x,{phrase:"profileImage"})),r.createElement("img",{className:"img img-fluid rounded ".concat(R.profileImage," mb-2"),alt:"User avatar",src:o}),r.createElement("button",{className:"btn btn-outline-dark px-3 text-center",onClick:function(){l.current.value=null,l.current.click(null)}},r.createElement(v.x,{phrase:"uploadImage"})),r.createElement("input",{type:"file",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:l,onChange:function(a){var t;(t=a.target.files)&&t[0]&&T.onFileSelect(s.__.Avatars,t,(function(a){x.renderCropper({src:a.src,alt:"",onClickCrop:function(a,t){return e.onSelectImage(function(e){return e.split(",")[1]}(a),t)},imageType:s.__.Avatars})}))}}),!!(null===(t=e.user.avatar)||void 0===t?void 0:t.url)&&r.createElement("button",{className:"btn btn-link text-center",onClick:e.onClickRemoveImage},r.createElement(v.x,{phrase:"removeImage"}))))}var F=t(92802),B=t(23201),Z=t(1269),q=t(82644),D=t(5173),O=i.T.encloseNamespace("settings.editProfileDetailsForm"),V=(0,D.Ry)().shape({firstName:(0,D.Z_)().max(255,(function(){return O("nameExceeds")})).required((function(){return O("nameRequired")})).default("").trim(),surname:(0,D.Z_)().max(255,(function(){return O("surnameExceeds")})).required((function(){return O("surnameRequired")})).default("").trim(),username:(0,D.Z_)().max(255,(function(){return O("usernameExceeds")})).default("").trim(),displayName:(0,D.Z_)().max(255,(function(){return O("displayNameExceeds")})).default("").trim()}),z=i.T.encloseNamespace("settings.editProfileDetailsForm");function W(e){var a,t;return r.createElement(q.n,{initialValues:{firstName:e.user.name,surname:e.user.surname,username:e.user.username,displayName:null!==(t=null===(a=e.user.metadata)||void 0===a?void 0:a.displayName)&&void 0!==t?t:""},validationSchema:V,onSubmit:e.onClickSave},r.createElement(F.l0,null,r.createElement(Z.W,{label:z("firstName"),type:"text",name:"firstName",id:"firstName",placeholder:z("firstNamePlaceholder"),autoFocus:!0,showRequiredStar:!0}),r.createElement(Z.W,{label:z("lastName"),type:"text",name:"surname",id:"surname",placeholder:z("lastNamePlaceholder"),showRequiredStar:!0}),r.createElement(Z.W,{label:z("displayName"),type:"text",name:"displayName",id:"displayName",placeholder:z("displayNamePlaceholder"),infoTooltip:z("displayNameTooltip")}),r.createElement(Z.W,{label:z("username"),type:"text",name:"username",id:"username",placeholder:z("usernamePlaceholder"),showRequiredStar:!0,disabled:!0,infoTooltip:z("usernameTooltip")}),r.createElement(B.A,{variant:"dark",submitText:z("saveChanges"),isNew:!1})))}var M=t(81803),G=t(68192);const H={partialLabel:"Z_3rS",partialInput:"B0iyg",partialSubmit:"MZM6I",partialAvatar:"iqthe",partialUploadImage:"qmeIF"};function Y(){return r.createElement("div",{className:"row g-0"},r.createElement("div",{className:"col-4"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"partial-loading-background ".concat(H.partialLabel)}),r.createElement("div",{className:"partial-loading-background ".concat(H.partialInput)})),r.createElement("div",{className:"form-group"},r.createElement("div",{className:"partial-loading-background ".concat(H.partialLabel)}),r.createElement("div",{className:"partial-loading-background ".concat(H.partialInput)})),r.createElement("div",{className:"form-group"},r.createElement("div",{className:"partial-loading-background ".concat(H.partialLabel)}),r.createElement("div",{className:"partial-loading-background ".concat(H.partialInput)})),r.createElement("div",{className:"partial-loading-background ".concat(H.partialSubmit)})),r.createElement("div",{className:"form-group d-flex flex-column align-items-center ps-4"},r.createElement("div",{className:"partial-loading-background align-self-start ".concat(H.partialLabel)}),r.createElement("div",{className:"partial-loading-background mb-2 ".concat(H.partialAvatar)}),r.createElement("div",{className:"partial-loading-background mx-3 ".concat(H.partialUploadImage)})))}var K=i.T.encloseNamespace("settings.profileDetails");function $(){var e=(0,n.I0)(),a=(0,f.Z)(),t=l.a.useBasicFetch(p.N.currentUser()),i=l.a.useBasicFetch(t.data&&G.N.getUser(t.data.id)),m=l.a.useBasicFetch(u.L.config());return r.createElement(M.d,{heading:K("heading"),breadcrumbs:[K("breadcrumb")]},t.data&&i.data&&m.data?r.createElement("div",{className:"row g-0"},r.createElement("div",{className:"col-4"},r.createElement(W,{user:i.data,onClickSave:function(r,n){var s=Object.assign(Object.assign({},r),{customerId:t.data.customerId,masterRole:i.data.userProfile.role,userId:i.data.id,userType:i.data.userType,masterYearGroup:i.data.masterYearGroup,displayName:r.displayName||null,username:i.data.username});l.a.fetch(e,G.N.updateUser(s,t.data.id,(function(){o.k.logUserAction(s,{location:c.LZ.Settings,actionType:c.Vw.Edit,workflowPhase:c.eu.Complete,entity:c.py.User}),a.success(K("success"))}),(function(){a.error(K("error"))}),n))}})),r.createElement(j,{user:i.data,onSelectImage:function(r,n){l.a.fetch(e,d.uploadBase64Image(s.__.Avatars,r,(function(r){!function(r,n){l.a.fetch(e,G.N.updateAvatar(r.id,t.data.id,(function(){o.k.logUserAction({id:t.data.id,avatarId:r.id,avatarUrl:r.location},{actionType:c.Vw.Associate,workflowPhase:c.eu.Complete,location:c.LZ.Settings,entity:c.py.User,descriptor:c.iF.Avatar}),n(),a.success(K("avatarUploadSuccess"))}),(function(){a.error(K("avatarUploadError"))})))}(r,n)}),(function(){a.error(K("avatarUploadError"))})))},onClickRemoveImage:function(){l.a.fetch(e,G.N.deleteAvatar(i.data.avatar.id,t.data.id,(function(){o.k.logUserAction({id:t.data.id,avatarId:i.data.avatar.id},{actionType:c.Vw.Dissociate,workflowPhase:c.eu.Complete,location:c.LZ.Settings,entity:c.py.User,descriptor:c.iF.Avatar}),a.success(K("avatarDeleteSuccess"))}),(function(){a.error(K("avatarDeleteError"))})))},imageCdnUrl:m.data.imageCdnUrl})):r.createElement(Y,null))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[153],{49267:(r,e,t)=>{t.d(e,{a:()=>b});var n=t(23481),o=t(64364);function i(r){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},i(r)}function a(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,u(n.key),n)}}function u(r){var e=function(r,e){if("object"!=i(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"==i(e)?e:String(e)}function c(r,e,t){return e=l(e),function(r,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(r,s()?Reflect.construct(e,t||[],l(r).constructor):e.apply(r,t))}function s(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(s=function(){return!!r})()}function l(r){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},l(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},f(r,e)}var y="shared.regionLockedResourceError",b=function(r){function e(){return function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,e,[n.T.getPhrase(y,"title")])}var t,o;return function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&f(r,e)}(e,r),t=e,(o=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return n.T.getPhrase(y,"heading")}},{key:"description",get:function(){return n.T.getPhrase(y,"description")}}])&&a(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(o.H)},45445:(r,e,t)=>{t.d(e,{r:()=>w});var n=t(50242),o=t(81886),i=t(67058),a=t(23481),u=t(64364);function c(r){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},c(r)}function s(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,l(n.key),n)}}function l(r){var e=function(r,e){if("object"!=c(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"==c(e)?e:String(e)}function f(r,e,t){return e=b(e),function(r,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(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(r,y()?Reflect.construct(e,t||[],b(r).constructor):e.apply(r,t))}function y(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(y=function(){return!!r})()}function b(r){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b(r)}function d(r,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},d(r,e)}var p="shared.privateResourceError",v=function(r){function e(){return function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,e,[a.T.getPhrase(p,"title")])}var t,n;return function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&d(r,e)}(e,r),t=e,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(p,"heading")}},{key:"description",get:function(){return a.T.getPhrase(p,"description")}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(u.H),m=t(49267),g=t(49075),h={notFound:i.d,forbidden:{rating:v,yearLevel:v,region:m.a,privacy:v},badRequest:g._};function w(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(r){var i;i="number"==typeof r?r:r.status;var a=Object.assign(Object.assign({},h),e);i&&o.Q.Ry.isStatusCodeError(i)&&(i!==n.o.NotFound?i!==n.o.Forbidden?t.badRequest||o.Q.Ry.throw(new a.badRequest):t.forbidden||o.Q.Ry.throw(new a.forbidden.privacy):t.notFound||o.Q.Ry.throw(new a.notFound))}}},98064:(r,e,t)=>{t.d(e,{D:()=>u});var n=t(99940),o=t(97395),i=t(75896),a=t(62803),u={domainLibraries:function(r,e,t,n){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:r,maxCategoryDepth:0}),key:"libraries:".concat(r.sort().join(":")),formatData:function(r){return r.map((function(r){return r.data}))},success:e,error:t,always:n}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(r,e,t,n){return r.sort(),{url:o._.urlBuilder("/api/domain/v2/objects",{query:a.v.LIBRARY_COLLECTION,id:r}),key:"libraries:owner:logo:".concat(r.join(",")),success:e,error:t,always:n}},library:function(r,e,t,n){return{url:o._.urlBuilder("{gateway}/v1/objects/".concat(r),{query:a.v.LIBRARY}),key:"library:".concat(r),success:e,error:t,always:n}},exchange:function(r){return{url:o._.urlBuilder("{gateway}/v1/objects/".concat(r),{query:"categorytree"}),key:"exchange"}},streamableLearning:function(){return{url:"{gateway}/v1/streamable-learning-library",key:"streamable:learning"}},librarySubscribers:function(r,e){var t={};return e&&(t.cursor=e),{url:o._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(r,"/subscribers"),t),key:"library:subscribers:".concat(r,":").concat(e)}},libraryOwner:function(r){return{url:"{gateway}/v1/library-requests/libraries/".concat(r,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(r),formatData:function(r){return i.m.first(r.data)}}},updateSubscriberPermissions:function(r,e,t,o,i){return{url:"{gateway}/v1/libraries/".concat(r,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(r,":").concat(e),type:n.k.PUT,data:{customerId:e,granted:t},invalidationKeys:["library:owner:".concat(r),"library:subscribers:".concat(r)],success:o,error:i}},removeSubscriber:function(r,e,t,o){return{url:"{gateway}/v1/objects/".concat(r,"/subscribedcustomers?memberId=").concat(e),key:"revoke:subscription:".concat(r,":").concat(e),type:n.k.DELETE,invalidationKeys:["library:subscribers:".concat(r)],success:t,error:o}},folder:function(r,e,t,n){return{url:"{gateway}/v1/objects/".concat(r,"?query=banner,libraries"),key:"library:folder:".concat(r),success:e,error:t,always:n}},folderParentTree:function(r,e,t,n){return{url:"/api/domain/v2/categories/".concat(r,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(r),success:e,error:t,always:n}},childFolders:function(r,e,t,n,o){var i="{gateway}/v1/objects/".concat(r,"/categories?query={limit:100}thumbnail"),a="child:folders:".concat(r);return e&&(i+="&cursor=".concat(e),a+=":".concat(e)),{url:i,key:a,formatData:function(r){var e=r.data.sort((function(r,e){return r.name.toLowerCase().localeCompare(e.name.toLowerCase())}));return Object.assign(Object.assign({},r),{data:e})},success:t,error:n,always:o}},addToLibrary:function(r,e){var t=["folder","videos",r.metadata.destinationCategoryId,e].filter((function(r){return!!r})).join(":");return{url:"{gateway}/v1/library-requests",key:"add:".concat(r.objectId,":to:").concat(r.destinationLibraryId,":").concat(r.metadata.destinationCategoryId),type:n.k.POST,data:r,invalidationKeys:t}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},45719:(r,e,t)=>{t.d(e,{P:()=>l});var n=t(32735),o=t(70680),i=t(50242),a=t(91967),u=t(20354);function c(r){return function(r){if(Array.isArray(r))return s(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,e){if(r){if("string"==typeof r)return s(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(r,e):void 0}}(r)||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 s(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function l(r,e,t){function i(r){if(r)return a.q.isFunction(e)?c(e(r)):c(r.data)}function s(r){var e,n;if(r)return t?t(r):null===(n=null===(e=r.pagination)||void 0===e?void 0:e.cursors)||void 0===n?void 0:n.next}return(0,o.v9)((0,n.useMemo)((function(){return function(e){if(a.q.isFunction(r)){for(var t=r,n=a.q.isFunction(r)&&t(),o=n&&u.a.getResponse(e,n),l=o&&o.isFetching,f=o&&o.statusCode,y=o&&o.hasCompleted,b=y,d=o&&o.shouldFetch,p=i(o&&o.data),v=s(o&&o.data),m=function(r){if(r)return null==r?void 0:r.count}(o&&o.data);v&&(o=u.a.getResponse(e,t(v)),l=l||o.isFetching,f=o.statusCode,y=o.hasCompleted,!o.shouldFetch);){var g=i(o.data);g&&p.push.apply(p,c(g));var h=s(o.data);v=h===v?null:h}var w={shouldInitialFetch:d,items:p,nextCursor:v,isFetching:l,statusCode:f,hasCompleted:y,hasFirstPageCompleted:b};return"number"==typeof m&&(w.totalItems=m),w}}}),[r]))}i.o.Ok}}]);
|