autotel-subscribers 16.0.1 → 18.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 +350 -249
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +350 -249
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +350 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +350 -249
- package/dist/index.js.map +1 -1
- package/dist/posthog.cjs +286 -185
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +286 -185
- package/dist/posthog.js.map +1 -1
- package/package.json +14 -14
- package/src/segment.test.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -115,11 +115,11 @@ function normalizeWindowsPath(path) {
|
|
|
115
115
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
116
116
|
}
|
|
117
117
|
var init_module_node = __esm({
|
|
118
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
118
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
122
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
123
123
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
124
124
|
return {
|
|
125
125
|
key,
|
|
@@ -136,7 +136,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
136
136
|
}
|
|
137
137
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
138
138
|
var init_featureFlagUtils = __esm({
|
|
139
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
139
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
140
140
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
141
141
|
if ("flags" in flagsResponse) {
|
|
142
142
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -194,10 +194,10 @@ var init_featureFlagUtils = __esm({
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
197
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
198
198
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
199
199
|
var init_uuidv7 = __esm({
|
|
200
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
200
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
201
201
|
DIGITS = "0123456789abcdef";
|
|
202
202
|
UUID = class _UUID {
|
|
203
203
|
constructor(bytes) {
|
|
@@ -358,10 +358,10 @@ var init_uuidv7 = __esm({
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
361
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
362
362
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
363
363
|
var init_bot_detection = __esm({
|
|
364
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
364
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
365
365
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
366
366
|
"amazonbot",
|
|
367
367
|
"amazonproductbot",
|
|
@@ -452,14 +452,16 @@ var init_bot_detection = __esm({
|
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
|
|
455
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
456
|
-
var types_PostHogPersistedProperty;
|
|
455
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/types.mjs
|
|
456
|
+
var types_PostHogPersistedProperty, FeatureFlagError;
|
|
457
457
|
var init_types = __esm({
|
|
458
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
458
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/types.mjs"() {
|
|
459
459
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
460
460
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
461
461
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
462
462
|
PostHogPersistedProperty["Props"] = "props";
|
|
463
|
+
PostHogPersistedProperty["EnablePersonProcessing"] = "enable_person_processing";
|
|
464
|
+
PostHogPersistedProperty["PersonMode"] = "person_mode";
|
|
463
465
|
PostHogPersistedProperty["FeatureFlagDetails"] = "feature_flag_details";
|
|
464
466
|
PostHogPersistedProperty["FeatureFlags"] = "feature_flags";
|
|
465
467
|
PostHogPersistedProperty["FeatureFlagPayloads"] = "feature_flag_payloads";
|
|
@@ -484,16 +486,25 @@ var init_types = __esm({
|
|
|
484
486
|
PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
|
|
485
487
|
return PostHogPersistedProperty;
|
|
486
488
|
})({});
|
|
489
|
+
FeatureFlagError = {
|
|
490
|
+
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
491
|
+
FLAG_MISSING: "flag_missing",
|
|
492
|
+
QUOTA_LIMITED: "quota_limited",
|
|
493
|
+
TIMEOUT: "timeout",
|
|
494
|
+
CONNECTION_ERROR: "connection_error",
|
|
495
|
+
UNKNOWN_ERROR: "unknown_error",
|
|
496
|
+
apiError: (status) => `api_error_${status}`
|
|
497
|
+
};
|
|
487
498
|
}
|
|
488
499
|
});
|
|
489
500
|
|
|
490
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
501
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
491
502
|
var init_string_utils = __esm({
|
|
492
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
503
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
493
504
|
}
|
|
494
505
|
});
|
|
495
506
|
|
|
496
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
507
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
497
508
|
function isPrimitive(value) {
|
|
498
509
|
return null === value || "object" != typeof value;
|
|
499
510
|
}
|
|
@@ -518,7 +529,7 @@ function isInstanceOf(candidate, base) {
|
|
|
518
529
|
}
|
|
519
530
|
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
520
531
|
var init_type_utils = __esm({
|
|
521
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
532
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
522
533
|
init_types();
|
|
523
534
|
init_string_utils();
|
|
524
535
|
nativeIsArray = Array.isArray;
|
|
@@ -532,12 +543,12 @@ var init_type_utils = __esm({
|
|
|
532
543
|
isUndefined = (x) => void 0 === x;
|
|
533
544
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
534
545
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
535
|
-
isNumber = (x) => "[object Number]" == type_utils_toString.call(x);
|
|
546
|
+
isNumber = (x) => "[object Number]" == type_utils_toString.call(x) && x === x;
|
|
536
547
|
isPlainError = (x) => x instanceof Error;
|
|
537
548
|
}
|
|
538
549
|
});
|
|
539
550
|
|
|
540
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
551
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
541
552
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
542
553
|
if (min > max) {
|
|
543
554
|
logger.warn("min cannot be greater than max.");
|
|
@@ -555,15 +566,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
555
566
|
return clampToRange(max, min, max, logger);
|
|
556
567
|
}
|
|
557
568
|
var init_number_utils = __esm({
|
|
558
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
569
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
559
570
|
init_type_utils();
|
|
560
571
|
}
|
|
561
572
|
});
|
|
562
573
|
|
|
563
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
574
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
564
575
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
565
576
|
var init_bucketed_rate_limiter = __esm({
|
|
566
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
577
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
567
578
|
init_number_utils();
|
|
568
579
|
ONE_DAY_IN_MS = 864e5;
|
|
569
580
|
BucketedRateLimiter = class {
|
|
@@ -607,10 +618,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
607
618
|
}
|
|
608
619
|
});
|
|
609
620
|
|
|
610
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
621
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
611
622
|
var PromiseQueue;
|
|
612
623
|
var init_promise_queue = __esm({
|
|
613
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
624
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
614
625
|
init_uuidv7();
|
|
615
626
|
PromiseQueue = class {
|
|
616
627
|
add(promise) {
|
|
@@ -641,7 +652,7 @@ var init_promise_queue = __esm({
|
|
|
641
652
|
}
|
|
642
653
|
});
|
|
643
654
|
|
|
644
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
655
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
645
656
|
function createConsole(consoleLike = console) {
|
|
646
657
|
const lockedMethods = {
|
|
647
658
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -656,7 +667,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
656
667
|
}
|
|
657
668
|
var _createLogger, passThrough;
|
|
658
669
|
var init_logger = __esm({
|
|
659
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
670
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
660
671
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
661
672
|
function _log(level, ...args) {
|
|
662
673
|
maybeCall(() => {
|
|
@@ -685,10 +696,10 @@ var init_logger = __esm({
|
|
|
685
696
|
}
|
|
686
697
|
});
|
|
687
698
|
|
|
688
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
699
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
689
700
|
var MOBILE, TABLET, GENERIC;
|
|
690
701
|
var init_user_agent_utils = __esm({
|
|
691
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
702
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
692
703
|
init_string_utils();
|
|
693
704
|
init_type_utils();
|
|
694
705
|
MOBILE = "Mobile";
|
|
@@ -699,7 +710,7 @@ var init_user_agent_utils = __esm({
|
|
|
699
710
|
}
|
|
700
711
|
});
|
|
701
712
|
|
|
702
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
713
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/index.mjs
|
|
703
714
|
function assert(truthyValue, message2) {
|
|
704
715
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message2);
|
|
705
716
|
}
|
|
@@ -743,7 +754,7 @@ function allSettled(promises) {
|
|
|
743
754
|
}
|
|
744
755
|
var STRING_FORMAT, isError;
|
|
745
756
|
var init_utils = __esm({
|
|
746
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
757
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
747
758
|
init_bot_detection();
|
|
748
759
|
init_bucketed_rate_limiter();
|
|
749
760
|
init_number_utils();
|
|
@@ -757,10 +768,10 @@ var init_utils = __esm({
|
|
|
757
768
|
}
|
|
758
769
|
});
|
|
759
770
|
|
|
760
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
771
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
761
772
|
var SimpleEventEmitter;
|
|
762
773
|
var init_eventemitter = __esm({
|
|
763
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
774
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
764
775
|
SimpleEventEmitter = class {
|
|
765
776
|
constructor() {
|
|
766
777
|
this.events = {};
|
|
@@ -781,7 +792,7 @@ var init_eventemitter = __esm({
|
|
|
781
792
|
}
|
|
782
793
|
});
|
|
783
794
|
|
|
784
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
795
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/gzip.mjs
|
|
785
796
|
function isGzipSupported() {
|
|
786
797
|
return "CompressionStream" in globalThis;
|
|
787
798
|
}
|
|
@@ -800,11 +811,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
800
811
|
}
|
|
801
812
|
}
|
|
802
813
|
var init_gzip = __esm({
|
|
803
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
814
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
804
815
|
}
|
|
805
816
|
});
|
|
806
817
|
|
|
807
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
818
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
808
819
|
async function logFlushError(err) {
|
|
809
820
|
if (err instanceof PostHogFetchHttpError) {
|
|
810
821
|
let text = "";
|
|
@@ -824,7 +835,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
824
835
|
}
|
|
825
836
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
826
837
|
var init_posthog_core_stateless = __esm({
|
|
827
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
838
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
828
839
|
init_eventemitter();
|
|
829
840
|
init_featureFlagUtils();
|
|
830
841
|
init_gzip();
|
|
@@ -880,10 +891,11 @@ var init_posthog_core_stateless = __esm({
|
|
|
880
891
|
this.disableGeoip = options.disableGeoip ?? true;
|
|
881
892
|
this.disabled = options.disabled ?? false;
|
|
882
893
|
this.historicalMigration = options?.historicalMigration ?? false;
|
|
883
|
-
this.evaluationEnvironments = options?.evaluationEnvironments;
|
|
884
894
|
this._initPromise = Promise.resolve();
|
|
885
895
|
this._isInitialized = true;
|
|
886
896
|
this._logger = createLogger("[PostHog]", this.logMsgIfDebug.bind(this));
|
|
897
|
+
this.evaluationContexts = options?.evaluationContexts ?? options?.evaluationEnvironments;
|
|
898
|
+
if (options?.evaluationEnvironments && !options?.evaluationContexts) this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version.");
|
|
887
899
|
this.disableCompression = !isGzipSupported() || (options?.disableCompression ?? false);
|
|
888
900
|
}
|
|
889
901
|
logMsgIfDebug(fn) {
|
|
@@ -1058,7 +1070,7 @@ var init_posthog_core_stateless = __esm({
|
|
|
1058
1070
|
group_properties: groupProperties,
|
|
1059
1071
|
...extraPayload
|
|
1060
1072
|
};
|
|
1061
|
-
if (this.
|
|
1073
|
+
if (this.evaluationContexts && this.evaluationContexts.length > 0) requestData.evaluation_contexts = this.evaluationContexts;
|
|
1062
1074
|
const fetchOptions = {
|
|
1063
1075
|
method: "POST",
|
|
1064
1076
|
headers: {
|
|
@@ -1070,10 +1082,35 @@ var init_posthog_core_stateless = __esm({
|
|
|
1070
1082
|
this._logger.info("Flags URL", url);
|
|
1071
1083
|
return this.fetchWithRetry(url, fetchOptions, {
|
|
1072
1084
|
retryCount: 0
|
|
1073
|
-
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) =>
|
|
1085
|
+
}, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) => ({
|
|
1086
|
+
success: true,
|
|
1087
|
+
response: normalizeFlagsResponse(response)
|
|
1088
|
+
})).catch((error) => {
|
|
1074
1089
|
this._events.emit("error", error);
|
|
1090
|
+
return {
|
|
1091
|
+
success: false,
|
|
1092
|
+
error: this.categorizeRequestError(error)
|
|
1093
|
+
};
|
|
1075
1094
|
});
|
|
1076
1095
|
}
|
|
1096
|
+
categorizeRequestError(error) {
|
|
1097
|
+
if (error instanceof PostHogFetchHttpError) return {
|
|
1098
|
+
type: "api_error",
|
|
1099
|
+
statusCode: error.status
|
|
1100
|
+
};
|
|
1101
|
+
if (error instanceof PostHogFetchNetworkError) {
|
|
1102
|
+
const cause = error.error;
|
|
1103
|
+
if (cause instanceof Error && ("AbortError" === cause.name || "TimeoutError" === cause.name)) return {
|
|
1104
|
+
type: "timeout"
|
|
1105
|
+
};
|
|
1106
|
+
return {
|
|
1107
|
+
type: "connection_error"
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
return {
|
|
1111
|
+
type: "unknown_error"
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1077
1114
|
async getFeatureFlagStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
|
|
1078
1115
|
await this._initPromise;
|
|
1079
1116
|
const flagDetailResponse = await this.getFeatureFlagDetailStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
@@ -1140,8 +1177,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1140
1177
|
const extraPayload = {};
|
|
1141
1178
|
if (disableGeoip ?? this.disableGeoip) extraPayload["geoip_disable"] = true;
|
|
1142
1179
|
if (flagKeysToEvaluate) extraPayload["flag_keys_to_evaluate"] = flagKeysToEvaluate;
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1180
|
+
const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
|
|
1181
|
+
if (!result.success) return;
|
|
1182
|
+
const flagsResponse = result.response;
|
|
1145
1183
|
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");
|
|
1146
1184
|
if (flagsResponse.quotaLimited?.includes("feature_flags")) {
|
|
1147
1185
|
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");
|
|
@@ -1208,10 +1246,15 @@ var init_posthog_core_stateless = __esm({
|
|
|
1208
1246
|
this.setPersistedProperty(types_PostHogPersistedProperty.Props, this.props);
|
|
1209
1247
|
});
|
|
1210
1248
|
}
|
|
1249
|
+
processBeforeEnqueue(message2) {
|
|
1250
|
+
return message2;
|
|
1251
|
+
}
|
|
1211
1252
|
enqueue(type, _message, options) {
|
|
1212
1253
|
this.wrap(() => {
|
|
1213
1254
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1214
|
-
|
|
1255
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1256
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1257
|
+
if (null === message2) return;
|
|
1215
1258
|
const queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
|
|
1216
1259
|
if (queue.length >= this.maxQueueSize) {
|
|
1217
1260
|
queue.shift();
|
|
@@ -1230,10 +1273,13 @@ var init_posthog_core_stateless = __esm({
|
|
|
1230
1273
|
if (this.disabled) return void this._logger.warn("The client is disabled");
|
|
1231
1274
|
if (!this._isInitialized) await this._initPromise;
|
|
1232
1275
|
if (this.optedOut) return void this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
|
|
1276
|
+
let message2 = this.prepareMessage(type, _message, options);
|
|
1277
|
+
message2 = this.processBeforeEnqueue(message2);
|
|
1278
|
+
if (null === message2) return;
|
|
1233
1279
|
const data = {
|
|
1234
1280
|
api_key: this.apiKey,
|
|
1235
1281
|
batch: [
|
|
1236
|
-
|
|
1282
|
+
message2
|
|
1237
1283
|
],
|
|
1238
1284
|
sent_at: currentISOTime()
|
|
1239
1285
|
};
|
|
@@ -1442,9 +1488,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1442
1488
|
}
|
|
1443
1489
|
});
|
|
1444
1490
|
|
|
1445
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1491
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1446
1492
|
var init_posthog_core = __esm({
|
|
1447
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1493
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1448
1494
|
init_featureFlagUtils();
|
|
1449
1495
|
init_types();
|
|
1450
1496
|
init_posthog_core_stateless();
|
|
@@ -1453,7 +1499,7 @@ var init_posthog_core = __esm({
|
|
|
1453
1499
|
}
|
|
1454
1500
|
});
|
|
1455
1501
|
|
|
1456
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1502
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1457
1503
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1458
1504
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1459
1505
|
if (!chunkIdMap) return;
|
|
@@ -1486,14 +1532,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1486
1532
|
}
|
|
1487
1533
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1488
1534
|
var init_chunk_ids = __esm({
|
|
1489
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1535
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1490
1536
|
}
|
|
1491
1537
|
});
|
|
1492
1538
|
|
|
1493
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1539
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1494
1540
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1495
1541
|
var init_error_properties_builder = __esm({
|
|
1496
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1542
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1497
1543
|
init_utils();
|
|
1498
1544
|
init_chunk_ids();
|
|
1499
1545
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1607,7 +1653,7 @@ var init_error_properties_builder = __esm({
|
|
|
1607
1653
|
}
|
|
1608
1654
|
});
|
|
1609
1655
|
|
|
1610
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1656
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1611
1657
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1612
1658
|
const frame = {
|
|
1613
1659
|
platform,
|
|
@@ -1621,16 +1667,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1621
1667
|
}
|
|
1622
1668
|
var UNKNOWN_FUNCTION;
|
|
1623
1669
|
var init_base = __esm({
|
|
1624
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1670
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1625
1671
|
init_utils();
|
|
1626
1672
|
UNKNOWN_FUNCTION = "?";
|
|
1627
1673
|
}
|
|
1628
1674
|
});
|
|
1629
1675
|
|
|
1630
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1676
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1631
1677
|
var extractSafariExtensionDetails;
|
|
1632
1678
|
var init_safari = __esm({
|
|
1633
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1679
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1634
1680
|
init_base();
|
|
1635
1681
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1636
1682
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1646,10 +1692,10 @@ var init_safari = __esm({
|
|
|
1646
1692
|
}
|
|
1647
1693
|
});
|
|
1648
1694
|
|
|
1649
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1695
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1650
1696
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1651
1697
|
var init_chrome = __esm({
|
|
1652
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1698
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1653
1699
|
init_base();
|
|
1654
1700
|
init_safari();
|
|
1655
1701
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1679,10 +1725,10 @@ var init_chrome = __esm({
|
|
|
1679
1725
|
}
|
|
1680
1726
|
});
|
|
1681
1727
|
|
|
1682
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1728
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1683
1729
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1684
1730
|
var init_gecko = __esm({
|
|
1685
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1731
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1686
1732
|
init_base();
|
|
1687
1733
|
init_safari();
|
|
1688
1734
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1709,10 +1755,10 @@ var init_gecko = __esm({
|
|
|
1709
1755
|
}
|
|
1710
1756
|
});
|
|
1711
1757
|
|
|
1712
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1758
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1713
1759
|
var winjsRegex, winjsStackLineParser;
|
|
1714
1760
|
var init_winjs = __esm({
|
|
1715
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1761
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1716
1762
|
init_base();
|
|
1717
1763
|
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1718
1764
|
winjsStackLineParser = (line, platform) => {
|
|
@@ -1722,10 +1768,10 @@ var init_winjs = __esm({
|
|
|
1722
1768
|
}
|
|
1723
1769
|
});
|
|
1724
1770
|
|
|
1725
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1771
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1726
1772
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1727
1773
|
var init_opera = __esm({
|
|
1728
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1774
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1729
1775
|
init_base();
|
|
1730
1776
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1731
1777
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1740,7 +1786,7 @@ var init_opera = __esm({
|
|
|
1740
1786
|
}
|
|
1741
1787
|
});
|
|
1742
1788
|
|
|
1743
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1789
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1744
1790
|
function filenameIsInApp(filename, isNative = false) {
|
|
1745
1791
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1746
1792
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1750,7 +1796,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1750
1796
|
}
|
|
1751
1797
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1752
1798
|
var init_node = __esm({
|
|
1753
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1799
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1754
1800
|
init_base();
|
|
1755
1801
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1756
1802
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1811,7 +1857,7 @@ var init_node = __esm({
|
|
|
1811
1857
|
}
|
|
1812
1858
|
});
|
|
1813
1859
|
|
|
1814
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1860
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1815
1861
|
function reverseAndStripFrames(stack) {
|
|
1816
1862
|
if (!stack.length) return [];
|
|
1817
1863
|
const localStack = Array.from(stack);
|
|
@@ -1852,7 +1898,7 @@ function createStackParser(platform, ...parsers) {
|
|
|
1852
1898
|
}
|
|
1853
1899
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1854
1900
|
var init_parsers = __esm({
|
|
1855
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1901
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1856
1902
|
init_base();
|
|
1857
1903
|
init_chrome();
|
|
1858
1904
|
init_gecko();
|
|
@@ -1864,10 +1910,10 @@ var init_parsers = __esm({
|
|
|
1864
1910
|
}
|
|
1865
1911
|
});
|
|
1866
1912
|
|
|
1867
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1913
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1868
1914
|
var DOMExceptionCoercer;
|
|
1869
1915
|
var init_dom_exception_coercer = __esm({
|
|
1870
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1916
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1871
1917
|
init_utils();
|
|
1872
1918
|
DOMExceptionCoercer = class {
|
|
1873
1919
|
match(err) {
|
|
@@ -1901,10 +1947,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1901
1947
|
}
|
|
1902
1948
|
});
|
|
1903
1949
|
|
|
1904
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1950
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1905
1951
|
var ErrorCoercer;
|
|
1906
1952
|
var init_error_coercer = __esm({
|
|
1907
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1953
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1908
1954
|
init_utils();
|
|
1909
1955
|
ErrorCoercer = class {
|
|
1910
1956
|
match(err) {
|
|
@@ -1934,10 +1980,10 @@ var init_error_coercer = __esm({
|
|
|
1934
1980
|
}
|
|
1935
1981
|
});
|
|
1936
1982
|
|
|
1937
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
1983
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1938
1984
|
var ErrorEventCoercer;
|
|
1939
1985
|
var init_error_event_coercer = __esm({
|
|
1940
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
1986
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1941
1987
|
init_utils();
|
|
1942
1988
|
ErrorEventCoercer = class {
|
|
1943
1989
|
constructor() {
|
|
@@ -1959,10 +2005,10 @@ var init_error_event_coercer = __esm({
|
|
|
1959
2005
|
}
|
|
1960
2006
|
});
|
|
1961
2007
|
|
|
1962
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2008
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1963
2009
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1964
2010
|
var init_string_coercer = __esm({
|
|
1965
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2011
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1966
2012
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1967
2013
|
StringCoercer = class {
|
|
1968
2014
|
match(input) {
|
|
@@ -1994,10 +2040,10 @@ var init_string_coercer = __esm({
|
|
|
1994
2040
|
}
|
|
1995
2041
|
});
|
|
1996
2042
|
|
|
1997
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2043
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1998
2044
|
var severityLevels;
|
|
1999
2045
|
var init_types2 = __esm({
|
|
2000
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2046
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
2001
2047
|
severityLevels = [
|
|
2002
2048
|
"fatal",
|
|
2003
2049
|
"error",
|
|
@@ -2009,7 +2055,7 @@ var init_types2 = __esm({
|
|
|
2009
2055
|
}
|
|
2010
2056
|
});
|
|
2011
2057
|
|
|
2012
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2058
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
2013
2059
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
2014
2060
|
const keys = Object.keys(err);
|
|
2015
2061
|
keys.sort();
|
|
@@ -2024,14 +2070,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
2024
2070
|
return "";
|
|
2025
2071
|
}
|
|
2026
2072
|
var init_utils2 = __esm({
|
|
2027
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2073
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
2028
2074
|
}
|
|
2029
2075
|
});
|
|
2030
2076
|
|
|
2031
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2077
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
2032
2078
|
var ObjectCoercer;
|
|
2033
2079
|
var init_object_coercer = __esm({
|
|
2034
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2080
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
2035
2081
|
init_utils();
|
|
2036
2082
|
init_types2();
|
|
2037
2083
|
init_utils2();
|
|
@@ -2085,10 +2131,10 @@ var init_object_coercer = __esm({
|
|
|
2085
2131
|
}
|
|
2086
2132
|
});
|
|
2087
2133
|
|
|
2088
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2134
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2089
2135
|
var EventCoercer;
|
|
2090
2136
|
var init_event_coercer = __esm({
|
|
2091
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2137
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2092
2138
|
init_utils();
|
|
2093
2139
|
init_utils2();
|
|
2094
2140
|
EventCoercer = class {
|
|
@@ -2108,10 +2154,10 @@ var init_event_coercer = __esm({
|
|
|
2108
2154
|
}
|
|
2109
2155
|
});
|
|
2110
2156
|
|
|
2111
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2157
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2112
2158
|
var PrimitiveCoercer;
|
|
2113
2159
|
var init_primitive_coercer = __esm({
|
|
2114
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2160
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2115
2161
|
init_utils();
|
|
2116
2162
|
PrimitiveCoercer = class {
|
|
2117
2163
|
match(candidate) {
|
|
@@ -2129,10 +2175,10 @@ var init_primitive_coercer = __esm({
|
|
|
2129
2175
|
}
|
|
2130
2176
|
});
|
|
2131
2177
|
|
|
2132
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2178
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2133
2179
|
var PromiseRejectionEventCoercer;
|
|
2134
2180
|
var init_promise_rejection_event = __esm({
|
|
2135
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2181
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2136
2182
|
init_utils();
|
|
2137
2183
|
PromiseRejectionEventCoercer = class {
|
|
2138
2184
|
match(err) {
|
|
@@ -2161,9 +2207,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2161
2207
|
}
|
|
2162
2208
|
});
|
|
2163
2209
|
|
|
2164
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2210
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2165
2211
|
var init_coercers = __esm({
|
|
2166
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2212
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2167
2213
|
init_dom_exception_coercer();
|
|
2168
2214
|
init_error_coercer();
|
|
2169
2215
|
init_error_event_coercer();
|
|
@@ -2175,10 +2221,10 @@ var init_coercers = __esm({
|
|
|
2175
2221
|
}
|
|
2176
2222
|
});
|
|
2177
2223
|
|
|
2178
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2224
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2179
2225
|
var ReduceableCache;
|
|
2180
2226
|
var init_utils3 = __esm({
|
|
2181
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2227
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2182
2228
|
ReduceableCache = class {
|
|
2183
2229
|
constructor(_maxSize) {
|
|
2184
2230
|
this._maxSize = _maxSize;
|
|
@@ -2204,7 +2250,7 @@ var init_utils3 = __esm({
|
|
|
2204
2250
|
}
|
|
2205
2251
|
});
|
|
2206
2252
|
|
|
2207
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2253
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2208
2254
|
var error_tracking_exports = {};
|
|
2209
2255
|
__export(error_tracking_exports, {
|
|
2210
2256
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2228,7 +2274,7 @@ __export(error_tracking_exports, {
|
|
|
2228
2274
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2229
2275
|
});
|
|
2230
2276
|
var init_error_tracking = __esm({
|
|
2231
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2277
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2232
2278
|
init_error_properties_builder();
|
|
2233
2279
|
init_parsers();
|
|
2234
2280
|
init_coercers();
|
|
@@ -2236,9 +2282,9 @@ var init_error_tracking = __esm({
|
|
|
2236
2282
|
}
|
|
2237
2283
|
});
|
|
2238
2284
|
|
|
2239
|
-
// ../../node_modules/.pnpm/@posthog+core@1.
|
|
2285
|
+
// ../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/index.mjs
|
|
2240
2286
|
var init_dist = __esm({
|
|
2241
|
-
"../../node_modules/.pnpm/@posthog+core@1.
|
|
2287
|
+
"../../node_modules/.pnpm/@posthog+core@1.14.0/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2242
2288
|
init_featureFlagUtils();
|
|
2243
2289
|
init_uuidv7();
|
|
2244
2290
|
init_utils();
|
|
@@ -2429,7 +2475,7 @@ function snipLine(line, colno) {
|
|
|
2429
2475
|
}
|
|
2430
2476
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2431
2477
|
var init_context_lines_node = __esm({
|
|
2432
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2478
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2433
2479
|
init_dist();
|
|
2434
2480
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2435
2481
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2439,7 +2485,7 @@ var init_context_lines_node = __esm({
|
|
|
2439
2485
|
}
|
|
2440
2486
|
});
|
|
2441
2487
|
|
|
2442
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2488
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2443
2489
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2444
2490
|
let calledFatalError = false;
|
|
2445
2491
|
return Object.assign((error) => {
|
|
@@ -2471,14 +2517,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2471
2517
|
}));
|
|
2472
2518
|
}
|
|
2473
2519
|
var init_autocapture = __esm({
|
|
2474
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2520
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2475
2521
|
}
|
|
2476
2522
|
});
|
|
2477
2523
|
|
|
2478
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2524
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2479
2525
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2480
2526
|
var init_error_tracking2 = __esm({
|
|
2481
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2527
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2482
2528
|
init_autocapture();
|
|
2483
2529
|
init_dist();
|
|
2484
2530
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2549,19 +2595,19 @@ var init_error_tracking2 = __esm({
|
|
|
2549
2595
|
}
|
|
2550
2596
|
});
|
|
2551
2597
|
|
|
2552
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2598
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/version.mjs
|
|
2553
2599
|
var version;
|
|
2554
2600
|
var init_version = __esm({
|
|
2555
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2556
|
-
version = "5.
|
|
2601
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/version.mjs"() {
|
|
2602
|
+
version = "5.24.2";
|
|
2557
2603
|
}
|
|
2558
2604
|
});
|
|
2559
2605
|
|
|
2560
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2561
|
-
var
|
|
2606
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/types.mjs
|
|
2607
|
+
var FeatureFlagError2;
|
|
2562
2608
|
var init_types3 = __esm({
|
|
2563
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2564
|
-
|
|
2609
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/types.mjs"() {
|
|
2610
|
+
FeatureFlagError2 = {
|
|
2565
2611
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2566
2612
|
FLAG_MISSING: "flag_missing",
|
|
2567
2613
|
QUOTA_LIMITED: "quota_limited",
|
|
@@ -2570,7 +2616,7 @@ var init_types3 = __esm({
|
|
|
2570
2616
|
}
|
|
2571
2617
|
});
|
|
2572
2618
|
|
|
2573
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2619
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2574
2620
|
async function hashSHA1(text) {
|
|
2575
2621
|
const subtle = globalThis.crypto?.subtle;
|
|
2576
2622
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2579,11 +2625,11 @@ async function hashSHA1(text) {
|
|
|
2579
2625
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2580
2626
|
}
|
|
2581
2627
|
var init_crypto = __esm({
|
|
2582
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2628
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2583
2629
|
}
|
|
2584
2630
|
});
|
|
2585
2631
|
|
|
2586
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2632
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2587
2633
|
async function _hash(key, distinctId, salt = "") {
|
|
2588
2634
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2589
2635
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2751,7 +2797,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2751
2797
|
}
|
|
2752
2798
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2753
2799
|
var init_feature_flags = __esm({
|
|
2754
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2800
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2755
2801
|
init_dist();
|
|
2756
2802
|
init_crypto();
|
|
2757
2803
|
SIXTY_SECONDS = 6e4;
|
|
@@ -3164,10 +3210,10 @@ var init_feature_flags = __esm({
|
|
|
3164
3210
|
}
|
|
3165
3211
|
});
|
|
3166
3212
|
|
|
3167
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3213
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3168
3214
|
var PostHogMemoryStorage;
|
|
3169
3215
|
var init_storage_memory = __esm({
|
|
3170
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3216
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3171
3217
|
PostHogMemoryStorage = class {
|
|
3172
3218
|
getProperty(key) {
|
|
3173
3219
|
return this._memoryStorage[key];
|
|
@@ -3182,10 +3228,10 @@ var init_storage_memory = __esm({
|
|
|
3182
3228
|
}
|
|
3183
3229
|
});
|
|
3184
3230
|
|
|
3185
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3231
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/client.mjs
|
|
3186
3232
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3187
3233
|
var init_client = __esm({
|
|
3188
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3234
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/client.mjs"() {
|
|
3189
3235
|
init_version();
|
|
3190
3236
|
init_dist();
|
|
3191
3237
|
init_types3();
|
|
@@ -3325,94 +3371,148 @@ var init_client = __esm({
|
|
|
3325
3371
|
});
|
|
3326
3372
|
});
|
|
3327
3373
|
}
|
|
3328
|
-
async
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3374
|
+
async _getFeatureFlagResult(key, distinctId, options = {}, matchValue) {
|
|
3375
|
+
const sendFeatureFlagEvents = options.sendFeatureFlagEvents ?? true;
|
|
3376
|
+
if (void 0 !== this._flagOverrides && key in this._flagOverrides) {
|
|
3377
|
+
const overrideValue = this._flagOverrides[key];
|
|
3378
|
+
if (void 0 === overrideValue) return;
|
|
3379
|
+
const overridePayload = this._payloadOverrides?.[key];
|
|
3380
|
+
return {
|
|
3381
|
+
key,
|
|
3382
|
+
enabled: false !== overrideValue,
|
|
3383
|
+
variant: "string" == typeof overrideValue ? overrideValue : void 0,
|
|
3384
|
+
payload: overridePayload
|
|
3385
|
+
};
|
|
3386
|
+
}
|
|
3387
|
+
const { groups, disableGeoip } = options;
|
|
3388
|
+
let { onlyEvaluateLocally, personProperties, groupProperties } = options;
|
|
3332
3389
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3333
3390
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3334
3391
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3335
3392
|
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3336
|
-
|
|
3337
|
-
let
|
|
3338
|
-
const flagWasLocallyEvaluated = void 0 !== response;
|
|
3393
|
+
let result;
|
|
3394
|
+
let flagWasLocallyEvaluated = false;
|
|
3339
3395
|
let requestId;
|
|
3340
3396
|
let evaluatedAt;
|
|
3341
|
-
let flagDetail;
|
|
3342
3397
|
let featureFlagError;
|
|
3398
|
+
let flagId;
|
|
3399
|
+
let flagVersion;
|
|
3400
|
+
let flagReason;
|
|
3401
|
+
const localEvaluationEnabled = void 0 !== this.featureFlagsPoller;
|
|
3402
|
+
if (localEvaluationEnabled) {
|
|
3403
|
+
await this.featureFlagsPoller?.loadFeatureFlags();
|
|
3404
|
+
const flag = this.featureFlagsPoller?.featureFlagsByKey[key];
|
|
3405
|
+
if (flag) try {
|
|
3406
|
+
const localResult = await this.featureFlagsPoller?.computeFlagAndPayloadLocally(flag, distinctId, groups, personProperties, groupProperties, matchValue);
|
|
3407
|
+
if (localResult) {
|
|
3408
|
+
flagWasLocallyEvaluated = true;
|
|
3409
|
+
const value = localResult.value;
|
|
3410
|
+
flagId = flag.id;
|
|
3411
|
+
flagReason = "Evaluated locally";
|
|
3412
|
+
result = {
|
|
3413
|
+
key,
|
|
3414
|
+
enabled: false !== value,
|
|
3415
|
+
variant: "string" == typeof value ? value : void 0,
|
|
3416
|
+
payload: localResult.payload ?? void 0
|
|
3417
|
+
};
|
|
3418
|
+
}
|
|
3419
|
+
} catch (e) {
|
|
3420
|
+
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${key}: ${e.message}`);
|
|
3421
|
+
else throw e;
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3343
3424
|
if (!flagWasLocallyEvaluated && !onlyEvaluateLocally) {
|
|
3344
3425
|
const flagsResponse = await super.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
|
|
3345
3426
|
key
|
|
3346
3427
|
]);
|
|
3347
|
-
if (void 0 === flagsResponse) featureFlagError =
|
|
3428
|
+
if (void 0 === flagsResponse) featureFlagError = FeatureFlagError2.UNKNOWN_ERROR;
|
|
3348
3429
|
else {
|
|
3349
3430
|
requestId = flagsResponse.requestId;
|
|
3350
3431
|
evaluatedAt = flagsResponse.evaluatedAt;
|
|
3351
3432
|
const errors = [];
|
|
3352
|
-
if (flagsResponse.errorsWhileComputingFlags) errors.push(
|
|
3353
|
-
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(
|
|
3354
|
-
flagDetail = flagsResponse.flags[key];
|
|
3355
|
-
if (void 0 === flagDetail) errors.push(
|
|
3433
|
+
if (flagsResponse.errorsWhileComputingFlags) errors.push(FeatureFlagError2.ERRORS_WHILE_COMPUTING);
|
|
3434
|
+
if (flagsResponse.quotaLimited?.includes("feature_flags")) errors.push(FeatureFlagError2.QUOTA_LIMITED);
|
|
3435
|
+
const flagDetail = flagsResponse.flags[key];
|
|
3436
|
+
if (void 0 === flagDetail) errors.push(FeatureFlagError2.FLAG_MISSING);
|
|
3437
|
+
else {
|
|
3438
|
+
flagId = flagDetail.metadata?.id;
|
|
3439
|
+
flagVersion = flagDetail.metadata?.version;
|
|
3440
|
+
flagReason = flagDetail.reason?.description ?? flagDetail.reason?.code;
|
|
3441
|
+
let parsedPayload;
|
|
3442
|
+
if (flagDetail.metadata?.payload !== void 0) try {
|
|
3443
|
+
parsedPayload = JSON.parse(flagDetail.metadata.payload);
|
|
3444
|
+
} catch {
|
|
3445
|
+
parsedPayload = flagDetail.metadata.payload;
|
|
3446
|
+
}
|
|
3447
|
+
result = {
|
|
3448
|
+
key,
|
|
3449
|
+
enabled: flagDetail.enabled,
|
|
3450
|
+
variant: flagDetail.variant,
|
|
3451
|
+
payload: parsedPayload
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3356
3454
|
if (errors.length > 0) featureFlagError = errors.join(",");
|
|
3357
|
-
response = getFeatureFlagValue(flagDetail);
|
|
3358
3455
|
}
|
|
3359
3456
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
if (
|
|
3364
|
-
|
|
3365
|
-
featureFlagReportedKey
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3457
|
+
if (sendFeatureFlagEvents) {
|
|
3458
|
+
const response = void 0 === result ? void 0 : false === result.enabled ? false : result.variant ?? true;
|
|
3459
|
+
const featureFlagReportedKey = `${key}_${response}`;
|
|
3460
|
+
if (!(distinctId in this.distinctIdHasSentFlagCalls) || !this.distinctIdHasSentFlagCalls[distinctId].includes(featureFlagReportedKey)) {
|
|
3461
|
+
if (Object.keys(this.distinctIdHasSentFlagCalls).length >= this.maxCacheSize) this.distinctIdHasSentFlagCalls = {};
|
|
3462
|
+
if (Array.isArray(this.distinctIdHasSentFlagCalls[distinctId])) this.distinctIdHasSentFlagCalls[distinctId].push(featureFlagReportedKey);
|
|
3463
|
+
else this.distinctIdHasSentFlagCalls[distinctId] = [
|
|
3464
|
+
featureFlagReportedKey
|
|
3465
|
+
];
|
|
3466
|
+
const properties = {
|
|
3467
|
+
$feature_flag: key,
|
|
3468
|
+
$feature_flag_response: response,
|
|
3469
|
+
$feature_flag_id: flagId,
|
|
3470
|
+
$feature_flag_version: flagVersion,
|
|
3471
|
+
$feature_flag_reason: flagReason,
|
|
3472
|
+
locally_evaluated: flagWasLocallyEvaluated,
|
|
3473
|
+
[`$feature/${key}`]: response,
|
|
3474
|
+
$feature_flag_request_id: requestId,
|
|
3475
|
+
$feature_flag_evaluated_at: evaluatedAt
|
|
3476
|
+
};
|
|
3477
|
+
if (featureFlagError) properties.$feature_flag_error = featureFlagError;
|
|
3478
|
+
this.capture({
|
|
3479
|
+
distinctId,
|
|
3480
|
+
event: "$feature_flag_called",
|
|
3481
|
+
properties,
|
|
3482
|
+
groups,
|
|
3483
|
+
disableGeoip
|
|
3484
|
+
});
|
|
3485
|
+
}
|
|
3386
3486
|
}
|
|
3387
|
-
|
|
3487
|
+
if (void 0 !== result && void 0 !== this._payloadOverrides && key in this._payloadOverrides) result = {
|
|
3488
|
+
...result,
|
|
3489
|
+
payload: this._payloadOverrides[key]
|
|
3490
|
+
};
|
|
3491
|
+
return result;
|
|
3492
|
+
}
|
|
3493
|
+
async getFeatureFlag(key, distinctId, options) {
|
|
3494
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3495
|
+
...options,
|
|
3496
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3497
|
+
});
|
|
3498
|
+
if (void 0 === result) return;
|
|
3499
|
+
if (false === result.enabled) return false;
|
|
3500
|
+
return result.variant ?? true;
|
|
3388
3501
|
}
|
|
3389
3502
|
async getFeatureFlagPayload(key, distinctId, matchValue, options) {
|
|
3390
3503
|
if (void 0 !== this._payloadOverrides && key in this._payloadOverrides) return this._payloadOverrides[key];
|
|
3391
|
-
const
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
if (result) {
|
|
3404
|
-
matchValue = result.value;
|
|
3405
|
-
response = result.payload;
|
|
3406
|
-
}
|
|
3407
|
-
} catch (e) {
|
|
3408
|
-
if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) this._logger?.info(`${e.name} when computing flag locally: ${flag.key}: ${e.message}`);
|
|
3409
|
-
else throw e;
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3413
|
-
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3414
|
-
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3415
|
-
return response;
|
|
3504
|
+
const result = await this._getFeatureFlagResult(key, distinctId, {
|
|
3505
|
+
...options,
|
|
3506
|
+
sendFeatureFlagEvents: false
|
|
3507
|
+
}, matchValue);
|
|
3508
|
+
if (void 0 === result) return;
|
|
3509
|
+
return result.payload ?? null;
|
|
3510
|
+
}
|
|
3511
|
+
async getFeatureFlagResult(key, distinctId, options) {
|
|
3512
|
+
return this._getFeatureFlagResult(key, distinctId, {
|
|
3513
|
+
...options,
|
|
3514
|
+
sendFeatureFlagEvents: options?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
|
|
3515
|
+
});
|
|
3416
3516
|
}
|
|
3417
3517
|
async getRemoteConfigPayload(flagKey) {
|
|
3418
3518
|
if (!this.options.personalApiKey) throw new Error("Personal API key is required for remote config payload decryption");
|
|
@@ -3739,7 +3839,7 @@ var init_client = __esm({
|
|
|
3739
3839
|
});
|
|
3740
3840
|
var PostHogContext;
|
|
3741
3841
|
var init_context = __esm({
|
|
3742
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3842
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3743
3843
|
PostHogContext = class {
|
|
3744
3844
|
constructor() {
|
|
3745
3845
|
this.storage = new async_hooks.AsyncLocalStorage();
|
|
@@ -3767,7 +3867,7 @@ var init_context = __esm({
|
|
|
3767
3867
|
}
|
|
3768
3868
|
});
|
|
3769
3869
|
|
|
3770
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3870
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3771
3871
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3772
3872
|
"error"
|
|
3773
3873
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3823,7 +3923,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3823
3923
|
}
|
|
3824
3924
|
var NAME, PostHogSentryIntegration;
|
|
3825
3925
|
var init_sentry_integration = __esm({
|
|
3826
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3926
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3827
3927
|
NAME = "posthog-node";
|
|
3828
3928
|
PostHogSentryIntegration = class {
|
|
3829
3929
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3845,7 +3945,7 @@ var init_sentry_integration = __esm({
|
|
|
3845
3945
|
}
|
|
3846
3946
|
});
|
|
3847
3947
|
|
|
3848
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3948
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3849
3949
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3850
3950
|
app.use(posthogErrorHandler(_posthog));
|
|
3851
3951
|
}
|
|
@@ -3877,21 +3977,22 @@ function posthogErrorHandler(posthog) {
|
|
|
3877
3977
|
};
|
|
3878
3978
|
}
|
|
3879
3979
|
var init_express = __esm({
|
|
3880
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3980
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3881
3981
|
init_error_tracking2();
|
|
3882
3982
|
}
|
|
3883
3983
|
});
|
|
3884
3984
|
|
|
3885
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3985
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/exports.mjs
|
|
3886
3986
|
var init_exports = __esm({
|
|
3887
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3987
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3988
|
+
init_dist();
|
|
3888
3989
|
init_sentry_integration();
|
|
3889
3990
|
init_express();
|
|
3890
3991
|
init_types3();
|
|
3891
3992
|
}
|
|
3892
3993
|
});
|
|
3893
3994
|
|
|
3894
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3995
|
+
// ../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3895
3996
|
var index_node_exports = {};
|
|
3896
3997
|
__export(index_node_exports, {
|
|
3897
3998
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3903,7 +4004,7 @@ __export(index_node_exports, {
|
|
|
3903
4004
|
});
|
|
3904
4005
|
var PostHog;
|
|
3905
4006
|
var init_index_node = __esm({
|
|
3906
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
4007
|
+
"../../node_modules/.pnpm/posthog-node@5.24.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3907
4008
|
init_module_node();
|
|
3908
4009
|
init_context_lines_node();
|
|
3909
4010
|
init_error_tracking2();
|
|
@@ -13977,10 +14078,10 @@ var init_esm4 = __esm({
|
|
|
13977
14078
|
}
|
|
13978
14079
|
});
|
|
13979
14080
|
|
|
13980
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14081
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js
|
|
13981
14082
|
var IdentifyOperation, SpecialEventType;
|
|
13982
14083
|
var init_event = __esm({
|
|
13983
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14084
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js"() {
|
|
13984
14085
|
(function(IdentifyOperation3) {
|
|
13985
14086
|
IdentifyOperation3["SET"] = "$set";
|
|
13986
14087
|
IdentifyOperation3["SET_ONCE"] = "$setOnce";
|
|
@@ -14001,10 +14102,10 @@ var init_event = __esm({
|
|
|
14001
14102
|
}
|
|
14002
14103
|
});
|
|
14003
14104
|
|
|
14004
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14105
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js
|
|
14005
14106
|
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;
|
|
14006
14107
|
var init_constants = __esm({
|
|
14007
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14108
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js"() {
|
|
14008
14109
|
UNSET_VALUE = "-";
|
|
14009
14110
|
AMPLITUDE_PREFIX = "AMP";
|
|
14010
14111
|
STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_unsent");
|
|
@@ -14016,10 +14117,10 @@ var init_constants = __esm({
|
|
|
14016
14117
|
}
|
|
14017
14118
|
});
|
|
14018
14119
|
|
|
14019
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14120
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js
|
|
14020
14121
|
var MAX_PROPERTY_KEYS, isValidObject, isValidProperties;
|
|
14021
14122
|
var init_valid_properties = __esm({
|
|
14022
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14123
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js"() {
|
|
14023
14124
|
init_tslib_es6();
|
|
14024
14125
|
MAX_PROPERTY_KEYS = 1e3;
|
|
14025
14126
|
isValidObject = function(properties) {
|
|
@@ -14074,10 +14175,10 @@ var init_valid_properties = __esm({
|
|
|
14074
14175
|
}
|
|
14075
14176
|
});
|
|
14076
14177
|
|
|
14077
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14178
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js
|
|
14078
14179
|
var Identify, IdentifyOperation2, OrderedIdentifyOperations;
|
|
14079
14180
|
var init_identify = __esm({
|
|
14080
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14181
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/identify.js"() {
|
|
14081
14182
|
init_tslib_es6();
|
|
14082
14183
|
init_constants();
|
|
14083
14184
|
init_valid_properties();
|
|
@@ -14188,10 +14289,10 @@ var init_identify = __esm({
|
|
|
14188
14289
|
}
|
|
14189
14290
|
});
|
|
14190
14291
|
|
|
14191
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14292
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js
|
|
14192
14293
|
var SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, MAX_RETRIES_EXCEEDED_MESSAGE, OPT_OUT_MESSAGE, MISSING_API_KEY_MESSAGE, INVALID_API_KEY, CLIENT_NOT_INITIALIZED;
|
|
14193
14294
|
var init_messages = __esm({
|
|
14194
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14295
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/messages.js"() {
|
|
14195
14296
|
SUCCESS_MESSAGE = "Event tracked successfully";
|
|
14196
14297
|
UNEXPECTED_ERROR_MESSAGE = "Unexpected error occurred";
|
|
14197
14298
|
MAX_RETRIES_EXCEEDED_MESSAGE = "Event rejected due to exceeded retry count";
|
|
@@ -14202,10 +14303,10 @@ var init_messages = __esm({
|
|
|
14202
14303
|
}
|
|
14203
14304
|
});
|
|
14204
14305
|
|
|
14205
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14306
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js
|
|
14206
14307
|
var Status;
|
|
14207
14308
|
var init_status = __esm({
|
|
14208
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14309
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/status.js"() {
|
|
14209
14310
|
(function(Status2) {
|
|
14210
14311
|
Status2["Unknown"] = "unknown";
|
|
14211
14312
|
Status2["Skipped"] = "skipped";
|
|
@@ -14220,10 +14321,10 @@ var init_status = __esm({
|
|
|
14220
14321
|
}
|
|
14221
14322
|
});
|
|
14222
14323
|
|
|
14223
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14324
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js
|
|
14224
14325
|
var buildResult;
|
|
14225
14326
|
var init_result_builder = __esm({
|
|
14226
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14327
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js"() {
|
|
14227
14328
|
init_status();
|
|
14228
14329
|
buildResult = function(event, code, message2) {
|
|
14229
14330
|
if (code === void 0) {
|
|
@@ -14237,10 +14338,10 @@ var init_result_builder = __esm({
|
|
|
14237
14338
|
}
|
|
14238
14339
|
});
|
|
14239
14340
|
|
|
14240
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14341
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js
|
|
14241
14342
|
var getGlobalScope;
|
|
14242
14343
|
var init_global_scope = __esm({
|
|
14243
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14344
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js"() {
|
|
14244
14345
|
getGlobalScope = function() {
|
|
14245
14346
|
var ampIntegrationContextName = "ampIntegrationContext";
|
|
14246
14347
|
if (typeof globalThis !== "undefined" && typeof globalThis[ampIntegrationContextName] !== "undefined") {
|
|
@@ -14263,10 +14364,10 @@ var init_global_scope = __esm({
|
|
|
14263
14364
|
}
|
|
14264
14365
|
});
|
|
14265
14366
|
|
|
14266
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14367
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js
|
|
14267
14368
|
var legacyUUID, hex, UUID2;
|
|
14268
14369
|
var init_uuid2 = __esm({
|
|
14269
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14370
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js"() {
|
|
14270
14371
|
init_tslib_es6();
|
|
14271
14372
|
init_global_scope();
|
|
14272
14373
|
legacyUUID = function(a) {
|
|
@@ -14310,10 +14411,10 @@ var init_uuid2 = __esm({
|
|
|
14310
14411
|
}
|
|
14311
14412
|
});
|
|
14312
14413
|
|
|
14313
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14414
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js
|
|
14314
14415
|
var Timeline;
|
|
14315
14416
|
var init_timeline = __esm({
|
|
14316
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14417
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/timeline.js"() {
|
|
14317
14418
|
init_tslib_es6();
|
|
14318
14419
|
init_result_builder();
|
|
14319
14420
|
init_uuid2();
|
|
@@ -14615,10 +14716,10 @@ var init_timeline = __esm({
|
|
|
14615
14716
|
}
|
|
14616
14717
|
});
|
|
14617
14718
|
|
|
14618
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14719
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js
|
|
14619
14720
|
var createTrackEvent, createIdentifyEvent, createGroupIdentifyEvent, createGroupEvent, createRevenueEvent;
|
|
14620
14721
|
var init_event_builder = __esm({
|
|
14621
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14722
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js"() {
|
|
14622
14723
|
init_tslib_es6();
|
|
14623
14724
|
init_identify();
|
|
14624
14725
|
init_event();
|
|
@@ -14648,10 +14749,10 @@ var init_event_builder = __esm({
|
|
|
14648
14749
|
}
|
|
14649
14750
|
});
|
|
14650
14751
|
|
|
14651
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14752
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js
|
|
14652
14753
|
var returnWrapper;
|
|
14653
14754
|
var init_return_wrapper = __esm({
|
|
14654
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14755
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js"() {
|
|
14655
14756
|
returnWrapper = function(awaitable) {
|
|
14656
14757
|
return {
|
|
14657
14758
|
promise: awaitable || Promise.resolve()
|
|
@@ -14660,10 +14761,10 @@ var init_return_wrapper = __esm({
|
|
|
14660
14761
|
}
|
|
14661
14762
|
});
|
|
14662
14763
|
|
|
14663
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14764
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js
|
|
14664
14765
|
var AmplitudeCore;
|
|
14665
14766
|
var init_core_client = __esm({
|
|
14666
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
14767
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/core-client.js"() {
|
|
14667
14768
|
init_tslib_es6();
|
|
14668
14769
|
init_event();
|
|
14669
14770
|
init_identify();
|
|
@@ -14931,10 +15032,10 @@ var init_core_client = __esm({
|
|
|
14931
15032
|
}
|
|
14932
15033
|
});
|
|
14933
15034
|
|
|
14934
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15035
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js
|
|
14935
15036
|
var Revenue, RevenueProperty;
|
|
14936
15037
|
var init_revenue = __esm({
|
|
14937
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15038
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/revenue.js"() {
|
|
14938
15039
|
init_tslib_es6();
|
|
14939
15040
|
init_valid_properties();
|
|
14940
15041
|
Revenue = /** @class */
|
|
@@ -15011,10 +15112,10 @@ var init_revenue = __esm({
|
|
|
15011
15112
|
}
|
|
15012
15113
|
});
|
|
15013
15114
|
|
|
15014
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15115
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js
|
|
15015
15116
|
var chunk;
|
|
15016
15117
|
var init_chunk = __esm({
|
|
15017
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15118
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js"() {
|
|
15018
15119
|
chunk = function(arr, size) {
|
|
15019
15120
|
var chunkSize = Math.max(size, 1);
|
|
15020
15121
|
return arr.reduce(function(chunks, element, index) {
|
|
@@ -15029,10 +15130,10 @@ var init_chunk = __esm({
|
|
|
15029
15130
|
}
|
|
15030
15131
|
});
|
|
15031
15132
|
|
|
15032
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15133
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js
|
|
15033
15134
|
var LogLevel;
|
|
15034
15135
|
var init_loglevel = __esm({
|
|
15035
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15136
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js"() {
|
|
15036
15137
|
(function(LogLevel2) {
|
|
15037
15138
|
LogLevel2[LogLevel2["None"] = 0] = "None";
|
|
15038
15139
|
LogLevel2[LogLevel2["Error"] = 1] = "Error";
|
|
@@ -15043,10 +15144,10 @@ var init_loglevel = __esm({
|
|
|
15043
15144
|
}
|
|
15044
15145
|
});
|
|
15045
15146
|
|
|
15046
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15147
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js
|
|
15047
15148
|
var PREFIX, Logger;
|
|
15048
15149
|
var init_logger3 = __esm({
|
|
15049
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15150
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/logger.js"() {
|
|
15050
15151
|
init_loglevel();
|
|
15051
15152
|
PREFIX = "Amplitude Logger ";
|
|
15052
15153
|
Logger = /** @class */
|
|
@@ -15108,10 +15209,10 @@ var init_logger3 = __esm({
|
|
|
15108
15209
|
}
|
|
15109
15210
|
});
|
|
15110
15211
|
|
|
15111
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15212
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/config.js
|
|
15112
15213
|
var getDefaultConfig, Config, getServerUrl, createServerConfig, RequestMetadata;
|
|
15113
15214
|
var init_config = __esm({
|
|
15114
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15215
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/config.js"() {
|
|
15115
15216
|
init_constants();
|
|
15116
15217
|
init_logger3();
|
|
15117
15218
|
init_loglevel();
|
|
@@ -15212,19 +15313,19 @@ var init_config = __esm({
|
|
|
15212
15313
|
}
|
|
15213
15314
|
});
|
|
15214
15315
|
|
|
15215
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15316
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js
|
|
15216
15317
|
function isSuccessStatusCode(code) {
|
|
15217
15318
|
return code >= 200 && code < 300;
|
|
15218
15319
|
}
|
|
15219
15320
|
var init_status_code = __esm({
|
|
15220
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15321
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js"() {
|
|
15221
15322
|
}
|
|
15222
15323
|
});
|
|
15223
15324
|
|
|
15224
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15325
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js
|
|
15225
15326
|
var getStacktrace, getClientLogConfig, getValueByStringPath, getClientStates, debugWrapper;
|
|
15226
15327
|
var init_debug = __esm({
|
|
15227
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15328
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js"() {
|
|
15228
15329
|
init_tslib_es6();
|
|
15229
15330
|
init_loglevel();
|
|
15230
15331
|
getStacktrace = function(ignoreDepth) {
|
|
@@ -15342,7 +15443,7 @@ var init_debug = __esm({
|
|
|
15342
15443
|
}
|
|
15343
15444
|
});
|
|
15344
15445
|
|
|
15345
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15446
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js
|
|
15346
15447
|
function getErrorMessage(error) {
|
|
15347
15448
|
if (error instanceof Error)
|
|
15348
15449
|
return error.message;
|
|
@@ -15360,7 +15461,7 @@ function getResponseBodyString(res) {
|
|
|
15360
15461
|
}
|
|
15361
15462
|
var Destination;
|
|
15362
15463
|
var init_destination = __esm({
|
|
15363
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15464
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js"() {
|
|
15364
15465
|
init_tslib_es6();
|
|
15365
15466
|
init_status();
|
|
15366
15467
|
init_messages();
|
|
@@ -15751,10 +15852,10 @@ var init_destination = __esm({
|
|
|
15751
15852
|
}
|
|
15752
15853
|
});
|
|
15753
15854
|
|
|
15754
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15855
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js
|
|
15755
15856
|
var BaseTransport;
|
|
15756
15857
|
var init_base2 = __esm({
|
|
15757
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15858
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js"() {
|
|
15758
15859
|
init_status();
|
|
15759
15860
|
init_status_code();
|
|
15760
15861
|
BaseTransport = /** @class */
|
|
@@ -15856,10 +15957,10 @@ var init_base2 = __esm({
|
|
|
15856
15957
|
}
|
|
15857
15958
|
});
|
|
15858
15959
|
|
|
15859
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15960
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js
|
|
15860
15961
|
var ServerZone;
|
|
15861
15962
|
var init_server_zone = __esm({
|
|
15862
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15963
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js"() {
|
|
15863
15964
|
(function(ServerZone2) {
|
|
15864
15965
|
ServerZone2["US"] = "US";
|
|
15865
15966
|
ServerZone2["EU"] = "EU";
|
|
@@ -15868,17 +15969,17 @@ var init_server_zone = __esm({
|
|
|
15868
15969
|
}
|
|
15869
15970
|
});
|
|
15870
15971
|
|
|
15871
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15972
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js
|
|
15872
15973
|
var OfflineDisabled;
|
|
15873
15974
|
var init_offline = __esm({
|
|
15874
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15975
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js"() {
|
|
15875
15976
|
OfflineDisabled = null;
|
|
15876
15977
|
}
|
|
15877
15978
|
});
|
|
15878
15979
|
|
|
15879
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15980
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/index.js
|
|
15880
15981
|
var init_esm5 = __esm({
|
|
15881
|
-
"../../node_modules/.pnpm/@amplitude+analytics-core@2.
|
|
15982
|
+
"../../node_modules/.pnpm/@amplitude+analytics-core@2.37.0/node_modules/@amplitude/analytics-core/lib/esm/index.js"() {
|
|
15882
15983
|
init_core_client();
|
|
15883
15984
|
init_identify();
|
|
15884
15985
|
init_revenue();
|
|
@@ -15895,18 +15996,18 @@ var init_esm5 = __esm({
|
|
|
15895
15996
|
}
|
|
15896
15997
|
});
|
|
15897
15998
|
|
|
15898
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15999
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/version.js
|
|
15899
16000
|
var VERSION;
|
|
15900
16001
|
var init_version3 = __esm({
|
|
15901
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
15902
|
-
VERSION = "1.5.
|
|
16002
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/version.js"() {
|
|
16003
|
+
VERSION = "1.5.34";
|
|
15903
16004
|
}
|
|
15904
16005
|
});
|
|
15905
16006
|
|
|
15906
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16007
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js
|
|
15907
16008
|
var Context2;
|
|
15908
16009
|
var init_context4 = __esm({
|
|
15909
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16010
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js"() {
|
|
15910
16011
|
init_tslib_es6();
|
|
15911
16012
|
init_esm5();
|
|
15912
16013
|
init_version3();
|
|
@@ -15941,7 +16042,7 @@ var init_context4 = __esm({
|
|
|
15941
16042
|
});
|
|
15942
16043
|
var Http;
|
|
15943
16044
|
var init_http = __esm({
|
|
15944
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16045
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/transports/http.js"() {
|
|
15945
16046
|
init_tslib_es6();
|
|
15946
16047
|
init_esm5();
|
|
15947
16048
|
Http = /** @class */
|
|
@@ -16003,10 +16104,10 @@ var init_http = __esm({
|
|
|
16003
16104
|
}
|
|
16004
16105
|
});
|
|
16005
16106
|
|
|
16006
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16107
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/config.js
|
|
16007
16108
|
var NodeConfig, useNodeConfig;
|
|
16008
16109
|
var init_config2 = __esm({
|
|
16009
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16110
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/config.js"() {
|
|
16010
16111
|
init_tslib_es6();
|
|
16011
16112
|
init_esm5();
|
|
16012
16113
|
init_http();
|
|
@@ -16024,10 +16125,10 @@ var init_config2 = __esm({
|
|
|
16024
16125
|
}
|
|
16025
16126
|
});
|
|
16026
16127
|
|
|
16027
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16128
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/node-client.js
|
|
16028
16129
|
var AmplitudeNode, createInstance, node_client_default;
|
|
16029
16130
|
var init_node_client = __esm({
|
|
16030
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16131
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/node-client.js"() {
|
|
16031
16132
|
init_tslib_es6();
|
|
16032
16133
|
init_esm5();
|
|
16033
16134
|
init_context4();
|
|
@@ -16101,7 +16202,7 @@ var init_node_client = __esm({
|
|
|
16101
16202
|
}
|
|
16102
16203
|
});
|
|
16103
16204
|
|
|
16104
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16205
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/types.js
|
|
16105
16206
|
var types_exports = {};
|
|
16106
16207
|
__export(types_exports, {
|
|
16107
16208
|
IdentifyOperation: () => IdentifyOperation,
|
|
@@ -16112,12 +16213,12 @@ __export(types_exports, {
|
|
|
16112
16213
|
SpecialEventType: () => SpecialEventType
|
|
16113
16214
|
});
|
|
16114
16215
|
var init_types4 = __esm({
|
|
16115
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16216
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/types.js"() {
|
|
16116
16217
|
init_esm5();
|
|
16117
16218
|
}
|
|
16118
16219
|
});
|
|
16119
16220
|
|
|
16120
|
-
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16221
|
+
// ../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/index.js
|
|
16121
16222
|
var esm_exports2 = {};
|
|
16122
16223
|
__export(esm_exports2, {
|
|
16123
16224
|
Identify: () => Identify,
|
|
@@ -16138,7 +16239,7 @@ __export(esm_exports2, {
|
|
|
16138
16239
|
});
|
|
16139
16240
|
var add, groupIdentify, identify, init, logEvent, remove, revenue, setGroup, setOptOut, track, flush;
|
|
16140
16241
|
var init_esm6 = __esm({
|
|
16141
|
-
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.
|
|
16242
|
+
"../../node_modules/.pnpm/@amplitude+analytics-node@1.5.34/node_modules/@amplitude/analytics-node/lib/esm/index.js"() {
|
|
16142
16243
|
init_node_client();
|
|
16143
16244
|
init_node_client();
|
|
16144
16245
|
init_esm5();
|