create-atom.io 0.0.1 → 0.0.3
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/{create-atom-BV6WVRvY.js → create-atom-BDzJIQOb.js} +28 -12
- package/dist/create-atom-BDzJIQOb.js.map +1 -0
- package/dist/create-atom.d.ts +5 -5
- package/dist/create-atom.d.ts.map +1 -1
- package/dist/create-atom.js +2 -2
- package/dist/create-atom.x.js +8 -1
- package/dist/create-atom.x.js.map +1 -1
- package/package.json +10 -10
- package/src/create-atom.ts +29 -6
- package/src/create-atom.x.ts +7 -0
- package/templates/{base → preact-svg-editor}/eslint.config.ts +4 -3
- package/templates/preact-svg-editor/eslint.d.ts +31 -0
- package/templates/preact-svg-editor/node_modules/.bin/vite +21 -0
- package/templates/{base → preact-svg-editor}/package.json +3 -3
- package/templates/{base → preact-svg-editor}/src/BezierPlayground.tsx +157 -147
- package/templates/{base → preact-svg-editor}/src/index.tsx +6 -4
- package/templates/{base → preact-svg-editor}/vite.config.ts +2 -1
- package/templates/react-node-backend/.turbo/turbo-build.log +12 -0
- package/templates/react-node-backend/README.md +75 -0
- package/templates/react-node-backend/_gitignore +24 -0
- package/templates/react-node-backend/dist/assets/index-By2j7w9s.css +1 -0
- package/templates/react-node-backend/dist/assets/index-DKQCwCeF.js +9 -0
- package/templates/react-node-backend/dist/index.html +14 -0
- package/templates/react-node-backend/dist/react.svg +1 -0
- package/templates/react-node-backend/dist/vite.svg +1 -0
- package/templates/react-node-backend/eslint.config.ts +176 -0
- package/templates/react-node-backend/index.html +13 -0
- package/templates/react-node-backend/node/authenticator.ts +47 -0
- package/templates/react-node-backend/node/server.ts +103 -0
- package/templates/react-node-backend/node_modules/.bin/conc +21 -0
- package/templates/react-node-backend/node_modules/.bin/concurrently +21 -0
- package/templates/react-node-backend/node_modules/.bin/eslint +21 -0
- package/templates/react-node-backend/node_modules/.bin/tsc +21 -0
- package/templates/react-node-backend/node_modules/.bin/tsserver +21 -0
- package/templates/react-node-backend/node_modules/.bin/vite +21 -0
- package/templates/react-node-backend/package.json +33 -0
- package/templates/react-node-backend/public/react.svg +1 -0
- package/templates/react-node-backend/public/vite.svg +1 -0
- package/templates/react-node-backend/src/App.tsx +69 -0
- package/templates/react-node-backend/src/index.css +145 -0
- package/templates/react-node-backend/src/main.tsx +12 -0
- package/templates/react-node-backend/tsconfig.app.json +28 -0
- package/templates/react-node-backend/tsconfig.json +7 -0
- package/templates/react-node-backend/tsconfig.node.json +26 -0
- package/templates/react-node-backend/vite.config.ts +13 -0
- package/dist/create-atom-BV6WVRvY.js.map +0 -1
- package/templates/base/node_modules/.bin/browserslist +0 -21
- package/templates/base/node_modules/.bin/eslint +0 -21
- package/templates/base/node_modules/.bin/jiti +0 -21
- package/templates/base/node_modules/.bin/sass +0 -21
- package/templates/base/node_modules/.bin/terser +0 -21
- package/templates/base/node_modules/.bin/tsc +0 -21
- package/templates/base/node_modules/.bin/tsserver +0 -21
- package/templates/base/node_modules/.bin/vite +0 -21
- package/templates/base/node_modules/.bin/yaml +0 -21
- package/templates/base/node_modules/.vite/deps/_metadata.json +0 -82
- package/templates/base/node_modules/.vite/deps/atom__io.js +0 -72
- package/templates/base/node_modules/.vite/deps/atom__io.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/atom__io_react.js +0 -170
- package/templates/base/node_modules/.vite/deps/atom__io_react.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-2PJG54YB.js +0 -364
- package/templates/base/node_modules/.vite/deps/chunk-2PJG54YB.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-6VZTUEOV.js +0 -3777
- package/templates/base/node_modules/.vite/deps/chunk-6VZTUEOV.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-IHAFLL3M.js +0 -204
- package/templates/base/node_modules/.vite/deps/chunk-IHAFLL3M.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-LZJKCPXG.js +0 -84
- package/templates/base/node_modules/.vite/deps/chunk-LZJKCPXG.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-PJQAIOAR.js +0 -311
- package/templates/base/node_modules/.vite/deps/chunk-PJQAIOAR.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/chunk-XRJUZPUF.js +0 -17
- package/templates/base/node_modules/.vite/deps/chunk-XRJUZPUF.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/package.json +0 -3
- package/templates/base/node_modules/.vite/deps/preact.js +0 -27
- package/templates/base/node_modules/.vite/deps/preact.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_compat.js +0 -100
- package/templates/base/node_modules/.vite/deps/preact_compat.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_debug.js +0 -240
- package/templates/base/node_modules/.vite/deps/preact_debug.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_devtools.js +0 -7
- package/templates/base/node_modules/.vite/deps/preact_devtools.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_hooks.js +0 -29
- package/templates/base/node_modules/.vite/deps/preact_hooks.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_jsx-dev-runtime.js +0 -18
- package/templates/base/node_modules/.vite/deps/preact_jsx-dev-runtime.js.map +0 -7
- package/templates/base/node_modules/.vite/deps/preact_jsx-runtime.js +0 -18
- package/templates/base/node_modules/.vite/deps/preact_jsx-runtime.js.map +0 -7
- /package/templates/{base → preact-svg-editor}/_gitignore +0 -0
- /package/templates/{base → preact-svg-editor}/index.html +0 -0
- /package/templates/{base → preact-svg-editor}/public/preact.svg +0 -0
- /package/templates/{base → preact-svg-editor}/src/msg.md +0 -0
- /package/templates/{base → preact-svg-editor}/src/style.css +0 -0
- /package/templates/{base → preact-svg-editor}/tsconfig.json +0 -0
- /package/templates/{base → react-node-backend}/eslint.d.ts +0 -0
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
C
|
|
3
|
-
} from "./chunk-2PJG54YB.js";
|
|
4
|
-
import {
|
|
5
|
-
u
|
|
6
|
-
} from "./chunk-LZJKCPXG.js";
|
|
7
|
-
import {
|
|
8
|
-
IMPLICIT,
|
|
9
|
-
findInStore,
|
|
10
|
-
getFromStore,
|
|
11
|
-
getJsonToken,
|
|
12
|
-
redo,
|
|
13
|
-
setIntoStore,
|
|
14
|
-
subscribeToState,
|
|
15
|
-
subscribeToTimeline,
|
|
16
|
-
undo,
|
|
17
|
-
withdraw
|
|
18
|
-
} from "./chunk-6VZTUEOV.js";
|
|
19
|
-
import {
|
|
20
|
-
A,
|
|
21
|
-
g,
|
|
22
|
-
x
|
|
23
|
-
} from "./chunk-IHAFLL3M.js";
|
|
24
|
-
import {
|
|
25
|
-
Q
|
|
26
|
-
} from "./chunk-PJQAIOAR.js";
|
|
27
|
-
|
|
28
|
-
// ../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/dist/react/index.js
|
|
29
|
-
var StoreContext = Q(IMPLICIT.STORE);
|
|
30
|
-
var StoreProvider = ({ children, store = IMPLICIT.STORE }) => u(StoreContext.Provider, {
|
|
31
|
-
value: store,
|
|
32
|
-
children
|
|
33
|
-
});
|
|
34
|
-
function parseStateOverloads(store, ...rest) {
|
|
35
|
-
let token;
|
|
36
|
-
if (rest.length === 2) {
|
|
37
|
-
const family = rest[0];
|
|
38
|
-
const key = rest[1];
|
|
39
|
-
token = findInStore(store, family, key);
|
|
40
|
-
} else token = rest[0];
|
|
41
|
-
return token;
|
|
42
|
-
}
|
|
43
|
-
function useI(...params) {
|
|
44
|
-
const store = x(StoreContext);
|
|
45
|
-
const token = parseStateOverloads(store, ...params);
|
|
46
|
-
const setter = A(null);
|
|
47
|
-
setter.current ??= (next) => {
|
|
48
|
-
setIntoStore(store, token, next);
|
|
49
|
-
};
|
|
50
|
-
return setter.current;
|
|
51
|
-
}
|
|
52
|
-
function useO(...params) {
|
|
53
|
-
const store = x(StoreContext);
|
|
54
|
-
const token = parseStateOverloads(store, ...params);
|
|
55
|
-
const id = g();
|
|
56
|
-
return C((dispatch) => subscribeToState(store, token, `use-o:${id}`, dispatch), () => getFromStore(store, token), () => getFromStore(store, token));
|
|
57
|
-
}
|
|
58
|
-
function useJSON(token, key) {
|
|
59
|
-
const store = x(StoreContext);
|
|
60
|
-
return useO(getJsonToken(store, token.type === `mutable_atom_family` ? findInStore(store, token, key) : token));
|
|
61
|
-
}
|
|
62
|
-
function useLoadable(...params) {
|
|
63
|
-
const store = x(StoreContext);
|
|
64
|
-
let value;
|
|
65
|
-
let state;
|
|
66
|
-
let fallback;
|
|
67
|
-
const [token] = params;
|
|
68
|
-
let key;
|
|
69
|
-
switch (token.type) {
|
|
70
|
-
case `atom`:
|
|
71
|
-
case `mutable_atom`:
|
|
72
|
-
case `readonly_held_selector`:
|
|
73
|
-
case `readonly_pure_selector`:
|
|
74
|
-
case `writable_held_selector`:
|
|
75
|
-
case `writable_pure_selector`:
|
|
76
|
-
value = useO(token);
|
|
77
|
-
state = withdraw(store, token);
|
|
78
|
-
fallback = params[1];
|
|
79
|
-
break;
|
|
80
|
-
case `atom_family`:
|
|
81
|
-
case `mutable_atom_family`:
|
|
82
|
-
case `readonly_held_selector_family`:
|
|
83
|
-
case `readonly_pure_selector_family`:
|
|
84
|
-
case `writable_held_selector_family`:
|
|
85
|
-
case `writable_pure_selector_family`:
|
|
86
|
-
key = params[1];
|
|
87
|
-
value = useO(token, key);
|
|
88
|
-
state = withdraw(store, findInStore(store, token, key));
|
|
89
|
-
fallback = params[2];
|
|
90
|
-
}
|
|
91
|
-
const isErr = `catch` in state && state.catch.some((E) => value instanceof E);
|
|
92
|
-
const wrapperRef = A({
|
|
93
|
-
loading: false,
|
|
94
|
-
value: null
|
|
95
|
-
});
|
|
96
|
-
const lastLoadedRef = A(fallback ?? (value instanceof Promise ? `LOADING` : value));
|
|
97
|
-
const { current: lastLoaded } = lastLoadedRef;
|
|
98
|
-
let { current: wrapper } = wrapperRef;
|
|
99
|
-
const wasErr = `catch` in state && state.catch.some((E) => lastLoaded instanceof E);
|
|
100
|
-
if (value instanceof Promise) {
|
|
101
|
-
if (lastLoaded === `LOADING`) return `LOADING`;
|
|
102
|
-
if (wasErr && fallback) wrapper = wrapperRef.current = {
|
|
103
|
-
loading: true,
|
|
104
|
-
value: fallback,
|
|
105
|
-
error: lastLoaded
|
|
106
|
-
};
|
|
107
|
-
else wrapper = wrapperRef.current = {
|
|
108
|
-
loading: true,
|
|
109
|
-
value: lastLoaded
|
|
110
|
-
};
|
|
111
|
-
} else {
|
|
112
|
-
lastLoadedRef.current = value;
|
|
113
|
-
if (wrapper.loading === true) if (isErr && fallback) wrapper = wrapperRef.current = {
|
|
114
|
-
loading: false,
|
|
115
|
-
value: fallback,
|
|
116
|
-
error: value
|
|
117
|
-
};
|
|
118
|
-
else wrapper = wrapperRef.current = {
|
|
119
|
-
loading: false,
|
|
120
|
-
value
|
|
121
|
-
};
|
|
122
|
-
else if (isErr && fallback) {
|
|
123
|
-
wrapper.loading = false;
|
|
124
|
-
wrapper.value = fallback;
|
|
125
|
-
wrapper.error = value;
|
|
126
|
-
} else {
|
|
127
|
-
wrapper.loading = false;
|
|
128
|
-
wrapper.value = value;
|
|
129
|
-
delete wrapper.error;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return wrapper;
|
|
133
|
-
}
|
|
134
|
-
function useTL(token) {
|
|
135
|
-
const store = x(StoreContext);
|
|
136
|
-
const id = g();
|
|
137
|
-
const timeline = withdraw(store, token);
|
|
138
|
-
const tokenRef = A(token);
|
|
139
|
-
const rebuildMeta = () => {
|
|
140
|
-
return {
|
|
141
|
-
at: timeline.at,
|
|
142
|
-
length: timeline.history.length,
|
|
143
|
-
undo: () => {
|
|
144
|
-
undo(token);
|
|
145
|
-
},
|
|
146
|
-
redo: () => {
|
|
147
|
-
redo(token);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
const meta = A(rebuildMeta());
|
|
152
|
-
const retrieve = () => {
|
|
153
|
-
if (meta.current.at !== timeline?.at || meta.current.length !== timeline?.history.length || tokenRef.current !== token) {
|
|
154
|
-
tokenRef.current = token;
|
|
155
|
-
meta.current = rebuildMeta();
|
|
156
|
-
}
|
|
157
|
-
return meta.current;
|
|
158
|
-
};
|
|
159
|
-
return C((dispatch) => subscribeToTimeline(store, token, `use-tl:${id}`, dispatch), retrieve, retrieve);
|
|
160
|
-
}
|
|
161
|
-
export {
|
|
162
|
-
StoreContext,
|
|
163
|
-
StoreProvider,
|
|
164
|
-
useI,
|
|
165
|
-
useJSON,
|
|
166
|
-
useLoadable,
|
|
167
|
-
useO,
|
|
168
|
-
useTL
|
|
169
|
-
};
|
|
170
|
-
//# sourceMappingURL=atom__io_react.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/store-context.tsx", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/parse-state-overloads.ts", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/use-i.ts", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/use-o.ts", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/use-json.ts", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/use-loadable.ts", "../../../../../../../node_modules/.pnpm/atom.io@0.44.0_@floating-ui+react-dom@2.1.6_@preact+compat@18.3.1_preact@10.27.2__@prea_a385030eab0fd5c9f5ef9e758818d457/node_modules/atom.io/src/react/use-tl.ts"],
|
|
4
|
-
"sourcesContent": ["import type { RootStore } from \"atom.io/internal\"\nimport { IMPLICIT } from \"atom.io/internal\"\nimport { createContext } from \"react\"\n\nexport const StoreContext: React.Context<RootStore> = createContext(\n\tIMPLICIT.STORE,\n)\n\nexport const StoreProvider: React.FC<{\n\tchildren: React.ReactNode\n\tstore?: RootStore\n}> = ({ children, store = IMPLICIT.STORE }) => (\n\t<StoreContext.Provider value={store}>{children}</StoreContext.Provider>\n)\n", "import type {\n\tReadableFamilyToken,\n\tReadableToken,\n\tWritableFamilyToken,\n\tWritableToken,\n} from \"atom.io\"\nimport type { Store } from \"atom.io/internal\"\nimport { findInStore } from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\n\nexport function parseStateOverloads<T, K extends Canonical, Key extends K, E>(\n\tstore: Store,\n\t...rest: [WritableFamilyToken<T, K, E>, Key] | [WritableToken<T, any, E>]\n): WritableToken<T, Key, E>\n\nexport function parseStateOverloads<T, K extends Canonical, Key extends K, E>(\n\tstore: Store,\n\t...rest: [ReadableFamilyToken<T, K, E>, Key] | [ReadableToken<T, any, E>]\n): ReadableToken<T, Key, E>\n\nexport function parseStateOverloads<T, K extends Canonical, Key extends K, E>(\n\tstore: Store,\n\t...rest: [ReadableFamilyToken<T, K, E>, Key] | [ReadableToken<T, any, E>]\n): ReadableToken<T, Key, E> {\n\tlet token: ReadableToken<any, any, any>\n\tif (rest.length === 2) {\n\t\tconst family = rest[0]\n\t\tconst key = rest[1]\n\n\t\ttoken = findInStore(store, family, key)\n\t} else {\n\t\ttoken = rest[0]\n\t}\n\treturn token\n}\n", "import type { WritableFamilyToken, WritableToken } from \"atom.io\"\nimport { setIntoStore } from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\nimport { useContext, useRef } from \"react\"\n\nimport { parseStateOverloads } from \"./parse-state-overloads\"\nimport { StoreContext } from \"./store-context\"\n\nexport function useI<T>(\n\ttoken: WritableToken<T, any, any>,\n): <New extends T>(next: New | ((old: T) => New)) => void\n\nexport function useI<T, K extends Canonical>(\n\ttoken: WritableFamilyToken<T, K, any>,\n\tkey: NoInfer<K>,\n): <New extends T>(next: New | ((old: T) => New)) => void\n\nexport function useI<T, K extends Canonical>(\n\t...params:\n\t\t| [WritableFamilyToken<T, K, any>, NoInfer<K>]\n\t\t| [WritableToken<T, any, any>]\n): <New extends T>(next: New | ((old: T) => New)) => void {\n\tconst store = useContext(StoreContext)\n\tconst token = parseStateOverloads(store, ...params)\n\tconst setter: React.RefObject<\n\t\t(<New extends T>(next: New | ((old: T) => New)) => void) | null\n\t> = useRef(null)\n\tsetter.current ??= (next) => {\n\t\tsetIntoStore(store, token, next)\n\t}\n\treturn setter.current\n}\n", "import type { ReadableFamilyToken, ReadableToken } from \"atom.io\"\nimport { getFromStore, subscribeToState } from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\nimport { useContext, useId, useSyncExternalStore } from \"react\"\n\nimport { parseStateOverloads } from \"./parse-state-overloads\"\nimport { StoreContext } from \"./store-context\"\n\nexport function useO<T, E = never>(token: ReadableToken<T, any, E>): E | T\n\nexport function useO<T, K extends Canonical, E = never>(\n\ttoken: ReadableFamilyToken<T, K, E>,\n\tkey: NoInfer<K>,\n): E | T\n\nexport function useO<T, K extends Canonical, E = never>(\n\t...params:\n\t\t| [ReadableFamilyToken<T, K, E>, NoInfer<K>]\n\t\t| [ReadableToken<T, any, E>]\n): E | T {\n\tconst store = useContext(StoreContext)\n\tconst token = parseStateOverloads(store, ...params)\n\tconst id = useId()\n\treturn useSyncExternalStore<E | T>(\n\t\t(dispatch) => subscribeToState(store, token, `use-o:${id}`, dispatch),\n\t\t() => getFromStore(store, token),\n\t\t() => getFromStore(store, token),\n\t)\n}\n", "import type { MutableAtomFamilyToken, MutableAtomToken } from \"atom.io\"\nimport type { AsJSON, Transceiver } from \"atom.io/internal\"\nimport { findInStore, getJsonToken } from \"atom.io/internal\"\nimport type { Canonical, Json } from \"atom.io/json\"\nimport { useContext } from \"react\"\n\nimport { StoreContext } from \"./store-context\"\nimport { useO } from \"./use-o\"\n\nexport function useJSON<T extends Transceiver<any, any, any>>(\n\ttoken: MutableAtomToken<T>,\n): AsJSON<T>\n\nexport function useJSON<\n\tT extends Transceiver<any, any, any>,\n\tK extends Canonical,\n>(token: MutableAtomFamilyToken<T, K>, key: K): AsJSON<T>\n\nexport function useJSON(\n\ttoken: MutableAtomFamilyToken<any, any> | MutableAtomToken<any>,\n\tkey?: Canonical,\n): Json.Serializable {\n\tconst store = useContext(StoreContext)\n\tconst stateToken: MutableAtomToken<any> =\n\t\ttoken.type === `mutable_atom_family` ? findInStore(store, token, key) : token\n\tconst jsonToken = getJsonToken(store, stateToken)\n\treturn useO(jsonToken)\n}\n", "/** biome-ignore-all lint/correctness/useHookAtTopLevel: params are used in an invariant way */\nimport type { Loadable, ReadableFamilyToken, ReadableToken } from \"atom.io\"\nimport { findInStore, type ReadableState, withdraw } from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\nimport { StoreContext, useO } from \"atom.io/react\"\nimport { useContext, useRef } from \"react\"\n\nexport function useLoadable<T, E>(\n\ttoken: ReadableToken<Loadable<T>, any, E>,\n): `LOADING` | { loading: boolean; value: E | T }\n\nexport function useLoadable<T, K extends Canonical, E>(\n\ttoken: ReadableFamilyToken<Loadable<T>, K, E>,\n\tkey: NoInfer<K>,\n): `LOADING` | { loading: boolean; value: E | T }\n\nexport function useLoadable<T, F extends T, E>(\n\ttoken: ReadableToken<Loadable<T>, any, E>,\n\tfallback: F,\n): { loading: boolean; value: T; error?: E }\n\nexport function useLoadable<T, K extends Canonical, F extends T, E>(\n\ttoken: ReadableFamilyToken<Loadable<T>, K, E>,\n\tkey: NoInfer<K>,\n\tfallback: F,\n): { loading: boolean; value: T; error?: E }\n\nexport function useLoadable(\n\t...params:\n\t\t| readonly [ReadableFamilyToken<any, Canonical, any>, Canonical, unknown]\n\t\t| readonly [ReadableFamilyToken<any, Canonical, any>, Canonical]\n\t\t| readonly [ReadableToken<any, any, any>, unknown]\n\t\t| readonly [ReadableToken<any, any, any>]\n): `LOADING` | { loading: boolean; value: unknown; error?: unknown } {\n\tconst store = useContext(StoreContext)\n\n\tlet value: unknown\n\tlet state: ReadableState<any, any>\n\tlet fallback: unknown\n\n\tconst [token] = params\n\tlet key: Canonical\n\tswitch (token.type) {\n\t\tcase `atom`:\n\t\tcase `mutable_atom`:\n\t\tcase `readonly_held_selector`:\n\t\tcase `readonly_pure_selector`:\n\t\tcase `writable_held_selector`:\n\t\tcase `writable_pure_selector`:\n\t\t\tvalue = useO(token)\n\t\t\tstate = withdraw(store, token)\n\t\t\tfallback = params[1]\n\t\t\tbreak\n\t\tcase `atom_family`:\n\t\tcase `mutable_atom_family`:\n\t\tcase `readonly_held_selector_family`:\n\t\tcase `readonly_pure_selector_family`:\n\t\tcase `writable_held_selector_family`:\n\t\tcase `writable_pure_selector_family`:\n\t\t\tkey = params[1] as Canonical\n\t\t\tvalue = useO(token, key)\n\t\t\tstate = withdraw(store, findInStore(store, token, key))\n\t\t\tfallback = params[2]\n\t}\n\n\tconst isErr = `catch` in state && state.catch.some((E) => value instanceof E)\n\n\tconst wrapperRef = useRef<{\n\t\tloading: boolean\n\t\tvalue: unknown\n\t\terror?: unknown\n\t}>({ loading: false, value: null as unknown })\n\tconst lastLoadedRef = useRef(\n\t\tfallback ?? (value instanceof Promise ? `LOADING` : value),\n\t)\n\n\tconst { current: lastLoaded } = lastLoadedRef\n\tlet { current: wrapper } = wrapperRef\n\n\tconst wasErr =\n\t\t`catch` in state && state.catch.some((E) => lastLoaded instanceof E)\n\n\tif (value instanceof Promise) {\n\t\tif (lastLoaded === `LOADING`) {\n\t\t\treturn `LOADING`\n\t\t}\n\t\tif (wasErr && fallback) {\n\t\t\twrapper = wrapperRef.current = {\n\t\t\t\tloading: true,\n\t\t\t\tvalue: fallback,\n\t\t\t\terror: lastLoaded,\n\t\t\t}\n\t\t} else {\n\t\t\twrapper = wrapperRef.current = { loading: true, value: lastLoaded }\n\t\t}\n\t} else {\n\t\tlastLoadedRef.current = value\n\t\tif (wrapper.loading === true) {\n\t\t\tif (isErr && fallback) {\n\t\t\t\twrapper = wrapperRef.current = {\n\t\t\t\t\tloading: false,\n\t\t\t\t\tvalue: fallback,\n\t\t\t\t\terror: value,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twrapper = wrapperRef.current = { loading: false, value: value }\n\t\t\t}\n\t\t} else {\n\t\t\tif (isErr && fallback) {\n\t\t\t\twrapper.loading = false\n\t\t\t\twrapper.value = fallback\n\t\t\t\twrapper.error = value\n\t\t\t} else {\n\t\t\t\twrapper.loading = false\n\t\t\t\twrapper.value = value\n\t\t\t\tdelete wrapper.error\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wrapper\n}\n", "import type { TimelineToken } from \"atom.io\"\nimport { redo, undo } from \"atom.io\"\nimport { subscribeToTimeline, withdraw } from \"atom.io/internal\"\nimport { useContext, useId, useRef, useSyncExternalStore } from \"react\"\n\nimport { StoreContext } from \"./store-context\"\n\nexport type TimelineMeta = {\n\tat: number\n\tlength: number\n\tundo: () => void\n\tredo: () => void\n}\n\nexport function useTL(token: TimelineToken<any>): TimelineMeta {\n\tconst store = useContext(StoreContext)\n\tconst id = useId()\n\tconst timeline = withdraw(store, token)\n\tconst tokenRef = useRef(token)\n\tconst rebuildMeta = () => {\n\t\treturn {\n\t\t\tat: timeline.at,\n\t\t\tlength: timeline.history.length,\n\t\t\tundo: () => {\n\t\t\t\tundo(token)\n\t\t\t},\n\t\t\tredo: () => {\n\t\t\t\tredo(token)\n\t\t\t},\n\t\t}\n\t}\n\tconst meta = useRef<TimelineMeta>(rebuildMeta())\n\tconst retrieve = () => {\n\t\tif (\n\t\t\tmeta.current.at !== timeline?.at ||\n\t\t\tmeta.current.length !== timeline?.history.length ||\n\t\t\ttokenRef.current !== token\n\t\t) {\n\t\t\ttokenRef.current = token\n\t\t\tmeta.current = rebuildMeta()\n\t\t}\n\t\treturn meta.current\n\t}\n\treturn useSyncExternalStore<TimelineMeta>(\n\t\t(dispatch) => subscribeToTimeline(store, token, `use-tl:${id}`, dispatch),\n\t\tretrieve,\n\t\tretrieve,\n\t)\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["StoreContext: React.Context<RootStore>", "StoreProvider: React.FC<{\n\tchildren: React.ReactNode\n\tstore?: RootStore\n}>", "token: ReadableToken<any, any, any>", "setter: React.RefObject<\n\t\t(<New extends T>(next: New | ((old: T) => New)) => void) | null\n\t>", "StoreContext", "value: unknown", "state: ReadableState<any, any>", "fallback: unknown", "key: Canonical", "useO"]
|
|
7
|
-
}
|
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
A,
|
|
3
|
-
F,
|
|
4
|
-
P,
|
|
5
|
-
T,
|
|
6
|
-
_ as _2,
|
|
7
|
-
d,
|
|
8
|
-
g,
|
|
9
|
-
h,
|
|
10
|
-
q,
|
|
11
|
-
x as x2,
|
|
12
|
-
y
|
|
13
|
-
} from "./chunk-IHAFLL3M.js";
|
|
14
|
-
import {
|
|
15
|
-
G,
|
|
16
|
-
H,
|
|
17
|
-
J,
|
|
18
|
-
K,
|
|
19
|
-
Q,
|
|
20
|
-
_,
|
|
21
|
-
b,
|
|
22
|
-
k,
|
|
23
|
-
l,
|
|
24
|
-
x
|
|
25
|
-
} from "./chunk-PJQAIOAR.js";
|
|
26
|
-
|
|
27
|
-
// ../../../../node_modules/.pnpm/preact@10.27.2/node_modules/preact/compat/dist/compat.module.js
|
|
28
|
-
function g2(n, t) {
|
|
29
|
-
for (var e in t) n[e] = t[e];
|
|
30
|
-
return n;
|
|
31
|
-
}
|
|
32
|
-
function E(n, t) {
|
|
33
|
-
for (var e in n) if ("__source" !== e && !(e in t)) return true;
|
|
34
|
-
for (var r in t) if ("__source" !== r && n[r] !== t[r]) return true;
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
function C(n, t) {
|
|
38
|
-
var e = t(), r = d({ t: { __: e, u: t } }), u = r[0].t, o = r[1];
|
|
39
|
-
return _2(function() {
|
|
40
|
-
u.__ = e, u.u = t, x3(u) && o({ t: u });
|
|
41
|
-
}, [n, e, t]), y(function() {
|
|
42
|
-
return x3(u) && o({ t: u }), n(function() {
|
|
43
|
-
x3(u) && o({ t: u });
|
|
44
|
-
});
|
|
45
|
-
}, [n]), e;
|
|
46
|
-
}
|
|
47
|
-
function x3(n) {
|
|
48
|
-
var t, e, r = n.u, u = n.__;
|
|
49
|
-
try {
|
|
50
|
-
var o = r();
|
|
51
|
-
return !((t = u) === (e = o) && (0 !== t || 1 / t == 1 / e) || t != t && e != e);
|
|
52
|
-
} catch (n2) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function R(n) {
|
|
57
|
-
n();
|
|
58
|
-
}
|
|
59
|
-
function w(n) {
|
|
60
|
-
return n;
|
|
61
|
-
}
|
|
62
|
-
function k2() {
|
|
63
|
-
return [false, R];
|
|
64
|
-
}
|
|
65
|
-
var I = _2;
|
|
66
|
-
function N(n, t) {
|
|
67
|
-
this.props = n, this.context = t;
|
|
68
|
-
}
|
|
69
|
-
function M(n, e) {
|
|
70
|
-
function r(n2) {
|
|
71
|
-
var t = this.props.ref, r2 = t == n2.ref;
|
|
72
|
-
return !r2 && t && (t.call ? t(null) : t.current = null), e ? !e(this.props, n2) || !r2 : E(this.props, n2);
|
|
73
|
-
}
|
|
74
|
-
function u(e2) {
|
|
75
|
-
return this.shouldComponentUpdate = r, _(n, e2);
|
|
76
|
-
}
|
|
77
|
-
return u.displayName = "Memo(" + (n.displayName || n.name) + ")", u.prototype.isReactComponent = true, u.__f = true, u.type = n, u;
|
|
78
|
-
}
|
|
79
|
-
(N.prototype = new x()).isPureReactComponent = true, N.prototype.shouldComponentUpdate = function(n, t) {
|
|
80
|
-
return E(this.props, n) || E(this.state, t);
|
|
81
|
-
};
|
|
82
|
-
var T2 = l.__b;
|
|
83
|
-
l.__b = function(n) {
|
|
84
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), T2 && T2(n);
|
|
85
|
-
};
|
|
86
|
-
var A2 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
87
|
-
function D(n) {
|
|
88
|
-
function t(t2) {
|
|
89
|
-
var e = g2({}, t2);
|
|
90
|
-
return delete e.ref, n(e, t2.ref || null);
|
|
91
|
-
}
|
|
92
|
-
return t.$$typeof = A2, t.render = n, t.prototype.isReactComponent = t.__f = true, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
|
|
93
|
-
}
|
|
94
|
-
var L = function(n, t) {
|
|
95
|
-
return null == n ? null : H(H(n).map(t));
|
|
96
|
-
};
|
|
97
|
-
var O = { map: L, forEach: L, count: function(n) {
|
|
98
|
-
return n ? H(n).length : 0;
|
|
99
|
-
}, only: function(n) {
|
|
100
|
-
var t = H(n);
|
|
101
|
-
if (1 !== t.length) throw "Children.only";
|
|
102
|
-
return t[0];
|
|
103
|
-
}, toArray: H };
|
|
104
|
-
var F2 = l.__e;
|
|
105
|
-
l.__e = function(n, t, e, r) {
|
|
106
|
-
if (n.then) {
|
|
107
|
-
for (var u, o = t; o = o.__; ) if ((u = o.__c) && u.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
|
|
108
|
-
}
|
|
109
|
-
F2(n, t, e, r);
|
|
110
|
-
};
|
|
111
|
-
var U = l.unmount;
|
|
112
|
-
function V(n, t, e) {
|
|
113
|
-
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(n2) {
|
|
114
|
-
"function" == typeof n2.__c && n2.__c();
|
|
115
|
-
}), n.__c.__H = null), null != (n = g2({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c.__e = true, n.__c = null), n.__k = n.__k && n.__k.map(function(n2) {
|
|
116
|
-
return V(n2, t, e);
|
|
117
|
-
})), n;
|
|
118
|
-
}
|
|
119
|
-
function W(n, t, e) {
|
|
120
|
-
return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function(n2) {
|
|
121
|
-
return W(n2, t, e);
|
|
122
|
-
}), n.__c && n.__c.__P === t && (n.__e && e.appendChild(n.__e), n.__c.__e = true, n.__c.__P = e)), n;
|
|
123
|
-
}
|
|
124
|
-
function P2() {
|
|
125
|
-
this.__u = 0, this.o = null, this.__b = null;
|
|
126
|
-
}
|
|
127
|
-
function j(n) {
|
|
128
|
-
var t = n.__.__c;
|
|
129
|
-
return t && t.__a && t.__a(n);
|
|
130
|
-
}
|
|
131
|
-
function z(n) {
|
|
132
|
-
var e, r, u;
|
|
133
|
-
function o(o2) {
|
|
134
|
-
if (e || (e = n()).then(function(n2) {
|
|
135
|
-
r = n2.default || n2;
|
|
136
|
-
}, function(n2) {
|
|
137
|
-
u = n2;
|
|
138
|
-
}), u) throw u;
|
|
139
|
-
if (!r) throw e;
|
|
140
|
-
return _(r, o2);
|
|
141
|
-
}
|
|
142
|
-
return o.displayName = "Lazy", o.__f = true, o;
|
|
143
|
-
}
|
|
144
|
-
function B() {
|
|
145
|
-
this.i = null, this.l = null;
|
|
146
|
-
}
|
|
147
|
-
l.unmount = function(n) {
|
|
148
|
-
var t = n.__c;
|
|
149
|
-
t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), U && U(n);
|
|
150
|
-
}, (P2.prototype = new x()).__c = function(n, t) {
|
|
151
|
-
var e = t.__c, r = this;
|
|
152
|
-
null == r.o && (r.o = []), r.o.push(e);
|
|
153
|
-
var u = j(r.__v), o = false, i = function() {
|
|
154
|
-
o || (o = true, e.__R = null, u ? u(l2) : l2());
|
|
155
|
-
};
|
|
156
|
-
e.__R = i;
|
|
157
|
-
var l2 = function() {
|
|
158
|
-
if (!--r.__u) {
|
|
159
|
-
if (r.state.__a) {
|
|
160
|
-
var n2 = r.state.__a;
|
|
161
|
-
r.__v.__k[0] = W(n2, n2.__c.__P, n2.__c.__O);
|
|
162
|
-
}
|
|
163
|
-
var t2;
|
|
164
|
-
for (r.setState({ __a: r.__b = null }); t2 = r.o.pop(); ) t2.forceUpdate();
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), n.then(i, i);
|
|
168
|
-
}, P2.prototype.componentWillUnmount = function() {
|
|
169
|
-
this.o = [];
|
|
170
|
-
}, P2.prototype.render = function(n, e) {
|
|
171
|
-
if (this.__b) {
|
|
172
|
-
if (this.__v.__k) {
|
|
173
|
-
var r = document.createElement("div"), o = this.__v.__k[0].__c;
|
|
174
|
-
this.__v.__k[0] = V(this.__b, r, o.__O = o.__P);
|
|
175
|
-
}
|
|
176
|
-
this.__b = null;
|
|
177
|
-
}
|
|
178
|
-
var i = e.__a && _(k, null, n.fallback);
|
|
179
|
-
return i && (i.__u &= -33), [_(k, null, e.__a ? null : n.children), i];
|
|
180
|
-
};
|
|
181
|
-
var H2 = function(n, t, e) {
|
|
182
|
-
if (++e[1] === e[0] && n.l.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.l.size)) for (e = n.i; e; ) {
|
|
183
|
-
for (; e.length > 3; ) e.pop()();
|
|
184
|
-
if (e[1] < e[0]) break;
|
|
185
|
-
n.i = e = e[2];
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
function Z(n) {
|
|
189
|
-
return this.getChildContext = function() {
|
|
190
|
-
return n.context;
|
|
191
|
-
}, n.children;
|
|
192
|
-
}
|
|
193
|
-
function Y(n) {
|
|
194
|
-
var e = this, r = n.h;
|
|
195
|
-
if (e.componentWillUnmount = function() {
|
|
196
|
-
G(null, e.v), e.v = null, e.h = null;
|
|
197
|
-
}, e.h && e.h !== r && e.componentWillUnmount(), !e.v) {
|
|
198
|
-
for (var u = e.__v; null !== u && !u.__m && null !== u.__; ) u = u.__;
|
|
199
|
-
e.h = r, e.v = { nodeType: 1, parentNode: r, childNodes: [], __k: { __m: u.__m }, contains: function() {
|
|
200
|
-
return true;
|
|
201
|
-
}, insertBefore: function(n2, t) {
|
|
202
|
-
this.childNodes.push(n2), e.h.insertBefore(n2, t);
|
|
203
|
-
}, removeChild: function(n2) {
|
|
204
|
-
this.childNodes.splice(this.childNodes.indexOf(n2) >>> 1, 1), e.h.removeChild(n2);
|
|
205
|
-
} };
|
|
206
|
-
}
|
|
207
|
-
G(_(Z, { context: e.context }, n.__v), e.v);
|
|
208
|
-
}
|
|
209
|
-
function $(n, e) {
|
|
210
|
-
var r = _(Y, { __v: n, h: e });
|
|
211
|
-
return r.containerInfo = e, r;
|
|
212
|
-
}
|
|
213
|
-
(B.prototype = new x()).__a = function(n) {
|
|
214
|
-
var t = this, e = j(t.__v), r = t.l.get(n);
|
|
215
|
-
return r[0]++, function(u) {
|
|
216
|
-
var o = function() {
|
|
217
|
-
t.props.revealOrder ? (r.push(u), H2(t, n, r)) : u();
|
|
218
|
-
};
|
|
219
|
-
e ? e(o) : o();
|
|
220
|
-
};
|
|
221
|
-
}, B.prototype.render = function(n) {
|
|
222
|
-
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
223
|
-
var t = H(n.children);
|
|
224
|
-
n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
|
|
225
|
-
for (var e = t.length; e--; ) this.l.set(t[e], this.i = [1, 0, this.i]);
|
|
226
|
-
return n.children;
|
|
227
|
-
}, B.prototype.componentDidUpdate = B.prototype.componentDidMount = function() {
|
|
228
|
-
var n = this;
|
|
229
|
-
this.l.forEach(function(t, e) {
|
|
230
|
-
H2(n, e, t);
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
var q2 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
|
|
234
|
-
var G2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
|
|
235
|
-
var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
|
|
236
|
-
var K2 = /[A-Z0-9]/g;
|
|
237
|
-
var Q2 = "undefined" != typeof document;
|
|
238
|
-
var X = function(n) {
|
|
239
|
-
return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
240
|
-
};
|
|
241
|
-
function nn(n, t, e) {
|
|
242
|
-
return null == t.__k && (t.textContent = ""), G(n, t), "function" == typeof e && e(), n ? n.__c : null;
|
|
243
|
-
}
|
|
244
|
-
function tn(n, t, e) {
|
|
245
|
-
return J(n, t), "function" == typeof e && e(), n ? n.__c : null;
|
|
246
|
-
}
|
|
247
|
-
x.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
248
|
-
Object.defineProperty(x.prototype, t, { configurable: true, get: function() {
|
|
249
|
-
return this["UNSAFE_" + t];
|
|
250
|
-
}, set: function(n) {
|
|
251
|
-
Object.defineProperty(this, t, { configurable: true, writable: true, value: n });
|
|
252
|
-
} });
|
|
253
|
-
});
|
|
254
|
-
var en = l.event;
|
|
255
|
-
function rn() {
|
|
256
|
-
}
|
|
257
|
-
function un() {
|
|
258
|
-
return this.cancelBubble;
|
|
259
|
-
}
|
|
260
|
-
function on() {
|
|
261
|
-
return this.defaultPrevented;
|
|
262
|
-
}
|
|
263
|
-
l.event = function(n) {
|
|
264
|
-
return en && (n = en(n)), n.persist = rn, n.isPropagationStopped = un, n.isDefaultPrevented = on, n.nativeEvent = n;
|
|
265
|
-
};
|
|
266
|
-
var ln;
|
|
267
|
-
var cn = { enumerable: false, configurable: true, get: function() {
|
|
268
|
-
return this.class;
|
|
269
|
-
} };
|
|
270
|
-
var fn = l.vnode;
|
|
271
|
-
l.vnode = function(n) {
|
|
272
|
-
"string" == typeof n.type && (function(n2) {
|
|
273
|
-
var t = n2.props, e = n2.type, u = {}, o = -1 === e.indexOf("-");
|
|
274
|
-
for (var i in t) {
|
|
275
|
-
var l2 = t[i];
|
|
276
|
-
if (!("value" === i && "defaultValue" in t && null == l2 || Q2 && "children" === i && "noscript" === e || "class" === i || "className" === i)) {
|
|
277
|
-
var c = i.toLowerCase();
|
|
278
|
-
"defaultValue" === i && "value" in t && null == t.value ? i = "value" : "download" === i && true === l2 ? l2 = "" : "translate" === c && "no" === l2 ? l2 = false : "o" === c[0] && "n" === c[1] ? "ondoubleclick" === c ? i = "ondblclick" : "onchange" !== c || "input" !== e && "textarea" !== e || X(t.type) ? "onfocus" === c ? i = "onfocusin" : "onblur" === c ? i = "onfocusout" : J2.test(i) && (i = c) : c = i = "oninput" : o && G2.test(i) ? i = i.replace(K2, "-$&").toLowerCase() : null === l2 && (l2 = void 0), "oninput" === c && u[i = c] && (i = "oninputCapture"), u[i] = l2;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
"select" == e && u.multiple && Array.isArray(u.value) && (u.value = H(t.children).forEach(function(n3) {
|
|
282
|
-
n3.props.selected = -1 != u.value.indexOf(n3.props.value);
|
|
283
|
-
})), "select" == e && null != u.defaultValue && (u.value = H(t.children).forEach(function(n3) {
|
|
284
|
-
n3.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n3.props.value) : u.defaultValue == n3.props.value;
|
|
285
|
-
})), t.class && !t.className ? (u.class = t.class, Object.defineProperty(u, "className", cn)) : (t.className && !t.class || t.class && t.className) && (u.class = u.className = t.className), n2.props = u;
|
|
286
|
-
})(n), n.$$typeof = q2, fn && fn(n);
|
|
287
|
-
};
|
|
288
|
-
var an = l.__r;
|
|
289
|
-
l.__r = function(n) {
|
|
290
|
-
an && an(n), ln = n.__c;
|
|
291
|
-
};
|
|
292
|
-
var sn = l.diffed;
|
|
293
|
-
l.diffed = function(n) {
|
|
294
|
-
sn && sn(n);
|
|
295
|
-
var t = n.props, e = n.__e;
|
|
296
|
-
null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value), ln = null;
|
|
297
|
-
};
|
|
298
|
-
var hn = { ReactCurrentDispatcher: { current: { readContext: function(n) {
|
|
299
|
-
return ln.__n[n.__c].props.value;
|
|
300
|
-
}, useCallback: q, useContext: x2, useDebugValue: P, useDeferredValue: w, useEffect: y, useId: g, useImperativeHandle: F, useInsertionEffect: I, useLayoutEffect: _2, useMemo: T, useReducer: h, useRef: A, useState: d, useSyncExternalStore: C, useTransition: k2 } } };
|
|
301
|
-
var vn = "18.3.1";
|
|
302
|
-
function dn(n) {
|
|
303
|
-
return _.bind(null, n);
|
|
304
|
-
}
|
|
305
|
-
function mn(n) {
|
|
306
|
-
return !!n && n.$$typeof === q2;
|
|
307
|
-
}
|
|
308
|
-
function pn(n) {
|
|
309
|
-
return mn(n) && n.type === k;
|
|
310
|
-
}
|
|
311
|
-
function yn(n) {
|
|
312
|
-
return !!n && !!n.displayName && ("string" == typeof n.displayName || n.displayName instanceof String) && n.displayName.startsWith("Memo(");
|
|
313
|
-
}
|
|
314
|
-
function _n(n) {
|
|
315
|
-
return mn(n) ? K.apply(null, arguments) : n;
|
|
316
|
-
}
|
|
317
|
-
function bn(n) {
|
|
318
|
-
return !!n.__k && (G(null, n), true);
|
|
319
|
-
}
|
|
320
|
-
function Sn(n) {
|
|
321
|
-
return n && (n.base || 1 === n.nodeType && n) || null;
|
|
322
|
-
}
|
|
323
|
-
var gn = function(n, t) {
|
|
324
|
-
return n(t);
|
|
325
|
-
};
|
|
326
|
-
var En = function(n, t) {
|
|
327
|
-
return n(t);
|
|
328
|
-
};
|
|
329
|
-
var Cn = k;
|
|
330
|
-
var xn = mn;
|
|
331
|
-
var Rn = { useState: d, useId: g, useReducer: h, useEffect: y, useLayoutEffect: _2, useInsertionEffect: I, useTransition: k2, useDeferredValue: w, useSyncExternalStore: C, startTransition: R, useRef: A, useImperativeHandle: F, useMemo: T, useCallback: q, useContext: x2, useDebugValue: P, version: "18.3.1", Children: O, render: nn, hydrate: tn, unmountComponentAtNode: bn, createPortal: $, createElement: _, createContext: Q, createFactory: dn, cloneElement: _n, createRef: b, Fragment: k, isValidElement: mn, isElement: xn, isFragment: pn, isMemo: yn, findDOMNode: Sn, Component: x, PureComponent: N, memo: M, forwardRef: D, flushSync: En, unstable_batchedUpdates: gn, StrictMode: Cn, Suspense: P2, SuspenseList: B, lazy: z, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: hn };
|
|
332
|
-
|
|
333
|
-
export {
|
|
334
|
-
C,
|
|
335
|
-
R,
|
|
336
|
-
w,
|
|
337
|
-
k2 as k,
|
|
338
|
-
I,
|
|
339
|
-
N,
|
|
340
|
-
M,
|
|
341
|
-
D,
|
|
342
|
-
O,
|
|
343
|
-
P2 as P,
|
|
344
|
-
z,
|
|
345
|
-
B,
|
|
346
|
-
$,
|
|
347
|
-
nn,
|
|
348
|
-
tn,
|
|
349
|
-
hn,
|
|
350
|
-
vn,
|
|
351
|
-
dn,
|
|
352
|
-
mn,
|
|
353
|
-
pn,
|
|
354
|
-
yn,
|
|
355
|
-
_n,
|
|
356
|
-
bn,
|
|
357
|
-
Sn,
|
|
358
|
-
gn,
|
|
359
|
-
En,
|
|
360
|
-
Cn,
|
|
361
|
-
xn,
|
|
362
|
-
Rn
|
|
363
|
-
};
|
|
364
|
-
//# sourceMappingURL=chunk-2PJG54YB.js.map
|