@drfed/web 0.0.0-stage → 0.1.0-dev.561
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/.output/nitro.json +17 -0
- package/.output/public/.vite/manifest.json +483 -0
- package/.output/public/_build/assets/ActorDetailQuery.graphql-D96mwq1k.js +60 -0
- package/.output/public/_build/assets/ActorDetailQuery.graphql-DrxSNh1X.js +60 -0
- package/.output/public/_build/assets/CompleteLoginChallenge.graphql-C5Zq3wNh.js +10 -0
- package/.output/public/_build/assets/CopyButton-B2l484wE.js +1 -0
- package/.output/public/_build/assets/CopyButton-Bi-ZR8x9.css +1 -0
- package/.output/public/_build/assets/CreateInstanceMutation.graphql-B4CRy6cl.js +19 -0
- package/.output/public/_build/assets/CreateObjectMutation.graphql-B4A01dgV.js +23 -0
- package/.output/public/_build/assets/GenerateActorsMutation.graphql-mlHJNIbe.js +23 -0
- package/.output/public/_build/assets/GetHostQuery.graphql-CuzDdOdW.js +17 -0
- package/.output/public/_build/assets/GetHostQuery.graphql-o9K0Qkg0.js +17 -0
- package/.output/public/_build/assets/HomeViewerQuery.graphql-B903WWKs.js +8 -0
- package/.output/public/_build/assets/HttpStatusCode-bgaVzuLy.js +1 -0
- package/.output/public/_build/assets/InstanceActorListQuery.graphql-DmNwiEhM.js +24 -0
- package/.output/public/_build/assets/InstanceActorListQuery.graphql-paa7teUO.js +24 -0
- package/.output/public/_build/assets/InstanceDetailQuery.graphql-B52nR132.js +66 -0
- package/.output/public/_build/assets/InstanceDetailQuery.graphql-DSA2BcAV.js +66 -0
- package/.output/public/_build/assets/JNCCF6MP-CNMywyiC.js +1 -0
- package/.output/public/_build/assets/LP6E37CW-Cwv6G3n1.js +1 -0
- package/.output/public/_build/assets/SignInMutation.graphql-BalZYNFu.js +9 -0
- package/.output/public/_build/assets/TSB6MOZK-CpiH97G1.js +1 -0
- package/.output/public/_build/assets/Toast-3-eXCAKc.css +1 -0
- package/.output/public/_build/assets/Toast-C1zr9crB.js +1 -0
- package/.output/public/_build/assets/WorkspaceQuery.graphql-UoI7QDs4.js +23 -0
- package/.output/public/_build/assets/_...404_-WZ8kAljY.js +1 -0
- package/.output/public/_build/assets/_challengeId_-Dk-0l7zl.js +1 -0
- package/.output/public/_build/assets/_id_-YcZZShAv.css +1 -0
- package/.output/public/_build/assets/_id_-bpxdclBj.js +1 -0
- package/.output/public/_build/assets/_slug_-CyTA2aW7.css +1 -0
- package/.output/public/_build/assets/_slug_-DXfRknzJ.js +200 -0
- package/.output/public/_build/assets/about-DIrbzRsi.js +1 -0
- package/.output/public/_build/assets/actors-HfZh_afh.js +24 -0
- package/.output/public/_build/assets/client-CGFoRcqH.js +3 -0
- package/.output/public/_build/assets/components-5MVu7IcD.js +1 -0
- package/.output/public/_build/assets/dist-BrJ_B8nU.js +1 -0
- package/.output/public/_build/assets/dist-DVo0HS5G.js +1 -0
- package/.output/public/_build/assets/dist-WrlGlK67.js +1 -0
- package/.output/public/_build/assets/entry-client-BurSTYr9.css +1 -0
- package/.output/public/_build/assets/entry-client-Do7ocrsL.js +8 -0
- package/.output/public/_build/assets/form-BxigYd7J.css +1 -0
- package/.output/public/_build/assets/form.module-BecmEfV_.js +1 -0
- package/.output/public/_build/assets/index-BHn6sAgH.js +23 -0
- package/.output/public/_build/assets/index-BSLqnqN7.js +8 -0
- package/.output/public/_build/assets/index-B_xLBDOo.css +1 -0
- package/.output/public/_build/assets/instance-tpMrvJNZ.js +35 -0
- package/.output/public/_build/assets/label-Mv8GZ4jc.js +1 -0
- package/.output/public/_build/assets/objects-DPb8DI8A.css +1 -0
- package/.output/public/_build/assets/objects-DR9TfL-V.js +25 -0
- package/.output/public/_build/assets/relay-runtime-BX3uubtA.js +7 -0
- package/.output/public/_build/assets/routing-DMN2NHu6.js +1 -0
- package/.output/public/_build/assets/sign-in-B67sv7z8.js +10 -0
- package/.output/public/_build/assets/web-DB_Nkq2D.js +1 -0
- package/.output/public/apple-touch-icon.png +0 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/icon-192.png +0 -0
- package/.output/public/icon-512.png +0 -0
- package/.output/public/icon-mask.png +0 -0
- package/.output/public/icon.svg +395 -0
- package/.output/public/manifest.webmanifest +13 -0
- package/.output/server/_...404_-DDEH5apf.mjs +16 -0
- package/.output/server/_challengeId_-C_n_Bww9.mjs +100 -0
- package/.output/server/_chunks/ssr-renderer.mjs +26 -0
- package/.output/server/_id_-DqytvZEf.mjs +505 -0
- package/.output/server/_libs/@shikijs/core+[...].mjs +7173 -0
- package/.output/server/_libs/@shikijs/engine-javascript+[...].mjs +3110 -0
- package/.output/server/_libs/babel__runtime.mjs +243 -0
- package/.output/server/_libs/dequal.mjs +25 -0
- package/.output/server/_libs/faker-js__faker.mjs +13150 -0
- package/.output/server/_libs/fbjs.mjs +115 -0
- package/.output/server/_libs/h3+rou3+srvx.mjs +650 -0
- package/.output/server/_libs/hookable.mjs +41 -0
- package/.output/server/_libs/invariant.mjs +36 -0
- package/.output/server/_libs/relay-runtime.mjs +9704 -0
- package/.output/server/_libs/seroval-plugins.mjs +563 -0
- package/.output/server/_libs/seroval.mjs +2956 -0
- package/.output/server/_libs/shikijs__langs.mjs +3 -0
- package/.output/server/_libs/shikijs__themes.mjs +7 -0
- package/.output/server/_libs/solid-js.mjs +1248 -0
- package/.output/server/_libs/solid-relay+tiny-invariant.mjs +1029 -0
- package/.output/server/_libs/ufo.mjs +64 -0
- package/.output/server/_libs/valibot.mjs +711 -0
- package/.output/server/_runtime.mjs +33 -0
- package/.output/server/_slug_-CBOaSqoF.mjs +978 -0
- package/.output/server/_ssr/ActorDetailQuery.graphql-C1mWRP1B.mjs +283 -0
- package/.output/server/_ssr/CompleteLoginChallenge.graphql-CM7o_Md1.mjs +78 -0
- package/.output/server/_ssr/CopyButton-CQNR5D1y.mjs +43 -0
- package/.output/server/_ssr/CreateInstanceMutation.graphql-C-h2lGxz.mjs +116 -0
- package/.output/server/_ssr/CreateObjectMutation.graphql-C393Hp7q.mjs +166 -0
- package/.output/server/_ssr/GenerateActorsMutation.graphql-D2ADtn1j.mjs +163 -0
- package/.output/server/_ssr/GetHostQuery.graphql-C45XQo1i.mjs +127 -0
- package/.output/server/_ssr/HomeViewerQuery.graphql-Dote4Pkz.mjs +81 -0
- package/.output/server/_ssr/InstanceActorListQuery.graphql-DgItgN5t.mjs +167 -0
- package/.output/server/_ssr/InstanceDetailQuery.graphql-DP5wWWjX.mjs +367 -0
- package/.output/server/_ssr/JNCCF6MP-BAZlBnvx.mjs +419 -0
- package/.output/server/_ssr/LP6E37CW-D2Ih_b_K.mjs +163 -0
- package/.output/server/_ssr/SignInMutation.graphql-BBXmiay6.mjs +72 -0
- package/.output/server/_ssr/TSB6MOZK-D06WZb6o.mjs +166 -0
- package/.output/server/_ssr/Toast-Bb1gcxED.mjs +947 -0
- package/.output/server/_ssr/WorkspaceQuery.graphql-DnCO8t-4.mjs +153 -0
- package/.output/server/_ssr/about-CD3QIgf_.mjs +14 -0
- package/.output/server/_ssr/actors-CMWf-xQU.mjs +1160 -0
- package/.output/server/_ssr/dist-D6rgyh-L.mjs +81 -0
- package/.output/server/_ssr/dist-I7KRMRbA.mjs +432 -0
- package/.output/server/_ssr/form.module-CTvIl1lm.mjs +192 -0
- package/.output/server/_ssr/index-C4crD6q-.mjs +347 -0
- package/.output/server/_ssr/index-yuhuc6-X.mjs +111 -0
- package/.output/server/_ssr/instance-ZYWGeWd3.mjs +280 -0
- package/.output/server/_ssr/label-DAXzanI9.mjs +9 -0
- package/.output/server/_ssr/objects-D5MVukzB.mjs +4316 -0
- package/.output/server/_ssr/routing-DKTLkkbY.mjs +620 -0
- package/.output/server/_ssr/sign-in-CNHZb_zL.mjs +264 -0
- package/.output/server/_ssr/ssr.mjs +6121 -0
- package/.output/server/index.mjs +684 -0
- package/LICENSE +661 -0
- package/README.md +143 -2
- package/dist/bridge.d.mts +39 -0
- package/dist/bridge.mjs +104 -0
- package/dist/bridge.mjs.map +1 -0
- package/dist/request-policy.d.mts +8 -0
- package/dist/request-policy.mjs +94 -0
- package/dist/request-policy.mjs.map +1 -0
- package/dist/runtime.d.mts +14 -0
- package/dist/runtime.mjs +44 -0
- package/dist/runtime.mjs.map +1 -0
- package/package.json +123 -3
|
@@ -0,0 +1,1248 @@
|
|
|
1
|
+
import { l as dn, s as M, u as mr } from "./seroval.mjs";
|
|
2
|
+
import { a as fe, c as p, d as te, i as Y, l as pe, n as L, o as l, r as O, s as ne, t as K, u as q } from "./seroval-plugins.mjs";
|
|
3
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
+
//#region ../../node_modules/.pnpm/solid-js@1.9.14/node_modules/solid-js/dist/server.js
|
|
5
|
+
var $TRACK = Symbol("solid-track");
|
|
6
|
+
var ERROR = Symbol("error");
|
|
7
|
+
function castError(err) {
|
|
8
|
+
if (err instanceof Error) return err;
|
|
9
|
+
return new Error(typeof err === "string" ? err : "Unknown error", { cause: err });
|
|
10
|
+
}
|
|
11
|
+
function handleError(err, owner = Owner) {
|
|
12
|
+
const fns = owner && owner.context && owner.context[ERROR];
|
|
13
|
+
const error = castError(err);
|
|
14
|
+
if (!fns) throw error;
|
|
15
|
+
try {
|
|
16
|
+
for (const f of fns) f(error);
|
|
17
|
+
} catch (e) {
|
|
18
|
+
handleError(e, owner && owner.owner || null);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var UNOWNED = {
|
|
22
|
+
context: null,
|
|
23
|
+
owner: null,
|
|
24
|
+
owned: null,
|
|
25
|
+
cleanups: null
|
|
26
|
+
};
|
|
27
|
+
var Owner = null;
|
|
28
|
+
function createOwner() {
|
|
29
|
+
const o = {
|
|
30
|
+
owner: Owner,
|
|
31
|
+
context: Owner ? Owner.context : null,
|
|
32
|
+
owned: null,
|
|
33
|
+
cleanups: null
|
|
34
|
+
};
|
|
35
|
+
if (Owner) if (!Owner.owned) Owner.owned = [o];
|
|
36
|
+
else Owner.owned.push(o);
|
|
37
|
+
return o;
|
|
38
|
+
}
|
|
39
|
+
function createRoot(fn, detachedOwner) {
|
|
40
|
+
const owner = Owner, current = detachedOwner === void 0 ? owner : detachedOwner, root = fn.length === 0 ? UNOWNED : {
|
|
41
|
+
context: current ? current.context : null,
|
|
42
|
+
owner: current,
|
|
43
|
+
owned: null,
|
|
44
|
+
cleanups: null
|
|
45
|
+
};
|
|
46
|
+
Owner = root;
|
|
47
|
+
let result;
|
|
48
|
+
try {
|
|
49
|
+
result = fn(fn.length === 0 ? () => {} : () => cleanNode(root));
|
|
50
|
+
} catch (err) {
|
|
51
|
+
handleError(err);
|
|
52
|
+
} finally {
|
|
53
|
+
Owner = owner;
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
function createSignal(value, options) {
|
|
58
|
+
return [() => value, (v) => {
|
|
59
|
+
return value = typeof v === "function" ? v(value) : v;
|
|
60
|
+
}];
|
|
61
|
+
}
|
|
62
|
+
function createComputed(fn, value) {
|
|
63
|
+
Owner = createOwner();
|
|
64
|
+
try {
|
|
65
|
+
fn(value);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
handleError(err);
|
|
68
|
+
} finally {
|
|
69
|
+
Owner = Owner.owner;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
var createRenderEffect = createComputed;
|
|
73
|
+
function createEffect(fn, value) {}
|
|
74
|
+
function createMemo(fn, value) {
|
|
75
|
+
Owner = createOwner();
|
|
76
|
+
let v;
|
|
77
|
+
try {
|
|
78
|
+
v = fn(value);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
handleError(err);
|
|
81
|
+
} finally {
|
|
82
|
+
Owner = Owner.owner;
|
|
83
|
+
}
|
|
84
|
+
return () => v;
|
|
85
|
+
}
|
|
86
|
+
function batch(fn) {
|
|
87
|
+
return fn();
|
|
88
|
+
}
|
|
89
|
+
var untrack = batch;
|
|
90
|
+
function on(deps, fn, options = {}) {
|
|
91
|
+
const isArray = Array.isArray(deps);
|
|
92
|
+
const defer = options.defer;
|
|
93
|
+
return () => {
|
|
94
|
+
if (defer) return void 0;
|
|
95
|
+
let value;
|
|
96
|
+
if (isArray) {
|
|
97
|
+
value = [];
|
|
98
|
+
for (let i = 0; i < deps.length; i++) value.push(deps[i]());
|
|
99
|
+
} else value = deps();
|
|
100
|
+
return fn(value);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function onMount(fn) {}
|
|
104
|
+
function onCleanup(fn) {
|
|
105
|
+
if (Owner) if (!Owner.cleanups) Owner.cleanups = [fn];
|
|
106
|
+
else Owner.cleanups.push(fn);
|
|
107
|
+
return fn;
|
|
108
|
+
}
|
|
109
|
+
function cleanNode(node) {
|
|
110
|
+
if (node.owned) {
|
|
111
|
+
for (let i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);
|
|
112
|
+
node.owned = null;
|
|
113
|
+
}
|
|
114
|
+
if (node.cleanups) {
|
|
115
|
+
for (let i = 0; i < node.cleanups.length; i++) node.cleanups[i]();
|
|
116
|
+
node.cleanups = null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function catchError(fn, handler) {
|
|
120
|
+
const owner = createOwner();
|
|
121
|
+
owner.context = {
|
|
122
|
+
...owner.context,
|
|
123
|
+
[ERROR]: [handler]
|
|
124
|
+
};
|
|
125
|
+
Owner = owner;
|
|
126
|
+
try {
|
|
127
|
+
return fn();
|
|
128
|
+
} catch (err) {
|
|
129
|
+
handleError(err);
|
|
130
|
+
} finally {
|
|
131
|
+
Owner = Owner.owner;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function getListener() {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
function createContext(defaultValue) {
|
|
138
|
+
const id = Symbol("context");
|
|
139
|
+
return {
|
|
140
|
+
id,
|
|
141
|
+
Provider: createProvider(id),
|
|
142
|
+
defaultValue
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function useContext(context) {
|
|
146
|
+
return Owner && Owner.context && Owner.context[context.id] !== void 0 ? Owner.context[context.id] : context.defaultValue;
|
|
147
|
+
}
|
|
148
|
+
function getOwner() {
|
|
149
|
+
return Owner;
|
|
150
|
+
}
|
|
151
|
+
function children(fn) {
|
|
152
|
+
const memo = createMemo(() => resolveChildren(fn()));
|
|
153
|
+
memo.toArray = () => {
|
|
154
|
+
const c = memo();
|
|
155
|
+
return Array.isArray(c) ? c : c != null ? [c] : [];
|
|
156
|
+
};
|
|
157
|
+
return memo;
|
|
158
|
+
}
|
|
159
|
+
function runWithOwner(o, fn) {
|
|
160
|
+
const prev = Owner;
|
|
161
|
+
Owner = o;
|
|
162
|
+
try {
|
|
163
|
+
return fn();
|
|
164
|
+
} catch (err) {
|
|
165
|
+
handleError(err);
|
|
166
|
+
} finally {
|
|
167
|
+
Owner = prev;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function resolveChildren(children) {
|
|
171
|
+
if (typeof children === "function" && !children.length) return resolveChildren(children());
|
|
172
|
+
if (Array.isArray(children)) {
|
|
173
|
+
const results = [];
|
|
174
|
+
for (let i = 0; i < children.length; i++) {
|
|
175
|
+
const result = resolveChildren(children[i]);
|
|
176
|
+
if (Array.isArray(result)) if (result.length < 32768) results.push.apply(results, result);
|
|
177
|
+
else for (let j = 0; j < result.length; j++) results.push(result[j]);
|
|
178
|
+
else results.push(result);
|
|
179
|
+
}
|
|
180
|
+
return results;
|
|
181
|
+
}
|
|
182
|
+
return children;
|
|
183
|
+
}
|
|
184
|
+
function createProvider(id) {
|
|
185
|
+
return function provider(props) {
|
|
186
|
+
return createMemo(() => {
|
|
187
|
+
Owner.context = {
|
|
188
|
+
...Owner.context,
|
|
189
|
+
[id]: props.value
|
|
190
|
+
};
|
|
191
|
+
return children(() => props.children);
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function escape$1(s, attr) {
|
|
196
|
+
const t = typeof s;
|
|
197
|
+
if (t !== "string") {
|
|
198
|
+
if (t === "function") return escape$1(s());
|
|
199
|
+
if (Array.isArray(s)) {
|
|
200
|
+
for (let i = 0; i < s.length; i++) s[i] = escape$1(s[i]);
|
|
201
|
+
return s;
|
|
202
|
+
}
|
|
203
|
+
return s;
|
|
204
|
+
}
|
|
205
|
+
const delim = "<";
|
|
206
|
+
const escDelim = "<";
|
|
207
|
+
let iDelim = s.indexOf(delim);
|
|
208
|
+
let iAmp = s.indexOf("&");
|
|
209
|
+
if (iDelim < 0 && iAmp < 0) return s;
|
|
210
|
+
let left = 0, out = "";
|
|
211
|
+
while (iDelim >= 0 && iAmp >= 0) if (iDelim < iAmp) {
|
|
212
|
+
if (left < iDelim) out += s.substring(left, iDelim);
|
|
213
|
+
out += escDelim;
|
|
214
|
+
left = iDelim + 1;
|
|
215
|
+
iDelim = s.indexOf(delim, left);
|
|
216
|
+
} else {
|
|
217
|
+
if (left < iAmp) out += s.substring(left, iAmp);
|
|
218
|
+
out += "&";
|
|
219
|
+
left = iAmp + 1;
|
|
220
|
+
iAmp = s.indexOf("&", left);
|
|
221
|
+
}
|
|
222
|
+
if (iDelim >= 0) do {
|
|
223
|
+
if (left < iDelim) out += s.substring(left, iDelim);
|
|
224
|
+
out += escDelim;
|
|
225
|
+
left = iDelim + 1;
|
|
226
|
+
iDelim = s.indexOf(delim, left);
|
|
227
|
+
} while (iDelim >= 0);
|
|
228
|
+
else while (iAmp >= 0) {
|
|
229
|
+
if (left < iAmp) out += s.substring(left, iAmp);
|
|
230
|
+
out += "&";
|
|
231
|
+
left = iAmp + 1;
|
|
232
|
+
iAmp = s.indexOf("&", left);
|
|
233
|
+
}
|
|
234
|
+
return left < s.length ? out + s.substring(left) : out;
|
|
235
|
+
}
|
|
236
|
+
function resolveSSRNode$1(node) {
|
|
237
|
+
const t = typeof node;
|
|
238
|
+
if (t === "string") return node;
|
|
239
|
+
if (node == null || t === "boolean") return "";
|
|
240
|
+
if (Array.isArray(node)) {
|
|
241
|
+
let prev = {};
|
|
242
|
+
let mapped = "";
|
|
243
|
+
for (let i = 0, len = node.length; i < len; i++) {
|
|
244
|
+
if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!$-->`;
|
|
245
|
+
mapped += resolveSSRNode$1(prev = node[i]);
|
|
246
|
+
}
|
|
247
|
+
return mapped;
|
|
248
|
+
}
|
|
249
|
+
if (t === "object") return node.t;
|
|
250
|
+
if (t === "function") return resolveSSRNode$1(node());
|
|
251
|
+
return String(node);
|
|
252
|
+
}
|
|
253
|
+
var sharedConfig = {
|
|
254
|
+
context: void 0,
|
|
255
|
+
getContextId() {
|
|
256
|
+
if (!this.context) throw new Error(`getContextId cannot be used under non-hydrating context`);
|
|
257
|
+
return getContextId(this.context.count);
|
|
258
|
+
},
|
|
259
|
+
getNextContextId() {
|
|
260
|
+
if (!this.context) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
|
|
261
|
+
return getContextId(this.context.count++);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
function getContextId(count) {
|
|
265
|
+
const num = String(count), len = num.length - 1;
|
|
266
|
+
return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num;
|
|
267
|
+
}
|
|
268
|
+
function setHydrateContext(context) {
|
|
269
|
+
sharedConfig.context = context;
|
|
270
|
+
}
|
|
271
|
+
function nextHydrateContext() {
|
|
272
|
+
return sharedConfig.context ? {
|
|
273
|
+
...sharedConfig.context,
|
|
274
|
+
id: sharedConfig.getNextContextId(),
|
|
275
|
+
count: 0
|
|
276
|
+
} : void 0;
|
|
277
|
+
}
|
|
278
|
+
function createUniqueId() {
|
|
279
|
+
return sharedConfig.getNextContextId();
|
|
280
|
+
}
|
|
281
|
+
function createComponent(Comp, props) {
|
|
282
|
+
if (sharedConfig.context && !sharedConfig.context.noHydrate) {
|
|
283
|
+
const c = sharedConfig.context;
|
|
284
|
+
setHydrateContext(nextHydrateContext());
|
|
285
|
+
const r = Comp(props || {});
|
|
286
|
+
setHydrateContext(c);
|
|
287
|
+
return r;
|
|
288
|
+
}
|
|
289
|
+
return Comp(props || {});
|
|
290
|
+
}
|
|
291
|
+
function mergeProps(...sources) {
|
|
292
|
+
const target = {};
|
|
293
|
+
for (let i = 0; i < sources.length; i++) {
|
|
294
|
+
let source = sources[i];
|
|
295
|
+
if (typeof source === "function") source = source();
|
|
296
|
+
if (source) {
|
|
297
|
+
const descriptors = Object.getOwnPropertyDescriptors(source);
|
|
298
|
+
for (const key in descriptors) {
|
|
299
|
+
if (key === "__proto__" || key === "constructor" || Object.prototype.hasOwnProperty.call(target, key)) continue;
|
|
300
|
+
Object.defineProperty(target, key, {
|
|
301
|
+
enumerable: true,
|
|
302
|
+
get() {
|
|
303
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
304
|
+
let v, s = sources[i];
|
|
305
|
+
if (typeof s === "function") s = s();
|
|
306
|
+
v = (s || {})[key];
|
|
307
|
+
if (v !== void 0) return v;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return target;
|
|
315
|
+
}
|
|
316
|
+
function splitProps(props, ...keys) {
|
|
317
|
+
const descriptors = Object.getOwnPropertyDescriptors(props), split = (k) => {
|
|
318
|
+
const clone = {};
|
|
319
|
+
for (let i = 0; i < k.length; i++) {
|
|
320
|
+
const key = k[i];
|
|
321
|
+
if (descriptors[key]) {
|
|
322
|
+
Object.defineProperty(clone, key, descriptors[key]);
|
|
323
|
+
delete descriptors[key];
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return clone;
|
|
327
|
+
};
|
|
328
|
+
return keys.map(split).concat(split(Object.keys(descriptors)));
|
|
329
|
+
}
|
|
330
|
+
function simpleMap(props, wrap) {
|
|
331
|
+
const list = props.each || [], len = list.length, fn = props.children;
|
|
332
|
+
if (len) {
|
|
333
|
+
let mapped = Array(len);
|
|
334
|
+
for (let i = 0; i < len; i++) mapped[i] = wrap(fn, list[i], i);
|
|
335
|
+
return mapped;
|
|
336
|
+
}
|
|
337
|
+
return props.fallback;
|
|
338
|
+
}
|
|
339
|
+
function For(props) {
|
|
340
|
+
return simpleMap(props, (fn, item, i) => fn(item, () => i));
|
|
341
|
+
}
|
|
342
|
+
function Index(props) {
|
|
343
|
+
return simpleMap(props, (fn, item, i) => fn(() => item, i));
|
|
344
|
+
}
|
|
345
|
+
function Show(props) {
|
|
346
|
+
let c;
|
|
347
|
+
return props.when ? typeof (c = props.children) === "function" && c.length > 0 ? c(props.keyed ? props.when : () => props.when) : c : props.fallback || "";
|
|
348
|
+
}
|
|
349
|
+
function Switch(props) {
|
|
350
|
+
let conditions = props.children;
|
|
351
|
+
Array.isArray(conditions) || (conditions = [conditions]);
|
|
352
|
+
for (let i = 0; i < conditions.length; i++) {
|
|
353
|
+
const w = conditions[i].when;
|
|
354
|
+
if (w) {
|
|
355
|
+
const c = conditions[i].children;
|
|
356
|
+
return typeof c === "function" && c.length > 0 ? c(conditions[i].keyed ? w : () => w) : c;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return props.fallback || "";
|
|
360
|
+
}
|
|
361
|
+
function Match(props) {
|
|
362
|
+
return props;
|
|
363
|
+
}
|
|
364
|
+
function resetErrorBoundaries() {}
|
|
365
|
+
function ErrorBoundary(props) {
|
|
366
|
+
let error, res, clean, sync = true;
|
|
367
|
+
const ctx = sharedConfig.context;
|
|
368
|
+
const id = sharedConfig.getContextId();
|
|
369
|
+
function displayFallback() {
|
|
370
|
+
cleanNode(clean);
|
|
371
|
+
ctx.serialize(id, error);
|
|
372
|
+
setHydrateContext({
|
|
373
|
+
...ctx,
|
|
374
|
+
count: 0
|
|
375
|
+
});
|
|
376
|
+
const f = props.fallback;
|
|
377
|
+
return typeof f === "function" && f.length ? f(error, () => {}) : f;
|
|
378
|
+
}
|
|
379
|
+
createMemo(() => {
|
|
380
|
+
clean = Owner;
|
|
381
|
+
return catchError(() => res = props.children, (err) => {
|
|
382
|
+
error = err;
|
|
383
|
+
!sync && ctx.replace("e" + id, displayFallback);
|
|
384
|
+
sync = true;
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
if (error) return displayFallback();
|
|
388
|
+
sync = false;
|
|
389
|
+
return { t: `<!--!$e${id}-->${resolveSSRNode$1(escape$1(res))}<!--!$/e${id}-->` };
|
|
390
|
+
}
|
|
391
|
+
var SuspenseContext = createContext();
|
|
392
|
+
var resourceContext = null;
|
|
393
|
+
function createResource(source, fetcher, options = {}) {
|
|
394
|
+
if (typeof fetcher !== "function") {
|
|
395
|
+
options = fetcher || {};
|
|
396
|
+
fetcher = source;
|
|
397
|
+
source = true;
|
|
398
|
+
}
|
|
399
|
+
const contexts = /* @__PURE__ */ new Set();
|
|
400
|
+
const id = sharedConfig.getNextContextId();
|
|
401
|
+
let resource = {};
|
|
402
|
+
let value = options.storage ? options.storage(options.initialValue)[0]() : options.initialValue;
|
|
403
|
+
let p;
|
|
404
|
+
let error;
|
|
405
|
+
if (sharedConfig.context.async && options.ssrLoadFrom !== "initial") {
|
|
406
|
+
resource = sharedConfig.context.resources[id] || (sharedConfig.context.resources[id] = {});
|
|
407
|
+
if (resource.ref) {
|
|
408
|
+
if (!resource.data && !resource.ref[0]._loading && !resource.ref[0].error) resource.ref[1].refetch();
|
|
409
|
+
return resource.ref;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
const prepareResource = () => {
|
|
413
|
+
if (error) throw error;
|
|
414
|
+
const resolved = options.ssrLoadFrom !== "initial" && sharedConfig.context.async && "data" in sharedConfig.context.resources[id];
|
|
415
|
+
if (!resolved && resourceContext) resourceContext.push(id);
|
|
416
|
+
if (!resolved && read._loading) {
|
|
417
|
+
const ctx = useContext(SuspenseContext);
|
|
418
|
+
if (ctx) {
|
|
419
|
+
ctx.resources.set(id, read);
|
|
420
|
+
contexts.add(ctx);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return resolved;
|
|
424
|
+
};
|
|
425
|
+
const read = () => {
|
|
426
|
+
return prepareResource() ? sharedConfig.context.resources[id].data : value;
|
|
427
|
+
};
|
|
428
|
+
const loading = () => {
|
|
429
|
+
prepareResource();
|
|
430
|
+
return read._loading;
|
|
431
|
+
};
|
|
432
|
+
read._loading = false;
|
|
433
|
+
read.error = void 0;
|
|
434
|
+
read.state = "initialValue" in options ? "ready" : "unresolved";
|
|
435
|
+
Object.defineProperties(read, {
|
|
436
|
+
latest: { get() {
|
|
437
|
+
return read();
|
|
438
|
+
} },
|
|
439
|
+
loading: { get() {
|
|
440
|
+
return loading();
|
|
441
|
+
} }
|
|
442
|
+
});
|
|
443
|
+
function load() {
|
|
444
|
+
const ctx = sharedConfig.context;
|
|
445
|
+
if (!ctx.async) return read._loading = !!(typeof source === "function" ? source() : source);
|
|
446
|
+
if (ctx.resources && id in ctx.resources && "data" in ctx.resources[id]) {
|
|
447
|
+
value = ctx.resources[id].data;
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
let lookup;
|
|
451
|
+
try {
|
|
452
|
+
resourceContext = [];
|
|
453
|
+
lookup = typeof source === "function" ? source() : source;
|
|
454
|
+
if (resourceContext.length) return;
|
|
455
|
+
} finally {
|
|
456
|
+
resourceContext = null;
|
|
457
|
+
}
|
|
458
|
+
if (!p) {
|
|
459
|
+
if (lookup == null || lookup === false) return;
|
|
460
|
+
p = fetcher(lookup, { value });
|
|
461
|
+
}
|
|
462
|
+
if (p != void 0 && typeof p === "object" && "then" in p) {
|
|
463
|
+
read._loading = true;
|
|
464
|
+
read.state = "pending";
|
|
465
|
+
p = p.then((res) => {
|
|
466
|
+
read._loading = false;
|
|
467
|
+
read.state = "ready";
|
|
468
|
+
ctx.resources[id].data = res;
|
|
469
|
+
p = null;
|
|
470
|
+
notifySuspense(contexts);
|
|
471
|
+
return res;
|
|
472
|
+
}).catch((err) => {
|
|
473
|
+
read._loading = false;
|
|
474
|
+
read.state = "errored";
|
|
475
|
+
read.error = error = castError(err);
|
|
476
|
+
p = null;
|
|
477
|
+
notifySuspense(contexts);
|
|
478
|
+
throw error;
|
|
479
|
+
});
|
|
480
|
+
if (ctx.serialize) ctx.serialize(id, p, options.deferStream);
|
|
481
|
+
return p;
|
|
482
|
+
}
|
|
483
|
+
ctx.resources[id].data = p;
|
|
484
|
+
if (ctx.serialize) ctx.serialize(id, p);
|
|
485
|
+
p = null;
|
|
486
|
+
return ctx.resources[id].data;
|
|
487
|
+
}
|
|
488
|
+
if (options.ssrLoadFrom !== "initial") load();
|
|
489
|
+
const ref = [read, {
|
|
490
|
+
refetch: load,
|
|
491
|
+
mutate: (v) => value = v
|
|
492
|
+
}];
|
|
493
|
+
if (p) resource.ref = ref;
|
|
494
|
+
return ref;
|
|
495
|
+
}
|
|
496
|
+
function lazy(fn) {
|
|
497
|
+
let p;
|
|
498
|
+
let load = (id) => {
|
|
499
|
+
if (!p) {
|
|
500
|
+
p = fn();
|
|
501
|
+
p.then((mod) => p.resolved = mod.default);
|
|
502
|
+
if (id) sharedConfig.context.lazy[id] = p;
|
|
503
|
+
}
|
|
504
|
+
return p;
|
|
505
|
+
};
|
|
506
|
+
const contexts = /* @__PURE__ */ new Set();
|
|
507
|
+
const wrap = (props) => {
|
|
508
|
+
const id = sharedConfig.context.id;
|
|
509
|
+
let ref = sharedConfig.context.lazy[id];
|
|
510
|
+
if (ref) p = ref;
|
|
511
|
+
else load(id);
|
|
512
|
+
if (p.resolved) return p.resolved(props);
|
|
513
|
+
const ctx = useContext(SuspenseContext);
|
|
514
|
+
const track = {
|
|
515
|
+
_loading: true,
|
|
516
|
+
error: void 0
|
|
517
|
+
};
|
|
518
|
+
if (ctx) {
|
|
519
|
+
ctx.resources.set(id, track);
|
|
520
|
+
contexts.add(ctx);
|
|
521
|
+
}
|
|
522
|
+
if (sharedConfig.context.async) sharedConfig.context.block(p.then(() => {
|
|
523
|
+
track._loading = false;
|
|
524
|
+
notifySuspense(contexts);
|
|
525
|
+
}));
|
|
526
|
+
return "";
|
|
527
|
+
};
|
|
528
|
+
wrap.preload = load;
|
|
529
|
+
return wrap;
|
|
530
|
+
}
|
|
531
|
+
function suspenseComplete(c) {
|
|
532
|
+
for (const r of c.resources.values()) if (r._loading) return false;
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
function notifySuspense(contexts) {
|
|
536
|
+
for (const c of contexts) {
|
|
537
|
+
if (!suspenseComplete(c)) continue;
|
|
538
|
+
c.completed();
|
|
539
|
+
contexts.delete(c);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
function startTransition(fn) {
|
|
543
|
+
fn();
|
|
544
|
+
}
|
|
545
|
+
function Suspense(props) {
|
|
546
|
+
let done;
|
|
547
|
+
const ctx = sharedConfig.context;
|
|
548
|
+
const id = sharedConfig.getContextId();
|
|
549
|
+
const o = createOwner();
|
|
550
|
+
const value = ctx.suspense[id] || (ctx.suspense[id] = {
|
|
551
|
+
resources: /* @__PURE__ */ new Map(),
|
|
552
|
+
completed: () => {
|
|
553
|
+
const res = runSuspense();
|
|
554
|
+
if (suspenseComplete(value)) done(resolveSSRNode$1(escape$1(res)));
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
function suspenseError(err) {
|
|
558
|
+
if (!done || !done(void 0, err)) runWithOwner(o.owner, () => {
|
|
559
|
+
throw err;
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
function runSuspense() {
|
|
563
|
+
setHydrateContext({
|
|
564
|
+
...ctx,
|
|
565
|
+
count: 0
|
|
566
|
+
});
|
|
567
|
+
cleanNode(o);
|
|
568
|
+
return runWithOwner(o, () => createComponent(SuspenseContext.Provider, {
|
|
569
|
+
value,
|
|
570
|
+
get children() {
|
|
571
|
+
return catchError(() => props.children, suspenseError);
|
|
572
|
+
}
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
const res = runSuspense();
|
|
576
|
+
if (suspenseComplete(value)) {
|
|
577
|
+
delete ctx.suspense[id];
|
|
578
|
+
return res;
|
|
579
|
+
}
|
|
580
|
+
done = ctx.async ? ctx.registerFragment(id) : void 0;
|
|
581
|
+
return catchError(() => {
|
|
582
|
+
if (ctx.async) {
|
|
583
|
+
setHydrateContext({
|
|
584
|
+
...ctx,
|
|
585
|
+
count: 0,
|
|
586
|
+
id: ctx.id + "0F",
|
|
587
|
+
noHydrate: true
|
|
588
|
+
});
|
|
589
|
+
const res = { t: `<template id="pl-${id}"></template>${resolveSSRNode$1(escape$1(props.fallback))}<!--pl-${id}-->` };
|
|
590
|
+
setHydrateContext(ctx);
|
|
591
|
+
return res;
|
|
592
|
+
}
|
|
593
|
+
setHydrateContext({
|
|
594
|
+
...ctx,
|
|
595
|
+
count: 0,
|
|
596
|
+
id: ctx.id + "0F"
|
|
597
|
+
});
|
|
598
|
+
ctx.serialize(id, "$$f");
|
|
599
|
+
return props.fallback;
|
|
600
|
+
}, suspenseError);
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region ../../node_modules/.pnpm/solid-js@1.9.14/node_modules/solid-js/web/dist/server.js
|
|
604
|
+
var booleans = [
|
|
605
|
+
"allowfullscreen",
|
|
606
|
+
"async",
|
|
607
|
+
"alpha",
|
|
608
|
+
"autofocus",
|
|
609
|
+
"autoplay",
|
|
610
|
+
"checked",
|
|
611
|
+
"controls",
|
|
612
|
+
"default",
|
|
613
|
+
"disabled",
|
|
614
|
+
"formnovalidate",
|
|
615
|
+
"hidden",
|
|
616
|
+
"indeterminate",
|
|
617
|
+
"inert",
|
|
618
|
+
"ismap",
|
|
619
|
+
"loop",
|
|
620
|
+
"multiple",
|
|
621
|
+
"muted",
|
|
622
|
+
"nomodule",
|
|
623
|
+
"novalidate",
|
|
624
|
+
"open",
|
|
625
|
+
"playsinline",
|
|
626
|
+
"readonly",
|
|
627
|
+
"required",
|
|
628
|
+
"reversed",
|
|
629
|
+
"seamless",
|
|
630
|
+
"selected",
|
|
631
|
+
"adauctionheaders",
|
|
632
|
+
"browsingtopics",
|
|
633
|
+
"credentialless",
|
|
634
|
+
"defaultchecked",
|
|
635
|
+
"defaultmuted",
|
|
636
|
+
"defaultselected",
|
|
637
|
+
"defer",
|
|
638
|
+
"disablepictureinpicture",
|
|
639
|
+
"disableremoteplayback",
|
|
640
|
+
"preservespitch",
|
|
641
|
+
"shadowrootclonable",
|
|
642
|
+
"shadowrootcustomelementregistry",
|
|
643
|
+
"shadowrootdelegatesfocus",
|
|
644
|
+
"shadowrootserializable",
|
|
645
|
+
"sharedstoragewritable"
|
|
646
|
+
];
|
|
647
|
+
var BooleanAttributes = /*#__PURE__*/ new Set(booleans);
|
|
648
|
+
[...booleans];
|
|
649
|
+
var ChildProperties = /*#__PURE__*/ new Set([
|
|
650
|
+
"innerHTML",
|
|
651
|
+
"textContent",
|
|
652
|
+
"innerText",
|
|
653
|
+
"children"
|
|
654
|
+
]);
|
|
655
|
+
var Aliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
656
|
+
className: "class",
|
|
657
|
+
htmlFor: "for"
|
|
658
|
+
});
|
|
659
|
+
var ES2017FLAG = M.AggregateError | M.BigIntTypedArray;
|
|
660
|
+
var GLOBAL_IDENTIFIER = "_$HY.r";
|
|
661
|
+
function createSerializer({ onData, onDone, scopeId, onError, plugins: customPlugins }) {
|
|
662
|
+
const defaultPlugins = [
|
|
663
|
+
O,
|
|
664
|
+
L,
|
|
665
|
+
q,
|
|
666
|
+
Y,
|
|
667
|
+
K,
|
|
668
|
+
l,
|
|
669
|
+
p,
|
|
670
|
+
te,
|
|
671
|
+
ne,
|
|
672
|
+
fe,
|
|
673
|
+
pe
|
|
674
|
+
];
|
|
675
|
+
return new mr({
|
|
676
|
+
scopeId,
|
|
677
|
+
plugins: customPlugins ? [...customPlugins, ...defaultPlugins] : defaultPlugins,
|
|
678
|
+
globalIdentifier: GLOBAL_IDENTIFIER,
|
|
679
|
+
disabledFeatures: ES2017FLAG,
|
|
680
|
+
onData,
|
|
681
|
+
onDone,
|
|
682
|
+
onError
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
function getLocalHeaderScript(id) {
|
|
686
|
+
return dn(id) + ";";
|
|
687
|
+
}
|
|
688
|
+
var VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
|
|
689
|
+
var REPLACE_SCRIPT = `function $df(e,n,o,t){if(n=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)t=o.nextSibling,o.remove(),o=t;_$HY.done?o.remove():o.replaceWith(n.content)}n.remove(),_$HY.fe(e)}`;
|
|
690
|
+
function renderToString(code, options = {}) {
|
|
691
|
+
const { renderId } = options;
|
|
692
|
+
let scripts = "";
|
|
693
|
+
const serializer = createSerializer({
|
|
694
|
+
scopeId: renderId,
|
|
695
|
+
plugins: options.plugins,
|
|
696
|
+
onData(script) {
|
|
697
|
+
if (!scripts) scripts = getLocalHeaderScript(renderId);
|
|
698
|
+
scripts += script + ";";
|
|
699
|
+
},
|
|
700
|
+
onError: options.onError
|
|
701
|
+
});
|
|
702
|
+
sharedConfig.context = {
|
|
703
|
+
id: renderId || "",
|
|
704
|
+
count: 0,
|
|
705
|
+
suspense: {},
|
|
706
|
+
lazy: {},
|
|
707
|
+
assets: [],
|
|
708
|
+
nonce: options.nonce,
|
|
709
|
+
serialize(id, p) {
|
|
710
|
+
!sharedConfig.context.noHydrate && serializer.write(id, p);
|
|
711
|
+
},
|
|
712
|
+
roots: 0,
|
|
713
|
+
nextRoot() {
|
|
714
|
+
return this.renderId + "i-" + this.roots++;
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
let html = createRoot((d) => {
|
|
718
|
+
setTimeout(d);
|
|
719
|
+
return resolveSSRNode(escape(code()));
|
|
720
|
+
});
|
|
721
|
+
sharedConfig.context.noHydrate = true;
|
|
722
|
+
serializer.close();
|
|
723
|
+
html = injectAssets(sharedConfig.context.assets, html);
|
|
724
|
+
if (scripts.length) html = injectScripts(html, scripts, options.nonce);
|
|
725
|
+
return html;
|
|
726
|
+
}
|
|
727
|
+
function renderToStream(code, options = {}) {
|
|
728
|
+
let { nonce, onCompleteShell, onCompleteAll, renderId, noScripts } = options;
|
|
729
|
+
let dispose;
|
|
730
|
+
const blockingPromises = [];
|
|
731
|
+
const pushTask = (task) => {
|
|
732
|
+
if (noScripts) return;
|
|
733
|
+
if (!tasks && !firstFlushed) tasks = getLocalHeaderScript(renderId);
|
|
734
|
+
tasks += task + ";";
|
|
735
|
+
if (!timer && firstFlushed) timer = setTimeout(writeTasks);
|
|
736
|
+
};
|
|
737
|
+
const onDone = () => {
|
|
738
|
+
writeTasks();
|
|
739
|
+
doShell();
|
|
740
|
+
onCompleteAll && onCompleteAll({ write(v) {
|
|
741
|
+
!completed && buffer.write(v);
|
|
742
|
+
} });
|
|
743
|
+
writable && writable.end();
|
|
744
|
+
completed = true;
|
|
745
|
+
if (firstFlushed) dispose();
|
|
746
|
+
};
|
|
747
|
+
const serializer = createSerializer({
|
|
748
|
+
scopeId: options.renderId,
|
|
749
|
+
plugins: options.plugins,
|
|
750
|
+
onData: pushTask,
|
|
751
|
+
onDone,
|
|
752
|
+
onError: options.onError
|
|
753
|
+
});
|
|
754
|
+
const flushEnd = () => {
|
|
755
|
+
if (!registry.size) queue(() => queue(() => serializer.flush()));
|
|
756
|
+
};
|
|
757
|
+
const registry = /* @__PURE__ */ new Map();
|
|
758
|
+
const writeTasks = () => {
|
|
759
|
+
if (tasks.length && !completed && firstFlushed) {
|
|
760
|
+
buffer.write(`<script${nonce ? ` nonce="${nonce}"` : ""}>${tasks}<\/script>`);
|
|
761
|
+
tasks = "";
|
|
762
|
+
}
|
|
763
|
+
timer && clearTimeout(timer);
|
|
764
|
+
timer = null;
|
|
765
|
+
};
|
|
766
|
+
let context;
|
|
767
|
+
let writable;
|
|
768
|
+
let tmp = "";
|
|
769
|
+
let tasks = "";
|
|
770
|
+
let firstFlushed = false;
|
|
771
|
+
let completed = false;
|
|
772
|
+
let shellCompleted = false;
|
|
773
|
+
let scriptFlushed = false;
|
|
774
|
+
let timer = null;
|
|
775
|
+
let buffer = { write(payload) {
|
|
776
|
+
tmp += payload;
|
|
777
|
+
} };
|
|
778
|
+
sharedConfig.context = context = {
|
|
779
|
+
id: renderId || "",
|
|
780
|
+
count: 0,
|
|
781
|
+
async: true,
|
|
782
|
+
resources: {},
|
|
783
|
+
lazy: {},
|
|
784
|
+
suspense: {},
|
|
785
|
+
assets: [],
|
|
786
|
+
nonce,
|
|
787
|
+
block(p) {
|
|
788
|
+
if (!firstFlushed) blockingPromises.push(p);
|
|
789
|
+
},
|
|
790
|
+
replace(id, payloadFn) {
|
|
791
|
+
if (firstFlushed) return;
|
|
792
|
+
const placeholder = `<!--!$${id}-->`;
|
|
793
|
+
const first = html.indexOf(placeholder);
|
|
794
|
+
if (first === -1) return;
|
|
795
|
+
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
796
|
+
html = html.slice(0, first) + resolveSSRNode(escape(payloadFn())) + html.slice(last + placeholder.length + 1);
|
|
797
|
+
},
|
|
798
|
+
serialize(id, p, wait) {
|
|
799
|
+
const serverOnly = sharedConfig.context.noHydrate;
|
|
800
|
+
if (!firstFlushed && wait && typeof p === "object" && "then" in p) {
|
|
801
|
+
blockingPromises.push(p);
|
|
802
|
+
!serverOnly && p.then((d) => {
|
|
803
|
+
serializer.write(id, d);
|
|
804
|
+
}).catch((e) => {
|
|
805
|
+
serializer.write(id, e);
|
|
806
|
+
});
|
|
807
|
+
} else if (!serverOnly) serializer.write(id, p);
|
|
808
|
+
},
|
|
809
|
+
roots: 0,
|
|
810
|
+
nextRoot() {
|
|
811
|
+
return this.renderId + "i-" + this.roots++;
|
|
812
|
+
},
|
|
813
|
+
registerFragment(key) {
|
|
814
|
+
if (!registry.has(key)) {
|
|
815
|
+
let resolve, reject;
|
|
816
|
+
const p = new Promise((r, rej) => (resolve = r, reject = rej));
|
|
817
|
+
registry.set(key, (err) => queue(() => queue(() => {
|
|
818
|
+
err ? reject(err) : resolve(true);
|
|
819
|
+
queue(flushEnd);
|
|
820
|
+
})));
|
|
821
|
+
serializer.write(key, p);
|
|
822
|
+
}
|
|
823
|
+
return (value, error) => {
|
|
824
|
+
if (registry.has(key)) {
|
|
825
|
+
const resolve = registry.get(key);
|
|
826
|
+
registry.delete(key);
|
|
827
|
+
if (waitForFragments(registry, key)) {
|
|
828
|
+
resolve();
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
if (!completed) if (!firstFlushed) {
|
|
832
|
+
queue(() => html = replacePlaceholder(html, key, value !== void 0 ? value : ""));
|
|
833
|
+
resolve(error);
|
|
834
|
+
} else {
|
|
835
|
+
buffer.write(`<template id="${key}">${value !== void 0 ? value : " "}</template>`);
|
|
836
|
+
pushTask(`$df("${key}")${!scriptFlushed ? ";" + REPLACE_SCRIPT : ""}`);
|
|
837
|
+
resolve(error);
|
|
838
|
+
scriptFlushed = true;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
return firstFlushed;
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
let html = createRoot((d) => {
|
|
846
|
+
dispose = d;
|
|
847
|
+
return resolveSSRNode(escape(code()));
|
|
848
|
+
});
|
|
849
|
+
function doShell() {
|
|
850
|
+
if (shellCompleted) return;
|
|
851
|
+
sharedConfig.context = context;
|
|
852
|
+
context.noHydrate = true;
|
|
853
|
+
html = injectAssets(context.assets, html);
|
|
854
|
+
if (tasks.length) html = injectScripts(html, tasks, nonce);
|
|
855
|
+
buffer.write(html);
|
|
856
|
+
tasks = "";
|
|
857
|
+
onCompleteShell && onCompleteShell({ write(v) {
|
|
858
|
+
!completed && buffer.write(v);
|
|
859
|
+
} });
|
|
860
|
+
shellCompleted = true;
|
|
861
|
+
}
|
|
862
|
+
return {
|
|
863
|
+
then(fn) {
|
|
864
|
+
function complete() {
|
|
865
|
+
dispose();
|
|
866
|
+
fn(tmp);
|
|
867
|
+
}
|
|
868
|
+
if (onCompleteAll) {
|
|
869
|
+
let ogComplete = onCompleteAll;
|
|
870
|
+
onCompleteAll = (options) => {
|
|
871
|
+
ogComplete(options);
|
|
872
|
+
complete();
|
|
873
|
+
};
|
|
874
|
+
} else onCompleteAll = complete;
|
|
875
|
+
queue(flushEnd);
|
|
876
|
+
},
|
|
877
|
+
pipe(w) {
|
|
878
|
+
allSettled(blockingPromises).then(() => {
|
|
879
|
+
setTimeout(() => {
|
|
880
|
+
doShell();
|
|
881
|
+
buffer = writable = w;
|
|
882
|
+
buffer.write(tmp);
|
|
883
|
+
firstFlushed = true;
|
|
884
|
+
if (completed) {
|
|
885
|
+
dispose();
|
|
886
|
+
writable.end();
|
|
887
|
+
} else flushEnd();
|
|
888
|
+
});
|
|
889
|
+
});
|
|
890
|
+
},
|
|
891
|
+
pipeTo(w) {
|
|
892
|
+
return allSettled(blockingPromises).then(() => {
|
|
893
|
+
let resolve;
|
|
894
|
+
const p = new Promise((r) => resolve = r);
|
|
895
|
+
setTimeout(() => {
|
|
896
|
+
doShell();
|
|
897
|
+
const encoder = new TextEncoder();
|
|
898
|
+
const writer = w.getWriter();
|
|
899
|
+
writable = { end() {
|
|
900
|
+
writer.releaseLock();
|
|
901
|
+
w.close().catch(() => {});
|
|
902
|
+
resolve();
|
|
903
|
+
} };
|
|
904
|
+
buffer = { write(payload) {
|
|
905
|
+
writer.write(encoder.encode(payload)).catch(() => {});
|
|
906
|
+
} };
|
|
907
|
+
buffer.write(tmp);
|
|
908
|
+
firstFlushed = true;
|
|
909
|
+
if (completed) {
|
|
910
|
+
dispose();
|
|
911
|
+
writable.end();
|
|
912
|
+
} else flushEnd();
|
|
913
|
+
});
|
|
914
|
+
return p;
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
function HydrationScript(props) {
|
|
920
|
+
const { nonce } = sharedConfig.context;
|
|
921
|
+
return ssr(generateHydrationScript({
|
|
922
|
+
nonce,
|
|
923
|
+
...props
|
|
924
|
+
}));
|
|
925
|
+
}
|
|
926
|
+
function ssr(t, ...nodes) {
|
|
927
|
+
if (nodes.length) {
|
|
928
|
+
let result = "";
|
|
929
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
930
|
+
result += t[i];
|
|
931
|
+
const node = nodes[i];
|
|
932
|
+
if (node !== void 0) result += resolveSSRNode(node);
|
|
933
|
+
}
|
|
934
|
+
t = result + t[nodes.length];
|
|
935
|
+
}
|
|
936
|
+
return { t };
|
|
937
|
+
}
|
|
938
|
+
function ssrClassList(value) {
|
|
939
|
+
if (!value) return "";
|
|
940
|
+
let classKeys = Object.keys(value), result = "";
|
|
941
|
+
for (let i = 0, len = classKeys.length; i < len; i++) {
|
|
942
|
+
const key = classKeys[i], classValue = !!value[key];
|
|
943
|
+
if (!key || key === "undefined" || !classValue) continue;
|
|
944
|
+
i && (result += " ");
|
|
945
|
+
result += escape(key);
|
|
946
|
+
}
|
|
947
|
+
return result;
|
|
948
|
+
}
|
|
949
|
+
function ssrStyle(value) {
|
|
950
|
+
if (!value) return "";
|
|
951
|
+
if (typeof value === "string") return escape(value, true);
|
|
952
|
+
let result = "";
|
|
953
|
+
const k = Object.keys(value);
|
|
954
|
+
for (let i = 0; i < k.length; i++) {
|
|
955
|
+
const s = k[i];
|
|
956
|
+
const v = value[s];
|
|
957
|
+
if (v != void 0) {
|
|
958
|
+
if (i) result += ";";
|
|
959
|
+
const r = escape(v, true);
|
|
960
|
+
if (r != void 0 && r !== "undefined") result += `${s}:${r}`;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
return result;
|
|
964
|
+
}
|
|
965
|
+
function ssrStyleProperty(name, value) {
|
|
966
|
+
return value != null ? name + value : "";
|
|
967
|
+
}
|
|
968
|
+
function ssrElement(tag, props, children, needsId) {
|
|
969
|
+
if (props == null) props = {};
|
|
970
|
+
else if (typeof props === "function") props = props();
|
|
971
|
+
const skipChildren = VOID_ELEMENTS.test(tag);
|
|
972
|
+
const keys = Object.keys(props);
|
|
973
|
+
let result = `<${tag}${needsId ? ssrHydrationKey() : ""} `;
|
|
974
|
+
let classResolved;
|
|
975
|
+
for (let i = 0; i < keys.length; i++) {
|
|
976
|
+
const prop = keys[i];
|
|
977
|
+
if (ChildProperties.has(prop)) {
|
|
978
|
+
if (children === void 0 && !skipChildren) children = tag === "script" || tag === "style" || prop === "innerHTML" ? props[prop] : escape(props[prop]);
|
|
979
|
+
continue;
|
|
980
|
+
}
|
|
981
|
+
const value = props[prop];
|
|
982
|
+
if (prop === "style") result += `style="${ssrStyle(value)}"`;
|
|
983
|
+
else if (prop === "class" || prop === "className" || prop === "classList") {
|
|
984
|
+
if (classResolved) continue;
|
|
985
|
+
let n;
|
|
986
|
+
result += `class="${escape(((n = props.class) ? n + " " : "") + ((n = props.className) ? n + " " : ""), true) + ssrClassList(props.classList)}"`;
|
|
987
|
+
classResolved = true;
|
|
988
|
+
} else if (BooleanAttributes.has(prop)) if (value) result += prop;
|
|
989
|
+
else continue;
|
|
990
|
+
else if (value == void 0 || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") continue;
|
|
991
|
+
else if (prop.slice(0, 5) === "bool:") {
|
|
992
|
+
if (!value) continue;
|
|
993
|
+
result += escape(prop.slice(5));
|
|
994
|
+
} else if (prop.slice(0, 5) === "attr:") result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
|
|
995
|
+
else result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
|
|
996
|
+
if (i !== keys.length - 1) result += " ";
|
|
997
|
+
}
|
|
998
|
+
if (skipChildren) return { t: result + "/>" };
|
|
999
|
+
if (typeof children === "function") children = children();
|
|
1000
|
+
return { t: result + `>${resolveSSRNode(children, true)}</${tag}>` };
|
|
1001
|
+
}
|
|
1002
|
+
function ssrAttribute(key, value, isBoolean) {
|
|
1003
|
+
return isBoolean ? value ? " " + key : "" : value != null ? ` ${key}="${value}"` : "";
|
|
1004
|
+
}
|
|
1005
|
+
function ssrHydrationKey() {
|
|
1006
|
+
const hk = getHydrationKey();
|
|
1007
|
+
return hk ? ` data-hk="${hk}"` : "";
|
|
1008
|
+
}
|
|
1009
|
+
function escape(s, attr) {
|
|
1010
|
+
const t = typeof s;
|
|
1011
|
+
if (t !== "string") {
|
|
1012
|
+
if (!attr && t === "function") return escape(s());
|
|
1013
|
+
if (!attr && Array.isArray(s)) {
|
|
1014
|
+
s = s.slice();
|
|
1015
|
+
for (let i = 0; i < s.length; i++) s[i] = escape(s[i]);
|
|
1016
|
+
return s;
|
|
1017
|
+
}
|
|
1018
|
+
if (attr && t === "boolean") return String(s);
|
|
1019
|
+
return s;
|
|
1020
|
+
}
|
|
1021
|
+
const delim = attr ? "\"" : "<";
|
|
1022
|
+
const escDelim = attr ? """ : "<";
|
|
1023
|
+
let iDelim = s.indexOf(delim);
|
|
1024
|
+
let iAmp = s.indexOf("&");
|
|
1025
|
+
if (iDelim < 0 && iAmp < 0) return s;
|
|
1026
|
+
let left = 0, out = "";
|
|
1027
|
+
while (iDelim >= 0 && iAmp >= 0) if (iDelim < iAmp) {
|
|
1028
|
+
if (left < iDelim) out += s.substring(left, iDelim);
|
|
1029
|
+
out += escDelim;
|
|
1030
|
+
left = iDelim + 1;
|
|
1031
|
+
iDelim = s.indexOf(delim, left);
|
|
1032
|
+
} else {
|
|
1033
|
+
if (left < iAmp) out += s.substring(left, iAmp);
|
|
1034
|
+
out += "&";
|
|
1035
|
+
left = iAmp + 1;
|
|
1036
|
+
iAmp = s.indexOf("&", left);
|
|
1037
|
+
}
|
|
1038
|
+
if (iDelim >= 0) do {
|
|
1039
|
+
if (left < iDelim) out += s.substring(left, iDelim);
|
|
1040
|
+
out += escDelim;
|
|
1041
|
+
left = iDelim + 1;
|
|
1042
|
+
iDelim = s.indexOf(delim, left);
|
|
1043
|
+
} while (iDelim >= 0);
|
|
1044
|
+
else while (iAmp >= 0) {
|
|
1045
|
+
if (left < iAmp) out += s.substring(left, iAmp);
|
|
1046
|
+
out += "&";
|
|
1047
|
+
left = iAmp + 1;
|
|
1048
|
+
iAmp = s.indexOf("&", left);
|
|
1049
|
+
}
|
|
1050
|
+
return left < s.length ? out + s.substring(left) : out;
|
|
1051
|
+
}
|
|
1052
|
+
function resolveSSRNode(node, top) {
|
|
1053
|
+
const t = typeof node;
|
|
1054
|
+
if (t === "string") return node;
|
|
1055
|
+
if (node == null || t === "boolean") return "";
|
|
1056
|
+
if (Array.isArray(node)) {
|
|
1057
|
+
let prev = {};
|
|
1058
|
+
let mapped = "";
|
|
1059
|
+
for (let i = 0, len = node.length; i < len; i++) {
|
|
1060
|
+
if (!top && typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!$-->`;
|
|
1061
|
+
mapped += resolveSSRNode(prev = node[i]);
|
|
1062
|
+
}
|
|
1063
|
+
return mapped;
|
|
1064
|
+
}
|
|
1065
|
+
if (t === "object") return node.t;
|
|
1066
|
+
if (t === "function") return resolveSSRNode(node());
|
|
1067
|
+
return String(node);
|
|
1068
|
+
}
|
|
1069
|
+
function getHydrationKey() {
|
|
1070
|
+
const hydrate = sharedConfig.context;
|
|
1071
|
+
return hydrate && !hydrate.noHydrate && sharedConfig.getNextContextId();
|
|
1072
|
+
}
|
|
1073
|
+
function useAssets(fn) {
|
|
1074
|
+
sharedConfig.context.assets.push(() => resolveSSRNode(escape(fn())));
|
|
1075
|
+
}
|
|
1076
|
+
function generateHydrationScript({ eventNames = ["click", "input"], nonce } = {}) {
|
|
1077
|
+
return `<script${nonce ? ` nonce="${nonce}"` : ""}>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute("data-hk")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));["${eventNames.join("\", \"")}"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let s=t(o.composedPath&&o.composedPath()[0]||o.target);s&&!e.completed.has(s)&&e.events.push([s,o])}))))})(_$HY={events:[],completed:new WeakSet,r:{},fe(){}});<\/script><!--xs-->`;
|
|
1078
|
+
}
|
|
1079
|
+
function Hydration(props) {
|
|
1080
|
+
if (!sharedConfig.context.noHydrate) return props.children;
|
|
1081
|
+
const context = sharedConfig.context;
|
|
1082
|
+
sharedConfig.context = {
|
|
1083
|
+
...context,
|
|
1084
|
+
count: 0,
|
|
1085
|
+
id: sharedConfig.getNextContextId(),
|
|
1086
|
+
noHydrate: false
|
|
1087
|
+
};
|
|
1088
|
+
const res = props.children;
|
|
1089
|
+
sharedConfig.context = context;
|
|
1090
|
+
return res;
|
|
1091
|
+
}
|
|
1092
|
+
function NoHydration(props) {
|
|
1093
|
+
if (sharedConfig.context) sharedConfig.context.noHydrate = true;
|
|
1094
|
+
return props.children;
|
|
1095
|
+
}
|
|
1096
|
+
function queue(fn) {
|
|
1097
|
+
return Promise.resolve().then(fn);
|
|
1098
|
+
}
|
|
1099
|
+
function allSettled(promises) {
|
|
1100
|
+
let length = promises.length;
|
|
1101
|
+
return Promise.allSettled(promises).then(() => {
|
|
1102
|
+
if (promises.length !== length) return allSettled(promises);
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
function injectAssets(assets, html) {
|
|
1106
|
+
if (!assets || !assets.length) return html;
|
|
1107
|
+
let out = "";
|
|
1108
|
+
for (let i = 0, len = assets.length; i < len; i++) out += assets[i]();
|
|
1109
|
+
const index = html.indexOf("</head>");
|
|
1110
|
+
if (index === -1) return html;
|
|
1111
|
+
return html.slice(0, index) + out + html.slice(index);
|
|
1112
|
+
}
|
|
1113
|
+
function injectScripts(html, scripts, nonce) {
|
|
1114
|
+
const tag = `<script${nonce ? ` nonce="${nonce}"` : ""}>${scripts}<\/script>`;
|
|
1115
|
+
const index = html.indexOf("<!--xs-->");
|
|
1116
|
+
if (index > -1) return html.slice(0, index) + tag + html.slice(index);
|
|
1117
|
+
return html + tag;
|
|
1118
|
+
}
|
|
1119
|
+
function waitForFragments(registry, key) {
|
|
1120
|
+
for (const k of [...registry.keys()].reverse()) if (key.startsWith(k)) return true;
|
|
1121
|
+
return false;
|
|
1122
|
+
}
|
|
1123
|
+
function replacePlaceholder(html, key, value) {
|
|
1124
|
+
const marker = `<template id="pl-${key}">`;
|
|
1125
|
+
const close = `<!--pl-${key}-->`;
|
|
1126
|
+
const first = html.indexOf(marker);
|
|
1127
|
+
if (first === -1) return html;
|
|
1128
|
+
const last = html.indexOf(close, first + marker.length);
|
|
1129
|
+
return html.slice(0, first) + value + html.slice(last + close.length);
|
|
1130
|
+
}
|
|
1131
|
+
var RequestContext = Symbol();
|
|
1132
|
+
function getRequestEvent() {
|
|
1133
|
+
return globalThis[RequestContext] ? globalThis[RequestContext].getStore() || sharedConfig.context && sharedConfig.context.event || console.log("RequestEvent is missing. This is most likely due to accessing `getRequestEvent` non-managed async scope in a partially polyfilled environment. Try moving it above all `await` calls.") : void 0;
|
|
1134
|
+
}
|
|
1135
|
+
function notSup() {
|
|
1136
|
+
throw new Error("Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>.");
|
|
1137
|
+
}
|
|
1138
|
+
function createDynamic(component, props) {
|
|
1139
|
+
const comp = component(), t = typeof comp;
|
|
1140
|
+
if (comp) {
|
|
1141
|
+
if (t === "function") return comp(props);
|
|
1142
|
+
else if (t === "string") return ssrElement(comp, props, void 0, true);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
function Dynamic(props) {
|
|
1146
|
+
const [, others] = splitProps(props, ["component"]);
|
|
1147
|
+
return createDynamic(() => props.component, others);
|
|
1148
|
+
}
|
|
1149
|
+
function Portal(props) {
|
|
1150
|
+
return "";
|
|
1151
|
+
}
|
|
1152
|
+
//#endregion
|
|
1153
|
+
//#region ../../node_modules/.pnpm/solid-js@1.9.14/node_modules/solid-js/store/dist/server.js
|
|
1154
|
+
function isWrappable(obj) {
|
|
1155
|
+
return obj != null && typeof obj === "object" && (Object.getPrototypeOf(obj) === Object.prototype || Array.isArray(obj));
|
|
1156
|
+
}
|
|
1157
|
+
function unwrap(item) {
|
|
1158
|
+
return item;
|
|
1159
|
+
}
|
|
1160
|
+
function setProperty(state, property, value, force) {
|
|
1161
|
+
if (property === "__proto__") return;
|
|
1162
|
+
if (!force && state[property] === value) return;
|
|
1163
|
+
if (value === void 0) delete state[property];
|
|
1164
|
+
else state[property] = value;
|
|
1165
|
+
}
|
|
1166
|
+
function mergeStoreNode(state, value, force) {
|
|
1167
|
+
const keys = Object.keys(value);
|
|
1168
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
1169
|
+
const key = keys[i];
|
|
1170
|
+
if (isUnsafeKey(key)) continue;
|
|
1171
|
+
setProperty(state, key, value[key], force);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
function isUnsafeKey(property) {
|
|
1175
|
+
return property === "__proto__" || property === "constructor" || property === "prototype";
|
|
1176
|
+
}
|
|
1177
|
+
function updateArray(current, next) {
|
|
1178
|
+
if (typeof next === "function") next = next(current);
|
|
1179
|
+
if (Array.isArray(next)) {
|
|
1180
|
+
if (current === next) return;
|
|
1181
|
+
let i = 0, len = next.length;
|
|
1182
|
+
for (; i < len; i++) {
|
|
1183
|
+
const value = next[i];
|
|
1184
|
+
if (current[i] !== value) setProperty(current, i, value);
|
|
1185
|
+
}
|
|
1186
|
+
setProperty(current, "length", len);
|
|
1187
|
+
} else mergeStoreNode(current, next);
|
|
1188
|
+
}
|
|
1189
|
+
function updatePath(current, path, traversed = []) {
|
|
1190
|
+
let part, next = current;
|
|
1191
|
+
if (path.length > 1) {
|
|
1192
|
+
part = path.shift();
|
|
1193
|
+
const partType = typeof part, isArray = Array.isArray(current);
|
|
1194
|
+
if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey(part))) return;
|
|
1195
|
+
if (Array.isArray(part)) {
|
|
1196
|
+
for (let i = 0; i < part.length; i++) updatePath(current, [part[i]].concat(path), traversed);
|
|
1197
|
+
return;
|
|
1198
|
+
} else if (isArray && partType === "function") {
|
|
1199
|
+
for (let i = 0; i < current.length; i++) if (part(current[i], i)) updatePath(current, [i].concat(path), traversed);
|
|
1200
|
+
return;
|
|
1201
|
+
} else if (isArray && partType === "object") {
|
|
1202
|
+
const { from = 0, to = current.length - 1, by = 1 } = part;
|
|
1203
|
+
for (let i = from; i <= to; i += by) updatePath(current, [i].concat(path), traversed);
|
|
1204
|
+
return;
|
|
1205
|
+
} else if (path.length > 1) {
|
|
1206
|
+
updatePath(current[part], path, [part].concat(traversed));
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
next = current[part];
|
|
1210
|
+
traversed = [part].concat(traversed);
|
|
1211
|
+
}
|
|
1212
|
+
let value = path[0];
|
|
1213
|
+
if (typeof value === "function") {
|
|
1214
|
+
value = value(next, traversed);
|
|
1215
|
+
if (value === next) return;
|
|
1216
|
+
}
|
|
1217
|
+
if (part === void 0 && value == void 0) return;
|
|
1218
|
+
if (part === void 0 || isWrappable(next) && isWrappable(value) && !Array.isArray(value)) mergeStoreNode(next, value);
|
|
1219
|
+
else setProperty(current, part, value);
|
|
1220
|
+
}
|
|
1221
|
+
function createStore(state) {
|
|
1222
|
+
const isArray = Array.isArray(state);
|
|
1223
|
+
function setStore(...args) {
|
|
1224
|
+
isArray && args.length === 1 ? updateArray(state, args[0]) : updatePath(state, args);
|
|
1225
|
+
}
|
|
1226
|
+
return [state, setStore];
|
|
1227
|
+
}
|
|
1228
|
+
function reconcile(value, options = {}) {
|
|
1229
|
+
return (state) => {
|
|
1230
|
+
if (!isWrappable(state) || !isWrappable(value)) return value;
|
|
1231
|
+
const targetKeys = Object.keys(value);
|
|
1232
|
+
for (let i = 0, len = targetKeys.length; i < len; i++) {
|
|
1233
|
+
const key = targetKeys[i];
|
|
1234
|
+
if (isUnsafeKey(key)) continue;
|
|
1235
|
+
setProperty(state, key, value[key]);
|
|
1236
|
+
}
|
|
1237
|
+
const previousKeys = Object.keys(state);
|
|
1238
|
+
for (let i = 0, len = previousKeys.length; i < len; i++) if (value[previousKeys[i]] === void 0) setProperty(state, previousKeys[i], void 0);
|
|
1239
|
+
return state;
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
//#endregion
|
|
1243
|
+
//#region ../../node_modules/.pnpm/solid-js@1.9.14/node_modules/solid-js/web/storage/dist/storage.js
|
|
1244
|
+
function provideRequestEvent(init, cb) {
|
|
1245
|
+
return (globalThis[RequestContext] = globalThis[RequestContext] || new AsyncLocalStorage()).run(init, cb);
|
|
1246
|
+
}
|
|
1247
|
+
//#endregion
|
|
1248
|
+
export { splitProps as $, batch as A, createRoot as B, ErrorBoundary as C, Show as D, Match as E, createContext as F, lazy as G, createUniqueId as H, createEffect as I, onCleanup as J, mergeProps as K, createMemo as L, children as M, createComponent as N, Suspense as O, createComputed as P, sharedConfig as Q, createRenderEffect as R, $TRACK as S, Index as T, getListener as U, createSignal as V, getOwner as W, resetErrorBoundaries as X, onMount as Y, runWithOwner as Z, ssrElement as _, Dynamic as a, ssrStyleProperty as b, NoHydration as c, getRequestEvent as d, startTransition as et, notSup as f, ssrAttribute as g, ssr as h, unwrap as i, catchError as j, Switch as k, Portal as l, renderToString as m, createStore as n, useContext as nt, Hydration as o, renderToStream as p, on as q, reconcile as r, HydrationScript as s, provideRequestEvent as t, untrack as tt, escape as u, ssrHydrationKey as v, For as w, useAssets as x, ssrStyle as y, createResource as z };
|