@redhat-cloud-services/frontend-components-config-utilities 2.0.0 → 2.0.2
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/federated-modules.js +1 -1
- package/package.json +1 -1
- package/repos/insights-chrome-build/58231b16fdee45a03a4ee3cf94a9f2c3 +0 -73
- package/repos/insights-chrome-build/app.info.deps.json +0 -1
- package/repos/insights-chrome-build/app.info.json +0 -14
- package/repos/insights-chrome-build/index.html +0 -29
- package/repos/insights-chrome-build/js/00e10699d4604274.woff2 +0 -0
- package/repos/insights-chrome-build/js/03be9971fdd08ef3.woff2 +0 -0
- package/repos/insights-chrome-build/js/05294d67f8e33aab.woff2 +0 -0
- package/repos/insights-chrome-build/js/091b27e83c831713.woff2 +0 -0
- package/repos/insights-chrome-build/js/0d54864d782470c6.woff +0 -0
- package/repos/insights-chrome-build/js/0d5f5f4e3bbf47e1.woff2 +0 -0
- package/repos/insights-chrome-build/js/1039d3d8000f2c4b.woff +0 -0
- package/repos/insights-chrome-build/js/13f6558f31b2ee0f.woff2 +0 -0
- package/repos/insights-chrome-build/js/1412957e204a8a1a.woff +0 -0
- package/repos/insights-chrome-build/js/17802e9fb8c2dd3c.woff +0 -0
- package/repos/insights-chrome-build/js/1be1bd18c67d1ac8.woff +0 -0
- package/repos/insights-chrome-build/js/26409b4397ab88cc.woff2 +0 -0
- package/repos/insights-chrome-build/js/278473d290fcbf3b.woff2 +0 -0
- package/repos/insights-chrome-build/js/2a96d5b208c56fa6.woff +0 -0
- package/repos/insights-chrome-build/js/2baac3a5d7ab7a15.woff2 +0 -0
- package/repos/insights-chrome-build/js/316d3d41de174f24.woff +0 -0
- package/repos/insights-chrome-build/js/3239d74dcb174610.woff2 +0 -0
- package/repos/insights-chrome-build/js/326f107b61d32769.woff +0 -0
- package/repos/insights-chrome-build/js/49ee635c956449ea.woff2 +0 -0
- package/repos/insights-chrome-build/js/4ace320f5eaa7ee9.woff2 +0 -0
- package/repos/insights-chrome-build/js/4b0d8eeb01c2f27e.woff2 +0 -0
- package/repos/insights-chrome-build/js/4df2ca3d94d759b3.svg +0 -515
- package/repos/insights-chrome-build/js/52f482efb5487bba.woff2 +0 -0
- package/repos/insights-chrome-build/js/64b9a14b3398824f.woff2 +0 -0
- package/repos/insights-chrome-build/js/66309a34eac8b284.woff2 +0 -0
- package/repos/insights-chrome-build/js/6e30b223886d1eef.woff2 +0 -0
- package/repos/insights-chrome-build/js/6fb4e4e104bb886f.woff2 +0 -0
- package/repos/insights-chrome-build/js/703c721f27900006.woff +0 -0
- package/repos/insights-chrome-build/js/79c835ddc356c3ef.woff +0 -0
- package/repos/insights-chrome-build/js/7a0809e40bf8e79a.woff +0 -0
- package/repos/insights-chrome-build/js/7a9fb47c5b35e50d.woff2 +0 -0
- package/repos/insights-chrome-build/js/7bb3ddb0583cc7a5.woff +0 -0
- package/repos/insights-chrome-build/js/7bf300b28414f3ad.woff +0 -0
- package/repos/insights-chrome-build/js/7d9b027229967149.woff2 +0 -0
- package/repos/insights-chrome-build/js/81245ab8c867ea09.woff +0 -0
- package/repos/insights-chrome-build/js/830dcb2cc707ae4c.woff +0 -0
- package/repos/insights-chrome-build/js/835112a9ba0d676e.woff +0 -0
- package/repos/insights-chrome-build/js/8f3e80eba644e3ec.svg +0 -33
- package/repos/insights-chrome-build/js/8f765508913b945e.woff2 +0 -0
- package/repos/insights-chrome-build/js/91bbac2b6e0eb739.woff +0 -0
- package/repos/insights-chrome-build/js/96971d99ef5f2ef7.woff2 +0 -0
- package/repos/insights-chrome-build/js/_c74b-_e0c3-_9cf0-_3467-_8add-_2900-_a7bc-_70d9-_eea3-_8afc-_d73e-_1a3c-_2385-_85ca-_5c4f-_0f-35898c0.b3f9836f62184986.js +0 -943
- package/repos/insights-chrome-build/js/_c74b-_e0c3-_9cf0-_3467-_8add-_2900-_a7bc-_70d9-_eea3-_8afc-_d73e-_1a3c-_2385-_85ca-_5c4f-_0f-35898c1.b3f9836f62184986.js +0 -943
- package/repos/insights-chrome-build/js/a14c79bac597c758.woff +0 -0
- package/repos/insights-chrome-build/js/a86c2bca47a21ff0.woff2 +0 -0
- package/repos/insights-chrome-build/js/ad4d1e278d4d13cb.woff +0 -0
- package/repos/insights-chrome-build/js/ajs-destination.b3f9836f62184986.js +0 -594
- package/repos/insights-chrome-build/js/auto-track.b3f9836f62184986.js +0 -122
- package/repos/insights-chrome-build/js/b0ebda5f4f12f761.woff2 +0 -0
- package/repos/insights-chrome-build/js/b97a3321aaf7e87a.woff2 +0 -0
- package/repos/insights-chrome-build/js/ba04b02b7da08f3d.woff2 +0 -0
- package/repos/insights-chrome-build/js/bb85876a67d3e7e7.woff2 +0 -0
- package/repos/insights-chrome-build/js/bbe18aee9c88166d.woff +0 -0
- package/repos/insights-chrome-build/js/c3ab7be4146884a3.woff2 +0 -0
- package/repos/insights-chrome-build/js/c49edc34d14553e4.woff +0 -0
- package/repos/insights-chrome-build/js/c8b06bb52b20081e.woff2 +0 -0
- package/repos/insights-chrome-build/js/c99e50723fcf0166.woff +0 -0
- package/repos/insights-chrome-build/js/cb827f53cc6d6dcf.woff2 +0 -0
- package/repos/insights-chrome-build/js/cd1824ff99b9ef33.woff2 +0 -0
- package/repos/insights-chrome-build/js/ce63a8f6be94c7cd.woff2 +0 -0
- package/repos/insights-chrome-build/js/chrome-root.b3f9836f62184986.js +0 -43326
- package/repos/insights-chrome-build/js/chrome.b3f9836f62184986.js +0 -33007
- package/repos/insights-chrome-build/js/d004dc9f8c955767.woff2 +0 -0
- package/repos/insights-chrome-build/js/d19c89c249d7f751.woff2 +0 -0
- package/repos/insights-chrome-build/js/d2a095f5996e5014.woff2 +0 -0
- package/repos/insights-chrome-build/js/d2ce043298f5c972.woff +0 -0
- package/repos/insights-chrome-build/js/d2cf7e795db09bc7.woff +0 -0
- package/repos/insights-chrome-build/js/d6083bde9a964ab4.svg +0 -96
- package/repos/insights-chrome-build/js/dd18fb6c0b7048e8.woff2 +0 -0
- package/repos/insights-chrome-build/js/df8a52d2494e1e03.woff2 +0 -0
- package/repos/insights-chrome-build/js/e5c7a27047a83d24.woff2 +0 -0
- package/repos/insights-chrome-build/js/e693e4f9d9c75499.woff2 +0 -0
- package/repos/insights-chrome-build/js/e8ec1c41a82bd354.woff +0 -0
- package/repos/insights-chrome-build/js/f66882bad34e5c9f.woff +0 -0
- package/repos/insights-chrome-build/js/f830d4d01f5e4497.woff +0 -0
- package/repos/insights-chrome-build/js/fed-mods.json +0 -15
- package/repos/insights-chrome-build/js/legacyVideos.b3f9836f62184986.js +0 -41
- package/repos/insights-chrome-build/js/main.b3f9836f62184986.css +0 -51216
- package/repos/insights-chrome-build/js/node_modules_hoist-non-react-statics_dist_hoist-non-react-statics_cjs_js.b3f9836f62184986.js +0 -323
- package/repos/insights-chrome-build/js/node_modules_lodash_isEqual_js.b3f9836f62184986.js +0 -48
- package/repos/insights-chrome-build/js/node_modules_patternfly_react-icons_dist_js_icons_bars-icon_js-node_modules_patternfly_react--0a3495.b3f9836f62184986.js +0 -242
- package/repos/insights-chrome-build/js/queryString.b3f9836f62184986.js +0 -128
- package/repos/insights-chrome-build/js/quick-start.b3f9836f62184986.js +0 -47
- package/repos/insights-chrome-build/js/remoteMiddleware.b3f9836f62184986.js +0 -87
- package/repos/insights-chrome-build/js/schemaFilter.b3f9836f62184986.js +0 -111
- package/repos/insights-chrome-build/js/src_bootstrap_tsx-src_moduleOverrides_unfetch_ts-node_modules_redhat-cloud-services_frontend--275e6e.b3f9836f62184986.css +0 -27041
- package/repos/insights-chrome-build/js/src_bootstrap_tsx-src_moduleOverrides_unfetch_ts-node_modules_redhat-cloud-services_frontend--275e6e.b3f9836f62184986.js +0 -20468
- package/repos/insights-chrome-build/js/src_components_Debugger_index_ts.b3f9836f62184986.css +0 -52
- package/repos/insights-chrome-build/js/src_components_Debugger_index_ts.b3f9836f62184986.js +0 -512
- package/repos/insights-chrome-build/js/src_components_FavoriteServices_EmptyState_tsx-src_hooks_useFavoritedServices_ts.b3f9836f62184986.css +0 -8664
- package/repos/insights-chrome-build/js/src_components_FavoriteServices_EmptyState_tsx-src_hooks_useFavoritedServices_ts.b3f9836f62184986.js +0 -5098
- package/repos/insights-chrome-build/js/src_components_FavoriteServices_LandingNavFavorites_tsx-src_utils_common_ts.b3f9836f62184986.css +0 -8662
- package/repos/insights-chrome-build/js/src_components_FavoriteServices_LandingNavFavorites_tsx-src_utils_common_ts.b3f9836f62184986.js +0 -898
- package/repos/insights-chrome-build/js/src_components_NotEntitledModal_index_tsx.b3f9836f62184986.css +0 -30
- package/repos/insights-chrome-build/js/src_components_NotEntitledModal_index_tsx.b3f9836f62184986.js +0 -237
- package/repos/insights-chrome-build/js/src_components_QuickstartsCatalogRoute_index_ts.b3f9836f62184986.js +0 -106
- package/repos/insights-chrome-build/js/src_components_Stratosphere_ProductSelection_tsx.b3f9836f62184986.css +0 -17513
- package/repos/insights-chrome-build/js/src_components_Stratosphere_ProductSelection_tsx.b3f9836f62184986.js +0 -335
- package/repos/insights-chrome-build/js/src_moduleOverrides_chart-utils-override_js-src_pdf_DownloadButton_tsx-webpack_sharing_consum-3a44a6.b3f9836f62184986.js +0 -91
- package/repos/insights-chrome-build/js/tsub-middleware.b3f9836f62184986.js +0 -6836
- package/repos/insights-chrome-build/js/vendors-node_modules_buffer_index_js-node_modules_lodash__baseFlatten_js-node_modules_lodash_-1de864.b3f9836f62184986.js +0 -2552
- package/repos/insights-chrome-build/js/vendors-node_modules_hoist-non-react-statics_dist_hoist-non-react-statics_cjs_js-node_modules-c053fb.b3f9836f62184986.js +0 -1761
- package/repos/insights-chrome-build/js/vendors-node_modules_inherits_inherits_browser_js-node_modules_lodash__baseMerge_js-node_modu-5ed1a1.b3f9836f62184986.js +0 -1113
- package/repos/insights-chrome-build/js/vendors-node_modules_lodash__baseForOwn_js-node_modules_lodash__baseIteratee_js-node_modules_-167437.b3f9836f62184986.js +0 -1289
- package/repos/insights-chrome-build/js/vendors-node_modules_lodash__baseIsEqual_js.b3f9836f62184986.js +0 -3148
- package/repos/insights-chrome-build/js/vendors-node_modules_openshift_dynamic-plugin-sdk_dist_index_js.b3f9836f62184986.js +0 -17197
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_quickstarts_dist_index_es_js.b3f9836f62184986.js +0 -13149
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-charts_dist_esm_components_ChartUtils_chart-theme_js-no-998b15.b3f9836f62184986.js +0 -166192
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-core_dist_esm_components_Button_Button_js-node_modules_-6763c7.b3f9836f62184986.js +0 -6274
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-core_dist_esm_index_js.b3f9836f62184986.js +0 -33678
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-core_next_components_Select_Select_js-node_modules_patt-da466d.b3f9836f62184986.js +0 -4946
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-icons_dist_esm_icons_bell-slash-icon_js-node_modules_pa-6de3ff.b3f9836f62184986.js +0 -74388
- package/repos/insights-chrome-build/js/vendors-node_modules_patternfly_react-icons_dist_esm_icons_star-icon_js-node_modules_axios_in-5a9fd5.b3f9836f62184986.js +0 -2881
- package/repos/insights-chrome-build/js/vendors-node_modules_prop-types_index_js.b3f9836f62184986.js +0 -649
- package/repos/insights-chrome-build/js/vendors-node_modules_react-redux_es_index_js.b3f9836f62184986.js +0 -2337
- package/repos/insights-chrome-build/js/vendors-node_modules_react-router-dom_dist_index_js.b3f9836f62184986.js +0 -6691
- package/repos/insights-chrome-build/js/vendors-node_modules_react_jsx-runtime_js.b3f9836f62184986.js +0 -1250
- package/repos/insights-chrome-build/js/vendors-node_modules_redhat-cloud-services_chrome_esm_index_js.b3f9836f62184986.js +0 -708
- package/repos/insights-chrome-build/js/vendors-node_modules_redhat-cloud-services_frontend-components-utilities_esm_interceptors_int-b5fffe.b3f9836f62184986.js +0 -21636
- package/repos/insights-chrome-build/js/vendors-node_modules_scalprum_core_dist_esm_index_js.b3f9836f62184986.js +0 -363
- package/repos/insights-chrome-build/js/vendors-node_modules_scalprum_react-core_dist_esm_index_js.b3f9836f62184986.js +0 -762
- package/repos/insights-chrome-build/js/vendors-node_modules_segment_analytics_js-video-plugins_dist_index_umd_js.b3f9836f62184986.js +0 -13
- package/repos/insights-chrome-build/js/vendors-node_modules_tslib_tslib_es6_js.b3f9836f62184986.js +0 -258
- package/repos/insights-chrome-build/js/vendors-node_modules_unleash_proxy-client-react_dist_index_browser_js.b3f9836f62184986.js +0 -1821
- package/repos/insights-chrome-build/silent-check-sso.html +0 -7
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,594 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(self["webpackChunkinsights_chrome"] = self["webpackChunkinsights_chrome"] || []).push([["ajs-destination"],{
|
|
3
|
-
|
|
4
|
-
/***/ "./node_modules/@segment/analytics-core/dist/esm/validation/helpers.js":
|
|
5
|
-
/*!*****************************************************************************!*\
|
|
6
|
-
!*** ./node_modules/@segment/analytics-core/dist/esm/validation/helpers.js ***!
|
|
7
|
-
\*****************************************************************************/
|
|
8
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9
|
-
|
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
/* harmony export */ "hasUser": () => (/* binding */ hasUser),
|
|
13
|
-
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
14
|
-
/* harmony export */ "isNumber": () => (/* binding */ isNumber),
|
|
15
|
-
/* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
|
|
16
|
-
/* harmony export */ "isString": () => (/* binding */ isString)
|
|
17
|
-
/* harmony export */ });
|
|
18
|
-
function isString(obj) {
|
|
19
|
-
return typeof obj === 'string';
|
|
20
|
-
}
|
|
21
|
-
function isNumber(obj) {
|
|
22
|
-
return typeof obj === 'number';
|
|
23
|
-
}
|
|
24
|
-
function isFunction(obj) {
|
|
25
|
-
return typeof obj === 'function';
|
|
26
|
-
}
|
|
27
|
-
function isPlainObject(obj) {
|
|
28
|
-
return (Object.prototype.toString.call(obj).slice(8, -1).toLowerCase() === 'object');
|
|
29
|
-
}
|
|
30
|
-
function hasUser(event) {
|
|
31
|
-
var _a, _b, _c;
|
|
32
|
-
var id = (_c = (_b = (_a = event.userId) !== null && _a !== void 0 ? _a : event.anonymousId) !== null && _b !== void 0 ? _b : event.groupId) !== null && _c !== void 0 ? _c : event.previousId;
|
|
33
|
-
return isString(id);
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=helpers.js.map
|
|
36
|
-
|
|
37
|
-
/***/ }),
|
|
38
|
-
|
|
39
|
-
/***/ "./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js":
|
|
40
|
-
/*!************************************************************************************!*\
|
|
41
|
-
!*** ./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js ***!
|
|
42
|
-
\************************************************************************************/
|
|
43
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
44
|
-
|
|
45
|
-
__webpack_require__.r(__webpack_exports__);
|
|
46
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47
|
-
/* harmony export */ "isPlanEventEnabled": () => (/* binding */ isPlanEventEnabled)
|
|
48
|
-
/* harmony export */ });
|
|
49
|
-
/**
|
|
50
|
-
* Determines whether a track event is allowed to be sent based on the
|
|
51
|
-
* user's tracking plan.
|
|
52
|
-
* If the user does not have a tracking plan or the event is allowed based
|
|
53
|
-
* on the tracking plan configuration, returns true.
|
|
54
|
-
*/
|
|
55
|
-
function isPlanEventEnabled(plan, planEvent) {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
// Always prioritize the event's `enabled` status
|
|
58
|
-
if (typeof (planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) === 'boolean') {
|
|
59
|
-
return planEvent.enabled;
|
|
60
|
-
}
|
|
61
|
-
// Assume absence of a tracking plan means events are enabled
|
|
62
|
-
return (_b = (_a = plan === null || plan === void 0 ? void 0 : plan.__default) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=is-plan-event-enabled.js.map
|
|
65
|
-
|
|
66
|
-
/***/ }),
|
|
67
|
-
|
|
68
|
-
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js":
|
|
69
|
-
/*!****************************************************************************************!*\
|
|
70
|
-
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js ***!
|
|
71
|
-
\****************************************************************************************/
|
|
72
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73
|
-
|
|
74
|
-
__webpack_require__.r(__webpack_exports__);
|
|
75
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
76
|
-
/* harmony export */ "LegacyDestination": () => (/* binding */ LegacyDestination),
|
|
77
|
-
/* harmony export */ "ajsDestinations": () => (/* binding */ ajsDestinations)
|
|
78
|
-
/* harmony export */ });
|
|
79
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/@segment/analytics-next/node_modules/tslib/tslib.es6.js");
|
|
80
|
-
/* harmony import */ var _segment_facade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @segment/facade */ "./node_modules/@segment/facade/dist/index.js");
|
|
81
|
-
/* harmony import */ var _segment_facade__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_segment_facade__WEBPACK_IMPORTED_MODULE_0__);
|
|
82
|
-
/* harmony import */ var _core_connection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/connection */ "./node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js");
|
|
83
|
-
/* harmony import */ var _core_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/context */ "./node_modules/@segment/analytics-next/dist/pkg/core/context/index.js");
|
|
84
|
-
/* harmony import */ var _core_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../core/context */ "./node_modules/@segment/analytics-core/dist/esm/context/index.js");
|
|
85
|
-
/* harmony import */ var _core_environment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../core/environment */ "./node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js");
|
|
86
|
-
/* harmony import */ var _segment_analytics_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @segment/analytics-core */ "./node_modules/@segment/analytics-core/dist/esm/queue/delivery.js");
|
|
87
|
-
/* harmony import */ var _lib_is_plan_event_enabled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/is-plan-event-enabled */ "./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js");
|
|
88
|
-
/* harmony import */ var _lib_merged_options__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../lib/merged-options */ "./node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js");
|
|
89
|
-
/* harmony import */ var _lib_p_while__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/p-while */ "./node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js");
|
|
90
|
-
/* harmony import */ var _lib_priority_queue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../lib/priority-queue */ "./node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js");
|
|
91
|
-
/* harmony import */ var _lib_priority_queue_persisted__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../lib/priority-queue/persisted */ "./node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js");
|
|
92
|
-
/* harmony import */ var _middleware__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../middleware */ "./node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js");
|
|
93
|
-
/* harmony import */ var _loader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./loader */ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js");
|
|
94
|
-
/* harmony import */ var _segment_analytics_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @segment/analytics-core */ "./node_modules/@segment/analytics-core/dist/esm/validation/helpers.js");
|
|
95
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils */ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js");
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
function flushQueue(xt, queue) {
|
|
112
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
113
|
-
var failedQueue;
|
|
114
|
-
var _this = this;
|
|
115
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
116
|
-
switch (_a.label) {
|
|
117
|
-
case 0:
|
|
118
|
-
failedQueue = [];
|
|
119
|
-
if ((0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOffline)()) {
|
|
120
|
-
return [2 /*return*/, queue];
|
|
121
|
-
}
|
|
122
|
-
return [4 /*yield*/, (0,_lib_p_while__WEBPACK_IMPORTED_MODULE_3__.pWhile)(function () { return queue.length > 0 && (0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOnline)(); }, function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(_this, void 0, void 0, function () {
|
|
123
|
-
var ctx, result, success;
|
|
124
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
125
|
-
switch (_a.label) {
|
|
126
|
-
case 0:
|
|
127
|
-
ctx = queue.pop();
|
|
128
|
-
if (!ctx) {
|
|
129
|
-
return [2 /*return*/];
|
|
130
|
-
}
|
|
131
|
-
return [4 /*yield*/, (0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_4__.attempt)(ctx, xt)];
|
|
132
|
-
case 1:
|
|
133
|
-
result = _a.sent();
|
|
134
|
-
success = result instanceof _core_context__WEBPACK_IMPORTED_MODULE_5__.Context;
|
|
135
|
-
if (!success) {
|
|
136
|
-
failedQueue.push(ctx);
|
|
137
|
-
}
|
|
138
|
-
return [2 /*return*/];
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}); })
|
|
142
|
-
// re-add failed tasks
|
|
143
|
-
];
|
|
144
|
-
case 1:
|
|
145
|
-
_a.sent();
|
|
146
|
-
// re-add failed tasks
|
|
147
|
-
failedQueue.map(function (failed) { return queue.pushWithBackoff(failed); });
|
|
148
|
-
return [2 /*return*/, queue];
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
var LegacyDestination = /** @class */ (function () {
|
|
154
|
-
function LegacyDestination(name, version, settings, options, integrationSource) {
|
|
155
|
-
if (settings === void 0) { settings = {}; }
|
|
156
|
-
this.options = {};
|
|
157
|
-
this.type = 'destination';
|
|
158
|
-
this.middleware = [];
|
|
159
|
-
this._ready = false;
|
|
160
|
-
this._initialized = false;
|
|
161
|
-
this.flushing = false;
|
|
162
|
-
this.name = name;
|
|
163
|
-
this.version = version;
|
|
164
|
-
this.settings = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, settings);
|
|
165
|
-
this.disableAutoISOConversion = options.disableAutoISOConversion || false;
|
|
166
|
-
this.integrationSource = integrationSource;
|
|
167
|
-
// AJS-Renderer sets an extraneous `type` setting that clobbers
|
|
168
|
-
// existing type defaults. We need to remove it if it's present
|
|
169
|
-
if (this.settings['type'] && this.settings['type'] === 'browser') {
|
|
170
|
-
delete this.settings['type'];
|
|
171
|
-
}
|
|
172
|
-
this.options = options;
|
|
173
|
-
this.buffer = options.disableClientPersistence
|
|
174
|
-
? new _lib_priority_queue__WEBPACK_IMPORTED_MODULE_6__.PriorityQueue(4, [])
|
|
175
|
-
: new _lib_priority_queue_persisted__WEBPACK_IMPORTED_MODULE_7__.PersistedPriorityQueue(4, "dest-".concat(name));
|
|
176
|
-
this.scheduleFlush();
|
|
177
|
-
}
|
|
178
|
-
LegacyDestination.prototype.isLoaded = function () {
|
|
179
|
-
return this._ready;
|
|
180
|
-
};
|
|
181
|
-
LegacyDestination.prototype.ready = function () {
|
|
182
|
-
var _a;
|
|
183
|
-
return (_a = this.onReady) !== null && _a !== void 0 ? _a : Promise.resolve();
|
|
184
|
-
};
|
|
185
|
-
LegacyDestination.prototype.load = function (ctx, analyticsInstance) {
|
|
186
|
-
var _a;
|
|
187
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
188
|
-
var integrationSource, _b;
|
|
189
|
-
var _this = this;
|
|
190
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_c) {
|
|
191
|
-
switch (_c.label) {
|
|
192
|
-
case 0:
|
|
193
|
-
if (this._ready || this.onReady !== undefined) {
|
|
194
|
-
return [2 /*return*/];
|
|
195
|
-
}
|
|
196
|
-
if (!((_a = this.integrationSource) !== null && _a !== void 0)) return [3 /*break*/, 1];
|
|
197
|
-
_b = _a;
|
|
198
|
-
return [3 /*break*/, 3];
|
|
199
|
-
case 1: return [4 /*yield*/, (0,_loader__WEBPACK_IMPORTED_MODULE_8__.loadIntegration)(ctx, this.name, this.version, this.options.obfuscate)];
|
|
200
|
-
case 2:
|
|
201
|
-
_b = (_c.sent());
|
|
202
|
-
_c.label = 3;
|
|
203
|
-
case 3:
|
|
204
|
-
integrationSource = _b;
|
|
205
|
-
this.integration = (0,_loader__WEBPACK_IMPORTED_MODULE_8__.buildIntegration)(integrationSource, this.settings, analyticsInstance);
|
|
206
|
-
this.onReady = new Promise(function (resolve) {
|
|
207
|
-
var onReadyFn = function () {
|
|
208
|
-
_this._ready = true;
|
|
209
|
-
resolve(true);
|
|
210
|
-
};
|
|
211
|
-
_this.integration.once('ready', onReadyFn);
|
|
212
|
-
});
|
|
213
|
-
this.onInitialize = new Promise(function (resolve) {
|
|
214
|
-
var onInit = function () {
|
|
215
|
-
_this._initialized = true;
|
|
216
|
-
resolve(true);
|
|
217
|
-
};
|
|
218
|
-
_this.integration.on('initialize', onInit);
|
|
219
|
-
});
|
|
220
|
-
try {
|
|
221
|
-
ctx.stats.increment('analytics_js.integration.invoke', 1, [
|
|
222
|
-
"method:initialize",
|
|
223
|
-
"integration_name:".concat(this.name),
|
|
224
|
-
]);
|
|
225
|
-
this.integration.initialize();
|
|
226
|
-
}
|
|
227
|
-
catch (error) {
|
|
228
|
-
ctx.stats.increment('analytics_js.integration.invoke.error', 1, [
|
|
229
|
-
"method:initialize",
|
|
230
|
-
"integration_name:".concat(this.name),
|
|
231
|
-
]);
|
|
232
|
-
throw error;
|
|
233
|
-
}
|
|
234
|
-
return [2 /*return*/];
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
LegacyDestination.prototype.unload = function (_ctx, _analyticsInstance) {
|
|
240
|
-
return (0,_loader__WEBPACK_IMPORTED_MODULE_8__.unloadIntegration)(this.name, this.version, this.options.obfuscate);
|
|
241
|
-
};
|
|
242
|
-
LegacyDestination.prototype.addMiddleware = function () {
|
|
243
|
-
var _a;
|
|
244
|
-
var fn = [];
|
|
245
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
246
|
-
fn[_i] = arguments[_i];
|
|
247
|
-
}
|
|
248
|
-
this.middleware = (_a = this.middleware).concat.apply(_a, fn);
|
|
249
|
-
};
|
|
250
|
-
LegacyDestination.prototype.shouldBuffer = function (ctx) {
|
|
251
|
-
return (
|
|
252
|
-
// page events can't be buffered because of destinations that automatically add page views
|
|
253
|
-
ctx.event.type !== 'page' &&
|
|
254
|
-
((0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOffline)() || this._ready === false || this._initialized === false));
|
|
255
|
-
};
|
|
256
|
-
LegacyDestination.prototype.send = function (ctx, clz, eventType) {
|
|
257
|
-
var _a, _b;
|
|
258
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
259
|
-
var plan, ev, planEvent, afterMiddleware, event, err_1;
|
|
260
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_c) {
|
|
261
|
-
switch (_c.label) {
|
|
262
|
-
case 0:
|
|
263
|
-
if (this.shouldBuffer(ctx)) {
|
|
264
|
-
this.buffer.push(ctx);
|
|
265
|
-
this.scheduleFlush();
|
|
266
|
-
return [2 /*return*/, ctx];
|
|
267
|
-
}
|
|
268
|
-
plan = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.track;
|
|
269
|
-
ev = ctx.event.event;
|
|
270
|
-
if (plan && ev && this.name !== 'Segment.io') {
|
|
271
|
-
planEvent = plan[ev];
|
|
272
|
-
if (!(0,_lib_is_plan_event_enabled__WEBPACK_IMPORTED_MODULE_9__.isPlanEventEnabled)(plan, planEvent)) {
|
|
273
|
-
ctx.updateEvent('integrations', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, ctx.event.integrations), { All: false, 'Segment.io': true }));
|
|
274
|
-
ctx.cancel(new _core_context__WEBPACK_IMPORTED_MODULE_10__.ContextCancelation({
|
|
275
|
-
retry: false,
|
|
276
|
-
reason: "Event ".concat(ev, " disabled for integration ").concat(this.name, " in tracking plan"),
|
|
277
|
-
type: 'Dropped by plan',
|
|
278
|
-
}));
|
|
279
|
-
return [2 /*return*/, ctx];
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
ctx.updateEvent('integrations', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));
|
|
283
|
-
}
|
|
284
|
-
if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {
|
|
285
|
-
ctx.cancel(new _core_context__WEBPACK_IMPORTED_MODULE_10__.ContextCancelation({
|
|
286
|
-
retry: false,
|
|
287
|
-
reason: "Event ".concat(ev, " disabled for integration ").concat(this.name, " in tracking plan"),
|
|
288
|
-
type: 'Dropped by plan',
|
|
289
|
-
}));
|
|
290
|
-
return [2 /*return*/, ctx];
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return [4 /*yield*/, (0,_middleware__WEBPACK_IMPORTED_MODULE_11__.applyDestinationMiddleware)(this.name, ctx.event, this.middleware)];
|
|
294
|
-
case 1:
|
|
295
|
-
afterMiddleware = _c.sent();
|
|
296
|
-
if (afterMiddleware === null) {
|
|
297
|
-
return [2 /*return*/, ctx];
|
|
298
|
-
}
|
|
299
|
-
event = new clz(afterMiddleware, {
|
|
300
|
-
traverse: !this.disableAutoISOConversion,
|
|
301
|
-
});
|
|
302
|
-
ctx.stats.increment('analytics_js.integration.invoke', 1, [
|
|
303
|
-
"method:".concat(eventType),
|
|
304
|
-
"integration_name:".concat(this.name),
|
|
305
|
-
]);
|
|
306
|
-
_c.label = 2;
|
|
307
|
-
case 2:
|
|
308
|
-
_c.trys.push([2, 5, , 6]);
|
|
309
|
-
if (!this.integration) return [3 /*break*/, 4];
|
|
310
|
-
return [4 /*yield*/, this.integration.invoke.call(this.integration, eventType, event)];
|
|
311
|
-
case 3:
|
|
312
|
-
_c.sent();
|
|
313
|
-
_c.label = 4;
|
|
314
|
-
case 4: return [3 /*break*/, 6];
|
|
315
|
-
case 5:
|
|
316
|
-
err_1 = _c.sent();
|
|
317
|
-
ctx.stats.increment('analytics_js.integration.invoke.error', 1, [
|
|
318
|
-
"method:".concat(eventType),
|
|
319
|
-
"integration_name:".concat(this.name),
|
|
320
|
-
]);
|
|
321
|
-
throw err_1;
|
|
322
|
-
case 6: return [2 /*return*/, ctx];
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
};
|
|
327
|
-
LegacyDestination.prototype.track = function (ctx) {
|
|
328
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
329
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
330
|
-
return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_0__.Track, 'track')];
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
LegacyDestination.prototype.page = function (ctx) {
|
|
335
|
-
var _a;
|
|
336
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
337
|
-
var _this = this;
|
|
338
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_b) {
|
|
339
|
-
if (((_a = this.integration) === null || _a === void 0 ? void 0 : _a._assumesPageview) && !this._initialized) {
|
|
340
|
-
this.integration.initialize();
|
|
341
|
-
}
|
|
342
|
-
return [2 /*return*/, this.onInitialize.then(function () {
|
|
343
|
-
return _this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_0__.Page, 'page');
|
|
344
|
-
})];
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
LegacyDestination.prototype.identify = function (ctx) {
|
|
349
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
350
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
351
|
-
return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_0__.Identify, 'identify')];
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
};
|
|
355
|
-
LegacyDestination.prototype.alias = function (ctx) {
|
|
356
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
357
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
358
|
-
return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_0__.Alias, 'alias')];
|
|
359
|
-
});
|
|
360
|
-
});
|
|
361
|
-
};
|
|
362
|
-
LegacyDestination.prototype.group = function (ctx) {
|
|
363
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
|
364
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
|
365
|
-
return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_0__.Group, 'group')];
|
|
366
|
-
});
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
LegacyDestination.prototype.scheduleFlush = function () {
|
|
370
|
-
var _this = this;
|
|
371
|
-
if (this.flushing) {
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
375
|
-
setTimeout(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(_this, void 0, void 0, function () {
|
|
376
|
-
var _a;
|
|
377
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_b) {
|
|
378
|
-
switch (_b.label) {
|
|
379
|
-
case 0:
|
|
380
|
-
this.flushing = true;
|
|
381
|
-
_a = this;
|
|
382
|
-
return [4 /*yield*/, flushQueue(this, this.buffer)];
|
|
383
|
-
case 1:
|
|
384
|
-
_a.buffer = _b.sent();
|
|
385
|
-
this.flushing = false;
|
|
386
|
-
if (this.buffer.todo > 0) {
|
|
387
|
-
this.scheduleFlush();
|
|
388
|
-
}
|
|
389
|
-
return [2 /*return*/];
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
}); }, Math.random() * 5000);
|
|
393
|
-
};
|
|
394
|
-
return LegacyDestination;
|
|
395
|
-
}());
|
|
396
|
-
|
|
397
|
-
function ajsDestinations(settings, globalIntegrations, options, routingMiddleware, legacyIntegrationSources) {
|
|
398
|
-
var _a, _b;
|
|
399
|
-
if (globalIntegrations === void 0) { globalIntegrations = {}; }
|
|
400
|
-
if (options === void 0) { options = {}; }
|
|
401
|
-
if ((0,_core_environment__WEBPACK_IMPORTED_MODULE_12__.isServer)()) {
|
|
402
|
-
return [];
|
|
403
|
-
}
|
|
404
|
-
if (settings.plan) {
|
|
405
|
-
options = options !== null && options !== void 0 ? options : {};
|
|
406
|
-
options.plan = settings.plan;
|
|
407
|
-
}
|
|
408
|
-
var routingRules = (_b = (_a = settings.middlewareSettings) === null || _a === void 0 ? void 0 : _a.routingRules) !== null && _b !== void 0 ? _b : [];
|
|
409
|
-
var remoteIntegrationsConfig = settings.integrations;
|
|
410
|
-
var localIntegrationsConfig = options.integrations;
|
|
411
|
-
// merged remote CDN settings with user provided options
|
|
412
|
-
var integrationOptions = (0,_lib_merged_options__WEBPACK_IMPORTED_MODULE_13__.mergedOptions)(settings, options !== null && options !== void 0 ? options : {});
|
|
413
|
-
var adhocIntegrationSources = legacyIntegrationSources === null || legacyIntegrationSources === void 0 ? void 0 : legacyIntegrationSources.reduce(function (acc, integrationSource) {
|
|
414
|
-
var _a;
|
|
415
|
-
return ((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, acc), (_a = {}, _a[(0,_loader__WEBPACK_IMPORTED_MODULE_8__.resolveIntegrationNameFromSource)(integrationSource)] = integrationSource, _a)));
|
|
416
|
-
}, {});
|
|
417
|
-
var installableIntegrations = new Set((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spreadArray)([], Object.keys(remoteIntegrationsConfig).filter(function (name) {
|
|
418
|
-
return (0,_utils__WEBPACK_IMPORTED_MODULE_14__.isInstallableIntegration)(name, remoteIntegrationsConfig[name]);
|
|
419
|
-
}), true), Object.keys(adhocIntegrationSources || {}).filter(function (name) {
|
|
420
|
-
return (0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_15__.isPlainObject)(remoteIntegrationsConfig[name]) ||
|
|
421
|
-
(0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_15__.isPlainObject)(localIntegrationsConfig === null || localIntegrationsConfig === void 0 ? void 0 : localIntegrationsConfig[name]);
|
|
422
|
-
}), true));
|
|
423
|
-
return Array.from(installableIntegrations)
|
|
424
|
-
.filter(function (name) { return !(0,_utils__WEBPACK_IMPORTED_MODULE_14__.isDisabledIntegration)(name, globalIntegrations); })
|
|
425
|
-
.map(function (name) {
|
|
426
|
-
var integrationSettings = remoteIntegrationsConfig[name];
|
|
427
|
-
var version = (0,_loader__WEBPACK_IMPORTED_MODULE_8__.resolveVersion)(integrationSettings);
|
|
428
|
-
var destination = new LegacyDestination(name, version, integrationOptions[name], options, adhocIntegrationSources === null || adhocIntegrationSources === void 0 ? void 0 : adhocIntegrationSources[name]);
|
|
429
|
-
var routing = routingRules.filter(function (rule) { return rule.destinationName === name; });
|
|
430
|
-
if (routing.length > 0 && routingMiddleware) {
|
|
431
|
-
destination.addMiddleware(routingMiddleware);
|
|
432
|
-
}
|
|
433
|
-
return destination;
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
//# sourceMappingURL=index.js.map
|
|
437
|
-
|
|
438
|
-
/***/ }),
|
|
439
|
-
|
|
440
|
-
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js":
|
|
441
|
-
/*!*****************************************************************************************!*\
|
|
442
|
-
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js ***!
|
|
443
|
-
\*****************************************************************************************/
|
|
444
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
445
|
-
|
|
446
|
-
__webpack_require__.r(__webpack_exports__);
|
|
447
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
448
|
-
/* harmony export */ "buildIntegration": () => (/* binding */ buildIntegration),
|
|
449
|
-
/* harmony export */ "loadIntegration": () => (/* binding */ loadIntegration),
|
|
450
|
-
/* harmony export */ "resolveIntegrationNameFromSource": () => (/* binding */ resolveIntegrationNameFromSource),
|
|
451
|
-
/* harmony export */ "resolveVersion": () => (/* binding */ resolveVersion),
|
|
452
|
-
/* harmony export */ "unloadIntegration": () => (/* binding */ unloadIntegration)
|
|
453
|
-
/* harmony export */ });
|
|
454
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/@segment/analytics-next/node_modules/tslib/tslib.es6.js");
|
|
455
|
-
/* harmony import */ var _lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/parse-cdn */ "./node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js");
|
|
456
|
-
/* harmony import */ var _lib_load_script__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/load-script */ "./node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js");
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
function normalizeName(name) {
|
|
461
|
-
return name.toLowerCase().replace('.', '').replace(/\s+/g, '-');
|
|
462
|
-
}
|
|
463
|
-
function obfuscatePathName(pathName, obfuscate) {
|
|
464
|
-
if (obfuscate === void 0) { obfuscate = false; }
|
|
465
|
-
return obfuscate ? btoa(pathName).replace(/=/g, '') : undefined;
|
|
466
|
-
}
|
|
467
|
-
function resolveIntegrationNameFromSource(integrationSource) {
|
|
468
|
-
return ('Integration' in integrationSource
|
|
469
|
-
? integrationSource.Integration
|
|
470
|
-
: integrationSource).prototype.name;
|
|
471
|
-
}
|
|
472
|
-
function recordLoadMetrics(fullPath, ctx, name) {
|
|
473
|
-
var _a, _b;
|
|
474
|
-
try {
|
|
475
|
-
var metric = ((_b = (_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.getEntriesByName(fullPath, 'resource')) !== null && _b !== void 0 ? _b : [])[0];
|
|
476
|
-
// we assume everything that took under 100ms is cached
|
|
477
|
-
metric &&
|
|
478
|
-
ctx.stats.gauge('legacy_destination_time', Math.round(metric.duration), (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)([
|
|
479
|
-
name
|
|
480
|
-
], (metric.duration < 100 ? ['cached'] : []), true));
|
|
481
|
-
}
|
|
482
|
-
catch (_) {
|
|
483
|
-
// not available
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
function buildIntegration(integrationSource, integrationSettings, analyticsInstance) {
|
|
487
|
-
var integrationCtr;
|
|
488
|
-
// GA and Appcues use a different interface to instantiating integrations
|
|
489
|
-
if ('Integration' in integrationSource) {
|
|
490
|
-
var analyticsStub = {
|
|
491
|
-
user: function () { return analyticsInstance.user(); },
|
|
492
|
-
addIntegration: function () { },
|
|
493
|
-
};
|
|
494
|
-
integrationSource(analyticsStub);
|
|
495
|
-
integrationCtr = integrationSource.Integration;
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
integrationCtr = integrationSource;
|
|
499
|
-
}
|
|
500
|
-
var integration = new integrationCtr(integrationSettings);
|
|
501
|
-
integration.analytics = analyticsInstance;
|
|
502
|
-
return integration;
|
|
503
|
-
}
|
|
504
|
-
function loadIntegration(ctx, name, version, obfuscate) {
|
|
505
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
506
|
-
var pathName, obfuscatedPathName, path, fullPath, err_1, deps;
|
|
507
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
508
|
-
switch (_a.label) {
|
|
509
|
-
case 0:
|
|
510
|
-
pathName = normalizeName(name);
|
|
511
|
-
obfuscatedPathName = obfuscatePathName(pathName, obfuscate);
|
|
512
|
-
path = (0,_lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__.getNextIntegrationsURL)();
|
|
513
|
-
fullPath = "".concat(path, "/integrations/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, "/").concat(version, "/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, ".dynamic.js.gz");
|
|
514
|
-
_a.label = 1;
|
|
515
|
-
case 1:
|
|
516
|
-
_a.trys.push([1, 3, , 4]);
|
|
517
|
-
return [4 /*yield*/, (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.loadScript)(fullPath)];
|
|
518
|
-
case 2:
|
|
519
|
-
_a.sent();
|
|
520
|
-
recordLoadMetrics(fullPath, ctx, name);
|
|
521
|
-
return [3 /*break*/, 4];
|
|
522
|
-
case 3:
|
|
523
|
-
err_1 = _a.sent();
|
|
524
|
-
ctx.stats.gauge('legacy_destination_time', -1, ["plugin:".concat(name), "failed"]);
|
|
525
|
-
throw err_1;
|
|
526
|
-
case 4:
|
|
527
|
-
deps = window["".concat(pathName, "Deps")];
|
|
528
|
-
return [4 /*yield*/, Promise.all(deps.map(function (dep) { return (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.loadScript)(path + dep + '.gz'); }))
|
|
529
|
-
// @ts-ignore
|
|
530
|
-
];
|
|
531
|
-
case 5:
|
|
532
|
-
_a.sent();
|
|
533
|
-
// @ts-ignore
|
|
534
|
-
window["".concat(pathName, "Loader")]();
|
|
535
|
-
return [2 /*return*/, window[
|
|
536
|
-
// @ts-ignore
|
|
537
|
-
"".concat(pathName, "Integration")]];
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
function unloadIntegration(name, version, obfuscate) {
|
|
543
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
544
|
-
var path, pathName, obfuscatedPathName, fullPath;
|
|
545
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
546
|
-
path = (0,_lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__.getNextIntegrationsURL)();
|
|
547
|
-
pathName = normalizeName(name);
|
|
548
|
-
obfuscatedPathName = obfuscatePathName(name, obfuscate);
|
|
549
|
-
fullPath = "".concat(path, "/integrations/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, "/").concat(version, "/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, ".dynamic.js.gz");
|
|
550
|
-
return [2 /*return*/, (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.unloadScript)(fullPath)];
|
|
551
|
-
});
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
function resolveVersion(settings) {
|
|
555
|
-
var _a, _b, _c, _d;
|
|
556
|
-
return ((_d = (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.versionSettings) === null || _a === void 0 ? void 0 : _a.override) !== null && _b !== void 0 ? _b : (_c = settings === null || settings === void 0 ? void 0 : settings.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : 'latest');
|
|
557
|
-
}
|
|
558
|
-
//# sourceMappingURL=loader.js.map
|
|
559
|
-
|
|
560
|
-
/***/ }),
|
|
561
|
-
|
|
562
|
-
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js":
|
|
563
|
-
/*!****************************************************************************************!*\
|
|
564
|
-
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js ***!
|
|
565
|
-
\****************************************************************************************/
|
|
566
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
567
|
-
|
|
568
|
-
__webpack_require__.r(__webpack_exports__);
|
|
569
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
570
|
-
/* harmony export */ "isDisabledIntegration": () => (/* binding */ isDisabledIntegration),
|
|
571
|
-
/* harmony export */ "isInstallableIntegration": () => (/* binding */ isInstallableIntegration)
|
|
572
|
-
/* harmony export */ });
|
|
573
|
-
var isInstallableIntegration = function (name, integrationSettings) {
|
|
574
|
-
var _a;
|
|
575
|
-
var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;
|
|
576
|
-
// We use `!== 'unbundled'` (versus `=== 'bundled'`) to be inclusive of
|
|
577
|
-
// destinations without a defined value for `bundlingStatus`
|
|
578
|
-
var deviceMode = bundlingStatus !== 'unbundled' &&
|
|
579
|
-
(type === 'browser' || ((_a = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _a === void 0 ? void 0 : _a.includes('browser')));
|
|
580
|
-
// checking for iterable is a quick fix we need in place to prevent
|
|
581
|
-
// errors showing Iterable as a failed destiantion. Ideally, we should
|
|
582
|
-
// fix the Iterable metadata instead, but that's a longer process.
|
|
583
|
-
return !name.startsWith('Segment') && name !== 'Iterable' && deviceMode;
|
|
584
|
-
};
|
|
585
|
-
var isDisabledIntegration = function (integrationName, globalIntegrations) {
|
|
586
|
-
var allDisableAndNotDefined = globalIntegrations.All === false &&
|
|
587
|
-
globalIntegrations[integrationName] === undefined;
|
|
588
|
-
return (globalIntegrations[integrationName] === false || allDisableAndNotDefined);
|
|
589
|
-
};
|
|
590
|
-
//# sourceMappingURL=utils.js.map
|
|
591
|
-
|
|
592
|
-
/***/ })
|
|
593
|
-
|
|
594
|
-
}]);
|