decord/beta/source/modules/frames/native/useInlineFrameOAuthNavigation.tsx
github-actions 6fbb1b046c chore: update source for beta 347.8
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-22 14:21:44 +00:00

122 lines
4.1 KiB
TypeScript

// Module ID: 16977
// Function ID: 16978
// Name: useInlineFrameOAuthNavigation
// Dependencies: [5, 19, 9311, 9312, 1078, 9318, 4961, 9324, 1984, 1114, 2]
// Exports: default
// Module 16977 (useInlineFrameOAuthNavigation)
import ComponentDispatchUtils from "ComponentDispatchUtils" /* 1114 */;
import ModalActionCreatorsDefault from "ModalActionCreators" /* 4961 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import noop from "module_19" /* 19 */;
import FramesStore from "FramesStore" /* 9311 */;
require = fn;
const isLaunched = fn(9312).isLaunched;
const ComponentActions = fn(1078).ComponentActions;
let closure_8 = fn(9318).OAUTH2_AUTHORIZE_MODAL_KEY;
const size = fn(2);
const result = size.fileFinishedImporting("modules/frames/native/useInlineFrameOAuthNavigation.tsx");
export default function useInlineFrameOAuthNavigation(arg0) {
closure_0 = arg0;
const items = [arg0];
const effect = noop.useEffect(() => {
function dismissOAuthModal() {
if (c1) {
ModalActionCreatorsDefault.popWithKey(closure_8);
c1 = false;
}
}
function showOAuth2Modal() {
const self = this;
const apply = closure_4.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
closure_4 = async function _showOAuth2Modal(arg0) {
let clientId = arg0;
c2 = 0;
c3 = 0;
return (async (arg0, value) => {
if (c3 === 2) {
c3 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj4 = { value, done: true };
return obj4;
} else {
return { value: "IconComponent", done: null };
}
} else {
try {
c3 = 2;
if (0 === c2) {
if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 3;
const obj5 = { value, done: true };
return obj5;
} else {
closure_1 = tmp2;
if (clientId.clientId === clientId) {
if (!closure_2_6(mainFrame.getMainFrame())) {
closure_2_1(dismissOAuthModal[6]).popWithKey(closure_2_8);
const obj2 = closure_2_1(dismissOAuthModal[6]);
const obj6 = {};
const obj3 = closure_2_1(dismissOAuthModal[6]);
const merged = Object.assign(tmp25);
obj6.dismissOAuthModal = dismissOAuthModal;
c2 = 1;
c3 = 1;
const obj7 = { value: obj3.pushLazy(closure_2_0(dismissOAuthModal[8])(dismissOAuthModal[7], dismissOAuthModal.paths), obj6, closure_2_8), done: false };
return obj7;
}
}
c3 = 3;
}
} else if (arg0 === 1) {
c3 = 3;
throw value;
} else if (arg0 !== 2) {
closure_129_1 = true;
if (closure_129_0) {
closure_129_2();
}
}
c3 = 3;
const obj = { value, done: true };
return obj;
} catch (tmp20) {
c3 = tmp;
throw tmp20;
}
}
})();
};
if (null != c0) {
c0 = false;
c1 = false;
let ComponentDispatch = closure_0(dependencyMap[9]).ComponentDispatch;
const subscription = ComponentDispatch.subscribe(SHOW_OAUTH2_MODAL.SHOW_OAUTH2_MODAL, showOAuth2Modal);
return () => {
c0 = true;
const ComponentDispatch = ComponentDispatchUtils.ComponentDispatch;
ComponentDispatch.unsubscribe(ComponentActions.SHOW_OAUTH2_MODAL, showOAuth2Modal);
if (c1) {
ModalActionCreatorsDefault.popWithKey(closure_8);
c1 = false;
}
};
}
}, items);
};