@powerhousedao/connect 6.0.0-dev.95 → 6.0.0-dev.96
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/src/context/index.js +244 -2253
- package/dist/src/hooks/index.js +244 -2253
- package/dist/src/main.js +541 -2550
- package/dist/src/pages/index.js +541 -2550
- package/dist/src/pglite.worker.js +70 -0
- package/dist/src/services/index.js +10 -2019
- package/dist/src/store/index.js +330 -2339
- package/dist/src/utils/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -4474,12 +4474,6 @@ function createStackParser(...parsers) {
|
|
|
4474
4474
|
return stripSentryFramesAndReverse(frames.slice(framesToPop));
|
|
4475
4475
|
};
|
|
4476
4476
|
}
|
|
4477
|
-
function stackParserFromStackParserOptions(stackParser) {
|
|
4478
|
-
if (Array.isArray(stackParser)) {
|
|
4479
|
-
return createStackParser(...stackParser);
|
|
4480
|
-
}
|
|
4481
|
-
return stackParser;
|
|
4482
|
-
}
|
|
4483
4477
|
function stripSentryFramesAndReverse(stack) {
|
|
4484
4478
|
if (!stack.length) {
|
|
4485
4479
|
return [];
|
|
@@ -8680,35 +8674,6 @@ var init_api = __esm(() => {
|
|
|
8680
8674
|
});
|
|
8681
8675
|
|
|
8682
8676
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/integration.js
|
|
8683
|
-
function filterDuplicates(integrations) {
|
|
8684
|
-
const integrationsByName = {};
|
|
8685
|
-
integrations.forEach((currentInstance) => {
|
|
8686
|
-
const { name } = currentInstance;
|
|
8687
|
-
const existingInstance = integrationsByName[name];
|
|
8688
|
-
if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {
|
|
8689
|
-
return;
|
|
8690
|
-
}
|
|
8691
|
-
integrationsByName[name] = currentInstance;
|
|
8692
|
-
});
|
|
8693
|
-
return Object.values(integrationsByName);
|
|
8694
|
-
}
|
|
8695
|
-
function getIntegrationsToSetup(options) {
|
|
8696
|
-
const defaultIntegrations = options.defaultIntegrations || [];
|
|
8697
|
-
const userIntegrations = options.integrations;
|
|
8698
|
-
defaultIntegrations.forEach((integration) => {
|
|
8699
|
-
integration.isDefaultInstance = true;
|
|
8700
|
-
});
|
|
8701
|
-
let integrations;
|
|
8702
|
-
if (Array.isArray(userIntegrations)) {
|
|
8703
|
-
integrations = [...defaultIntegrations, ...userIntegrations];
|
|
8704
|
-
} else if (typeof userIntegrations === "function") {
|
|
8705
|
-
const resolvedUserIntegrations = userIntegrations(defaultIntegrations);
|
|
8706
|
-
integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];
|
|
8707
|
-
} else {
|
|
8708
|
-
integrations = defaultIntegrations;
|
|
8709
|
-
}
|
|
8710
|
-
return filterDuplicates(integrations);
|
|
8711
|
-
}
|
|
8712
8677
|
function setupIntegrations(client, integrations) {
|
|
8713
8678
|
const integrationIndex = {};
|
|
8714
8679
|
integrations.forEach((integration) => {
|
|
@@ -10011,30 +9976,11 @@ var init_client = __esm(() => {
|
|
|
10011
9976
|
});
|
|
10012
9977
|
|
|
10013
9978
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/sdk.js
|
|
10014
|
-
function initAndBind(clientClass, options) {
|
|
10015
|
-
if (options.debug === true) {
|
|
10016
|
-
if (DEBUG_BUILD) {
|
|
10017
|
-
debug.enable();
|
|
10018
|
-
} else {
|
|
10019
|
-
consoleSandbox(() => {
|
|
10020
|
-
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
10021
|
-
});
|
|
10022
|
-
}
|
|
10023
|
-
}
|
|
10024
|
-
const scope = getCurrentScope();
|
|
10025
|
-
scope.update(options.initialScope);
|
|
10026
|
-
const client = new clientClass(options);
|
|
10027
|
-
setCurrentClient(client);
|
|
10028
|
-
client.init();
|
|
10029
|
-
return client;
|
|
10030
|
-
}
|
|
10031
9979
|
function setCurrentClient(client) {
|
|
10032
9980
|
getCurrentScope().setClient(client);
|
|
10033
9981
|
}
|
|
10034
9982
|
var init_sdk = __esm(() => {
|
|
10035
9983
|
init_currentScopes();
|
|
10036
|
-
init_debug_build();
|
|
10037
|
-
init_debug_logger();
|
|
10038
9984
|
});
|
|
10039
9985
|
|
|
10040
9986
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/transports/offline.js
|
|
@@ -20837,41 +20783,6 @@ var init_spotlight = __esm(() => {
|
|
|
20837
20783
|
spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);
|
|
20838
20784
|
});
|
|
20839
20785
|
|
|
20840
|
-
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/utils/detectBrowserExtension.js
|
|
20841
|
-
function checkAndWarnIfIsEmbeddedBrowserExtension() {
|
|
20842
|
-
if (_isEmbeddedBrowserExtension()) {
|
|
20843
|
-
if (DEBUG_BUILD4) {
|
|
20844
|
-
consoleSandbox(() => {
|
|
20845
|
-
console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/");
|
|
20846
|
-
});
|
|
20847
|
-
}
|
|
20848
|
-
return true;
|
|
20849
|
-
}
|
|
20850
|
-
return false;
|
|
20851
|
-
}
|
|
20852
|
-
function _isEmbeddedBrowserExtension() {
|
|
20853
|
-
if (typeof WINDOW4.window === "undefined") {
|
|
20854
|
-
return false;
|
|
20855
|
-
}
|
|
20856
|
-
const _window = WINDOW4;
|
|
20857
|
-
if (_window.nw) {
|
|
20858
|
-
return false;
|
|
20859
|
-
}
|
|
20860
|
-
const extensionObject = _window["chrome"] || _window["browser"];
|
|
20861
|
-
if (!extensionObject?.runtime?.id) {
|
|
20862
|
-
return false;
|
|
20863
|
-
}
|
|
20864
|
-
const href = getLocationHref();
|
|
20865
|
-
const extensionProtocols = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
|
|
20866
|
-
const isDedicatedExtensionPage = WINDOW4 === WINDOW4.top && extensionProtocols.some((protocol) => href.startsWith(`${protocol}://`));
|
|
20867
|
-
return !isDedicatedExtensionPage;
|
|
20868
|
-
}
|
|
20869
|
-
var init_detectBrowserExtension = __esm(() => {
|
|
20870
|
-
init_esm();
|
|
20871
|
-
init_debug_build3();
|
|
20872
|
-
init_helpers();
|
|
20873
|
-
});
|
|
20874
|
-
|
|
20875
20786
|
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/sdk.js
|
|
20876
20787
|
function getDefaultIntegrations(_options) {
|
|
20877
20788
|
return [
|
|
@@ -20888,35 +20799,12 @@ function getDefaultIntegrations(_options) {
|
|
|
20888
20799
|
browserSessionIntegration()
|
|
20889
20800
|
];
|
|
20890
20801
|
}
|
|
20891
|
-
function init(options = {}) {
|
|
20892
|
-
const shouldDisableBecauseIsBrowserExtenstion = !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();
|
|
20893
|
-
let defaultIntegrations = options.defaultIntegrations == null ? getDefaultIntegrations() : options.defaultIntegrations;
|
|
20894
|
-
if (options.spotlight) {
|
|
20895
|
-
if (!defaultIntegrations) {
|
|
20896
|
-
defaultIntegrations = [];
|
|
20897
|
-
}
|
|
20898
|
-
const args = typeof options.spotlight === "string" ? { sidecarUrl: options.spotlight } : undefined;
|
|
20899
|
-
defaultIntegrations.push(spotlightBrowserIntegration(args));
|
|
20900
|
-
}
|
|
20901
|
-
const clientOptions = {
|
|
20902
|
-
...options,
|
|
20903
|
-
enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,
|
|
20904
|
-
stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),
|
|
20905
|
-
integrations: getIntegrationsToSetup({
|
|
20906
|
-
integrations: options.integrations,
|
|
20907
|
-
defaultIntegrations
|
|
20908
|
-
}),
|
|
20909
|
-
transport: options.transport || makeFetchTransport
|
|
20910
|
-
};
|
|
20911
|
-
return initAndBind(BrowserClient, clientOptions);
|
|
20912
|
-
}
|
|
20913
20802
|
function forceLoad() {}
|
|
20914
20803
|
function onLoad(callback) {
|
|
20915
20804
|
callback();
|
|
20916
20805
|
}
|
|
20917
20806
|
var init_sdk2 = __esm(() => {
|
|
20918
20807
|
init_esm();
|
|
20919
|
-
init_client2();
|
|
20920
20808
|
init_breadcrumbs2();
|
|
20921
20809
|
init_browserapierrors();
|
|
20922
20810
|
init_browsersession();
|
|
@@ -20924,10 +20812,6 @@ var init_sdk2 = __esm(() => {
|
|
|
20924
20812
|
init_globalhandlers();
|
|
20925
20813
|
init_httpcontext();
|
|
20926
20814
|
init_linkederrors();
|
|
20927
|
-
init_spotlight();
|
|
20928
|
-
init_stack_parsers();
|
|
20929
|
-
init_fetch3();
|
|
20930
|
-
init_detectBrowserExtension();
|
|
20931
20815
|
});
|
|
20932
20816
|
|
|
20933
20817
|
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/report-dialog.js
|
|
@@ -25290,12 +25174,12 @@ function record(options = {}) {
|
|
|
25290
25174
|
console.warn(error3);
|
|
25291
25175
|
}
|
|
25292
25176
|
});
|
|
25293
|
-
const
|
|
25177
|
+
const init = () => {
|
|
25294
25178
|
takeFullSnapshot2();
|
|
25295
25179
|
handlers3.push(observe2(document));
|
|
25296
25180
|
};
|
|
25297
25181
|
if (document.readyState === "interactive" || document.readyState === "complete") {
|
|
25298
|
-
|
|
25182
|
+
init();
|
|
25299
25183
|
} else {
|
|
25300
25184
|
handlers3.push(on("DOMContentLoaded", () => {
|
|
25301
25185
|
wrappedEmit({
|
|
@@ -25303,7 +25187,7 @@ function record(options = {}) {
|
|
|
25303
25187
|
data: {}
|
|
25304
25188
|
});
|
|
25305
25189
|
if (recordAfter === "DOMContentLoaded")
|
|
25306
|
-
|
|
25190
|
+
init();
|
|
25307
25191
|
}));
|
|
25308
25192
|
handlers3.push(on("load", () => {
|
|
25309
25193
|
wrappedEmit({
|
|
@@ -25311,7 +25195,7 @@ function record(options = {}) {
|
|
|
25311
25195
|
data: {}
|
|
25312
25196
|
});
|
|
25313
25197
|
if (recordAfter === "load")
|
|
25314
|
-
|
|
25198
|
+
init();
|
|
25315
25199
|
}, window));
|
|
25316
25200
|
}
|
|
25317
25201
|
return () => {
|
|
@@ -28267,10 +28151,10 @@ function _INTERNAL_instrumentRequestInterface() {
|
|
|
28267
28151
|
}
|
|
28268
28152
|
const OriginalRequest = Request;
|
|
28269
28153
|
try {
|
|
28270
|
-
const SentryRequest = function(input,
|
|
28271
|
-
const request = new OriginalRequest(input,
|
|
28272
|
-
if (
|
|
28273
|
-
request[ORIGINAL_BODY] =
|
|
28154
|
+
const SentryRequest = function(input, init) {
|
|
28155
|
+
const request = new OriginalRequest(input, init);
|
|
28156
|
+
if (init?.body != null) {
|
|
28157
|
+
request[ORIGINAL_BODY] = init.body;
|
|
28274
28158
|
}
|
|
28275
28159
|
return request;
|
|
28276
28160
|
};
|
|
@@ -31740,1889 +31624,6 @@ var init_dev = __esm(() => {
|
|
|
31740
31624
|
init_webWorker();
|
|
31741
31625
|
});
|
|
31742
31626
|
|
|
31743
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/sdk.js
|
|
31744
|
-
import { version } from "react";
|
|
31745
|
-
function init2(options) {
|
|
31746
|
-
const opts = {
|
|
31747
|
-
...options
|
|
31748
|
-
};
|
|
31749
|
-
applySdkMetadata(opts, "react");
|
|
31750
|
-
setContext("react", { version });
|
|
31751
|
-
return init(opts);
|
|
31752
|
-
}
|
|
31753
|
-
var init_sdk3 = __esm(() => {
|
|
31754
|
-
init_dev();
|
|
31755
|
-
init_esm();
|
|
31756
|
-
});
|
|
31757
|
-
|
|
31758
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/error.js
|
|
31759
|
-
import { version as version2 } from "react";
|
|
31760
|
-
function isAtLeastReact17(reactVersion) {
|
|
31761
|
-
const reactMajor = reactVersion.match(/^([^.]+)/);
|
|
31762
|
-
return reactMajor !== null && parseInt(reactMajor[0]) >= 17;
|
|
31763
|
-
}
|
|
31764
|
-
function setCause(error3, cause) {
|
|
31765
|
-
const seenErrors = new WeakSet;
|
|
31766
|
-
function recurse(error4, cause2) {
|
|
31767
|
-
if (seenErrors.has(error4)) {
|
|
31768
|
-
return;
|
|
31769
|
-
}
|
|
31770
|
-
if (error4.cause) {
|
|
31771
|
-
seenErrors.add(error4);
|
|
31772
|
-
return recurse(error4.cause, cause2);
|
|
31773
|
-
}
|
|
31774
|
-
error4.cause = cause2;
|
|
31775
|
-
}
|
|
31776
|
-
recurse(error3, cause);
|
|
31777
|
-
}
|
|
31778
|
-
function captureReactException(error3, { componentStack }, hint) {
|
|
31779
|
-
if (isAtLeastReact17(version2) && isError(error3) && componentStack) {
|
|
31780
|
-
const errorBoundaryError = new Error(error3.message);
|
|
31781
|
-
errorBoundaryError.name = `React ErrorBoundary ${error3.name}`;
|
|
31782
|
-
errorBoundaryError.stack = componentStack;
|
|
31783
|
-
setCause(error3, errorBoundaryError);
|
|
31784
|
-
}
|
|
31785
|
-
return withScope2((scope) => {
|
|
31786
|
-
scope.setContext("react", { componentStack });
|
|
31787
|
-
return captureException(error3, hint);
|
|
31788
|
-
});
|
|
31789
|
-
}
|
|
31790
|
-
function reactErrorHandler(callback) {
|
|
31791
|
-
return (error3, errorInfo) => {
|
|
31792
|
-
const hasCallback = !!callback;
|
|
31793
|
-
const eventId = captureReactException(error3, errorInfo, {
|
|
31794
|
-
mechanism: { handled: hasCallback, type: "auto.function.react.error_handler" }
|
|
31795
|
-
});
|
|
31796
|
-
if (hasCallback) {
|
|
31797
|
-
callback(error3, errorInfo, eventId);
|
|
31798
|
-
}
|
|
31799
|
-
};
|
|
31800
|
-
}
|
|
31801
|
-
var init_error = __esm(() => {
|
|
31802
|
-
init_dev();
|
|
31803
|
-
init_esm();
|
|
31804
|
-
});
|
|
31805
|
-
|
|
31806
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/constants.js
|
|
31807
|
-
var REACT_RENDER_OP = "ui.react.render", REACT_UPDATE_OP = "ui.react.update", REACT_MOUNT_OP = "ui.react.mount";
|
|
31808
|
-
var init_constants8 = () => {};
|
|
31809
|
-
|
|
31810
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/hoist-non-react-statics.js
|
|
31811
|
-
function isMemo(component) {
|
|
31812
|
-
return typeof component === "object" && component !== null && component.$$typeof === MemoType;
|
|
31813
|
-
}
|
|
31814
|
-
function getStatics(component) {
|
|
31815
|
-
if (isMemo(component)) {
|
|
31816
|
-
return MEMO_STATICS;
|
|
31817
|
-
}
|
|
31818
|
-
const componentType = component.$$typeof;
|
|
31819
|
-
return componentType && TYPE_STATICS[componentType] || REACT_STATICS;
|
|
31820
|
-
}
|
|
31821
|
-
function hoistNonReactStatics(targetComponent, sourceComponent, excludelist) {
|
|
31822
|
-
if (typeof sourceComponent !== "string") {
|
|
31823
|
-
if (objectPrototype) {
|
|
31824
|
-
const inheritedComponent = getPrototypeOf(sourceComponent);
|
|
31825
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
31826
|
-
hoistNonReactStatics(targetComponent, inheritedComponent);
|
|
31827
|
-
}
|
|
31828
|
-
}
|
|
31829
|
-
let keys2 = getOwnPropertyNames(sourceComponent);
|
|
31830
|
-
if (getOwnPropertySymbols) {
|
|
31831
|
-
keys2 = keys2.concat(getOwnPropertySymbols(sourceComponent));
|
|
31832
|
-
}
|
|
31833
|
-
const targetStatics = getStatics(targetComponent);
|
|
31834
|
-
const sourceStatics = getStatics(sourceComponent);
|
|
31835
|
-
for (const key of keys2) {
|
|
31836
|
-
if (!KNOWN_STATICS[key] && true && !sourceStatics?.[key] && !targetStatics?.[key] && !getOwnPropertyDescriptor(targetComponent, key)) {
|
|
31837
|
-
const descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
31838
|
-
if (descriptor) {
|
|
31839
|
-
try {
|
|
31840
|
-
defineProperty(targetComponent, key, descriptor);
|
|
31841
|
-
} catch (e3) {}
|
|
31842
|
-
}
|
|
31843
|
-
}
|
|
31844
|
-
}
|
|
31845
|
-
}
|
|
31846
|
-
return targetComponent;
|
|
31847
|
-
}
|
|
31848
|
-
var REACT_STATICS, KNOWN_STATICS, FORWARD_REF_STATICS, MEMO_STATICS, ForwardRefType, MemoType, TYPE_STATICS, defineProperty, getOwnPropertyNames, getOwnPropertySymbols, getOwnPropertyDescriptor, getPrototypeOf, objectPrototype;
|
|
31849
|
-
var init_hoist_non_react_statics = __esm(() => {
|
|
31850
|
-
REACT_STATICS = {
|
|
31851
|
-
childContextTypes: true,
|
|
31852
|
-
contextType: true,
|
|
31853
|
-
contextTypes: true,
|
|
31854
|
-
defaultProps: true,
|
|
31855
|
-
displayName: true,
|
|
31856
|
-
getDefaultProps: true,
|
|
31857
|
-
getDerivedStateFromError: true,
|
|
31858
|
-
getDerivedStateFromProps: true,
|
|
31859
|
-
mixins: true,
|
|
31860
|
-
propTypes: true,
|
|
31861
|
-
type: true
|
|
31862
|
-
};
|
|
31863
|
-
KNOWN_STATICS = {
|
|
31864
|
-
name: true,
|
|
31865
|
-
length: true,
|
|
31866
|
-
prototype: true,
|
|
31867
|
-
caller: true,
|
|
31868
|
-
callee: true,
|
|
31869
|
-
arguments: true,
|
|
31870
|
-
arity: true
|
|
31871
|
-
};
|
|
31872
|
-
FORWARD_REF_STATICS = {
|
|
31873
|
-
$$typeof: true,
|
|
31874
|
-
render: true,
|
|
31875
|
-
defaultProps: true,
|
|
31876
|
-
displayName: true,
|
|
31877
|
-
propTypes: true
|
|
31878
|
-
};
|
|
31879
|
-
MEMO_STATICS = {
|
|
31880
|
-
$$typeof: true,
|
|
31881
|
-
compare: true,
|
|
31882
|
-
defaultProps: true,
|
|
31883
|
-
displayName: true,
|
|
31884
|
-
propTypes: true,
|
|
31885
|
-
type: true
|
|
31886
|
-
};
|
|
31887
|
-
ForwardRefType = Symbol.for("react.forward_ref");
|
|
31888
|
-
MemoType = Symbol.for("react.memo");
|
|
31889
|
-
TYPE_STATICS = {};
|
|
31890
|
-
TYPE_STATICS[ForwardRefType] = FORWARD_REF_STATICS;
|
|
31891
|
-
TYPE_STATICS[MemoType] = MEMO_STATICS;
|
|
31892
|
-
defineProperty = Object.defineProperty.bind(Object);
|
|
31893
|
-
getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);
|
|
31894
|
-
getOwnPropertySymbols = Object.getOwnPropertySymbols?.bind(Object);
|
|
31895
|
-
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor.bind(Object);
|
|
31896
|
-
getPrototypeOf = Object.getPrototypeOf.bind(Object);
|
|
31897
|
-
objectPrototype = Object.prototype;
|
|
31898
|
-
});
|
|
31899
|
-
|
|
31900
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/profiler.js
|
|
31901
|
-
import * as React from "react";
|
|
31902
|
-
function withProfiler(WrappedComponent, options) {
|
|
31903
|
-
const componentDisplayName = options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;
|
|
31904
|
-
const Wrapped = (props) => React.createElement(Profiler, { ...options, name: componentDisplayName, updateProps: props }, React.createElement(WrappedComponent, { ...props }));
|
|
31905
|
-
Wrapped.displayName = `profiler(${componentDisplayName})`;
|
|
31906
|
-
hoistNonReactStatics(Wrapped, WrappedComponent);
|
|
31907
|
-
return Wrapped;
|
|
31908
|
-
}
|
|
31909
|
-
function useProfiler(name, options = {
|
|
31910
|
-
disabled: false,
|
|
31911
|
-
hasRenderSpan: true
|
|
31912
|
-
}) {
|
|
31913
|
-
const [mountSpan] = React.useState(() => {
|
|
31914
|
-
if (options?.disabled) {
|
|
31915
|
-
return;
|
|
31916
|
-
}
|
|
31917
|
-
return startInactiveSpan({
|
|
31918
|
-
name: `<${name}>`,
|
|
31919
|
-
onlyIfParent: true,
|
|
31920
|
-
op: REACT_MOUNT_OP,
|
|
31921
|
-
attributes: {
|
|
31922
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
31923
|
-
"ui.component_name": name
|
|
31924
|
-
}
|
|
31925
|
-
});
|
|
31926
|
-
});
|
|
31927
|
-
React.useEffect(() => {
|
|
31928
|
-
if (mountSpan) {
|
|
31929
|
-
mountSpan.end();
|
|
31930
|
-
}
|
|
31931
|
-
return () => {
|
|
31932
|
-
if (mountSpan && options.hasRenderSpan) {
|
|
31933
|
-
const startTime = spanToJSON(mountSpan).timestamp;
|
|
31934
|
-
const endTimestamp = timestampInSeconds();
|
|
31935
|
-
const renderSpan = startInactiveSpan({
|
|
31936
|
-
name: `<${name}>`,
|
|
31937
|
-
onlyIfParent: true,
|
|
31938
|
-
op: REACT_RENDER_OP,
|
|
31939
|
-
startTime,
|
|
31940
|
-
attributes: {
|
|
31941
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
31942
|
-
"ui.component_name": name
|
|
31943
|
-
}
|
|
31944
|
-
});
|
|
31945
|
-
if (renderSpan) {
|
|
31946
|
-
renderSpan.end(endTimestamp);
|
|
31947
|
-
}
|
|
31948
|
-
}
|
|
31949
|
-
};
|
|
31950
|
-
}, []);
|
|
31951
|
-
}
|
|
31952
|
-
var UNKNOWN_COMPONENT = "unknown", Profiler;
|
|
31953
|
-
var init_profiler = __esm(() => {
|
|
31954
|
-
init_dev();
|
|
31955
|
-
init_esm();
|
|
31956
|
-
init_constants8();
|
|
31957
|
-
init_hoist_non_react_statics();
|
|
31958
|
-
Profiler = class Profiler extends React.Component {
|
|
31959
|
-
constructor(props) {
|
|
31960
|
-
super(props);
|
|
31961
|
-
const { name, disabled = false } = this.props;
|
|
31962
|
-
if (disabled) {
|
|
31963
|
-
return;
|
|
31964
|
-
}
|
|
31965
|
-
this._mountSpan = startInactiveSpan({
|
|
31966
|
-
name: `<${name}>`,
|
|
31967
|
-
onlyIfParent: true,
|
|
31968
|
-
op: REACT_MOUNT_OP,
|
|
31969
|
-
attributes: {
|
|
31970
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
31971
|
-
"ui.component_name": name
|
|
31972
|
-
}
|
|
31973
|
-
});
|
|
31974
|
-
}
|
|
31975
|
-
componentDidMount() {
|
|
31976
|
-
if (this._mountSpan) {
|
|
31977
|
-
this._mountSpan.end();
|
|
31978
|
-
}
|
|
31979
|
-
}
|
|
31980
|
-
shouldComponentUpdate({ updateProps, includeUpdates = true }) {
|
|
31981
|
-
if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {
|
|
31982
|
-
const changedProps = Object.keys(updateProps).filter((k2) => updateProps[k2] !== this.props.updateProps[k2]);
|
|
31983
|
-
if (changedProps.length > 0) {
|
|
31984
|
-
const now = timestampInSeconds();
|
|
31985
|
-
this._updateSpan = withActiveSpan(this._mountSpan, () => {
|
|
31986
|
-
return startInactiveSpan({
|
|
31987
|
-
name: `<${this.props.name}>`,
|
|
31988
|
-
onlyIfParent: true,
|
|
31989
|
-
op: REACT_UPDATE_OP,
|
|
31990
|
-
startTime: now,
|
|
31991
|
-
attributes: {
|
|
31992
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
31993
|
-
"ui.component_name": this.props.name,
|
|
31994
|
-
"ui.react.changed_props": changedProps
|
|
31995
|
-
}
|
|
31996
|
-
});
|
|
31997
|
-
});
|
|
31998
|
-
}
|
|
31999
|
-
}
|
|
32000
|
-
return true;
|
|
32001
|
-
}
|
|
32002
|
-
componentDidUpdate() {
|
|
32003
|
-
if (this._updateSpan) {
|
|
32004
|
-
this._updateSpan.end();
|
|
32005
|
-
this._updateSpan = undefined;
|
|
32006
|
-
}
|
|
32007
|
-
}
|
|
32008
|
-
componentWillUnmount() {
|
|
32009
|
-
const endTimestamp = timestampInSeconds();
|
|
32010
|
-
const { name, includeRender = true } = this.props;
|
|
32011
|
-
if (this._mountSpan && includeRender) {
|
|
32012
|
-
const startTime = spanToJSON(this._mountSpan).timestamp;
|
|
32013
|
-
withActiveSpan(this._mountSpan, () => {
|
|
32014
|
-
const renderSpan = startInactiveSpan({
|
|
32015
|
-
onlyIfParent: true,
|
|
32016
|
-
name: `<${name}>`,
|
|
32017
|
-
op: REACT_RENDER_OP,
|
|
32018
|
-
startTime,
|
|
32019
|
-
attributes: {
|
|
32020
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
32021
|
-
"ui.component_name": name
|
|
32022
|
-
}
|
|
32023
|
-
});
|
|
32024
|
-
if (renderSpan) {
|
|
32025
|
-
renderSpan.end(endTimestamp);
|
|
32026
|
-
}
|
|
32027
|
-
});
|
|
32028
|
-
}
|
|
32029
|
-
}
|
|
32030
|
-
render() {
|
|
32031
|
-
return this.props.children;
|
|
32032
|
-
}
|
|
32033
|
-
};
|
|
32034
|
-
Object.assign(Profiler, {
|
|
32035
|
-
defaultProps: {
|
|
32036
|
-
disabled: false,
|
|
32037
|
-
includeRender: true,
|
|
32038
|
-
includeUpdates: true
|
|
32039
|
-
}
|
|
32040
|
-
});
|
|
32041
|
-
});
|
|
32042
|
-
|
|
32043
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/debug-build.js
|
|
32044
|
-
var DEBUG_BUILD6;
|
|
32045
|
-
var init_debug_build4 = __esm(() => {
|
|
32046
|
-
DEBUG_BUILD6 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
32047
|
-
});
|
|
32048
|
-
|
|
32049
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/errorboundary.js
|
|
32050
|
-
import * as React2 from "react";
|
|
32051
|
-
function withErrorBoundary(WrappedComponent, errorBoundaryOptions) {
|
|
32052
|
-
const componentDisplayName = WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT2;
|
|
32053
|
-
const Wrapped = React2.memo((props) => React2.createElement(ErrorBoundary, { ...errorBoundaryOptions }, React2.createElement(WrappedComponent, { ...props })));
|
|
32054
|
-
Wrapped.displayName = `errorBoundary(${componentDisplayName})`;
|
|
32055
|
-
hoistNonReactStatics(Wrapped, WrappedComponent);
|
|
32056
|
-
return Wrapped;
|
|
32057
|
-
}
|
|
32058
|
-
var UNKNOWN_COMPONENT2 = "unknown", INITIAL_STATE, ErrorBoundary;
|
|
32059
|
-
var init_errorboundary = __esm(() => {
|
|
32060
|
-
init_dev();
|
|
32061
|
-
init_esm();
|
|
32062
|
-
init_debug_build4();
|
|
32063
|
-
init_error();
|
|
32064
|
-
init_hoist_non_react_statics();
|
|
32065
|
-
INITIAL_STATE = {
|
|
32066
|
-
componentStack: null,
|
|
32067
|
-
error: null,
|
|
32068
|
-
eventId: null
|
|
32069
|
-
};
|
|
32070
|
-
ErrorBoundary = class ErrorBoundary extends React2.Component {
|
|
32071
|
-
constructor(props) {
|
|
32072
|
-
super(props);
|
|
32073
|
-
this.state = INITIAL_STATE;
|
|
32074
|
-
this._openFallbackReportDialog = true;
|
|
32075
|
-
const client = getClient();
|
|
32076
|
-
if (client && props.showDialog) {
|
|
32077
|
-
this._openFallbackReportDialog = false;
|
|
32078
|
-
this._cleanupHook = client.on("afterSendEvent", (event) => {
|
|
32079
|
-
if (!event.type && this._lastEventId && event.event_id === this._lastEventId) {
|
|
32080
|
-
showReportDialog({ ...props.dialogOptions, eventId: this._lastEventId });
|
|
32081
|
-
}
|
|
32082
|
-
});
|
|
32083
|
-
}
|
|
32084
|
-
}
|
|
32085
|
-
componentDidCatch(error3, errorInfo) {
|
|
32086
|
-
const { componentStack } = errorInfo;
|
|
32087
|
-
const { beforeCapture, onError, showDialog, dialogOptions } = this.props;
|
|
32088
|
-
withScope2((scope) => {
|
|
32089
|
-
if (beforeCapture) {
|
|
32090
|
-
beforeCapture(scope, error3, componentStack);
|
|
32091
|
-
}
|
|
32092
|
-
const handled = this.props.handled != null ? this.props.handled : !!this.props.fallback;
|
|
32093
|
-
const eventId = captureReactException(error3, errorInfo, {
|
|
32094
|
-
mechanism: { handled, type: "auto.function.react.error_boundary" }
|
|
32095
|
-
});
|
|
32096
|
-
if (onError) {
|
|
32097
|
-
onError(error3, componentStack, eventId);
|
|
32098
|
-
}
|
|
32099
|
-
if (showDialog) {
|
|
32100
|
-
this._lastEventId = eventId;
|
|
32101
|
-
if (this._openFallbackReportDialog) {
|
|
32102
|
-
showReportDialog({ ...dialogOptions, eventId });
|
|
32103
|
-
}
|
|
32104
|
-
}
|
|
32105
|
-
this.setState({ error: error3, componentStack, eventId });
|
|
32106
|
-
});
|
|
32107
|
-
}
|
|
32108
|
-
componentDidMount() {
|
|
32109
|
-
const { onMount } = this.props;
|
|
32110
|
-
if (onMount) {
|
|
32111
|
-
onMount();
|
|
32112
|
-
}
|
|
32113
|
-
}
|
|
32114
|
-
componentWillUnmount() {
|
|
32115
|
-
const { error: error3, componentStack, eventId } = this.state;
|
|
32116
|
-
const { onUnmount } = this.props;
|
|
32117
|
-
if (onUnmount) {
|
|
32118
|
-
if (this.state === INITIAL_STATE) {
|
|
32119
|
-
onUnmount(null, null, null);
|
|
32120
|
-
} else {
|
|
32121
|
-
onUnmount(error3, componentStack, eventId);
|
|
32122
|
-
}
|
|
32123
|
-
}
|
|
32124
|
-
if (this._cleanupHook) {
|
|
32125
|
-
this._cleanupHook();
|
|
32126
|
-
this._cleanupHook = undefined;
|
|
32127
|
-
}
|
|
32128
|
-
}
|
|
32129
|
-
resetErrorBoundary() {
|
|
32130
|
-
const { onReset } = this.props;
|
|
32131
|
-
const { error: error3, componentStack, eventId } = this.state;
|
|
32132
|
-
if (onReset) {
|
|
32133
|
-
onReset(error3, componentStack, eventId);
|
|
32134
|
-
}
|
|
32135
|
-
this.setState(INITIAL_STATE);
|
|
32136
|
-
}
|
|
32137
|
-
render() {
|
|
32138
|
-
const { fallback, children } = this.props;
|
|
32139
|
-
const state = this.state;
|
|
32140
|
-
if (state.componentStack === null) {
|
|
32141
|
-
return typeof children === "function" ? children() : children;
|
|
32142
|
-
}
|
|
32143
|
-
const element = typeof fallback === "function" ? React2.createElement(fallback, {
|
|
32144
|
-
error: state.error,
|
|
32145
|
-
componentStack: state.componentStack,
|
|
32146
|
-
resetError: () => this.resetErrorBoundary(),
|
|
32147
|
-
eventId: state.eventId
|
|
32148
|
-
}) : fallback;
|
|
32149
|
-
if (React2.isValidElement(element)) {
|
|
32150
|
-
return element;
|
|
32151
|
-
}
|
|
32152
|
-
if (fallback) {
|
|
32153
|
-
DEBUG_BUILD6 && debug.warn("fallback did not produce a valid ReactElement");
|
|
32154
|
-
}
|
|
32155
|
-
return null;
|
|
32156
|
-
}
|
|
32157
|
-
};
|
|
32158
|
-
});
|
|
32159
|
-
|
|
32160
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/redux.js
|
|
32161
|
-
function createReduxEnhancer(enhancerOptions) {
|
|
32162
|
-
const options = {
|
|
32163
|
-
...defaultOptions,
|
|
32164
|
-
...enhancerOptions
|
|
32165
|
-
};
|
|
32166
|
-
return (next) => (reducer, initialState) => {
|
|
32167
|
-
options.attachReduxState && getGlobalScope().addEventProcessor((event, hint) => {
|
|
32168
|
-
try {
|
|
32169
|
-
if (event.type === undefined && event.contexts.state.state.type === "redux") {
|
|
32170
|
-
hint.attachments = [
|
|
32171
|
-
...hint.attachments || [],
|
|
32172
|
-
{ filename: "redux_state.json", data: JSON.stringify(event.contexts.state.state.value) }
|
|
32173
|
-
];
|
|
32174
|
-
}
|
|
32175
|
-
} catch {}
|
|
32176
|
-
return event;
|
|
32177
|
-
});
|
|
32178
|
-
function sentryWrapReducer(reducer2) {
|
|
32179
|
-
return (state, action) => {
|
|
32180
|
-
const newState = reducer2(state, action);
|
|
32181
|
-
const scope = getCurrentScope();
|
|
32182
|
-
const transformedAction = options.actionTransformer(action);
|
|
32183
|
-
if (typeof transformedAction !== "undefined" && transformedAction !== null) {
|
|
32184
|
-
addBreadcrumb({
|
|
32185
|
-
category: ACTION_BREADCRUMB_CATEGORY,
|
|
32186
|
-
data: transformedAction,
|
|
32187
|
-
type: ACTION_BREADCRUMB_TYPE
|
|
32188
|
-
});
|
|
32189
|
-
}
|
|
32190
|
-
const transformedState = options.stateTransformer(newState);
|
|
32191
|
-
if (typeof transformedState !== "undefined" && transformedState !== null) {
|
|
32192
|
-
const client = getClient();
|
|
32193
|
-
const options2 = client?.getOptions();
|
|
32194
|
-
const normalizationDepth = options2?.normalizeDepth || 3;
|
|
32195
|
-
const newStateContext = { state: { type: "redux", value: transformedState } };
|
|
32196
|
-
addNonEnumerableProperty(newStateContext, "__sentry_override_normalization_depth__", 3 + normalizationDepth);
|
|
32197
|
-
scope.setContext("state", newStateContext);
|
|
32198
|
-
} else {
|
|
32199
|
-
scope.setContext("state", null);
|
|
32200
|
-
}
|
|
32201
|
-
const { configureScopeWithState } = options;
|
|
32202
|
-
if (typeof configureScopeWithState === "function") {
|
|
32203
|
-
configureScopeWithState(scope, newState);
|
|
32204
|
-
}
|
|
32205
|
-
return newState;
|
|
32206
|
-
};
|
|
32207
|
-
}
|
|
32208
|
-
const store = next(sentryWrapReducer(reducer), initialState);
|
|
32209
|
-
store.replaceReducer = new Proxy(store.replaceReducer, {
|
|
32210
|
-
apply: function(target, thisArg, args) {
|
|
32211
|
-
target.apply(thisArg, [sentryWrapReducer(args[0])]);
|
|
32212
|
-
}
|
|
32213
|
-
});
|
|
32214
|
-
return store;
|
|
32215
|
-
};
|
|
32216
|
-
}
|
|
32217
|
-
var ACTION_BREADCRUMB_CATEGORY = "redux.action", ACTION_BREADCRUMB_TYPE = "info", defaultOptions;
|
|
32218
|
-
var init_redux = __esm(() => {
|
|
32219
|
-
init_esm();
|
|
32220
|
-
defaultOptions = {
|
|
32221
|
-
attachReduxState: true,
|
|
32222
|
-
actionTransformer: (action) => action,
|
|
32223
|
-
stateTransformer: (state) => state || null
|
|
32224
|
-
};
|
|
32225
|
-
});
|
|
32226
|
-
|
|
32227
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv3.js
|
|
32228
|
-
function reactRouterV3BrowserTracingIntegration(options) {
|
|
32229
|
-
const integration = browserTracingIntegration({
|
|
32230
|
-
...options,
|
|
32231
|
-
instrumentPageLoad: false,
|
|
32232
|
-
instrumentNavigation: false
|
|
32233
|
-
});
|
|
32234
|
-
const { history, routes, match, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
32235
|
-
return {
|
|
32236
|
-
...integration,
|
|
32237
|
-
afterAllSetup(client) {
|
|
32238
|
-
integration.afterAllSetup(client);
|
|
32239
|
-
if (instrumentPageLoad && WINDOW4.location) {
|
|
32240
|
-
normalizeTransactionName(routes, WINDOW4.location, match, (localName, source = "url") => {
|
|
32241
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
32242
|
-
name: localName,
|
|
32243
|
-
attributes: {
|
|
32244
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
32245
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.react.reactrouter_v3",
|
|
32246
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
32247
|
-
}
|
|
32248
|
-
});
|
|
32249
|
-
});
|
|
32250
|
-
}
|
|
32251
|
-
if (instrumentNavigation && history.listen) {
|
|
32252
|
-
history.listen((location2) => {
|
|
32253
|
-
if (location2.action === "PUSH" || location2.action === "POP") {
|
|
32254
|
-
normalizeTransactionName(routes, location2, match, (localName, source = "url") => {
|
|
32255
|
-
startBrowserTracingNavigationSpan(client, {
|
|
32256
|
-
name: localName,
|
|
32257
|
-
attributes: {
|
|
32258
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
32259
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.react.reactrouter_v3",
|
|
32260
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
32261
|
-
}
|
|
32262
|
-
});
|
|
32263
|
-
});
|
|
32264
|
-
}
|
|
32265
|
-
});
|
|
32266
|
-
}
|
|
32267
|
-
}
|
|
32268
|
-
};
|
|
32269
|
-
}
|
|
32270
|
-
function normalizeTransactionName(appRoutes, location2, match, callback) {
|
|
32271
|
-
let name = location2.pathname;
|
|
32272
|
-
match({
|
|
32273
|
-
location: location2,
|
|
32274
|
-
routes: appRoutes
|
|
32275
|
-
}, (error3, _redirectLocation, renderProps) => {
|
|
32276
|
-
if (error3 || !renderProps) {
|
|
32277
|
-
return callback(name);
|
|
32278
|
-
}
|
|
32279
|
-
const routePath = getRouteStringFromRoutes(renderProps.routes || []);
|
|
32280
|
-
if (routePath.length === 0 || routePath === "/*") {
|
|
32281
|
-
return callback(name);
|
|
32282
|
-
}
|
|
32283
|
-
name = routePath;
|
|
32284
|
-
return callback(name, "route");
|
|
32285
|
-
});
|
|
32286
|
-
}
|
|
32287
|
-
function getRouteStringFromRoutes(routes) {
|
|
32288
|
-
if (!Array.isArray(routes) || routes.length === 0) {
|
|
32289
|
-
return "";
|
|
32290
|
-
}
|
|
32291
|
-
const routesWithPaths = routes.filter((route) => !!route.path);
|
|
32292
|
-
let index = -1;
|
|
32293
|
-
for (let x2 = routesWithPaths.length - 1;x2 >= 0; x2--) {
|
|
32294
|
-
const route = routesWithPaths[x2];
|
|
32295
|
-
if (route.path?.startsWith("/")) {
|
|
32296
|
-
index = x2;
|
|
32297
|
-
break;
|
|
32298
|
-
}
|
|
32299
|
-
}
|
|
32300
|
-
return routesWithPaths.slice(index).reduce((acc, { path }) => {
|
|
32301
|
-
const pathSegment = acc === "/" || acc === "" ? path : `/${path}`;
|
|
32302
|
-
return `${acc}${pathSegment}`;
|
|
32303
|
-
}, "");
|
|
32304
|
-
}
|
|
32305
|
-
var init_reactrouterv3 = __esm(() => {
|
|
32306
|
-
init_dev();
|
|
32307
|
-
init_esm();
|
|
32308
|
-
});
|
|
32309
|
-
|
|
32310
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/tanstackrouter.js
|
|
32311
|
-
function tanstackRouterBrowserTracingIntegration(router, options = {}) {
|
|
32312
|
-
const castRouterInstance = router;
|
|
32313
|
-
const browserTracingIntegrationInstance = browserTracingIntegration({
|
|
32314
|
-
...options,
|
|
32315
|
-
instrumentNavigation: false,
|
|
32316
|
-
instrumentPageLoad: false
|
|
32317
|
-
});
|
|
32318
|
-
const { instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
32319
|
-
return {
|
|
32320
|
-
...browserTracingIntegrationInstance,
|
|
32321
|
-
afterAllSetup(client) {
|
|
32322
|
-
browserTracingIntegrationInstance.afterAllSetup(client);
|
|
32323
|
-
const initialWindowLocation = WINDOW4.location;
|
|
32324
|
-
if (instrumentPageLoad && initialWindowLocation) {
|
|
32325
|
-
const matchedRoutes = castRouterInstance.matchRoutes(initialWindowLocation.pathname, castRouterInstance.options.parseSearch(initialWindowLocation.search), { preload: false, throwOnError: false });
|
|
32326
|
-
const lastMatch = matchedRoutes[matchedRoutes.length - 1];
|
|
32327
|
-
const routeMatch = lastMatch?.routeId !== "__root__" ? lastMatch : undefined;
|
|
32328
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
32329
|
-
name: routeMatch ? routeMatch.routeId : initialWindowLocation.pathname,
|
|
32330
|
-
attributes: {
|
|
32331
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
32332
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.react.tanstack_router",
|
|
32333
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: routeMatch ? "route" : "url",
|
|
32334
|
-
...routeMatchToParamSpanAttributes(routeMatch)
|
|
32335
|
-
}
|
|
32336
|
-
});
|
|
32337
|
-
}
|
|
32338
|
-
if (instrumentNavigation) {
|
|
32339
|
-
castRouterInstance.subscribe("onBeforeNavigate", (onBeforeNavigateArgs) => {
|
|
32340
|
-
if (!onBeforeNavigateArgs.fromLocation || onBeforeNavigateArgs.toLocation.state === onBeforeNavigateArgs.fromLocation.state) {
|
|
32341
|
-
return;
|
|
32342
|
-
}
|
|
32343
|
-
const matchedRoutesOnBeforeNavigate = castRouterInstance.matchRoutes(onBeforeNavigateArgs.toLocation.pathname, onBeforeNavigateArgs.toLocation.search, { preload: false, throwOnError: false });
|
|
32344
|
-
const onBeforeNavigateLastMatch = matchedRoutesOnBeforeNavigate[matchedRoutesOnBeforeNavigate.length - 1];
|
|
32345
|
-
const onBeforeNavigateRouteMatch = onBeforeNavigateLastMatch?.routeId !== "__root__" ? onBeforeNavigateLastMatch : undefined;
|
|
32346
|
-
const navigationLocation = WINDOW4.location;
|
|
32347
|
-
const navigationSpan = startBrowserTracingNavigationSpan(client, {
|
|
32348
|
-
name: onBeforeNavigateRouteMatch ? onBeforeNavigateRouteMatch.routeId : navigationLocation.pathname,
|
|
32349
|
-
attributes: {
|
|
32350
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
32351
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.react.tanstack_router",
|
|
32352
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: onBeforeNavigateRouteMatch ? "route" : "url"
|
|
32353
|
-
}
|
|
32354
|
-
});
|
|
32355
|
-
const unsubscribeOnResolved = castRouterInstance.subscribe("onResolved", (onResolvedArgs) => {
|
|
32356
|
-
unsubscribeOnResolved();
|
|
32357
|
-
if (navigationSpan) {
|
|
32358
|
-
const matchedRoutesOnResolved = castRouterInstance.matchRoutes(onResolvedArgs.toLocation.pathname, onResolvedArgs.toLocation.search, { preload: false, throwOnError: false });
|
|
32359
|
-
const onResolvedLastMatch = matchedRoutesOnResolved[matchedRoutesOnResolved.length - 1];
|
|
32360
|
-
const onResolvedRouteMatch = onResolvedLastMatch?.routeId !== "__root__" ? onResolvedLastMatch : undefined;
|
|
32361
|
-
if (onResolvedRouteMatch) {
|
|
32362
|
-
navigationSpan.updateName(onResolvedRouteMatch.routeId);
|
|
32363
|
-
navigationSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route");
|
|
32364
|
-
navigationSpan.setAttributes(routeMatchToParamSpanAttributes(onResolvedRouteMatch));
|
|
32365
|
-
}
|
|
32366
|
-
}
|
|
32367
|
-
});
|
|
32368
|
-
});
|
|
32369
|
-
}
|
|
32370
|
-
}
|
|
32371
|
-
};
|
|
32372
|
-
}
|
|
32373
|
-
function routeMatchToParamSpanAttributes(match) {
|
|
32374
|
-
if (!match) {
|
|
32375
|
-
return {};
|
|
32376
|
-
}
|
|
32377
|
-
const paramAttributes = {};
|
|
32378
|
-
Object.entries(match.params).forEach(([key, value]) => {
|
|
32379
|
-
paramAttributes[`url.path.params.${key}`] = value;
|
|
32380
|
-
paramAttributes[`url.path.parameter.${key}`] = value;
|
|
32381
|
-
paramAttributes[`params.${key}`] = value;
|
|
32382
|
-
});
|
|
32383
|
-
return paramAttributes;
|
|
32384
|
-
}
|
|
32385
|
-
var init_tanstackrouter = __esm(() => {
|
|
32386
|
-
init_dev();
|
|
32387
|
-
init_esm();
|
|
32388
|
-
});
|
|
32389
|
-
|
|
32390
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter.js
|
|
32391
|
-
import * as React3 from "react";
|
|
32392
|
-
function reactRouterV4BrowserTracingIntegration(options) {
|
|
32393
|
-
const integration = browserTracingIntegration({
|
|
32394
|
-
...options,
|
|
32395
|
-
instrumentPageLoad: false,
|
|
32396
|
-
instrumentNavigation: false
|
|
32397
|
-
});
|
|
32398
|
-
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
32399
|
-
return {
|
|
32400
|
-
...integration,
|
|
32401
|
-
afterAllSetup(client) {
|
|
32402
|
-
integration.afterAllSetup(client);
|
|
32403
|
-
instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, "reactrouter_v4", routes, matchPath);
|
|
32404
|
-
}
|
|
32405
|
-
};
|
|
32406
|
-
}
|
|
32407
|
-
function reactRouterV5BrowserTracingIntegration(options) {
|
|
32408
|
-
const integration = browserTracingIntegration({
|
|
32409
|
-
...options,
|
|
32410
|
-
instrumentPageLoad: false,
|
|
32411
|
-
instrumentNavigation: false
|
|
32412
|
-
});
|
|
32413
|
-
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
32414
|
-
return {
|
|
32415
|
-
...integration,
|
|
32416
|
-
afterAllSetup(client) {
|
|
32417
|
-
integration.afterAllSetup(client);
|
|
32418
|
-
instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, "reactrouter_v5", routes, matchPath);
|
|
32419
|
-
}
|
|
32420
|
-
};
|
|
32421
|
-
}
|
|
32422
|
-
function instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, instrumentationName, allRoutes = [], matchPath) {
|
|
32423
|
-
function getInitPathName() {
|
|
32424
|
-
if (history.location) {
|
|
32425
|
-
return history.location.pathname;
|
|
32426
|
-
}
|
|
32427
|
-
if (WINDOW4.location) {
|
|
32428
|
-
return WINDOW4.location.pathname;
|
|
32429
|
-
}
|
|
32430
|
-
return;
|
|
32431
|
-
}
|
|
32432
|
-
function normalizeTransactionName2(pathname) {
|
|
32433
|
-
if (allRoutes.length === 0 || !matchPath) {
|
|
32434
|
-
return [pathname, "url"];
|
|
32435
|
-
}
|
|
32436
|
-
const branches = matchRoutes(allRoutes, pathname, matchPath);
|
|
32437
|
-
for (const branch of branches) {
|
|
32438
|
-
if (branch.match.isExact) {
|
|
32439
|
-
return [branch.match.path, "route"];
|
|
32440
|
-
}
|
|
32441
|
-
}
|
|
32442
|
-
return [pathname, "url"];
|
|
32443
|
-
}
|
|
32444
|
-
if (instrumentPageLoad) {
|
|
32445
|
-
const initPathName = getInitPathName();
|
|
32446
|
-
if (initPathName) {
|
|
32447
|
-
const [name, source] = normalizeTransactionName2(initPathName);
|
|
32448
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
32449
|
-
name,
|
|
32450
|
-
attributes: {
|
|
32451
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
32452
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.${instrumentationName}`,
|
|
32453
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
32454
|
-
}
|
|
32455
|
-
});
|
|
32456
|
-
}
|
|
32457
|
-
}
|
|
32458
|
-
if (instrumentNavigation && history.listen) {
|
|
32459
|
-
history.listen((location2, action) => {
|
|
32460
|
-
if (action && (action === "PUSH" || action === "POP")) {
|
|
32461
|
-
const [name, source] = normalizeTransactionName2(location2.pathname);
|
|
32462
|
-
startBrowserTracingNavigationSpan(client, {
|
|
32463
|
-
name,
|
|
32464
|
-
attributes: {
|
|
32465
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
32466
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.${instrumentationName}`,
|
|
32467
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
32468
|
-
}
|
|
32469
|
-
});
|
|
32470
|
-
}
|
|
32471
|
-
});
|
|
32472
|
-
}
|
|
32473
|
-
}
|
|
32474
|
-
function matchRoutes(routes, pathname, matchPath, branch = []) {
|
|
32475
|
-
routes.some((route) => {
|
|
32476
|
-
const match = route.path ? matchPath(pathname, route) : branch.length ? branch[branch.length - 1].match : computeRootMatch(pathname);
|
|
32477
|
-
if (match) {
|
|
32478
|
-
branch.push({ route, match });
|
|
32479
|
-
if (route.routes) {
|
|
32480
|
-
matchRoutes(route.routes, pathname, matchPath, branch);
|
|
32481
|
-
}
|
|
32482
|
-
}
|
|
32483
|
-
return !!match;
|
|
32484
|
-
});
|
|
32485
|
-
return branch;
|
|
32486
|
-
}
|
|
32487
|
-
function computeRootMatch(pathname) {
|
|
32488
|
-
return { path: "/", url: "/", params: {}, isExact: pathname === "/" };
|
|
32489
|
-
}
|
|
32490
|
-
function withSentryRouting(Route) {
|
|
32491
|
-
const componentDisplayName = Route.displayName || Route.name;
|
|
32492
|
-
const WrappedRoute = (props) => {
|
|
32493
|
-
if (props?.computedMatch?.isExact) {
|
|
32494
|
-
const route = props.computedMatch.path;
|
|
32495
|
-
const activeRootSpan = getActiveRootSpan();
|
|
32496
|
-
getCurrentScope().setTransactionName(route);
|
|
32497
|
-
if (activeRootSpan) {
|
|
32498
|
-
activeRootSpan.updateName(route);
|
|
32499
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route");
|
|
32500
|
-
}
|
|
32501
|
-
}
|
|
32502
|
-
return React3.createElement(Route, { ...props });
|
|
32503
|
-
};
|
|
32504
|
-
WrappedRoute.displayName = `sentryRoute(${componentDisplayName})`;
|
|
32505
|
-
hoistNonReactStatics(WrappedRoute, Route);
|
|
32506
|
-
return WrappedRoute;
|
|
32507
|
-
}
|
|
32508
|
-
function getActiveRootSpan() {
|
|
32509
|
-
const span = getActiveSpan();
|
|
32510
|
-
const rootSpan = span && getRootSpan(span);
|
|
32511
|
-
if (!rootSpan) {
|
|
32512
|
-
return;
|
|
32513
|
-
}
|
|
32514
|
-
const op = spanToJSON(rootSpan).op;
|
|
32515
|
-
return op === "navigation" || op === "pageload" ? rootSpan : undefined;
|
|
32516
|
-
}
|
|
32517
|
-
var init_reactrouter = __esm(() => {
|
|
32518
|
-
init_dev();
|
|
32519
|
-
init_esm();
|
|
32520
|
-
init_hoist_non_react_statics();
|
|
32521
|
-
});
|
|
32522
|
-
|
|
32523
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/route-manifest.js
|
|
32524
|
-
function stripBasenameFromPathname(pathname, basename3) {
|
|
32525
|
-
if (!basename3 || basename3 === "/") {
|
|
32526
|
-
return pathname;
|
|
32527
|
-
}
|
|
32528
|
-
if (!pathname.toLowerCase().startsWith(basename3.toLowerCase())) {
|
|
32529
|
-
return pathname;
|
|
32530
|
-
}
|
|
32531
|
-
const startIndex = basename3.endsWith("/") ? basename3.length - 1 : basename3.length;
|
|
32532
|
-
const nextChar = pathname.charAt(startIndex);
|
|
32533
|
-
if (nextChar && nextChar !== "/") {
|
|
32534
|
-
return pathname;
|
|
32535
|
-
}
|
|
32536
|
-
return pathname.slice(startIndex) || "/";
|
|
32537
|
-
}
|
|
32538
|
-
function matchRouteManifest(pathname, manifest, basename3) {
|
|
32539
|
-
if (!pathname || !manifest || !manifest.length) {
|
|
32540
|
-
return null;
|
|
32541
|
-
}
|
|
32542
|
-
const normalizedPathname = basename3 ? stripBasenameFromPathname(pathname, basename3) : pathname;
|
|
32543
|
-
let sorted = SORTED_MANIFEST_CACHE.get(manifest);
|
|
32544
|
-
if (!sorted) {
|
|
32545
|
-
sorted = sortBySpecificity(manifest);
|
|
32546
|
-
SORTED_MANIFEST_CACHE.set(manifest, sorted);
|
|
32547
|
-
DEBUG_BUILD6 && debug.log("[React Router] Sorted route manifest by specificity:", sorted.length, "patterns");
|
|
32548
|
-
}
|
|
32549
|
-
for (const pattern of sorted) {
|
|
32550
|
-
if (matchesPattern(normalizedPathname, pattern)) {
|
|
32551
|
-
DEBUG_BUILD6 && debug.log("[React Router] Matched pathname", normalizedPathname, "to pattern", pattern);
|
|
32552
|
-
return pattern;
|
|
32553
|
-
}
|
|
32554
|
-
}
|
|
32555
|
-
DEBUG_BUILD6 && debug.log("[React Router] No manifest match found for pathname:", normalizedPathname);
|
|
32556
|
-
return null;
|
|
32557
|
-
}
|
|
32558
|
-
function matchesPattern(pathname, pattern) {
|
|
32559
|
-
if (pattern === "/") {
|
|
32560
|
-
return pathname === "/" || pathname === "";
|
|
32561
|
-
}
|
|
32562
|
-
const pathSegments = splitPath2(pathname);
|
|
32563
|
-
const patternSegments = splitPath2(pattern);
|
|
32564
|
-
const hasWildcard = patternSegments.length > 0 && patternSegments[patternSegments.length - 1] === "*";
|
|
32565
|
-
if (hasWildcard) {
|
|
32566
|
-
const patternSegmentsWithoutWildcard = patternSegments.slice(0, -1);
|
|
32567
|
-
if (pathSegments.length < patternSegmentsWithoutWildcard.length) {
|
|
32568
|
-
return false;
|
|
32569
|
-
}
|
|
32570
|
-
for (const [i2, patternSegment] of patternSegmentsWithoutWildcard.entries()) {
|
|
32571
|
-
if (!segmentMatches(pathSegments[i2], patternSegment)) {
|
|
32572
|
-
return false;
|
|
32573
|
-
}
|
|
32574
|
-
}
|
|
32575
|
-
return true;
|
|
32576
|
-
}
|
|
32577
|
-
if (pathSegments.length !== patternSegments.length) {
|
|
32578
|
-
return false;
|
|
32579
|
-
}
|
|
32580
|
-
for (const [i2, patternSegment] of patternSegments.entries()) {
|
|
32581
|
-
if (!segmentMatches(pathSegments[i2], patternSegment)) {
|
|
32582
|
-
return false;
|
|
32583
|
-
}
|
|
32584
|
-
}
|
|
32585
|
-
return true;
|
|
32586
|
-
}
|
|
32587
|
-
function segmentMatches(pathSegment, patternSegment) {
|
|
32588
|
-
if (pathSegment === undefined || patternSegment === undefined) {
|
|
32589
|
-
return false;
|
|
32590
|
-
}
|
|
32591
|
-
if (PARAM_RE.test(patternSegment)) {
|
|
32592
|
-
return true;
|
|
32593
|
-
}
|
|
32594
|
-
return pathSegment === patternSegment;
|
|
32595
|
-
}
|
|
32596
|
-
function splitPath2(path) {
|
|
32597
|
-
return path.split("/").filter(Boolean);
|
|
32598
|
-
}
|
|
32599
|
-
function computeScore(pattern) {
|
|
32600
|
-
const segments = pattern.split("/");
|
|
32601
|
-
let score = segments.length;
|
|
32602
|
-
if (segments.includes("*")) {
|
|
32603
|
-
score += SPLAT_PENALTY;
|
|
32604
|
-
}
|
|
32605
|
-
for (const segment of segments) {
|
|
32606
|
-
if (segment === "*") {
|
|
32607
|
-
continue;
|
|
32608
|
-
} else if (PARAM_RE.test(segment)) {
|
|
32609
|
-
score += DYNAMIC_SEGMENT_SCORE;
|
|
32610
|
-
} else if (segment === "") {
|
|
32611
|
-
score += EMPTY_SEGMENT_SCORE;
|
|
32612
|
-
} else {
|
|
32613
|
-
score += STATIC_SEGMENT_SCORE;
|
|
32614
|
-
}
|
|
32615
|
-
}
|
|
32616
|
-
return score;
|
|
32617
|
-
}
|
|
32618
|
-
function sortBySpecificity(manifest) {
|
|
32619
|
-
return [...manifest].sort((a2, b2) => {
|
|
32620
|
-
const aScore = computeScore(a2);
|
|
32621
|
-
const bScore = computeScore(b2);
|
|
32622
|
-
return bScore - aScore;
|
|
32623
|
-
});
|
|
32624
|
-
}
|
|
32625
|
-
var SORTED_MANIFEST_CACHE, PARAM_RE, STATIC_SEGMENT_SCORE = 10, DYNAMIC_SEGMENT_SCORE = 3, EMPTY_SEGMENT_SCORE = 1, SPLAT_PENALTY = -2;
|
|
32626
|
-
var init_route_manifest = __esm(() => {
|
|
32627
|
-
init_esm();
|
|
32628
|
-
init_debug_build4();
|
|
32629
|
-
SORTED_MANIFEST_CACHE = new WeakMap;
|
|
32630
|
-
PARAM_RE = /^:[\w-]+$/;
|
|
32631
|
-
});
|
|
32632
|
-
|
|
32633
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/utils.js
|
|
32634
|
-
function setNavigationContext(targetPath, span) {
|
|
32635
|
-
const token = {};
|
|
32636
|
-
if (_navigationContextStack.length >= MAX_CONTEXT_STACK_SIZE) {
|
|
32637
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Navigation context stack overflow - removing oldest context");
|
|
32638
|
-
_navigationContextStack.shift();
|
|
32639
|
-
}
|
|
32640
|
-
_navigationContextStack.push({ token, targetPath, span });
|
|
32641
|
-
return token;
|
|
32642
|
-
}
|
|
32643
|
-
function clearNavigationContext(token) {
|
|
32644
|
-
const top = _navigationContextStack[_navigationContextStack.length - 1];
|
|
32645
|
-
if (top?.token === token) {
|
|
32646
|
-
_navigationContextStack.pop();
|
|
32647
|
-
}
|
|
32648
|
-
}
|
|
32649
|
-
function getNavigationContext() {
|
|
32650
|
-
const length = _navigationContextStack.length;
|
|
32651
|
-
return length > 0 ? _navigationContextStack[length - 1] ?? null : null;
|
|
32652
|
-
}
|
|
32653
|
-
function initializeRouterUtils(matchRoutes2, stripBasename = false) {
|
|
32654
|
-
_matchRoutes = matchRoutes2;
|
|
32655
|
-
_stripBasename = stripBasename;
|
|
32656
|
-
}
|
|
32657
|
-
function pickPath(match) {
|
|
32658
|
-
return trimWildcard(match.route.path || "");
|
|
32659
|
-
}
|
|
32660
|
-
function pickSplat(match) {
|
|
32661
|
-
return match.params["*"] || "";
|
|
32662
|
-
}
|
|
32663
|
-
function trimWildcard(path) {
|
|
32664
|
-
return path[path.length - 1] === "*" ? path.slice(0, -1) : path;
|
|
32665
|
-
}
|
|
32666
|
-
function trimSlash(path) {
|
|
32667
|
-
return path[path.length - 1] === "/" ? path.slice(0, -1) : path;
|
|
32668
|
-
}
|
|
32669
|
-
function pathEndsWithWildcard(path) {
|
|
32670
|
-
return path.endsWith("*");
|
|
32671
|
-
}
|
|
32672
|
-
function transactionNameHasWildcard(name) {
|
|
32673
|
-
return name.includes("/*") || name.endsWith("*");
|
|
32674
|
-
}
|
|
32675
|
-
function pathIsWildcardAndHasChildren(path, branch) {
|
|
32676
|
-
return pathEndsWithWildcard(path) && !!branch.route.children?.length || false;
|
|
32677
|
-
}
|
|
32678
|
-
function routeIsDescendant(route) {
|
|
32679
|
-
return !!(!route.children && route.element && route.path?.endsWith("/*"));
|
|
32680
|
-
}
|
|
32681
|
-
function sendIndexPath(pathBuilder, pathname, basename3) {
|
|
32682
|
-
const reconstructedPath = pathBuilder && pathBuilder.length > 0 ? pathBuilder : _stripBasename ? stripBasenameFromPathname(pathname, basename3) : pathname;
|
|
32683
|
-
let formattedPath = reconstructedPath.slice(-2) === "/*" ? reconstructedPath.slice(0, -2) : reconstructedPath;
|
|
32684
|
-
if (formattedPath.length > 1 && formattedPath[formattedPath.length - 1] === "/") {
|
|
32685
|
-
formattedPath = formattedPath.slice(0, -1);
|
|
32686
|
-
}
|
|
32687
|
-
return [formattedPath, "route"];
|
|
32688
|
-
}
|
|
32689
|
-
function getNumberOfUrlSegments(url) {
|
|
32690
|
-
return url.split(/\\?\//).filter((s2) => s2.length > 0 && s2 !== ",").length;
|
|
32691
|
-
}
|
|
32692
|
-
function prefixWithSlash(path) {
|
|
32693
|
-
return path[0] === "/" ? path : `/${path}`;
|
|
32694
|
-
}
|
|
32695
|
-
function rebuildRoutePathFromAllRoutes(allRoutes, location2) {
|
|
32696
|
-
const matchedRoutes = _matchRoutes(allRoutes, location2);
|
|
32697
|
-
if (!matchedRoutes || matchedRoutes.length === 0) {
|
|
32698
|
-
return "";
|
|
32699
|
-
}
|
|
32700
|
-
for (const match of matchedRoutes) {
|
|
32701
|
-
if (match.route.path && match.route.path !== "*") {
|
|
32702
|
-
const path = pickPath(match);
|
|
32703
|
-
const strippedPath = stripBasenameFromPathname(location2.pathname, prefixWithSlash(match.pathnameBase));
|
|
32704
|
-
if (location2.pathname === strippedPath) {
|
|
32705
|
-
return trimSlash(strippedPath);
|
|
32706
|
-
}
|
|
32707
|
-
return trimSlash(trimSlash(path || "") + prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes.filter((route) => route !== match.route), {
|
|
32708
|
-
pathname: strippedPath
|
|
32709
|
-
})));
|
|
32710
|
-
}
|
|
32711
|
-
}
|
|
32712
|
-
return "";
|
|
32713
|
-
}
|
|
32714
|
-
function locationIsInsideDescendantRoute(location2, routes) {
|
|
32715
|
-
const matchedRoutes = _matchRoutes(routes, location2);
|
|
32716
|
-
if (matchedRoutes) {
|
|
32717
|
-
for (const match of matchedRoutes) {
|
|
32718
|
-
if (routeIsDescendant(match.route) && pickSplat(match)) {
|
|
32719
|
-
return true;
|
|
32720
|
-
}
|
|
32721
|
-
}
|
|
32722
|
-
}
|
|
32723
|
-
return false;
|
|
32724
|
-
}
|
|
32725
|
-
function getFallbackTransactionName(location2, basename3) {
|
|
32726
|
-
return _stripBasename ? stripBasenameFromPathname(location2.pathname, basename3) : location2.pathname || "";
|
|
32727
|
-
}
|
|
32728
|
-
function getNormalizedName(routes, location2, branches, basename3 = "") {
|
|
32729
|
-
if (!routes || routes.length === 0) {
|
|
32730
|
-
return [_stripBasename ? stripBasenameFromPathname(location2.pathname, basename3) : location2.pathname, "url"];
|
|
32731
|
-
}
|
|
32732
|
-
if (!branches) {
|
|
32733
|
-
return [getFallbackTransactionName(location2, basename3), "url"];
|
|
32734
|
-
}
|
|
32735
|
-
let pathBuilder = "";
|
|
32736
|
-
for (const branch of branches) {
|
|
32737
|
-
const route = branch.route;
|
|
32738
|
-
if (!route) {
|
|
32739
|
-
continue;
|
|
32740
|
-
}
|
|
32741
|
-
if (route.index) {
|
|
32742
|
-
return sendIndexPath(pathBuilder, branch.pathname, basename3);
|
|
32743
|
-
}
|
|
32744
|
-
const path = route.path;
|
|
32745
|
-
if (!path || pathIsWildcardAndHasChildren(path, branch)) {
|
|
32746
|
-
continue;
|
|
32747
|
-
}
|
|
32748
|
-
const newPath = path[0] === "/" || pathBuilder[pathBuilder.length - 1] === "/" ? path : `/${path}`;
|
|
32749
|
-
pathBuilder = trimSlash(pathBuilder) + prefixWithSlash(newPath);
|
|
32750
|
-
if (trimSlash(location2.pathname) !== trimSlash(basename3 + branch.pathname)) {
|
|
32751
|
-
continue;
|
|
32752
|
-
}
|
|
32753
|
-
if (getNumberOfUrlSegments(pathBuilder) !== getNumberOfUrlSegments(branch.pathname) && !pathEndsWithWildcard(pathBuilder)) {
|
|
32754
|
-
return [(_stripBasename ? "" : basename3) + newPath, "route"];
|
|
32755
|
-
}
|
|
32756
|
-
if (pathIsWildcardAndHasChildren(pathBuilder, branch)) {
|
|
32757
|
-
pathBuilder = pathBuilder.slice(0, -1);
|
|
32758
|
-
}
|
|
32759
|
-
return [(_stripBasename ? "" : basename3) + pathBuilder, "route"];
|
|
32760
|
-
}
|
|
32761
|
-
return [getFallbackTransactionName(location2, basename3), "url"];
|
|
32762
|
-
}
|
|
32763
|
-
function resolveRouteNameAndSource(location2, routes, allRoutes, branches, basename3 = "", lazyRouteManifest, enableAsyncRouteHandlers) {
|
|
32764
|
-
if (enableAsyncRouteHandlers && lazyRouteManifest && lazyRouteManifest.length > 0) {
|
|
32765
|
-
const manifestMatch = matchRouteManifest(location2.pathname, lazyRouteManifest, basename3);
|
|
32766
|
-
if (manifestMatch) {
|
|
32767
|
-
return [(_stripBasename ? "" : basename3) + manifestMatch, "route"];
|
|
32768
|
-
}
|
|
32769
|
-
}
|
|
32770
|
-
let name;
|
|
32771
|
-
let source = "url";
|
|
32772
|
-
const isInDescendantRoute = locationIsInsideDescendantRoute(location2, allRoutes);
|
|
32773
|
-
if (isInDescendantRoute) {
|
|
32774
|
-
name = prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes, location2));
|
|
32775
|
-
source = "route";
|
|
32776
|
-
}
|
|
32777
|
-
if (!isInDescendantRoute || !name) {
|
|
32778
|
-
[name, source] = getNormalizedName(routes, location2, branches, basename3);
|
|
32779
|
-
}
|
|
32780
|
-
return [name || location2.pathname, source];
|
|
32781
|
-
}
|
|
32782
|
-
function getActiveRootSpan2() {
|
|
32783
|
-
const span = getActiveSpan();
|
|
32784
|
-
const rootSpan = span ? getRootSpan(span) : undefined;
|
|
32785
|
-
if (!rootSpan) {
|
|
32786
|
-
return;
|
|
32787
|
-
}
|
|
32788
|
-
const op = spanToJSON(rootSpan).op;
|
|
32789
|
-
return op === "navigation" || op === "pageload" ? rootSpan : undefined;
|
|
32790
|
-
}
|
|
32791
|
-
var _matchRoutes, _stripBasename = false, _navigationContextStack, MAX_CONTEXT_STACK_SIZE = 10;
|
|
32792
|
-
var init_utils12 = __esm(() => {
|
|
32793
|
-
init_esm();
|
|
32794
|
-
init_debug_build4();
|
|
32795
|
-
init_route_manifest();
|
|
32796
|
-
_navigationContextStack = [];
|
|
32797
|
-
});
|
|
32798
|
-
|
|
32799
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/lazy-routes.js
|
|
32800
|
-
function captureCurrentLocation() {
|
|
32801
|
-
const navContext = getNavigationContext();
|
|
32802
|
-
if (navContext) {
|
|
32803
|
-
if (navContext.targetPath) {
|
|
32804
|
-
return {
|
|
32805
|
-
pathname: navContext.targetPath,
|
|
32806
|
-
search: "",
|
|
32807
|
-
hash: "",
|
|
32808
|
-
state: null,
|
|
32809
|
-
key: "default"
|
|
32810
|
-
};
|
|
32811
|
-
}
|
|
32812
|
-
return null;
|
|
32813
|
-
}
|
|
32814
|
-
if (typeof WINDOW4 !== "undefined") {
|
|
32815
|
-
try {
|
|
32816
|
-
const windowLocation = WINDOW4.location;
|
|
32817
|
-
if (windowLocation) {
|
|
32818
|
-
return {
|
|
32819
|
-
pathname: windowLocation.pathname,
|
|
32820
|
-
search: windowLocation.search || "",
|
|
32821
|
-
hash: windowLocation.hash || "",
|
|
32822
|
-
state: null,
|
|
32823
|
-
key: "default"
|
|
32824
|
-
};
|
|
32825
|
-
}
|
|
32826
|
-
} catch {
|
|
32827
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Could not access window.location");
|
|
32828
|
-
}
|
|
32829
|
-
}
|
|
32830
|
-
return null;
|
|
32831
|
-
}
|
|
32832
|
-
function captureActiveSpan() {
|
|
32833
|
-
const navContext = getNavigationContext();
|
|
32834
|
-
if (navContext) {
|
|
32835
|
-
return navContext.span;
|
|
32836
|
-
}
|
|
32837
|
-
return getActiveRootSpan2();
|
|
32838
|
-
}
|
|
32839
|
-
function createAsyncHandlerProxy(originalFunction, route, handlerKey, processResolvedRoutes) {
|
|
32840
|
-
const proxy = new Proxy(originalFunction, {
|
|
32841
|
-
apply(target, thisArg, argArray) {
|
|
32842
|
-
const locationAtInvocation = captureCurrentLocation();
|
|
32843
|
-
const spanAtInvocation = captureActiveSpan();
|
|
32844
|
-
const result = target.apply(thisArg, argArray);
|
|
32845
|
-
handleAsyncHandlerResult(result, route, handlerKey, processResolvedRoutes, locationAtInvocation, spanAtInvocation);
|
|
32846
|
-
return result;
|
|
32847
|
-
}
|
|
32848
|
-
});
|
|
32849
|
-
addNonEnumerableProperty(proxy, "__sentry_proxied__", true);
|
|
32850
|
-
return proxy;
|
|
32851
|
-
}
|
|
32852
|
-
function handleAsyncHandlerResult(result, route, handlerKey, processResolvedRoutes, currentLocation, capturedSpan) {
|
|
32853
|
-
if (isThenable(result)) {
|
|
32854
|
-
result.then((resolvedRoutes) => {
|
|
32855
|
-
if (Array.isArray(resolvedRoutes)) {
|
|
32856
|
-
processResolvedRoutes(resolvedRoutes, route, currentLocation ?? undefined, capturedSpan);
|
|
32857
|
-
}
|
|
32858
|
-
}).catch((e3) => {
|
|
32859
|
-
DEBUG_BUILD6 && debug.warn(`Error resolving async handler '${handlerKey}' for route`, route, e3);
|
|
32860
|
-
});
|
|
32861
|
-
} else if (Array.isArray(result)) {
|
|
32862
|
-
processResolvedRoutes(result, route, currentLocation ?? undefined, capturedSpan);
|
|
32863
|
-
}
|
|
32864
|
-
}
|
|
32865
|
-
function checkRouteForAsyncHandler(route, processResolvedRoutes) {
|
|
32866
|
-
if (route.handle && typeof route.handle === "object") {
|
|
32867
|
-
for (const key of Object.keys(route.handle)) {
|
|
32868
|
-
const maybeFn = route.handle[key];
|
|
32869
|
-
if (typeof maybeFn === "function" && !maybeFn.__sentry_proxied__) {
|
|
32870
|
-
route.handle[key] = createAsyncHandlerProxy(maybeFn, route, key, processResolvedRoutes);
|
|
32871
|
-
}
|
|
32872
|
-
}
|
|
32873
|
-
}
|
|
32874
|
-
if (Array.isArray(route.children)) {
|
|
32875
|
-
for (const child of route.children) {
|
|
32876
|
-
checkRouteForAsyncHandler(child, processResolvedRoutes);
|
|
32877
|
-
}
|
|
32878
|
-
}
|
|
32879
|
-
}
|
|
32880
|
-
var init_lazy_routes = __esm(() => {
|
|
32881
|
-
init_dev();
|
|
32882
|
-
init_esm();
|
|
32883
|
-
init_debug_build4();
|
|
32884
|
-
init_utils12();
|
|
32885
|
-
});
|
|
32886
|
-
|
|
32887
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/instrumentation.js
|
|
32888
|
-
import * as React4 from "react";
|
|
32889
|
-
function scheduleCallback(callback) {
|
|
32890
|
-
if (WINDOW4?.requestAnimationFrame) {
|
|
32891
|
-
return WINDOW4.requestAnimationFrame(callback);
|
|
32892
|
-
}
|
|
32893
|
-
return setTimeout(callback, 0);
|
|
32894
|
-
}
|
|
32895
|
-
function cancelScheduledCallback(id) {
|
|
32896
|
-
if (WINDOW4?.cancelAnimationFrame) {
|
|
32897
|
-
WINDOW4.cancelAnimationFrame(id);
|
|
32898
|
-
} else {
|
|
32899
|
-
clearTimeout(id);
|
|
32900
|
-
}
|
|
32901
|
-
}
|
|
32902
|
-
function computeLocationKey(location2) {
|
|
32903
|
-
return `${location2.pathname}${location2.search || ""}${location2.hash || ""}`;
|
|
32904
|
-
}
|
|
32905
|
-
function isParameterizedRoute(routeName) {
|
|
32906
|
-
return routeName.includes(":") || routeName.includes("*");
|
|
32907
|
-
}
|
|
32908
|
-
function shouldSkipNavigation(trackedNav, locationKey, proposedName, spanHasEnded) {
|
|
32909
|
-
if (!trackedNav) {
|
|
32910
|
-
return { skip: false, shouldUpdate: false };
|
|
32911
|
-
}
|
|
32912
|
-
const isDuplicate = trackedNav.locationKey === locationKey && (trackedNav.isPlaceholder || !spanHasEnded);
|
|
32913
|
-
if (isDuplicate) {
|
|
32914
|
-
const currentHasWildcard = !!trackedNav.routeName && transactionNameHasWildcard(trackedNav.routeName);
|
|
32915
|
-
const proposedHasWildcard = transactionNameHasWildcard(proposedName);
|
|
32916
|
-
const currentIsParameterized = !!trackedNav.routeName && isParameterizedRoute(trackedNav.routeName);
|
|
32917
|
-
const proposedIsParameterized = isParameterizedRoute(proposedName);
|
|
32918
|
-
const isWildcardUpgrade = currentHasWildcard && !proposedHasWildcard;
|
|
32919
|
-
const isRawToParameterized = !currentIsParameterized && proposedIsParameterized;
|
|
32920
|
-
const isMoreSpecific = proposedName !== trackedNav.routeName && proposedName.length > (trackedNav.routeName?.length || 0) && !proposedHasWildcard;
|
|
32921
|
-
const shouldUpdate = !!(trackedNav.routeName && (isWildcardUpgrade || isRawToParameterized || isMoreSpecific));
|
|
32922
|
-
return { skip: true, shouldUpdate };
|
|
32923
|
-
}
|
|
32924
|
-
return { skip: false, shouldUpdate: false };
|
|
32925
|
-
}
|
|
32926
|
-
function addResolvedRoutesToParent(resolvedRoutes, parentRoute) {
|
|
32927
|
-
const existingChildren = parentRoute.children || [];
|
|
32928
|
-
const newRoutes = resolvedRoutes.filter((newRoute) => !existingChildren.some((existing) => existing === newRoute || newRoute.path && existing.path === newRoute.path || newRoute.id && existing.id === newRoute.id));
|
|
32929
|
-
if (newRoutes.length > 0) {
|
|
32930
|
-
parentRoute.children = [...existingChildren, ...newRoutes];
|
|
32931
|
-
}
|
|
32932
|
-
}
|
|
32933
|
-
function trackLazyRouteLoad(span, promise) {
|
|
32934
|
-
let promises = pendingLazyRouteLoads.get(span);
|
|
32935
|
-
if (!promises) {
|
|
32936
|
-
promises = new Set;
|
|
32937
|
-
pendingLazyRouteLoads.set(span, promises);
|
|
32938
|
-
}
|
|
32939
|
-
promises.add(promise);
|
|
32940
|
-
promise.finally(() => {
|
|
32941
|
-
const currentPromises = pendingLazyRouteLoads.get(span);
|
|
32942
|
-
if (currentPromises) {
|
|
32943
|
-
currentPromises.delete(promise);
|
|
32944
|
-
}
|
|
32945
|
-
});
|
|
32946
|
-
}
|
|
32947
|
-
function createDeferredLazyRoutePromise(span) {
|
|
32948
|
-
const deferredPromise = new Promise((resolve3) => {
|
|
32949
|
-
deferredLazyRouteResolvers.set(span, resolve3);
|
|
32950
|
-
});
|
|
32951
|
-
trackLazyRouteLoad(span, deferredPromise);
|
|
32952
|
-
}
|
|
32953
|
-
function resolveDeferredLazyRoutePromise(span) {
|
|
32954
|
-
const resolver = deferredLazyRouteResolvers.get(span);
|
|
32955
|
-
if (resolver) {
|
|
32956
|
-
resolver();
|
|
32957
|
-
deferredLazyRouteResolvers.delete(span);
|
|
32958
|
-
if (span.__sentry_may_have_lazy_routes__) {
|
|
32959
|
-
span.__sentry_may_have_lazy_routes__ = false;
|
|
32960
|
-
}
|
|
32961
|
-
}
|
|
32962
|
-
}
|
|
32963
|
-
function processResolvedRoutes(resolvedRoutes, parentRoute, currentLocation = null, capturedSpan) {
|
|
32964
|
-
resolvedRoutes.forEach((child) => {
|
|
32965
|
-
allRoutes.add(child);
|
|
32966
|
-
if (_enableAsyncRouteHandlers) {
|
|
32967
|
-
checkRouteForAsyncHandler(child, processResolvedRoutes);
|
|
32968
|
-
}
|
|
32969
|
-
});
|
|
32970
|
-
if (parentRoute) {
|
|
32971
|
-
addResolvedRoutesToParent(resolvedRoutes, parentRoute);
|
|
32972
|
-
}
|
|
32973
|
-
const targetSpan = capturedSpan ?? getActiveRootSpan2();
|
|
32974
|
-
if (targetSpan) {
|
|
32975
|
-
const spanJson = spanToJSON(targetSpan);
|
|
32976
|
-
if (spanJson.timestamp) {
|
|
32977
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Lazy handler resolved after span ended - skipping update");
|
|
32978
|
-
return;
|
|
32979
|
-
}
|
|
32980
|
-
const spanOp = spanJson.op;
|
|
32981
|
-
let location2 = currentLocation;
|
|
32982
|
-
if (!location2 && !capturedSpan) {
|
|
32983
|
-
if (typeof WINDOW4 !== "undefined") {
|
|
32984
|
-
const globalLocation = WINDOW4.location;
|
|
32985
|
-
if (globalLocation?.pathname) {
|
|
32986
|
-
location2 = { pathname: globalLocation.pathname };
|
|
32987
|
-
}
|
|
32988
|
-
}
|
|
32989
|
-
}
|
|
32990
|
-
if (location2) {
|
|
32991
|
-
if (spanOp === "pageload") {
|
|
32992
|
-
updatePageloadTransaction({
|
|
32993
|
-
activeRootSpan: targetSpan,
|
|
32994
|
-
location: { pathname: location2.pathname },
|
|
32995
|
-
routes: Array.from(allRoutes),
|
|
32996
|
-
allRoutes: Array.from(allRoutes)
|
|
32997
|
-
});
|
|
32998
|
-
} else if (spanOp === "navigation") {
|
|
32999
|
-
updateNavigationSpan(targetSpan, location2, Array.from(allRoutes), false, _matchRoutes2);
|
|
33000
|
-
}
|
|
33001
|
-
}
|
|
33002
|
-
}
|
|
33003
|
-
}
|
|
33004
|
-
function updateNavigationSpan(activeRootSpan, location2, allRoutes2, forceUpdate = false, matchRoutes2) {
|
|
33005
|
-
const spanJson = spanToJSON(activeRootSpan);
|
|
33006
|
-
const currentName = spanJson.description;
|
|
33007
|
-
const hasBeenNamed = activeRootSpan?.__sentry_navigation_name_set__;
|
|
33008
|
-
const currentNameHasWildcard = currentName && transactionNameHasWildcard(currentName);
|
|
33009
|
-
const shouldUpdate = !hasBeenNamed || forceUpdate || currentNameHasWildcard;
|
|
33010
|
-
if (shouldUpdate && !spanJson.timestamp) {
|
|
33011
|
-
const currentBranches = matchRoutes2(allRoutes2, location2);
|
|
33012
|
-
const [name, source] = resolveRouteNameAndSource(location2, allRoutes2, allRoutes2, currentBranches || [], _basename, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
33013
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
33014
|
-
const isImprovement = name && (!currentName || !hasBeenNamed && (currentSource !== "route" || source === "route") || currentSource !== "route" && source === "route" || currentSource === "route" && source === "route" && currentNameHasWildcard);
|
|
33015
|
-
if (isImprovement) {
|
|
33016
|
-
activeRootSpan.updateName(name);
|
|
33017
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
33018
|
-
if (!transactionNameHasWildcard(name) && source === "route") {
|
|
33019
|
-
addNonEnumerableProperty(activeRootSpan, "__sentry_navigation_name_set__", true);
|
|
33020
|
-
}
|
|
33021
|
-
}
|
|
33022
|
-
}
|
|
33023
|
-
}
|
|
33024
|
-
function setupRouterSubscription(router, routes, version3, basename3, activeRootSpan) {
|
|
33025
|
-
let isInitialPageloadComplete = false;
|
|
33026
|
-
let hasSeenPageloadSpan = !!activeRootSpan && spanToJSON(activeRootSpan).op === "pageload";
|
|
33027
|
-
let hasSeenPopAfterPageload = false;
|
|
33028
|
-
let scheduledNavigationHandler = null;
|
|
33029
|
-
let lastHandledPathname = null;
|
|
33030
|
-
router.subscribe((state) => {
|
|
33031
|
-
if (!isInitialPageloadComplete) {
|
|
33032
|
-
const currentRootSpan = getActiveRootSpan2();
|
|
33033
|
-
const isCurrentlyInPageload = currentRootSpan && spanToJSON(currentRootSpan).op === "pageload";
|
|
33034
|
-
if (isCurrentlyInPageload) {
|
|
33035
|
-
hasSeenPageloadSpan = true;
|
|
33036
|
-
} else if (hasSeenPageloadSpan) {
|
|
33037
|
-
if (state.historyAction === "POP" && !hasSeenPopAfterPageload) {
|
|
33038
|
-
hasSeenPopAfterPageload = true;
|
|
33039
|
-
} else {
|
|
33040
|
-
isInitialPageloadComplete = true;
|
|
33041
|
-
}
|
|
33042
|
-
}
|
|
33043
|
-
}
|
|
33044
|
-
const shouldHandleNavigation = state.historyAction === "PUSH" || state.historyAction === "POP" && isInitialPageloadComplete;
|
|
33045
|
-
if (shouldHandleNavigation) {
|
|
33046
|
-
const currentLocationKey = computeLocationKey(state.location);
|
|
33047
|
-
const navigationHandler = () => {
|
|
33048
|
-
if (lastHandledPathname === currentLocationKey) {
|
|
33049
|
-
return;
|
|
33050
|
-
}
|
|
33051
|
-
lastHandledPathname = currentLocationKey;
|
|
33052
|
-
scheduledNavigationHandler = null;
|
|
33053
|
-
handleNavigation({
|
|
33054
|
-
location: state.location,
|
|
33055
|
-
routes,
|
|
33056
|
-
navigationType: state.historyAction,
|
|
33057
|
-
version: version3,
|
|
33058
|
-
basename: basename3,
|
|
33059
|
-
allRoutes: Array.from(allRoutes)
|
|
33060
|
-
});
|
|
33061
|
-
};
|
|
33062
|
-
if (state.navigation.state !== "idle") {
|
|
33063
|
-
if (lastHandledPathname !== currentLocationKey) {
|
|
33064
|
-
lastHandledPathname = null;
|
|
33065
|
-
}
|
|
33066
|
-
if (scheduledNavigationHandler !== null) {
|
|
33067
|
-
cancelScheduledCallback(scheduledNavigationHandler);
|
|
33068
|
-
}
|
|
33069
|
-
scheduledNavigationHandler = scheduleCallback(navigationHandler);
|
|
33070
|
-
} else {
|
|
33071
|
-
if (scheduledNavigationHandler !== null) {
|
|
33072
|
-
cancelScheduledCallback(scheduledNavigationHandler);
|
|
33073
|
-
scheduledNavigationHandler = null;
|
|
33074
|
-
}
|
|
33075
|
-
navigationHandler();
|
|
33076
|
-
}
|
|
33077
|
-
}
|
|
33078
|
-
});
|
|
33079
|
-
}
|
|
33080
|
-
function createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, version3) {
|
|
33081
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
33082
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV${version3}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`);
|
|
33083
|
-
return createRouterFunction;
|
|
33084
|
-
}
|
|
33085
|
-
return function(routes, opts) {
|
|
33086
|
-
addRoutesToAllRoutes(routes);
|
|
33087
|
-
if (_enableAsyncRouteHandlers) {
|
|
33088
|
-
for (const route of routes) {
|
|
33089
|
-
checkRouteForAsyncHandler(route, processResolvedRoutes);
|
|
33090
|
-
}
|
|
33091
|
-
}
|
|
33092
|
-
const activeRootSpan = getActiveRootSpan2();
|
|
33093
|
-
const hasPatchRoutesOnNavigation = opts && "patchRoutesOnNavigation" in opts && typeof opts.patchRoutesOnNavigation === "function";
|
|
33094
|
-
if (hasPatchRoutesOnNavigation && activeRootSpan) {
|
|
33095
|
-
addNonEnumerableProperty(activeRootSpan, "__sentry_may_have_lazy_routes__", true);
|
|
33096
|
-
createDeferredLazyRoutePromise(activeRootSpan);
|
|
33097
|
-
}
|
|
33098
|
-
const wrappedOpts = wrapPatchRoutesOnNavigation(opts, false, activeRootSpan);
|
|
33099
|
-
const router = createRouterFunction(routes, wrappedOpts);
|
|
33100
|
-
const basename3 = opts?.basename;
|
|
33101
|
-
if (router.state.historyAction === "POP" && activeRootSpan) {
|
|
33102
|
-
updatePageloadTransaction({
|
|
33103
|
-
activeRootSpan,
|
|
33104
|
-
location: router.state.location,
|
|
33105
|
-
routes,
|
|
33106
|
-
basename: basename3,
|
|
33107
|
-
allRoutes: Array.from(allRoutes)
|
|
33108
|
-
});
|
|
33109
|
-
}
|
|
33110
|
-
_basename = basename3 || "";
|
|
33111
|
-
setupRouterSubscription(router, routes, version3, basename3, activeRootSpan);
|
|
33112
|
-
return router;
|
|
33113
|
-
};
|
|
33114
|
-
}
|
|
33115
|
-
function createV6CompatibleWrapCreateMemoryRouter(createRouterFunction, version3) {
|
|
33116
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
33117
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV${version3}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`);
|
|
33118
|
-
return createRouterFunction;
|
|
33119
|
-
}
|
|
33120
|
-
return function(routes, opts) {
|
|
33121
|
-
addRoutesToAllRoutes(routes);
|
|
33122
|
-
if (_enableAsyncRouteHandlers) {
|
|
33123
|
-
for (const route of routes) {
|
|
33124
|
-
checkRouteForAsyncHandler(route, processResolvedRoutes);
|
|
33125
|
-
}
|
|
33126
|
-
}
|
|
33127
|
-
const memoryActiveRootSpanEarly = getActiveRootSpan2();
|
|
33128
|
-
const hasPatchRoutesOnNavigation = opts && "patchRoutesOnNavigation" in opts && typeof opts.patchRoutesOnNavigation === "function";
|
|
33129
|
-
if (hasPatchRoutesOnNavigation && memoryActiveRootSpanEarly) {
|
|
33130
|
-
addNonEnumerableProperty(memoryActiveRootSpanEarly, "__sentry_may_have_lazy_routes__", true);
|
|
33131
|
-
createDeferredLazyRoutePromise(memoryActiveRootSpanEarly);
|
|
33132
|
-
}
|
|
33133
|
-
const wrappedOpts = wrapPatchRoutesOnNavigation(opts, true, memoryActiveRootSpanEarly);
|
|
33134
|
-
const router = createRouterFunction(routes, wrappedOpts);
|
|
33135
|
-
const basename3 = opts?.basename;
|
|
33136
|
-
let initialEntry = undefined;
|
|
33137
|
-
const initialEntries = opts?.initialEntries;
|
|
33138
|
-
const initialIndex = opts?.initialIndex;
|
|
33139
|
-
const hasOnlyOneInitialEntry = initialEntries && initialEntries.length === 1;
|
|
33140
|
-
const hasIndexedEntry = initialIndex !== undefined && initialEntries && initialEntries[initialIndex];
|
|
33141
|
-
initialEntry = hasOnlyOneInitialEntry ? initialEntries[0] : hasIndexedEntry ? initialEntries[initialIndex] : undefined;
|
|
33142
|
-
const location2 = initialEntry ? typeof initialEntry === "string" ? { pathname: initialEntry } : initialEntry : router.state.location;
|
|
33143
|
-
const memoryActiveRootSpan = getActiveRootSpan2();
|
|
33144
|
-
if (router.state.historyAction === "POP" && memoryActiveRootSpan) {
|
|
33145
|
-
updatePageloadTransaction({
|
|
33146
|
-
activeRootSpan: memoryActiveRootSpan,
|
|
33147
|
-
location: location2,
|
|
33148
|
-
routes,
|
|
33149
|
-
basename: basename3,
|
|
33150
|
-
allRoutes: Array.from(allRoutes)
|
|
33151
|
-
});
|
|
33152
|
-
}
|
|
33153
|
-
_basename = basename3 || "";
|
|
33154
|
-
setupRouterSubscription(router, routes, version3, basename3, memoryActiveRootSpan);
|
|
33155
|
-
return router;
|
|
33156
|
-
};
|
|
33157
|
-
}
|
|
33158
|
-
function createReactRouterV6CompatibleTracingIntegration(options, version3) {
|
|
33159
|
-
const integration = browserTracingIntegration({ ...options, instrumentPageLoad: false, instrumentNavigation: false });
|
|
33160
|
-
const {
|
|
33161
|
-
useEffect: useEffect2,
|
|
33162
|
-
useLocation,
|
|
33163
|
-
useNavigationType,
|
|
33164
|
-
createRoutesFromChildren,
|
|
33165
|
-
matchRoutes: matchRoutes2,
|
|
33166
|
-
stripBasename,
|
|
33167
|
-
enableAsyncRouteHandlers = false,
|
|
33168
|
-
instrumentPageLoad = true,
|
|
33169
|
-
instrumentNavigation = true,
|
|
33170
|
-
lazyRouteTimeout,
|
|
33171
|
-
lazyRouteManifest
|
|
33172
|
-
} = options;
|
|
33173
|
-
return {
|
|
33174
|
-
...integration,
|
|
33175
|
-
setup(client) {
|
|
33176
|
-
integration.setup(client);
|
|
33177
|
-
const finalTimeout = options.finalTimeout ?? 30000;
|
|
33178
|
-
const defaultMaxWait = (options.idleTimeout ?? 1000) * 3;
|
|
33179
|
-
const configuredMaxWait = lazyRouteTimeout ?? defaultMaxWait;
|
|
33180
|
-
if (configuredMaxWait === Infinity) {
|
|
33181
|
-
_lazyRouteTimeout = finalTimeout;
|
|
33182
|
-
DEBUG_BUILD6 && debug.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:", finalTimeout, "ms to prevent indefinite hangs");
|
|
33183
|
-
} else if (Number.isNaN(configuredMaxWait)) {
|
|
33184
|
-
DEBUG_BUILD6 && debug.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:", defaultMaxWait);
|
|
33185
|
-
_lazyRouteTimeout = defaultMaxWait;
|
|
33186
|
-
} else if (configuredMaxWait < 0) {
|
|
33187
|
-
DEBUG_BUILD6 && debug.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:", configuredMaxWait, "falling back to:", defaultMaxWait);
|
|
33188
|
-
_lazyRouteTimeout = defaultMaxWait;
|
|
33189
|
-
} else {
|
|
33190
|
-
_lazyRouteTimeout = configuredMaxWait;
|
|
33191
|
-
}
|
|
33192
|
-
_useEffect = useEffect2;
|
|
33193
|
-
_useLocation = useLocation;
|
|
33194
|
-
_useNavigationType = useNavigationType;
|
|
33195
|
-
_matchRoutes2 = matchRoutes2;
|
|
33196
|
-
_createRoutesFromChildren = createRoutesFromChildren;
|
|
33197
|
-
_enableAsyncRouteHandlers = enableAsyncRouteHandlers;
|
|
33198
|
-
_lazyRouteManifest = lazyRouteManifest;
|
|
33199
|
-
initializeRouterUtils(matchRoutes2, stripBasename || false);
|
|
33200
|
-
},
|
|
33201
|
-
afterAllSetup(client) {
|
|
33202
|
-
integration.afterAllSetup(client);
|
|
33203
|
-
const initPathName = WINDOW4.location?.pathname;
|
|
33204
|
-
if (instrumentPageLoad && initPathName) {
|
|
33205
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
33206
|
-
name: initPathName,
|
|
33207
|
-
attributes: {
|
|
33208
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url",
|
|
33209
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
33210
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.reactrouter_v${version3}`
|
|
33211
|
-
}
|
|
33212
|
-
});
|
|
33213
|
-
}
|
|
33214
|
-
if (instrumentNavigation) {
|
|
33215
|
-
CLIENTS_WITH_INSTRUMENT_NAVIGATION.add(client);
|
|
33216
|
-
}
|
|
33217
|
-
}
|
|
33218
|
-
};
|
|
33219
|
-
}
|
|
33220
|
-
function createV6CompatibleWrapUseRoutes(origUseRoutes, version3) {
|
|
33221
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
33222
|
-
DEBUG_BUILD6 && debug.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters.");
|
|
33223
|
-
return origUseRoutes;
|
|
33224
|
-
}
|
|
33225
|
-
const SentryRoutes = (props) => {
|
|
33226
|
-
const isMountRenderPass = React4.useRef(true);
|
|
33227
|
-
const { routes, locationArg } = props;
|
|
33228
|
-
const Routes = origUseRoutes(routes, locationArg);
|
|
33229
|
-
const location2 = _useLocation();
|
|
33230
|
-
const navigationType = _useNavigationType();
|
|
33231
|
-
const stableLocationParam = typeof locationArg === "string" || locationArg?.pathname ? locationArg : location2;
|
|
33232
|
-
_useEffect(() => {
|
|
33233
|
-
const normalizedLocation = typeof stableLocationParam === "string" ? { pathname: stableLocationParam } : stableLocationParam;
|
|
33234
|
-
if (isMountRenderPass.current) {
|
|
33235
|
-
addRoutesToAllRoutes(routes);
|
|
33236
|
-
updatePageloadTransaction({
|
|
33237
|
-
activeRootSpan: getActiveRootSpan2(),
|
|
33238
|
-
location: normalizedLocation,
|
|
33239
|
-
routes,
|
|
33240
|
-
allRoutes: Array.from(allRoutes)
|
|
33241
|
-
});
|
|
33242
|
-
isMountRenderPass.current = false;
|
|
33243
|
-
} else {
|
|
33244
|
-
handleNavigation({
|
|
33245
|
-
location: normalizedLocation,
|
|
33246
|
-
routes,
|
|
33247
|
-
navigationType,
|
|
33248
|
-
version: version3,
|
|
33249
|
-
allRoutes: Array.from(allRoutes)
|
|
33250
|
-
});
|
|
33251
|
-
}
|
|
33252
|
-
}, [navigationType, stableLocationParam]);
|
|
33253
|
-
return Routes;
|
|
33254
|
-
};
|
|
33255
|
-
return (routes, locationArg) => {
|
|
33256
|
-
return React4.createElement(SentryRoutes, { routes, locationArg });
|
|
33257
|
-
};
|
|
33258
|
-
}
|
|
33259
|
-
function wrapPatchRoutesOnNavigation(opts, isMemoryRouter = false, capturedSpan) {
|
|
33260
|
-
if (!opts || !("patchRoutesOnNavigation" in opts) || typeof opts.patchRoutesOnNavigation !== "function") {
|
|
33261
|
-
return opts || {};
|
|
33262
|
-
}
|
|
33263
|
-
const originalPatchRoutes = opts.patchRoutesOnNavigation;
|
|
33264
|
-
return {
|
|
33265
|
-
...opts,
|
|
33266
|
-
patchRoutesOnNavigation: async (args) => {
|
|
33267
|
-
const targetPath = args?.path;
|
|
33268
|
-
const activeRootSpan = getActiveRootSpan2() ?? capturedSpan;
|
|
33269
|
-
if (!isMemoryRouter) {
|
|
33270
|
-
const originalPatch = args?.patch;
|
|
33271
|
-
const matches = args?.matches;
|
|
33272
|
-
if (originalPatch) {
|
|
33273
|
-
args.patch = (routeId, children) => {
|
|
33274
|
-
addRoutesToAllRoutes(children);
|
|
33275
|
-
if (matches && matches.length > 0) {
|
|
33276
|
-
const leafMatch = matches[matches.length - 1];
|
|
33277
|
-
const leafRoute = leafMatch?.route;
|
|
33278
|
-
if (leafRoute) {
|
|
33279
|
-
const matchingRoute = Array.from(allRoutes).find((route) => {
|
|
33280
|
-
const idMatches = route.id !== undefined && route.id === routeId;
|
|
33281
|
-
const referenceMatches = route === leafRoute;
|
|
33282
|
-
const pathMatches = route.path !== undefined && leafRoute.path !== undefined && route.path === leafRoute.path;
|
|
33283
|
-
return idMatches || referenceMatches || pathMatches;
|
|
33284
|
-
});
|
|
33285
|
-
if (matchingRoute) {
|
|
33286
|
-
addResolvedRoutesToParent(children, matchingRoute);
|
|
33287
|
-
}
|
|
33288
|
-
}
|
|
33289
|
-
}
|
|
33290
|
-
const spanJson = activeRootSpan ? spanToJSON(activeRootSpan) : undefined;
|
|
33291
|
-
if (targetPath && activeRootSpan && spanJson && !spanJson.timestamp && spanJson.op === "navigation") {
|
|
33292
|
-
updateNavigationSpan(activeRootSpan, { pathname: targetPath, search: "", hash: "", state: null, key: "default" }, Array.from(allRoutes), true, _matchRoutes2);
|
|
33293
|
-
}
|
|
33294
|
-
return originalPatch(routeId, children);
|
|
33295
|
-
};
|
|
33296
|
-
}
|
|
33297
|
-
}
|
|
33298
|
-
const lazyLoadPromise = (async () => {
|
|
33299
|
-
const contextToken = setNavigationContext(targetPath, activeRootSpan);
|
|
33300
|
-
let result;
|
|
33301
|
-
try {
|
|
33302
|
-
result = await originalPatchRoutes(args);
|
|
33303
|
-
} finally {
|
|
33304
|
-
clearNavigationContext(contextToken);
|
|
33305
|
-
if (activeRootSpan) {
|
|
33306
|
-
resolveDeferredLazyRoutePromise(activeRootSpan);
|
|
33307
|
-
}
|
|
33308
|
-
}
|
|
33309
|
-
const spanJson = activeRootSpan ? spanToJSON(activeRootSpan) : undefined;
|
|
33310
|
-
if (activeRootSpan && spanJson && !spanJson.timestamp && spanJson.op === "navigation") {
|
|
33311
|
-
const pathname = targetPath;
|
|
33312
|
-
if (pathname) {
|
|
33313
|
-
updateNavigationSpan(activeRootSpan, { pathname, search: "", hash: "", state: null, key: "default" }, Array.from(allRoutes), false, _matchRoutes2);
|
|
33314
|
-
}
|
|
33315
|
-
}
|
|
33316
|
-
return result;
|
|
33317
|
-
})();
|
|
33318
|
-
if (activeRootSpan) {
|
|
33319
|
-
trackLazyRouteLoad(activeRootSpan, lazyLoadPromise);
|
|
33320
|
-
}
|
|
33321
|
-
return lazyLoadPromise;
|
|
33322
|
-
}
|
|
33323
|
-
};
|
|
33324
|
-
}
|
|
33325
|
-
function handleNavigation(opts) {
|
|
33326
|
-
const { location: location2, routes, navigationType, version: version3, matches, basename: basename3, allRoutes: allRoutes2 } = opts;
|
|
33327
|
-
const branches = Array.isArray(matches) ? matches : _matchRoutes2(allRoutes2 || routes, location2, basename3);
|
|
33328
|
-
const client = getClient();
|
|
33329
|
-
if (!client || !CLIENTS_WITH_INSTRUMENT_NAVIGATION.has(client)) {
|
|
33330
|
-
return;
|
|
33331
|
-
}
|
|
33332
|
-
const activeRootSpan = getActiveRootSpan2();
|
|
33333
|
-
if (activeRootSpan && spanToJSON(activeRootSpan).op === "pageload" && navigationType === "POP") {
|
|
33334
|
-
return;
|
|
33335
|
-
}
|
|
33336
|
-
if ((navigationType === "PUSH" || navigationType === "POP") && branches) {
|
|
33337
|
-
const [name, source] = resolveRouteNameAndSource(location2, allRoutes2 || routes, allRoutes2 || routes, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
33338
|
-
const locationKey = computeLocationKey(location2);
|
|
33339
|
-
const trackedNav = activeNavigationSpans.get(client);
|
|
33340
|
-
const trackedSpanHasEnded = trackedNav && !trackedNav.isPlaceholder ? !!spanToJSON(trackedNav.span).timestamp : false;
|
|
33341
|
-
const { skip, shouldUpdate } = shouldSkipNavigation(trackedNav, locationKey, name, trackedSpanHasEnded);
|
|
33342
|
-
if (skip) {
|
|
33343
|
-
if (shouldUpdate && trackedNav) {
|
|
33344
|
-
const oldName = trackedNav.routeName;
|
|
33345
|
-
if (trackedNav.isPlaceholder) {
|
|
33346
|
-
trackedNav.routeName = name;
|
|
33347
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Updated placeholder navigation name from "${oldName}" to "${name}" (will apply to real span)`);
|
|
33348
|
-
} else {
|
|
33349
|
-
trackedNav.span.updateName(name);
|
|
33350
|
-
trackedNav.span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
33351
|
-
addNonEnumerableProperty(trackedNav.span, "__sentry_navigation_name_set__", true);
|
|
33352
|
-
trackedNav.routeName = name;
|
|
33353
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Updated navigation span name from "${oldName}" to "${name}"`);
|
|
33354
|
-
}
|
|
33355
|
-
} else {
|
|
33356
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Skipping duplicate navigation for location: ${locationKey}`);
|
|
33357
|
-
}
|
|
33358
|
-
return;
|
|
33359
|
-
}
|
|
33360
|
-
const placeholderSpan = { end: () => {} };
|
|
33361
|
-
const placeholderEntry = {
|
|
33362
|
-
span: placeholderSpan,
|
|
33363
|
-
routeName: name,
|
|
33364
|
-
pathname: location2.pathname,
|
|
33365
|
-
locationKey,
|
|
33366
|
-
isPlaceholder: true
|
|
33367
|
-
};
|
|
33368
|
-
activeNavigationSpans.set(client, placeholderEntry);
|
|
33369
|
-
let navigationSpan;
|
|
33370
|
-
try {
|
|
33371
|
-
navigationSpan = startBrowserTracingNavigationSpan(client, {
|
|
33372
|
-
name: placeholderEntry.routeName,
|
|
33373
|
-
attributes: {
|
|
33374
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
|
|
33375
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
33376
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.reactrouter_v${version3}`
|
|
33377
|
-
}
|
|
33378
|
-
});
|
|
33379
|
-
} catch (e3) {
|
|
33380
|
-
activeNavigationSpans.delete(client);
|
|
33381
|
-
throw e3;
|
|
33382
|
-
}
|
|
33383
|
-
if (navigationSpan) {
|
|
33384
|
-
activeNavigationSpans.set(client, {
|
|
33385
|
-
span: navigationSpan,
|
|
33386
|
-
routeName: placeholderEntry.routeName,
|
|
33387
|
-
pathname: location2.pathname,
|
|
33388
|
-
locationKey
|
|
33389
|
-
});
|
|
33390
|
-
patchSpanEnd(navigationSpan, location2, routes, basename3, "navigation");
|
|
33391
|
-
} else {
|
|
33392
|
-
activeNavigationSpans.delete(client);
|
|
33393
|
-
}
|
|
33394
|
-
}
|
|
33395
|
-
}
|
|
33396
|
-
function addRoutesToAllRoutes(routes) {
|
|
33397
|
-
routes.forEach((route) => {
|
|
33398
|
-
const extractedChildRoutes = getChildRoutesRecursively(route);
|
|
33399
|
-
extractedChildRoutes.forEach((r3) => {
|
|
33400
|
-
allRoutes.add(r3);
|
|
33401
|
-
});
|
|
33402
|
-
});
|
|
33403
|
-
}
|
|
33404
|
-
function getChildRoutesRecursively(route, allRoutes2 = new Set) {
|
|
33405
|
-
if (!allRoutes2.has(route)) {
|
|
33406
|
-
allRoutes2.add(route);
|
|
33407
|
-
if (route.children && !route.index) {
|
|
33408
|
-
route.children.forEach((child) => {
|
|
33409
|
-
const childRoutes = getChildRoutesRecursively(child, allRoutes2);
|
|
33410
|
-
childRoutes.forEach((r3) => {
|
|
33411
|
-
allRoutes2.add(r3);
|
|
33412
|
-
});
|
|
33413
|
-
});
|
|
33414
|
-
}
|
|
33415
|
-
}
|
|
33416
|
-
return allRoutes2;
|
|
33417
|
-
}
|
|
33418
|
-
function updatePageloadTransaction({
|
|
33419
|
-
activeRootSpan,
|
|
33420
|
-
location: location2,
|
|
33421
|
-
routes,
|
|
33422
|
-
matches,
|
|
33423
|
-
basename: basename3,
|
|
33424
|
-
allRoutes: allRoutes2
|
|
33425
|
-
}) {
|
|
33426
|
-
const branches = Array.isArray(matches) ? matches : _matchRoutes2(allRoutes2 || routes, location2, basename3);
|
|
33427
|
-
if (branches) {
|
|
33428
|
-
const [name, source] = resolveRouteNameAndSource(location2, allRoutes2 || routes, allRoutes2 || routes, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
33429
|
-
getCurrentScope().setTransactionName(name || "/");
|
|
33430
|
-
if (activeRootSpan) {
|
|
33431
|
-
activeRootSpan.updateName(name);
|
|
33432
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
33433
|
-
patchSpanEnd(activeRootSpan, location2, routes, basename3, "pageload");
|
|
33434
|
-
}
|
|
33435
|
-
} else if (activeRootSpan) {
|
|
33436
|
-
patchSpanEnd(activeRootSpan, location2, routes, basename3, "pageload");
|
|
33437
|
-
}
|
|
33438
|
-
}
|
|
33439
|
-
function shouldUpdateWildcardSpanName(currentName, currentSource, newName, newSource, allowNoCurrentName = false) {
|
|
33440
|
-
if (!newName) {
|
|
33441
|
-
return false;
|
|
33442
|
-
}
|
|
33443
|
-
if (!currentName && allowNoCurrentName) {
|
|
33444
|
-
return true;
|
|
33445
|
-
}
|
|
33446
|
-
const hasWildcard = currentName && transactionNameHasWildcard(currentName);
|
|
33447
|
-
if (hasWildcard && newSource === "route" && !transactionNameHasWildcard(newName)) {
|
|
33448
|
-
return true;
|
|
33449
|
-
}
|
|
33450
|
-
if (currentSource !== "route" && newSource === "route") {
|
|
33451
|
-
return true;
|
|
33452
|
-
}
|
|
33453
|
-
return false;
|
|
33454
|
-
}
|
|
33455
|
-
function tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location2, routes, basename3, spanType, allRoutes2) {
|
|
33456
|
-
try {
|
|
33457
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
33458
|
-
if (currentSource === "route" && currentName && !transactionNameHasWildcard(currentName)) {
|
|
33459
|
-
return;
|
|
33460
|
-
}
|
|
33461
|
-
const currentAllRoutes = Array.from(allRoutes2);
|
|
33462
|
-
const routesToUse = currentAllRoutes.length > 0 ? currentAllRoutes : routes;
|
|
33463
|
-
const branches = _matchRoutes2(routesToUse, location2, basename3);
|
|
33464
|
-
if (!branches) {
|
|
33465
|
-
return;
|
|
33466
|
-
}
|
|
33467
|
-
const [name, source] = resolveRouteNameAndSource(location2, routesToUse, routesToUse, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
33468
|
-
const isImprovement = shouldUpdateWildcardSpanName(currentName, currentSource, name, source, true);
|
|
33469
|
-
const spanNotEnded = spanType === "pageload" || !spanJson.timestamp;
|
|
33470
|
-
if (isImprovement && spanNotEnded) {
|
|
33471
|
-
span.updateName(name);
|
|
33472
|
-
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
33473
|
-
}
|
|
33474
|
-
} catch (error3) {
|
|
33475
|
-
DEBUG_BUILD6 && debug.warn(`Error updating span details before ending: ${error3}`);
|
|
33476
|
-
}
|
|
33477
|
-
}
|
|
33478
|
-
function patchSpanEnd(span, location2, routes, basename3, spanType) {
|
|
33479
|
-
const patchedPropertyName = `__sentry_${spanType}_end_patched__`;
|
|
33480
|
-
const hasEndBeenPatched = span?.[patchedPropertyName];
|
|
33481
|
-
if (hasEndBeenPatched || !span.end) {
|
|
33482
|
-
return;
|
|
33483
|
-
}
|
|
33484
|
-
const originalEnd = span.end.bind(span);
|
|
33485
|
-
let endCalled = false;
|
|
33486
|
-
span.end = function patchedEnd(...args) {
|
|
33487
|
-
if (endCalled) {
|
|
33488
|
-
return;
|
|
33489
|
-
}
|
|
33490
|
-
endCalled = true;
|
|
33491
|
-
const endTimestamp = args.length > 0 ? args[0] : Date.now() / 1000;
|
|
33492
|
-
const spanJson = spanToJSON(span);
|
|
33493
|
-
const currentName = spanJson.description;
|
|
33494
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
33495
|
-
const cleanupNavigationSpan = () => {
|
|
33496
|
-
const client = getClient();
|
|
33497
|
-
if (client && spanType === "navigation") {
|
|
33498
|
-
const trackedNav = activeNavigationSpans.get(client);
|
|
33499
|
-
if (trackedNav && trackedNav.span === span) {
|
|
33500
|
-
activeNavigationSpans.delete(client);
|
|
33501
|
-
}
|
|
33502
|
-
}
|
|
33503
|
-
};
|
|
33504
|
-
const pendingPromises = pendingLazyRouteLoads.get(span);
|
|
33505
|
-
const mayHaveLazyRoutes = span.__sentry_may_have_lazy_routes__;
|
|
33506
|
-
const hasPendingOrMayHaveLazyRoutes = pendingPromises && pendingPromises.size > 0 || mayHaveLazyRoutes;
|
|
33507
|
-
const shouldWaitForLazyRoutes = hasPendingOrMayHaveLazyRoutes && currentName && (transactionNameHasWildcard(currentName) || currentSource !== "route");
|
|
33508
|
-
if (shouldWaitForLazyRoutes) {
|
|
33509
|
-
if (_lazyRouteTimeout === 0) {
|
|
33510
|
-
tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location2, routes, basename3, spanType, allRoutes);
|
|
33511
|
-
cleanupNavigationSpan();
|
|
33512
|
-
originalEnd(endTimestamp);
|
|
33513
|
-
return;
|
|
33514
|
-
}
|
|
33515
|
-
const timeoutPromise = new Promise((r3) => setTimeout(r3, _lazyRouteTimeout));
|
|
33516
|
-
let waitPromise;
|
|
33517
|
-
if (pendingPromises && pendingPromises.size > 0) {
|
|
33518
|
-
const allSettled = Promise.allSettled(pendingPromises).then(() => {});
|
|
33519
|
-
waitPromise = _lazyRouteTimeout === Infinity ? allSettled : Promise.race([allSettled, timeoutPromise]);
|
|
33520
|
-
} else {
|
|
33521
|
-
waitPromise = timeoutPromise;
|
|
33522
|
-
}
|
|
33523
|
-
waitPromise.then(() => {
|
|
33524
|
-
const updatedSpanJson = spanToJSON(span);
|
|
33525
|
-
tryUpdateSpanNameBeforeEnd(span, updatedSpanJson, updatedSpanJson.description, location2, routes, basename3, spanType, allRoutes);
|
|
33526
|
-
cleanupNavigationSpan();
|
|
33527
|
-
originalEnd(endTimestamp);
|
|
33528
|
-
}).catch(() => {
|
|
33529
|
-
cleanupNavigationSpan();
|
|
33530
|
-
originalEnd(endTimestamp);
|
|
33531
|
-
});
|
|
33532
|
-
return;
|
|
33533
|
-
}
|
|
33534
|
-
tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location2, routes, basename3, spanType, allRoutes);
|
|
33535
|
-
cleanupNavigationSpan();
|
|
33536
|
-
originalEnd(endTimestamp);
|
|
33537
|
-
};
|
|
33538
|
-
addNonEnumerableProperty(span, patchedPropertyName, true);
|
|
33539
|
-
}
|
|
33540
|
-
function createV6CompatibleWithSentryReactRouterRouting(Routes, version3) {
|
|
33541
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_createRoutesFromChildren || !_matchRoutes2) {
|
|
33542
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
33543
|
-
useEffect: ${_useEffect}. useLocation: ${_useLocation}. useNavigationType: ${_useNavigationType}.
|
|
33544
|
-
createRoutesFromChildren: ${_createRoutesFromChildren}. matchRoutes: ${_matchRoutes2}.`);
|
|
33545
|
-
return Routes;
|
|
33546
|
-
}
|
|
33547
|
-
const SentryRoutes = (props) => {
|
|
33548
|
-
const isMountRenderPass = React4.useRef(true);
|
|
33549
|
-
const location2 = _useLocation();
|
|
33550
|
-
const navigationType = _useNavigationType();
|
|
33551
|
-
_useEffect(() => {
|
|
33552
|
-
const routes = _createRoutesFromChildren(props.children);
|
|
33553
|
-
if (isMountRenderPass.current) {
|
|
33554
|
-
addRoutesToAllRoutes(routes);
|
|
33555
|
-
updatePageloadTransaction({
|
|
33556
|
-
activeRootSpan: getActiveRootSpan2(),
|
|
33557
|
-
location: location2,
|
|
33558
|
-
routes,
|
|
33559
|
-
allRoutes: Array.from(allRoutes)
|
|
33560
|
-
});
|
|
33561
|
-
isMountRenderPass.current = false;
|
|
33562
|
-
} else {
|
|
33563
|
-
handleNavigation({ location: location2, routes, navigationType, version: version3, allRoutes: Array.from(allRoutes) });
|
|
33564
|
-
}
|
|
33565
|
-
}, [location2, navigationType]);
|
|
33566
|
-
return React4.createElement(Routes, { ...props });
|
|
33567
|
-
};
|
|
33568
|
-
hoistNonReactStatics(SentryRoutes, Routes);
|
|
33569
|
-
return SentryRoutes;
|
|
33570
|
-
}
|
|
33571
|
-
var _useEffect, _useLocation, _useNavigationType, _createRoutesFromChildren, _matchRoutes2, _enableAsyncRouteHandlers = false, _lazyRouteTimeout = 3000, _lazyRouteManifest, _basename = "", CLIENTS_WITH_INSTRUMENT_NAVIGATION, activeNavigationSpans, allRoutes, pendingLazyRouteLoads, deferredLazyRouteResolvers;
|
|
33572
|
-
var init_instrumentation = __esm(() => {
|
|
33573
|
-
init_dev();
|
|
33574
|
-
init_esm();
|
|
33575
|
-
init_debug_build4();
|
|
33576
|
-
init_hoist_non_react_statics();
|
|
33577
|
-
init_lazy_routes();
|
|
33578
|
-
init_utils12();
|
|
33579
|
-
CLIENTS_WITH_INSTRUMENT_NAVIGATION = new WeakSet;
|
|
33580
|
-
activeNavigationSpans = new WeakMap;
|
|
33581
|
-
allRoutes = new Set;
|
|
33582
|
-
pendingLazyRouteLoads = new WeakMap;
|
|
33583
|
-
deferredLazyRouteResolvers = new WeakMap;
|
|
33584
|
-
});
|
|
33585
|
-
|
|
33586
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv6.js
|
|
33587
|
-
function reactRouterV6BrowserTracingIntegration(options) {
|
|
33588
|
-
return createReactRouterV6CompatibleTracingIntegration(options, "6");
|
|
33589
|
-
}
|
|
33590
|
-
function wrapUseRoutesV6(origUseRoutes) {
|
|
33591
|
-
return createV6CompatibleWrapUseRoutes(origUseRoutes, "6");
|
|
33592
|
-
}
|
|
33593
|
-
function wrapCreateBrowserRouterV6(createRouterFunction) {
|
|
33594
|
-
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, "6");
|
|
33595
|
-
}
|
|
33596
|
-
function wrapCreateMemoryRouterV6(createMemoryRouterFunction) {
|
|
33597
|
-
return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, "6");
|
|
33598
|
-
}
|
|
33599
|
-
function withSentryReactRouterV6Routing(routes) {
|
|
33600
|
-
return createV6CompatibleWithSentryReactRouterRouting(routes, "6");
|
|
33601
|
-
}
|
|
33602
|
-
var init_reactrouterv6 = __esm(() => {
|
|
33603
|
-
init_instrumentation();
|
|
33604
|
-
});
|
|
33605
|
-
|
|
33606
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv7.js
|
|
33607
|
-
function reactRouterV7BrowserTracingIntegration(options) {
|
|
33608
|
-
return createReactRouterV6CompatibleTracingIntegration(options, "7");
|
|
33609
|
-
}
|
|
33610
|
-
function withSentryReactRouterV7Routing(routes) {
|
|
33611
|
-
return createV6CompatibleWithSentryReactRouterRouting(routes, "7");
|
|
33612
|
-
}
|
|
33613
|
-
function wrapCreateBrowserRouterV7(createRouterFunction) {
|
|
33614
|
-
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, "7");
|
|
33615
|
-
}
|
|
33616
|
-
function wrapCreateMemoryRouterV7(createMemoryRouterFunction) {
|
|
33617
|
-
return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, "7");
|
|
33618
|
-
}
|
|
33619
|
-
function wrapUseRoutesV7(origUseRoutes) {
|
|
33620
|
-
return createV6CompatibleWrapUseRoutes(origUseRoutes, "7");
|
|
33621
|
-
}
|
|
33622
|
-
var init_reactrouterv7 = __esm(() => {
|
|
33623
|
-
init_instrumentation();
|
|
33624
|
-
});
|
|
33625
|
-
|
|
33626
31627
|
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/index.js
|
|
33627
31628
|
var exports_esm = {};
|
|
33628
31629
|
__export(exports_esm, {
|
|
@@ -33790,16 +31791,6 @@ __export(exports_esm, {
|
|
|
33790
31791
|
BrowserClient: () => BrowserClient
|
|
33791
31792
|
});
|
|
33792
31793
|
var init_esm6 = __esm(() => {
|
|
33793
|
-
init_sdk3();
|
|
33794
|
-
init_error();
|
|
33795
|
-
init_profiler();
|
|
33796
|
-
init_errorboundary();
|
|
33797
|
-
init_redux();
|
|
33798
|
-
init_reactrouterv3();
|
|
33799
|
-
init_tanstackrouter();
|
|
33800
|
-
init_reactrouter();
|
|
33801
|
-
init_reactrouterv6();
|
|
33802
|
-
init_reactrouterv7();
|
|
33803
31794
|
init_dev();
|
|
33804
31795
|
});
|
|
33805
31796
|
|
|
@@ -33835,7 +31826,7 @@ import {
|
|
|
33835
31826
|
ToastContainer as BaseToastContainer,
|
|
33836
31827
|
toast as baseToast
|
|
33837
31828
|
} from "@powerhousedao/design-system/connect";
|
|
33838
|
-
import { createElement
|
|
31829
|
+
import { createElement } from "react";
|
|
33839
31830
|
function toast(content, options) {
|
|
33840
31831
|
const {
|
|
33841
31832
|
type = "default",
|
|
@@ -33844,7 +31835,7 @@ function toast(content, options) {
|
|
|
33844
31835
|
} = options || {};
|
|
33845
31836
|
return baseToast(content, { type, containerId, ...restOptions });
|
|
33846
31837
|
}
|
|
33847
|
-
var CONNECT_TOAST_CONTAINER_ID = "connect", ToastContainer = () =>
|
|
31838
|
+
var CONNECT_TOAST_CONTAINER_ID = "connect", ToastContainer = () => createElement(BaseToastContainer, {
|
|
33848
31839
|
containerId: CONNECT_TOAST_CONTAINER_ID
|
|
33849
31840
|
});
|
|
33850
31841
|
var init_toast = () => {};
|
|
@@ -36424,7 +34415,7 @@ var warn3 = (i18n, code, msg, rest) => {
|
|
|
36424
34415
|
}
|
|
36425
34416
|
});
|
|
36426
34417
|
}, isString3 = (obj) => typeof obj === "string", isObject2 = (obj) => typeof obj === "object" && obj !== null;
|
|
36427
|
-
var
|
|
34418
|
+
var init_utils12 = __esm(() => {
|
|
36428
34419
|
alreadyWarned = {};
|
|
36429
34420
|
});
|
|
36430
34421
|
|
|
@@ -36457,15 +34448,15 @@ var init_unescape = __esm(() => {
|
|
|
36457
34448
|
});
|
|
36458
34449
|
|
|
36459
34450
|
// ../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/defaults.js
|
|
36460
|
-
var
|
|
36461
|
-
|
|
36462
|
-
...
|
|
34451
|
+
var defaultOptions, setDefaults = (options = {}) => {
|
|
34452
|
+
defaultOptions = {
|
|
34453
|
+
...defaultOptions,
|
|
36463
34454
|
...options
|
|
36464
34455
|
};
|
|
36465
|
-
}, getDefaults = () =>
|
|
34456
|
+
}, getDefaults = () => defaultOptions;
|
|
36466
34457
|
var init_defaults = __esm(() => {
|
|
36467
34458
|
init_unescape();
|
|
36468
|
-
|
|
34459
|
+
defaultOptions = {
|
|
36469
34460
|
bindI18n: "languageChanged",
|
|
36470
34461
|
bindI18nStore: "",
|
|
36471
34462
|
transEmptyNodeValue: "",
|
|
@@ -36484,7 +34475,7 @@ var i18nInstance, setI18n = (instance2) => {
|
|
|
36484
34475
|
}, getI18n = () => i18nInstance;
|
|
36485
34476
|
|
|
36486
34477
|
// ../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/TransWithoutContext.js
|
|
36487
|
-
import { Fragment, isValidElement
|
|
34478
|
+
import { Fragment, isValidElement, cloneElement, createElement as createElement2, Children } from "react";
|
|
36488
34479
|
function Trans({
|
|
36489
34480
|
children,
|
|
36490
34481
|
count: count2,
|
|
@@ -36579,7 +34570,7 @@ function Trans({
|
|
|
36579
34570
|
}
|
|
36580
34571
|
const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);
|
|
36581
34572
|
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
|
|
36582
|
-
return useAsParent ?
|
|
34573
|
+
return useAsParent ? createElement2(useAsParent, additionalProps, content) : content;
|
|
36583
34574
|
}
|
|
36584
34575
|
var hasChildren = (node2, checkLength) => {
|
|
36585
34576
|
if (!node2)
|
|
@@ -36593,7 +34584,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36593
34584
|
return [];
|
|
36594
34585
|
const children = node2.props?.children ?? node2.children;
|
|
36595
34586
|
return node2.props?.i18nIsDynamicList ? getAsArray(children) : children;
|
|
36596
|
-
}, hasValidReactChildren = (children) => Array.isArray(children) && children.every(
|
|
34587
|
+
}, hasValidReactChildren = (children) => Array.isArray(children) && children.every(isValidElement), getAsArray = (data) => Array.isArray(data) ? data : [data], mergeProps = (source, target) => {
|
|
36597
34588
|
const newTarget = {
|
|
36598
34589
|
...target
|
|
36599
34590
|
};
|
|
@@ -36613,7 +34604,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36613
34604
|
return;
|
|
36614
34605
|
if (hasChildren(child))
|
|
36615
34606
|
getData(getChildren(child));
|
|
36616
|
-
else if (isObject2(child) && !
|
|
34607
|
+
else if (isObject2(child) && !isValidElement(child))
|
|
36617
34608
|
Object.assign(values, child);
|
|
36618
34609
|
});
|
|
36619
34610
|
};
|
|
@@ -36630,7 +34621,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36630
34621
|
stringNode += `${child}`;
|
|
36631
34622
|
return;
|
|
36632
34623
|
}
|
|
36633
|
-
if (
|
|
34624
|
+
if (isValidElement(child)) {
|
|
36634
34625
|
const {
|
|
36635
34626
|
props,
|
|
36636
34627
|
type
|
|
@@ -36738,7 +34729,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36738
34729
|
return;
|
|
36739
34730
|
if (hasChildren(child))
|
|
36740
34731
|
getData(getChildren(child));
|
|
36741
|
-
else if (isObject2(child) && !
|
|
34732
|
+
else if (isObject2(child) && !isValidElement(child))
|
|
36742
34733
|
Object.assign(data, child);
|
|
36743
34734
|
});
|
|
36744
34735
|
};
|
|
@@ -36805,7 +34796,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36805
34796
|
const child = Object.keys(props).length !== 0 ? mergeProps({
|
|
36806
34797
|
props
|
|
36807
34798
|
}, tmp) : tmp;
|
|
36808
|
-
const isElement3 =
|
|
34799
|
+
const isElement3 = isValidElement(child);
|
|
36809
34800
|
const isValidTranslationWithChildren = isElement3 && hasChildren(node2, true) && !node2.voidElement;
|
|
36810
34801
|
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject2(child) && child.dummy && !isElement3;
|
|
36811
34802
|
const isKnownComponent = isObject2(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node2.name);
|
|
@@ -36824,12 +34815,12 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36824
34815
|
pushTranslatedJSX(child, inner, mem, i3, node2.voidElement);
|
|
36825
34816
|
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node2.name) > -1) {
|
|
36826
34817
|
if (node2.voidElement) {
|
|
36827
|
-
mem.push(
|
|
34818
|
+
mem.push(createElement2(node2.name, {
|
|
36828
34819
|
key: `${node2.name}-${i3}`
|
|
36829
34820
|
}));
|
|
36830
34821
|
} else {
|
|
36831
34822
|
const inner = mapAST(reactNodes, node2.children, rootReactNode);
|
|
36832
|
-
mem.push(
|
|
34823
|
+
mem.push(createElement2(node2.name, {
|
|
36833
34824
|
key: `${node2.name}-${i3}`
|
|
36834
34825
|
}, inner));
|
|
36835
34826
|
}
|
|
@@ -36851,7 +34842,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36851
34842
|
const unescapeFn = typeof i18nOptions.unescape === "function" ? i18nOptions.unescape : getDefaults().unescape;
|
|
36852
34843
|
const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node2.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node2.content, opts, i18n.language);
|
|
36853
34844
|
if (wrapTextNodes) {
|
|
36854
|
-
mem.push(
|
|
34845
|
+
mem.push(createElement2(wrapTextNodes, {
|
|
36855
34846
|
key: `${node2.name}-${i3}`
|
|
36856
34847
|
}, content));
|
|
36857
34848
|
} else {
|
|
@@ -36875,9 +34866,9 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36875
34866
|
return comp;
|
|
36876
34867
|
}
|
|
36877
34868
|
function Componentized() {
|
|
36878
|
-
return
|
|
34869
|
+
return createElement2(Fragment, null, comp);
|
|
36879
34870
|
}
|
|
36880
|
-
return
|
|
34871
|
+
return createElement2(Componentized, {
|
|
36881
34872
|
key: componentKey
|
|
36882
34873
|
});
|
|
36883
34874
|
}, generateArrayComponents = (components, translation) => components.map((c3, index) => fixComponentProps(c3, index, translation)), generateObjectComponents = (components, translation) => {
|
|
@@ -36911,7 +34902,7 @@ var hasChildren = (node2, checkLength) => {
|
|
|
36911
34902
|
var init_TransWithoutContext = __esm(() => {
|
|
36912
34903
|
init_i18next();
|
|
36913
34904
|
init_html_parse_stringify_module();
|
|
36914
|
-
|
|
34905
|
+
init_utils12();
|
|
36915
34906
|
init_defaults();
|
|
36916
34907
|
init_unescape();
|
|
36917
34908
|
});
|
|
@@ -36999,20 +34990,20 @@ var init_Trans = __esm(() => {
|
|
|
36999
34990
|
});
|
|
37000
34991
|
|
|
37001
34992
|
// ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
37002
|
-
import * as
|
|
34993
|
+
import * as React from "react";
|
|
37003
34994
|
var require_use_sync_external_store_shim_development = __commonJS((exports) => {
|
|
37004
34995
|
(function() {
|
|
37005
34996
|
function is(x2, y2) {
|
|
37006
34997
|
return x2 === y2 && (x2 !== 0 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
37007
34998
|
}
|
|
37008
34999
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
37009
|
-
didWarnOld18Alpha ||
|
|
35000
|
+
didWarnOld18Alpha || React.startTransition === undefined || (didWarnOld18Alpha = true, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
37010
35001
|
var value = getSnapshot();
|
|
37011
35002
|
if (!didWarnUncachedGetSnapshot) {
|
|
37012
35003
|
var cachedValue = getSnapshot();
|
|
37013
35004
|
objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = true);
|
|
37014
35005
|
}
|
|
37015
|
-
cachedValue =
|
|
35006
|
+
cachedValue = useState2({
|
|
37016
35007
|
inst: { value, getSnapshot }
|
|
37017
35008
|
});
|
|
37018
35009
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
@@ -37021,7 +35012,7 @@ var require_use_sync_external_store_shim_development = __commonJS((exports) => {
|
|
|
37021
35012
|
inst.getSnapshot = getSnapshot;
|
|
37022
35013
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
37023
35014
|
}, [subscribe2, value, getSnapshot]);
|
|
37024
|
-
|
|
35015
|
+
useEffect2(function() {
|
|
37025
35016
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
37026
35017
|
return subscribe2(function() {
|
|
37027
35018
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
@@ -37044,8 +35035,8 @@ var require_use_sync_external_store_shim_development = __commonJS((exports) => {
|
|
|
37044
35035
|
return getSnapshot();
|
|
37045
35036
|
}
|
|
37046
35037
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
37047
|
-
var objectIs = typeof Object.is === "function" ? Object.is : is,
|
|
37048
|
-
exports.useSyncExternalStore =
|
|
35038
|
+
var objectIs = typeof Object.is === "function" ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect2 = React.useLayoutEffect, useDebugValue2 = React.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = typeof window === "undefined" || typeof window.document === "undefined" || typeof window.document.createElement === "undefined" ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
35039
|
+
exports.useSyncExternalStore = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;
|
|
37049
35040
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
37050
35041
|
})();
|
|
37051
35042
|
});
|
|
@@ -37058,7 +35049,7 @@ var require_shim = __commonJS((exports, module) => {
|
|
|
37058
35049
|
});
|
|
37059
35050
|
|
|
37060
35051
|
// ../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/useTranslation.js
|
|
37061
|
-
import { useContext as useContext2, useCallback, useMemo, useEffect
|
|
35052
|
+
import { useContext as useContext2, useCallback, useMemo, useEffect, useRef, useState } from "react";
|
|
37062
35053
|
var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
37063
35054
|
if (isString3(optsOrDefaultValue))
|
|
37064
35055
|
return optsOrDefaultValue;
|
|
@@ -37092,7 +35083,7 @@ var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
|
37092
35083
|
const unstableNamespaces = isString3(nsOrContext) ? [nsOrContext] : nsOrContext || ["translation"];
|
|
37093
35084
|
const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);
|
|
37094
35085
|
i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);
|
|
37095
|
-
const revisionRef =
|
|
35086
|
+
const revisionRef = useRef(0);
|
|
37096
35087
|
const subscribe2 = useCallback((callback) => {
|
|
37097
35088
|
if (!i18n)
|
|
37098
35089
|
return dummySubscribe;
|
|
@@ -37115,7 +35106,7 @@ var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
|
37115
35106
|
bindI18nStore.split(" ").forEach((e4) => i18n.store.off(e4, wrappedCallback));
|
|
37116
35107
|
};
|
|
37117
35108
|
}, [i18n, i18nOptions]);
|
|
37118
|
-
const snapshotRef =
|
|
35109
|
+
const snapshotRef = useRef();
|
|
37119
35110
|
const getSnapshot = useCallback(() => {
|
|
37120
35111
|
if (!i18n) {
|
|
37121
35112
|
return notReadySnapshot;
|
|
@@ -37138,12 +35129,12 @@ var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
|
37138
35129
|
snapshotRef.current = newSnapshot;
|
|
37139
35130
|
return newSnapshot;
|
|
37140
35131
|
}, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);
|
|
37141
|
-
const [loadCount, setLoadCount] =
|
|
35132
|
+
const [loadCount, setLoadCount] = useState(0);
|
|
37142
35133
|
const {
|
|
37143
35134
|
t: t4,
|
|
37144
35135
|
ready
|
|
37145
35136
|
} = import_shim.useSyncExternalStore(subscribe2, getSnapshot, getSnapshot);
|
|
37146
|
-
|
|
35137
|
+
useEffect(() => {
|
|
37147
35138
|
if (i18n && !ready && !useSuspense) {
|
|
37148
35139
|
const onLoaded = () => setLoadCount((c3) => c3 + 1);
|
|
37149
35140
|
if (props.lng) {
|
|
@@ -37154,8 +35145,8 @@ var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
|
37154
35145
|
}
|
|
37155
35146
|
}, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);
|
|
37156
35147
|
const finalI18n = i18n || {};
|
|
37157
|
-
const wrapperRef =
|
|
37158
|
-
const wrapperLangRef =
|
|
35148
|
+
const wrapperRef = useRef(null);
|
|
35149
|
+
const wrapperLangRef = useRef();
|
|
37159
35150
|
const createI18nWrapper = (original) => {
|
|
37160
35151
|
const descriptors = Object.getOwnPropertyDescriptors(original);
|
|
37161
35152
|
if (descriptors.__original)
|
|
@@ -37212,7 +35203,7 @@ var import_shim, notReadyT = (k2, optsOrDefaultValue) => {
|
|
|
37212
35203
|
};
|
|
37213
35204
|
var init_useTranslation = __esm(() => {
|
|
37214
35205
|
init_context();
|
|
37215
|
-
|
|
35206
|
+
init_utils12();
|
|
37216
35207
|
import_shim = __toESM(require_shim(), 1);
|
|
37217
35208
|
notReadySnapshot = {
|
|
37218
35209
|
t: notReadyT,
|
|
@@ -37254,7 +35245,7 @@ var init_reload_connect_toast = __esm(() => {
|
|
|
37254
35245
|
|
|
37255
35246
|
// src/hooks/useCheckLatestVersion.ts
|
|
37256
35247
|
import { logger as logger3 } from "document-drive";
|
|
37257
|
-
import { createElement as
|
|
35248
|
+
import { createElement as createElement3, useEffect as useEffect2 } from "react";
|
|
37258
35249
|
var useCheckLatestVersion = () => {
|
|
37259
35250
|
async function checkLatestVersion() {
|
|
37260
35251
|
const result = await isLatestVersion();
|
|
@@ -37268,14 +35259,14 @@ var useCheckLatestVersion = () => {
|
|
|
37268
35259
|
Current: @currentVersion
|
|
37269
35260
|
Latest: @latestVersion`, result.currentVersion, result.latestVersion);
|
|
37270
35261
|
} else {
|
|
37271
|
-
toast(
|
|
35262
|
+
toast(createElement3(ReloadConnectToast), {
|
|
37272
35263
|
type: "connect-warning",
|
|
37273
35264
|
toastId: "outdated-app",
|
|
37274
35265
|
autoClose: false
|
|
37275
35266
|
});
|
|
37276
35267
|
}
|
|
37277
35268
|
}
|
|
37278
|
-
|
|
35269
|
+
useEffect2(() => {
|
|
37279
35270
|
checkLatestVersion().catch(console.error);
|
|
37280
35271
|
}, []);
|
|
37281
35272
|
};
|
|
@@ -45000,13 +42991,13 @@ class DocumentModelRegistry {
|
|
|
45000
42991
|
registerModules(...modules) {
|
|
45001
42992
|
for (const module of modules) {
|
|
45002
42993
|
const documentType = module.documentModel.global.id;
|
|
45003
|
-
const
|
|
42994
|
+
const version = module.version ?? 1;
|
|
45004
42995
|
for (let i3 = 0;i3 < this.modules.length; i3++) {
|
|
45005
42996
|
const existing = this.modules[i3];
|
|
45006
42997
|
const existingType = existing.documentModel.global.id;
|
|
45007
42998
|
const existingVersion = existing.version ?? 1;
|
|
45008
|
-
if (existingType === documentType && existingVersion ===
|
|
45009
|
-
throw new DuplicateModuleError(documentType,
|
|
42999
|
+
if (existingType === documentType && existingVersion === version) {
|
|
43000
|
+
throw new DuplicateModuleError(documentType, version);
|
|
45010
43001
|
}
|
|
45011
43002
|
}
|
|
45012
43003
|
this.modules.push(module);
|
|
@@ -45023,7 +43014,7 @@ class DocumentModelRegistry {
|
|
|
45023
43014
|
}
|
|
45024
43015
|
return allFound;
|
|
45025
43016
|
}
|
|
45026
|
-
getModule(documentType,
|
|
43017
|
+
getModule(documentType, version) {
|
|
45027
43018
|
let latestModule;
|
|
45028
43019
|
let latestVersion = -1;
|
|
45029
43020
|
for (let i3 = 0;i3 < this.modules.length; i3++) {
|
|
@@ -45031,7 +43022,7 @@ class DocumentModelRegistry {
|
|
|
45031
43022
|
const moduleType = module.documentModel.global.id;
|
|
45032
43023
|
const moduleVersion = module.version ?? 1;
|
|
45033
43024
|
if (moduleType === documentType) {
|
|
45034
|
-
if (
|
|
43025
|
+
if (version !== undefined && moduleVersion === version) {
|
|
45035
43026
|
return module;
|
|
45036
43027
|
}
|
|
45037
43028
|
if (moduleVersion > latestVersion) {
|
|
@@ -45040,10 +43031,10 @@ class DocumentModelRegistry {
|
|
|
45040
43031
|
}
|
|
45041
43032
|
}
|
|
45042
43033
|
}
|
|
45043
|
-
if (
|
|
43034
|
+
if (version === undefined && latestModule !== undefined) {
|
|
45044
43035
|
return latestModule;
|
|
45045
43036
|
}
|
|
45046
|
-
throw new ModuleNotFoundError(documentType,
|
|
43037
|
+
throw new ModuleNotFoundError(documentType, version);
|
|
45047
43038
|
}
|
|
45048
43039
|
getAllModules() {
|
|
45049
43040
|
return [...this.modules];
|
|
@@ -45070,9 +43061,9 @@ class DocumentModelRegistry {
|
|
|
45070
43061
|
for (const module of this.modules) {
|
|
45071
43062
|
if (module.documentModel.global.id === documentType) {
|
|
45072
43063
|
found = true;
|
|
45073
|
-
const
|
|
45074
|
-
if (
|
|
45075
|
-
latest =
|
|
43064
|
+
const version = module.version ?? 1;
|
|
43065
|
+
if (version > latest) {
|
|
43066
|
+
latest = version;
|
|
45076
43067
|
}
|
|
45077
43068
|
}
|
|
45078
43069
|
}
|
|
@@ -55896,20 +53887,20 @@ var init_src = __esm(() => {
|
|
|
55896
53887
|
ModuleNotFoundError = class ModuleNotFoundError extends Error {
|
|
55897
53888
|
documentType;
|
|
55898
53889
|
requestedVersion;
|
|
55899
|
-
constructor(documentType,
|
|
55900
|
-
const versionSuffix =
|
|
53890
|
+
constructor(documentType, version) {
|
|
53891
|
+
const versionSuffix = version !== undefined ? ` version ${version}` : "";
|
|
55901
53892
|
super(`Document model module not found for type: ${documentType}${versionSuffix}`);
|
|
55902
53893
|
this.name = "ModuleNotFoundError";
|
|
55903
53894
|
this.documentType = documentType;
|
|
55904
|
-
this.requestedVersion =
|
|
53895
|
+
this.requestedVersion = version;
|
|
55905
53896
|
}
|
|
55906
53897
|
static isError(error3) {
|
|
55907
53898
|
return Error.isError(error3) && error3.name === "ModuleNotFoundError";
|
|
55908
53899
|
}
|
|
55909
53900
|
};
|
|
55910
53901
|
DuplicateModuleError = class DuplicateModuleError extends Error {
|
|
55911
|
-
constructor(documentType,
|
|
55912
|
-
const versionSuffix =
|
|
53902
|
+
constructor(documentType, version) {
|
|
53903
|
+
const versionSuffix = version !== undefined ? ` (version ${version})` : "";
|
|
55913
53904
|
super(`Document model module already registered for type: ${documentType}${versionSuffix}`);
|
|
55914
53905
|
this.name = "DuplicateModuleError";
|
|
55915
53906
|
}
|
|
@@ -57365,19 +55356,19 @@ import {
|
|
|
57365
55356
|
} from "document-drive";
|
|
57366
55357
|
import { documentModelDocumentModelModule } from "document-model";
|
|
57367
55358
|
import { useCallback as useCallback2 } from "react";
|
|
57368
|
-
import { useEffect as
|
|
55359
|
+
import { useEffect as useEffect3, useState as useState2, useSyncExternalStore as useSyncExternalStore22 } from "react";
|
|
57369
55360
|
import { useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
57370
55361
|
import { logger as logger5 } from "document-drive";
|
|
57371
55362
|
import { useSyncExternalStore as useSyncExternalStore32 } from "react";
|
|
57372
55363
|
import { logger as logger6 } from "document-drive";
|
|
57373
55364
|
import { use as use2, useCallback as useCallback22, useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
57374
55365
|
import { useEffect as useEffect22, useState as useState22 } from "react";
|
|
57375
|
-
import { useEffect as useEffect32, useRef as
|
|
55366
|
+
import { useEffect as useEffect32, useRef as useRef2, useState as useState3 } from "react";
|
|
57376
55367
|
import {
|
|
57377
55368
|
DocumentModelNotFoundError,
|
|
57378
55369
|
DocumentNotFoundError as DocumentNotFoundError2
|
|
57379
55370
|
} from "document-drive";
|
|
57380
|
-
import { useCallback as useCallback4, useEffect as
|
|
55371
|
+
import { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef22, useState as useState4 } from "react";
|
|
57381
55372
|
import { isFileNode as isFileNode2 } from "document-drive";
|
|
57382
55373
|
import { useMemo as useMemo2 } from "react";
|
|
57383
55374
|
import {
|
|
@@ -57390,7 +55381,7 @@ import { defaultBaseState as defaultBaseState2, generateId as generateId22 } fro
|
|
|
57390
55381
|
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
57391
55382
|
import { createRelationalDbLegacy } from "document-drive";
|
|
57392
55383
|
import { useMemo as useMemo22 } from "react";
|
|
57393
|
-
import { useEffect as useEffect6, useRef as
|
|
55384
|
+
import { useEffect as useEffect6, useRef as useRef3, useState as useState6 } from "react";
|
|
57394
55385
|
import { useCallback as useCallback5, useMemo as useMemo3, useRef as useRef4 } from "react";
|
|
57395
55386
|
import { useCallback as useCallback6, useState as useState7 } from "react";
|
|
57396
55387
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -57398,7 +55389,7 @@ import {
|
|
|
57398
55389
|
Children as Children2,
|
|
57399
55390
|
cloneElement as cloneElement2,
|
|
57400
55391
|
forwardRef,
|
|
57401
|
-
isValidElement as
|
|
55392
|
+
isValidElement as isValidElement2
|
|
57402
55393
|
} from "react";
|
|
57403
55394
|
import { jsxDEV as jsxDEV22 } from "react/jsx-dev-runtime";
|
|
57404
55395
|
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef5, useState as useState8 } from "react";
|
|
@@ -60837,8 +58828,8 @@ function useDid() {
|
|
|
60837
58828
|
}
|
|
60838
58829
|
function useUser() {
|
|
60839
58830
|
const renown = useRenown();
|
|
60840
|
-
const [user, setUser2] =
|
|
60841
|
-
|
|
58831
|
+
const [user, setUser2] = useState2(renown?.user);
|
|
58832
|
+
useEffect3(() => {
|
|
60842
58833
|
setUser2(renown?.user);
|
|
60843
58834
|
if (!renown)
|
|
60844
58835
|
return;
|
|
@@ -61408,8 +59399,8 @@ function usePHDocumentEditorConfigByKey(key) {
|
|
|
61408
59399
|
}
|
|
61409
59400
|
function useConnectionStates() {
|
|
61410
59401
|
const syncManager = useSync();
|
|
61411
|
-
const [states, setStates] =
|
|
61412
|
-
const unsubscribesRef =
|
|
59402
|
+
const [states, setStates] = useState3(() => buildSnapshot(syncManager));
|
|
59403
|
+
const unsubscribesRef = useRef2([]);
|
|
61413
59404
|
useEffect32(() => {
|
|
61414
59405
|
if (!syncManager)
|
|
61415
59406
|
return;
|
|
@@ -61523,7 +59514,7 @@ function useDocumentOperations(documentId) {
|
|
|
61523
59514
|
});
|
|
61524
59515
|
hasFetchedRef.current = true;
|
|
61525
59516
|
}, [documentId, reactorClient]);
|
|
61526
|
-
|
|
59517
|
+
useEffect4(() => {
|
|
61527
59518
|
if (documentId && reactorClient) {
|
|
61528
59519
|
fetchOperations();
|
|
61529
59520
|
} else if (!documentId) {
|
|
@@ -61954,12 +59945,12 @@ function convertLegacyEditorModuleToVetraEditorModule(legacyEditorModule, manife
|
|
|
61954
59945
|
const nameFromId = id.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
61955
59946
|
const name4 = appName || legacyEditorModule.config.name || nameFromId;
|
|
61956
59947
|
const documentTypes = legacyEditorModule.documentTypes;
|
|
61957
|
-
const
|
|
59948
|
+
const Component = legacyEditorModule.Component;
|
|
61958
59949
|
const vetraEditorModule = {
|
|
61959
59950
|
id,
|
|
61960
59951
|
name: name4,
|
|
61961
59952
|
documentTypes,
|
|
61962
|
-
Component
|
|
59953
|
+
Component
|
|
61963
59954
|
};
|
|
61964
59955
|
return vetraEditorModule;
|
|
61965
59956
|
}
|
|
@@ -73767,8 +71758,8 @@ function useRelationalQuery(ProcessorClass, driveId, queryCallback, parameters,
|
|
|
73767
71758
|
const [result, setResult] = useState6(null);
|
|
73768
71759
|
const [queryLoading, setQueryLoading] = useState6(true);
|
|
73769
71760
|
const [error3, setError] = useState6(undefined);
|
|
73770
|
-
const retryCount =
|
|
73771
|
-
const retryTimeoutRef =
|
|
71761
|
+
const retryCount = useRef3(0);
|
|
71762
|
+
const retryTimeoutRef = useRef3(null);
|
|
73772
71763
|
const relationalDb = useRelationalDb();
|
|
73773
71764
|
const executeLiveQuery = async (sql22, queryParameters, retryAttempt = 0) => {
|
|
73774
71765
|
if (!relationalDb.db) {
|
|
@@ -75273,16 +73264,16 @@ var __create2, __getProtoOf2, __defProp3, __getOwnPropNames2, __getOwnPropDesc2,
|
|
|
75273
73264
|
} else {
|
|
75274
73265
|
return cid;
|
|
75275
73266
|
}
|
|
75276
|
-
}, DAG_PB_CODE = 112, SHA_256_CODE = 18, encodeCID = (
|
|
75277
|
-
const codeOffset = encodingLength(
|
|
73267
|
+
}, DAG_PB_CODE = 112, SHA_256_CODE = 18, encodeCID = (version2, code4, multihash) => {
|
|
73268
|
+
const codeOffset = encodingLength(version2);
|
|
75278
73269
|
const hashOffset = codeOffset + encodingLength(code4);
|
|
75279
73270
|
const bytes = new Uint8Array(hashOffset + multihash.byteLength);
|
|
75280
|
-
encodeTo(
|
|
73271
|
+
encodeTo(version2, bytes, 0);
|
|
75281
73272
|
encodeTo(code4, bytes, codeOffset);
|
|
75282
73273
|
bytes.set(multihash, hashOffset);
|
|
75283
73274
|
return bytes;
|
|
75284
|
-
}, cidSymbol, readonly, hidden,
|
|
75285
|
-
if (range.test(
|
|
73275
|
+
}, cidSymbol, readonly, hidden, version2 = "0.0.0-dev", deprecate = (range, message) => {
|
|
73276
|
+
if (range.test(version2)) {
|
|
75286
73277
|
console.warn(message);
|
|
75287
73278
|
} else {
|
|
75288
73279
|
throw new Error(message);
|
|
@@ -77338,9 +75329,9 @@ var init_src2 = __esm(() => {
|
|
|
77338
75329
|
init_base32();
|
|
77339
75330
|
init_bytes();
|
|
77340
75331
|
CID = class CID2 {
|
|
77341
|
-
constructor(
|
|
75332
|
+
constructor(version22, code4, multihash, bytes) {
|
|
77342
75333
|
this.code = code4;
|
|
77343
|
-
this.version =
|
|
75334
|
+
this.version = version22;
|
|
77344
75335
|
this.multihash = multihash;
|
|
77345
75336
|
this.bytes = bytes;
|
|
77346
75337
|
this.byteOffset = bytes.byteOffset;
|
|
@@ -77394,8 +75385,8 @@ var init_src2 = __esm(() => {
|
|
|
77394
75385
|
return other && this.code === other.code && this.version === other.version && equals2(this.multihash, other.multihash);
|
|
77395
75386
|
}
|
|
77396
75387
|
toString(base3) {
|
|
77397
|
-
const { bytes, version:
|
|
77398
|
-
switch (
|
|
75388
|
+
const { bytes, version: version22, _baseCache } = this;
|
|
75389
|
+
switch (version22) {
|
|
77399
75390
|
case 0:
|
|
77400
75391
|
return toStringV0(bytes, _baseCache, base3 || base58btc.encoder);
|
|
77401
75392
|
default:
|
|
@@ -77438,31 +75429,31 @@ var init_src2 = __esm(() => {
|
|
|
77438
75429
|
if (value instanceof CID2) {
|
|
77439
75430
|
return value;
|
|
77440
75431
|
} else if (value != null && value.asCID === value) {
|
|
77441
|
-
const { version:
|
|
77442
|
-
return new CID2(
|
|
75432
|
+
const { version: version22, code: code4, multihash, bytes } = value;
|
|
75433
|
+
return new CID2(version22, code4, multihash, bytes || encodeCID(version22, code4, multihash.bytes));
|
|
77443
75434
|
} else if (value != null && value[cidSymbol] === true) {
|
|
77444
|
-
const { version:
|
|
75435
|
+
const { version: version22, multihash, code: code4 } = value;
|
|
77445
75436
|
const digest2 = decode5(multihash);
|
|
77446
|
-
return CID2.create(
|
|
75437
|
+
return CID2.create(version22, code4, digest2);
|
|
77447
75438
|
} else {
|
|
77448
75439
|
return null;
|
|
77449
75440
|
}
|
|
77450
75441
|
}
|
|
77451
|
-
static create(
|
|
75442
|
+
static create(version22, code4, digest2) {
|
|
77452
75443
|
if (typeof code4 !== "number") {
|
|
77453
75444
|
throw new Error("String codecs are no longer supported");
|
|
77454
75445
|
}
|
|
77455
|
-
switch (
|
|
75446
|
+
switch (version22) {
|
|
77456
75447
|
case 0: {
|
|
77457
75448
|
if (code4 !== DAG_PB_CODE) {
|
|
77458
75449
|
throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);
|
|
77459
75450
|
} else {
|
|
77460
|
-
return new CID2(
|
|
75451
|
+
return new CID2(version22, code4, digest2, digest2.bytes);
|
|
77461
75452
|
}
|
|
77462
75453
|
}
|
|
77463
75454
|
case 1: {
|
|
77464
|
-
const bytes = encodeCID(
|
|
77465
|
-
return new CID2(
|
|
75455
|
+
const bytes = encodeCID(version22, code4, digest2.bytes);
|
|
75456
|
+
return new CID2(version22, code4, digest2, bytes);
|
|
77466
75457
|
}
|
|
77467
75458
|
default: {
|
|
77468
75459
|
throw new Error("Invalid version");
|
|
@@ -77504,16 +75495,16 @@ var init_src2 = __esm(() => {
|
|
|
77504
75495
|
offset += length2;
|
|
77505
75496
|
return i3;
|
|
77506
75497
|
};
|
|
77507
|
-
let
|
|
75498
|
+
let version22 = next();
|
|
77508
75499
|
let codec = DAG_PB_CODE;
|
|
77509
|
-
if (
|
|
77510
|
-
|
|
75500
|
+
if (version22 === 18) {
|
|
75501
|
+
version22 = 0;
|
|
77511
75502
|
offset = 0;
|
|
77512
|
-
} else if (
|
|
75503
|
+
} else if (version22 === 1) {
|
|
77513
75504
|
codec = next();
|
|
77514
75505
|
}
|
|
77515
|
-
if (
|
|
77516
|
-
throw new RangeError(`Invalid CID version ${
|
|
75506
|
+
if (version22 !== 0 && version22 !== 1) {
|
|
75507
|
+
throw new RangeError(`Invalid CID version ${version22}`);
|
|
77517
75508
|
}
|
|
77518
75509
|
const prefixSize = offset;
|
|
77519
75510
|
const multihashCode = next();
|
|
@@ -77521,7 +75512,7 @@ var init_src2 = __esm(() => {
|
|
|
77521
75512
|
const size = offset + digestSize;
|
|
77522
75513
|
const multihashSize = size - prefixSize;
|
|
77523
75514
|
return {
|
|
77524
|
-
version:
|
|
75515
|
+
version: version22,
|
|
77525
75516
|
codec,
|
|
77526
75517
|
multihashCode,
|
|
77527
75518
|
digestSize,
|
|
@@ -88088,7 +86079,7 @@ spurious results.`);
|
|
|
88088
86079
|
};
|
|
88089
86080
|
Slot = forwardRef(({ children, ...props }, ref) => {
|
|
88090
86081
|
const child = Children2.only(children);
|
|
88091
|
-
if (!
|
|
86082
|
+
if (!isValidElement2(child)) {
|
|
88092
86083
|
return null;
|
|
88093
86084
|
}
|
|
88094
86085
|
const childElement = child;
|
|
@@ -88679,7 +86670,7 @@ function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manif
|
|
|
88679
86670
|
}
|
|
88680
86671
|
});
|
|
88681
86672
|
}
|
|
88682
|
-
function
|
|
86673
|
+
function matchRoutes(routes, locationArg, basename3) {
|
|
88683
86674
|
if (basename3 === undefined) {
|
|
88684
86675
|
basename3 = "/";
|
|
88685
86676
|
}
|
|
@@ -88746,7 +86737,7 @@ function flattenRoutes(routes, branches, parentsMeta, parentPath) {
|
|
|
88746
86737
|
}
|
|
88747
86738
|
branches.push({
|
|
88748
86739
|
path,
|
|
88749
|
-
score:
|
|
86740
|
+
score: computeScore(path, route.index),
|
|
88750
86741
|
routesMeta
|
|
88751
86742
|
});
|
|
88752
86743
|
};
|
|
@@ -88783,7 +86774,7 @@ function explodeOptionalSegments(path) {
|
|
|
88783
86774
|
function rankRouteBranches(branches) {
|
|
88784
86775
|
branches.sort((a3, b2) => a3.score !== b2.score ? b2.score - a3.score : compareIndexes(a3.routesMeta.map((meta) => meta.childrenIndex), b2.routesMeta.map((meta) => meta.childrenIndex)));
|
|
88785
86776
|
}
|
|
88786
|
-
function
|
|
86777
|
+
function computeScore(path, index) {
|
|
88787
86778
|
let segments = path.split("/");
|
|
88788
86779
|
let initialScore = segments.length;
|
|
88789
86780
|
if (segments.some(isSplat)) {
|
|
@@ -88856,7 +86847,7 @@ function matchPath(pattern, pathname) {
|
|
|
88856
86847
|
let matchedPathname = match[0];
|
|
88857
86848
|
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
88858
86849
|
let captureGroups = match.slice(1);
|
|
88859
|
-
let params = compiledParams.reduce((
|
|
86850
|
+
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
88860
86851
|
let {
|
|
88861
86852
|
paramName,
|
|
88862
86853
|
isOptional
|
|
@@ -88867,11 +86858,11 @@ function matchPath(pattern, pathname) {
|
|
|
88867
86858
|
}
|
|
88868
86859
|
const value = captureGroups[index];
|
|
88869
86860
|
if (isOptional && !value) {
|
|
88870
|
-
|
|
86861
|
+
memo[paramName] = undefined;
|
|
88871
86862
|
} else {
|
|
88872
|
-
|
|
86863
|
+
memo[paramName] = (value || "").replace(/%2F/g, "/");
|
|
88873
86864
|
}
|
|
88874
|
-
return
|
|
86865
|
+
return memo;
|
|
88875
86866
|
}, {});
|
|
88876
86867
|
return {
|
|
88877
86868
|
params,
|
|
@@ -89085,7 +87076,7 @@ function createRouter(init4) {
|
|
|
89085
87076
|
let getScrollRestorationKey = null;
|
|
89086
87077
|
let getScrollPosition = null;
|
|
89087
87078
|
let initialScrollRestored = init4.hydrationData != null;
|
|
89088
|
-
let initialMatches =
|
|
87079
|
+
let initialMatches = matchRoutes(dataRoutes, init4.history.location, basename3);
|
|
89089
87080
|
let initialMatchesIsFOW = false;
|
|
89090
87081
|
let initialErrors = null;
|
|
89091
87082
|
if (initialMatches == null && !patchRoutesOnNavigationImpl) {
|
|
@@ -89460,7 +87451,7 @@ function createRouter(init4) {
|
|
|
89460
87451
|
pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
|
|
89461
87452
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
89462
87453
|
let loadingNavigation = opts && opts.overrideNavigation;
|
|
89463
|
-
let matches = opts != null && opts.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? state.matches :
|
|
87454
|
+
let matches = opts != null && opts.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? state.matches : matchRoutes(routesToUse, location2, basename3);
|
|
89464
87455
|
let flushSync = (opts && opts.flushSync) === true;
|
|
89465
87456
|
if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location2) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
|
|
89466
87457
|
completeNavigation(location2, {
|
|
@@ -89823,7 +87814,7 @@ function createRouter(init4) {
|
|
|
89823
87814
|
let flushSync = (opts && opts.flushSync) === true;
|
|
89824
87815
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
89825
87816
|
let normalizedPath = normalizeTo(state.location, state.matches, basename3, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? undefined : opts.relative);
|
|
89826
|
-
let matches =
|
|
87817
|
+
let matches = matchRoutes(routesToUse, normalizedPath, basename3);
|
|
89827
87818
|
let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);
|
|
89828
87819
|
if (fogOfWar.active && fogOfWar.matches) {
|
|
89829
87820
|
matches = fogOfWar.matches;
|
|
@@ -89952,7 +87943,7 @@ function createRouter(init4) {
|
|
|
89952
87943
|
let nextLocation = state.navigation.location || state.location;
|
|
89953
87944
|
let revalidationRequest = createClientSideRequest(init4.history, nextLocation, abortController.signal);
|
|
89954
87945
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
89955
|
-
let matches = state.navigation.state !== "idle" ?
|
|
87946
|
+
let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename3) : state.matches;
|
|
89956
87947
|
invariant2(matches, "Didn't find any matches after fetcher action");
|
|
89957
87948
|
let loadId = ++incrementingLoadId;
|
|
89958
87949
|
fetchReloadIds.set(key, loadId);
|
|
@@ -90502,7 +88493,7 @@ function createRouter(init4) {
|
|
|
90502
88493
|
type: "aborted"
|
|
90503
88494
|
};
|
|
90504
88495
|
}
|
|
90505
|
-
let newMatches =
|
|
88496
|
+
let newMatches = matchRoutes(routesToUse, pathname, basename3);
|
|
90506
88497
|
if (newMatches) {
|
|
90507
88498
|
return {
|
|
90508
88499
|
type: "success",
|
|
@@ -90779,7 +88770,7 @@ function getMatchesToLoad(history, state, matches, submission, location2, initia
|
|
|
90779
88770
|
if (initialHydration || !matches.some((m2) => m2.route.id === f2.routeId) || deletedFetchers.has(key)) {
|
|
90780
88771
|
return;
|
|
90781
88772
|
}
|
|
90782
|
-
let fetcherMatches =
|
|
88773
|
+
let fetcherMatches = matchRoutes(routesToUse, f2.path, basename3);
|
|
90783
88774
|
if (!fetcherMatches) {
|
|
90784
88775
|
revalidatingFetchers.push({
|
|
90785
88776
|
key,
|
|
@@ -91760,7 +89751,7 @@ var init_router = __esm(() => {
|
|
|
91760
89751
|
});
|
|
91761
89752
|
|
|
91762
89753
|
// ../../node_modules/.pnpm/react-router@6.30.3_react@19.2.4/node_modules/react-router/dist/index.js
|
|
91763
|
-
import * as
|
|
89754
|
+
import * as React2 from "react";
|
|
91764
89755
|
function _extends2() {
|
|
91765
89756
|
_extends2 = Object.assign ? Object.assign.bind() : function(target) {
|
|
91766
89757
|
for (var i3 = 1;i3 < arguments.length; i3++) {
|
|
@@ -91783,7 +89774,7 @@ function useHref(to, _temp) {
|
|
|
91783
89774
|
let {
|
|
91784
89775
|
basename: basename3,
|
|
91785
89776
|
navigator: navigator3
|
|
91786
|
-
} =
|
|
89777
|
+
} = React2.useContext(NavigationContext);
|
|
91787
89778
|
let {
|
|
91788
89779
|
hash,
|
|
91789
89780
|
pathname,
|
|
@@ -91802,47 +89793,47 @@ function useHref(to, _temp) {
|
|
|
91802
89793
|
});
|
|
91803
89794
|
}
|
|
91804
89795
|
function useInRouterContext() {
|
|
91805
|
-
return
|
|
89796
|
+
return React2.useContext(LocationContext) != null;
|
|
91806
89797
|
}
|
|
91807
89798
|
function useLocation() {
|
|
91808
89799
|
!useInRouterContext() && invariant2(false, "useLocation() may be used only in the context of a <Router> component.");
|
|
91809
|
-
return
|
|
89800
|
+
return React2.useContext(LocationContext).location;
|
|
91810
89801
|
}
|
|
91811
89802
|
function useNavigationType() {
|
|
91812
|
-
return
|
|
89803
|
+
return React2.useContext(LocationContext).navigationType;
|
|
91813
89804
|
}
|
|
91814
89805
|
function useIsomorphicLayoutEffect(cb) {
|
|
91815
|
-
let isStatic =
|
|
89806
|
+
let isStatic = React2.useContext(NavigationContext).static;
|
|
91816
89807
|
if (!isStatic) {
|
|
91817
|
-
|
|
89808
|
+
React2.useLayoutEffect(cb);
|
|
91818
89809
|
}
|
|
91819
89810
|
}
|
|
91820
89811
|
function useNavigate() {
|
|
91821
89812
|
let {
|
|
91822
89813
|
isDataRoute
|
|
91823
|
-
} =
|
|
89814
|
+
} = React2.useContext(RouteContext);
|
|
91824
89815
|
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
91825
89816
|
}
|
|
91826
89817
|
function useNavigateUnstable() {
|
|
91827
89818
|
!useInRouterContext() && invariant2(false, "useNavigate() may be used only in the context of a <Router> component.");
|
|
91828
|
-
let dataRouterContext =
|
|
89819
|
+
let dataRouterContext = React2.useContext(DataRouterContext);
|
|
91829
89820
|
let {
|
|
91830
89821
|
basename: basename3,
|
|
91831
89822
|
future,
|
|
91832
89823
|
navigator: navigator3
|
|
91833
|
-
} =
|
|
89824
|
+
} = React2.useContext(NavigationContext);
|
|
91834
89825
|
let {
|
|
91835
89826
|
matches
|
|
91836
|
-
} =
|
|
89827
|
+
} = React2.useContext(RouteContext);
|
|
91837
89828
|
let {
|
|
91838
89829
|
pathname: locationPathname
|
|
91839
89830
|
} = useLocation();
|
|
91840
89831
|
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
91841
|
-
let activeRef =
|
|
89832
|
+
let activeRef = React2.useRef(false);
|
|
91842
89833
|
useIsomorphicLayoutEffect(() => {
|
|
91843
89834
|
activeRef.current = true;
|
|
91844
89835
|
});
|
|
91845
|
-
let navigate =
|
|
89836
|
+
let navigate = React2.useCallback(function(to, options) {
|
|
91846
89837
|
if (options === undefined) {
|
|
91847
89838
|
options = {};
|
|
91848
89839
|
}
|
|
@@ -91862,9 +89853,9 @@ function useNavigateUnstable() {
|
|
|
91862
89853
|
return navigate;
|
|
91863
89854
|
}
|
|
91864
89855
|
function useOutlet(context) {
|
|
91865
|
-
let outlet =
|
|
89856
|
+
let outlet = React2.useContext(RouteContext).outlet;
|
|
91866
89857
|
if (outlet) {
|
|
91867
|
-
return /* @__PURE__ */
|
|
89858
|
+
return /* @__PURE__ */ React2.createElement(OutletContext.Provider, {
|
|
91868
89859
|
value: context
|
|
91869
89860
|
}, outlet);
|
|
91870
89861
|
}
|
|
@@ -91873,7 +89864,7 @@ function useOutlet(context) {
|
|
|
91873
89864
|
function useParams() {
|
|
91874
89865
|
let {
|
|
91875
89866
|
matches
|
|
91876
|
-
} =
|
|
89867
|
+
} = React2.useContext(RouteContext);
|
|
91877
89868
|
let routeMatch = matches[matches.length - 1];
|
|
91878
89869
|
return routeMatch ? routeMatch.params : {};
|
|
91879
89870
|
}
|
|
@@ -91883,24 +89874,24 @@ function useResolvedPath(to, _temp2) {
|
|
|
91883
89874
|
} = _temp2 === undefined ? {} : _temp2;
|
|
91884
89875
|
let {
|
|
91885
89876
|
future
|
|
91886
|
-
} =
|
|
89877
|
+
} = React2.useContext(NavigationContext);
|
|
91887
89878
|
let {
|
|
91888
89879
|
matches
|
|
91889
|
-
} =
|
|
89880
|
+
} = React2.useContext(RouteContext);
|
|
91890
89881
|
let {
|
|
91891
89882
|
pathname: locationPathname
|
|
91892
89883
|
} = useLocation();
|
|
91893
89884
|
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
91894
|
-
return
|
|
89885
|
+
return React2.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative3 === "path"), [to, routePathnamesJson, locationPathname, relative3]);
|
|
91895
89886
|
}
|
|
91896
89887
|
function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
91897
89888
|
!useInRouterContext() && invariant2(false, "useRoutes() may be used only in the context of a <Router> component.");
|
|
91898
89889
|
let {
|
|
91899
89890
|
navigator: navigator3
|
|
91900
|
-
} =
|
|
89891
|
+
} = React2.useContext(NavigationContext);
|
|
91901
89892
|
let {
|
|
91902
89893
|
matches: parentMatches
|
|
91903
|
-
} =
|
|
89894
|
+
} = React2.useContext(RouteContext);
|
|
91904
89895
|
let routeMatch = parentMatches[parentMatches.length - 1];
|
|
91905
89896
|
let parentParams = routeMatch ? routeMatch.params : {};
|
|
91906
89897
|
let parentPathname = routeMatch ? routeMatch.pathname : "/";
|
|
@@ -91929,7 +89920,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
91929
89920
|
let segments = pathname.replace(/^\//, "").split("/");
|
|
91930
89921
|
remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
|
|
91931
89922
|
}
|
|
91932
|
-
let matches =
|
|
89923
|
+
let matches = matchRoutes(routes, {
|
|
91933
89924
|
pathname: remainingPathname
|
|
91934
89925
|
});
|
|
91935
89926
|
if (true) {
|
|
@@ -91948,7 +89939,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
91948
89939
|
])
|
|
91949
89940
|
})), parentMatches, dataRouterState, future);
|
|
91950
89941
|
if (locationArg && renderedMatches) {
|
|
91951
|
-
return /* @__PURE__ */
|
|
89942
|
+
return /* @__PURE__ */ React2.createElement(LocationContext.Provider, {
|
|
91952
89943
|
value: {
|
|
91953
89944
|
location: _extends2({
|
|
91954
89945
|
pathname: "/",
|
|
@@ -91979,17 +89970,17 @@ function DefaultErrorComponent() {
|
|
|
91979
89970
|
let devInfo = null;
|
|
91980
89971
|
if (true) {
|
|
91981
89972
|
console.error("Error handled by React Router default ErrorBoundary:", error3);
|
|
91982
|
-
devInfo = /* @__PURE__ */
|
|
89973
|
+
devInfo = /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("p", null, "\uD83D\uDCBF Hey developer \uD83D\uDC4B"), /* @__PURE__ */ React2.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React2.createElement("code", {
|
|
91983
89974
|
style: codeStyles
|
|
91984
|
-
}, "ErrorBoundary"), " or", " ", /* @__PURE__ */
|
|
89975
|
+
}, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React2.createElement("code", {
|
|
91985
89976
|
style: codeStyles
|
|
91986
89977
|
}, "errorElement"), " prop on your route."));
|
|
91987
89978
|
}
|
|
91988
|
-
return /* @__PURE__ */
|
|
89979
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React2.createElement("h3", {
|
|
91989
89980
|
style: {
|
|
91990
89981
|
fontStyle: "italic"
|
|
91991
89982
|
}
|
|
91992
|
-
}, message), stack ? /* @__PURE__ */
|
|
89983
|
+
}, message), stack ? /* @__PURE__ */ React2.createElement("pre", {
|
|
91993
89984
|
style: preStyles
|
|
91994
89985
|
}, stack) : null, devInfo);
|
|
91995
89986
|
}
|
|
@@ -91999,11 +89990,11 @@ function RenderedRoute(_ref) {
|
|
|
91999
89990
|
match,
|
|
92000
89991
|
children
|
|
92001
89992
|
} = _ref;
|
|
92002
|
-
let dataRouterContext =
|
|
89993
|
+
let dataRouterContext = React2.useContext(DataRouterContext);
|
|
92003
89994
|
if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {
|
|
92004
89995
|
dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
|
|
92005
89996
|
}
|
|
92006
|
-
return /* @__PURE__ */
|
|
89997
|
+
return /* @__PURE__ */ React2.createElement(RouteContext.Provider, {
|
|
92007
89998
|
value: routeContext
|
|
92008
89999
|
}, children);
|
|
92009
90000
|
}
|
|
@@ -92091,13 +90082,13 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
|
|
|
92091
90082
|
} else if (shouldRenderHydrateFallback) {
|
|
92092
90083
|
children = hydrateFallbackElement;
|
|
92093
90084
|
} else if (match.route.Component) {
|
|
92094
|
-
children = /* @__PURE__ */
|
|
90085
|
+
children = /* @__PURE__ */ React2.createElement(match.route.Component, null);
|
|
92095
90086
|
} else if (match.route.element) {
|
|
92096
90087
|
children = match.route.element;
|
|
92097
90088
|
} else {
|
|
92098
90089
|
children = outlet;
|
|
92099
90090
|
}
|
|
92100
|
-
return /* @__PURE__ */
|
|
90091
|
+
return /* @__PURE__ */ React2.createElement(RenderedRoute, {
|
|
92101
90092
|
match,
|
|
92102
90093
|
routeContext: {
|
|
92103
90094
|
outlet,
|
|
@@ -92107,7 +90098,7 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
|
|
|
92107
90098
|
children
|
|
92108
90099
|
});
|
|
92109
90100
|
};
|
|
92110
|
-
return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */
|
|
90101
|
+
return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2.createElement(RenderErrorBoundary, {
|
|
92111
90102
|
location: dataRouterState.location,
|
|
92112
90103
|
revalidation: dataRouterState.revalidation,
|
|
92113
90104
|
component: errorElement,
|
|
@@ -92125,17 +90116,17 @@ function getDataRouterConsoleError(hookName) {
|
|
|
92125
90116
|
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
92126
90117
|
}
|
|
92127
90118
|
function useDataRouterContext(hookName) {
|
|
92128
|
-
let ctx =
|
|
90119
|
+
let ctx = React2.useContext(DataRouterContext);
|
|
92129
90120
|
!ctx && invariant2(false, getDataRouterConsoleError(hookName));
|
|
92130
90121
|
return ctx;
|
|
92131
90122
|
}
|
|
92132
90123
|
function useDataRouterState(hookName) {
|
|
92133
|
-
let state =
|
|
90124
|
+
let state = React2.useContext(DataRouterStateContext);
|
|
92134
90125
|
!state && invariant2(false, getDataRouterConsoleError(hookName));
|
|
92135
90126
|
return state;
|
|
92136
90127
|
}
|
|
92137
90128
|
function useRouteContext(hookName) {
|
|
92138
|
-
let route =
|
|
90129
|
+
let route = React2.useContext(RouteContext);
|
|
92139
90130
|
!route && invariant2(false, getDataRouterConsoleError(hookName));
|
|
92140
90131
|
return route;
|
|
92141
90132
|
}
|
|
@@ -92157,11 +90148,11 @@ function useMatches() {
|
|
|
92157
90148
|
matches,
|
|
92158
90149
|
loaderData
|
|
92159
90150
|
} = useDataRouterState(DataRouterStateHook.UseMatches);
|
|
92160
|
-
return
|
|
90151
|
+
return React2.useMemo(() => matches.map((m2) => convertRouteMatchToUiMatch(m2, loaderData)), [matches, loaderData]);
|
|
92161
90152
|
}
|
|
92162
90153
|
function useRouteError() {
|
|
92163
90154
|
var _state$errors;
|
|
92164
|
-
let error3 =
|
|
90155
|
+
let error3 = React2.useContext(RouteErrorContext);
|
|
92165
90156
|
let state = useDataRouterState(DataRouterStateHook.UseRouteError);
|
|
92166
90157
|
let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);
|
|
92167
90158
|
if (error3 !== undefined) {
|
|
@@ -92174,11 +90165,11 @@ function useNavigateStable() {
|
|
|
92174
90165
|
router
|
|
92175
90166
|
} = useDataRouterContext(DataRouterHook.UseNavigateStable);
|
|
92176
90167
|
let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);
|
|
92177
|
-
let activeRef =
|
|
90168
|
+
let activeRef = React2.useRef(false);
|
|
92178
90169
|
useIsomorphicLayoutEffect(() => {
|
|
92179
90170
|
activeRef.current = true;
|
|
92180
90171
|
});
|
|
92181
|
-
let navigate =
|
|
90172
|
+
let navigate = React2.useCallback(function(to, options) {
|
|
92182
90173
|
if (options === undefined) {
|
|
92183
90174
|
options = {};
|
|
92184
90175
|
}
|
|
@@ -92247,7 +90238,7 @@ function Router(_ref5) {
|
|
|
92247
90238
|
} = _ref5;
|
|
92248
90239
|
useInRouterContext() && invariant2(false, "You cannot render a <Router> inside another <Router>." + " You should never have more than one in your app.");
|
|
92249
90240
|
let basename3 = basenameProp.replace(/^\/*/, "/");
|
|
92250
|
-
let navigationContext =
|
|
90241
|
+
let navigationContext = React2.useMemo(() => ({
|
|
92251
90242
|
basename: basename3,
|
|
92252
90243
|
navigator: navigator3,
|
|
92253
90244
|
static: staticProp,
|
|
@@ -92265,7 +90256,7 @@ function Router(_ref5) {
|
|
|
92265
90256
|
state = null,
|
|
92266
90257
|
key = "default"
|
|
92267
90258
|
} = locationProp;
|
|
92268
|
-
let locationContext =
|
|
90259
|
+
let locationContext = React2.useMemo(() => {
|
|
92269
90260
|
let trailingPathname = stripBasename(pathname, basename3);
|
|
92270
90261
|
if (trailingPathname == null) {
|
|
92271
90262
|
return null;
|
|
@@ -92285,9 +90276,9 @@ function Router(_ref5) {
|
|
|
92285
90276
|
if (locationContext == null) {
|
|
92286
90277
|
return null;
|
|
92287
90278
|
}
|
|
92288
|
-
return /* @__PURE__ */
|
|
90279
|
+
return /* @__PURE__ */ React2.createElement(NavigationContext.Provider, {
|
|
92289
90280
|
value: navigationContext
|
|
92290
|
-
}, /* @__PURE__ */
|
|
90281
|
+
}, /* @__PURE__ */ React2.createElement(LocationContext.Provider, {
|
|
92291
90282
|
children,
|
|
92292
90283
|
value: locationContext
|
|
92293
90284
|
}));
|
|
@@ -92297,12 +90288,12 @@ function createRoutesFromChildren(children, parentPath) {
|
|
|
92297
90288
|
parentPath = [];
|
|
92298
90289
|
}
|
|
92299
90290
|
let routes = [];
|
|
92300
|
-
|
|
92301
|
-
if (!/* @__PURE__ */
|
|
90291
|
+
React2.Children.forEach(children, (element, index) => {
|
|
90292
|
+
if (!/* @__PURE__ */ React2.isValidElement(element)) {
|
|
92302
90293
|
return;
|
|
92303
90294
|
}
|
|
92304
90295
|
let treePath = [...parentPath, index];
|
|
92305
|
-
if (element.type ===
|
|
90296
|
+
if (element.type === React2.Fragment) {
|
|
92306
90297
|
routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));
|
|
92307
90298
|
return;
|
|
92308
90299
|
}
|
|
@@ -92342,7 +90333,7 @@ function mapRouteProperties(route) {
|
|
|
92342
90333
|
}
|
|
92343
90334
|
}
|
|
92344
90335
|
Object.assign(updates, {
|
|
92345
|
-
element: /* @__PURE__ */
|
|
90336
|
+
element: /* @__PURE__ */ React2.createElement(route.Component),
|
|
92346
90337
|
Component: undefined
|
|
92347
90338
|
});
|
|
92348
90339
|
}
|
|
@@ -92353,7 +90344,7 @@ function mapRouteProperties(route) {
|
|
|
92353
90344
|
}
|
|
92354
90345
|
}
|
|
92355
90346
|
Object.assign(updates, {
|
|
92356
|
-
hydrateFallbackElement: /* @__PURE__ */
|
|
90347
|
+
hydrateFallbackElement: /* @__PURE__ */ React2.createElement(route.HydrateFallback),
|
|
92357
90348
|
HydrateFallback: undefined
|
|
92358
90349
|
});
|
|
92359
90350
|
}
|
|
@@ -92364,7 +90355,7 @@ function mapRouteProperties(route) {
|
|
|
92364
90355
|
}
|
|
92365
90356
|
}
|
|
92366
90357
|
Object.assign(updates, {
|
|
92367
|
-
errorElement: /* @__PURE__ */
|
|
90358
|
+
errorElement: /* @__PURE__ */ React2.createElement(route.ErrorBoundary),
|
|
92368
90359
|
ErrorBoundary: undefined
|
|
92369
90360
|
});
|
|
92370
90361
|
}
|
|
@@ -92374,27 +90365,27 @@ var DataRouterContext, DataRouterStateContext, AwaitContext, NavigationContext,
|
|
|
92374
90365
|
var init_dist = __esm(() => {
|
|
92375
90366
|
init_router();
|
|
92376
90367
|
init_router();
|
|
92377
|
-
DataRouterContext = /* @__PURE__ */
|
|
90368
|
+
DataRouterContext = /* @__PURE__ */ React2.createContext(null);
|
|
92378
90369
|
if (true) {
|
|
92379
90370
|
DataRouterContext.displayName = "DataRouter";
|
|
92380
90371
|
}
|
|
92381
|
-
DataRouterStateContext = /* @__PURE__ */
|
|
90372
|
+
DataRouterStateContext = /* @__PURE__ */ React2.createContext(null);
|
|
92382
90373
|
if (true) {
|
|
92383
90374
|
DataRouterStateContext.displayName = "DataRouterState";
|
|
92384
90375
|
}
|
|
92385
|
-
AwaitContext = /* @__PURE__ */
|
|
90376
|
+
AwaitContext = /* @__PURE__ */ React2.createContext(null);
|
|
92386
90377
|
if (true) {
|
|
92387
90378
|
AwaitContext.displayName = "Await";
|
|
92388
90379
|
}
|
|
92389
|
-
NavigationContext = /* @__PURE__ */
|
|
90380
|
+
NavigationContext = /* @__PURE__ */ React2.createContext(null);
|
|
92390
90381
|
if (true) {
|
|
92391
90382
|
NavigationContext.displayName = "Navigation";
|
|
92392
90383
|
}
|
|
92393
|
-
LocationContext = /* @__PURE__ */
|
|
90384
|
+
LocationContext = /* @__PURE__ */ React2.createContext(null);
|
|
92394
90385
|
if (true) {
|
|
92395
90386
|
LocationContext.displayName = "Location";
|
|
92396
90387
|
}
|
|
92397
|
-
RouteContext = /* @__PURE__ */
|
|
90388
|
+
RouteContext = /* @__PURE__ */ React2.createContext({
|
|
92398
90389
|
outlet: null,
|
|
92399
90390
|
matches: [],
|
|
92400
90391
|
isDataRoute: false
|
|
@@ -92402,14 +90393,14 @@ var init_dist = __esm(() => {
|
|
|
92402
90393
|
if (true) {
|
|
92403
90394
|
RouteContext.displayName = "Route";
|
|
92404
90395
|
}
|
|
92405
|
-
RouteErrorContext = /* @__PURE__ */
|
|
90396
|
+
RouteErrorContext = /* @__PURE__ */ React2.createContext(null);
|
|
92406
90397
|
if (true) {
|
|
92407
90398
|
RouteErrorContext.displayName = "RouteError";
|
|
92408
90399
|
}
|
|
92409
90400
|
navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
|
|
92410
|
-
OutletContext = /* @__PURE__ */
|
|
92411
|
-
defaultErrorElement = /* @__PURE__ */
|
|
92412
|
-
RenderErrorBoundary = class RenderErrorBoundary extends
|
|
90401
|
+
OutletContext = /* @__PURE__ */ React2.createContext(null);
|
|
90402
|
+
defaultErrorElement = /* @__PURE__ */ React2.createElement(DefaultErrorComponent, null);
|
|
90403
|
+
RenderErrorBoundary = class RenderErrorBoundary extends React2.Component {
|
|
92413
90404
|
constructor(props) {
|
|
92414
90405
|
super(props);
|
|
92415
90406
|
this.state = {
|
|
@@ -92441,9 +90432,9 @@ var init_dist = __esm(() => {
|
|
|
92441
90432
|
console.error("React Router caught the following error during render", error3, errorInfo);
|
|
92442
90433
|
}
|
|
92443
90434
|
render() {
|
|
92444
|
-
return this.state.error !== undefined ? /* @__PURE__ */
|
|
90435
|
+
return this.state.error !== undefined ? /* @__PURE__ */ React2.createElement(RouteContext.Provider, {
|
|
92445
90436
|
value: this.props.routeContext
|
|
92446
|
-
}, /* @__PURE__ */
|
|
90437
|
+
}, /* @__PURE__ */ React2.createElement(RouteErrorContext.Provider, {
|
|
92447
90438
|
value: this.state.error,
|
|
92448
90439
|
children: this.props.component
|
|
92449
90440
|
})) : this.props.children;
|
|
@@ -92470,12 +90461,12 @@ var init_dist = __esm(() => {
|
|
|
92470
90461
|
}(DataRouterStateHook || {});
|
|
92471
90462
|
alreadyWarned$1 = {};
|
|
92472
90463
|
alreadyWarned2 = {};
|
|
92473
|
-
startTransitionImpl =
|
|
90464
|
+
startTransitionImpl = React2[START_TRANSITION];
|
|
92474
90465
|
neverSettledPromise = new Promise(() => {});
|
|
92475
90466
|
});
|
|
92476
90467
|
|
|
92477
90468
|
// ../../node_modules/.pnpm/react-router-dom@6.30.3_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-router-dom/dist/index.js
|
|
92478
|
-
import * as
|
|
90469
|
+
import * as React3 from "react";
|
|
92479
90470
|
import * as ReactDOM from "react-dom";
|
|
92480
90471
|
function _extends3() {
|
|
92481
90472
|
_extends3 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -92694,26 +90685,26 @@ function RouterProvider(_ref) {
|
|
|
92694
90685
|
router,
|
|
92695
90686
|
future
|
|
92696
90687
|
} = _ref;
|
|
92697
|
-
let [state, setStateImpl] =
|
|
92698
|
-
let [pendingState, setPendingState] =
|
|
92699
|
-
let [vtContext, setVtContext] =
|
|
90688
|
+
let [state, setStateImpl] = React3.useState(router.state);
|
|
90689
|
+
let [pendingState, setPendingState] = React3.useState();
|
|
90690
|
+
let [vtContext, setVtContext] = React3.useState({
|
|
92700
90691
|
isTransitioning: false
|
|
92701
90692
|
});
|
|
92702
|
-
let [renderDfd, setRenderDfd] =
|
|
92703
|
-
let [transition, setTransition] =
|
|
92704
|
-
let [interruption, setInterruption] =
|
|
92705
|
-
let fetcherData =
|
|
90693
|
+
let [renderDfd, setRenderDfd] = React3.useState();
|
|
90694
|
+
let [transition, setTransition] = React3.useState();
|
|
90695
|
+
let [interruption, setInterruption] = React3.useState();
|
|
90696
|
+
let fetcherData = React3.useRef(new Map);
|
|
92706
90697
|
let {
|
|
92707
90698
|
v7_startTransition
|
|
92708
90699
|
} = future || {};
|
|
92709
|
-
let optInStartTransition =
|
|
90700
|
+
let optInStartTransition = React3.useCallback((cb) => {
|
|
92710
90701
|
if (v7_startTransition) {
|
|
92711
90702
|
startTransitionSafe(cb);
|
|
92712
90703
|
} else {
|
|
92713
90704
|
cb();
|
|
92714
90705
|
}
|
|
92715
90706
|
}, [v7_startTransition]);
|
|
92716
|
-
let setState =
|
|
90707
|
+
let setState = React3.useCallback((newState, _ref2) => {
|
|
92717
90708
|
let {
|
|
92718
90709
|
deletedFetchers,
|
|
92719
90710
|
flushSync,
|
|
@@ -92781,13 +90772,13 @@ function RouterProvider(_ref) {
|
|
|
92781
90772
|
});
|
|
92782
90773
|
}
|
|
92783
90774
|
}, [router.window, transition, renderDfd, fetcherData, optInStartTransition]);
|
|
92784
|
-
|
|
92785
|
-
|
|
90775
|
+
React3.useLayoutEffect(() => router.subscribe(setState), [router, setState]);
|
|
90776
|
+
React3.useEffect(() => {
|
|
92786
90777
|
if (vtContext.isTransitioning && !vtContext.flushSync) {
|
|
92787
90778
|
setRenderDfd(new Deferred3);
|
|
92788
90779
|
}
|
|
92789
90780
|
}, [vtContext]);
|
|
92790
|
-
|
|
90781
|
+
React3.useEffect(() => {
|
|
92791
90782
|
if (renderDfd && pendingState && router.window) {
|
|
92792
90783
|
let newState = pendingState;
|
|
92793
90784
|
let renderPromise = renderDfd.promise;
|
|
@@ -92806,12 +90797,12 @@ function RouterProvider(_ref) {
|
|
|
92806
90797
|
setTransition(transition2);
|
|
92807
90798
|
}
|
|
92808
90799
|
}, [optInStartTransition, pendingState, renderDfd, router.window]);
|
|
92809
|
-
|
|
90800
|
+
React3.useEffect(() => {
|
|
92810
90801
|
if (renderDfd && pendingState && state.location.key === pendingState.location.key) {
|
|
92811
90802
|
renderDfd.resolve();
|
|
92812
90803
|
}
|
|
92813
90804
|
}, [renderDfd, transition, state.location, pendingState]);
|
|
92814
|
-
|
|
90805
|
+
React3.useEffect(() => {
|
|
92815
90806
|
if (!vtContext.isTransitioning && interruption) {
|
|
92816
90807
|
setPendingState(interruption.state);
|
|
92817
90808
|
setVtContext({
|
|
@@ -92823,10 +90814,10 @@ function RouterProvider(_ref) {
|
|
|
92823
90814
|
setInterruption(undefined);
|
|
92824
90815
|
}
|
|
92825
90816
|
}, [vtContext.isTransitioning, interruption]);
|
|
92826
|
-
|
|
90817
|
+
React3.useEffect(() => {
|
|
92827
90818
|
warning(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead");
|
|
92828
90819
|
}, []);
|
|
92829
|
-
let navigator3 =
|
|
90820
|
+
let navigator3 = React3.useMemo(() => {
|
|
92830
90821
|
return {
|
|
92831
90822
|
createHref: router.createHref,
|
|
92832
90823
|
encodeLocation: router.encodeLocation,
|
|
@@ -92843,31 +90834,31 @@ function RouterProvider(_ref) {
|
|
|
92843
90834
|
};
|
|
92844
90835
|
}, [router]);
|
|
92845
90836
|
let basename3 = router.basename || "/";
|
|
92846
|
-
let dataRouterContext =
|
|
90837
|
+
let dataRouterContext = React3.useMemo(() => ({
|
|
92847
90838
|
router,
|
|
92848
90839
|
navigator: navigator3,
|
|
92849
90840
|
static: false,
|
|
92850
90841
|
basename: basename3
|
|
92851
90842
|
}), [router, navigator3, basename3]);
|
|
92852
|
-
let routerFuture =
|
|
90843
|
+
let routerFuture = React3.useMemo(() => ({
|
|
92853
90844
|
v7_relativeSplatPath: router.future.v7_relativeSplatPath
|
|
92854
90845
|
}), [router.future.v7_relativeSplatPath]);
|
|
92855
|
-
|
|
92856
|
-
return /* @__PURE__ */
|
|
90846
|
+
React3.useEffect(() => logV6DeprecationWarnings(future, router.future), [future, router.future]);
|
|
90847
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(DataRouterContext.Provider, {
|
|
92857
90848
|
value: dataRouterContext
|
|
92858
|
-
}, /* @__PURE__ */
|
|
90849
|
+
}, /* @__PURE__ */ React3.createElement(DataRouterStateContext.Provider, {
|
|
92859
90850
|
value: state
|
|
92860
|
-
}, /* @__PURE__ */
|
|
90851
|
+
}, /* @__PURE__ */ React3.createElement(FetchersContext.Provider, {
|
|
92861
90852
|
value: fetcherData.current
|
|
92862
|
-
}, /* @__PURE__ */
|
|
90853
|
+
}, /* @__PURE__ */ React3.createElement(ViewTransitionContext.Provider, {
|
|
92863
90854
|
value: vtContext
|
|
92864
|
-
}, /* @__PURE__ */
|
|
90855
|
+
}, /* @__PURE__ */ React3.createElement(Router, {
|
|
92865
90856
|
basename: basename3,
|
|
92866
90857
|
location: state.location,
|
|
92867
90858
|
navigationType: state.historyAction,
|
|
92868
90859
|
navigator: navigator3,
|
|
92869
90860
|
future: routerFuture
|
|
92870
|
-
}, state.initialized || router.future.v7_partialHydration ? /* @__PURE__ */
|
|
90861
|
+
}, state.initialized || router.future.v7_partialHydration ? /* @__PURE__ */ React3.createElement(MemoizedDataRoutes, {
|
|
92871
90862
|
routes: router.routes,
|
|
92872
90863
|
future: router.future,
|
|
92873
90864
|
state
|
|
@@ -92888,19 +90879,19 @@ function HistoryRouter(_ref6) {
|
|
|
92888
90879
|
future,
|
|
92889
90880
|
history
|
|
92890
90881
|
} = _ref6;
|
|
92891
|
-
let [state, setStateImpl] =
|
|
90882
|
+
let [state, setStateImpl] = React3.useState({
|
|
92892
90883
|
action: history.action,
|
|
92893
90884
|
location: history.location
|
|
92894
90885
|
});
|
|
92895
90886
|
let {
|
|
92896
90887
|
v7_startTransition
|
|
92897
90888
|
} = future || {};
|
|
92898
|
-
let setState =
|
|
90889
|
+
let setState = React3.useCallback((newState) => {
|
|
92899
90890
|
v7_startTransition && startTransitionImpl2 ? startTransitionImpl2(() => setStateImpl(newState)) : setStateImpl(newState);
|
|
92900
90891
|
}, [setStateImpl, v7_startTransition]);
|
|
92901
|
-
|
|
92902
|
-
|
|
92903
|
-
return /* @__PURE__ */
|
|
90892
|
+
React3.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
90893
|
+
React3.useEffect(() => logV6DeprecationWarnings(future), [future]);
|
|
90894
|
+
return /* @__PURE__ */ React3.createElement(Router, {
|
|
92904
90895
|
basename: basename3,
|
|
92905
90896
|
children,
|
|
92906
90897
|
location: state.location,
|
|
@@ -92924,12 +90915,12 @@ function getDataRouterConsoleError2(hookName) {
|
|
|
92924
90915
|
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
92925
90916
|
}
|
|
92926
90917
|
function useDataRouterContext2(hookName) {
|
|
92927
|
-
let ctx =
|
|
90918
|
+
let ctx = React3.useContext(DataRouterContext);
|
|
92928
90919
|
!ctx && invariant2(false, getDataRouterConsoleError2(hookName));
|
|
92929
90920
|
return ctx;
|
|
92930
90921
|
}
|
|
92931
90922
|
function useDataRouterState2(hookName) {
|
|
92932
|
-
let state =
|
|
90923
|
+
let state = React3.useContext(DataRouterStateContext);
|
|
92933
90924
|
!state && invariant2(false, getDataRouterConsoleError2(hookName));
|
|
92934
90925
|
return state;
|
|
92935
90926
|
}
|
|
@@ -92947,7 +90938,7 @@ function useLinkClickHandler(to, _temp) {
|
|
|
92947
90938
|
let path = useResolvedPath(to, {
|
|
92948
90939
|
relative: relative3
|
|
92949
90940
|
});
|
|
92950
|
-
return
|
|
90941
|
+
return React3.useCallback((event) => {
|
|
92951
90942
|
if (shouldProcessLinkClick(event, target)) {
|
|
92952
90943
|
event.preventDefault();
|
|
92953
90944
|
let replace2 = replaceProp !== undefined ? replaceProp : createPath(location2) === createPath(path);
|
|
@@ -92972,9 +90963,9 @@ function useSubmit() {
|
|
|
92972
90963
|
} = useDataRouterContext2(DataRouterHook2.UseSubmit);
|
|
92973
90964
|
let {
|
|
92974
90965
|
basename: basename3
|
|
92975
|
-
} =
|
|
90966
|
+
} = React3.useContext(NavigationContext);
|
|
92976
90967
|
let currentRouteId = useRouteId();
|
|
92977
|
-
return
|
|
90968
|
+
return React3.useCallback(function(target, options) {
|
|
92978
90969
|
if (options === undefined) {
|
|
92979
90970
|
options = {};
|
|
92980
90971
|
}
|
|
@@ -93018,8 +91009,8 @@ function useFormAction(action, _temp2) {
|
|
|
93018
91009
|
} = _temp2 === undefined ? {} : _temp2;
|
|
93019
91010
|
let {
|
|
93020
91011
|
basename: basename3
|
|
93021
|
-
} =
|
|
93022
|
-
let routeContext =
|
|
91012
|
+
} = React3.useContext(NavigationContext);
|
|
91013
|
+
let routeContext = React3.useContext(RouteContext);
|
|
93023
91014
|
!routeContext && invariant2(false, "useFormAction must be used inside a RouteContext");
|
|
93024
91015
|
let [match] = routeContext.matches.slice(-1);
|
|
93025
91016
|
let path = _extends3({}, useResolvedPath(action ? action : ".", {
|
|
@@ -93060,17 +91051,17 @@ function useScrollRestoration(_temp4) {
|
|
|
93060
91051
|
} = useDataRouterState2(DataRouterStateHook2.UseScrollRestoration);
|
|
93061
91052
|
let {
|
|
93062
91053
|
basename: basename3
|
|
93063
|
-
} =
|
|
91054
|
+
} = React3.useContext(NavigationContext);
|
|
93064
91055
|
let location2 = useLocation();
|
|
93065
91056
|
let matches = useMatches();
|
|
93066
91057
|
let navigation = useNavigation();
|
|
93067
|
-
|
|
91058
|
+
React3.useEffect(() => {
|
|
93068
91059
|
window.history.scrollRestoration = "manual";
|
|
93069
91060
|
return () => {
|
|
93070
91061
|
window.history.scrollRestoration = "auto";
|
|
93071
91062
|
};
|
|
93072
91063
|
}, []);
|
|
93073
|
-
usePageHide(
|
|
91064
|
+
usePageHide(React3.useCallback(() => {
|
|
93074
91065
|
if (navigation.state === "idle") {
|
|
93075
91066
|
let key = (getKey ? getKey(location2, matches) : null) || location2.key;
|
|
93076
91067
|
savedScrollPositions[key] = window.scrollY;
|
|
@@ -93083,7 +91074,7 @@ function useScrollRestoration(_temp4) {
|
|
|
93083
91074
|
window.history.scrollRestoration = "auto";
|
|
93084
91075
|
}, [storageKey, getKey, navigation.state, location2, matches]));
|
|
93085
91076
|
if (typeof document !== "undefined") {
|
|
93086
|
-
|
|
91077
|
+
React3.useLayoutEffect(() => {
|
|
93087
91078
|
try {
|
|
93088
91079
|
let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);
|
|
93089
91080
|
if (sessionPositions) {
|
|
@@ -93091,14 +91082,14 @@ function useScrollRestoration(_temp4) {
|
|
|
93091
91082
|
}
|
|
93092
91083
|
} catch (e4) {}
|
|
93093
91084
|
}, [storageKey]);
|
|
93094
|
-
|
|
91085
|
+
React3.useLayoutEffect(() => {
|
|
93095
91086
|
let getKeyWithoutBasename = getKey && basename3 !== "/" ? (location3, matches2) => getKey(_extends3({}, location3, {
|
|
93096
91087
|
pathname: stripBasename(location3.pathname, basename3) || location3.pathname
|
|
93097
91088
|
}), matches2) : getKey;
|
|
93098
91089
|
let disableScrollRestoration = router == null ? undefined : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename);
|
|
93099
91090
|
return () => disableScrollRestoration && disableScrollRestoration();
|
|
93100
91091
|
}, [router, basename3, getKey]);
|
|
93101
|
-
|
|
91092
|
+
React3.useLayoutEffect(() => {
|
|
93102
91093
|
if (restoreScrollPosition === false) {
|
|
93103
91094
|
return;
|
|
93104
91095
|
}
|
|
@@ -93124,7 +91115,7 @@ function usePageHide(callback, options) {
|
|
|
93124
91115
|
let {
|
|
93125
91116
|
capture
|
|
93126
91117
|
} = options || {};
|
|
93127
|
-
|
|
91118
|
+
React3.useEffect(() => {
|
|
93128
91119
|
let opts = capture != null ? {
|
|
93129
91120
|
capture
|
|
93130
91121
|
} : undefined;
|
|
@@ -93138,7 +91129,7 @@ function useViewTransitionState(to, opts) {
|
|
|
93138
91129
|
if (opts === undefined) {
|
|
93139
91130
|
opts = {};
|
|
93140
91131
|
}
|
|
93141
|
-
let vtContext =
|
|
91132
|
+
let vtContext = React3.useContext(ViewTransitionContext);
|
|
93142
91133
|
!(vtContext != null) && invariant2(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?");
|
|
93143
91134
|
let {
|
|
93144
91135
|
basename: basename3
|
|
@@ -93165,26 +91156,26 @@ var init_dist2 = __esm(() => {
|
|
|
93165
91156
|
try {
|
|
93166
91157
|
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
93167
91158
|
} catch (e4) {}
|
|
93168
|
-
ViewTransitionContext = /* @__PURE__ */
|
|
91159
|
+
ViewTransitionContext = /* @__PURE__ */ React3.createContext({
|
|
93169
91160
|
isTransitioning: false
|
|
93170
91161
|
});
|
|
93171
91162
|
if (true) {
|
|
93172
91163
|
ViewTransitionContext.displayName = "ViewTransition";
|
|
93173
91164
|
}
|
|
93174
|
-
FetchersContext = /* @__PURE__ */
|
|
91165
|
+
FetchersContext = /* @__PURE__ */ React3.createContext(new Map);
|
|
93175
91166
|
if (true) {
|
|
93176
91167
|
FetchersContext.displayName = "Fetchers";
|
|
93177
91168
|
}
|
|
93178
|
-
startTransitionImpl2 =
|
|
91169
|
+
startTransitionImpl2 = React3[START_TRANSITION2];
|
|
93179
91170
|
flushSyncImpl = ReactDOM[FLUSH_SYNC];
|
|
93180
|
-
useIdImpl =
|
|
93181
|
-
MemoizedDataRoutes = /* @__PURE__ */
|
|
91171
|
+
useIdImpl = React3[USE_ID];
|
|
91172
|
+
MemoizedDataRoutes = /* @__PURE__ */ React3.memo(DataRoutes);
|
|
93182
91173
|
if (true) {
|
|
93183
91174
|
HistoryRouter.displayName = "unstable_HistoryRouter";
|
|
93184
91175
|
}
|
|
93185
91176
|
isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
93186
91177
|
ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
93187
|
-
Link = /* @__PURE__ */
|
|
91178
|
+
Link = /* @__PURE__ */ React3.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
93188
91179
|
let {
|
|
93189
91180
|
onClick,
|
|
93190
91181
|
relative: relative3,
|
|
@@ -93198,7 +91189,7 @@ var init_dist2 = __esm(() => {
|
|
|
93198
91189
|
} = _ref7, rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
93199
91190
|
let {
|
|
93200
91191
|
basename: basename3
|
|
93201
|
-
} =
|
|
91192
|
+
} = React3.useContext(NavigationContext);
|
|
93202
91193
|
let absoluteHref;
|
|
93203
91194
|
let isExternal = false;
|
|
93204
91195
|
if (typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to)) {
|
|
@@ -93236,7 +91227,7 @@ var init_dist2 = __esm(() => {
|
|
|
93236
91227
|
internalOnClick(event);
|
|
93237
91228
|
}
|
|
93238
91229
|
}
|
|
93239
|
-
return /* @__PURE__ */
|
|
91230
|
+
return /* @__PURE__ */ React3.createElement("a", _extends3({}, rest, {
|
|
93240
91231
|
href: absoluteHref || href,
|
|
93241
91232
|
onClick: isExternal || reloadDocument ? onClick : handleClick2,
|
|
93242
91233
|
ref,
|
|
@@ -93246,7 +91237,7 @@ var init_dist2 = __esm(() => {
|
|
|
93246
91237
|
if (true) {
|
|
93247
91238
|
Link.displayName = "Link";
|
|
93248
91239
|
}
|
|
93249
|
-
NavLink = /* @__PURE__ */
|
|
91240
|
+
NavLink = /* @__PURE__ */ React3.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
93250
91241
|
let {
|
|
93251
91242
|
"aria-current": ariaCurrentProp = "page",
|
|
93252
91243
|
caseSensitive = false,
|
|
@@ -93261,11 +91252,11 @@ var init_dist2 = __esm(() => {
|
|
|
93261
91252
|
relative: rest.relative
|
|
93262
91253
|
});
|
|
93263
91254
|
let location2 = useLocation();
|
|
93264
|
-
let routerState =
|
|
91255
|
+
let routerState = React3.useContext(DataRouterStateContext);
|
|
93265
91256
|
let {
|
|
93266
91257
|
navigator: navigator3,
|
|
93267
91258
|
basename: basename3
|
|
93268
|
-
} =
|
|
91259
|
+
} = React3.useContext(NavigationContext);
|
|
93269
91260
|
let isTransitioning = routerState != null && useViewTransitionState(path) && viewTransition === true;
|
|
93270
91261
|
let toPathname = navigator3.encodeLocation ? navigator3.encodeLocation(path).pathname : path.pathname;
|
|
93271
91262
|
let locationPathname = location2.pathname;
|
|
@@ -93294,7 +91285,7 @@ var init_dist2 = __esm(() => {
|
|
|
93294
91285
|
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
93295
91286
|
}
|
|
93296
91287
|
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
93297
|
-
return /* @__PURE__ */
|
|
91288
|
+
return /* @__PURE__ */ React3.createElement(Link, _extends3({}, rest, {
|
|
93298
91289
|
"aria-current": ariaCurrent,
|
|
93299
91290
|
className,
|
|
93300
91291
|
ref,
|
|
@@ -93306,7 +91297,7 @@ var init_dist2 = __esm(() => {
|
|
|
93306
91297
|
if (true) {
|
|
93307
91298
|
NavLink.displayName = "NavLink";
|
|
93308
91299
|
}
|
|
93309
|
-
Form2 = /* @__PURE__ */
|
|
91300
|
+
Form2 = /* @__PURE__ */ React3.forwardRef((_ref9, forwardedRef) => {
|
|
93310
91301
|
let {
|
|
93311
91302
|
fetcherKey,
|
|
93312
91303
|
navigate,
|
|
@@ -93343,7 +91334,7 @@ var init_dist2 = __esm(() => {
|
|
|
93343
91334
|
viewTransition
|
|
93344
91335
|
});
|
|
93345
91336
|
};
|
|
93346
|
-
return /* @__PURE__ */
|
|
91337
|
+
return /* @__PURE__ */ React3.createElement("form", _extends3({
|
|
93347
91338
|
ref: forwardedRef,
|
|
93348
91339
|
method: formMethod,
|
|
93349
91340
|
action: formAction,
|
|
@@ -93373,7 +91364,7 @@ var init_dist2 = __esm(() => {
|
|
|
93373
91364
|
|
|
93374
91365
|
// src/hooks/useInitSentry.ts
|
|
93375
91366
|
import { childLogger } from "document-drive";
|
|
93376
|
-
import
|
|
91367
|
+
import React4, { useEffect as useEffect11 } from "react";
|
|
93377
91368
|
async function getSentry() {
|
|
93378
91369
|
return await Promise.resolve().then(() => (init_esm6(), exports_esm));
|
|
93379
91370
|
}
|
|
@@ -93388,11 +91379,11 @@ async function initSentry() {
|
|
|
93388
91379
|
];
|
|
93389
91380
|
if (connectConfig.sentry.tracing) {
|
|
93390
91381
|
integrations.push(Sentry.reactRouterV6BrowserTracingIntegration({
|
|
93391
|
-
useEffect:
|
|
91382
|
+
useEffect: React4.useEffect,
|
|
93392
91383
|
useLocation,
|
|
93393
91384
|
useNavigationType,
|
|
93394
91385
|
createRoutesFromChildren,
|
|
93395
|
-
matchRoutes
|
|
91386
|
+
matchRoutes
|
|
93396
91387
|
}));
|
|
93397
91388
|
}
|
|
93398
91389
|
Sentry.init({
|
|
@@ -93887,7 +91878,7 @@ var init_package = __esm(() => {
|
|
|
93887
91878
|
package_default = {
|
|
93888
91879
|
name: "@powerhousedao/connect",
|
|
93889
91880
|
productName: "Powerhouse-Connect",
|
|
93890
|
-
version: "6.0.0-dev.
|
|
91881
|
+
version: "6.0.0-dev.96",
|
|
93891
91882
|
description: "Powerhouse Connect",
|
|
93892
91883
|
main: "dist/index.html",
|
|
93893
91884
|
type: "module",
|
|
@@ -94016,8 +92007,8 @@ var isMac, urlBranchMap, getGithubLinkFromUrl = () => {
|
|
|
94016
92007
|
}
|
|
94017
92008
|
const result = await fetch(link);
|
|
94018
92009
|
const data = await result.json();
|
|
94019
|
-
const { version
|
|
94020
|
-
return
|
|
92010
|
+
const { version } = data;
|
|
92011
|
+
return version;
|
|
94021
92012
|
}, isLatestVersion = async () => {
|
|
94022
92013
|
const currentVersion = package_default.version;
|
|
94023
92014
|
const deployed = await fetchLatestVersion();
|
|
@@ -94030,7 +92021,7 @@ var isMac, urlBranchMap, getGithubLinkFromUrl = () => {
|
|
|
94030
92021
|
}
|
|
94031
92022
|
return null;
|
|
94032
92023
|
};
|
|
94033
|
-
var
|
|
92024
|
+
var init_utils13 = __esm(() => {
|
|
94034
92025
|
init_package_json();
|
|
94035
92026
|
isMac = window.navigator.appVersion.includes("Mac");
|
|
94036
92027
|
urlBranchMap = {
|
|
@@ -94054,7 +92045,7 @@ var init_hooks = __esm(() => {
|
|
|
94054
92045
|
init_useNodeActions();
|
|
94055
92046
|
init_useUndoRedoShortcuts();
|
|
94056
92047
|
init_useWindowSize();
|
|
94057
|
-
|
|
92048
|
+
init_utils13();
|
|
94058
92049
|
});
|
|
94059
92050
|
|
|
94060
92051
|
// src/context/processor-manager.old.tsx
|