2026-08-15 05:55:55 +00:00
|
|
|
// Module ID: 7399
|
|
|
|
|
// Function ID: 7400
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: createDefinedContext
|
2026-07-29 08:29:29 +00:00
|
|
|
// Dependencies: [19, 21, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-08-15 05:55:55 +00:00
|
|
|
// Module 7399 (createDefinedContext)
|
2026-07-29 08:29:29 +00:00
|
|
|
import noop from "noop";
|
2026-07-23 10:11:24 +00:00
|
|
|
import { jsx } from "jsxProd";
|
|
|
|
|
|
|
|
|
|
const result = require("set").fileFinishedImporting("utils/ContextUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function createDefinedContext() {
|
2026-07-23 10:11:24 +00:00
|
|
|
context = context.createContext(undefined);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [
|
|
|
|
|
context,
|
2026-07-29 08:29:29 +00:00
|
|
|
function useContext(context) {
|
|
|
|
|
context = context.useContext(context);
|
|
|
|
|
if (null == context) {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error = new Error("Context was used outside of defined provider.");
|
|
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
return context;
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-07-20 16:05:17 +00:00
|
|
|
() => {
|
2026-07-29 08:29:29 +00:00
|
|
|
context = context.useContext(context);
|
|
|
|
|
if (null == context) {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error = new Error("Context was used outside of defined provider.");
|
|
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
return (children) => outer2_1(context.Provider, { value: context, children: children.children });
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
return items;
|
|
|
|
|
};
|