@carbon/ibmdotcom-services 1.48.0 → 1.49.0-alpha.5489894480.0
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/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/index.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/markdownToHtml/markdownToHtml.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/parseAspectRatio/parseAspectRatio.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/removeHtmlTagEntities/removeHtmlTagEntities.js +1 -1
- package/es/services/Analytics/Analytics.js +1 -1
- package/es/services/CloudAccountAuth/CloudAccountAuth.js +1 -1
- package/es/services/DDO/DDO.js +1 -1
- package/es/services/Locale/Locale.js +1 -1
- package/es/services/Profile/Profile.js +66 -1
- package/es/services/SearchTypeahead/SearchTypeahead.js +1 -1
- package/es/services/VideoPlayer/VideoPlayer.js +1 -1
- package/es/services/global/global.js +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie.js +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/markdownToHtml/markdownToHtml.js +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/parseAspectRatio/parseAspectRatio.js +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/removeHtmlTagEntities/removeHtmlTagEntities.js +1 -1
- package/lib/services/Analytics/Analytics.js +1 -1
- package/lib/services/CloudAccountAuth/CloudAccountAuth.js +1 -1
- package/lib/services/DDO/DDO.js +1 -1
- package/lib/services/Locale/Locale.js +1 -1
- package/lib/services/Profile/Profile.js +66 -1
- package/lib/services/SearchTypeahead/SearchTypeahead.js +1 -1
- package/lib/services/VideoPlayer/VideoPlayer.js +1 -1
- package/lib/services/global/global.js +1 -1
- package/package.json +3 -3
- package/umd/ibmdotcom-services.js +70 -6
- package/umd/ibmdotcom-services.min.js +2 -2
package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie.js
CHANGED
|
@@ -44,7 +44,7 @@ function _toPrimitive(input, hint) {
|
|
|
44
44
|
return (hint === "string" ? String : Number)(input);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Copyright IBM Corp. 2020,
|
|
47
|
+
* Copyright IBM Corp. 2020, 2023
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
50
50
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -8,7 +8,7 @@ function _typeof(obj) {
|
|
|
8
8
|
}, _typeof(obj);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Copyright IBM Corp. 2016,
|
|
11
|
+
* Copyright IBM Corp. 2016, 2023
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
/**
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2023
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/**
|
|
6
|
-
* Copyright IBM Corp. 2021,
|
|
6
|
+
* Copyright IBM Corp. 2021, 2023
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
package/es/services/DDO/DDO.js
CHANGED
|
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/**
|
|
6
|
-
* Copyright IBM Corp. 2020,
|
|
6
|
+
* Copyright IBM Corp. 2020, 2023
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -4,7 +4,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
/**
|
|
7
|
-
* Copyright IBM Corp. 2020,
|
|
7
|
+
* Copyright IBM Corp. 2020, 2023
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -3,12 +3,13 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/**
|
|
6
|
-
* Copyright IBM Corp. 2020,
|
|
6
|
+
* Copyright IBM Corp. 2020, 2023
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
import axios from 'axios';
|
|
12
|
+
import Cookies from 'js-cookie';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @constant {string | string} Host for the profile status API call
|
|
@@ -30,6 +31,14 @@ var _version = process && process.env.PROFILE_VERSION || 'v1';
|
|
|
30
31
|
*/
|
|
31
32
|
var _endpoint = "".concat(_host, "/").concat(_version, "/mgmt/idaas/user/status/");
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The cookie name for determining user login status for cloud.ibm.com.
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
var _cookieName = 'com.ibm.cloud.iam.LoggedIn.prod';
|
|
41
|
+
|
|
33
42
|
/**
|
|
34
43
|
* Profile API class with methods for checking user authentication for ibm.com
|
|
35
44
|
*/
|
|
@@ -84,6 +93,62 @@ var ProfileAPI = /*#__PURE__*/function () {
|
|
|
84
93
|
}
|
|
85
94
|
return getUserStatus;
|
|
86
95
|
}()
|
|
96
|
+
/**
|
|
97
|
+
* retrieve the cloud login status via cookie
|
|
98
|
+
*
|
|
99
|
+
*
|
|
100
|
+
* @returns {string} string determining login status
|
|
101
|
+
*/
|
|
102
|
+
}, {
|
|
103
|
+
key: "checkCloudCookie",
|
|
104
|
+
value: function checkCloudCookie() {
|
|
105
|
+
var cloudLogin = Cookies.get(_cookieName);
|
|
106
|
+
return {
|
|
107
|
+
user: cloudLogin === '1' ? 'authenticated' : 'anonymous'
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* retrieve the cloud login status via api
|
|
113
|
+
*
|
|
114
|
+
*
|
|
115
|
+
* @returns {string} string determining login status
|
|
116
|
+
*/
|
|
117
|
+
}, {
|
|
118
|
+
key: "checkCloudDocsAPI",
|
|
119
|
+
value: function () {
|
|
120
|
+
var _checkCloudDocsAPI = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
121
|
+
var cloudLogin;
|
|
122
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
123
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
124
|
+
case 0:
|
|
125
|
+
_context2.next = 2;
|
|
126
|
+
return axios.get('/api/v6/selected-account?profile=true', {
|
|
127
|
+
headers: {
|
|
128
|
+
Accept: 'application/json'
|
|
129
|
+
}
|
|
130
|
+
}).then(function (response) {
|
|
131
|
+
return response.status === 200 ? 'authenticated' : 'anonymous';
|
|
132
|
+
}).catch(function (error) {
|
|
133
|
+
console.error(error);
|
|
134
|
+
return 'anonymous';
|
|
135
|
+
});
|
|
136
|
+
case 2:
|
|
137
|
+
cloudLogin = _context2.sent;
|
|
138
|
+
return _context2.abrupt("return", {
|
|
139
|
+
user: cloudLogin
|
|
140
|
+
});
|
|
141
|
+
case 4:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context2.stop();
|
|
144
|
+
}
|
|
145
|
+
}, _callee2);
|
|
146
|
+
}));
|
|
147
|
+
function checkCloudDocsAPI() {
|
|
148
|
+
return _checkCloudDocsAPI.apply(this, arguments);
|
|
149
|
+
}
|
|
150
|
+
return checkCloudDocsAPI;
|
|
151
|
+
}()
|
|
87
152
|
}]);
|
|
88
153
|
return ProfileAPI;
|
|
89
154
|
}();
|
|
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/**
|
|
6
|
-
* Copyright IBM Corp. 2020,
|
|
6
|
+
* Copyright IBM Corp. 2020, 2023
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -8,7 +8,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
/**
|
|
11
|
-
* Copyright IBM Corp. 2020,
|
|
11
|
+
* Copyright IBM Corp. 2020, 2023
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie.js
CHANGED
|
@@ -52,7 +52,7 @@ function _toPrimitive(input, hint) {
|
|
|
52
52
|
return (hint === "string" ? String : Number)(input);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* Copyright IBM Corp. 2020,
|
|
55
|
+
* Copyright IBM Corp. 2020, 2023
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
58
58
|
* LICENSE file in the root directory of this source tree.
|
package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/markdownToHtml/markdownToHtml.js
CHANGED
|
@@ -10,7 +10,7 @@ var _marked = require("marked");
|
|
|
10
10
|
var _settings = _interopRequireDefault(require("carbon-components/umd/globals/js/settings"));
|
|
11
11
|
var _striptags = _interopRequireDefault(require("striptags"));
|
|
12
12
|
/**
|
|
13
|
-
* Copyright IBM Corp. 2020,
|
|
13
|
+
* Copyright IBM Corp. 2020, 2023
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -14,7 +14,7 @@ function _typeof(obj) {
|
|
|
14
14
|
}, _typeof(obj);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Copyright IBM Corp. 2016,
|
|
17
|
+
* Copyright IBM Corp. 2016, 2023
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _striptags = _interopRequireDefault(require("striptags"));
|
|
9
9
|
/**
|
|
10
|
-
* Copyright IBM Corp. 2020,
|
|
10
|
+
* Copyright IBM Corp. 2020, 2023
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,7 +9,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _windowOrGlobal = _interopRequireDefault(require("window-or-global"));
|
|
11
11
|
/**
|
|
12
|
-
* Copyright IBM Corp. 2020,
|
|
12
|
+
* Copyright IBM Corp. 2020, 2023
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -12,7 +12,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
13
|
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
14
14
|
/**
|
|
15
|
-
* Copyright IBM Corp. 2021,
|
|
15
|
+
* Copyright IBM Corp. 2021, 2023
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
package/lib/services/DDO/DDO.js
CHANGED
|
@@ -12,7 +12,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
12
|
var _settings = _interopRequireDefault(require("../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings"));
|
|
13
13
|
var _windowOrGlobal = _interopRequireDefault(require("window-or-global"));
|
|
14
14
|
/**
|
|
15
|
-
* Copyright IBM Corp. 2020,
|
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -15,7 +15,7 @@ var _DDO = require("../DDO");
|
|
|
15
15
|
var _ipcinfoCookie = _interopRequireDefault(require("../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/ipcinfoCookie/ipcinfoCookie"));
|
|
16
16
|
var _windowOrGlobal = _interopRequireDefault(require("window-or-global"));
|
|
17
17
|
/**
|
|
18
|
-
* Copyright IBM Corp. 2020,
|
|
18
|
+
* Copyright IBM Corp. 2020, 2023
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,8 +10,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
|
+
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
13
14
|
/**
|
|
14
|
-
* Copyright IBM Corp. 2020,
|
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
|
15
16
|
*
|
|
16
17
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
17
18
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -37,6 +38,14 @@ var _version = process && process.env.PROFILE_VERSION || 'v1';
|
|
|
37
38
|
*/
|
|
38
39
|
var _endpoint = "".concat(_host, "/").concat(_version, "/mgmt/idaas/user/status/");
|
|
39
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The cookie name for determining user login status for cloud.ibm.com.
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
var _cookieName = 'com.ibm.cloud.iam.LoggedIn.prod';
|
|
48
|
+
|
|
40
49
|
/**
|
|
41
50
|
* Profile API class with methods for checking user authentication for ibm.com
|
|
42
51
|
*/
|
|
@@ -91,6 +100,62 @@ var ProfileAPI = /*#__PURE__*/function () {
|
|
|
91
100
|
}
|
|
92
101
|
return getUserStatus;
|
|
93
102
|
}()
|
|
103
|
+
/**
|
|
104
|
+
* retrieve the cloud login status via cookie
|
|
105
|
+
*
|
|
106
|
+
*
|
|
107
|
+
* @returns {string} string determining login status
|
|
108
|
+
*/
|
|
109
|
+
}, {
|
|
110
|
+
key: "checkCloudCookie",
|
|
111
|
+
value: function checkCloudCookie() {
|
|
112
|
+
var cloudLogin = _jsCookie.default.get(_cookieName);
|
|
113
|
+
return {
|
|
114
|
+
user: cloudLogin === '1' ? 'authenticated' : 'anonymous'
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* retrieve the cloud login status via api
|
|
120
|
+
*
|
|
121
|
+
*
|
|
122
|
+
* @returns {string} string determining login status
|
|
123
|
+
*/
|
|
124
|
+
}, {
|
|
125
|
+
key: "checkCloudDocsAPI",
|
|
126
|
+
value: function () {
|
|
127
|
+
var _checkCloudDocsAPI = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
128
|
+
var cloudLogin;
|
|
129
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
130
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
131
|
+
case 0:
|
|
132
|
+
_context2.next = 2;
|
|
133
|
+
return _axios.default.get('/api/v6/selected-account?profile=true', {
|
|
134
|
+
headers: {
|
|
135
|
+
Accept: 'application/json'
|
|
136
|
+
}
|
|
137
|
+
}).then(function (response) {
|
|
138
|
+
return response.status === 200 ? 'authenticated' : 'anonymous';
|
|
139
|
+
}).catch(function (error) {
|
|
140
|
+
console.error(error);
|
|
141
|
+
return 'anonymous';
|
|
142
|
+
});
|
|
143
|
+
case 2:
|
|
144
|
+
cloudLogin = _context2.sent;
|
|
145
|
+
return _context2.abrupt("return", {
|
|
146
|
+
user: cloudLogin
|
|
147
|
+
});
|
|
148
|
+
case 4:
|
|
149
|
+
case "end":
|
|
150
|
+
return _context2.stop();
|
|
151
|
+
}
|
|
152
|
+
}, _callee2);
|
|
153
|
+
}));
|
|
154
|
+
function checkCloudDocsAPI() {
|
|
155
|
+
return _checkCloudDocsAPI.apply(this, arguments);
|
|
156
|
+
}
|
|
157
|
+
return checkCloudDocsAPI;
|
|
158
|
+
}()
|
|
94
159
|
}]);
|
|
95
160
|
return ProfileAPI;
|
|
96
161
|
}();
|
|
@@ -12,7 +12,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
13
|
var _Locale = require("../Locale");
|
|
14
14
|
/**
|
|
15
|
-
* Copyright IBM Corp. 2020,
|
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -16,7 +16,7 @@ var _deprecate = _interopRequireDefault(require("../../internal/vendor/@carbon/i
|
|
|
16
16
|
var _KalturaPlayer = _interopRequireDefault(require("../KalturaPlayer/KalturaPlayer"));
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
19
|
-
* Copyright IBM Corp. 2020,
|
|
19
|
+
* Copyright IBM Corp. 2020, 2023
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,7 +10,7 @@ var _DDO = require("../DDO");
|
|
|
10
10
|
var _loadNonLatinPlex = _interopRequireDefault(require("../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/loadNonLatinPlex/loadNonLatinPlex"));
|
|
11
11
|
var _Locale = require("../Locale");
|
|
12
12
|
/**
|
|
13
|
-
* Copyright IBM Corp. 2020,
|
|
13
|
+
* Copyright IBM Corp. 2020, 2023
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ibmdotcom-services",
|
|
3
3
|
"description": "Carbon for IBM.com Services",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.49.0-alpha.5489894480.0+a4908b7",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/runtime": "^7.16.3",
|
|
51
|
-
"@carbon/ibmdotcom-utilities": "1.
|
|
51
|
+
"@carbon/ibmdotcom-utilities": "1.49.0-alpha.5489894480.0+a4908b7",
|
|
52
52
|
"@carbon/telemetry": "0.1.0",
|
|
53
53
|
"axios": "^0.27.2",
|
|
54
54
|
"marked": "^4.0.10",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"rollup-plugin-terser": "^7.0.2",
|
|
91
91
|
"whatwg-fetch": "^2.0.3"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "a4908b7c0f459da2aa5c04f0a2a8f66dcb15ae7d"
|
|
94
94
|
}
|
|
@@ -2747,7 +2747,7 @@
|
|
|
2747
2747
|
* @type {string}
|
|
2748
2748
|
* @private
|
|
2749
2749
|
*/
|
|
2750
|
-
var _cookieName$
|
|
2750
|
+
var _cookieName$2 = 'com.ibm.cloud.iam.LoggedIn.prod';
|
|
2751
2751
|
var CloudAccountAuthAPI = /*#__PURE__*/function () {
|
|
2752
2752
|
function CloudAccountAuthAPI() {
|
|
2753
2753
|
_classCallCheck$1(this, CloudAccountAuthAPI);
|
|
@@ -2765,7 +2765,7 @@
|
|
|
2765
2765
|
* @returns {string} string determining login status
|
|
2766
2766
|
*/
|
|
2767
2767
|
function checkCookie() {
|
|
2768
|
-
var cloudLogin = Cookies.get(_cookieName$
|
|
2768
|
+
var cloudLogin = Cookies.get(_cookieName$2);
|
|
2769
2769
|
return {
|
|
2770
2770
|
user: cloudLogin === '1' ? 'authenticated' : 'anonymous'
|
|
2771
2771
|
};
|
|
@@ -3280,7 +3280,7 @@
|
|
|
3280
3280
|
* @type {string}
|
|
3281
3281
|
* @private
|
|
3282
3282
|
*/
|
|
3283
|
-
var _cookieName = 'ipcInfo';
|
|
3283
|
+
var _cookieName$1 = 'ipcInfo';
|
|
3284
3284
|
|
|
3285
3285
|
/**
|
|
3286
3286
|
* Utility to set and get the ipcInfo cookie needed to determine country and language code
|
|
@@ -3307,7 +3307,7 @@
|
|
|
3307
3307
|
return decodeURIComponent(value);
|
|
3308
3308
|
}
|
|
3309
3309
|
});
|
|
3310
|
-
var ipcinfo = cookiesDecode.get(_cookieName);
|
|
3310
|
+
var ipcinfo = cookiesDecode.get(_cookieName$1);
|
|
3311
3311
|
if (ipcinfo) {
|
|
3312
3312
|
var cc;
|
|
3313
3313
|
var lc;
|
|
@@ -3348,7 +3348,7 @@
|
|
|
3348
3348
|
return encodeURIComponent(value);
|
|
3349
3349
|
}
|
|
3350
3350
|
});
|
|
3351
|
-
cookiesEncode.set(_cookieName, info, {
|
|
3351
|
+
cookiesEncode.set(_cookieName$1, info, {
|
|
3352
3352
|
expires: 365,
|
|
3353
3353
|
domain: '.ibm.com'
|
|
3354
3354
|
});
|
|
@@ -3845,7 +3845,7 @@
|
|
|
3845
3845
|
}();
|
|
3846
3846
|
|
|
3847
3847
|
/**
|
|
3848
|
-
* Copyright IBM Corp. 2020,
|
|
3848
|
+
* Copyright IBM Corp. 2020, 2023
|
|
3849
3849
|
*
|
|
3850
3850
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
3851
3851
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -4020,6 +4020,14 @@
|
|
|
4020
4020
|
*/
|
|
4021
4021
|
var _endpoint$1 = "".concat(_host$2, "/").concat(_version$1, "/mgmt/idaas/user/status/");
|
|
4022
4022
|
|
|
4023
|
+
/**
|
|
4024
|
+
* The cookie name for determining user login status for cloud.ibm.com.
|
|
4025
|
+
*
|
|
4026
|
+
* @type {string}
|
|
4027
|
+
* @private
|
|
4028
|
+
*/
|
|
4029
|
+
var _cookieName = 'com.ibm.cloud.iam.LoggedIn.prod';
|
|
4030
|
+
|
|
4023
4031
|
/**
|
|
4024
4032
|
* Profile API class with methods for checking user authentication for ibm.com
|
|
4025
4033
|
*/
|
|
@@ -4074,6 +4082,62 @@
|
|
|
4074
4082
|
}
|
|
4075
4083
|
return getUserStatus;
|
|
4076
4084
|
}()
|
|
4085
|
+
/**
|
|
4086
|
+
* retrieve the cloud login status via cookie
|
|
4087
|
+
*
|
|
4088
|
+
*
|
|
4089
|
+
* @returns {string} string determining login status
|
|
4090
|
+
*/
|
|
4091
|
+
}, {
|
|
4092
|
+
key: "checkCloudCookie",
|
|
4093
|
+
value: function checkCloudCookie() {
|
|
4094
|
+
var cloudLogin = Cookies.get(_cookieName);
|
|
4095
|
+
return {
|
|
4096
|
+
user: cloudLogin === '1' ? 'authenticated' : 'anonymous'
|
|
4097
|
+
};
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
/**
|
|
4101
|
+
* retrieve the cloud login status via api
|
|
4102
|
+
*
|
|
4103
|
+
*
|
|
4104
|
+
* @returns {string} string determining login status
|
|
4105
|
+
*/
|
|
4106
|
+
}, {
|
|
4107
|
+
key: "checkCloudDocsAPI",
|
|
4108
|
+
value: function () {
|
|
4109
|
+
var _checkCloudDocsAPI = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
4110
|
+
var cloudLogin;
|
|
4111
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
4112
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
4113
|
+
case 0:
|
|
4114
|
+
_context2.next = 2;
|
|
4115
|
+
return axios.get('/api/v6/selected-account?profile=true', {
|
|
4116
|
+
headers: {
|
|
4117
|
+
Accept: 'application/json'
|
|
4118
|
+
}
|
|
4119
|
+
}).then(function (response) {
|
|
4120
|
+
return response.status === 200 ? 'authenticated' : 'anonymous';
|
|
4121
|
+
}).catch(function (error) {
|
|
4122
|
+
console.error(error);
|
|
4123
|
+
return 'anonymous';
|
|
4124
|
+
});
|
|
4125
|
+
case 2:
|
|
4126
|
+
cloudLogin = _context2.sent;
|
|
4127
|
+
return _context2.abrupt("return", {
|
|
4128
|
+
user: cloudLogin
|
|
4129
|
+
});
|
|
4130
|
+
case 4:
|
|
4131
|
+
case "end":
|
|
4132
|
+
return _context2.stop();
|
|
4133
|
+
}
|
|
4134
|
+
}, _callee2);
|
|
4135
|
+
}));
|
|
4136
|
+
function checkCloudDocsAPI() {
|
|
4137
|
+
return _checkCloudDocsAPI.apply(this, arguments);
|
|
4138
|
+
}
|
|
4139
|
+
return checkCloudDocsAPI;
|
|
4140
|
+
}()
|
|
4077
4141
|
}]);
|
|
4078
4142
|
return ProfileAPI;
|
|
4079
4143
|
}();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).IBMDotcomServices={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}};!function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}(r);var o=n(r.exports),i={exports:{}},a={exports:{}},s={exports:{}};!function(e){function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(s);var c=n(s.exports),u={exports:{}};!function(e){var t=s.exports.default;e.exports=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(u),function(e){var t=s.exports.default,n=u.exports;e.exports=function(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}(a),function(e){var t=a.exports;function n(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,t(o.key),o)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}(i);var l=n(i.exports),f="object"===("undefined"==typeof self?"undefined":c(self))&&self.self===self&&self||"object"===c(t)&&t.global===t&&t||t,p=process&&"true"===process.env.SCROLL_TRACKING||!1,d=process?"production":"development",h=function(){function e(){o(this,e)}return l(e,null,[{key:"registerEvent",value:function(e){f.ibmStats&&f.ibmStats.event(e)}},{key:"initAll",value:function(){this.initScrollTracker(),this.initDynamicTabs(),this.initModals()}},{key:"initScrollTracker",value:function(){p&&console.warn("Scroll tracker service has been deprecated. Please refer to documentation for IBM DBDM gestures 2.0.")}},{key:"initDynamicTabs",value:function(){var e=this.triggerTabSelected.bind(this);f.document.addEventListener("tab-selected",(function(t){e(t.target.id,t.detail.item.innerText)}))}},{key:"triggerTabSelected",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"CLICK",eventCategoryGroup:"TABS DYNAMIC",executionPath:e,targetTitle:t})}catch(e){"production"!==d&&console.error("Error triggering tab event:",e)}}},{key:"initModals",value:function(){var e=this.triggerModalHide.bind(this);f.document.addEventListener("modal-hidden",(function(t){e(t.target.id,t.detail.launchingElement.innerText)}));var t=this.triggerModalShow.bind(this);f.document.addEventListener("modal-shown",(function(e){t(e.target.id,e.detail.launchingElement.innerText)}))}},{key:"triggerModalHide",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"HIDE",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==d&&console.error("Error triggering modal hide event:",e)}}},{key:"triggerModalShow",value:function(e,t){try{this.registerEvent({type:"element",primaryCategory:"WIDGET",eventName:"SHOW",eventCategoryGroup:"SHOWHIDE",executionPath:e,targetTitle:t})}catch(e){"production"!==d&&console.error("Error triggering modal show event:",e)}}},{key:"videoPlayerStats",value:function(e){var t=(null==e?void 0:e.playerState)||"",n=Math.floor(e.currentTime),r=Math.floor(e.duration),o=Math.floor(n/r*100);switch(e.playerState){case 0:t="launched";break;case 1:t="paused";break;case 2:t="played";break;case 3:t="ended";break;case 99:t="error";break;default:"number"==typeof t&&(t="")}if(0===n&&(n="start",o="0"),(n>=r||3===e.playerState)&&(n="end",o="100"),"end"!==n||1!==e.playerState){var i={type:"video",primaryCategory:"VIDEO",eventName:e.title,eventCategoryGroup:e.playerType,executionPath:e.videoId||e.mediaId,execPathReturnCode:t,eventVidStatus:e.playerState,eventVidTimeStamp:n,eventVidLength:r,eventVidPlayed:o+"%"};null!=e&&e.customMetricsData&&Object.keys(e.customMetricsData).forEach((function(t){i[t]=e.customMetricsData[t]}));try{this.registerEvent(i)}catch(e){"production"!==d&&console.error("Error firing video metrics:",e)}}}}]),e}(),v={exports:{}};!function(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}(v);var m=n(v.exports),y={exports:{}};!function(e){var t=s.exports.default;function n(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
3
|
-
e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),s=new A(r||[]);return a(i,"_invoke",{value:O(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h={};function v(){}function m(){}function y(){}var g={};f(g,c,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(R([])));x&&x!==o&&i.call(x,c)&&(g=x);var w=y.prototype=v.prototype=Object.create(g);function E(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,n){function r(o,a,s,c){var u=d(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):n.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,t){function i(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(i,i):i()}})}function O(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function T(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:m,configurable:!0}),m.displayName=f(y,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},E(S.prototype),f(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new S(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},r.values=R,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(y);var g=y.exports(),b=g;try{regeneratorRuntime=g}catch(e){"object"===("undefined"==typeof globalThis?"undefined":c(globalThis))?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}var x,w={exports:{}},E=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},S=E,O=Object.prototype.toString,T=(x=Object.create(null),function(e){var t=O.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())});function _(e){return e=e.toLowerCase(),function(t){return T(t)===e}}function k(e){return Array.isArray(e)}function A(e){return void 0===e}var R=_("ArrayBuffer");function P(e){return null!==e&&"object"===c(e)}function C(e){if("object"!==T(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var L=_("Date"),I=_("File"),j=_("Blob"),D=_("FileList");function N(e){return"[object Function]"===O.call(e)}var M=_("URLSearchParams");function U(e,t){if(null!=e)if("object"!==c(e)&&(e=[e]),k(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var B,F=(B="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return B&&e instanceof B}),H={isArray:k,isArrayBuffer:R,isBuffer:function(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||O.call(e)===t||N(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&R(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:P,isPlainObject:C,isUndefined:A,isDate:L,isFile:I,isBlob:j,isFunction:N,isStream:function(e){return P(e)&&N(e.pipe)},isURLSearchParams:M,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:U,merge:function e(){var t={};function n(n,r){C(t[r])&&C(n)?t[r]=e(t[r],n):C(n)?t[r]=e({},n):k(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)U(arguments[r],n);return t},extend:function(e,t,n){return U(t,(function(t,r){e[r]=n&&"function"==typeof t?S(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,i,a={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:T,kindOfTest:_,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(A(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:F,isFileList:D},q=H;function J(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var W=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(q.isURLSearchParams(t))r=t.toString();else{var o=[];q.forEach(t,(function(e,t){null!=e&&(q.isArray(e)?t+="[]":e=[e],q.forEach(e,(function(e){q.isDate(e)?e=e.toISOString():q.isObject(e)&&(e=JSON.stringify(e)),o.push(J(t)+"="+J(e))})))})),r=o.join("&")}if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},G=H;function V(){this.handlers=[]}V.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},V.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},V.prototype.forEach=function(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var K=V,z=H,Y=H;function $(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var X=$.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){Q[e]={value:e}})),Object.defineProperties($,Q),Object.defineProperty(X,"isAxiosError",{value:!0}),$.from=function(e,t,n,r,o,i){var a=Object.create(X);return Y.toFlatObject(e,a,(function(e){return e!==Error.prototype})),$.call(a,e.message,t,n,r,o),a.name=e.name,i&&Object.assign(a,i),a};var Z=$,ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},te=H;var ne=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":te.isDate(e)?e.toISOString():te.isArrayBuffer(e)||te.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(te.isPlainObject(o)||te.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+i);n.push(o),te.forEach(o,(function(n,o){if(!te.isUndefined(n)){var a,s=i?i+"."+o:o;if(n&&!i&&"object"===c(n))if(te.endsWith(o,"{}"))n=JSON.stringify(n);else if(te.endsWith(o,"[]")&&(a=te.toArray(n)))return void a.forEach((function(e){!te.isUndefined(e)&&t.append(s,r(e))}));e(n,s)}})),n.pop()}else t.append(i,r(o))}(e),t},re=Z,oe=H,ie=oe.isStandardBrowserEnv()?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),oe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),oe.isString(r)&&a.push("path="+r),oe.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},ae=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},se=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},ce=function(e,t){return e&&!ae(t)?se(e,t):t},ue=H,le=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],fe=H,pe=fe.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=fe.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},de=Z;function he(e){de.call(this,null==e?"canceled":e,de.ERR_CANCELED),this.name="CanceledError"}H.inherits(he,de,{__CANCEL__:!0});var ve=he,me=H,ye=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new re("Request failed with status code "+n.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)},ge=ie,be=W,xe=ce,we=function(e){var t,n,r,o={};return e?(ue.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=ue.trim(e.substr(0,r)).toLowerCase(),n=ue.trim(e.substr(r+1)),t){if(o[t]&&le.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o},Ee=pe,Se=ee,Oe=Z,Te=ve,_e=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},ke=function(e){return new Promise((function(t,n){var r,o=e.data,i=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}me.isFormData(o)&&me.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(u+":"+l)}var f=xe(e.baseURL,e.url);function p(){if(c){var r="getAllResponseHeaders"in c?we(c.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c};ye((function(e){t(e),s()}),(function(e){n(e),s()}),o),c=null}}if(c.open(e.method.toUpperCase(),be(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new Oe("Request aborted",Oe.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Oe("Network Error",Oe.ERR_NETWORK,e,c,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Oe(t,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,c)),c=null},me.isStandardBrowserEnv()){var d=(e.withCredentials||Ee(f))&&e.xsrfCookieName?ge.read(e.xsrfCookieName):void 0;d&&(i[e.xsrfHeaderName]=d)}"setRequestHeader"in c&&me.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),me.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(r=function(e){c&&(n(!e||e&&e.type?new Te:e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r))),o||(o=null);var h=_e(f);h&&-1===["http","https","file"].indexOf(h)?n(new Oe("Unsupported protocol "+h+":",Oe.ERR_BAD_REQUEST,e)):c.send(o)}))},Ae=H,Re=function(e,t){z.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Pe=Z,Ce=ne,Le={"Content-Type":"application/x-www-form-urlencoded"};function Ie(e,t){!Ae.isUndefined(e)&&Ae.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var je,De={transitional:ee,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(je=ke),je),transformRequest:[function(e,t){if(Re(t,"Accept"),Re(t,"Content-Type"),Ae.isFormData(e)||Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return Ie(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=Ae.isObject(e),o=t&&t["Content-Type"];if((n=Ae.isFileList(e))||r&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return Ce(n?{"files[]":e}:e,i&&new i)}return r||"application/json"===o?(Ie(t,"application/json"),function(e,t,n){if(Ae.isString(e))try{return(t||JSON.parse)(e),Ae.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||De.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&Ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Pe.from(e,Pe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ae.forEach(["delete","get","head"],(function(e){De.headers[e]={}})),Ae.forEach(["post","put","patch"],(function(e){De.headers[e]=Ae.merge(Le)}));var Ne=De,Me=H,Ue=Ne,Be=function(e){return!(!e||!e.__CANCEL__)},Fe=H,He=function(e,t,n){var r=this||Ue;return Me.forEach(n,(function(n){e=n.call(r,e,t)})),e},qe=Be,Je=Ne,We=ve;function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new We}var Ve=H,Ke=function(e,t){t=t||{};var n={};function r(e,t){return Ve.isPlainObject(e)&&Ve.isPlainObject(t)?Ve.merge(e,t):Ve.isPlainObject(t)?Ve.merge({},t):Ve.isArray(t)?t.slice():t}function o(n){return Ve.isUndefined(t[n])?Ve.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function i(e){if(!Ve.isUndefined(t[e]))return r(void 0,t[e])}function a(n){return Ve.isUndefined(t[n])?Ve.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function s(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return Ve.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,r=t(e);Ve.isUndefined(r)&&t!==s||(n[e]=r)})),n},ze="0.27.2",Ye=ze,$e=Z,Xe={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Xe[e]=function(n){return c(n)===e||"a"+(t<1?"n ":" ")+e}}));var Qe={};Xe.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ye+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new $e(r(o," has been removed"+(t?" in "+t:"")),$e.ERR_DEPRECATED);return t&&!Qe[o]&&(Qe[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Ze={assertOptions:function(e,t,n){if("object"!==c(e))throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new $e("option "+i+" must be "+u,$e.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $e("Unknown option "+i,$e.ERR_BAD_OPTION)}},validators:Xe},et=H,tt=W,nt=K,rt=function(e){return Ge(e),e.headers=e.headers||{},e.data=He.call(e,e.data,e.headers,e.transformRequest),e.headers=Fe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Fe.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Je.adapter)(e).then((function(t){return Ge(e),t.data=He.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return qe(t)||(Ge(e),t&&t.response&&(t.response.data=He.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ot=Ke,it=ce,at=Ze,st=at.validators;function ct(e){this.defaults=e,this.interceptors={request:new nt,response:new nt}}ct.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ot(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&at.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var s=[rt,void 0];for(Array.prototype.unshift.apply(s,r),s=s.concat(a),i=Promise.resolve(t);s.length;)i=i.then(s.shift(),s.shift());return i}for(var c=t;r.length;){var u=r.shift(),l=r.shift();try{c=u(c)}catch(e){l(e);break}}try{i=rt(c)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},ct.prototype.getUri=function(e){e=ot(this.defaults,e);var t=it(e.baseURL,e.url);return tt(t,e.params,e.paramsSerializer)},et.forEach(["delete","get","head","options"],(function(e){ct.prototype[e]=function(t,n){return this.request(ot(n||{},{method:e,url:t,data:(n||{}).data}))}})),et.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)}));var ut=ct,lt=ve;function ft(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new lt(e),t(n.reason))}))}ft.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ft.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},ft.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},ft.source=function(){var e;return{token:new ft((function(t){e=t})),cancel:e}};var pt=ft,dt=H,ht=H,vt=E,mt=ut,yt=Ke;var gt=function e(t){var n=new mt(t),r=vt(mt.prototype.request,n);return ht.extend(r,mt.prototype,n),ht.extend(r,n),r.create=function(n){return e(yt(t,n))},r}(Ne);gt.Axios=mt,gt.CanceledError=ve,gt.CancelToken=pt,gt.isCancel=Be,gt.VERSION=ze,gt.toFormData=ne,gt.AxiosError=Z,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return dt.isObject(e)&&!0===e.isAxiosError},w.exports=gt,w.exports.default=gt;var bt=w.exports,xt={exports:{}};
|
|
3
|
+
e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),s=new A(r||[]);return a(i,"_invoke",{value:O(e,n,s)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h={};function v(){}function m(){}function y(){}var g={};f(g,c,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(R([])));x&&x!==o&&i.call(x,c)&&(g=x);var w=y.prototype=v.prototype=Object.create(g);function E(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,n){function r(o,a,s,c){var u=d(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):n.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,t){function i(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(i,i):i()}})}function O(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function R(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:m,configurable:!0}),m.displayName=f(y,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},E(S.prototype),f(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new S(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(w),f(w,l,"Generator"),f(w,c,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},r.values=R,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(y);var g=y.exports(),b=g;try{regeneratorRuntime=g}catch(e){"object"===("undefined"==typeof globalThis?"undefined":c(globalThis))?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}var x,w={exports:{}},E=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},S=E,O=Object.prototype.toString,k=(x=Object.create(null),function(e){var t=O.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())});function T(e){return e=e.toLowerCase(),function(t){return k(t)===e}}function _(e){return Array.isArray(e)}function A(e){return void 0===e}var R=T("ArrayBuffer");function P(e){return null!==e&&"object"===c(e)}function C(e){if("object"!==k(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var L=T("Date"),I=T("File"),j=T("Blob"),D=T("FileList");function N(e){return"[object Function]"===O.call(e)}var M=T("URLSearchParams");function U(e,t){if(null!=e)if("object"!==c(e)&&(e=[e]),_(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var B,F=(B="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return B&&e instanceof B}),H={isArray:_,isArrayBuffer:R,isBuffer:function(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||O.call(e)===t||N(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&R(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:P,isPlainObject:C,isUndefined:A,isDate:L,isFile:I,isBlob:j,isFunction:N,isStream:function(e){return P(e)&&N(e.pipe)},isURLSearchParams:M,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:U,merge:function e(){var t={};function n(n,r){C(t[r])&&C(n)?t[r]=e(t[r],n):C(n)?t[r]=e({},n):_(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)U(arguments[r],n);return t},extend:function(e,t,n){return U(t,(function(t,r){e[r]=n&&"function"==typeof t?S(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,i,a={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:k,kindOfTest:T,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(A(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:F,isFileList:D},q=H;function J(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var W=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(q.isURLSearchParams(t))r=t.toString();else{var o=[];q.forEach(t,(function(e,t){null!=e&&(q.isArray(e)?t+="[]":e=[e],q.forEach(e,(function(e){q.isDate(e)?e=e.toISOString():q.isObject(e)&&(e=JSON.stringify(e)),o.push(J(t)+"="+J(e))})))})),r=o.join("&")}if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},G=H;function V(){this.handlers=[]}V.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},V.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},V.prototype.forEach=function(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var K=V,z=H,Y=H;function $(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var X=$.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){Q[e]={value:e}})),Object.defineProperties($,Q),Object.defineProperty(X,"isAxiosError",{value:!0}),$.from=function(e,t,n,r,o,i){var a=Object.create(X);return Y.toFlatObject(e,a,(function(e){return e!==Error.prototype})),$.call(a,e.message,t,n,r,o),a.name=e.name,i&&Object.assign(a,i),a};var Z=$,ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},te=H;var ne=function(e,t){t=t||new FormData;var n=[];function r(e){return null===e?"":te.isDate(e)?e.toISOString():te.isArrayBuffer(e)||te.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(te.isPlainObject(o)||te.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+i);n.push(o),te.forEach(o,(function(n,o){if(!te.isUndefined(n)){var a,s=i?i+"."+o:o;if(n&&!i&&"object"===c(n))if(te.endsWith(o,"{}"))n=JSON.stringify(n);else if(te.endsWith(o,"[]")&&(a=te.toArray(n)))return void a.forEach((function(e){!te.isUndefined(e)&&t.append(s,r(e))}));e(n,s)}})),n.pop()}else t.append(i,r(o))}(e),t},re=Z,oe=H,ie=oe.isStandardBrowserEnv()?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),oe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),oe.isString(r)&&a.push("path="+r),oe.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},ae=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},se=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},ce=function(e,t){return e&&!ae(t)?se(e,t):t},ue=H,le=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],fe=H,pe=fe.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=fe.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},de=Z;function he(e){de.call(this,null==e?"canceled":e,de.ERR_CANCELED),this.name="CanceledError"}H.inherits(he,de,{__CANCEL__:!0});var ve=he,me=H,ye=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new re("Request failed with status code "+n.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)},ge=ie,be=W,xe=ce,we=function(e){var t,n,r,o={};return e?(ue.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=ue.trim(e.substr(0,r)).toLowerCase(),n=ue.trim(e.substr(r+1)),t){if(o[t]&&le.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o},Ee=pe,Se=ee,Oe=Z,ke=ve,Te=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},_e=function(e){return new Promise((function(t,n){var r,o=e.data,i=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}me.isFormData(o)&&me.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(u+":"+l)}var f=xe(e.baseURL,e.url);function p(){if(c){var r="getAllResponseHeaders"in c?we(c.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c};ye((function(e){t(e),s()}),(function(e){n(e),s()}),o),c=null}}if(c.open(e.method.toUpperCase(),be(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new Oe("Request aborted",Oe.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Oe("Network Error",Oe.ERR_NETWORK,e,c,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Oe(t,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,c)),c=null},me.isStandardBrowserEnv()){var d=(e.withCredentials||Ee(f))&&e.xsrfCookieName?ge.read(e.xsrfCookieName):void 0;d&&(i[e.xsrfHeaderName]=d)}"setRequestHeader"in c&&me.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),me.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(r=function(e){c&&(n(!e||e&&e.type?new ke:e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r))),o||(o=null);var h=Te(f);h&&-1===["http","https","file"].indexOf(h)?n(new Oe("Unsupported protocol "+h+":",Oe.ERR_BAD_REQUEST,e)):c.send(o)}))},Ae=H,Re=function(e,t){z.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Pe=Z,Ce=ne,Le={"Content-Type":"application/x-www-form-urlencoded"};function Ie(e,t){!Ae.isUndefined(e)&&Ae.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var je,De={transitional:ee,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(je=_e),je),transformRequest:[function(e,t){if(Re(t,"Accept"),Re(t,"Content-Type"),Ae.isFormData(e)||Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return Ie(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=Ae.isObject(e),o=t&&t["Content-Type"];if((n=Ae.isFileList(e))||r&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return Ce(n?{"files[]":e}:e,i&&new i)}return r||"application/json"===o?(Ie(t,"application/json"),function(e,t,n){if(Ae.isString(e))try{return(t||JSON.parse)(e),Ae.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||De.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&Ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Pe.from(e,Pe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ae.forEach(["delete","get","head"],(function(e){De.headers[e]={}})),Ae.forEach(["post","put","patch"],(function(e){De.headers[e]=Ae.merge(Le)}));var Ne=De,Me=H,Ue=Ne,Be=function(e){return!(!e||!e.__CANCEL__)},Fe=H,He=function(e,t,n){var r=this||Ue;return Me.forEach(n,(function(n){e=n.call(r,e,t)})),e},qe=Be,Je=Ne,We=ve;function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new We}var Ve=H,Ke=function(e,t){t=t||{};var n={};function r(e,t){return Ve.isPlainObject(e)&&Ve.isPlainObject(t)?Ve.merge(e,t):Ve.isPlainObject(t)?Ve.merge({},t):Ve.isArray(t)?t.slice():t}function o(n){return Ve.isUndefined(t[n])?Ve.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function i(e){if(!Ve.isUndefined(t[e]))return r(void 0,t[e])}function a(n){return Ve.isUndefined(t[n])?Ve.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function s(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return Ve.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,r=t(e);Ve.isUndefined(r)&&t!==s||(n[e]=r)})),n},ze="0.27.2",Ye=ze,$e=Z,Xe={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Xe[e]=function(n){return c(n)===e||"a"+(t<1?"n ":" ")+e}}));var Qe={};Xe.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ye+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new $e(r(o," has been removed"+(t?" in "+t:"")),$e.ERR_DEPRECATED);return t&&!Qe[o]&&(Qe[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Ze={assertOptions:function(e,t,n){if("object"!==c(e))throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new $e("option "+i+" must be "+u,$e.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $e("Unknown option "+i,$e.ERR_BAD_OPTION)}},validators:Xe},et=H,tt=W,nt=K,rt=function(e){return Ge(e),e.headers=e.headers||{},e.data=He.call(e,e.data,e.headers,e.transformRequest),e.headers=Fe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Fe.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Je.adapter)(e).then((function(t){return Ge(e),t.data=He.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return qe(t)||(Ge(e),t&&t.response&&(t.response.data=He.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ot=Ke,it=ce,at=Ze,st=at.validators;function ct(e){this.defaults=e,this.interceptors={request:new nt,response:new nt}}ct.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ot(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&at.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var s=[rt,void 0];for(Array.prototype.unshift.apply(s,r),s=s.concat(a),i=Promise.resolve(t);s.length;)i=i.then(s.shift(),s.shift());return i}for(var c=t;r.length;){var u=r.shift(),l=r.shift();try{c=u(c)}catch(e){l(e);break}}try{i=rt(c)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},ct.prototype.getUri=function(e){e=ot(this.defaults,e);var t=it(e.baseURL,e.url);return tt(t,e.params,e.paramsSerializer)},et.forEach(["delete","get","head","options"],(function(e){ct.prototype[e]=function(t,n){return this.request(ot(n||{},{method:e,url:t,data:(n||{}).data}))}})),et.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)}));var ut=ct,lt=ve;function ft(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new lt(e),t(n.reason))}))}ft.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ft.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},ft.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},ft.source=function(){var e;return{token:new ft((function(t){e=t})),cancel:e}};var pt=ft,dt=H,ht=H,vt=E,mt=ut,yt=Ke;var gt=function e(t){var n=new mt(t),r=vt(mt.prototype.request,n);return ht.extend(r,mt.prototype,n),ht.extend(r,n),r.create=function(n){return e(yt(t,n))},r}(Ne);gt.Axios=mt,gt.CanceledError=ve,gt.CancelToken=pt,gt.isCancel=Be,gt.VERSION=ze,gt.toFormData=ne,gt.AxiosError=Z,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return dt.isObject(e)&&!0===e.isAxiosError},w.exports=gt,w.exports.default=gt;var bt=w.exports,xt={exports:{}};
|
|
4
4
|
/*!
|
|
5
5
|
* JavaScript Cookie v2.2.1
|
|
6
6
|
* https://github.com/js-cookie/js-cookie
|
|
@@ -8,4 +8,4 @@ e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exp
|
|
|
8
8
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
9
9
|
* Released under the MIT license
|
|
10
10
|
*/
|
|
11
|
-
!function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[u]=c,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}(xt);var wt=xt.exports,Et=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===wt.get("com.ibm.cloud.iam.LoggedIn.prod")?"authenticated":"anonymous"}}},{key:"checkAPI",value:(t=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bt.get("/api/v6/selected-account?profile=true",{headers:{Accept:"application/json"}}).then((function(e){return 200===e.status?"authenticated":"anonymous"})).catch((function(e){return console.error(e),"anonymous"}));case 2:return t=e.sent,e.abrupt("return",{user:t});case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),St="Carbon for IBM.com v1.48.0";var Ot;function Tt(){return Ot||(Ot=new Promise((function(e,t){var n=0;!function r(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++n<50?setTimeout((function(){r()}),100):t(new Error("Timeout polling for digital data object."))}()}))),Ot}var _t=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"isReady",value:function(){return Tt()}},{key:"getAll",value:(i=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData})).catch((function(){return null}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setVersion",value:(r=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){f.digitalData.page.pageInfo.version=St}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLanguage",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.page.pageInfo.language}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLocation",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.user.location.country.toLowerCase()}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),kt="https://1.www.s81c.com/common/carbon/plex",At={ar:{entry:"sans-arabic",family:"IBM Plex Sans Arabic"},ja:{entry:"sans-jp",family:"IBM Plex Sans JP"},ko:{entry:"sans-kr",family:"IBM Plex Sans KR"}},Rt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];At[e]&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===t.length){var n=document.createElement("link");n.href="".concat(kt,"/").concat(At[e].entry,".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}else t.forEach((function(t){var n=document.createElement("link");n.href="".concat(kt,"/").concat(At[e].entry,"-").concat(Rt[t],".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}))}(e,t),function(e){document.body.style.fontFamily="".concat(At[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}var Ct={exports:{}},Lt={exports:{}},It={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}(It),function(e){var t=It.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(Lt);var jt={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(jt);var Dt={exports:{}};!function(e){var t=It.exports;e.exports=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(Dt);var Nt={exports:{}};!function(e){e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports}(Nt),function(e){var t=Lt.exports,n=jt.exports,r=Dt.exports,o=Nt.exports;e.exports=function(e){return t(e)||n(e)||r(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports}(Ct);var Mt=n(Ct.exports);function Ut(e){return Ut="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},Ut(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Ut(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Ut(i)?i:String(i)),r)}var o,i}var Ft="ipcInfo",Ht=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=wt.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Ft);if(n)return n.split(";").map((function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);wt.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Ft,r,{expires:365,domain:".ibm.com"})}}],(n=null)&&Bt(t.prototype,n),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),qt=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Jt={lc:"en",cc:"us"},Wt="".concat(qt,"/common/js/dynamicnav/www/countrylist/jsononly"),Gt={headers:{"Content-Type":"application/json; charset=utf-8"}},Vt="dds-countrylist",Kt={};var zt=function(){function e(){o(this,e)}var t,n,r;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(Kt).forEach((function(e){return delete Kt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(Vt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(r=m(b.mark((function e(){var t,n,r,o,i,a,s;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Ht.get(),e.next=3,this.getLang();case 3:if(!(n=e.sent)){e.next=8;break}return e.abrupt("return",n);case 8:if(!(t&&t.cc&&t.lc)){e.next=14;break}return e.next=11,this.getList(t);case 11:return e.abrupt("return",t);case 14:return e.next=16,_t.getLocation();case 16:if(r=e.sent,o=f.navigator.language,i=o.split("-")[0],!r||!i){e.next=26;break}return e.next=22,this.getList({cc:r,lc:i});case 22:return a=e.sent,s=this.verifyLocale(r,i,a),Ht.set(s),e.abrupt("return",s);case 26:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLang",value:function(){return new Promise((function(e){var t=function(){var e,t,n=Object.assign({},f.digitalData||{});if(null!==(e=n.page)&&void 0!==e&&null!==(t=e.pageInfo)&&void 0!==t&&t.language){var r,o,i,a,s,c={};return null!==(r=n.page)&&void 0!==r&&null!==(o=r.pageInfo)&&void 0!==o&&o.language.includes("-")&&null!==(i=n.page)&&void 0!==i&&null!==(a=i.pageInfo)&&void 0!==a&&null!==(s=a.ibm)&&void 0!==s&&s.country?(c.lc=n.page.pageInfo.language.substring(0,2).toLowerCase(),c.cc=n.page.pageInfo.ibm.country.toLowerCase().trim(),c.cc.indexOf(",")>-1&&(c.cc=c.cc.substring(0,c.cc.indexOf(",")).trim()),"gb"===c.cc&&(c.cc="uk"),"zz"===c.cc&&(c.cc="us")):c.lc=n.page.pageInfo.language.substring(0,2).toLowerCase(),c}return!1}();e(t||function(){var e,t;if(null!==(e=f.document)&&void 0!==e&&null!==(t=e.documentElement)&&void 0!==t&&t.lang){var n=f.document.documentElement.lang.toLowerCase();if(-1===n.indexOf("-"))return{lc:n};var r=n.split("-");return{cc:r[1],lc:r[0]}}return Jt}())}))}},{key:"getLangDisplay",value:(n=m(b.mark((function e(t){var n,r,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLang();case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.regionList.forEach((function(e){o=o.concat(e.countryList)})),!(i=o.filter((function(e){if(-1!==e.locale.findIndex((function(e){return e[0]==="".concat(n.lc,"-").concat(n.cc)}))){var t,r=e.locale.filter((function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Mt(r))),e}}))).length){e.next=18;break}return e.abrupt("return","".concat(i[0].name," — ").concat(i[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var n,r,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cc,r=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(n,r,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,n,r){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(Vt,"-").concat(i),s=this.getSessionCache(a);if(s)n(s);else{if(!Kt[i]){var c="".concat(Wt,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");Kt[i]=bt.get(c,Gt).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(Vt,"-").concat(i),JSON.stringify(t)),t}))}Kt[i].then(n,(function(i){e===Jt.cc&&t===Jt.lc?r(i):o.fetchList(Jt.cc,Jt.lc,n,r)}))}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach((function(n){return n.countryList.forEach((function(n){var i=n.locale[0][0].split("-"),a=i[1],s=i[0];a===e&&s===t?o={cc:e,lc:t}:a!==e||r||(r=s)}))})))&&r&&(o={cc:e,lc:r}),o}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),Yt=!1;var $t=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Xt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Qt="".concat($t,"/marketplace/api/search/").concat(Xt,"/combined_suggestions"),Zt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Qt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,bt.get(n,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),en=function(){function e(){o(this,e)}return l(e,null,[{key:"setMastheadLogo",value:function(e){if(void 0===e)return!1;var t=(new Date).getTime(),n=e.end?Date.parse(e.end):null,r=!!(n&&t>n);return!(null===e.svg||r||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),tn=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nn=process&&process.env.PROFILE_VERSION||"v1",rn="".concat(tn,"/").concat(nn,"/mgmt/idaas/user/status/"),on=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getUserStatus",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bt.get(rn,{headers:{"Content-Type":"application/json; charset=utf-8"},withCredentials:!0}).then((function(e){return e.data})).catch((function(e){return console.log("Failed Profile Network Call",e),{user:"Unauthenticated"}}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),an=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sn=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cn="".concat(an,"/search/typeahead/").concat(sn),un=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n,r,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,zt.getLang();case 3:return r=e.sent,o=["lang=".concat(r.lc).concat(r.cc?"&cc=".concat(r.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(n?"appid=".concat(n):"")].filter((function(e){return e})).join("&"),i="".concat(cn,"?").concat(o),e.next=8,bt.get(i,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data.response}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),ln=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fn="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pn=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fn,dn={},hn="en",vn="us",mn=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"clearCache",value:function(e){var t=this.getSessionKey(e);if("undefined"!=typeof sessionStorage){Object.keys(dn).forEach((function(e){return delete dn[e]}));for(var n=0;n<sessionStorage.length;++n){var r=sessionStorage.key(n);0===r.indexOf(t)&&sessionStorage.removeItem(r)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,n){var r,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}r=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,zt.getLocale();case 9:i=e.sent,r=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(r,o,n,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,n,r,o){var i=this,a=this.getSessionKey(n),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)r(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dn[u]){var l=n||pn,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(n)?"":ln,d="".concat(p).concat(l,"/").concat(f,".json");dn[u]=bt.get(d,{headers:{"Content-Type":"text/plain",origin:ln}}).then((function(e){return i.transformData(e.data)})).then((function(e){return e.timestamp=Date.now(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("".concat(a,"-").concat(u),JSON.stringify(e)),e}))}dn[u].then(r,(function(a){t===vn&&e===hn?o(a):i.fetchTranslation(hn,vn,n,r,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fn!==pn||e)&&(t=(e||pn).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,n=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(n){var r="state=https%3A%2F%2Fwww.ibm.com",o=n.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(r))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=n[o].url.replace(r,"state=".concat(i))}}return e.footerMenu.push(e.socialFollow),e}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),yn={exports:{}};!function(e){var t=a.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(yn);var gn=n(yn.exports);function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(n),!0).forEach((function(t){gn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wn=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,En=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,Sn="https://cdnapisec.kaltura.com/p/".concat(wn,"/sp/").concat(wn,"00/embedIframeJs/uiconf_id/").concat(En,"/partner_id/").concat(wn),On="https://cdnsecakmi.kaltura.com/p/".concat(wn,"/thumbnail/entry_id/"),Tn=0,_n=!1;function kn(e,t){f.kWidget?(_n=!1,e()):_n?++Tn<50?setTimeout((function(){kn(e,t)}),100):t():(!function(){_n=!0;var e=document.createElement("script");e.src=Sn,e.async=!0,document.body.appendChild(e)}(),kn(e,t))}var An={},Rn=function(){function e(){o(this,e)}var t,n;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){kn(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,n=e.height,r=e.width,o=On+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedMedia",value:(n=m(b.mark((function e(t,n){var r,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:{},o=!(s.length>3&&void 0!==s[3])||s[3],i=s.length>4&&void 0!==s[4]?s[4]:function(){},a=this.fireEvent,e.next=6,this.checkScript().then((function(){var e=new Promise((function(e){var s;if(!document.getElementById(n)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",n),document.body.append(c),s=!0}f.kWidget.embed({targetId:n,wid:"_"+wn,uiconf_id:En,entry_id:t,flashvars:xn(xn({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),r),params:{wmode:"transparent"},readyCallback:function(n){var r=document.getElementById(n);o&&(r.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:r,mediaId:t})})),r.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:r,mediaId:t})})),r.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:r,mediaId:t})})),r.addJsListener("IbmCtaEvent.ibm",(function(e){var n=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:r,mediaId:t,customMetricsData:n})}))),i(r),e(r)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(n))}));return{kWidget:function(){return e}}}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:r,customMetricsData:i};h.videoPlayerStats(s)}},{key:"api",value:(t=m(b.mark((function e(t){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then((function(){return An&&An[t]?An[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+wn}).doRequest({service:"media",action:"get",entryId:t},(function(t){An[t.id]=t,e(t)}))}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getMediaDuration",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(arguments.length>1?arguments[1]:void 0){var n=Math.floor(t/1e3%60),r=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",n=n<10?"0"+n:n,t&&"("+o+r+":"+n+")"}var i=(null==f||null===(e=f.kWidget)||void 0===e?void 0:e.seconds2Measurements(t))||{},a=(null==i?void 0:i.hours)||0,s=(null==i?void 0:i.minutes)||0,c=(null==i?void 0:i.seconds)||0;return s=(a>0?"0"+s:s).toString().slice(-2),(a=a>0?a+":":"")+s+":"+(c=("0"+c).slice(-2))}},{key:"getMediaDurationFormatted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t;(arguments.length>1?arguments[1]:void 0)||(n=1e3*t);var r=Math.floor(n/1e3%60),o=Math.floor(n/6e4%60),i=Math.floor(n/36e5%24),a=e.formatTime(r,"second"),s=i||o?e.formatTime(o,"minute"):"",c=i?e.formatTime(i,"hour"):"";return"".concat(c," ").concat(s," ").concat(a).trim()}},{key:"formatTime",value:function(e,t){var n=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(n,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Et,e.DDOAPI=_t,e.KalturaPlayerAPI=Rn,e.LocaleAPI=zt,e.MarketingSearchAPI=Zt,e.MastheadLogo=en,e.ProfileAPI=on,e.SearchTypeaheadAPI=un,e.TranslationAPI=mn,e.globalInit=function(){Yt||(Yt=!0,_t.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),zt.getLang().then((function(e){Pt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
11
|
+
!function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[u]=c,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}(xt);var wt=xt.exports,Et=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===wt.get("com.ibm.cloud.iam.LoggedIn.prod")?"authenticated":"anonymous"}}},{key:"checkAPI",value:(t=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bt.get("/api/v6/selected-account?profile=true",{headers:{Accept:"application/json"}}).then((function(e){return 200===e.status?"authenticated":"anonymous"})).catch((function(e){return console.error(e),"anonymous"}));case 2:return t=e.sent,e.abrupt("return",{user:t});case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),St="Carbon for IBM.com v1.48.0";var Ot;function kt(){return Ot||(Ot=new Promise((function(e,t){var n=0;!function r(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++n<50?setTimeout((function(){r()}),100):t(new Error("Timeout polling for digital data object."))}()}))),Ot}var Tt=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"isReady",value:function(){return kt()}},{key:"getAll",value:(i=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData})).catch((function(){return null}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setVersion",value:(r=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){f.digitalData.page.pageInfo.version=St}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLanguage",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.page.pageInfo.language}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLocation",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.user.location.country.toLowerCase()}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),_t="https://1.www.s81c.com/common/carbon/plex",At={ar:{entry:"sans-arabic",family:"IBM Plex Sans Arabic"},ja:{entry:"sans-jp",family:"IBM Plex Sans JP"},ko:{entry:"sans-kr",family:"IBM Plex Sans KR"}},Rt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];At[e]&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===t.length){var n=document.createElement("link");n.href="".concat(_t,"/").concat(At[e].entry,".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}else t.forEach((function(t){var n=document.createElement("link");n.href="".concat(_t,"/").concat(At[e].entry,"-").concat(Rt[t],".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}))}(e,t),function(e){document.body.style.fontFamily="".concat(At[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}var Ct={exports:{}},Lt={exports:{}},It={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}(It),function(e){var t=It.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(Lt);var jt={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(jt);var Dt={exports:{}};!function(e){var t=It.exports;e.exports=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(Dt);var Nt={exports:{}};!function(e){e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports}(Nt),function(e){var t=Lt.exports,n=jt.exports,r=Dt.exports,o=Nt.exports;e.exports=function(e){return t(e)||n(e)||r(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports}(Ct);var Mt=n(Ct.exports);function Ut(e){return Ut="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},Ut(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Ut(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Ut(i)?i:String(i)),r)}var o,i}var Ft="ipcInfo",Ht=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=wt.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Ft);if(n)return n.split(";").map((function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);wt.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Ft,r,{expires:365,domain:".ibm.com"})}}],(n=null)&&Bt(t.prototype,n),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),qt=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Jt={lc:"en",cc:"us"},Wt="".concat(qt,"/common/js/dynamicnav/www/countrylist/jsononly"),Gt={headers:{"Content-Type":"application/json; charset=utf-8"}},Vt="dds-countrylist",Kt={};var zt=function(){function e(){o(this,e)}var t,n,r;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(Kt).forEach((function(e){return delete Kt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(Vt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(r=m(b.mark((function e(){var t,n,r,o,i,a,s;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Ht.get(),e.next=3,this.getLang();case 3:if(!(n=e.sent)){e.next=8;break}return e.abrupt("return",n);case 8:if(!(t&&t.cc&&t.lc)){e.next=14;break}return e.next=11,this.getList(t);case 11:return e.abrupt("return",t);case 14:return e.next=16,Tt.getLocation();case 16:if(r=e.sent,o=f.navigator.language,i=o.split("-")[0],!r||!i){e.next=26;break}return e.next=22,this.getList({cc:r,lc:i});case 22:return a=e.sent,s=this.verifyLocale(r,i,a),Ht.set(s),e.abrupt("return",s);case 26:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLang",value:function(){return new Promise((function(e){var t=function(){var e,t,n=Object.assign({},f.digitalData||{});if(null!==(e=n.page)&&void 0!==e&&null!==(t=e.pageInfo)&&void 0!==t&&t.language){var r,o,i,a,s,c={};return null!==(r=n.page)&&void 0!==r&&null!==(o=r.pageInfo)&&void 0!==o&&o.language.includes("-")&&null!==(i=n.page)&&void 0!==i&&null!==(a=i.pageInfo)&&void 0!==a&&null!==(s=a.ibm)&&void 0!==s&&s.country?(c.lc=n.page.pageInfo.language.substring(0,2).toLowerCase(),c.cc=n.page.pageInfo.ibm.country.toLowerCase().trim(),c.cc.indexOf(",")>-1&&(c.cc=c.cc.substring(0,c.cc.indexOf(",")).trim()),"gb"===c.cc&&(c.cc="uk"),"zz"===c.cc&&(c.cc="us")):c.lc=n.page.pageInfo.language.substring(0,2).toLowerCase(),c}return!1}();e(t||function(){var e,t;if(null!==(e=f.document)&&void 0!==e&&null!==(t=e.documentElement)&&void 0!==t&&t.lang){var n=f.document.documentElement.lang.toLowerCase();if(-1===n.indexOf("-"))return{lc:n};var r=n.split("-");return{cc:r[1],lc:r[0]}}return Jt}())}))}},{key:"getLangDisplay",value:(n=m(b.mark((function e(t){var n,r,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLang();case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.regionList.forEach((function(e){o=o.concat(e.countryList)})),!(i=o.filter((function(e){if(-1!==e.locale.findIndex((function(e){return e[0]==="".concat(n.lc,"-").concat(n.cc)}))){var t,r=e.locale.filter((function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Mt(r))),e}}))).length){e.next=18;break}return e.abrupt("return","".concat(i[0].name," — ").concat(i[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var n,r,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cc,r=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(n,r,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,n,r){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(Vt,"-").concat(i),s=this.getSessionCache(a);if(s)n(s);else{if(!Kt[i]){var c="".concat(Wt,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");Kt[i]=bt.get(c,Gt).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(Vt,"-").concat(i),JSON.stringify(t)),t}))}Kt[i].then(n,(function(i){e===Jt.cc&&t===Jt.lc?r(i):o.fetchList(Jt.cc,Jt.lc,n,r)}))}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach((function(n){return n.countryList.forEach((function(n){var i=n.locale[0][0].split("-"),a=i[1],s=i[0];a===e&&s===t?o={cc:e,lc:t}:a!==e||r||(r=s)}))})))&&r&&(o={cc:e,lc:r}),o}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),Yt=!1;var $t=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Xt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Qt="".concat($t,"/marketplace/api/search/").concat(Xt,"/combined_suggestions"),Zt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Qt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,bt.get(n,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),en=function(){function e(){o(this,e)}return l(e,null,[{key:"setMastheadLogo",value:function(e){if(void 0===e)return!1;var t=(new Date).getTime(),n=e.end?Date.parse(e.end):null,r=!!(n&&t>n);return!(null===e.svg||r||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),tn=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nn=process&&process.env.PROFILE_VERSION||"v1",rn="".concat(tn,"/").concat(nn,"/mgmt/idaas/user/status/"),on=function(){function e(){o(this,e)}var t,n;return l(e,null,[{key:"getUserStatus",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bt.get(rn,{headers:{"Content-Type":"application/json; charset=utf-8"},withCredentials:!0}).then((function(e){return e.data})).catch((function(e){return console.log("Failed Profile Network Call",e),{user:"Unauthenticated"}}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"checkCloudCookie",value:function(){return{user:"1"===wt.get("com.ibm.cloud.iam.LoggedIn.prod")?"authenticated":"anonymous"}}},{key:"checkCloudDocsAPI",value:(t=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bt.get("/api/v6/selected-account?profile=true",{headers:{Accept:"application/json"}}).then((function(e){return 200===e.status?"authenticated":"anonymous"})).catch((function(e){return console.error(e),"anonymous"}));case 2:return t=e.sent,e.abrupt("return",{user:t});case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),an=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sn=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cn="".concat(an,"/search/typeahead/").concat(sn),un=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n,r,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,zt.getLang();case 3:return r=e.sent,o=["lang=".concat(r.lc).concat(r.cc?"&cc=".concat(r.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(n?"appid=".concat(n):"")].filter((function(e){return e})).join("&"),i="".concat(cn,"?").concat(o),e.next=8,bt.get(i,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data.response}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),ln=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fn="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pn=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fn,dn={},hn="en",vn="us",mn=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"clearCache",value:function(e){var t=this.getSessionKey(e);if("undefined"!=typeof sessionStorage){Object.keys(dn).forEach((function(e){return delete dn[e]}));for(var n=0;n<sessionStorage.length;++n){var r=sessionStorage.key(n);0===r.indexOf(t)&&sessionStorage.removeItem(r)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,n){var r,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}r=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,zt.getLocale();case 9:i=e.sent,r=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(r,o,n,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,n,r,o){var i=this,a=this.getSessionKey(n),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)r(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dn[u]){var l=n||pn,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(n)?"":ln,d="".concat(p).concat(l,"/").concat(f,".json");dn[u]=bt.get(d,{headers:{"Content-Type":"text/plain",origin:ln}}).then((function(e){return i.transformData(e.data)})).then((function(e){return e.timestamp=Date.now(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("".concat(a,"-").concat(u),JSON.stringify(e)),e}))}dn[u].then(r,(function(a){t===vn&&e===hn?o(a):i.fetchTranslation(hn,vn,n,r,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fn!==pn||e)&&(t=(e||pn).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,n=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(n){var r="state=https%3A%2F%2Fwww.ibm.com",o=n.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(r))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=n[o].url.replace(r,"state=".concat(i))}}return e.footerMenu.push(e.socialFollow),e}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),yn={exports:{}};!function(e){var t=a.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(yn);var gn=n(yn.exports);function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(n),!0).forEach((function(t){gn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wn=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,En=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,Sn="https://cdnapisec.kaltura.com/p/".concat(wn,"/sp/").concat(wn,"00/embedIframeJs/uiconf_id/").concat(En,"/partner_id/").concat(wn),On="https://cdnsecakmi.kaltura.com/p/".concat(wn,"/thumbnail/entry_id/"),kn=0,Tn=!1;function _n(e,t){f.kWidget?(Tn=!1,e()):Tn?++kn<50?setTimeout((function(){_n(e,t)}),100):t():(!function(){Tn=!0;var e=document.createElement("script");e.src=Sn,e.async=!0,document.body.appendChild(e)}(),_n(e,t))}var An={},Rn=function(){function e(){o(this,e)}var t,n;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){_n(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,n=e.height,r=e.width,o=On+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedMedia",value:(n=m(b.mark((function e(t,n){var r,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:{},o=!(s.length>3&&void 0!==s[3])||s[3],i=s.length>4&&void 0!==s[4]?s[4]:function(){},a=this.fireEvent,e.next=6,this.checkScript().then((function(){var e=new Promise((function(e){var s;if(!document.getElementById(n)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",n),document.body.append(c),s=!0}f.kWidget.embed({targetId:n,wid:"_"+wn,uiconf_id:En,entry_id:t,flashvars:xn(xn({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),r),params:{wmode:"transparent"},readyCallback:function(n){var r=document.getElementById(n);o&&(r.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:r,mediaId:t})})),r.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:r,mediaId:t})})),r.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:r,mediaId:t})})),r.addJsListener("IbmCtaEvent.ibm",(function(e){var n=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:r,mediaId:t,customMetricsData:n})}))),i(r),e(r)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(n))}));return{kWidget:function(){return e}}}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:r,customMetricsData:i};h.videoPlayerStats(s)}},{key:"api",value:(t=m(b.mark((function e(t){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then((function(){return An&&An[t]?An[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+wn}).doRequest({service:"media",action:"get",entryId:t},(function(t){An[t.id]=t,e(t)}))}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getMediaDuration",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(arguments.length>1?arguments[1]:void 0){var n=Math.floor(t/1e3%60),r=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",n=n<10?"0"+n:n,t&&"("+o+r+":"+n+")"}var i=(null==f||null===(e=f.kWidget)||void 0===e?void 0:e.seconds2Measurements(t))||{},a=(null==i?void 0:i.hours)||0,s=(null==i?void 0:i.minutes)||0,c=(null==i?void 0:i.seconds)||0;return s=(a>0?"0"+s:s).toString().slice(-2),(a=a>0?a+":":"")+s+":"+(c=("0"+c).slice(-2))}},{key:"getMediaDurationFormatted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t;(arguments.length>1?arguments[1]:void 0)||(n=1e3*t);var r=Math.floor(n/1e3%60),o=Math.floor(n/6e4%60),i=Math.floor(n/36e5%24),a=e.formatTime(r,"second"),s=i||o?e.formatTime(o,"minute"):"",c=i?e.formatTime(i,"hour"):"";return"".concat(c," ").concat(s," ").concat(a).trim()}},{key:"formatTime",value:function(e,t){var n=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(n,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Et,e.DDOAPI=Tt,e.KalturaPlayerAPI=Rn,e.LocaleAPI=zt,e.MarketingSearchAPI=Zt,e.MastheadLogo=en,e.ProfileAPI=on,e.SearchTypeaheadAPI=un,e.TranslationAPI=mn,e.globalInit=function(){Yt||(Yt=!0,Tt.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),zt.getLang().then((function(e){Pt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));
|