@coffre/ui 0.1.10 → 0.1.11
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/client/_coffre/assets/account-BJAdDvZf.js +2 -0
- package/dist/client/_coffre/assets/account-D0jLpk5c.js +1 -0
- package/dist/client/_coffre/assets/affordances-Bq2-oUB5.js +1 -0
- package/dist/client/_coffre/assets/audit-C-pcBgKe.js +2 -0
- package/dist/client/_coffre/assets/audit-CHGlDeBB.js +1 -0
- package/dist/client/_coffre/assets/{auth.device-BP5FY0K1.js → auth.device-BndOUjse.js} +1 -1
- package/dist/client/_coffre/assets/auth.device-CWHNQn9W.js +2 -0
- package/dist/client/_coffre/assets/directory-nDExpkAz.js +1 -0
- package/dist/client/_coffre/assets/dist-QVHMLatb.js +1 -0
- package/dist/client/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/client/_coffre/assets/grants-CjoOnxzz.js +1 -0
- package/dist/client/_coffre/assets/icons-BQ27Ds9u.js +1 -0
- package/dist/client/_coffre/assets/index-CUGytaO3.js +12 -0
- package/dist/client/_coffre/assets/link-DP8SVWon.js +1 -0
- package/dist/client/_coffre/assets/login-CeaxDMcr.js +2 -0
- package/dist/client/_coffre/assets/login-DrMgvqZn.js +1 -0
- package/dist/client/_coffre/assets/offboarding-CNr_1tnl.js +1 -0
- package/dist/client/_coffre/assets/page-CGmvjSy4.js +1 -0
- package/dist/client/_coffre/assets/preload-helper-ClBkJ19f.js +1 -0
- package/dist/client/_coffre/assets/principal-page-DNLb_q_e.js +1 -0
- package/dist/client/_coffre/assets/projects._project._environment-CHzbboGp.js +3 -0
- package/dist/client/_coffre/assets/projects._project._environment-DDxu_HHD.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-CIAsjvg6.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-DZ9l6d-1.js +1 -0
- package/dist/client/_coffre/assets/projects.index-4eUXreE_.js +1 -0
- package/dist/client/_coffre/assets/row-state-ByET1OKX.js +1 -0
- package/dist/client/_coffre/assets/settings-D2zp1Ssu.js +1 -0
- package/dist/client/_coffre/assets/suspense-C7KwSnTG.js +1 -0
- package/dist/client/_coffre/assets/tokens._token-DWmbqzNk.js +2 -0
- package/dist/client/_coffre/assets/tokens._token-Dui_4KfS.js +1 -0
- package/dist/client/_coffre/assets/tokens.index-CSi5Wxwf.js +1 -0
- package/dist/client/_coffre/assets/ui-BdipqGpP.js +46 -0
- package/dist/client/_coffre/assets/unregistered-CA7B4C1m.js +1 -0
- package/dist/client/_coffre/assets/use-action-DRm9yVhV.js +1 -0
- package/dist/client/_coffre/assets/use-change-BRRMJocl.js +1 -0
- package/dist/client/_coffre/assets/use-shell-BMGlJ25Q.js +1 -0
- package/dist/client/_coffre/assets/useQuery-D__2KBOs.js +1 -0
- package/dist/client/_coffre/assets/useSuspenseQuery-CSXyDALB.js +1 -0
- package/dist/client/_coffre/assets/users._user-BkNrX7Qf.js +1 -0
- package/dist/client/_coffre/assets/users._user-jbSvtdOg.js +2 -0
- package/dist/client/_coffre/assets/users.index-CKnQ1G76.js +1 -0
- package/dist/server/.vite/manifest.json +343 -246
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js +162 -0
- package/dist/server/_coffre/assets/{account-CUQYGCYh.js → account-BocTPU1J.js} +150 -117
- package/dist/server/_coffre/assets/{account-DMlUoBxQ.js → account-CL8hOGhO.js} +10 -24
- package/dist/server/_coffre/assets/{affordances-BNaXjMOb.js → affordances-CKANXDTG.js} +2 -22
- package/dist/server/_coffre/assets/{async-local-storage-C0cwgkEr.js → async-local-storage-C10uQtMM.js} +3 -2
- package/dist/server/_coffre/assets/{audit-CCdSLmvK.js → audit-Bcka4vA6.js} +46 -16
- package/dist/server/_coffre/assets/audit-CSRQYIhu.js +31 -0
- package/dist/server/_coffre/assets/{auth.device-C05u5ROO.js → auth.device-CMcUISZY.js} +7 -5
- package/dist/server/_coffre/assets/{auth.device-BoFM1jcf.js → auth.device-DqO0T-rU.js} +5 -5
- package/dist/server/_coffre/assets/{directory-GsnYkse0.js → directory-CyYx6Jx1.js} +87 -112
- package/dist/server/_coffre/assets/{use-action-DwEmf58L.js → dist-CnnV3t2g.js} +3 -48
- package/dist/server/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/server/_coffre/assets/grants-CRijabX0.js +158 -0
- package/dist/server/_coffre/assets/{page-BdnhpwvH.js → icons-Dy-5ccDF.js} +3 -196
- package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +480 -0
- package/dist/server/_coffre/assets/link-42ZWdjzZ.js +422 -0
- package/dist/server/_coffre/assets/{login-DUtCQju5.js → login-BI9tzJEy.js} +7 -5
- package/dist/server/_coffre/assets/{login-B2njIq_o.js → login-C-v88YwP.js} +2 -2
- package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +56 -0
- package/dist/server/_coffre/assets/{offboarding-8yMa7ViM.js → offboarding-1H0LavTd.js} +6 -4
- package/dist/server/_coffre/assets/page-D_mO0-sn.js +3592 -0
- package/dist/server/_coffre/assets/{principal-page-B8zPcS2b.js → principal-page-DQDoXute.js} +51 -42
- package/dist/server/_coffre/assets/{projects._project._environment-BZ5Z80V8.js → projects._project._environment-C-yVwC92.js} +168 -248
- package/dist/server/_coffre/assets/{projects._project._environment-DdIOc7wx.js → projects._project._environment-D_5R40of.js} +4 -11
- package/dist/server/_coffre/assets/{projects._project.index-CuEAUwGn.js → projects._project.index-A2BImFIT.js} +134 -96
- package/dist/server/_coffre/assets/{projects._project.index-DvbcU1kh.js → projects._project.index-BPPKxKrt.js} +5 -4
- package/dist/server/_coffre/assets/{projects.index-5HI0wOuG.js → projects.index-543IsPzY.js} +57 -55
- package/dist/server/_coffre/assets/{react-dom-qCTiwGGR.js → react-dom-bBoJXlK2.js} +417 -51
- package/dist/server/_coffre/assets/{router-CQDoql8s.js → router-CM3vK8QO.js} +376 -92
- package/dist/server/_coffre/assets/row-state-XBtDoIA4.js +117 -0
- package/dist/server/_coffre/assets/{settings-BVz78wjP.js → settings-BLVU74ym.js} +8 -6
- package/dist/server/_coffre/assets/suspense-CzYTwxOj.js +602 -0
- package/dist/server/_coffre/assets/tokens._token-B-hBgwBW.js +10 -0
- package/dist/server/_coffre/assets/{tokens._token-CWs3Mtki.js → tokens._token-aubAUonP.js} +97 -79
- package/dist/server/_coffre/assets/{tokens.index-Ck0LN7aC.js → tokens.index-4D3jwp5v.js} +9 -6
- package/dist/server/_coffre/assets/{ui-D_slKpSF.js → ui-BI3Bf72q.js} +7 -836
- package/dist/server/_coffre/assets/{unregistered-Z17da4Rc.js → unregistered-CagDxMyw.js} +5 -3
- package/dist/server/_coffre/assets/use-action-tzBZvjjQ.js +47 -0
- package/dist/server/_coffre/assets/use-change-Dggqxy5y.js +1212 -0
- package/dist/server/_coffre/assets/use-shell-CwStDfzX.js +462 -0
- package/dist/server/_coffre/assets/useQuery-C6_dBjem.js +8 -0
- package/dist/server/_coffre/assets/{useStore-DWGPqzXR.js → useRouter-CaUSUNsw.js} +1 -420
- package/dist/server/_coffre/assets/useSuspenseQuery-BuapQt_P.js +117 -0
- package/dist/server/_coffre/assets/{users._user-CMwj-VI9.js → users._user-137WNyxn.js} +4 -5
- package/dist/server/_coffre/assets/users._user-C252Iilj.js +10 -0
- package/dist/server/_coffre/assets/{users.index-fWHv6A30.js → users.index-DQHsfnal.js} +9 -6
- package/dist/server/index.js +6 -5
- package/package.json +5 -3
- package/src/components/directory.tsx +75 -104
- package/src/components/grants.tsx +60 -112
- package/src/components/principal-page.tsx +54 -67
- package/src/components/principal-picker.tsx +7 -16
- package/src/components/row-state.tsx +95 -0
- package/src/components/service-tokens.tsx +75 -64
- package/src/components/shell.tsx +1 -1
- package/src/components/syncs.tsx +42 -26
- package/src/lib/announce.ts +36 -0
- package/src/lib/changes.ts +498 -0
- package/src/lib/optimistic.ts +233 -0
- package/src/lib/queries.ts +393 -0
- package/src/lib/use-action.ts +20 -15
- package/src/lib/use-change.ts +42 -0
- package/src/lib/use-shell.ts +17 -0
- package/src/router.tsx +17 -9
- package/src/routes/__root.tsx +8 -38
- package/src/routes/account.tsx +163 -154
- package/src/routes/audit.tsx +51 -72
- package/src/routes/auth.device.tsx +4 -2
- package/src/routes/login.tsx +3 -2
- package/src/routes/projects.$project.$environment.tsx +226 -231
- package/src/routes/projects.$project.index.tsx +136 -118
- package/src/routes/projects.index.tsx +117 -145
- package/src/routes/settings.tsx +7 -7
- package/src/routes/tokens.$token.tsx +14 -17
- package/src/routes/tokens.index.tsx +8 -4
- package/src/routes/unregistered.tsx +3 -2
- package/src/routes/users.$user.tsx +4 -4
- package/src/routes/users.index.tsx +8 -4
- package/src/styles/globals.css +78 -1
- package/dist/client/_coffre/assets/account-B48wuSF8.js +0 -1
- package/dist/client/_coffre/assets/account-BkNyIDT7.js +0 -2
- package/dist/client/_coffre/assets/affordances-CmoY-8Xf.js +0 -1
- package/dist/client/_coffre/assets/audit-BvwKYb-5.js +0 -2
- package/dist/client/_coffre/assets/audit-D02H-zxS.js +0 -1
- package/dist/client/_coffre/assets/auth.device-DYOONgFF.js +0 -2
- package/dist/client/_coffre/assets/coffre-BBp7cKVa.js +0 -1
- package/dist/client/_coffre/assets/directory-Bu0EIxqI.js +0 -1
- package/dist/client/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/client/_coffre/assets/grants-DavcwofW.js +0 -1
- package/dist/client/_coffre/assets/index-CDPlq5rM.js +0 -12
- package/dist/client/_coffre/assets/login-C-wTm_t1.js +0 -2
- package/dist/client/_coffre/assets/login-CLLv1om9.js +0 -1
- package/dist/client/_coffre/assets/offboarding-DWsE2FSa.js +0 -1
- package/dist/client/_coffre/assets/page-DbSS7pYH.js +0 -1
- package/dist/client/_coffre/assets/preload-helper-DduCCcmc.js +0 -46
- package/dist/client/_coffre/assets/principal-page-Bp_iwuSd.js +0 -1
- package/dist/client/_coffre/assets/projects._project._environment-BMeX_B8l.js +0 -2
- package/dist/client/_coffre/assets/projects._project._environment-CT0A-hIU.js +0 -3
- package/dist/client/_coffre/assets/projects._project.index-C_xYOGLT.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-Chcf-cUd.js +0 -1
- package/dist/client/_coffre/assets/projects.index-CfOtb1X5.js +0 -2
- package/dist/client/_coffre/assets/projects.index-DSjOhLDh.js +0 -1
- package/dist/client/_coffre/assets/settings-BC9cUJNK.js +0 -1
- package/dist/client/_coffre/assets/settings-Bkj_E21y.js +0 -2
- package/dist/client/_coffre/assets/tokens._token-BA0KqvaW.js +0 -1
- package/dist/client/_coffre/assets/tokens._token-Dh9jLOkm.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-BgAMWkHT.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-CHueIAv1.js +0 -1
- package/dist/client/_coffre/assets/unregistered-D5go1AfR.js +0 -1
- package/dist/client/_coffre/assets/use-action-l__xZDYY.js +0 -1
- package/dist/client/_coffre/assets/users._user-Dwqa0gv5.js +0 -1
- package/dist/client/_coffre/assets/users._user-xJAb3T6Y.js +0 -2
- package/dist/client/_coffre/assets/users.index-BJoF-L37.js +0 -2
- package/dist/client/_coffre/assets/users.index-YUjtbTGy.js +0 -1
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-BKg2AlPu.js +0 -133
- package/dist/server/_coffre/assets/audit-CThXn2v7.js +0 -74
- package/dist/server/_coffre/assets/coffre-C2ANsTAz.js +0 -281
- package/dist/server/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/server/_coffre/assets/grants-B6k4Fu9z.js +0 -243
- package/dist/server/_coffre/assets/projects.index-uiomWX_l.js +0 -54
- package/dist/server/_coffre/assets/settings-4oRyDizv.js +0 -18
- package/dist/server/_coffre/assets/tokens._token-CF_deAwq.js +0 -18
- package/dist/server/_coffre/assets/tokens.index-DF_07KEe.js +0 -10
- package/dist/server/_coffre/assets/users._user-DUzwkSKT.js +0 -10
- package/dist/server/_coffre/assets/users.index-BbuweTwH.js +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __commonJSMin, i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.170.18_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/utils.js
|
|
3
3
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
4
4
|
/**
|
|
@@ -83,6 +83,267 @@ function useForwardedRef(ref) {
|
|
|
83
83
|
return innerRef;
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
|
+
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/utils.js
|
|
87
|
+
/**
|
|
88
|
+
* Return the last element of an array.
|
|
89
|
+
* Intended for non-empty arrays used within router internals.
|
|
90
|
+
*/
|
|
91
|
+
function last(arr) {
|
|
92
|
+
return arr[arr.length - 1];
|
|
93
|
+
}
|
|
94
|
+
function isFunction(d) {
|
|
95
|
+
return typeof d === "function";
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Apply a value-or-updater to a previous value.
|
|
99
|
+
* Accepts either a literal value or a function of the previous value.
|
|
100
|
+
*/
|
|
101
|
+
function functionalUpdate(updater, previous) {
|
|
102
|
+
if (isFunction(updater)) return updater(previous);
|
|
103
|
+
return updater;
|
|
104
|
+
}
|
|
105
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
106
|
+
function hasKeys(obj) {
|
|
107
|
+
for (const key in obj) if (hasOwn.call(obj, key)) return true;
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
var createNull = () => Object.create(null);
|
|
111
|
+
var nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);
|
|
112
|
+
/**
|
|
113
|
+
* This function returns `prev` if `_next` is deeply equal.
|
|
114
|
+
* If not, it will replace any deeply equal children of `b` with those of `a`.
|
|
115
|
+
* This can be used for structural sharing between immutable JSON values for example.
|
|
116
|
+
* Do not use this with signals
|
|
117
|
+
*/
|
|
118
|
+
function replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {
|
|
119
|
+
return _next;
|
|
120
|
+
}
|
|
121
|
+
function isPlainObject(o) {
|
|
122
|
+
if (!hasObjectPrototype(o)) return false;
|
|
123
|
+
const ctor = o.constructor;
|
|
124
|
+
if (typeof ctor === "undefined") return true;
|
|
125
|
+
const prot = ctor.prototype;
|
|
126
|
+
if (!hasObjectPrototype(prot)) return false;
|
|
127
|
+
if (!prot.hasOwnProperty("isPrototypeOf")) return false;
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
function hasObjectPrototype(o) {
|
|
131
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Perform a deep equality check with options for partial comparison and
|
|
135
|
+
* ignoring `undefined` values. Optimized for router state comparisons.
|
|
136
|
+
*/
|
|
137
|
+
function deepEqual(a, b, opts) {
|
|
138
|
+
if (a === b) return true;
|
|
139
|
+
if (typeof a !== typeof b) return false;
|
|
140
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
141
|
+
if (a.length !== b.length) return false;
|
|
142
|
+
for (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
if (isPlainObject(a) && isPlainObject(b)) {
|
|
146
|
+
const ignoreUndefined = opts?.ignoreUndefined ?? true;
|
|
147
|
+
if (opts?.partial) {
|
|
148
|
+
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
149
|
+
if (!deepEqual(a[k], b[k], opts)) return false;
|
|
150
|
+
}
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
let aCount = 0;
|
|
154
|
+
if (!ignoreUndefined) aCount = Object.keys(a).length;
|
|
155
|
+
else for (const k in a) if (a[k] !== void 0) aCount++;
|
|
156
|
+
let bCount = 0;
|
|
157
|
+
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
158
|
+
bCount++;
|
|
159
|
+
if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
|
|
160
|
+
}
|
|
161
|
+
return aCount === bCount;
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Create a promise with exposed resolve/reject and status fields.
|
|
167
|
+
* Useful for coordinating async router lifecycle operations.
|
|
168
|
+
*/
|
|
169
|
+
function createControlledPromise(onResolve) {
|
|
170
|
+
let resolveLoadPromise;
|
|
171
|
+
let rejectLoadPromise;
|
|
172
|
+
const controlledPromise = new Promise((resolve, reject) => {
|
|
173
|
+
resolveLoadPromise = resolve;
|
|
174
|
+
rejectLoadPromise = reject;
|
|
175
|
+
});
|
|
176
|
+
controlledPromise.status = "pending";
|
|
177
|
+
controlledPromise.resolve = (value) => {
|
|
178
|
+
controlledPromise.status = "resolved";
|
|
179
|
+
controlledPromise.value = value;
|
|
180
|
+
resolveLoadPromise(value);
|
|
181
|
+
onResolve?.(value);
|
|
182
|
+
};
|
|
183
|
+
controlledPromise.reject = (e) => {
|
|
184
|
+
controlledPromise.status = "rejected";
|
|
185
|
+
rejectLoadPromise(e);
|
|
186
|
+
};
|
|
187
|
+
return controlledPromise;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Heuristically detect dynamic import "module not found" errors
|
|
191
|
+
* across major browsers for lazy route component handling.
|
|
192
|
+
*/
|
|
193
|
+
function isModuleNotFoundError(error) {
|
|
194
|
+
if (typeof error?.message !== "string") return false;
|
|
195
|
+
return error.message.startsWith("Failed to fetch dynamically imported module") || error.message.startsWith("error loading dynamically imported module") || error.message.startsWith("Importing a module script failed");
|
|
196
|
+
}
|
|
197
|
+
function isPromise(value) {
|
|
198
|
+
return Boolean(value && typeof value === "object" && typeof value.then === "function");
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Re-encode characters that are unsafe in URL paths.
|
|
202
|
+
* Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the
|
|
203
|
+
* WHATWG URL "path percent-encode set" (", <, >, `, {, }).
|
|
204
|
+
*
|
|
205
|
+
* Space (0x20) is intentionally excluded — decodeURI decodes %20 to space
|
|
206
|
+
* and the router stores decoded spaces in location.pathname. The existing
|
|
207
|
+
* encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.
|
|
208
|
+
*
|
|
209
|
+
* These characters are decoded by decodeURI but must remain percent-encoded
|
|
210
|
+
* in paths to match how upstream layers (CDNs, edge middleware, browsers)
|
|
211
|
+
* interpret the URL, preventing infinite redirect loops and path mismatches.
|
|
212
|
+
*/
|
|
213
|
+
var PATH_UNSAFE_RE = /[\x00-\x1f\x7f"<>`{}]/g;
|
|
214
|
+
function sanitizePathSegment(segment) {
|
|
215
|
+
return segment.replace(PATH_UNSAFE_RE, (ch) => "%" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0"));
|
|
216
|
+
}
|
|
217
|
+
function decodeSegment(segment) {
|
|
218
|
+
let decoded;
|
|
219
|
+
try {
|
|
220
|
+
decoded = decodeURI(segment);
|
|
221
|
+
} catch {
|
|
222
|
+
decoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {
|
|
223
|
+
try {
|
|
224
|
+
return decodeURI(match);
|
|
225
|
+
} catch {
|
|
226
|
+
return match;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
return sanitizePathSegment(decoded);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Default list of URL protocols to allow in links, redirects, and navigation.
|
|
234
|
+
* Any absolute URL protocol not in this list is treated as dangerous by default.
|
|
235
|
+
*/
|
|
236
|
+
var DEFAULT_PROTOCOL_ALLOWLIST = [
|
|
237
|
+
"http:",
|
|
238
|
+
"https:",
|
|
239
|
+
"mailto:",
|
|
240
|
+
"tel:"
|
|
241
|
+
];
|
|
242
|
+
/**
|
|
243
|
+
* Check if a URL string uses a protocol that is not in the allowlist.
|
|
244
|
+
* Returns true for blocked protocols like javascript:, blob:, data:, etc.
|
|
245
|
+
*
|
|
246
|
+
* The URL constructor correctly normalizes:
|
|
247
|
+
* - Mixed case (JavaScript: → javascript:)
|
|
248
|
+
* - Whitespace/control characters (java\nscript: → javascript:)
|
|
249
|
+
* - Leading whitespace
|
|
250
|
+
*
|
|
251
|
+
* For relative URLs (no protocol), returns false (safe).
|
|
252
|
+
*
|
|
253
|
+
* @param url - The URL string to check
|
|
254
|
+
* @param allowlist - Set of protocols to allow
|
|
255
|
+
* @returns true if the URL uses a protocol that is not allowed
|
|
256
|
+
*/
|
|
257
|
+
function isDangerousProtocol(url, allowlist) {
|
|
258
|
+
if (!url) return false;
|
|
259
|
+
try {
|
|
260
|
+
const parsed = new URL(url);
|
|
261
|
+
return !allowlist.has(parsed.protocol);
|
|
262
|
+
} catch {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
var HTML_ESCAPE_LOOKUP = {
|
|
267
|
+
"&": "\\u0026",
|
|
268
|
+
">": "\\u003e",
|
|
269
|
+
"<": "\\u003c",
|
|
270
|
+
"\u2028": "\\u2028",
|
|
271
|
+
"\u2029": "\\u2029"
|
|
272
|
+
};
|
|
273
|
+
var HTML_ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
274
|
+
/**
|
|
275
|
+
* Escape HTML special characters in a string to prevent XSS attacks
|
|
276
|
+
* when embedding strings in script tags during SSR.
|
|
277
|
+
*
|
|
278
|
+
* This is essential for preventing XSS vulnerabilities when user-controlled
|
|
279
|
+
* content is embedded in inline scripts.
|
|
280
|
+
*/
|
|
281
|
+
function escapeHtml(str) {
|
|
282
|
+
return str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);
|
|
283
|
+
}
|
|
284
|
+
function decodePath(path) {
|
|
285
|
+
if (!path) return {
|
|
286
|
+
path,
|
|
287
|
+
handledProtocolRelativeURL: false
|
|
288
|
+
};
|
|
289
|
+
if (!/[%\\\x00-\x1f\x7f]/.test(path) && !path.startsWith("//")) return {
|
|
290
|
+
path,
|
|
291
|
+
handledProtocolRelativeURL: false
|
|
292
|
+
};
|
|
293
|
+
const re = /%25|%5C/gi;
|
|
294
|
+
let cursor = 0;
|
|
295
|
+
let result = "";
|
|
296
|
+
let match;
|
|
297
|
+
while (null !== (match = re.exec(path))) {
|
|
298
|
+
result += decodeSegment(path.slice(cursor, match.index)) + match[0];
|
|
299
|
+
cursor = re.lastIndex;
|
|
300
|
+
}
|
|
301
|
+
result = result + decodeSegment(cursor ? path.slice(cursor) : path);
|
|
302
|
+
let handledProtocolRelativeURL = false;
|
|
303
|
+
if (result.startsWith("//")) {
|
|
304
|
+
handledProtocolRelativeURL = true;
|
|
305
|
+
result = "/" + result.replace(/^\/+/, "");
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
path: result,
|
|
309
|
+
handledProtocolRelativeURL
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.
|
|
314
|
+
*
|
|
315
|
+
* This function encodes:
|
|
316
|
+
* - Whitespace characters (spaces → %20, tabs → %09, etc.)
|
|
317
|
+
* - Non-ASCII/Unicode characters (emojis, accented characters, etc.)
|
|
318
|
+
*
|
|
319
|
+
* It preserves:
|
|
320
|
+
* - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)
|
|
321
|
+
* - ASCII special characters valid in URL paths (@, $, &, +, etc.)
|
|
322
|
+
* - Forward slashes as path separators
|
|
323
|
+
*
|
|
324
|
+
* Used to generate proper href values for SSR without constructing URL objects.
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'
|
|
328
|
+
* encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'
|
|
329
|
+
* encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)
|
|
330
|
+
*/
|
|
331
|
+
function encodePathLikeUrl(path) {
|
|
332
|
+
if (!/\s|[^\u0000-\u007F]/.test(path)) return path;
|
|
333
|
+
return path.replace(/\s|[^\u0000-\u007F]/gu, encodeURIComponent);
|
|
334
|
+
}
|
|
335
|
+
function arraysEqual(a, b) {
|
|
336
|
+
if (a === b) return true;
|
|
337
|
+
if (a.length !== b.length) return false;
|
|
338
|
+
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/invariant.js
|
|
343
|
+
function invariant() {
|
|
344
|
+
throw new Error("Invariant failed");
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
86
347
|
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/lru-cache.js
|
|
87
348
|
function createLRUCache(max) {
|
|
88
349
|
const cache = /* @__PURE__ */ new Map();
|
|
@@ -1096,55 +1357,6 @@ function encodePathParam(value, decoder) {
|
|
|
1096
1357
|
return decoder?.(encoded) ?? encoded;
|
|
1097
1358
|
}
|
|
1098
1359
|
//#endregion
|
|
1099
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/root.js
|
|
1100
|
-
/** Stable identifier used for the root route in a route tree. */
|
|
1101
|
-
var rootRouteId = "__root__";
|
|
1102
|
-
//#endregion
|
|
1103
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/redirect.js
|
|
1104
|
-
/**
|
|
1105
|
-
* Create a redirect Response understood by TanStack Router.
|
|
1106
|
-
*
|
|
1107
|
-
* Use from route `loader`/`beforeLoad` or server functions to trigger a
|
|
1108
|
-
* navigation. If `throw: true` is set, the redirect is thrown instead of
|
|
1109
|
-
* returned. When an absolute `href` is supplied and `reloadDocument` is not
|
|
1110
|
-
* set, a full-document navigation is inferred.
|
|
1111
|
-
*
|
|
1112
|
-
* @param opts Options for the redirect. Common fields:
|
|
1113
|
-
* - `href`: absolute URL for external redirects; infers `reloadDocument`.
|
|
1114
|
-
* - `statusCode`: HTTP status code to use (defaults to 307).
|
|
1115
|
-
* - `headers`: additional headers to include on the Response.
|
|
1116
|
-
* - Standard navigation options like `to`, `params`, `search`, `replace`,
|
|
1117
|
-
* and `reloadDocument` for internal redirects.
|
|
1118
|
-
* @returns A Response augmented with router navigation options.
|
|
1119
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction
|
|
1120
|
-
*/
|
|
1121
|
-
function redirect(opts) {
|
|
1122
|
-
opts.statusCode = opts.statusCode || opts.code || 307;
|
|
1123
|
-
if (!opts._builtLocation && !opts.reloadDocument && typeof opts.href === "string") try {
|
|
1124
|
-
new URL(opts.href);
|
|
1125
|
-
opts.reloadDocument = true;
|
|
1126
|
-
} catch {}
|
|
1127
|
-
const headers = new Headers(opts.headers);
|
|
1128
|
-
if (opts.href && headers.get("Location") === null) headers.set("Location", opts.href);
|
|
1129
|
-
const response = new Response(null, {
|
|
1130
|
-
status: opts.statusCode,
|
|
1131
|
-
headers
|
|
1132
|
-
});
|
|
1133
|
-
response.options = opts;
|
|
1134
|
-
if (opts.throw) throw response;
|
|
1135
|
-
return response;
|
|
1136
|
-
}
|
|
1137
|
-
/** Check whether a value is a TanStack Router redirect Response. */
|
|
1138
|
-
/** Check whether a value is a TanStack Router redirect Response. */
|
|
1139
|
-
function isRedirect(obj) {
|
|
1140
|
-
return obj instanceof Response && !!obj.options;
|
|
1141
|
-
}
|
|
1142
|
-
/** True if value is a redirect with a resolved `href` location. */
|
|
1143
|
-
/** True if value is a redirect with a resolved `href` location. */
|
|
1144
|
-
function isResolvedRedirect(obj) {
|
|
1145
|
-
return isRedirect(obj) && !!obj.options.href;
|
|
1146
|
-
}
|
|
1147
|
-
//#endregion
|
|
1148
1360
|
//#region ../../node_modules/.pnpm/@tanstack+react-router@1.170.18_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/ClientOnly.js
|
|
1149
1361
|
var import_jsx_runtime = require_jsx_runtime();
|
|
1150
1362
|
/**
|
|
@@ -1193,6 +1405,160 @@ function subscribe() {
|
|
|
1193
1405
|
return () => {};
|
|
1194
1406
|
}
|
|
1195
1407
|
//#endregion
|
|
1408
|
+
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
1409
|
+
/**
|
|
1410
|
+
* @license React
|
|
1411
|
+
* use-sync-external-store-shim.production.js
|
|
1412
|
+
*
|
|
1413
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1414
|
+
*
|
|
1415
|
+
* This source code is licensed under the MIT license found in the
|
|
1416
|
+
* LICENSE file in the root directory of this source tree.
|
|
1417
|
+
*/
|
|
1418
|
+
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1419
|
+
var React = require_react();
|
|
1420
|
+
function is(x, y) {
|
|
1421
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
1422
|
+
}
|
|
1423
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
1424
|
+
var useState = React.useState;
|
|
1425
|
+
var useEffect = React.useEffect;
|
|
1426
|
+
var useLayoutEffect = React.useLayoutEffect;
|
|
1427
|
+
var useDebugValue = React.useDebugValue;
|
|
1428
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
1429
|
+
var value = getSnapshot(), _useState = useState({ inst: {
|
|
1430
|
+
value,
|
|
1431
|
+
getSnapshot
|
|
1432
|
+
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
1433
|
+
useLayoutEffect(function() {
|
|
1434
|
+
inst.value = value;
|
|
1435
|
+
inst.getSnapshot = getSnapshot;
|
|
1436
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1437
|
+
}, [
|
|
1438
|
+
subscribe,
|
|
1439
|
+
value,
|
|
1440
|
+
getSnapshot
|
|
1441
|
+
]);
|
|
1442
|
+
useEffect(function() {
|
|
1443
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1444
|
+
return subscribe(function() {
|
|
1445
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1446
|
+
});
|
|
1447
|
+
}, [subscribe]);
|
|
1448
|
+
useDebugValue(value);
|
|
1449
|
+
return value;
|
|
1450
|
+
}
|
|
1451
|
+
function checkIfSnapshotChanged(inst) {
|
|
1452
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
1453
|
+
inst = inst.value;
|
|
1454
|
+
try {
|
|
1455
|
+
var nextValue = latestGetSnapshot();
|
|
1456
|
+
return !objectIs(inst, nextValue);
|
|
1457
|
+
} catch (error) {
|
|
1458
|
+
return !0;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
1462
|
+
return getSnapshot();
|
|
1463
|
+
}
|
|
1464
|
+
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
1465
|
+
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
1466
|
+
}));
|
|
1467
|
+
//#endregion
|
|
1468
|
+
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/shim/index.js
|
|
1469
|
+
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1470
|
+
module.exports = require_use_sync_external_store_shim_production();
|
|
1471
|
+
}));
|
|
1472
|
+
//#endregion
|
|
1473
|
+
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
1474
|
+
/**
|
|
1475
|
+
* @license React
|
|
1476
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
1477
|
+
*
|
|
1478
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1479
|
+
*
|
|
1480
|
+
* This source code is licensed under the MIT license found in the
|
|
1481
|
+
* LICENSE file in the root directory of this source tree.
|
|
1482
|
+
*/
|
|
1483
|
+
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1484
|
+
var React = require_react();
|
|
1485
|
+
var shim = require_shim();
|
|
1486
|
+
function is(x, y) {
|
|
1487
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
1488
|
+
}
|
|
1489
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
1490
|
+
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
1491
|
+
var useRef = React.useRef;
|
|
1492
|
+
var useEffect = React.useEffect;
|
|
1493
|
+
var useMemo = React.useMemo;
|
|
1494
|
+
var useDebugValue = React.useDebugValue;
|
|
1495
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
1496
|
+
var instRef = useRef(null);
|
|
1497
|
+
if (null === instRef.current) {
|
|
1498
|
+
var inst = {
|
|
1499
|
+
hasValue: !1,
|
|
1500
|
+
value: null
|
|
1501
|
+
};
|
|
1502
|
+
instRef.current = inst;
|
|
1503
|
+
} else inst = instRef.current;
|
|
1504
|
+
instRef = useMemo(function() {
|
|
1505
|
+
function memoizedSelector(nextSnapshot) {
|
|
1506
|
+
if (!hasMemo) {
|
|
1507
|
+
hasMemo = !0;
|
|
1508
|
+
memoizedSnapshot = nextSnapshot;
|
|
1509
|
+
nextSnapshot = selector(nextSnapshot);
|
|
1510
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
1511
|
+
var currentSelection = inst.value;
|
|
1512
|
+
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
1513
|
+
}
|
|
1514
|
+
return memoizedSelection = nextSnapshot;
|
|
1515
|
+
}
|
|
1516
|
+
currentSelection = memoizedSelection;
|
|
1517
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
1518
|
+
var nextSelection = selector(nextSnapshot);
|
|
1519
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
1520
|
+
memoizedSnapshot = nextSnapshot;
|
|
1521
|
+
return memoizedSelection = nextSelection;
|
|
1522
|
+
}
|
|
1523
|
+
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
1524
|
+
return [function() {
|
|
1525
|
+
return memoizedSelector(getSnapshot());
|
|
1526
|
+
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
1527
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
1528
|
+
}];
|
|
1529
|
+
}, [
|
|
1530
|
+
getSnapshot,
|
|
1531
|
+
getServerSnapshot,
|
|
1532
|
+
selector,
|
|
1533
|
+
isEqual
|
|
1534
|
+
]);
|
|
1535
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
1536
|
+
useEffect(function() {
|
|
1537
|
+
inst.hasValue = !0;
|
|
1538
|
+
inst.value = value;
|
|
1539
|
+
}, [value]);
|
|
1540
|
+
useDebugValue(value);
|
|
1541
|
+
return value;
|
|
1542
|
+
};
|
|
1543
|
+
}));
|
|
1544
|
+
//#endregion
|
|
1545
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-store/dist/esm/useStore.js
|
|
1546
|
+
var import_with_selector = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1547
|
+
module.exports = require_with_selector_production();
|
|
1548
|
+
})))();
|
|
1549
|
+
function defaultCompare(a, b) {
|
|
1550
|
+
return a === b;
|
|
1551
|
+
}
|
|
1552
|
+
function useStore(atom, selector, compare = defaultCompare) {
|
|
1553
|
+
const subscribe = (0, import_react.useCallback)((handleStoreChange) => {
|
|
1554
|
+
if (!atom) return () => {};
|
|
1555
|
+
const { unsubscribe } = atom.subscribe(handleStoreChange);
|
|
1556
|
+
return unsubscribe;
|
|
1557
|
+
}, [atom]);
|
|
1558
|
+
const boundGetSnapshot = (0, import_react.useCallback)(() => atom?.get(), [atom]);
|
|
1559
|
+
return (0, import_with_selector.useSyncExternalStoreWithSelector)(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
|
|
1560
|
+
}
|
|
1561
|
+
//#endregion
|
|
1196
1562
|
//#region ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom.production.js
|
|
1197
1563
|
/**
|
|
1198
1564
|
* @license React
|
|
@@ -1349,4 +1715,4 @@ var require_react_dom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1349
1715
|
module.exports = require_react_dom_production();
|
|
1350
1716
|
}));
|
|
1351
1717
|
//#endregion
|
|
1352
|
-
export {
|
|
1718
|
+
export { functionalUpdate as A, useIntersectionObserver as B, DEFAULT_PROTOCOL_ALLOWLIST as C, deepEqual as D, decodePath as E, last as F, usePrevious as H, nullReplaceEqualDeep as I, replaceEqualDeep as L, isDangerousProtocol as M, isModuleNotFoundError as N, encodePathLikeUrl as O, isPromise as P, reactUse as R, invariant as S, createControlledPromise as T, useLayoutEffect as V, findRouteMatch as _, cleanPath as a, processRouteTree as b, interpolatePath as c, resolvePath as d, trimPath as f, findFlatMatch as g, buildRouteBranch as h, useHydrated as i, hasKeys as j, escapeHtml as k, joinPaths as l, trimPathRight as m, useStore as n, compileDecodeCharMap as o, trimPathLeft as p, ClientOnly as r, exactPathTest as s, require_react_dom as t, removeTrailingSlash as u, findSingleMatch as v, arraysEqual as w, createLRUCache as x, processRouteMasks as y, useForwardedRef as z };
|