@microsoft/1ds-core-js 4.3.10-nightly3.2507-28 → 4.3.10-nightly3.2508-02
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/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.gbl.js → ms.core-4.3.10-nightly3.2508-02.gbl.js} +136 -53
- package/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.gbl.js.map → ms.core-4.3.10-nightly3.2508-02.gbl.js.map} +1 -1
- package/bundle/es5/ms.core-4.3.10-nightly3.2508-02.gbl.min.js +7 -0
- package/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.gbl.min.js.map → ms.core-4.3.10-nightly3.2508-02.gbl.min.js.map} +1 -1
- package/bundle/es5/ms.core-4.3.10-nightly3.2508-02.integrity.json +46 -0
- package/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.js → ms.core-4.3.10-nightly3.2508-02.js} +136 -53
- package/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.js.map → ms.core-4.3.10-nightly3.2508-02.js.map} +1 -1
- package/bundle/es5/ms.core-4.3.10-nightly3.2508-02.min.js +7 -0
- package/bundle/es5/{ms.core-4.3.10-nightly3.2507-28.min.js.map → ms.core-4.3.10-nightly3.2508-02.min.js.map} +1 -1
- package/bundle/es5/ms.core.gbl.js +135 -52
- package/bundle/es5/ms.core.gbl.js.map +1 -1
- package/bundle/es5/ms.core.gbl.min.js +2 -2
- package/bundle/es5/ms.core.gbl.min.js.map +1 -1
- package/bundle/es5/ms.core.integrity.json +17 -17
- package/bundle/es5/ms.core.js +135 -52
- package/bundle/es5/ms.core.js.map +1 -1
- package/bundle/es5/ms.core.min.js +2 -2
- package/bundle/es5/ms.core.min.js.map +1 -1
- package/dist/es5/ms.core.js +133 -50
- package/dist/es5/ms.core.js.map +1 -1
- package/dist/es5/ms.core.min.js +2 -2
- package/dist/es5/ms.core.min.js.map +1 -1
- package/dist-es5/AppInsightsCore.js +1 -1
- package/dist-es5/BaseCore.js +1 -1
- package/dist-es5/DataModels.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/Index.js +1 -1
- package/dist-es5/InternalConstants.js +1 -1
- package/dist-es5/Utils.js +2 -2
- package/dist-es5/Utils.js.map +1 -1
- package/dist-es5/ValueSanitizer.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/package.json +2 -2
- package/types/1ds-core-js.d.ts +2 -2
- package/types/1ds-core-js.namespaced.d.ts +10 -2
- package/bundle/es5/ms.core-4.3.10-nightly3.2507-28.gbl.min.js +0 -7
- package/bundle/es5/ms.core-4.3.10-nightly3.2507-28.integrity.json +0 -46
- package/bundle/es5/ms.core-4.3.10-nightly3.2507-28.min.js +0 -7
package/dist/es5/ms.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 4.3.10-nightly3.
|
|
2
|
+
* 1DS JS SDK Core, 4.3.10-nightly3.2508-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
return result;
|
|
2526
2526
|
}
|
|
2527
2527
|
|
|
2528
|
-
var version = '3.3.10-nightly3.
|
|
2528
|
+
var version = '3.3.10-nightly3.2508-02';
|
|
2529
2529
|
var instanceName = "." + newId(6);
|
|
2530
2530
|
var _dataUid = 0;
|
|
2531
2531
|
function _canAcceptData(target) {
|
|
@@ -3482,6 +3482,7 @@
|
|
|
3482
3482
|
_b.enabled = UNDEFINED_VALUE,
|
|
3483
3483
|
_b.ignoreCookies = UNDEFINED_VALUE,
|
|
3484
3484
|
_b.blockedCookies = UNDEFINED_VALUE,
|
|
3485
|
+
_b.disableCookieDefer = false,
|
|
3485
3486
|
_b)),
|
|
3486
3487
|
cookieDomain: UNDEFINED_VALUE,
|
|
3487
3488
|
cookiePath: UNDEFINED_VALUE
|
|
@@ -3561,16 +3562,99 @@
|
|
|
3561
3562
|
var _getCookieFn;
|
|
3562
3563
|
var _setCookieFn;
|
|
3563
3564
|
var _delCookieFn;
|
|
3565
|
+
var _pendingCookies = [];
|
|
3566
|
+
function _formatDeletionValue(path) {
|
|
3567
|
+
var _a;
|
|
3568
|
+
var values = (_a = {},
|
|
3569
|
+
_a[STR_PATH] = path ? path : "/",
|
|
3570
|
+
_a[strExpires] = "Thu, 01 Jan 1970 00:00:01 GMT",
|
|
3571
|
+
_a);
|
|
3572
|
+
if (!isIE()) {
|
|
3573
|
+
values["max-age"] = "0";
|
|
3574
|
+
}
|
|
3575
|
+
return _formatCookieValue(STR_EMPTY$2, values);
|
|
3576
|
+
}
|
|
3577
|
+
function _formatSetCookieValue(value, maxAgeSec, domain, path) {
|
|
3578
|
+
var values = {};
|
|
3579
|
+
var theValue = strTrim(value || STR_EMPTY$2);
|
|
3580
|
+
var idx = strIndexOf(theValue, ";");
|
|
3581
|
+
if (idx !== -1) {
|
|
3582
|
+
theValue = strTrim(strLeft(value, idx));
|
|
3583
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
3584
|
+
}
|
|
3585
|
+
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
3586
|
+
if (!isNullOrUndefined(maxAgeSec)) {
|
|
3587
|
+
var _isIE = isIE();
|
|
3588
|
+
if (isUndefined(values[strExpires])) {
|
|
3589
|
+
var nowMs = utcNow();
|
|
3590
|
+
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
3591
|
+
if (expireMs > 0) {
|
|
3592
|
+
var expiry = new Date();
|
|
3593
|
+
expiry.setTime(expireMs);
|
|
3594
|
+
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY$2, isTruthy);
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
if (!_isIE) {
|
|
3598
|
+
setValue(values, "max-age", STR_EMPTY$2 + maxAgeSec, null, isUndefined);
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
var location = getLocation();
|
|
3602
|
+
if (location && location.protocol === "https:") {
|
|
3603
|
+
setValue(values, "secure", null, null, isUndefined);
|
|
3604
|
+
if (_allowUaSameSite === null) {
|
|
3605
|
+
_allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT ]);
|
|
3606
|
+
}
|
|
3607
|
+
if (_allowUaSameSite) {
|
|
3608
|
+
setValue(values, "SameSite", "None", null, isUndefined);
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
setValue(values, STR_PATH, path || _path, null, isUndefined);
|
|
3612
|
+
return _formatCookieValue(theValue, values);
|
|
3613
|
+
}
|
|
3614
|
+
function _removePendingCookie(name) {
|
|
3615
|
+
if (_pendingCookies) {
|
|
3616
|
+
for (var i = _pendingCookies[_DYN_LENGTH$1 ] - 1; i >= 0; i--) {
|
|
3617
|
+
if (_pendingCookies[i].n === name) {
|
|
3618
|
+
_pendingCookies[_DYN_SPLICE ](i, 1);
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
function _flushPendingCookies() {
|
|
3624
|
+
if (areCookiesSupported(logger) && _pendingCookies) {
|
|
3625
|
+
arrForEach(_pendingCookies, function (pendingData) {
|
|
3626
|
+
if (!_isBlockedCookie(cookieMgrConfig, pendingData.n)) {
|
|
3627
|
+
if (pendingData.o === 0 ) {
|
|
3628
|
+
_setCookieFn(pendingData.n, pendingData.v);
|
|
3629
|
+
}
|
|
3630
|
+
else if (pendingData.o === 1 ) {
|
|
3631
|
+
_delCookieFn(pendingData.n, pendingData.v);
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
});
|
|
3635
|
+
_pendingCookies = [];
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3564
3638
|
rootConfig = createDynamicConfig(rootConfig || _globalCookieConfig, null, logger).cfg;
|
|
3565
3639
|
unloadHandler = onConfigChange(rootConfig, function (details) {
|
|
3566
3640
|
details.setDf(details.cfg, rootDefaultConfig);
|
|
3567
3641
|
cookieMgrConfig = details.ref(details.cfg, "cookieCfg");
|
|
3568
3642
|
_path = cookieMgrConfig[STR_PATH ] || "/";
|
|
3569
3643
|
_domain = cookieMgrConfig[STR_DOMAIN ];
|
|
3644
|
+
if (cookieMgrConfig.disableCookieDefer) {
|
|
3645
|
+
_pendingCookies = null;
|
|
3646
|
+
}
|
|
3647
|
+
else if (_pendingCookies === null) {
|
|
3648
|
+
_pendingCookies = [];
|
|
3649
|
+
}
|
|
3650
|
+
var wasEnabled = _enabled;
|
|
3570
3651
|
_enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false;
|
|
3571
3652
|
_getCookieFn = cookieMgrConfig.getCookie || _getCookieValue;
|
|
3572
3653
|
_setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;
|
|
3573
3654
|
_delCookieFn = cookieMgrConfig.delCookie || _setCookieValue;
|
|
3655
|
+
if (!wasEnabled && _enabled && _pendingCookies) {
|
|
3656
|
+
_flushPendingCookies();
|
|
3657
|
+
}
|
|
3574
3658
|
}, logger);
|
|
3575
3659
|
var cookieMgr = {
|
|
3576
3660
|
isEnabled: function () {
|
|
@@ -3582,55 +3666,52 @@
|
|
|
3582
3666
|
return enabled;
|
|
3583
3667
|
},
|
|
3584
3668
|
setEnabled: function (value) {
|
|
3585
|
-
_enabled = value !== false;
|
|
3586
3669
|
cookieMgrConfig[_DYN_ENABLED ] = value;
|
|
3670
|
+
if (!isUndefined(rootConfig[strDisableCookiesUsage])) {
|
|
3671
|
+
rootConfig[strDisableCookiesUsage] = !value;
|
|
3672
|
+
}
|
|
3587
3673
|
},
|
|
3588
3674
|
set: function (name, value, maxAgeSec, domain, path) {
|
|
3589
3675
|
var result = false;
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
var
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
values = _extractParts(strSubstring(value, idx + 1));
|
|
3597
|
-
}
|
|
3598
|
-
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
3599
|
-
if (!isNullOrUndefined(maxAgeSec)) {
|
|
3600
|
-
var _isIE = isIE();
|
|
3601
|
-
if (isUndefined(values[strExpires])) {
|
|
3602
|
-
var nowMs = utcNow();
|
|
3603
|
-
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
3604
|
-
if (expireMs > 0) {
|
|
3605
|
-
var expiry = new Date();
|
|
3606
|
-
expiry.setTime(expireMs);
|
|
3607
|
-
setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY$2, isTruthy);
|
|
3608
|
-
}
|
|
3609
|
-
}
|
|
3610
|
-
if (!_isIE) {
|
|
3611
|
-
setValue(values, "max-age", STR_EMPTY$2 + maxAgeSec, null, isUndefined);
|
|
3612
|
-
}
|
|
3676
|
+
var isBlocked = _isBlockedCookie(cookieMgrConfig, name);
|
|
3677
|
+
if (!isBlocked) {
|
|
3678
|
+
var cookieValue = _formatSetCookieValue(value, maxAgeSec, domain, path);
|
|
3679
|
+
if (_isMgrEnabled(cookieMgr)) {
|
|
3680
|
+
_setCookieFn(name, cookieValue);
|
|
3681
|
+
result = true;
|
|
3613
3682
|
}
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
}
|
|
3683
|
+
else if (_pendingCookies) {
|
|
3684
|
+
_removePendingCookie(name);
|
|
3685
|
+
_pendingCookies[_DYN_PUSH ]({
|
|
3686
|
+
n: name,
|
|
3687
|
+
o: 0 ,
|
|
3688
|
+
v: cookieValue
|
|
3689
|
+
});
|
|
3690
|
+
result = true;
|
|
3623
3691
|
}
|
|
3624
|
-
setValue(values, STR_PATH, path || _path, null, isUndefined);
|
|
3625
|
-
_setCookieFn(name, _formatCookieValue(theValue, values));
|
|
3626
|
-
result = true;
|
|
3627
3692
|
}
|
|
3628
3693
|
return result;
|
|
3629
3694
|
},
|
|
3630
3695
|
get: function (name) {
|
|
3631
3696
|
var value = STR_EMPTY$2;
|
|
3632
|
-
|
|
3633
|
-
|
|
3697
|
+
var isIgnored = _isIgnoredCookie(cookieMgrConfig, name);
|
|
3698
|
+
if (!isIgnored) {
|
|
3699
|
+
if (_isMgrEnabled(cookieMgr)) {
|
|
3700
|
+
value = _getCookieFn(name);
|
|
3701
|
+
}
|
|
3702
|
+
else if (_pendingCookies) {
|
|
3703
|
+
for (var i = _pendingCookies[_DYN_LENGTH$1 ] - 1; i >= 0; i--) {
|
|
3704
|
+
var pendingData = _pendingCookies[i];
|
|
3705
|
+
if (pendingData.n === name) {
|
|
3706
|
+
if (pendingData.o === 0 ) {
|
|
3707
|
+
var cookieValue = pendingData.v;
|
|
3708
|
+
var idx = strIndexOf(cookieValue, ";");
|
|
3709
|
+
value = idx !== -1 ? strTrim(strLeft(cookieValue, idx)) : strTrim(cookieValue);
|
|
3710
|
+
}
|
|
3711
|
+
break;
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3634
3715
|
}
|
|
3635
3716
|
return value;
|
|
3636
3717
|
},
|
|
@@ -3639,20 +3720,21 @@
|
|
|
3639
3720
|
if (_isMgrEnabled(cookieMgr)) {
|
|
3640
3721
|
result = cookieMgr.purge(name, path);
|
|
3641
3722
|
}
|
|
3723
|
+
else if (_pendingCookies) {
|
|
3724
|
+
_removePendingCookie(name);
|
|
3725
|
+
_pendingCookies[_DYN_PUSH ]({
|
|
3726
|
+
n: name,
|
|
3727
|
+
o: 1 ,
|
|
3728
|
+
v: _formatDeletionValue(path)
|
|
3729
|
+
});
|
|
3730
|
+
result = true;
|
|
3731
|
+
}
|
|
3642
3732
|
return result;
|
|
3643
3733
|
},
|
|
3644
3734
|
purge: function (name, path) {
|
|
3645
|
-
var _a;
|
|
3646
3735
|
var result = false;
|
|
3647
3736
|
if (areCookiesSupported(logger)) {
|
|
3648
|
-
|
|
3649
|
-
_a[STR_PATH] = path ? path : "/",
|
|
3650
|
-
_a[strExpires] = "Thu, 01 Jan 1970 00:00:01 GMT",
|
|
3651
|
-
_a);
|
|
3652
|
-
if (!isIE()) {
|
|
3653
|
-
values["max-age"] = "0";
|
|
3654
|
-
}
|
|
3655
|
-
_delCookieFn(name, _formatCookieValue(STR_EMPTY$2, values));
|
|
3737
|
+
_delCookieFn(name, _formatDeletionValue(path));
|
|
3656
3738
|
result = true;
|
|
3657
3739
|
}
|
|
3658
3740
|
return result;
|
|
@@ -3660,6 +3742,7 @@
|
|
|
3660
3742
|
unload: function (isAsync) {
|
|
3661
3743
|
unloadHandler && unloadHandler.rm();
|
|
3662
3744
|
unloadHandler = null;
|
|
3745
|
+
_pendingCookies = null;
|
|
3663
3746
|
}
|
|
3664
3747
|
};
|
|
3665
3748
|
cookieMgr[strConfigCookieMgr] = cookieMgr;
|
|
@@ -6696,7 +6779,7 @@
|
|
|
6696
6779
|
var _DYN_CAN_HANDLE = "canHandle";
|
|
6697
6780
|
|
|
6698
6781
|
var _a;
|
|
6699
|
-
var Version = '4.3.10-nightly3.
|
|
6782
|
+
var Version = '4.3.10-nightly3.2508-02';
|
|
6700
6783
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
6701
6784
|
var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
|
|
6702
6785
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|