autotel-subscribers 16.0.1 → 17.0.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/dist/amplitude.cjs +64 -64
- package/dist/amplitude.cjs.map +1 -1
- package/dist/amplitude.js +64 -64
- package/dist/amplitude.js.map +1 -1
- package/dist/factories.cjs +348 -249
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +348 -249
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +348 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +348 -249
- package/dist/index.js.map +1 -1
- package/dist/posthog.cjs +284 -185
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +284 -185
- package/dist/posthog.js.map +1 -1
- package/package.json +12 -12
- package/src/segment.test.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -86,11 +86,11 @@ function normalizeWindowsPath(path) {
|
|
|
86
86
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
87
87
|
}
|
|
88
88
|
var init_module_node = __esm({
|
|
89
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
89
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
93
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
94
94
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
95
95
|
return {
|
|
96
96
|
key,
|
|
@@ -107,7 +107,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
107
107
|
}
|
|
108
108
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
109
109
|
var init_featureFlagUtils = __esm({
|
|
110
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
110
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
111
111
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
112
112
|
if ("flags" in flagsResponse) {
|
|
113
113
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -165,10 +165,10 @@ var init_featureFlagUtils = __esm({
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
|
|
168
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
168
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
169
169
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
170
170
|
var init_uuidv7 = __esm({
|
|
171
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
171
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
172
172
|
DIGITS = "0123456789abcdef";
|
|
173
173
|
UUID = class _UUID {
|
|
174
174
|
constructor(bytes) {
|
|
@@ -329,10 +329,10 @@ var init_uuidv7 = __esm({
|
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
|
|
332
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
332
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
333
333
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
334
334
|
var init_bot_detection = __esm({
|
|
335
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
335
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
336
336
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
337
337
|
"amazonbot",
|
|
338
338
|
"amazonproductbot",
|
|
@@ -423,10 +423,10 @@ var init_bot_detection = __esm({
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
|
|
426
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
427
|
-
var types_PostHogPersistedProperty;
|
|
426
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/types.mjs
|
|
427
|
+
var types_PostHogPersistedProperty, FeatureFlagError;
|
|
428
428
|
var init_types = __esm({
|
|
429
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
429
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/types.mjs"() {
|
|
430
430
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
431
431
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
432
432
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -455,16 +455,25 @@ var init_types = __esm({
|
|
|
455
455
|
PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
|
|
456
456
|
return PostHogPersistedProperty;
|
|
457
457
|
})({});
|
|
458
|
+
FeatureFlagError = {
|
|
459
|
+
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
460
|
+
FLAG_MISSING: "flag_missing",
|
|
461
|
+
QUOTA_LIMITED: "quota_limited",
|
|
462
|
+
TIMEOUT: "timeout",
|
|
463
|
+
CONNECTION_ERROR: "connection_error",
|
|
464
|
+
UNKNOWN_ERROR: "unknown_error",
|
|
465
|
+
apiError: (status) => `api_error_${status}`
|
|
466
|
+
};
|
|
458
467
|
}
|
|
459
468
|
});
|
|
460
469
|
|
|
461
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
470
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
462
471
|
var init_string_utils = __esm({
|
|
463
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
472
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
464
473
|
}
|
|
465
474
|
});
|
|
466
475
|
|
|
467
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
476
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
468
477
|
function isPrimitive(value) {
|
|
469
478
|
return null === value || "object" != typeof value;
|
|
470
479
|
}
|
|
@@ -489,7 +498,7 @@ function isInstanceOf(candidate, base) {
|
|
|
489
498
|
}
|
|
490
499
|
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
491
500
|
var init_type_utils = __esm({
|
|
492
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
501
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
493
502
|
init_types();
|
|
494
503
|
init_string_utils();
|
|
495
504
|
nativeIsArray = Array.isArray;
|
|
@@ -503,12 +512,12 @@ var init_type_utils = __esm({
|
|
|
503
512
|
isUndefined = (x) => void 0 === x;
|
|
504
513
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
505
514
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
506
|
-
isNumber = (x) => "[object Number]" == type_utils_toString.call(x);
|
|
515
|
+
isNumber = (x) => "[object Number]" == type_utils_toString.call(x) && x === x;
|
|
507
516
|
isPlainError = (x) => x instanceof Error;
|
|
508
517
|
}
|
|
509
518
|
});
|
|
510
519
|
|
|
511
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
520
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
512
521
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
513
522
|
if (min > max) {
|
|
514
523
|
logger.warn("min cannot be greater than max.");
|
|
@@ -526,15 +535,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
526
535
|
return clampToRange(max, min, max, logger);
|
|
527
536
|
}
|
|
528
537
|
var init_number_utils = __esm({
|
|
529
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
538
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
530
539
|
init_type_utils();
|
|
531
540
|
}
|
|
532
541
|
});
|
|
533
542
|
|
|
534
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
543
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
535
544
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
536
545
|
var init_bucketed_rate_limiter = __esm({
|
|
537
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
546
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
538
547
|
init_number_utils();
|
|
539
548
|
ONE_DAY_IN_MS = 864e5;
|
|
540
549
|
BucketedRateLimiter = class {
|
|
@@ -578,10 +587,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
578
587
|
}
|
|
579
588
|
});
|
|
580
589
|
|
|
581
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
590
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
582
591
|
var PromiseQueue;
|
|
583
592
|
var init_promise_queue = __esm({
|
|
584
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
593
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
585
594
|
init_uuidv7();
|
|
586
595
|
PromiseQueue = class {
|
|
587
596
|
add(promise) {
|
|
@@ -612,7 +621,7 @@ var init_promise_queue = __esm({
|
|
|
612
621
|
}
|
|
613
622
|
});
|
|
614
623
|
|
|
615
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
624
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
616
625
|
function createConsole(consoleLike = console) {
|
|
617
626
|
const lockedMethods = {
|
|
618
627
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -627,7 +636,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
627
636
|
}
|
|
628
637
|
var _createLogger, passThrough;
|
|
629
638
|
var init_logger = __esm({
|
|
630
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
639
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
631
640
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
632
641
|
function _log(level, ...args) {
|
|
633
642
|
maybeCall(() => {
|
|
@@ -656,10 +665,10 @@ var init_logger = __esm({
|
|
|
656
665
|
}
|
|
657
666
|
});
|
|
658
667
|
|
|
659
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
668
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
660
669
|
var MOBILE, TABLET, GENERIC;
|
|
661
670
|
var init_user_agent_utils = __esm({
|
|
662
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
671
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
663
672
|
init_string_utils();
|
|
664
673
|
init_type_utils();
|
|
665
674
|
MOBILE = "Mobile";
|
|
@@ -670,7 +679,7 @@ var init_user_agent_utils = __esm({
|
|
|
670
679
|
}
|
|
671
680
|
});
|
|
672
681
|
|
|
673
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
682
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/index.mjs
|
|
674
683
|
function assert(truthyValue, message2) {
|
|
675
684
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
676
685
|
}
|
|
@@ -714,7 +723,7 @@ function allSettled(promises) {
|
|
|
714
723
|
}
|
|
715
724
|
var STRING_FORMAT, isError;
|
|
716
725
|
var init_utils = __esm({
|
|
717
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
726
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
718
727
|
init_bot_detection();
|
|
719
728
|
init_bucketed_rate_limiter();
|
|
720
729
|
init_number_utils();
|
|
@@ -728,10 +737,10 @@ var init_utils = __esm({
|
|
|
728
737
|
}
|
|
729
738
|
});
|
|
730
739
|
|
|
731
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
740
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
732
741
|
var SimpleEventEmitter;
|
|
733
742
|
var init_eventemitter = __esm({
|
|
734
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
743
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
735
744
|
SimpleEventEmitter = class {
|
|
736
745
|
constructor() {
|
|
737
746
|
this.events = {};
|
|
@@ -752,7 +761,7 @@ var init_eventemitter = __esm({
|
|
|
752
761
|
}
|
|
753
762
|
});
|
|
754
763
|
|
|
755
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
764
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/gzip.mjs
|
|
756
765
|
function isGzipSupported() {
|
|
757
766
|
return "CompressionStream" in globalThis;
|
|
758
767
|
}
|
|
@@ -771,11 +780,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
771
780
|
}
|
|
772
781
|
}
|
|
773
782
|
var init_gzip = __esm({
|
|
774
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
783
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
775
784
|
}
|
|
776
785
|
});
|
|
777
786
|
|
|
778
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
787
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
779
788
|
async function logFlushError(err) {
|
|
780
789
|
if (err instanceof PostHogFetchHttpError) {
|
|
781
790
|
let text = "";
|
|
@@ -795,7 +804,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
795
804
|
}
|
|
796
805
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
797
806
|
var init_posthog_core_stateless = __esm({
|
|
798
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
807
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
799
808
|
init_eventemitter();
|
|
800
809
|
init_featureFlagUtils();
|
|
801
810
|
init_gzip();
|
|
@@ -851,10 +860,11 @@ var init_posthog_core_stateless = __esm({
|
|
|
851
860
|
this.disableGeoip = options.disableGeoip ?? true;
|
|
852
861
|
this.disabled = options.disabled ?? false;
|
|
853
862
|
this.historicalMigration = options?.historicalMigration ?? false;
|
|
854
|
-
this.evaluationEnvironments = options?.evaluationEnvironments;
|
|
855
863
|
this._initPromise = Promise.resolve();
|
|
856
864
|
this._isInitialized = true;
|
|
857
865
|
this._logger = createLogger("[PostHog]", this.logMsgIfDebug.bind(this));
|
|
866
|
+
this.evaluationContexts = options?.evaluationContexts ?? options?.evaluationEnvironments;
|
|
867
|
+
if (options?.evaluationEnvironments && !options?.evaluationContexts) this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version.");
|
|
858
868
|
this.disableCompression = !isGzipSupported() || (options?.disableCompression ?? false);
|
|
859
869
|
}
|
|
860
870
|
logMsgIfDebug(fn) {
|
|
@@ -1029,7 +1039,7 @@ var init_posthog_core_stateless = __esm({
|
|
|
1029
1039
|
group_properties: groupProperties,
|
|
1030
1040
|
...extraPayload
|
|
1031
1041
|
};
|
|
1032
|
-
if (this.
|
|
1042
|
+
if (this.evaluationContexts && this.evaluationContexts.length > 0) requestData.evaluation_contexts = this.evaluationContexts;
|
|
1033
1043
|
const fetchOptions = {
|
|
1034
1044
|
method: "POST",
|
|
1035
1045
|
headers: {
|
|
@@ -1041,10 +1051,35 @@ var init_posthog_core_stateless = __esm({
|
|
|
1041
1051
|
this._logger.info("Flags URL", url);
|
|
1042
1052
|
return this.fetchWithRetry(url, fetchOptions, {
|
|
1043
1053
|
retryCount: 0
|
|
1044
|
-
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) =>
|
|
1054
|
+
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) => ({
|
|
1055
|
+
success: true,
|
|
1056
|
+
response: normalizeFlagsResponse(response)
|
|
1057
|
+
})).catch((error) => {
|
|
1045
1058
|
this._events.emit("error", error);
|
|
1059
|
+
return {
|
|
1060
|
+
success: false,
|
|
1061
|
+
error: this.categorizeRequestError(error)
|
|
1062
|
+
};
|
|
1046
1063
|
});
|
|
1047
1064
|
}
|
|
1065
|
+
categorizeRequestError(error) {
|
|
1066
|
+
if (error instanceof PostHogFetchHttpError) return {
|
|
1067
|
+
type: "api_error",
|
|
1068
|
+
statusCode: error.status
|
|
1069
|
+
};
|
|
1070
|
+
if (error instanceof PostHogFetchNetworkError) {
|
|
1071
|
+
const cause = error.error;
|
|
1072
|
+
if (cause instanceof Error && ("AbortError" === cause.name || "TimeoutError" === cause.name)) return {
|
|
1073
|
+
type: "timeout"
|
|
1074
|
+
};
|
|
1075
|
+
return {
|
|
1076
|
+
type: "connection_error"
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
return {
|
|
1080
|
+
type: "unknown_error"
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1048
1083
|
async getFeatureFlagStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
|
|
1049
1084
|
await this._initPromise;
|
|
1050
1085
|
const flagDetailResponse = await this.getFeatureFlagDetailStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
@@ -1111,8 +1146,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1111
1146
|
const extraPayload = {};
|
|
1112
1147
|
if (disableGeoip ?? this.disableGeoip) extraPayload["geoip_disable"] = true;
|
|
1113
1148
|
if (flagKeysToEvaluate) extraPayload["flag_keys_to_evaluate"] = flagKeysToEvaluate;
|
|
1114
|
-
const
|
|
1115
|
-
if (
|
|
1149
|
+
const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
|
|
1150
|
+
if (!result.success) return;
|
|
1151
|
+
const flagsResponse = result.response;
|
|
1116
1152
|
if (flagsResponse.errorsWhileComputingFlags) console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices");
|
|
1117
1153
|
if (flagsResponse.quotaLimited?.includes("feature_flags")) {
|
|
1118
1154
|
console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts");
|
|
@@ -1179,10 +1215,15 @@ var init_posthog_core_stateless = __esm({
|
|
|
1179
1215
|
this.setPersistedProperty(types_PostHogPersistedProperty.Props, this.props);
|
|
1180
1216
|
});
|
|
1181
1217
|
}
|
|
1218
|
+
processBeforeEnqueue(message2) {
|
|
1219
|
+
return message2;
|
|
1220
|
+
}
|
|
1182
1221
|
enqueue(type, _message, options) {
|
|
1183
1222
|
this.wrap(() => {
|
|
1184
1223
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1185
|
-
|
|
1224
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1225
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1226
|
+
if (null === message2) return;
|
|
1186
1227
|
const queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
|
|
1187
1228
|
if (queue.length >= this.maxQueueSize) {
|
|
1188
1229
|
queue.shift();
|
|
@@ -1201,10 +1242,13 @@ var init_posthog_core_stateless = __esm({
|
|
|
1201
1242
|
if (this.disabled) return void this._logger.warn("The client is disabled");
|
|
1202
1243
|
if (!this._isInitialized) await this._initPromise;
|
|
1203
1244
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1245
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1246
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1247
|
+
if (null === message2) return;
|
|
1204
1248
|
const data = {
|
|
1205
1249
|
api_key: this.apiKey,
|
|
1206
1250
|
batch: [
|
|
1207
|
-
|
|
1251
|
+
message2
|
|
1208
1252
|
],
|
|
1209
1253
|
sent_at: currentISOTime()
|
|
1210
1254
|
};
|
|
@@ -1413,9 +1457,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1413
1457
|
}
|
|
1414
1458
|
});
|
|
1415
1459
|
|
|
1416
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1460
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1417
1461
|
var init_posthog_core = __esm({
|
|
1418
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1462
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1419
1463
|
init_featureFlagUtils();
|
|
1420
1464
|
init_types();
|
|
1421
1465
|
init_posthog_core_stateless();
|
|
@@ -1424,7 +1468,7 @@ var init_posthog_core = __esm({
|
|
|
1424
1468
|
}
|
|
1425
1469
|
});
|
|
1426
1470
|
|
|
1427
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1471
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1428
1472
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1429
1473
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1430
1474
|
if (!chunkIdMap) return;
|
|
@@ -1457,14 +1501,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1457
1501
|
}
|
|
1458
1502
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1459
1503
|
var init_chunk_ids = __esm({
|
|
1460
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1504
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1461
1505
|
}
|
|
1462
1506
|
});
|
|
1463
1507
|
|
|
1464
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1508
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1465
1509
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1466
1510
|
var init_error_properties_builder = __esm({
|
|
1467
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1511
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1468
1512
|
init_utils();
|
|
1469
1513
|
init_chunk_ids();
|
|
1470
1514
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1578,7 +1622,7 @@ var init_error_properties_builder = __esm({
|
|
|
1578
1622
|
}
|
|
1579
1623
|
});
|
|
1580
1624
|
|
|
1581
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1625
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1582
1626
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1583
1627
|
const frame = {
|
|
1584
1628
|
platform,
|
|
@@ -1592,16 +1636,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1592
1636
|
}
|
|
1593
1637
|
var UNKNOWN_FUNCTION;
|
|
1594
1638
|
var init_base = __esm({
|
|
1595
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1639
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1596
1640
|
init_utils();
|
|
1597
1641
|
UNKNOWN_FUNCTION = "?";
|
|
1598
1642
|
}
|
|
1599
1643
|
});
|
|
1600
1644
|
|
|
1601
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1645
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1602
1646
|
var extractSafariExtensionDetails;
|
|
1603
1647
|
var init_safari = __esm({
|
|
1604
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1648
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1605
1649
|
init_base();
|
|
1606
1650
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1607
1651
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1617,10 +1661,10 @@ var init_safari = __esm({
|
|
|
1617
1661
|
}
|
|
1618
1662
|
});
|
|
1619
1663
|
|
|
1620
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1664
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1621
1665
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1622
1666
|
var init_chrome = __esm({
|
|
1623
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1667
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1624
1668
|
init_base();
|
|
1625
1669
|
init_safari();
|
|
1626
1670
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1650,10 +1694,10 @@ var init_chrome = __esm({
|
|
|
1650
1694
|
}
|
|
1651
1695
|
});
|
|
1652
1696
|
|
|
1653
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1697
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1654
1698
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1655
1699
|
var init_gecko = __esm({
|
|
1656
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1700
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1657
1701
|
init_base();
|
|
1658
1702
|
init_safari();
|
|
1659
1703
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1680,10 +1724,10 @@ var init_gecko = __esm({
|
|
|
1680
1724
|
}
|
|
1681
1725
|
});
|
|
1682
1726
|
|
|
1683
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1727
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1684
1728
|
var winjsRegex, winjsStackLineParser;
|
|
1685
1729
|
var init_winjs = __esm({
|
|
1686
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1730
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1687
1731
|
init_base();
|
|
1688
1732
|
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1689
1733
|
winjsStackLineParser = (line, platform) => {
|
|
@@ -1693,10 +1737,10 @@ var init_winjs = __esm({
|
|
|
1693
1737
|
}
|
|
1694
1738
|
});
|
|
1695
1739
|
|
|
1696
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1740
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1697
1741
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1698
1742
|
var init_opera = __esm({
|
|
1699
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1743
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1700
1744
|
init_base();
|
|
1701
1745
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1702
1746
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1711,7 +1755,7 @@ var init_opera = __esm({
|
|
|
1711
1755
|
}
|
|
1712
1756
|
});
|
|
1713
1757
|
|
|
1714
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1758
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1715
1759
|
function filenameIsInApp(filename, isNative = false) {
|
|
1716
1760
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1717
1761
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1721,7 +1765,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1721
1765
|
}
|
|
1722
1766
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1723
1767
|
var init_node = __esm({
|
|
1724
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1768
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1725
1769
|
init_base();
|
|
1726
1770
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1727
1771
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1782,7 +1826,7 @@ var init_node = __esm({
|
|
|
1782
1826
|
}
|
|
1783
1827
|
});
|
|
1784
1828
|
|
|
1785
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1829
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1786
1830
|
function reverseAndStripFrames(stack) {
|
|
1787
1831
|
if (!stack.length) return [];
|
|
1788
1832
|
const localStack = Array.from(stack);
|
|
@@ -1823,7 +1867,7 @@ function createStackParser(platform, ...parsers) {
|
|
|
1823
1867
|
}
|
|
1824
1868
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1825
1869
|
var init_parsers = __esm({
|
|
1826
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1870
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1827
1871
|
init_base();
|
|
1828
1872
|
init_chrome();
|
|
1829
1873
|
init_gecko();
|
|
@@ -1835,10 +1879,10 @@ var init_parsers = __esm({
|
|
|
1835
1879
|
}
|
|
1836
1880
|
});
|
|
1837
1881
|
|
|
1838
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1882
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1839
1883
|
var DOMExceptionCoercer;
|
|
1840
1884
|
var init_dom_exception_coercer = __esm({
|
|
1841
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1885
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1842
1886
|
init_utils();
|
|
1843
1887
|
DOMExceptionCoercer = class {
|
|
1844
1888
|
match(err) {
|
|
@@ -1872,10 +1916,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1872
1916
|
}
|
|
1873
1917
|
});
|
|
1874
1918
|
|
|
1875
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1919
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1876
1920
|
var ErrorCoercer;
|
|
1877
1921
|
var init_error_coercer = __esm({
|
|
1878
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1922
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1879
1923
|
init_utils();
|
|
1880
1924
|
ErrorCoercer = class {
|
|
1881
1925
|
match(err) {
|
|
@@ -1905,10 +1949,10 @@ var init_error_coercer = __esm({
|
|
|
1905
1949
|
}
|
|
1906
1950
|
});
|
|
1907
1951
|
|
|
1908
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1952
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1909
1953
|
var ErrorEventCoercer;
|
|
1910
1954
|
var init_error_event_coercer = __esm({
|
|
1911
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1955
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1912
1956
|
init_utils();
|
|
1913
1957
|
ErrorEventCoercer = class {
|
|
1914
1958
|
constructor() {
|
|
@@ -1930,10 +1974,10 @@ var init_error_event_coercer = __esm({
|
|
|
1930
1974
|
}
|
|
1931
1975
|
});
|
|
1932
1976
|
|
|
1933
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1977
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1934
1978
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1935
1979
|
var init_string_coercer = __esm({
|
|
1936
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1980
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1937
1981
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1938
1982
|
StringCoercer = class {
|
|
1939
1983
|
match(input) {
|
|
@@ -1965,10 +2009,10 @@ var init_string_coercer = __esm({
|
|
|
1965
2009
|
}
|
|
1966
2010
|
});
|
|
1967
2011
|
|
|
1968
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2012
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1969
2013
|
var severityLevels;
|
|
1970
2014
|
var init_types2 = __esm({
|
|
1971
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2015
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
1972
2016
|
severityLevels = [
|
|
1973
2017
|
"fatal",
|
|
1974
2018
|
"error",
|
|
@@ -1980,7 +2024,7 @@ var init_types2 = __esm({
|
|
|
1980
2024
|
}
|
|
1981
2025
|
});
|
|
1982
2026
|
|
|
1983
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2027
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
1984
2028
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
1985
2029
|
const keys = Object.keys(err);
|
|
1986
2030
|
keys.sort();
|
|
@@ -1995,14 +2039,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
1995
2039
|
return "";
|
|
1996
2040
|
}
|
|
1997
2041
|
var init_utils2 = __esm({
|
|
1998
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2042
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
1999
2043
|
}
|
|
2000
2044
|
});
|
|
2001
2045
|
|
|
2002
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2046
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
2003
2047
|
var ObjectCoercer;
|
|
2004
2048
|
var init_object_coercer = __esm({
|
|
2005
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2049
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2006
2050
|
init_utils();
|
|
2007
2051
|
init_types2();
|
|
2008
2052
|
init_utils2();
|
|
@@ -2056,10 +2100,10 @@ var init_object_coercer = __esm({
|
|
|
2056
2100
|
}
|
|
2057
2101
|
});
|
|
2058
2102
|
|
|
2059
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2103
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2060
2104
|
var EventCoercer;
|
|
2061
2105
|
var init_event_coercer = __esm({
|
|
2062
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2106
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2063
2107
|
init_utils();
|
|
2064
2108
|
init_utils2();
|
|
2065
2109
|
EventCoercer = class {
|
|
@@ -2079,10 +2123,10 @@ var init_event_coercer = __esm({
|
|
|
2079
2123
|
}
|
|
2080
2124
|
});
|
|
2081
2125
|
|
|
2082
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2126
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2083
2127
|
var PrimitiveCoercer;
|
|
2084
2128
|
var init_primitive_coercer = __esm({
|
|
2085
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2129
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2086
2130
|
init_utils();
|
|
2087
2131
|
PrimitiveCoercer = class {
|
|
2088
2132
|
match(candidate) {
|
|
@@ -2100,10 +2144,10 @@ var init_primitive_coercer = __esm({
|
|
|
2100
2144
|
}
|
|
2101
2145
|
});
|
|
2102
2146
|
|
|
2103
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2147
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2104
2148
|
var PromiseRejectionEventCoercer;
|
|
2105
2149
|
var init_promise_rejection_event = __esm({
|
|
2106
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2150
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2107
2151
|
init_utils();
|
|
2108
2152
|
PromiseRejectionEventCoercer = class {
|
|
2109
2153
|
match(err) {
|
|
@@ -2132,9 +2176,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2132
2176
|
}
|
|
2133
2177
|
});
|
|
2134
2178
|
|
|
2135
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2179
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2136
2180
|
var init_coercers = __esm({
|
|
2137
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2181
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2138
2182
|
init_dom_exception_coercer();
|
|
2139
2183
|
init_error_coercer();
|
|
2140
2184
|
init_error_event_coercer();
|
|
@@ -2146,10 +2190,10 @@ var init_coercers = __esm({
|
|
|
2146
2190
|
}
|
|
2147
2191
|
});
|
|
2148
2192
|
|
|
2149
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2193
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2150
2194
|
var ReduceableCache;
|
|
2151
2195
|
var init_utils3 = __esm({
|
|
2152
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2196
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2153
2197
|
ReduceableCache = class {
|
|
2154
2198
|
constructor(_maxSize) {
|
|
2155
2199
|
this._maxSize = _maxSize;
|
|
@@ -2175,7 +2219,7 @@ var init_utils3 = __esm({
|
|
|
2175
2219
|
}
|
|
2176
2220
|
});
|
|
2177
2221
|
|
|
2178
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2222
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2179
2223
|
var error_tracking_exports = {};
|
|
2180
2224
|
__export(error_tracking_exports, {
|
|
2181
2225
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2199,7 +2243,7 @@ __export(error_tracking_exports, {
|
|
|
2199
2243
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2200
2244
|
});
|
|
2201
2245
|
var init_error_tracking = __esm({
|
|
2202
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2246
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2203
2247
|
init_error_properties_builder();
|
|
2204
2248
|
init_parsers();
|
|
2205
2249
|
init_coercers();
|
|
@@ -2207,9 +2251,9 @@ var init_error_tracking = __esm({
|
|
|
2207
2251
|
}
|
|
2208
2252
|
});
|
|
2209
2253
|
|
|
2210
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2254
|
+
// ../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/index.mjs
|
|
2211
2255
|
var init_dist = __esm({
|
|
2212
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2256
|
+
"../../node_modules/.pnpm/@posthog+core@1.13.0/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2213
2257
|
init_featureFlagUtils();
|
|
2214
2258
|
init_uuidv7();
|
|
2215
2259
|
init_utils();
|
|
@@ -2400,7 +2444,7 @@ function snipLine(line, colno) {
|
|
|
2400
2444
|
}
|
|
2401
2445
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2402
2446
|
var init_context_lines_node = __esm({
|
|
2403
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2447
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2404
2448
|
init_dist();
|
|
2405
2449
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2406
2450
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2410,7 +2454,7 @@ var init_context_lines_node = __esm({
|
|
|
2410
2454
|
}
|
|
2411
2455
|
});
|
|
2412
2456
|
|
|
2413
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2457
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2414
2458
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2415
2459
|
let calledFatalError = false;
|
|
2416
2460
|
return Object.assign((error) => {
|
|
@@ -2442,14 +2486,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2442
2486
|
}));
|
|
2443
2487
|
}
|
|
2444
2488
|
var init_autocapture = __esm({
|
|
2445
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2489
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2446
2490
|
}
|
|
2447
2491
|
});
|
|
2448
2492
|
|
|
2449
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2493
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2450
2494
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2451
2495
|
var init_error_tracking2 = __esm({
|
|
2452
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2496
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2453
2497
|
init_autocapture();
|
|
2454
2498
|
init_dist();
|
|
2455
2499
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2520,19 +2564,19 @@ var init_error_tracking2 = __esm({
|
|
|
2520
2564
|
}
|
|
2521
2565
|
});
|
|
2522
2566
|
|
|
2523
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2567
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/version.mjs
|
|
2524
2568
|
var version;
|
|
2525
2569
|
var init_version = __esm({
|
|
2526
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2527
|
-
version = "5.
|
|
2570
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/version.mjs"() {
|
|
2571
|
+
version = "5.24.1";
|
|
2528
2572
|
}
|
|
2529
2573
|
});
|
|
2530
2574
|
|
|
2531
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2532
|
-
var
|
|
2575
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/types.mjs
|
|
2576
|
+
var FeatureFlagError2;
|
|
2533
2577
|
var init_types3 = __esm({
|
|
2534
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2535
|
-
|
|
2578
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/types.mjs"() {
|
|
2579
|
+
FeatureFlagError2 = {
|
|
2536
2580
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2537
2581
|
FLAG_MISSING: "flag_missing",
|
|
2538
2582
|
QUOTA_LIMITED: "quota_limited",
|
|
@@ -2541,7 +2585,7 @@ var init_types3 = __esm({
|
|
|
2541
2585
|
}
|
|
2542
2586
|
});
|
|
2543
2587
|
|
|
2544
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2588
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2545
2589
|
async function hashSHA1(text) {
|
|
2546
2590
|
const subtle = globalThis.crypto?.subtle;
|
|
2547
2591
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2550,11 +2594,11 @@ async function hashSHA1(text) {
|
|
|
2550
2594
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2551
2595
|
}
|
|
2552
2596
|
var init_crypto = __esm({
|
|
2553
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2597
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2554
2598
|
}
|
|
2555
2599
|
});
|
|
2556
2600
|
|
|
2557
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2601
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2558
2602
|
async function _hash(key, distinctId, salt = "") {
|
|
2559
2603
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2560
2604
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2722,7 +2766,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2722
2766
|
}
|
|
2723
2767
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2724
2768
|
var init_feature_flags = __esm({
|
|
2725
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2769
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2726
2770
|
init_dist();
|
|
2727
2771
|
init_crypto();
|
|
2728
2772
|
SIXTY_SECONDS = 6e4;
|
|
@@ -3135,10 +3179,10 @@ var init_feature_flags = __esm({
|
|
|
3135
3179
|
}
|
|
3136
3180
|
});
|
|
3137
3181
|
|
|
3138
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3182
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3139
3183
|
var PostHogMemoryStorage;
|
|
3140
3184
|
var init_storage_memory = __esm({
|
|
3141
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3185
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3142
3186
|
PostHogMemoryStorage = class {
|
|
3143
3187
|
getProperty(key) {
|
|
3144
3188
|
return this._memoryStorage[key];
|
|
@@ -3153,10 +3197,10 @@ var init_storage_memory = __esm({
|
|
|
3153
3197
|
}
|
|
3154
3198
|
});
|
|
3155
3199
|
|
|
3156
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3200
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/client.mjs
|
|
3157
3201
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3158
3202
|
var init_client = __esm({
|
|
3159
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3203
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/client.mjs"() {
|
|
3160
3204
|
init_version();
|
|
3161
3205
|
init_dist();
|
|
3162
3206
|
init_types3();
|
|
@@ -3296,94 +3340,148 @@ var init_client = __esm({
|
|
|
3296
3340
|
});
|
|
3297
3341
|
});
|
|
3298
3342
|
}
|
|
3299
|
-
async
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3343
|
+
async _getFeatureFlagResult(key, distinctId, options = {}, matchValue) {
|
|
3344
|
+
const sendFeatureFlagEvents = options.sendFeatureFlagEvents ?? true;
|
|
3345
|
+
if (void 0 !== this._flagOverrides && key in this._flagOverrides) {
|
|
3346
|
+
const overrideValue = this._flagOverrides[key];
|
|
3347
|
+
if (void 0 === overrideValue) return;
|
|
3348
|
+
const overridePayload = this._payloadOverrides?.[key];
|
|
3349
|
+
return {
|
|
3350
|
+
key,
|
|
3351
|
+
enabled: false !== overrideValue,
|
|
3352
|
+
variant: "string" == typeof overrideValue ? overrideValue : void 0,
|
|
3353
|
+
payload: overridePayload
|
|
3354
|
+
};
|
|
3355
|
+
}
|
|
3356
|
+
const { groups, disableGeoip } = options;
|
|
3357
|
+
let { onlyEvaluateLocally, personProperties, groupProperties } = options;
|
|
3303
3358
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3304
3359
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3305
3360
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3306
3361
|
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3307
|
-
|
|
3308
|
-
let
|
|
3309
|
-
const flagWasLocallyEvaluated = void 0 !== response;
|
|
3362
|
+
let result;
|
|
3363
|
+
let flagWasLocallyEvaluated = false;
|
|
3310
3364
|
let requestId;
|
|
3311
3365
|
let evaluatedAt;
|
|
3312
|
-
let flagDetail;
|
|
3313
3366
|
let featureFlagError;
|
|
3367
|
+
let flagId;
|
|
3368
|
+
let flagVersion;
|
|
3369
|
+
let flagReason;
|
|
3370
|
+
const localEvaluationEnabled = void 0 !== this.featureFlagsPoller;
|
|
3371
|
+
if (localEvaluationEnabled) {
|
|
3372
|
+
await this.featureFlagsPoller?.loadFeatureFlags();
|
|
3373
|
+
const flag = this.featureFlagsPoller?.featureFlagsByKey[key];
|
|
3374
|
+
if (flag) try {
|
|
3375
|
+
const localResult = await this.featureFlagsPoller?.computeFlagAndPayloadLocally(flag, distinctId, groups, personProperties, groupProperties, matchValue);
|
|
3376
|
+
if (localResult) {
|
|
3377
|
+
flagWasLocallyEvaluated = true;
|
|
3378
|
+
const value = localResult.value;
|
|
3379
|
+
flagId = flag.id;
|
|
3380
|
+
flagReason = "Evaluated locally";
|
|
3381
|
+
result = {
|
|
3382
|
+
key,
|
|
3383
|
+
enabled: false !== value,
|
|
3384
|
+
variant: "string" == typeof value ? value : void 0,
|
|
3385
|
+
payload: localResult.payload ?? void 0
|
|
3386
|
+
};
|
|
3387
|
+
}
|
|
3388
|
+
} catch (e) {
|
|
3389
|
+
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${key}: ${e.message}`);
|
|
3390
|
+
else throw e;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3314
3393
|
if (!flagWasLocallyEvaluated && !onlyEvaluateLocally) {
|
|
3315
3394
|
const flagsResponse = await super.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
|
|
3316
3395
|
key
|
|
3317
3396
|
]);
|
|
3318
|
-
if (void 0 === flagsResponse) featureFlagError =
|
|
3397
|
+
if (void 0 === flagsResponse) featureFlagError = FeatureFlagError2.UNKNOWN_ERROR;
|
|
3319
3398
|
else {
|
|
3320
3399
|
requestId = flagsResponse.requestId;
|
|
3321
3400
|
evaluatedAt = flagsResponse.evaluatedAt;
|
|
3322
3401
|
const errors = [];
|
|
3323
|
-
if (flagsResponse.errorsWhileComputingFlags) errors.push(
|
|
3324
|
-
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(
|
|
3325
|
-
flagDetail = flagsResponse.flags[key];
|
|
3326
|
-
if (void 0 === flagDetail) errors.push(
|
|
3402
|
+
if (flagsResponse.errorsWhileComputingFlags) errors.push(FeatureFlagError2.ERRORS_WHILE_COMPUTING);
|
|
3403
|
+
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(FeatureFlagError2.QUOTA_LIMITED);
|
|
3404
|
+
const flagDetail = flagsResponse.flags[key];
|
|
3405
|
+
if (void 0 === flagDetail) errors.push(FeatureFlagError2.FLAG_MISSING);
|
|
3406
|
+
else {
|
|
3407
|
+
flagId = flagDetail.metadata?.id;
|
|
3408
|
+
flagVersion = flagDetail.metadata?.version;
|
|
3409
|
+
flagReason = flagDetail.reason?.description ?? flagDetail.reason?.code;
|
|
3410
|
+
let parsedPayload;
|
|
3411
|
+
if (flagDetail.metadata?.payload !== void 0) try {
|
|
3412
|
+
parsedPayload = JSON.parse(flagDetail.metadata.payload);
|
|
3413
|
+
} catch {
|
|
3414
|
+
parsedPayload = flagDetail.metadata.payload;
|
|
3415
|
+
}
|
|
3416
|
+
result = {
|
|
3417
|
+
key,
|
|
3418
|
+
enabled: flagDetail.enabled,
|
|
3419
|
+
variant: flagDetail.variant,
|
|
3420
|
+
payload: parsedPayload
|
|
3421
|
+
};
|
|
3422
|
+
}
|
|
3327
3423
|
if (errors.length > 0) featureFlagError = errors.join(",");
|
|
3328
|
-
response = getFeatureFlagValue(flagDetail);
|
|
3329
3424
|
}
|
|
3330
3425
|
}
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
if (
|
|
3335
|
-
|
|
3336
|
-
featureFlagReportedKey
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3426
|
+
if (sendFeatureFlagEvents) {
|
|
3427
|
+
const response = void 0 === result ? void 0 : false === result.enabled ? false : result.variant ?? true;
|
|
3428
|
+
const featureFlagReportedKey = `${key}_${response}`;
|
|
3429
|
+
if (!(distinctId in this.distinctIdHasSentFlagCalls) || !this.distinctIdHasSentFlagCalls[distinctId].includes(featureFlagReportedKey)) {
|
|
3430
|
+
if (Object.keys(this.distinctIdHasSentFlagCalls).length >= this.maxCacheSize) this.distinctIdHasSentFlagCalls = {};
|
|
3431
|
+
if (Array.isArray(this.distinctIdHasSentFlagCalls[distinctId])) this.distinctIdHasSentFlagCalls[distinctId].push(featureFlagReportedKey);
|
|
3432
|
+
else this.distinctIdHasSentFlagCalls[distinctId] = [
|
|
3433
|
+
featureFlagReportedKey
|
|
3434
|
+
];
|
|
3435
|
+
const properties = {
|
|
3436
|
+
$feature_flag: key,
|
|
3437
|
+
$feature_flag_response: response,
|
|
3438
|
+
$feature_flag_id: flagId,
|
|
3439
|
+
$feature_flag_version: flagVersion,
|
|
3440
|
+
$feature_flag_reason: flagReason,
|
|
3441
|
+
locally_evaluated: flagWasLocallyEvaluated,
|
|
3442
|
+
[`$feature/${key}`]: response,
|
|
3443
|
+
$feature_flag_request_id: requestId,
|
|
3444
|
+
$feature_flag_evaluated_at: evaluatedAt
|
|
3445
|
+
};
|
|
3446
|
+
if (featureFlagError) properties.$feature_flag_error = featureFlagError;
|
|
3447
|
+
this.capture({
|
|
3448
|
+
distinctId,
|
|
3449
|
+
event: "$feature_flag_called",
|
|
3450
|
+
properties,
|
|
3451
|
+
groups,
|
|
3452
|
+
disableGeoip
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3357
3455
|
}
|
|
3358
|
-
|
|
3456
|
+
if (void 0 !== result && void 0 !== this._payloadOverrides && key in this._payloadOverrides) result = {
|
|
3457
|
+
...result,
|
|
3458
|
+
payload: this._payloadOverrides[key]
|
|
3459
|
+
};
|
|
3460
|
+
return result;
|
|
3461
|
+
}
|
|
3462
|
+
async getFeatureFlag(key, distinctId, options) {
|
|
3463
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3464
|
+
...options,
|
|
3465
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3466
|
+
});
|
|
3467
|
+
if (void 0 === result) return;
|
|
3468
|
+
if (false === result.enabled) return false;
|
|
3469
|
+
return result.variant ?? true;
|
|
3359
3470
|
}
|
|
3360
3471
|
async getFeatureFlagPayload(key, distinctId, matchValue, options) {
|
|
3361
3472
|
if (void 0 !== this._payloadOverrides && key in this._payloadOverrides) return this._payloadOverrides[key];
|
|
3362
|
-
const
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
if (result) {
|
|
3375
|
-
matchValue = result.value;
|
|
3376
|
-
response = result.payload;
|
|
3377
|
-
}
|
|
3378
|
-
} catch (e) {
|
|
3379
|
-
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${flag.key}: ${e.message}`);
|
|
3380
|
-
else throw e;
|
|
3381
|
-
}
|
|
3382
|
-
}
|
|
3383
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3384
|
-
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3385
|
-
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3386
|
-
return response;
|
|
3473
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3474
|
+
...options,
|
|
3475
|
+
sendFeatureFlagEvents: false
|
|
3476
|
+
}, matchValue);
|
|
3477
|
+
if (void 0 === result) return;
|
|
3478
|
+
return result.payload ?? null;
|
|
3479
|
+
}
|
|
3480
|
+
async getFeatureFlagResult(key, distinctId, options) {
|
|
3481
|
+
return this._getFeatureFlagResult(key, distinctId, {
|
|
3482
|
+
...options,
|
|
3483
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3484
|
+
});
|
|
3387
3485
|
}
|
|
3388
3486
|
async getRemoteConfigPayload(flagKey) {
|
|
3389
3487
|
if (!this.options.personalApiKey) throw new Error("Personal API key is required for remote config payload decryption");
|
|
@@ -3710,7 +3808,7 @@ var init_client = __esm({
|
|
|
3710
3808
|
});
|
|
3711
3809
|
var PostHogContext;
|
|
3712
3810
|
var init_context = __esm({
|
|
3713
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3811
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3714
3812
|
PostHogContext = class {
|
|
3715
3813
|
constructor() {
|
|
3716
3814
|
this.storage = new AsyncLocalStorage();
|
|
@@ -3738,7 +3836,7 @@ var init_context = __esm({
|
|
|
3738
3836
|
}
|
|
3739
3837
|
});
|
|
3740
3838
|
|
|
3741
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3839
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3742
3840
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3743
3841
|
"error"
|
|
3744
3842
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3794,7 +3892,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3794
3892
|
}
|
|
3795
3893
|
var NAME, PostHogSentryIntegration;
|
|
3796
3894
|
var init_sentry_integration = __esm({
|
|
3797
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3895
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3798
3896
|
NAME = "posthog-node";
|
|
3799
3897
|
PostHogSentryIntegration = class {
|
|
3800
3898
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3816,7 +3914,7 @@ var init_sentry_integration = __esm({
|
|
|
3816
3914
|
}
|
|
3817
3915
|
});
|
|
3818
3916
|
|
|
3819
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3917
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3820
3918
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3821
3919
|
app.use(posthogErrorHandler(_posthog));
|
|
3822
3920
|
}
|
|
@@ -3848,21 +3946,22 @@ function posthogErrorHandler(posthog) {
|
|
|
3848
3946
|
};
|
|
3849
3947
|
}
|
|
3850
3948
|
var init_express = __esm({
|
|
3851
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3949
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3852
3950
|
init_error_tracking2();
|
|
3853
3951
|
}
|
|
3854
3952
|
});
|
|
3855
3953
|
|
|
3856
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3954
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/exports.mjs
|
|
3857
3955
|
var init_exports = __esm({
|
|
3858
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3956
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3957
|
+
init_dist();
|
|
3859
3958
|
init_sentry_integration();
|
|
3860
3959
|
init_express();
|
|
3861
3960
|
init_types3();
|
|
3862
3961
|
}
|
|
3863
3962
|
});
|
|
3864
3963
|
|
|
3865
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3964
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3866
3965
|
var index_node_exports = {};
|
|
3867
3966
|
__export(index_node_exports, {
|
|
3868
3967
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3874,7 +3973,7 @@ __export(index_node_exports, {
|
|
|
3874
3973
|
});
|
|
3875
3974
|
var PostHog;
|
|
3876
3975
|
var init_index_node = __esm({
|
|
3877
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3976
|
+
"../../node_modules/.pnpm/posthog-node@5.24.1/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3878
3977
|
init_module_node();
|
|
3879
3978
|
init_context_lines_node();
|
|
3880
3979
|
init_error_tracking2();
|
|
@@ -13948,10 +14047,10 @@ var init_esm4 = __esm({
|
|
|
13948
14047
|
}
|
|
13949
14048
|
});
|
|
13950
14049
|
|
|
13951
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14050
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13952
14051
|
var IdentifyOperation, SpecialEventType;
|
|
13953
14052
|
var init_event = __esm({
|
|
13954
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14053
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13955
14054
|
(function(IdentifyOperation3) {
|
|
13956
14055
|
IdentifyOperation3["SET"] = "$set";
|
|
13957
14056
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -13972,10 +14071,10 @@ var init_event = __esm({
|
|
|
13972
14071
|
}
|
|
13973
14072
|
});
|
|
13974
14073
|
|
|
13975
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14074
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
13976
14075
|
var UNSET_VALUE, AMPLITUDE_PREFIX, STORAGE_PREFIX, DEFAULT_INSTANCE_NAME, AMPLITUDE_SERVER_URL, EU_AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL;
|
|
13977
14076
|
var init_constants = __esm({
|
|
13978
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14077
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
13979
14078
|
UNSET_VALUE = "-";
|
|
13980
14079
|
AMPLITUDE_PREFIX = "AMP";
|
|
13981
14080
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -13987,10 +14086,10 @@ var init_constants = __esm({
|
|
|
13987
14086
|
}
|
|
13988
14087
|
});
|
|
13989
14088
|
|
|
13990
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14089
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
13991
14090
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
13992
14091
|
var init_valid_properties = __esm({
|
|
13993
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14092
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
13994
14093
|
init_tslib_es6();
|
|
13995
14094
|
MAX_PROPERTY_KEYS = 1e3;
|
|
13996
14095
|
isValidObject = function(properties) {
|
|
@@ -14045,10 +14144,10 @@ var init_valid_properties = __esm({
|
|
|
14045
14144
|
}
|
|
14046
14145
|
});
|
|
14047
14146
|
|
|
14048
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14147
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
14049
14148
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
14050
14149
|
var init_identify = __esm({
|
|
14051
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14150
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
14052
14151
|
init_tslib_es6();
|
|
14053
14152
|
init_constants();
|
|
14054
14153
|
init_valid_properties();
|
|
@@ -14159,10 +14258,10 @@ var init_identify = __esm({
|
|
|
14159
14258
|
}
|
|
14160
14259
|
});
|
|
14161
14260
|
|
|
14162
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14261
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
14163
14262
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
14164
14263
|
var init_messages = __esm({
|
|
14165
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14264
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js"() {
|
|
14166
14265
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
14167
14266
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
14168
14267
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -14173,10 +14272,10 @@ var init_messages = __esm({
|
|
|
14173
14272
|
}
|
|
14174
14273
|
});
|
|
14175
14274
|
|
|
14176
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14275
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
14177
14276
|
var Status;
|
|
14178
14277
|
var init_status = __esm({
|
|
14179
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14278
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
14180
14279
|
(function(Status2) {
|
|
14181
14280
|
Status2["Unknown"] = "unknown";
|
|
14182
14281
|
Status2["Skipped"] = "skipped";
|
|
@@ -14191,10 +14290,10 @@ var init_status = __esm({
|
|
|
14191
14290
|
}
|
|
14192
14291
|
});
|
|
14193
14292
|
|
|
14194
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14293
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
14195
14294
|
var buildResult;
|
|
14196
14295
|
var init_result_builder = __esm({
|
|
14197
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14296
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
14198
14297
|
init_status();
|
|
14199
14298
|
buildResult = function(event, code, message2) {
|
|
14200
14299
|
if (code === void 0) {
|
|
@@ -14208,10 +14307,10 @@ var init_result_builder = __esm({
|
|
|
14208
14307
|
}
|
|
14209
14308
|
});
|
|
14210
14309
|
|
|
14211
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14310
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js
|
|
14212
14311
|
var getGlobalScope;
|
|
14213
14312
|
var init_global_scope = __esm({
|
|
14214
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14313
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
14215
14314
|
getGlobalScope = function() {
|
|
14216
14315
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
14217
14316
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -14234,10 +14333,10 @@ var init_global_scope = __esm({
|
|
|
14234
14333
|
}
|
|
14235
14334
|
});
|
|
14236
14335
|
|
|
14237
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14336
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
14238
14337
|
var legacyUUID, hex, UUID2;
|
|
14239
14338
|
var init_uuid2 = __esm({
|
|
14240
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14339
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
14241
14340
|
init_tslib_es6();
|
|
14242
14341
|
init_global_scope();
|
|
14243
14342
|
legacyUUID = function(a) {
|
|
@@ -14281,10 +14380,10 @@ var init_uuid2 = __esm({
|
|
|
14281
14380
|
}
|
|
14282
14381
|
});
|
|
14283
14382
|
|
|
14284
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14383
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
14285
14384
|
var Timeline;
|
|
14286
14385
|
var init_timeline = __esm({
|
|
14287
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14386
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
14288
14387
|
init_tslib_es6();
|
|
14289
14388
|
init_result_builder();
|
|
14290
14389
|
init_uuid2();
|
|
@@ -14586,10 +14685,10 @@ var init_timeline = __esm({
|
|
|
14586
14685
|
}
|
|
14587
14686
|
});
|
|
14588
14687
|
|
|
14589
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14688
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
14590
14689
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
14591
14690
|
var init_event_builder = __esm({
|
|
14592
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14691
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
14593
14692
|
init_tslib_es6();
|
|
14594
14693
|
init_identify();
|
|
14595
14694
|
init_event();
|
|
@@ -14619,10 +14718,10 @@ var init_event_builder = __esm({
|
|
|
14619
14718
|
}
|
|
14620
14719
|
});
|
|
14621
14720
|
|
|
14622
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14721
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
14623
14722
|
var returnWrapper;
|
|
14624
14723
|
var init_return_wrapper = __esm({
|
|
14625
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14724
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
14626
14725
|
returnWrapper = function(awaitable) {
|
|
14627
14726
|
return {
|
|
14628
14727
|
promise: awaitable || Promise.resolve()
|
|
@@ -14631,10 +14730,10 @@ var init_return_wrapper = __esm({
|
|
|
14631
14730
|
}
|
|
14632
14731
|
});
|
|
14633
14732
|
|
|
14634
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14733
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
14635
14734
|
var AmplitudeCore;
|
|
14636
14735
|
var init_core_client = __esm({
|
|
14637
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14736
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
14638
14737
|
init_tslib_es6();
|
|
14639
14738
|
init_event();
|
|
14640
14739
|
init_identify();
|
|
@@ -14902,10 +15001,10 @@ var init_core_client = __esm({
|
|
|
14902
15001
|
}
|
|
14903
15002
|
});
|
|
14904
15003
|
|
|
14905
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15004
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14906
15005
|
var Revenue, RevenueProperty;
|
|
14907
15006
|
var init_revenue = __esm({
|
|
14908
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15007
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14909
15008
|
init_tslib_es6();
|
|
14910
15009
|
init_valid_properties();
|
|
14911
15010
|
Revenue = /** @class */
|
|
@@ -14982,10 +15081,10 @@ var init_revenue = __esm({
|
|
|
14982
15081
|
}
|
|
14983
15082
|
});
|
|
14984
15083
|
|
|
14985
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15084
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
14986
15085
|
var chunk;
|
|
14987
15086
|
var init_chunk = __esm({
|
|
14988
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15087
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js"() {
|
|
14989
15088
|
chunk = function(arr, size) {
|
|
14990
15089
|
var chunkSize = Math.max(size, 1);
|
|
14991
15090
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -15000,10 +15099,10 @@ var init_chunk = __esm({
|
|
|
15000
15099
|
}
|
|
15001
15100
|
});
|
|
15002
15101
|
|
|
15003
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15102
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
15004
15103
|
var LogLevel;
|
|
15005
15104
|
var init_loglevel = __esm({
|
|
15006
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15105
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
15007
15106
|
(function(LogLevel2) {
|
|
15008
15107
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
15009
15108
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -15014,10 +15113,10 @@ var init_loglevel = __esm({
|
|
|
15014
15113
|
}
|
|
15015
15114
|
});
|
|
15016
15115
|
|
|
15017
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15116
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
15018
15117
|
var PREFIX, Logger;
|
|
15019
15118
|
var init_logger3 = __esm({
|
|
15020
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15119
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
15021
15120
|
init_loglevel();
|
|
15022
15121
|
PREFIX = "Amplitude Logger ";
|
|
15023
15122
|
Logger = /** @class */
|
|
@@ -15079,10 +15178,10 @@ var init_logger3 = __esm({
|
|
|
15079
15178
|
}
|
|
15080
15179
|
});
|
|
15081
15180
|
|
|
15082
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15181
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
15083
15182
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
15084
15183
|
var init_config = __esm({
|
|
15085
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15184
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
15086
15185
|
init_constants();
|
|
15087
15186
|
init_logger3();
|
|
15088
15187
|
init_loglevel();
|
|
@@ -15183,19 +15282,19 @@ var init_config = __esm({
|
|
|
15183
15282
|
}
|
|
15184
15283
|
});
|
|
15185
15284
|
|
|
15186
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15285
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
15187
15286
|
function isSuccessStatusCode(code) {
|
|
15188
15287
|
return code >= 200 && code < 300;
|
|
15189
15288
|
}
|
|
15190
15289
|
var init_status_code = __esm({
|
|
15191
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15290
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
15192
15291
|
}
|
|
15193
15292
|
});
|
|
15194
15293
|
|
|
15195
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15294
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
15196
15295
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
15197
15296
|
var init_debug = __esm({
|
|
15198
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15297
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
15199
15298
|
init_tslib_es6();
|
|
15200
15299
|
init_loglevel();
|
|
15201
15300
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -15313,7 +15412,7 @@ var init_debug = __esm({
|
|
|
15313
15412
|
}
|
|
15314
15413
|
});
|
|
15315
15414
|
|
|
15316
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15415
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
15317
15416
|
function getErrorMessage(error) {
|
|
15318
15417
|
if (error instanceof Error)
|
|
15319
15418
|
return error.message;
|
|
@@ -15331,7 +15430,7 @@ function getResponseBodyString(res) {
|
|
|
15331
15430
|
}
|
|
15332
15431
|
var Destination;
|
|
15333
15432
|
var init_destination = __esm({
|
|
15334
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15433
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
15335
15434
|
init_tslib_es6();
|
|
15336
15435
|
init_status();
|
|
15337
15436
|
init_messages();
|
|
@@ -15722,10 +15821,10 @@ var init_destination = __esm({
|
|
|
15722
15821
|
}
|
|
15723
15822
|
});
|
|
15724
15823
|
|
|
15725
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15824
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
15726
15825
|
var BaseTransport;
|
|
15727
15826
|
var init_base2 = __esm({
|
|
15728
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15827
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
15729
15828
|
init_status();
|
|
15730
15829
|
init_status_code();
|
|
15731
15830
|
BaseTransport = /** @class */
|
|
@@ -15827,10 +15926,10 @@ var init_base2 = __esm({
|
|
|
15827
15926
|
}
|
|
15828
15927
|
});
|
|
15829
15928
|
|
|
15830
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15929
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15831
15930
|
var ServerZone;
|
|
15832
15931
|
var init_server_zone = __esm({
|
|
15833
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15932
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15834
15933
|
(function(ServerZone2) {
|
|
15835
15934
|
ServerZone2["US"] = "US";
|
|
15836
15935
|
ServerZone2["EU"] = "EU";
|
|
@@ -15839,17 +15938,17 @@ var init_server_zone = __esm({
|
|
|
15839
15938
|
}
|
|
15840
15939
|
});
|
|
15841
15940
|
|
|
15842
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15941
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15843
15942
|
var OfflineDisabled;
|
|
15844
15943
|
var init_offline = __esm({
|
|
15845
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15944
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15846
15945
|
OfflineDisabled = null;
|
|
15847
15946
|
}
|
|
15848
15947
|
});
|
|
15849
15948
|
|
|
15850
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15949
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15851
15950
|
var init_esm5 = __esm({
|
|
15852
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15951
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.36.0/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15853
15952
|
init_core_client();
|
|
15854
15953
|
init_identify();
|
|
15855
15954
|
init_revenue();
|
|
@@ -15866,18 +15965,18 @@ var init_esm5 = __esm({
|
|
|
15866
15965
|
}
|
|
15867
15966
|
});
|
|
15868
15967
|
|
|
15869
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15968
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15870
15969
|
var VERSION;
|
|
15871
15970
|
var init_version3 = __esm({
|
|
15872
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15873
|
-
VERSION = "1.5.
|
|
15971
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
15972
|
+
VERSION = "1.5.32";
|
|
15874
15973
|
}
|
|
15875
15974
|
});
|
|
15876
15975
|
|
|
15877
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15976
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15878
15977
|
var Context2;
|
|
15879
15978
|
var init_context4 = __esm({
|
|
15880
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15979
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15881
15980
|
init_tslib_es6();
|
|
15882
15981
|
init_esm5();
|
|
15883
15982
|
init_version3();
|
|
@@ -15912,7 +16011,7 @@ var init_context4 = __esm({
|
|
|
15912
16011
|
});
|
|
15913
16012
|
var Http;
|
|
15914
16013
|
var init_http = __esm({
|
|
15915
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16014
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15916
16015
|
init_tslib_es6();
|
|
15917
16016
|
init_esm5();
|
|
15918
16017
|
Http = /** @class */
|
|
@@ -15974,10 +16073,10 @@ var init_http = __esm({
|
|
|
15974
16073
|
}
|
|
15975
16074
|
});
|
|
15976
16075
|
|
|
15977
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16076
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
15978
16077
|
var NodeConfig, useNodeConfig;
|
|
15979
16078
|
var init_config2 = __esm({
|
|
15980
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16079
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
15981
16080
|
init_tslib_es6();
|
|
15982
16081
|
init_esm5();
|
|
15983
16082
|
init_http();
|
|
@@ -15995,10 +16094,10 @@ var init_config2 = __esm({
|
|
|
15995
16094
|
}
|
|
15996
16095
|
});
|
|
15997
16096
|
|
|
15998
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16097
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
15999
16098
|
var AmplitudeNode, createInstance, node_client_default;
|
|
16000
16099
|
var init_node_client = __esm({
|
|
16001
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16100
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
16002
16101
|
init_tslib_es6();
|
|
16003
16102
|
init_esm5();
|
|
16004
16103
|
init_context4();
|
|
@@ -16072,7 +16171,7 @@ var init_node_client = __esm({
|
|
|
16072
16171
|
}
|
|
16073
16172
|
});
|
|
16074
16173
|
|
|
16075
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16174
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
16076
16175
|
var types_exports = {};
|
|
16077
16176
|
__export(types_exports, {
|
|
16078
16177
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -16083,12 +16182,12 @@ __export(types_exports, {
|
|
|
16083
16182
|
SpecialEventType: () => SpecialEventType
|
|
16084
16183
|
});
|
|
16085
16184
|
var init_types4 = __esm({
|
|
16086
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16185
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
16087
16186
|
init_esm5();
|
|
16088
16187
|
}
|
|
16089
16188
|
});
|
|
16090
16189
|
|
|
16091
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16190
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
16092
16191
|
var esm_exports2 = {};
|
|
16093
16192
|
__export(esm_exports2, {
|
|
16094
16193
|
Identify: () => Identify,
|
|
@@ -16109,7 +16208,7 @@ __export(esm_exports2, {
|
|
|
16109
16208
|
});
|
|
16110
16209
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
16111
16210
|
var init_esm6 = __esm({
|
|
16112
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16211
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.32/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
16113
16212
|
init_node_client();
|
|
16114
16213
|
init_node_client();
|
|
16115
16214
|
init_esm5();
|