decord/source/modules/premium/UserTrialActionCreators.android.tsx

105 lines
3.2 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 7735
// Function ID: 7736
// Dependencies: [5, 7061, 676, 530, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 7735
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "createFromServer" /* 7061 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-15 05:55:55 +00:00
({ Endpoints: c5, PaymentGateways: closure_6 } = ME);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/premium/UserTrialActionCreators.android.tsx");
2026-07-23 10:11:24 +00:00
export default {
2026-07-29 08:29:29 +00:00
acknowledgeUserTrialOffer(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
return callback(function*() {
2026-08-15 05:55:55 +00:00
if (c5 === 2) {
c5 = 3;
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-25 06:04:03 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
2026-08-15 05:55:55 +00:00
c5 = 2;
2026-07-29 08:29:29 +00:00
if (0 === c4) {
if (arg0 === 1) {
2026-08-15 05:55:55 +00:00
c5 = 3;
2026-07-29 08:29:29 +00:00
throw arg1;
} else if (arg0 === 2) {
2026-08-15 05:55:55 +00:00
c5 = 3;
2026-07-29 08:29:29 +00:00
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_1 = tmp3;
2026-07-29 08:29:29 +00:00
let body = tmp7;
body = undefined;
2026-08-24 06:08:38 +00:00
if (null == closure_1_0.expiresAt) {
c3 = 1;
const HTTP = closure_1_0(closure_1_2[3]).HTTP;
obj1 = { url: null, body: null, rejectWithError: null };
2026-08-15 05:55:55 +00:00
obj1[0] = c5.USER_TRIAL_OFFER_ACKNOWLEDGED(tmp39.id);
2026-07-29 08:29:29 +00:00
const obj2 = { payment_gateway: null };
2026-08-24 06:08:38 +00:00
obj2[0] = closure_1_6.GOOGLE;
2026-07-29 08:29:29 +00:00
obj1[1] = obj2;
2026-08-24 06:08:38 +00:00
obj1[2] = closure_1_0(closure_1_2[3]).rejectWithMigratedError();
2026-07-29 08:29:29 +00:00
c4 = 2;
2026-08-15 05:55:55 +00:00
c5 = 1;
2026-07-29 08:29:29 +00:00
let obj3 = { value: null, done: false };
obj3[0] = HTTP.post(obj1);
return obj3;
}
}
} else {
if (1 === tmp7) {
c3 = 0;
if (404 === status.status) {
2026-08-24 06:08:38 +00:00
obj3 = closure_1_1(closure_1_2[4]);
2026-07-29 08:29:29 +00:00
obj3.dispatch({ type: "BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS", userTrialOffer: null });
}
} else if (arg0 === 1) {
2026-08-15 05:55:55 +00:00
c5 = 3;
2026-07-29 08:29:29 +00:00
throw arg1;
} else if (arg0 !== 2) {
body = arg1.body;
2026-08-24 06:08:38 +00:00
obj = closure_1_1(closure_1_2[4]);
2026-08-15 05:55:55 +00:00
let fromServer = null;
if (null != body) {
fromServer = c4.createFromServer(body);
}
2026-07-29 08:29:29 +00:00
const obj4 = { type: "BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS", userTrialOffer: null };
2026-08-15 05:55:55 +00:00
obj4[1] = fromServer;
2026-07-29 08:29:29 +00:00
obj.dispatch(obj4);
c3 = 0;
}
c3 = 0;
2026-08-15 05:55:55 +00:00
c5 = 3;
2026-07-29 08:29:29 +00:00
const obj5 = { value: null, done: true };
obj5[0] = arg1;
return obj5;
}
2026-08-15 05:55:55 +00:00
c5 = 3;
} catch (tmp30) {
status = tmp30;
2026-07-29 08:29:29 +00:00
if (tmp4 === c3) {
2026-08-15 05:55:55 +00:00
c5 = tmp2;
throw tmp30;
2026-07-29 08:29:29 +00:00
} else {
c4 = tmp;
}
}
2026-07-20 16:05:17 +00:00
}
})();
}
};