decord/source/931_growthbookIntegration.js

50 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 931
// Function ID: 932
2026-07-20 16:05:17 +00:00
// Name: growthbookIntegration
2026-07-29 08:29:29 +00:00
// Dependencies: [887, 822, 930]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 931 (growthbookIntegration)
2026-08-24 06:08:38 +00:00
import setupIntegration from "setupIntegration" /* 887 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function _wrapAndCaptureBooleanResult(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return function() {
2026-07-29 08:29:29 +00:00
const items = [...arguments];
const first = items[0];
const applyResult = callback.apply(this, items);
2026-08-04 21:03:28 +00:00
let tmp3 = typeof first === "string";
if (typeof first === "string") {
tmp3 = typeof applyResult === "boolean";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-24 06:08:38 +00:00
const result = callback(closure_1_1[2])._INTERNAL_insertFlagToScope(first, applyResult);
const obj = callback(closure_1_1[2]);
const result1 = callback(closure_1_1[2])._INTERNAL_addFeatureFlagToActiveSpan(first, applyResult);
const obj2 = callback(closure_1_1[2]);
2026-07-20 16:05:17 +00:00
}
return applyResult;
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
export const growthbookIntegration = setupIntegration.defineIntegration((growthbookClass) => {
growthbookClass = growthbookClass.growthbookClass;
2026-07-20 16:05:17 +00:00
return {
name: "GrowthBook",
setupOnce() {
const prototype = growthbookClass.prototype;
2026-08-04 21:03:28 +00:00
if (typeof prototype.isOn === "function") {
2026-08-24 06:08:38 +00:00
growthbookClass(closure_1_1[1]).fill(prototype, "isOn", closure_1_2);
const obj = growthbookClass(closure_1_1[1]);
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
if (typeof prototype.getFeatureValue === "function") {
2026-08-24 06:08:38 +00:00
growthbookClass(closure_1_1[1]).fill(prototype, "getFeatureValue", closure_1_2);
const obj2 = growthbookClass(closure_1_1[1]);
2026-07-20 16:05:17 +00:00
}
},
processEvent(contexts) {
2026-07-29 08:29:29 +00:00
return growthbookClass(table[2])._INTERNAL_copyFlagsFromScopeToEvent(contexts);
2026-07-20 16:05:17 +00:00
}
};
});