added drag and drop for reordering questions/activities in discussion guide edit mode
This commit is contained in:
parent
3e73259ff3
commit
fbef4f42f6
143 changed files with 34691 additions and 9040 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
14
.env
14
.env
|
|
@ -1,5 +1,13 @@
|
|||
# Frontend URL
|
||||
# Production Environment Configuration
|
||||
# Frontend URL (production server)
|
||||
VITE_FRONTEND_BASE_URL=https://ai-sandbox.oliver.solutions/semblance
|
||||
|
||||
# Backend API URL
|
||||
VITE_API_BASE_URL=https://ai-sandbox.oliver.solutions/semblance_back/api
|
||||
# Backend API URL (production server)
|
||||
VITE_API_BASE_URL=https://ai-sandbox.oliver.solutions/semblance_back/api
|
||||
|
||||
# WebSocket path (production server)
|
||||
VITE_WEBSOCKET_PATH=/semblance_back/socket.io/
|
||||
|
||||
# MSAL Authentication (production server)
|
||||
VITE_MSAL_REDIRECT_URI=https://ai-sandbox.oliver.solutions/semblance
|
||||
VITE_MSAL_POST_LOGOUT_REDIRECT_URI=https://ai-sandbox.oliver.solutions/semblance
|
||||
13
.env.development
Normal file
13
.env.development
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Development Environment Configuration
|
||||
# Frontend URL (local development)
|
||||
VITE_FRONTEND_BASE_URL=http://localhost:5173
|
||||
|
||||
# Backend API URL (local development - no base path)
|
||||
VITE_API_BASE_URL=/api
|
||||
|
||||
# WebSocket path (local development - no base path)
|
||||
VITE_WEBSOCKET_PATH=/socket.io/
|
||||
|
||||
# MSAL Authentication (local development)
|
||||
VITE_MSAL_REDIRECT_URI=http://localhost:5173/
|
||||
VITE_MSAL_POST_LOGOUT_REDIRECT_URI=http://localhost:5173/
|
||||
13
.env.production
Normal file
13
.env.production
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Production Environment Configuration
|
||||
# Frontend URL (production server)
|
||||
VITE_FRONTEND_BASE_URL=https://ai-sandbox.oliver.solutions/semblance
|
||||
|
||||
# Backend API URL (production server)
|
||||
VITE_API_BASE_URL=https://ai-sandbox.oliver.solutions/semblance_back/api
|
||||
|
||||
# WebSocket path (production server)
|
||||
VITE_WEBSOCKET_PATH=/semblance_back/socket.io/
|
||||
|
||||
# MSAL Authentication (production server)
|
||||
VITE_MSAL_REDIRECT_URI=https://ai-sandbox.oliver.solutions/semblance
|
||||
VITE_MSAL_POST_LOGOUT_REDIRECT_URI=https://ai-sandbox.oliver.solutions/semblance
|
||||
35
CLAUDE.md
35
CLAUDE.md
|
|
@ -9,7 +9,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||
- **Preview**: `npm run preview`
|
||||
- **Backend**: `cd backend && python run.py`
|
||||
|
||||
**Note**: This project is hosted on a server. Always use `npm run build` instead of `npm run dev` for testing changes.
|
||||
**Note**: This project supports both local development and production deployment. See Environment Configuration section below.
|
||||
|
||||
## Backend Commands
|
||||
- **Start Backend**: `python run.py` (from backend/ directory)
|
||||
|
|
@ -68,8 +68,37 @@ python -c "from app import create_app; app = create_app()" # Test app creation
|
|||
- **Types**: `/src/types/` - TypeScript type definitions
|
||||
- **Contexts**: `/src/contexts/` - React context providers
|
||||
|
||||
## Environment
|
||||
- **Base Path**: Uses `/semblance/` in production (configured in vite.config.ts)
|
||||
## Environment Configuration
|
||||
|
||||
This application supports both local development and production deployment through environment-specific configuration files:
|
||||
|
||||
### Environment Files
|
||||
- **`.env.development`**: Local development configuration
|
||||
- **`.env.production`**: Production server configuration
|
||||
- **`.env`**: Active configuration (copy from appropriate environment file)
|
||||
|
||||
### Development vs Production
|
||||
The application automatically adapts based on environment variables:
|
||||
|
||||
**Development Mode:**
|
||||
- Base path: `/` (root)
|
||||
- API base: `/api`
|
||||
- WebSocket path: `/socket.io/`
|
||||
- MSAL redirect: `http://localhost:5173/`
|
||||
|
||||
**Production Mode:**
|
||||
- Base path: `/semblance/`
|
||||
- API base: `https://ai-sandbox.oliver.solutions/semblance_back/api`
|
||||
- WebSocket path: `/semblance_back/socket.io/`
|
||||
- MSAL redirect: `https://ai-sandbox.oliver.solutions/semblance`
|
||||
|
||||
### Setup Instructions
|
||||
1. **For local development**: Copy `.env.development` to `.env`
|
||||
2. **For production**: Copy `.env.production` to `.env`
|
||||
3. The build system will use the appropriate configuration
|
||||
|
||||
### Technical Details
|
||||
- **Base Path**: Configured in vite.config.ts based on `NODE_ENV`
|
||||
- **Backend Port**: 5137 (Hypercorn ASGI server)
|
||||
- **Frontend Dev Port**: 5173
|
||||
- **Temp Directories**: Backend creates `/backend/temp/` for file handling
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
# MongoDB Configuration - these are the MongoDB admin credentials, not app credentials
|
||||
MONGO_URI=mongodb://localhost:27017/semblance_db
|
||||
MONGO_URI=mongodb://localhost:27020/semblance_db
|
||||
MONGO_PORT=27020
|
||||
|
||||
# If you need to connect to MongoDB with authentication, uncomment and set these values
|
||||
# MONGO_USER=admin
|
||||
|
|
@ -9,4 +10,6 @@ MONGO_URI=mongodb://localhost:27017/semblance_db
|
|||
FLASK_APP=run.py
|
||||
FLASK_DEBUG=1
|
||||
# FLASK_ENV is deprecated in Flask 2.x, using FLASK_DEBUG instead
|
||||
SECRET_KEY=your-secret-key-for-sessions-and-tokens
|
||||
SECRET_KEY=your-secret-key-for-sessions-and-tokens
|
||||
|
||||
OPENAI_API_KEY=REDACTED_OPENAI_KEY
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -799,8 +799,27 @@ class FocusGroup:
|
|||
# Insert the mode event
|
||||
result = db.focus_group_mode_events.insert_one(mode_event)
|
||||
|
||||
if result.inserted_id:
|
||||
mode_event_id = str(result.inserted_id)
|
||||
mode_event["_id"] = mode_event_id
|
||||
|
||||
# Emit WebSocket event for new mode event
|
||||
mode_event_for_websocket = {
|
||||
'id': mode_event_id,
|
||||
'focus_group_id': focus_group_id,
|
||||
'event_type': event_type,
|
||||
'timestamp': mode_event["timestamp"].isoformat(),
|
||||
'user_id': user_id,
|
||||
'created_at': mode_event["created_at"].isoformat()
|
||||
}
|
||||
print(f"🔔 EMITTING WEBSOCKET EVENT: mode_event_update for focus group {focus_group_id}")
|
||||
print(f"🔔 Mode event data: event_type={event_type}, timestamp={mode_event['timestamp'].isoformat()}")
|
||||
emit_websocket_event('mode_event_update', focus_group_id, mode_event_for_websocket)
|
||||
|
||||
return mode_event_id
|
||||
|
||||
# Return the id of the new mode event
|
||||
return str(result.inserted_id)
|
||||
return None
|
||||
except Exception as e:
|
||||
print(f"Error adding mode event to focus group {focus_group_id}: {e}")
|
||||
print(traceback.format_exc())
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
dist/assets/index-C-lVT2hb.css
vendored
Normal file
1
dist/assets/index-C-lVT2hb.css
vendored
Normal file
File diff suppressed because one or more lines are too long
715
dist/assets/index-KiCc6bNq.js
vendored
715
dist/assets/index-KiCc6bNq.js
vendored
File diff suppressed because one or more lines are too long
729
dist/assets/index-NobeZ-BW.js
vendored
Normal file
729
dist/assets/index-NobeZ-BW.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-VgChhb1B.css
vendored
1
dist/assets/index-VgChhb1B.css
vendored
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
|
|
@ -7,8 +7,8 @@
|
|||
<meta name="description" content="Lovable Generated Project" />
|
||||
<meta name="author" content="Lovable" />
|
||||
<meta property="og:image" content="/og-image.png" />
|
||||
<script type="module" crossorigin src="/semblance/assets/index-KiCc6bNq.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/semblance/assets/index-VgChhb1B.css">
|
||||
<script type="module" crossorigin src="/semblance/assets/index-NobeZ-BW.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/semblance/assets/index-C-lVT2hb.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
14
node_modules/.package-lock.json
generated
vendored
14
node_modules/.package-lock.json
generated
vendored
|
|
@ -139,6 +139,20 @@
|
|||
"react-dom": ">=16.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@dnd-kit/modifiers": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@dnd-kit/modifiers/-/modifiers-9.0.0.tgz",
|
||||
"integrity": "sha512-ybiLc66qRGuZoC20wdSSG6pDXFikui/dCNGthxv4Ndy8ylErY0N3KVxY2bgo7AWwIbxDmXDg3ylAFmnrjcbVvw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dnd-kit/core": "^6.3.0",
|
||||
"react": ">=16.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@dnd-kit/sortable": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@dnd-kit/sortable/-/sortable-10.0.0.tgz",
|
||||
|
|
|
|||
126
node_modules/.vite/deps/@azure_msal-browser.js
generated
vendored
Normal file
126
node_modules/.vite/deps/@azure_msal-browser.js
generated
vendored
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
import {
|
||||
AccountEntity,
|
||||
ApiId,
|
||||
AuthError,
|
||||
AuthErrorCodes_exports,
|
||||
AuthErrorMessage,
|
||||
AuthenticationHeaderParser,
|
||||
AuthenticationScheme,
|
||||
AzureCloudInstance,
|
||||
BrowserAuthError,
|
||||
BrowserAuthErrorCodes_exports,
|
||||
BrowserAuthErrorMessage,
|
||||
BrowserCacheLocation,
|
||||
BrowserConfigurationAuthError,
|
||||
BrowserConfigurationAuthErrorCodes_exports,
|
||||
BrowserConfigurationAuthErrorMessage,
|
||||
BrowserPerformanceClient,
|
||||
BrowserUtils_exports,
|
||||
CacheLookupPolicy,
|
||||
ClientAuthError,
|
||||
ClientAuthErrorCodes_exports,
|
||||
ClientAuthErrorMessage,
|
||||
ClientConfigurationError,
|
||||
ClientConfigurationErrorCodes_exports,
|
||||
ClientConfigurationErrorMessage,
|
||||
DEFAULT_IFRAME_TIMEOUT_MS,
|
||||
EventHandler,
|
||||
EventMessageUtils,
|
||||
EventType,
|
||||
InteractionRequiredAuthError,
|
||||
InteractionRequiredAuthErrorCodes_exports,
|
||||
InteractionRequiredAuthErrorMessage,
|
||||
InteractionStatus,
|
||||
InteractionType,
|
||||
JsonWebTokenTypes,
|
||||
LocalStorage,
|
||||
LogLevel,
|
||||
Logger,
|
||||
MemoryStorage,
|
||||
NavigationClient,
|
||||
OIDC_DEFAULT_SCOPES,
|
||||
PerformanceEvents,
|
||||
PromptValue,
|
||||
ProtocolMode,
|
||||
PublicClientApplication,
|
||||
PublicClientNext,
|
||||
ServerError,
|
||||
ServerResponseType,
|
||||
SessionStorage,
|
||||
SignedHttpRequest,
|
||||
StringUtils,
|
||||
StubPerformanceClient,
|
||||
UrlString,
|
||||
WrapperSKU,
|
||||
createNestablePublicClientApplication,
|
||||
createStandardPublicClientApplication,
|
||||
isPlatformBrokerAvailable,
|
||||
stubbedPublicClientApplication,
|
||||
version
|
||||
} from "./chunk-Z3MJAI5R.js";
|
||||
import {
|
||||
BrowserPerformanceMeasurement
|
||||
} from "./chunk-6NKFQNRI.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
export {
|
||||
AccountEntity,
|
||||
ApiId,
|
||||
AuthError,
|
||||
AuthErrorCodes_exports as AuthErrorCodes,
|
||||
AuthErrorMessage,
|
||||
AuthenticationHeaderParser,
|
||||
AuthenticationScheme,
|
||||
AzureCloudInstance,
|
||||
BrowserAuthError,
|
||||
BrowserAuthErrorCodes_exports as BrowserAuthErrorCodes,
|
||||
BrowserAuthErrorMessage,
|
||||
BrowserCacheLocation,
|
||||
BrowserConfigurationAuthError,
|
||||
BrowserConfigurationAuthErrorCodes_exports as BrowserConfigurationAuthErrorCodes,
|
||||
BrowserConfigurationAuthErrorMessage,
|
||||
BrowserPerformanceClient,
|
||||
BrowserPerformanceMeasurement,
|
||||
BrowserUtils_exports as BrowserUtils,
|
||||
CacheLookupPolicy,
|
||||
ClientAuthError,
|
||||
ClientAuthErrorCodes_exports as ClientAuthErrorCodes,
|
||||
ClientAuthErrorMessage,
|
||||
ClientConfigurationError,
|
||||
ClientConfigurationErrorCodes_exports as ClientConfigurationErrorCodes,
|
||||
ClientConfigurationErrorMessage,
|
||||
DEFAULT_IFRAME_TIMEOUT_MS,
|
||||
EventHandler,
|
||||
EventMessageUtils,
|
||||
EventType,
|
||||
InteractionRequiredAuthError,
|
||||
InteractionRequiredAuthErrorCodes_exports as InteractionRequiredAuthErrorCodes,
|
||||
InteractionRequiredAuthErrorMessage,
|
||||
InteractionStatus,
|
||||
InteractionType,
|
||||
JsonWebTokenTypes,
|
||||
LocalStorage,
|
||||
LogLevel,
|
||||
Logger,
|
||||
MemoryStorage,
|
||||
NavigationClient,
|
||||
OIDC_DEFAULT_SCOPES,
|
||||
PerformanceEvents,
|
||||
PromptValue,
|
||||
ProtocolMode,
|
||||
PublicClientApplication,
|
||||
PublicClientNext,
|
||||
ServerError,
|
||||
ServerResponseType,
|
||||
SessionStorage,
|
||||
SignedHttpRequest,
|
||||
StringUtils,
|
||||
StubPerformanceClient,
|
||||
UrlString,
|
||||
WrapperSKU,
|
||||
createNestablePublicClientApplication,
|
||||
createStandardPublicClientApplication,
|
||||
isPlatformBrokerAvailable,
|
||||
stubbedPublicClientApplication,
|
||||
version
|
||||
};
|
||||
//# sourceMappingURL=@azure_msal-browser.js.map
|
||||
7
node_modules/.vite/deps/@azure_msal-browser.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@azure_msal-browser.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
561
node_modules/.vite/deps/@azure_msal-react.js
generated
vendored
Normal file
561
node_modules/.vite/deps/@azure_msal-react.js
generated
vendored
Normal file
|
|
@ -0,0 +1,561 @@
|
|||
import {
|
||||
AccountEntity,
|
||||
AuthError,
|
||||
EventMessageUtils,
|
||||
EventType,
|
||||
InteractionRequiredAuthError,
|
||||
InteractionStatus,
|
||||
InteractionType,
|
||||
Logger,
|
||||
OIDC_DEFAULT_SCOPES,
|
||||
WrapperSKU,
|
||||
stubbedPublicClientApplication
|
||||
} from "./chunk-Z3MJAI5R.js";
|
||||
import "./chunk-6NKFQNRI.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@azure/msal-react/dist/MsalContext.js
|
||||
var React = __toESM(require_react(), 1);
|
||||
var defaultMsalContext = {
|
||||
instance: stubbedPublicClientApplication,
|
||||
inProgress: InteractionStatus.None,
|
||||
accounts: [],
|
||||
logger: new Logger({})
|
||||
};
|
||||
var MsalContext = React.createContext(defaultMsalContext);
|
||||
var MsalConsumer = MsalContext.Consumer;
|
||||
|
||||
// node_modules/@azure/msal-react/dist/MsalProvider.js
|
||||
var import_react = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@azure/msal-react/dist/utils/utilities.js
|
||||
function getChildrenOrFunction(children, args) {
|
||||
if (typeof children === "function") {
|
||||
return children(args);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
function accountArraysAreEqual(arrayA, arrayB) {
|
||||
if (arrayA.length !== arrayB.length) {
|
||||
return false;
|
||||
}
|
||||
const comparisonArray = [...arrayB];
|
||||
return arrayA.every((elementA) => {
|
||||
const elementB = comparisonArray.shift();
|
||||
if (!elementA || !elementB) {
|
||||
return false;
|
||||
}
|
||||
return elementA.homeAccountId === elementB.homeAccountId && elementA.localAccountId === elementB.localAccountId && elementA.username === elementB.username;
|
||||
});
|
||||
}
|
||||
function getAccountByIdentifiers(allAccounts, accountIdentifiers) {
|
||||
if (allAccounts.length > 0 && (accountIdentifiers.homeAccountId || accountIdentifiers.localAccountId || accountIdentifiers.username)) {
|
||||
const matchedAccounts = allAccounts.filter((accountObj) => {
|
||||
if (accountIdentifiers.username && accountIdentifiers.username.toLowerCase() !== accountObj.username.toLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
if (accountIdentifiers.homeAccountId && accountIdentifiers.homeAccountId.toLowerCase() !== accountObj.homeAccountId.toLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
if (accountIdentifiers.localAccountId && accountIdentifiers.localAccountId.toLowerCase() !== accountObj.localAccountId.toLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return matchedAccounts[0] || null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/packageMetadata.js
|
||||
var name = "@azure/msal-react";
|
||||
var version = "3.0.17";
|
||||
|
||||
// node_modules/@azure/msal-react/dist/MsalProvider.js
|
||||
var MsalProviderActionType = {
|
||||
UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
|
||||
EVENT: "EVENT"
|
||||
};
|
||||
var reducer = (previousState, action) => {
|
||||
const { type, payload } = action;
|
||||
let newInProgress = previousState.inProgress;
|
||||
switch (type) {
|
||||
case MsalProviderActionType.UNBLOCK_INPROGRESS:
|
||||
if (previousState.inProgress === InteractionStatus.Startup) {
|
||||
newInProgress = InteractionStatus.None;
|
||||
payload.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'");
|
||||
}
|
||||
break;
|
||||
case MsalProviderActionType.EVENT:
|
||||
const message = payload.message;
|
||||
const status = EventMessageUtils.getInteractionStatusFromEvent(message, previousState.inProgress);
|
||||
if (status) {
|
||||
payload.logger.info(`MsalProvider - ${message.eventType} results in setting inProgress from ${previousState.inProgress} to ${status}`);
|
||||
newInProgress = status;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown action type: ${type}`);
|
||||
}
|
||||
if (newInProgress === InteractionStatus.Startup) {
|
||||
return previousState;
|
||||
}
|
||||
const currentAccounts = payload.instance.getAllAccounts();
|
||||
if (newInProgress !== previousState.inProgress && !accountArraysAreEqual(currentAccounts, previousState.accounts)) {
|
||||
return {
|
||||
...previousState,
|
||||
inProgress: newInProgress,
|
||||
accounts: currentAccounts
|
||||
};
|
||||
} else if (newInProgress !== previousState.inProgress) {
|
||||
return {
|
||||
...previousState,
|
||||
inProgress: newInProgress
|
||||
};
|
||||
} else if (!accountArraysAreEqual(currentAccounts, previousState.accounts)) {
|
||||
return {
|
||||
...previousState,
|
||||
accounts: currentAccounts
|
||||
};
|
||||
} else {
|
||||
return previousState;
|
||||
}
|
||||
};
|
||||
function MsalProvider({ instance, children }) {
|
||||
(0, import_react.useEffect)(() => {
|
||||
instance.initializeWrapperLibrary(WrapperSKU.React, version);
|
||||
}, [instance]);
|
||||
const logger = (0, import_react.useMemo)(() => {
|
||||
return instance.getLogger().clone(name, version);
|
||||
}, [instance]);
|
||||
const [state, updateState] = (0, import_react.useReducer)(reducer, void 0, () => {
|
||||
return {
|
||||
inProgress: InteractionStatus.Startup,
|
||||
accounts: []
|
||||
};
|
||||
});
|
||||
(0, import_react.useEffect)(() => {
|
||||
const callbackId = instance.addEventCallback((message) => {
|
||||
updateState({
|
||||
payload: {
|
||||
instance,
|
||||
logger,
|
||||
message
|
||||
},
|
||||
type: MsalProviderActionType.EVENT
|
||||
});
|
||||
});
|
||||
logger.verbose(`MsalProvider - Registered event callback with id: ${callbackId}`);
|
||||
instance.initialize().then(() => {
|
||||
instance.handleRedirectPromise().catch(() => {
|
||||
return;
|
||||
}).finally(() => {
|
||||
updateState({
|
||||
payload: {
|
||||
instance,
|
||||
logger
|
||||
},
|
||||
type: MsalProviderActionType.UNBLOCK_INPROGRESS
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
return;
|
||||
});
|
||||
return () => {
|
||||
if (callbackId) {
|
||||
logger.verbose(`MsalProvider - Removing event callback ${callbackId}`);
|
||||
instance.removeEventCallback(callbackId);
|
||||
}
|
||||
};
|
||||
}, [instance, logger]);
|
||||
const contextValue = {
|
||||
instance,
|
||||
inProgress: state.inProgress,
|
||||
accounts: state.accounts,
|
||||
logger
|
||||
};
|
||||
return import_react.default.createElement(MsalContext.Provider, { value: contextValue }, children);
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/AuthenticatedTemplate.js
|
||||
var import_react4 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@azure/msal-react/dist/hooks/useMsal.js
|
||||
var import_react2 = __toESM(require_react(), 1);
|
||||
var useMsal = () => (0, import_react2.useContext)(MsalContext);
|
||||
|
||||
// node_modules/@azure/msal-react/dist/hooks/useIsAuthenticated.js
|
||||
var import_react3 = __toESM(require_react(), 1);
|
||||
function isAuthenticated(allAccounts, matchAccount) {
|
||||
if (matchAccount && (matchAccount.username || matchAccount.homeAccountId || matchAccount.localAccountId)) {
|
||||
return !!getAccountByIdentifiers(allAccounts, matchAccount);
|
||||
}
|
||||
return allAccounts.length > 0;
|
||||
}
|
||||
function useIsAuthenticated(matchAccount) {
|
||||
const { accounts: allAccounts, inProgress } = useMsal();
|
||||
const isUserAuthenticated = (0, import_react3.useMemo)(() => {
|
||||
if (inProgress === InteractionStatus.Startup) {
|
||||
return false;
|
||||
}
|
||||
return isAuthenticated(allAccounts, matchAccount);
|
||||
}, [allAccounts, inProgress, matchAccount]);
|
||||
return isUserAuthenticated;
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/AuthenticatedTemplate.js
|
||||
function AuthenticatedTemplate({ username, homeAccountId, localAccountId, children }) {
|
||||
const context = useMsal();
|
||||
const accountIdentifier = (0, import_react4.useMemo)(() => {
|
||||
return {
|
||||
username,
|
||||
homeAccountId,
|
||||
localAccountId
|
||||
};
|
||||
}, [username, homeAccountId, localAccountId]);
|
||||
const isAuthenticated2 = useIsAuthenticated(accountIdentifier);
|
||||
if (isAuthenticated2 && context.inProgress !== InteractionStatus.Startup) {
|
||||
return import_react4.default.createElement(import_react4.default.Fragment, null, getChildrenOrFunction(children, context));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/UnauthenticatedTemplate.js
|
||||
var import_react5 = __toESM(require_react(), 1);
|
||||
function UnauthenticatedTemplate({ username, homeAccountId, localAccountId, children }) {
|
||||
const context = useMsal();
|
||||
const accountIdentifier = (0, import_react5.useMemo)(() => {
|
||||
return {
|
||||
username,
|
||||
homeAccountId,
|
||||
localAccountId
|
||||
};
|
||||
}, [username, homeAccountId, localAccountId]);
|
||||
const isAuthenticated2 = useIsAuthenticated(accountIdentifier);
|
||||
if (!isAuthenticated2 && context.inProgress !== InteractionStatus.Startup && context.inProgress !== InteractionStatus.HandleRedirect) {
|
||||
return import_react5.default.createElement(import_react5.default.Fragment, null, getChildrenOrFunction(children, context));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/MsalAuthenticationTemplate.js
|
||||
var import_react8 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@azure/msal-react/dist/hooks/useMsalAuthentication.js
|
||||
var import_react7 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@azure/msal-react/dist/hooks/useAccount.js
|
||||
var import_react6 = __toESM(require_react(), 1);
|
||||
function getAccount(instance, accountIdentifiers) {
|
||||
if (!accountIdentifiers || !accountIdentifiers.homeAccountId && !accountIdentifiers.localAccountId && !accountIdentifiers.username) {
|
||||
return instance.getActiveAccount();
|
||||
}
|
||||
return getAccountByIdentifiers(instance.getAllAccounts(), accountIdentifiers);
|
||||
}
|
||||
function useAccount(accountIdentifiers) {
|
||||
const { instance, inProgress, logger } = useMsal();
|
||||
const [account, setAccount] = (0, import_react6.useState)(() => {
|
||||
if (inProgress === InteractionStatus.Startup) {
|
||||
return null;
|
||||
} else {
|
||||
return getAccount(instance, accountIdentifiers);
|
||||
}
|
||||
});
|
||||
(0, import_react6.useEffect)(() => {
|
||||
if (inProgress !== InteractionStatus.Startup) {
|
||||
setAccount((currentAccount) => {
|
||||
const nextAccount = getAccount(instance, accountIdentifiers);
|
||||
if (!AccountEntity.accountInfoIsEqual(currentAccount, nextAccount, true)) {
|
||||
logger.info("useAccount - Updating account");
|
||||
return nextAccount;
|
||||
}
|
||||
return currentAccount;
|
||||
});
|
||||
}
|
||||
}, [inProgress, accountIdentifiers, instance, logger]);
|
||||
return account;
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/error/ReactAuthError.js
|
||||
var ReactAuthErrorMessage = {
|
||||
invalidInteractionType: {
|
||||
code: "invalid_interaction_type",
|
||||
desc: "The provided interaction type is invalid."
|
||||
},
|
||||
unableToFallbackToInteraction: {
|
||||
code: "unable_to_fallback_to_interaction",
|
||||
desc: "Interaction is required but another interaction is already in progress. Please try again when the current interaction is complete."
|
||||
}
|
||||
};
|
||||
var ReactAuthError = class _ReactAuthError extends AuthError {
|
||||
constructor(errorCode, errorMessage) {
|
||||
super(errorCode, errorMessage);
|
||||
Object.setPrototypeOf(this, _ReactAuthError.prototype);
|
||||
this.name = "ReactAuthError";
|
||||
}
|
||||
static createInvalidInteractionTypeError() {
|
||||
return new _ReactAuthError(ReactAuthErrorMessage.invalidInteractionType.code, ReactAuthErrorMessage.invalidInteractionType.desc);
|
||||
}
|
||||
static createUnableToFallbackToInteractionError() {
|
||||
return new _ReactAuthError(ReactAuthErrorMessage.unableToFallbackToInteraction.code, ReactAuthErrorMessage.unableToFallbackToInteraction.desc);
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/@azure/msal-react/dist/hooks/useMsalAuthentication.js
|
||||
function useMsalAuthentication(interactionType, authenticationRequest, accountIdentifiers) {
|
||||
const { instance, inProgress, logger } = useMsal();
|
||||
const isAuthenticated2 = useIsAuthenticated(accountIdentifiers);
|
||||
const account = useAccount(accountIdentifiers);
|
||||
const [[result, error], setResponse] = (0, import_react7.useState)([null, null]);
|
||||
const mounted = (0, import_react7.useRef)(true);
|
||||
(0, import_react7.useEffect)(() => {
|
||||
return () => {
|
||||
mounted.current = false;
|
||||
};
|
||||
}, []);
|
||||
const interactionInProgress = (0, import_react7.useRef)(inProgress !== InteractionStatus.None);
|
||||
(0, import_react7.useEffect)(() => {
|
||||
interactionInProgress.current = inProgress !== InteractionStatus.None;
|
||||
}, [inProgress]);
|
||||
const shouldAcquireToken = (0, import_react7.useRef)(true);
|
||||
(0, import_react7.useEffect)(() => {
|
||||
if (!!error) {
|
||||
shouldAcquireToken.current = false;
|
||||
return;
|
||||
}
|
||||
if (!!result) {
|
||||
shouldAcquireToken.current = false;
|
||||
return;
|
||||
}
|
||||
}, [error, result]);
|
||||
const login = (0, import_react7.useCallback)(async (callbackInteractionType, callbackRequest) => {
|
||||
const loginType = callbackInteractionType || interactionType;
|
||||
const loginRequest = callbackRequest || authenticationRequest;
|
||||
switch (loginType) {
|
||||
case InteractionType.Popup:
|
||||
logger.verbose("useMsalAuthentication - Calling loginPopup");
|
||||
return instance.loginPopup(loginRequest);
|
||||
case InteractionType.Redirect:
|
||||
logger.verbose("useMsalAuthentication - Calling loginRedirect");
|
||||
return instance.loginRedirect(loginRequest).then(null);
|
||||
case InteractionType.Silent:
|
||||
logger.verbose("useMsalAuthentication - Calling ssoSilent");
|
||||
return instance.ssoSilent(loginRequest);
|
||||
default:
|
||||
throw ReactAuthError.createInvalidInteractionTypeError();
|
||||
}
|
||||
}, [instance, interactionType, authenticationRequest, logger]);
|
||||
const acquireToken = (0, import_react7.useCallback)(async (callbackInteractionType, callbackRequest) => {
|
||||
const fallbackInteractionType = callbackInteractionType || interactionType;
|
||||
let tokenRequest;
|
||||
if (callbackRequest) {
|
||||
logger.trace("useMsalAuthentication - acquireToken - Using request provided in the callback");
|
||||
tokenRequest = {
|
||||
...callbackRequest
|
||||
};
|
||||
} else if (authenticationRequest) {
|
||||
logger.trace("useMsalAuthentication - acquireToken - Using request provided in the hook");
|
||||
tokenRequest = {
|
||||
...authenticationRequest,
|
||||
scopes: authenticationRequest.scopes || OIDC_DEFAULT_SCOPES
|
||||
};
|
||||
} else {
|
||||
logger.trace("useMsalAuthentication - acquireToken - No request object provided, using default request.");
|
||||
tokenRequest = {
|
||||
scopes: OIDC_DEFAULT_SCOPES
|
||||
};
|
||||
}
|
||||
if (!tokenRequest.account && account) {
|
||||
logger.trace("useMsalAuthentication - acquireToken - Attaching account to request");
|
||||
tokenRequest.account = account;
|
||||
}
|
||||
const getToken = async () => {
|
||||
logger.verbose("useMsalAuthentication - Calling acquireTokenSilent");
|
||||
return instance.acquireTokenSilent(tokenRequest).catch(async (e) => {
|
||||
if (e instanceof InteractionRequiredAuthError) {
|
||||
if (!interactionInProgress.current) {
|
||||
logger.error("useMsalAuthentication - Interaction required, falling back to interaction");
|
||||
return login(fallbackInteractionType, tokenRequest);
|
||||
} else {
|
||||
logger.error("useMsalAuthentication - Interaction required but is already in progress. Please try again, if needed, after interaction completes.");
|
||||
throw ReactAuthError.createUnableToFallbackToInteractionError();
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
return getToken().then((response) => {
|
||||
if (mounted.current) {
|
||||
setResponse([response, null]);
|
||||
}
|
||||
return response;
|
||||
}).catch((e) => {
|
||||
if (mounted.current) {
|
||||
setResponse([null, e]);
|
||||
}
|
||||
throw e;
|
||||
});
|
||||
}, [
|
||||
instance,
|
||||
interactionType,
|
||||
authenticationRequest,
|
||||
logger,
|
||||
account,
|
||||
login
|
||||
]);
|
||||
(0, import_react7.useEffect)(() => {
|
||||
const callbackId = instance.addEventCallback((message) => {
|
||||
switch (message.eventType) {
|
||||
case EventType.LOGIN_SUCCESS:
|
||||
case EventType.SSO_SILENT_SUCCESS:
|
||||
if (message.payload) {
|
||||
setResponse([
|
||||
message.payload,
|
||||
null
|
||||
]);
|
||||
}
|
||||
break;
|
||||
case EventType.LOGIN_FAILURE:
|
||||
case EventType.SSO_SILENT_FAILURE:
|
||||
if (message.error) {
|
||||
setResponse([null, message.error]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
logger.verbose(`useMsalAuthentication - Registered event callback with id: ${callbackId}`);
|
||||
return () => {
|
||||
if (callbackId) {
|
||||
logger.verbose(`useMsalAuthentication - Removing event callback ${callbackId}`);
|
||||
instance.removeEventCallback(callbackId);
|
||||
}
|
||||
};
|
||||
}, [instance, logger]);
|
||||
(0, import_react7.useEffect)(() => {
|
||||
if (shouldAcquireToken.current && inProgress === InteractionStatus.None) {
|
||||
if (!isAuthenticated2) {
|
||||
shouldAcquireToken.current = false;
|
||||
logger.info("useMsalAuthentication - No user is authenticated, attempting to login");
|
||||
login().catch(() => {
|
||||
return;
|
||||
});
|
||||
} else if (account) {
|
||||
shouldAcquireToken.current = false;
|
||||
logger.info("useMsalAuthentication - User is authenticated, attempting to acquire token");
|
||||
acquireToken().catch(() => {
|
||||
return;
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [isAuthenticated2, account, inProgress, login, acquireToken, logger]);
|
||||
return {
|
||||
login,
|
||||
acquireToken,
|
||||
result,
|
||||
error
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/MsalAuthenticationTemplate.js
|
||||
function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children }) {
|
||||
const accountIdentifier = (0, import_react8.useMemo)(() => {
|
||||
return {
|
||||
username,
|
||||
homeAccountId,
|
||||
localAccountId
|
||||
};
|
||||
}, [username, homeAccountId, localAccountId]);
|
||||
const context = useMsal();
|
||||
const msalAuthResult = useMsalAuthentication(interactionType, authenticationRequest, accountIdentifier);
|
||||
const isAuthenticated2 = useIsAuthenticated(accountIdentifier);
|
||||
if (msalAuthResult.error && context.inProgress === InteractionStatus.None) {
|
||||
if (!!ErrorComponent) {
|
||||
return import_react8.default.createElement(ErrorComponent, { ...msalAuthResult });
|
||||
}
|
||||
throw msalAuthResult.error;
|
||||
}
|
||||
if (isAuthenticated2) {
|
||||
return import_react8.default.createElement(import_react8.default.Fragment, null, getChildrenOrFunction(children, msalAuthResult));
|
||||
}
|
||||
if (!!LoadingComponent && context.inProgress !== InteractionStatus.None) {
|
||||
return import_react8.default.createElement(LoadingComponent, { ...context });
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// node_modules/@azure/msal-react/dist/components/withMsal.js
|
||||
var import_react9 = __toESM(require_react(), 1);
|
||||
var withMsal = (Component) => {
|
||||
const ComponentWithMsal = (props) => {
|
||||
const msal = useMsal();
|
||||
return import_react9.default.createElement(Component, { ...props, msalContext: msal });
|
||||
};
|
||||
const componentName = Component.displayName || Component.name || "Component";
|
||||
ComponentWithMsal.displayName = `withMsal(${componentName})`;
|
||||
return ComponentWithMsal;
|
||||
};
|
||||
export {
|
||||
AuthenticatedTemplate,
|
||||
MsalAuthenticationTemplate,
|
||||
MsalConsumer,
|
||||
MsalContext,
|
||||
MsalProvider,
|
||||
UnauthenticatedTemplate,
|
||||
useAccount,
|
||||
useIsAuthenticated,
|
||||
useMsal,
|
||||
useMsalAuthentication,
|
||||
version,
|
||||
withMsal
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
@azure/msal-react/dist/MsalContext.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/utils/utilities.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/packageMetadata.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/MsalProvider.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/hooks/useMsal.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/hooks/useIsAuthenticated.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/components/AuthenticatedTemplate.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/components/UnauthenticatedTemplate.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/hooks/useAccount.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/error/ReactAuthError.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/hooks/useMsalAuthentication.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/components/MsalAuthenticationTemplate.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/components/withMsal.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
|
||||
@azure/msal-react/dist/index.js:
|
||||
(*! @azure/msal-react v3.0.17 2025-08-05 *)
|
||||
*/
|
||||
//# sourceMappingURL=@azure_msal-react.js.map
|
||||
7
node_modules/.vite/deps/@azure_msal-react.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@azure_msal-react.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
71
node_modules/.vite/deps/@dnd-kit_core.js
generated
vendored
Normal file
71
node_modules/.vite/deps/@dnd-kit_core.js
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import {
|
||||
AutoScrollActivator,
|
||||
DndContext,
|
||||
DragOverlay,
|
||||
KeyboardCode,
|
||||
KeyboardSensor,
|
||||
MeasuringFrequency,
|
||||
MeasuringStrategy,
|
||||
MouseSensor,
|
||||
PointerSensor,
|
||||
TouchSensor,
|
||||
TraversalOrder,
|
||||
applyModifiers,
|
||||
closestCenter,
|
||||
closestCorners,
|
||||
defaultAnnouncements,
|
||||
defaultCoordinates,
|
||||
defaultDropAnimationConfiguration,
|
||||
defaultDropAnimationSideEffects,
|
||||
defaultKeyboardCoordinateGetter,
|
||||
defaultScreenReaderInstructions,
|
||||
getClientRect,
|
||||
getFirstCollision,
|
||||
getScrollableAncestors,
|
||||
pointerWithin,
|
||||
rectIntersection,
|
||||
useDndContext,
|
||||
useDndMonitor,
|
||||
useDraggable,
|
||||
useDroppable,
|
||||
useSensor,
|
||||
useSensors
|
||||
} from "./chunk-V27RRWZQ.js";
|
||||
import "./chunk-BAWHRVBE.js";
|
||||
import "./chunk-R6S4VRB5.js";
|
||||
import "./chunk-3TFVT2CW.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
export {
|
||||
AutoScrollActivator,
|
||||
DndContext,
|
||||
DragOverlay,
|
||||
KeyboardCode,
|
||||
KeyboardSensor,
|
||||
MeasuringFrequency,
|
||||
MeasuringStrategy,
|
||||
MouseSensor,
|
||||
PointerSensor,
|
||||
TouchSensor,
|
||||
TraversalOrder,
|
||||
applyModifiers,
|
||||
closestCenter,
|
||||
closestCorners,
|
||||
defaultAnnouncements,
|
||||
defaultCoordinates,
|
||||
defaultDropAnimationConfiguration as defaultDropAnimation,
|
||||
defaultDropAnimationSideEffects,
|
||||
defaultKeyboardCoordinateGetter,
|
||||
defaultScreenReaderInstructions,
|
||||
getClientRect,
|
||||
getFirstCollision,
|
||||
getScrollableAncestors,
|
||||
pointerWithin,
|
||||
rectIntersection,
|
||||
useDndContext,
|
||||
useDndMonitor,
|
||||
useDraggable,
|
||||
useDroppable,
|
||||
useSensor,
|
||||
useSensors
|
||||
};
|
||||
//# sourceMappingURL=@dnd-kit_core.js.map
|
||||
7
node_modules/.vite/deps/@dnd-kit_core.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@dnd-kit_core.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
118
node_modules/.vite/deps/@dnd-kit_modifiers.js
generated
vendored
Normal file
118
node_modules/.vite/deps/@dnd-kit_modifiers.js
generated
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
import {
|
||||
getEventCoordinates
|
||||
} from "./chunk-BAWHRVBE.js";
|
||||
import "./chunk-3TFVT2CW.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js
|
||||
function createSnapModifier(gridSize) {
|
||||
return (_ref) => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return {
|
||||
...transform,
|
||||
x: Math.ceil(transform.x / gridSize) * gridSize,
|
||||
y: Math.ceil(transform.y / gridSize) * gridSize
|
||||
};
|
||||
};
|
||||
}
|
||||
var restrictToHorizontalAxis = (_ref) => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return {
|
||||
...transform,
|
||||
y: 0
|
||||
};
|
||||
};
|
||||
function restrictToBoundingRect(transform, rect, boundingRect) {
|
||||
const value = {
|
||||
...transform
|
||||
};
|
||||
if (rect.top + transform.y <= boundingRect.top) {
|
||||
value.y = boundingRect.top - rect.top;
|
||||
} else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {
|
||||
value.y = boundingRect.top + boundingRect.height - rect.bottom;
|
||||
}
|
||||
if (rect.left + transform.x <= boundingRect.left) {
|
||||
value.x = boundingRect.left - rect.left;
|
||||
} else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {
|
||||
value.x = boundingRect.left + boundingRect.width - rect.right;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
var restrictToParentElement = (_ref) => {
|
||||
let {
|
||||
containerNodeRect,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
if (!draggingNodeRect || !containerNodeRect) {
|
||||
return transform;
|
||||
}
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
|
||||
};
|
||||
var restrictToFirstScrollableAncestor = (_ref) => {
|
||||
let {
|
||||
draggingNodeRect,
|
||||
transform,
|
||||
scrollableAncestorRects
|
||||
} = _ref;
|
||||
const firstScrollableAncestorRect = scrollableAncestorRects[0];
|
||||
if (!draggingNodeRect || !firstScrollableAncestorRect) {
|
||||
return transform;
|
||||
}
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, firstScrollableAncestorRect);
|
||||
};
|
||||
var restrictToVerticalAxis = (_ref) => {
|
||||
let {
|
||||
transform
|
||||
} = _ref;
|
||||
return {
|
||||
...transform,
|
||||
x: 0
|
||||
};
|
||||
};
|
||||
var restrictToWindowEdges = (_ref) => {
|
||||
let {
|
||||
transform,
|
||||
draggingNodeRect,
|
||||
windowRect
|
||||
} = _ref;
|
||||
if (!draggingNodeRect || !windowRect) {
|
||||
return transform;
|
||||
}
|
||||
return restrictToBoundingRect(transform, draggingNodeRect, windowRect);
|
||||
};
|
||||
var snapCenterToCursor = (_ref) => {
|
||||
let {
|
||||
activatorEvent,
|
||||
draggingNodeRect,
|
||||
transform
|
||||
} = _ref;
|
||||
if (draggingNodeRect && activatorEvent) {
|
||||
const activatorCoordinates = getEventCoordinates(activatorEvent);
|
||||
if (!activatorCoordinates) {
|
||||
return transform;
|
||||
}
|
||||
const offsetX = activatorCoordinates.x - draggingNodeRect.left;
|
||||
const offsetY = activatorCoordinates.y - draggingNodeRect.top;
|
||||
return {
|
||||
...transform,
|
||||
x: transform.x + offsetX - draggingNodeRect.width / 2,
|
||||
y: transform.y + offsetY - draggingNodeRect.height / 2
|
||||
};
|
||||
}
|
||||
return transform;
|
||||
};
|
||||
export {
|
||||
createSnapModifier,
|
||||
restrictToFirstScrollableAncestor,
|
||||
restrictToHorizontalAxis,
|
||||
restrictToParentElement,
|
||||
restrictToVerticalAxis,
|
||||
restrictToWindowEdges,
|
||||
snapCenterToCursor
|
||||
};
|
||||
//# sourceMappingURL=@dnd-kit_modifiers.js.map
|
||||
7
node_modules/.vite/deps/@dnd-kit_modifiers.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@dnd-kit_modifiers.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@dnd-kit/modifiers/src/createSnapModifier.ts", "../../@dnd-kit/modifiers/src/restrictToHorizontalAxis.ts", "../../@dnd-kit/modifiers/src/utilities/restrictToBoundingRect.ts", "../../@dnd-kit/modifiers/src/restrictToParentElement.ts", "../../@dnd-kit/modifiers/src/restrictToFirstScrollableAncestor.ts", "../../@dnd-kit/modifiers/src/restrictToVerticalAxis.ts", "../../@dnd-kit/modifiers/src/restrictToWindowEdges.ts", "../../@dnd-kit/modifiers/src/snapCenterToCursor.ts"],
|
||||
"sourcesContent": ["import type {Modifier} from '@dnd-kit/core';\n\nexport function createSnapModifier(gridSize: number): Modifier {\n return ({transform}) => ({\n ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize,\n });\n}\n", "import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToHorizontalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n y: 0,\n };\n};\n", "import type {ClientRect} from '@dnd-kit/core';\nimport type {Transform} from '@dnd-kit/utilities';\n\nexport function restrictToBoundingRect(\n transform: Transform,\n rect: ClientRect,\n boundingRect: ClientRect\n): Transform {\n const value = {\n ...transform,\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (\n rect.bottom + transform.y >=\n boundingRect.top + boundingRect.height\n ) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (\n rect.right + transform.x >=\n boundingRect.left + boundingRect.width\n ) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n", "import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToParentElement: Modifier = ({\n containerNodeRect,\n draggingNodeRect,\n transform,\n}) => {\n if (!draggingNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);\n};\n", "import type {Modifier} from '@dnd-kit/core';\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToFirstScrollableAncestor: Modifier = ({\n draggingNodeRect,\n transform,\n scrollableAncestorRects,\n}) => {\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!draggingNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(\n transform,\n draggingNodeRect,\n firstScrollableAncestorRect\n );\n};\n", "import type {Modifier} from '@dnd-kit/core';\n\nexport const restrictToVerticalAxis: Modifier = ({transform}) => {\n return {\n ...transform,\n x: 0,\n };\n};\n", "import type {Modifier} from '@dnd-kit/core';\n\nimport {restrictToBoundingRect} from './utilities';\n\nexport const restrictToWindowEdges: Modifier = ({\n transform,\n draggingNodeRect,\n windowRect,\n}) => {\n if (!draggingNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, draggingNodeRect, windowRect);\n};\n", "import type {Modifier} from '@dnd-kit/core';\nimport {getEventCoordinates} from '@dnd-kit/utilities';\n\nexport const snapCenterToCursor: Modifier = ({\n activatorEvent,\n draggingNodeRect,\n transform,\n}) => {\n if (draggingNodeRect && activatorEvent) {\n const activatorCoordinates = getEventCoordinates(activatorEvent);\n\n if (!activatorCoordinates) {\n return transform;\n }\n\n const offsetX = activatorCoordinates.x - draggingNodeRect.left;\n const offsetY = activatorCoordinates.y - draggingNodeRect.top;\n\n return {\n ...transform,\n x: transform.x + offsetX - draggingNodeRect.width / 2,\n y: transform.y + offsetY - draggingNodeRect.height / 2,\n };\n }\n\n return transform;\n};\n"],
|
||||
"mappings": ";;;;;;;SAEgBA,mBAAmBC,UAAAA;AACjC,SAAO,UAAA;AAAA,QAAC;MAACC;QAAF;AAAA,WAAkB;MACvB,GAAGA;MACHC,GAAGC,KAAKC,KAAKH,UAAUC,IAAIF,QAAxB,IAAoCA;MACvCK,GAAGF,KAAKC,KAAKH,UAAUI,IAAIL,QAAxB,IAAoCA;;;AAE1C;ICNYM,2BAAqC,UAAA;MAAC;IAACL;;AAClD,SAAO;IACL,GAAGA;IACHI,GAAG;;AAEN;SCJeE,uBACdN,WACAO,MACAC,cAAAA;AAEA,QAAMC,QAAQ;IACZ,GAAGT;;AAGL,MAAIO,KAAKG,MAAMV,UAAUI,KAAKI,aAAaE,KAAK;AAC9CD,UAAML,IAAII,aAAaE,MAAMH,KAAKG;aAElCH,KAAKI,SAASX,UAAUI,KACxBI,aAAaE,MAAMF,aAAaI,QAChC;AACAH,UAAML,IAAII,aAAaE,MAAMF,aAAaI,SAASL,KAAKI;;AAG1D,MAAIJ,KAAKM,OAAOb,UAAUC,KAAKO,aAAaK,MAAM;AAChDJ,UAAMR,IAAIO,aAAaK,OAAON,KAAKM;aAEnCN,KAAKO,QAAQd,UAAUC,KACvBO,aAAaK,OAAOL,aAAaO,OACjC;AACAN,UAAMR,IAAIO,aAAaK,OAAOL,aAAaO,QAAQR,KAAKO;;AAG1D,SAAOL;AACR;IC5BYO,0BAAoC,UAAA;MAAC;IAChDC;IACAC;IACAlB;;AAEA,MAAI,CAACkB,oBAAoB,CAACD,mBAAmB;AAC3C,WAAOjB;;AAGT,SAAOM,uBAAuBN,WAAWkB,kBAAkBD,iBAA9B;AAC9B;ICVYE,oCAA8C,UAAA;MAAC;IAC1DD;IACAlB;IACAoB;;AAEA,QAAMC,8BAA8BD,wBAAwB,CAAD;AAE3D,MAAI,CAACF,oBAAoB,CAACG,6BAA6B;AACrD,WAAOrB;;AAGT,SAAOM,uBACLN,WACAkB,kBACAG,2BAH2B;AAK9B;ICjBYC,yBAAmC,UAAA;MAAC;IAACtB;;AAChD,SAAO;IACL,GAAGA;IACHC,GAAG;;AAEN;ICHYsB,wBAAkC,UAAA;MAAC;IAC9CvB;IACAkB;IACAM;;AAEA,MAAI,CAACN,oBAAoB,CAACM,YAAY;AACpC,WAAOxB;;AAGT,SAAOM,uBAAuBN,WAAWkB,kBAAkBM,UAA9B;AAC9B;ICXYC,qBAA+B,UAAA;MAAC;IAC3CC;IACAR;IACAlB;;AAEA,MAAIkB,oBAAoBQ,gBAAgB;AACtC,UAAMC,uBAAuBC,oBAAoBF,cAAD;AAEhD,QAAI,CAACC,sBAAsB;AACzB,aAAO3B;;AAGT,UAAM6B,UAAUF,qBAAqB1B,IAAIiB,iBAAiBL;AAC1D,UAAMiB,UAAUH,qBAAqBvB,IAAIc,iBAAiBR;AAE1D,WAAO;MACL,GAAGV;MACHC,GAAGD,UAAUC,IAAI4B,UAAUX,iBAAiBH,QAAQ;MACpDX,GAAGJ,UAAUI,IAAI0B,UAAUZ,iBAAiBN,SAAS;;;AAIzD,SAAOZ;AACR;",
|
||||
"names": ["createSnapModifier", "gridSize", "transform", "x", "Math", "ceil", "y", "restrictToHorizontalAxis", "restrictToBoundingRect", "rect", "boundingRect", "value", "top", "bottom", "height", "left", "right", "width", "restrictToParentElement", "containerNodeRect", "draggingNodeRect", "restrictToFirstScrollableAncestor", "scrollableAncestorRects", "firstScrollableAncestorRect", "restrictToVerticalAxis", "restrictToWindowEdges", "windowRect", "snapCenterToCursor", "activatorEvent", "activatorCoordinates", "getEventCoordinates", "offsetX", "offsetY"]
|
||||
}
|
||||
717
node_modules/.vite/deps/@dnd-kit_sortable.js
generated
vendored
Normal file
717
node_modules/.vite/deps/@dnd-kit_sortable.js
generated
vendored
Normal file
|
|
@ -0,0 +1,717 @@
|
|||
import {
|
||||
KeyboardCode,
|
||||
closestCorners,
|
||||
getClientRect,
|
||||
getFirstCollision,
|
||||
getScrollableAncestors,
|
||||
useDndContext,
|
||||
useDraggable,
|
||||
useDroppable
|
||||
} from "./chunk-V27RRWZQ.js";
|
||||
import {
|
||||
CSS,
|
||||
isKeyboardEvent,
|
||||
subtract,
|
||||
useCombinedRefs,
|
||||
useIsomorphicLayoutEffect,
|
||||
useUniqueId
|
||||
} from "./chunk-BAWHRVBE.js";
|
||||
import "./chunk-R6S4VRB5.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@dnd-kit/sortable/dist/sortable.esm.js
|
||||
var import_react = __toESM(require_react());
|
||||
function arrayMove(array, from, to) {
|
||||
const newArray = array.slice();
|
||||
newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
|
||||
return newArray;
|
||||
}
|
||||
function arraySwap(array, from, to) {
|
||||
const newArray = array.slice();
|
||||
newArray[from] = array[to];
|
||||
newArray[to] = array[from];
|
||||
return newArray;
|
||||
}
|
||||
function getSortedRects(items, rects) {
|
||||
return items.reduce((accumulator, id, index) => {
|
||||
const rect = rects.get(id);
|
||||
if (rect) {
|
||||
accumulator[index] = rect;
|
||||
}
|
||||
return accumulator;
|
||||
}, Array(items.length));
|
||||
}
|
||||
function isValidIndex(index) {
|
||||
return index !== null && index >= 0;
|
||||
}
|
||||
function itemsEqual(a, b) {
|
||||
if (a === b) {
|
||||
return true;
|
||||
}
|
||||
if (a.length !== b.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < a.length; i++) {
|
||||
if (a[i] !== b[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function normalizeDisabled(disabled) {
|
||||
if (typeof disabled === "boolean") {
|
||||
return {
|
||||
draggable: disabled,
|
||||
droppable: disabled
|
||||
};
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
var defaultScale = {
|
||||
scaleX: 1,
|
||||
scaleY: 1
|
||||
};
|
||||
var horizontalListSortingStrategy = (_ref) => {
|
||||
var _rects$activeIndex;
|
||||
let {
|
||||
rects,
|
||||
activeNodeRect: fallbackActiveRect,
|
||||
activeIndex,
|
||||
overIndex,
|
||||
index
|
||||
} = _ref;
|
||||
const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
|
||||
if (!activeNodeRect) {
|
||||
return null;
|
||||
}
|
||||
const itemGap = getItemGap(rects, index, activeIndex);
|
||||
if (index === activeIndex) {
|
||||
const newIndexRect = rects[overIndex];
|
||||
if (!newIndexRect) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,
|
||||
y: 0,
|
||||
...defaultScale
|
||||
};
|
||||
}
|
||||
if (index > activeIndex && index <= overIndex) {
|
||||
return {
|
||||
x: -activeNodeRect.width - itemGap,
|
||||
y: 0,
|
||||
...defaultScale
|
||||
};
|
||||
}
|
||||
if (index < activeIndex && index >= overIndex) {
|
||||
return {
|
||||
x: activeNodeRect.width + itemGap,
|
||||
y: 0,
|
||||
...defaultScale
|
||||
};
|
||||
}
|
||||
return {
|
||||
x: 0,
|
||||
y: 0,
|
||||
...defaultScale
|
||||
};
|
||||
};
|
||||
function getItemGap(rects, index, activeIndex) {
|
||||
const currentRect = rects[index];
|
||||
const previousRect = rects[index - 1];
|
||||
const nextRect = rects[index + 1];
|
||||
if (!currentRect || !previousRect && !nextRect) {
|
||||
return 0;
|
||||
}
|
||||
if (activeIndex < index) {
|
||||
return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);
|
||||
}
|
||||
return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);
|
||||
}
|
||||
var rectSortingStrategy = (_ref) => {
|
||||
let {
|
||||
rects,
|
||||
activeIndex,
|
||||
overIndex,
|
||||
index
|
||||
} = _ref;
|
||||
const newRects = arrayMove(rects, overIndex, activeIndex);
|
||||
const oldRect = rects[index];
|
||||
const newRect = newRects[index];
|
||||
if (!newRect || !oldRect) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
x: newRect.left - oldRect.left,
|
||||
y: newRect.top - oldRect.top,
|
||||
scaleX: newRect.width / oldRect.width,
|
||||
scaleY: newRect.height / oldRect.height
|
||||
};
|
||||
};
|
||||
var rectSwappingStrategy = (_ref) => {
|
||||
let {
|
||||
activeIndex,
|
||||
index,
|
||||
rects,
|
||||
overIndex
|
||||
} = _ref;
|
||||
let oldRect;
|
||||
let newRect;
|
||||
if (index === activeIndex) {
|
||||
oldRect = rects[index];
|
||||
newRect = rects[overIndex];
|
||||
}
|
||||
if (index === overIndex) {
|
||||
oldRect = rects[index];
|
||||
newRect = rects[activeIndex];
|
||||
}
|
||||
if (!newRect || !oldRect) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
x: newRect.left - oldRect.left,
|
||||
y: newRect.top - oldRect.top,
|
||||
scaleX: newRect.width / oldRect.width,
|
||||
scaleY: newRect.height / oldRect.height
|
||||
};
|
||||
};
|
||||
var defaultScale$1 = {
|
||||
scaleX: 1,
|
||||
scaleY: 1
|
||||
};
|
||||
var verticalListSortingStrategy = (_ref) => {
|
||||
var _rects$activeIndex;
|
||||
let {
|
||||
activeIndex,
|
||||
activeNodeRect: fallbackActiveRect,
|
||||
index,
|
||||
rects,
|
||||
overIndex
|
||||
} = _ref;
|
||||
const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
|
||||
if (!activeNodeRect) {
|
||||
return null;
|
||||
}
|
||||
if (index === activeIndex) {
|
||||
const overIndexRect = rects[overIndex];
|
||||
if (!overIndexRect) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
x: 0,
|
||||
y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,
|
||||
...defaultScale$1
|
||||
};
|
||||
}
|
||||
const itemGap = getItemGap$1(rects, index, activeIndex);
|
||||
if (index > activeIndex && index <= overIndex) {
|
||||
return {
|
||||
x: 0,
|
||||
y: -activeNodeRect.height - itemGap,
|
||||
...defaultScale$1
|
||||
};
|
||||
}
|
||||
if (index < activeIndex && index >= overIndex) {
|
||||
return {
|
||||
x: 0,
|
||||
y: activeNodeRect.height + itemGap,
|
||||
...defaultScale$1
|
||||
};
|
||||
}
|
||||
return {
|
||||
x: 0,
|
||||
y: 0,
|
||||
...defaultScale$1
|
||||
};
|
||||
};
|
||||
function getItemGap$1(clientRects, index, activeIndex) {
|
||||
const currentRect = clientRects[index];
|
||||
const previousRect = clientRects[index - 1];
|
||||
const nextRect = clientRects[index + 1];
|
||||
if (!currentRect) {
|
||||
return 0;
|
||||
}
|
||||
if (activeIndex < index) {
|
||||
return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;
|
||||
}
|
||||
return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;
|
||||
}
|
||||
var ID_PREFIX = "Sortable";
|
||||
var Context = import_react.default.createContext({
|
||||
activeIndex: -1,
|
||||
containerId: ID_PREFIX,
|
||||
disableTransforms: false,
|
||||
items: [],
|
||||
overIndex: -1,
|
||||
useDragOverlay: false,
|
||||
sortedRects: [],
|
||||
strategy: rectSortingStrategy,
|
||||
disabled: {
|
||||
draggable: false,
|
||||
droppable: false
|
||||
}
|
||||
});
|
||||
function SortableContext(_ref) {
|
||||
let {
|
||||
children,
|
||||
id,
|
||||
items: userDefinedItems,
|
||||
strategy = rectSortingStrategy,
|
||||
disabled: disabledProp = false
|
||||
} = _ref;
|
||||
const {
|
||||
active,
|
||||
dragOverlay,
|
||||
droppableRects,
|
||||
over,
|
||||
measureDroppableContainers
|
||||
} = useDndContext();
|
||||
const containerId = useUniqueId(ID_PREFIX, id);
|
||||
const useDragOverlay = Boolean(dragOverlay.rect !== null);
|
||||
const items = (0, import_react.useMemo)(() => userDefinedItems.map((item) => typeof item === "object" && "id" in item ? item.id : item), [userDefinedItems]);
|
||||
const isDragging = active != null;
|
||||
const activeIndex = active ? items.indexOf(active.id) : -1;
|
||||
const overIndex = over ? items.indexOf(over.id) : -1;
|
||||
const previousItemsRef = (0, import_react.useRef)(items);
|
||||
const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
|
||||
const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
|
||||
const disabled = normalizeDisabled(disabledProp);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
if (itemsHaveChanged && isDragging) {
|
||||
measureDroppableContainers(items);
|
||||
}
|
||||
}, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);
|
||||
(0, import_react.useEffect)(() => {
|
||||
previousItemsRef.current = items;
|
||||
}, [items]);
|
||||
const contextValue = (0, import_react.useMemo)(
|
||||
() => ({
|
||||
activeIndex,
|
||||
containerId,
|
||||
disabled,
|
||||
disableTransforms,
|
||||
items,
|
||||
overIndex,
|
||||
useDragOverlay,
|
||||
sortedRects: getSortedRects(items, droppableRects),
|
||||
strategy
|
||||
}),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]
|
||||
);
|
||||
return import_react.default.createElement(Context.Provider, {
|
||||
value: contextValue
|
||||
}, children);
|
||||
}
|
||||
var defaultNewIndexGetter = (_ref) => {
|
||||
let {
|
||||
id,
|
||||
items,
|
||||
activeIndex,
|
||||
overIndex
|
||||
} = _ref;
|
||||
return arrayMove(items, activeIndex, overIndex).indexOf(id);
|
||||
};
|
||||
var defaultAnimateLayoutChanges = (_ref2) => {
|
||||
let {
|
||||
containerId,
|
||||
isSorting,
|
||||
wasDragging,
|
||||
index,
|
||||
items,
|
||||
newIndex,
|
||||
previousItems,
|
||||
previousContainerId,
|
||||
transition
|
||||
} = _ref2;
|
||||
if (!transition || !wasDragging) {
|
||||
return false;
|
||||
}
|
||||
if (previousItems !== items && index === newIndex) {
|
||||
return false;
|
||||
}
|
||||
if (isSorting) {
|
||||
return true;
|
||||
}
|
||||
return newIndex !== index && containerId === previousContainerId;
|
||||
};
|
||||
var defaultTransition = {
|
||||
duration: 200,
|
||||
easing: "ease"
|
||||
};
|
||||
var transitionProperty = "transform";
|
||||
var disabledTransition = CSS.Transition.toString({
|
||||
property: transitionProperty,
|
||||
duration: 0,
|
||||
easing: "linear"
|
||||
});
|
||||
var defaultAttributes = {
|
||||
roleDescription: "sortable"
|
||||
};
|
||||
function useDerivedTransform(_ref) {
|
||||
let {
|
||||
disabled,
|
||||
index,
|
||||
node,
|
||||
rect
|
||||
} = _ref;
|
||||
const [derivedTransform, setDerivedtransform] = (0, import_react.useState)(null);
|
||||
const previousIndex = (0, import_react.useRef)(index);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
if (!disabled && index !== previousIndex.current && node.current) {
|
||||
const initial = rect.current;
|
||||
if (initial) {
|
||||
const current = getClientRect(node.current, {
|
||||
ignoreTransform: true
|
||||
});
|
||||
const delta = {
|
||||
x: initial.left - current.left,
|
||||
y: initial.top - current.top,
|
||||
scaleX: initial.width / current.width,
|
||||
scaleY: initial.height / current.height
|
||||
};
|
||||
if (delta.x || delta.y) {
|
||||
setDerivedtransform(delta);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (index !== previousIndex.current) {
|
||||
previousIndex.current = index;
|
||||
}
|
||||
}, [disabled, index, node, rect]);
|
||||
(0, import_react.useEffect)(() => {
|
||||
if (derivedTransform) {
|
||||
setDerivedtransform(null);
|
||||
}
|
||||
}, [derivedTransform]);
|
||||
return derivedTransform;
|
||||
}
|
||||
function useSortable(_ref) {
|
||||
let {
|
||||
animateLayoutChanges = defaultAnimateLayoutChanges,
|
||||
attributes: userDefinedAttributes,
|
||||
disabled: localDisabled,
|
||||
data: customData,
|
||||
getNewIndex = defaultNewIndexGetter,
|
||||
id,
|
||||
strategy: localStrategy,
|
||||
resizeObserverConfig,
|
||||
transition = defaultTransition
|
||||
} = _ref;
|
||||
const {
|
||||
items,
|
||||
containerId,
|
||||
activeIndex,
|
||||
disabled: globalDisabled,
|
||||
disableTransforms,
|
||||
sortedRects,
|
||||
overIndex,
|
||||
useDragOverlay,
|
||||
strategy: globalStrategy
|
||||
} = (0, import_react.useContext)(Context);
|
||||
const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
|
||||
const index = items.indexOf(id);
|
||||
const data = (0, import_react.useMemo)(() => ({
|
||||
sortable: {
|
||||
containerId,
|
||||
index,
|
||||
items
|
||||
},
|
||||
...customData
|
||||
}), [containerId, customData, index, items]);
|
||||
const itemsAfterCurrentSortable = (0, import_react.useMemo)(() => items.slice(items.indexOf(id)), [items, id]);
|
||||
const {
|
||||
rect,
|
||||
node,
|
||||
isOver,
|
||||
setNodeRef: setDroppableNodeRef
|
||||
} = useDroppable({
|
||||
id,
|
||||
data,
|
||||
disabled: disabled.droppable,
|
||||
resizeObserverConfig: {
|
||||
updateMeasurementsFor: itemsAfterCurrentSortable,
|
||||
...resizeObserverConfig
|
||||
}
|
||||
});
|
||||
const {
|
||||
active,
|
||||
activatorEvent,
|
||||
activeNodeRect,
|
||||
attributes,
|
||||
setNodeRef: setDraggableNodeRef,
|
||||
listeners,
|
||||
isDragging,
|
||||
over,
|
||||
setActivatorNodeRef,
|
||||
transform
|
||||
} = useDraggable({
|
||||
id,
|
||||
data,
|
||||
attributes: {
|
||||
...defaultAttributes,
|
||||
...userDefinedAttributes
|
||||
},
|
||||
disabled: disabled.draggable
|
||||
});
|
||||
const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
|
||||
const isSorting = Boolean(active);
|
||||
const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);
|
||||
const shouldDisplaceDragSource = !useDragOverlay && isDragging;
|
||||
const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;
|
||||
const strategy = localStrategy != null ? localStrategy : globalStrategy;
|
||||
const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({
|
||||
rects: sortedRects,
|
||||
activeNodeRect,
|
||||
activeIndex,
|
||||
overIndex,
|
||||
index
|
||||
}) : null;
|
||||
const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({
|
||||
id,
|
||||
items,
|
||||
activeIndex,
|
||||
overIndex
|
||||
}) : index;
|
||||
const activeId = active == null ? void 0 : active.id;
|
||||
const previous = (0, import_react.useRef)({
|
||||
activeId,
|
||||
items,
|
||||
newIndex,
|
||||
containerId
|
||||
});
|
||||
const itemsHaveChanged = items !== previous.current.items;
|
||||
const shouldAnimateLayoutChanges = animateLayoutChanges({
|
||||
active,
|
||||
containerId,
|
||||
isDragging,
|
||||
isSorting,
|
||||
id,
|
||||
index,
|
||||
items,
|
||||
newIndex: previous.current.newIndex,
|
||||
previousItems: previous.current.items,
|
||||
previousContainerId: previous.current.containerId,
|
||||
transition,
|
||||
wasDragging: previous.current.activeId != null
|
||||
});
|
||||
const derivedTransform = useDerivedTransform({
|
||||
disabled: !shouldAnimateLayoutChanges,
|
||||
index,
|
||||
node,
|
||||
rect
|
||||
});
|
||||
(0, import_react.useEffect)(() => {
|
||||
if (isSorting && previous.current.newIndex !== newIndex) {
|
||||
previous.current.newIndex = newIndex;
|
||||
}
|
||||
if (containerId !== previous.current.containerId) {
|
||||
previous.current.containerId = containerId;
|
||||
}
|
||||
if (items !== previous.current.items) {
|
||||
previous.current.items = items;
|
||||
}
|
||||
}, [isSorting, newIndex, containerId, items]);
|
||||
(0, import_react.useEffect)(() => {
|
||||
if (activeId === previous.current.activeId) {
|
||||
return;
|
||||
}
|
||||
if (activeId != null && previous.current.activeId == null) {
|
||||
previous.current.activeId = activeId;
|
||||
return;
|
||||
}
|
||||
const timeoutId = setTimeout(() => {
|
||||
previous.current.activeId = activeId;
|
||||
}, 50);
|
||||
return () => clearTimeout(timeoutId);
|
||||
}, [activeId]);
|
||||
return {
|
||||
active,
|
||||
activeIndex,
|
||||
attributes,
|
||||
data,
|
||||
rect,
|
||||
index,
|
||||
newIndex,
|
||||
items,
|
||||
isOver,
|
||||
isSorting,
|
||||
isDragging,
|
||||
listeners,
|
||||
node,
|
||||
overIndex,
|
||||
over,
|
||||
setNodeRef,
|
||||
setActivatorNodeRef,
|
||||
setDroppableNodeRef,
|
||||
setDraggableNodeRef,
|
||||
transform: derivedTransform != null ? derivedTransform : finalTransform,
|
||||
transition: getTransition()
|
||||
};
|
||||
function getTransition() {
|
||||
if (
|
||||
// Temporarily disable transitions for a single frame to set up derived transforms
|
||||
derivedTransform || // Or to prevent items jumping to back to their "new" position when items change
|
||||
itemsHaveChanged && previous.current.newIndex === index
|
||||
) {
|
||||
return disabledTransition;
|
||||
}
|
||||
if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {
|
||||
return void 0;
|
||||
}
|
||||
if (isSorting || shouldAnimateLayoutChanges) {
|
||||
return CSS.Transition.toString({
|
||||
...transition,
|
||||
property: transitionProperty
|
||||
});
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function normalizeLocalDisabled(localDisabled, globalDisabled) {
|
||||
var _localDisabled$dragga, _localDisabled$droppa;
|
||||
if (typeof localDisabled === "boolean") {
|
||||
return {
|
||||
draggable: localDisabled,
|
||||
// Backwards compatibility
|
||||
droppable: false
|
||||
};
|
||||
}
|
||||
return {
|
||||
draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,
|
||||
droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable
|
||||
};
|
||||
}
|
||||
function hasSortableData(entry) {
|
||||
if (!entry) {
|
||||
return false;
|
||||
}
|
||||
const data = entry.data.current;
|
||||
if (data && "sortable" in data && typeof data.sortable === "object" && "containerId" in data.sortable && "items" in data.sortable && "index" in data.sortable) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
|
||||
var sortableKeyboardCoordinates = (event, _ref) => {
|
||||
let {
|
||||
context: {
|
||||
active,
|
||||
collisionRect,
|
||||
droppableRects,
|
||||
droppableContainers,
|
||||
over,
|
||||
scrollableAncestors
|
||||
}
|
||||
} = _ref;
|
||||
if (directions.includes(event.code)) {
|
||||
event.preventDefault();
|
||||
if (!active || !collisionRect) {
|
||||
return;
|
||||
}
|
||||
const filteredContainers = [];
|
||||
droppableContainers.getEnabled().forEach((entry) => {
|
||||
if (!entry || entry != null && entry.disabled) {
|
||||
return;
|
||||
}
|
||||
const rect = droppableRects.get(entry.id);
|
||||
if (!rect) {
|
||||
return;
|
||||
}
|
||||
switch (event.code) {
|
||||
case KeyboardCode.Down:
|
||||
if (collisionRect.top < rect.top) {
|
||||
filteredContainers.push(entry);
|
||||
}
|
||||
break;
|
||||
case KeyboardCode.Up:
|
||||
if (collisionRect.top > rect.top) {
|
||||
filteredContainers.push(entry);
|
||||
}
|
||||
break;
|
||||
case KeyboardCode.Left:
|
||||
if (collisionRect.left > rect.left) {
|
||||
filteredContainers.push(entry);
|
||||
}
|
||||
break;
|
||||
case KeyboardCode.Right:
|
||||
if (collisionRect.left < rect.left) {
|
||||
filteredContainers.push(entry);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
const collisions = closestCorners({
|
||||
active,
|
||||
collisionRect,
|
||||
droppableRects,
|
||||
droppableContainers: filteredContainers,
|
||||
pointerCoordinates: null
|
||||
});
|
||||
let closestId = getFirstCollision(collisions, "id");
|
||||
if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {
|
||||
closestId = collisions[1].id;
|
||||
}
|
||||
if (closestId != null) {
|
||||
const activeDroppable = droppableContainers.get(active.id);
|
||||
const newDroppable = droppableContainers.get(closestId);
|
||||
const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;
|
||||
const newNode = newDroppable == null ? void 0 : newDroppable.node.current;
|
||||
if (newNode && newRect && activeDroppable && newDroppable) {
|
||||
const newScrollAncestors = getScrollableAncestors(newNode);
|
||||
const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);
|
||||
const hasSameContainer = isSameContainer(activeDroppable, newDroppable);
|
||||
const isAfterActive = isAfter(activeDroppable, newDroppable);
|
||||
const offset = hasDifferentScrollAncestors || !hasSameContainer ? {
|
||||
x: 0,
|
||||
y: 0
|
||||
} : {
|
||||
x: isAfterActive ? collisionRect.width - newRect.width : 0,
|
||||
y: isAfterActive ? collisionRect.height - newRect.height : 0
|
||||
};
|
||||
const rectCoordinates = {
|
||||
x: newRect.left,
|
||||
y: newRect.top
|
||||
};
|
||||
const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);
|
||||
return newCoordinates;
|
||||
}
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
function isSameContainer(a, b) {
|
||||
if (!hasSortableData(a) || !hasSortableData(b)) {
|
||||
return false;
|
||||
}
|
||||
return a.data.current.sortable.containerId === b.data.current.sortable.containerId;
|
||||
}
|
||||
function isAfter(a, b) {
|
||||
if (!hasSortableData(a) || !hasSortableData(b)) {
|
||||
return false;
|
||||
}
|
||||
if (!isSameContainer(a, b)) {
|
||||
return false;
|
||||
}
|
||||
return a.data.current.sortable.index < b.data.current.sortable.index;
|
||||
}
|
||||
export {
|
||||
SortableContext,
|
||||
arrayMove,
|
||||
arraySwap,
|
||||
defaultAnimateLayoutChanges,
|
||||
defaultNewIndexGetter,
|
||||
hasSortableData,
|
||||
horizontalListSortingStrategy,
|
||||
rectSortingStrategy,
|
||||
rectSwappingStrategy,
|
||||
sortableKeyboardCoordinates,
|
||||
useSortable,
|
||||
verticalListSortingStrategy
|
||||
};
|
||||
//# sourceMappingURL=@dnd-kit_sortable.js.map
|
||||
7
node_modules/.vite/deps/@dnd-kit_sortable.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@dnd-kit_sortable.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
57
node_modules/.vite/deps/@dnd-kit_utilities.js
generated
vendored
Normal file
57
node_modules/.vite/deps/@dnd-kit_utilities.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import {
|
||||
CSS,
|
||||
add,
|
||||
canUseDOM,
|
||||
findFirstFocusableNode,
|
||||
getEventCoordinates,
|
||||
getOwnerDocument,
|
||||
getWindow,
|
||||
hasViewportRelativeCoordinates,
|
||||
isDocument,
|
||||
isHTMLElement,
|
||||
isKeyboardEvent,
|
||||
isNode,
|
||||
isSVGElement,
|
||||
isTouchEvent,
|
||||
isWindow,
|
||||
subtract,
|
||||
useCombinedRefs,
|
||||
useEvent,
|
||||
useInterval,
|
||||
useIsomorphicLayoutEffect,
|
||||
useLatestValue,
|
||||
useLazyMemo,
|
||||
useNodeRef,
|
||||
usePrevious,
|
||||
useUniqueId
|
||||
} from "./chunk-BAWHRVBE.js";
|
||||
import "./chunk-3TFVT2CW.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
export {
|
||||
CSS,
|
||||
add,
|
||||
canUseDOM,
|
||||
findFirstFocusableNode,
|
||||
getEventCoordinates,
|
||||
getOwnerDocument,
|
||||
getWindow,
|
||||
hasViewportRelativeCoordinates,
|
||||
isDocument,
|
||||
isHTMLElement,
|
||||
isKeyboardEvent,
|
||||
isNode,
|
||||
isSVGElement,
|
||||
isTouchEvent,
|
||||
isWindow,
|
||||
subtract,
|
||||
useCombinedRefs,
|
||||
useEvent,
|
||||
useInterval,
|
||||
useIsomorphicLayoutEffect,
|
||||
useLatestValue,
|
||||
useLazyMemo,
|
||||
useNodeRef,
|
||||
usePrevious,
|
||||
useUniqueId
|
||||
};
|
||||
//# sourceMappingURL=@dnd-kit_utilities.js.map
|
||||
7
node_modules/.vite/deps/@dnd-kit_utilities.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@dnd-kit_utilities.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
2
node_modules/.vite/deps/@hookform_resolvers_zod.js
generated
vendored
2
node_modules/.vite/deps/@hookform_resolvers_zod.js
generated
vendored
|
|
@ -2,7 +2,7 @@ import {
|
|||
appendErrors,
|
||||
get,
|
||||
set
|
||||
} from "./chunk-HQGJFDI6.js";
|
||||
} from "./chunk-RBMNEPGM.js";
|
||||
import "./chunk-3TFVT2CW.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
|
||||
|
|
|
|||
1039
node_modules/.vite/deps/@radix-ui_react-alert-dialog.js
generated
vendored
1039
node_modules/.vite/deps/@radix-ui_react-alert-dialog.js
generated
vendored
File diff suppressed because it is too large
Load diff
8
node_modules/.vite/deps/@radix-ui_react-alert-dialog.js.map
generated
vendored
8
node_modules/.vite/deps/@radix-ui_react-alert-dialog.js.map
generated
vendored
File diff suppressed because one or more lines are too long
36
node_modules/.vite/deps/@radix-ui_react-checkbox.js
generated
vendored
36
node_modules/.vite/deps/@radix-ui_react-checkbox.js
generated
vendored
|
|
@ -4,19 +4,17 @@ import {
|
|||
} from "./chunk-DDW565K2.js";
|
||||
import {
|
||||
useSize
|
||||
} from "./chunk-MR3TNHRB.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
} from "./chunk-AJMUNMLZ.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -51,12 +49,13 @@ var Checkbox = React.forwardRef(
|
|||
disabled,
|
||||
value = "on",
|
||||
onCheckedChange,
|
||||
form,
|
||||
...checkboxProps
|
||||
} = props;
|
||||
const [button, setButton] = React.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
||||
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
||||
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
||||
const isFormControl = button ? form || !!button.closest("form") : true;
|
||||
const [checked = false, setChecked] = useControllableState({
|
||||
prop: checkedProp,
|
||||
defaultProp: defaultChecked,
|
||||
|
|
@ -64,11 +63,11 @@ var Checkbox = React.forwardRef(
|
|||
});
|
||||
const initialCheckedStateRef = React.useRef(checked);
|
||||
React.useEffect(() => {
|
||||
const form = button == null ? void 0 : button.form;
|
||||
if (form) {
|
||||
const form2 = button == null ? void 0 : button.form;
|
||||
if (form2) {
|
||||
const reset = () => setChecked(initialCheckedStateRef.current);
|
||||
form.addEventListener("reset", reset);
|
||||
return () => form.removeEventListener("reset", reset);
|
||||
form2.addEventListener("reset", reset);
|
||||
return () => form2.removeEventListener("reset", reset);
|
||||
}
|
||||
}, [button, setChecked]);
|
||||
return (0, import_jsx_runtime.jsxs)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: [
|
||||
|
|
@ -107,7 +106,9 @@ var Checkbox = React.forwardRef(
|
|||
checked,
|
||||
required,
|
||||
disabled,
|
||||
style: { transform: "translateX(-100%)" }
|
||||
form,
|
||||
style: { transform: "translateX(-100%)" },
|
||||
defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked
|
||||
}
|
||||
)
|
||||
] });
|
||||
|
|
@ -133,7 +134,7 @@ var CheckboxIndicator = React.forwardRef(
|
|||
);
|
||||
CheckboxIndicator.displayName = INDICATOR_NAME;
|
||||
var BubbleInput = (props) => {
|
||||
const { control, checked, bubbles = true, ...inputProps } = props;
|
||||
const { control, checked, bubbles = true, defaultChecked, ...inputProps } = props;
|
||||
const ref = React.useRef(null);
|
||||
const prevChecked = usePrevious(checked);
|
||||
const controlSize = useSize(control);
|
||||
|
|
@ -149,12 +150,13 @@ var BubbleInput = (props) => {
|
|||
input.dispatchEvent(event);
|
||||
}
|
||||
}, [prevChecked, checked, bubbles]);
|
||||
const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
"input",
|
||||
{
|
||||
type: "checkbox",
|
||||
"aria-hidden": true,
|
||||
defaultChecked: isIndeterminate(checked) ? false : checked,
|
||||
defaultChecked: defaultChecked ?? defaultCheckedRef.current,
|
||||
...inputProps,
|
||||
tabIndex: -1,
|
||||
ref,
|
||||
|
|
|
|||
6
node_modules/.vite/deps/@radix-ui_react-checkbox.js.map
generated
vendored
6
node_modules/.vite/deps/@radix-ui_react-checkbox.js.map
generated
vendored
File diff suppressed because one or more lines are too long
14
node_modules/.vite/deps/@radix-ui_react-collapsible.js
generated
vendored
14
node_modules/.vite/deps/@radix-ui_react-collapsible.js
generated
vendored
|
|
@ -1,20 +1,18 @@
|
|||
"use client";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-5I6CIHEW.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
} from "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
|
|||
2
node_modules/.vite/deps/@radix-ui_react-collapsible.js.map
generated
vendored
2
node_modules/.vite/deps/@radix-ui_react-collapsible.js.map
generated
vendored
File diff suppressed because one or more lines are too long
958
node_modules/.vite/deps/@radix-ui_react-dialog.js
generated
vendored
958
node_modules/.vite/deps/@radix-ui_react-dialog.js
generated
vendored
|
|
@ -1,932 +1,36 @@
|
|||
"use client";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal
|
||||
} from "./chunk-JV5O627A.js";
|
||||
import {
|
||||
FocusScope,
|
||||
RemoveScrollBar,
|
||||
__assign,
|
||||
__rest,
|
||||
__spreadArray,
|
||||
createSidecarMedium,
|
||||
exportSidecar,
|
||||
fullWidthClassName,
|
||||
hideOthers,
|
||||
styleSingleton,
|
||||
useMergeRefs,
|
||||
zeroRightClassName
|
||||
} from "./chunk-QYKEMCE4.js";
|
||||
import "./chunk-J3JCCWF4.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-5I6CIHEW.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
Close,
|
||||
Content,
|
||||
Description,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogOverlay,
|
||||
DialogPortal,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
Overlay,
|
||||
Portal,
|
||||
Root,
|
||||
Title,
|
||||
Trigger,
|
||||
WarningProvider,
|
||||
createDialogScope
|
||||
} from "./chunk-HD7ZGEUK.js";
|
||||
import "./chunk-3PHEZ67U.js";
|
||||
import "./chunk-CSR2432P.js";
|
||||
import "./chunk-ZZUMGTHG.js";
|
||||
import "./chunk-MZLEVI2I.js";
|
||||
import "./chunk-I6MWER2B.js";
|
||||
import "./chunk-ILYE3ZA7.js";
|
||||
import "./chunk-H55D7VYG.js";
|
||||
import "./chunk-R6S4VRB5.js";
|
||||
import {
|
||||
Slot,
|
||||
useComposedRefs
|
||||
} from "./chunk-4WIT4MX7.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-S77I6LSE.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/dist/index.mjs
|
||||
var React8 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
var _a;
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
var _a;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React3.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var Presence = (props) => {
|
||||
const { present, children } = props;
|
||||
const presence = usePresence(present);
|
||||
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
|
||||
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
||||
const forceMount = typeof children === "function";
|
||||
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
|
||||
};
|
||||
Presence.displayName = "Presence";
|
||||
function usePresence(present) {
|
||||
const [node, setNode] = React2.useState();
|
||||
const stylesRef = React2.useRef({});
|
||||
const prevPresentRef = React2.useRef(present);
|
||||
const prevAnimationNameRef = React2.useRef("none");
|
||||
const initialState = present ? "mounted" : "unmounted";
|
||||
const [state, send] = useStateMachine(initialState, {
|
||||
mounted: {
|
||||
UNMOUNT: "unmounted",
|
||||
ANIMATION_OUT: "unmountSuspended"
|
||||
},
|
||||
unmountSuspended: {
|
||||
MOUNT: "mounted",
|
||||
ANIMATION_END: "unmounted"
|
||||
},
|
||||
unmounted: {
|
||||
MOUNT: "mounted"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
||||
}, [state]);
|
||||
useLayoutEffect2(() => {
|
||||
const styles = stylesRef.current;
|
||||
const wasPresent = prevPresentRef.current;
|
||||
const hasPresentChanged = wasPresent !== present;
|
||||
if (hasPresentChanged) {
|
||||
const prevAnimationName = prevAnimationNameRef.current;
|
||||
const currentAnimationName = getAnimationName(styles);
|
||||
if (present) {
|
||||
send("MOUNT");
|
||||
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
||||
send("UNMOUNT");
|
||||
} else {
|
||||
const isAnimating = prevAnimationName !== currentAnimationName;
|
||||
if (wasPresent && isAnimating) {
|
||||
send("ANIMATION_OUT");
|
||||
} else {
|
||||
send("UNMOUNT");
|
||||
}
|
||||
}
|
||||
prevPresentRef.current = present;
|
||||
}
|
||||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
if (event.target === node) {
|
||||
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
||||
}
|
||||
};
|
||||
node.addEventListener("animationstart", handleAnimationStart);
|
||||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
};
|
||||
} else {
|
||||
send("ANIMATION_END");
|
||||
}
|
||||
}, [node, send]);
|
||||
return {
|
||||
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
||||
ref: React2.useCallback((node2) => {
|
||||
if (node2) stylesRef.current = getComputedStyle(node2);
|
||||
setNode(node2);
|
||||
}, [])
|
||||
};
|
||||
}
|
||||
function getAnimationName(styles) {
|
||||
return (styles == null ? void 0 : styles.animationName) || "none";
|
||||
}
|
||||
function getElementRef(element) {
|
||||
var _a, _b;
|
||||
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
var count = 0;
|
||||
function useFocusGuards() {
|
||||
React4.useEffect(() => {
|
||||
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
||||
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
||||
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
||||
count++;
|
||||
return () => {
|
||||
if (count === 1) {
|
||||
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
||||
}
|
||||
count--;
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
function createFocusGuard() {
|
||||
const element = document.createElement("span");
|
||||
element.setAttribute("data-radix-focus-guard", "");
|
||||
element.tabIndex = 0;
|
||||
element.style.outline = "none";
|
||||
element.style.opacity = "0";
|
||||
element.style.position = "fixed";
|
||||
element.style.pointerEvents = "none";
|
||||
return element;
|
||||
}
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
||||
var React7 = __toESM(require_react());
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
||||
var React5 = __toESM(require_react());
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/medium.js
|
||||
var effectCar = createSidecarMedium();
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
||||
var nothing = function() {
|
||||
return;
|
||||
};
|
||||
var RemoveScroll = React5.forwardRef(function(props, parentRef) {
|
||||
var ref = React5.useRef(null);
|
||||
var _a = React5.useState({
|
||||
onScrollCapture: nothing,
|
||||
onWheelCapture: nothing,
|
||||
onTouchMoveCapture: nothing
|
||||
}), callbacks = _a[0], setCallbacks = _a[1];
|
||||
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
||||
var SideCar = sideCar;
|
||||
var containerRef = useMergeRefs([ref, parentRef]);
|
||||
var containerProps = __assign(__assign({}, rest), callbacks);
|
||||
return React5.createElement(
|
||||
React5.Fragment,
|
||||
null,
|
||||
enabled && React5.createElement(SideCar, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
||||
forwardProps ? React5.cloneElement(React5.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React5.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
||||
);
|
||||
});
|
||||
RemoveScroll.defaultProps = {
|
||||
enabled: true,
|
||||
removeScrollBar: true,
|
||||
inert: false
|
||||
};
|
||||
RemoveScroll.classNames = {
|
||||
fullWidth: fullWidthClassName,
|
||||
zeroRight: zeroRightClassName
|
||||
};
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
||||
var React6 = __toESM(require_react());
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
||||
var passiveSupported = false;
|
||||
if (typeof window !== "undefined") {
|
||||
try {
|
||||
options = Object.defineProperty({}, "passive", {
|
||||
get: function() {
|
||||
passiveSupported = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
window.addEventListener("test", options, options);
|
||||
window.removeEventListener("test", options, options);
|
||||
} catch (err) {
|
||||
passiveSupported = false;
|
||||
}
|
||||
}
|
||||
var options;
|
||||
var nonPassive = passiveSupported ? { passive: false } : false;
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
||||
var alwaysContainsScroll = function(node) {
|
||||
return node.tagName === "TEXTAREA";
|
||||
};
|
||||
var elementCanBeScrolled = function(node, overflow) {
|
||||
if (!(node instanceof Element)) {
|
||||
return false;
|
||||
}
|
||||
var styles = window.getComputedStyle(node);
|
||||
return (
|
||||
// not-not-scrollable
|
||||
styles[overflow] !== "hidden" && // contains scroll inside self
|
||||
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
|
||||
);
|
||||
};
|
||||
var elementCouldBeVScrolled = function(node) {
|
||||
return elementCanBeScrolled(node, "overflowY");
|
||||
};
|
||||
var elementCouldBeHScrolled = function(node) {
|
||||
return elementCanBeScrolled(node, "overflowX");
|
||||
};
|
||||
var locationCouldBeScrolled = function(axis, node) {
|
||||
var ownerDocument = node.ownerDocument;
|
||||
var current = node;
|
||||
do {
|
||||
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
||||
current = current.host;
|
||||
}
|
||||
var isScrollable = elementCouldBeScrolled(axis, current);
|
||||
if (isScrollable) {
|
||||
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
||||
if (scrollHeight > clientHeight) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
current = current.parentNode;
|
||||
} while (current && current !== ownerDocument.body);
|
||||
return false;
|
||||
};
|
||||
var getVScrollVariables = function(_a) {
|
||||
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
||||
return [
|
||||
scrollTop,
|
||||
scrollHeight,
|
||||
clientHeight
|
||||
];
|
||||
};
|
||||
var getHScrollVariables = function(_a) {
|
||||
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
||||
return [
|
||||
scrollLeft,
|
||||
scrollWidth,
|
||||
clientWidth
|
||||
];
|
||||
};
|
||||
var elementCouldBeScrolled = function(axis, node) {
|
||||
return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
||||
};
|
||||
var getScrollVariables = function(axis, node) {
|
||||
return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
|
||||
};
|
||||
var getDirectionFactor = function(axis, direction) {
|
||||
return axis === "h" && direction === "rtl" ? -1 : 1;
|
||||
};
|
||||
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
||||
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
||||
var delta = directionFactor * sourceDelta;
|
||||
var target = event.target;
|
||||
var targetInLock = endTarget.contains(target);
|
||||
var shouldCancelScroll = false;
|
||||
var isDeltaPositive = delta > 0;
|
||||
var availableScroll = 0;
|
||||
var availableScrollTop = 0;
|
||||
do {
|
||||
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
||||
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
||||
if (position || elementScroll) {
|
||||
if (elementCouldBeScrolled(axis, target)) {
|
||||
availableScroll += elementScroll;
|
||||
availableScrollTop += position;
|
||||
}
|
||||
}
|
||||
if (target instanceof ShadowRoot) {
|
||||
target = target.host;
|
||||
} else {
|
||||
target = target.parentNode;
|
||||
}
|
||||
} while (
|
||||
// portaled content
|
||||
!targetInLock && target !== document.body || // self content
|
||||
targetInLock && (endTarget.contains(target) || endTarget === target)
|
||||
);
|
||||
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
||||
shouldCancelScroll = true;
|
||||
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
||||
shouldCancelScroll = true;
|
||||
}
|
||||
return shouldCancelScroll;
|
||||
};
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
||||
var getTouchXY = function(event) {
|
||||
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
||||
};
|
||||
var getDeltaXY = function(event) {
|
||||
return [event.deltaX, event.deltaY];
|
||||
};
|
||||
var extractRef = function(ref) {
|
||||
return ref && "current" in ref ? ref.current : ref;
|
||||
};
|
||||
var deltaCompare = function(x, y) {
|
||||
return x[0] === y[0] && x[1] === y[1];
|
||||
};
|
||||
var generateStyle = function(id) {
|
||||
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
||||
};
|
||||
var idCounter = 0;
|
||||
var lockStack = [];
|
||||
function RemoveScrollSideCar(props) {
|
||||
var shouldPreventQueue = React6.useRef([]);
|
||||
var touchStartRef = React6.useRef([0, 0]);
|
||||
var activeAxis = React6.useRef();
|
||||
var id = React6.useState(idCounter++)[0];
|
||||
var Style = React6.useState(styleSingleton)[0];
|
||||
var lastProps = React6.useRef(props);
|
||||
React6.useEffect(function() {
|
||||
lastProps.current = props;
|
||||
}, [props]);
|
||||
React6.useEffect(function() {
|
||||
if (props.inert) {
|
||||
document.body.classList.add("block-interactivity-".concat(id));
|
||||
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
||||
allow_1.forEach(function(el) {
|
||||
return el.classList.add("allow-interactivity-".concat(id));
|
||||
});
|
||||
return function() {
|
||||
document.body.classList.remove("block-interactivity-".concat(id));
|
||||
allow_1.forEach(function(el) {
|
||||
return el.classList.remove("allow-interactivity-".concat(id));
|
||||
});
|
||||
};
|
||||
}
|
||||
return;
|
||||
}, [props.inert, props.lockRef.current, props.shards]);
|
||||
var shouldCancelEvent = React6.useCallback(function(event, parent) {
|
||||
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
||||
return !lastProps.current.allowPinchZoom;
|
||||
}
|
||||
var touch = getTouchXY(event);
|
||||
var touchStart = touchStartRef.current;
|
||||
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
||||
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
||||
var currentAxis;
|
||||
var target = event.target;
|
||||
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
||||
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
||||
return false;
|
||||
}
|
||||
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
||||
if (!canBeScrolledInMainDirection) {
|
||||
return true;
|
||||
}
|
||||
if (canBeScrolledInMainDirection) {
|
||||
currentAxis = moveDirection;
|
||||
} else {
|
||||
currentAxis = moveDirection === "v" ? "h" : "v";
|
||||
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
||||
}
|
||||
if (!canBeScrolledInMainDirection) {
|
||||
return false;
|
||||
}
|
||||
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
||||
activeAxis.current = currentAxis;
|
||||
}
|
||||
if (!currentAxis) {
|
||||
return true;
|
||||
}
|
||||
var cancelingAxis = activeAxis.current || currentAxis;
|
||||
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
||||
}, []);
|
||||
var shouldPrevent = React6.useCallback(function(_event) {
|
||||
var event = _event;
|
||||
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
||||
return;
|
||||
}
|
||||
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
||||
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
||||
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
||||
})[0];
|
||||
if (sourceEvent && sourceEvent.should) {
|
||||
if (event.cancelable) {
|
||||
event.preventDefault();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!sourceEvent) {
|
||||
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
|
||||
return node.contains(event.target);
|
||||
});
|
||||
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
||||
if (shouldStop) {
|
||||
if (event.cancelable) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
var shouldCancel = React6.useCallback(function(name, delta, target, should) {
|
||||
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
||||
shouldPreventQueue.current.push(event);
|
||||
setTimeout(function() {
|
||||
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
||||
return e !== event;
|
||||
});
|
||||
}, 1);
|
||||
}, []);
|
||||
var scrollTouchStart = React6.useCallback(function(event) {
|
||||
touchStartRef.current = getTouchXY(event);
|
||||
activeAxis.current = void 0;
|
||||
}, []);
|
||||
var scrollWheel = React6.useCallback(function(event) {
|
||||
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
||||
}, []);
|
||||
var scrollTouchMove = React6.useCallback(function(event) {
|
||||
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
||||
}, []);
|
||||
React6.useEffect(function() {
|
||||
lockStack.push(Style);
|
||||
props.setCallbacks({
|
||||
onScrollCapture: scrollWheel,
|
||||
onWheelCapture: scrollWheel,
|
||||
onTouchMoveCapture: scrollTouchMove
|
||||
});
|
||||
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
||||
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
||||
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
||||
return function() {
|
||||
lockStack = lockStack.filter(function(inst) {
|
||||
return inst !== Style;
|
||||
});
|
||||
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
||||
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
||||
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
||||
};
|
||||
}, []);
|
||||
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
||||
return React6.createElement(
|
||||
React6.Fragment,
|
||||
null,
|
||||
inert ? React6.createElement(Style, { styles: generateStyle(id) }) : null,
|
||||
removeScrollBar ? React6.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null
|
||||
);
|
||||
}
|
||||
function getOutermostShadowParent(node) {
|
||||
var shadowParent = null;
|
||||
while (node !== null) {
|
||||
if (node instanceof ShadowRoot) {
|
||||
shadowParent = node.host;
|
||||
node = node.host;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
return shadowParent;
|
||||
}
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
||||
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
||||
|
||||
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
||||
var ReactRemoveScroll = React7.forwardRef(function(props, ref) {
|
||||
return React7.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
||||
});
|
||||
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
||||
var Combination_default = ReactRemoveScroll;
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/dist/index.mjs
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var DIALOG_NAME = "Dialog";
|
||||
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
||||
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
||||
var Dialog = (props) => {
|
||||
const {
|
||||
__scopeDialog,
|
||||
children,
|
||||
open: openProp,
|
||||
defaultOpen,
|
||||
onOpenChange,
|
||||
modal = true
|
||||
} = props;
|
||||
const triggerRef = React8.useRef(null);
|
||||
const contentRef = React8.useRef(null);
|
||||
const [open = false, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
onChange: onOpenChange
|
||||
});
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
DialogProvider,
|
||||
{
|
||||
scope: __scopeDialog,
|
||||
triggerRef,
|
||||
contentRef,
|
||||
contentId: useId(),
|
||||
titleId: useId(),
|
||||
descriptionId: useId(),
|
||||
open,
|
||||
onOpenChange: setOpen,
|
||||
onOpenToggle: React8.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
||||
modal,
|
||||
children
|
||||
}
|
||||
);
|
||||
};
|
||||
Dialog.displayName = DIALOG_NAME;
|
||||
var TRIGGER_NAME = "DialogTrigger";
|
||||
var DialogTrigger = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...triggerProps } = props;
|
||||
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
||||
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
"aria-haspopup": "dialog",
|
||||
"aria-expanded": context.open,
|
||||
"aria-controls": context.contentId,
|
||||
"data-state": getState(context.open),
|
||||
...triggerProps,
|
||||
ref: composedTriggerRef,
|
||||
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "DialogPortal";
|
||||
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
||||
forceMount: void 0
|
||||
});
|
||||
var DialogPortal = (props) => {
|
||||
const { __scopeDialog, forceMount, children, container } = props;
|
||||
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime2.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React8.Children.map(children, (child) => (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
||||
};
|
||||
DialogPortal.displayName = PORTAL_NAME;
|
||||
var OVERLAY_NAME = "DialogOverlay";
|
||||
var DialogOverlay = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
return context.modal ? (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
||||
}
|
||||
);
|
||||
DialogOverlay.displayName = OVERLAY_NAME;
|
||||
var DialogOverlayImpl = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
||||
return (
|
||||
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
||||
// ie. when `Overlay` and `Content` are siblings
|
||||
(0, import_jsx_runtime2.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime2.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-state": getState(context.open),
|
||||
...overlayProps,
|
||||
ref: forwardedRef,
|
||||
style: { pointerEvents: "auto", ...overlayProps.style }
|
||||
}
|
||||
) })
|
||||
);
|
||||
}
|
||||
);
|
||||
var CONTENT_NAME = "DialogContent";
|
||||
var DialogContent = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
return (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime2.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime2.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
DialogContent.displayName = CONTENT_NAME;
|
||||
var DialogContentModal = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const contentRef = React8.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
||||
React8.useEffect(() => {
|
||||
const content = contentRef.current;
|
||||
if (content) return hideOthers(content);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: composedRefs,
|
||||
trapFocus: context.open,
|
||||
disableOutsidePointerEvents: true,
|
||||
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
||||
var _a;
|
||||
event.preventDefault();
|
||||
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
||||
}),
|
||||
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
||||
const originalEvent = event.detail.originalEvent;
|
||||
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
||||
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
||||
if (isRightClick) event.preventDefault();
|
||||
}),
|
||||
onFocusOutside: composeEventHandlers(
|
||||
props.onFocusOutside,
|
||||
(event) => event.preventDefault()
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentNonModal = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const hasInteractedOutsideRef = React8.useRef(false);
|
||||
const hasPointerDownOutsideRef = React8.useRef(false);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: forwardedRef,
|
||||
trapFocus: false,
|
||||
disableOutsidePointerEvents: false,
|
||||
onCloseAutoFocus: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
hasInteractedOutsideRef.current = false;
|
||||
hasPointerDownOutsideRef.current = false;
|
||||
},
|
||||
onInteractOutside: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
hasInteractedOutsideRef.current = true;
|
||||
if (event.detail.originalEvent.type === "pointerdown") {
|
||||
hasPointerDownOutsideRef.current = true;
|
||||
}
|
||||
}
|
||||
const target = event.target;
|
||||
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
||||
if (targetIsTrigger) event.preventDefault();
|
||||
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentImpl = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
||||
const contentRef = React8.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
||||
useFocusGuards();
|
||||
return (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
||||
(0, import_jsx_runtime2.jsx)(
|
||||
FocusScope,
|
||||
{
|
||||
asChild: true,
|
||||
loop: true,
|
||||
trapped: trapFocus,
|
||||
onMountAutoFocus: onOpenAutoFocus,
|
||||
onUnmountAutoFocus: onCloseAutoFocus,
|
||||
children: (0, import_jsx_runtime2.jsx)(
|
||||
DismissableLayer,
|
||||
{
|
||||
role: "dialog",
|
||||
id: context.contentId,
|
||||
"aria-describedby": context.descriptionId,
|
||||
"aria-labelledby": context.titleId,
|
||||
"data-state": getState(context.open),
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
onDismiss: () => context.onOpenChange(false)
|
||||
}
|
||||
)
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
||||
(0, import_jsx_runtime2.jsx)(TitleWarning, { titleId: context.titleId }),
|
||||
(0, import_jsx_runtime2.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
||||
] })
|
||||
] });
|
||||
}
|
||||
);
|
||||
var TITLE_NAME = "DialogTitle";
|
||||
var DialogTitle = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...titleProps } = props;
|
||||
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime2.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "DialogDescription";
|
||||
var DialogDescription = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...descriptionProps } = props;
|
||||
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime2.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogDescription.displayName = DESCRIPTION_NAME;
|
||||
var CLOSE_NAME = "DialogClose";
|
||||
var DialogClose = React8.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...closeProps } = props;
|
||||
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
...closeProps,
|
||||
ref: forwardedRef,
|
||||
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogClose.displayName = CLOSE_NAME;
|
||||
function getState(open) {
|
||||
return open ? "open" : "closed";
|
||||
}
|
||||
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
||||
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
||||
contentName: CONTENT_NAME,
|
||||
titleName: TITLE_NAME,
|
||||
docsSlug: "dialog"
|
||||
});
|
||||
var TitleWarning = ({ titleId }) => {
|
||||
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
||||
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
||||
|
||||
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
||||
React8.useEffect(() => {
|
||||
if (titleId) {
|
||||
const hasTitle = document.getElementById(titleId);
|
||||
if (!hasTitle) console.error(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, titleId]);
|
||||
return null;
|
||||
};
|
||||
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
||||
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
||||
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
||||
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
||||
React8.useEffect(() => {
|
||||
var _a;
|
||||
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
||||
if (descriptionId && describedById) {
|
||||
const hasDescription = document.getElementById(descriptionId);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, contentRef, descriptionId]);
|
||||
return null;
|
||||
};
|
||||
var Root = Dialog;
|
||||
var Trigger = DialogTrigger;
|
||||
var Portal2 = DialogPortal;
|
||||
var Overlay = DialogOverlay;
|
||||
var Content = DialogContent;
|
||||
var Title = DialogTitle;
|
||||
var Description = DialogDescription;
|
||||
var Close = DialogClose;
|
||||
import "./chunk-4WIT4MX7.js";
|
||||
import "./chunk-S77I6LSE.js";
|
||||
import "./chunk-3TFVT2CW.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
export {
|
||||
Close,
|
||||
Content,
|
||||
|
|
@ -940,7 +44,7 @@ export {
|
|||
DialogTitle,
|
||||
DialogTrigger,
|
||||
Overlay,
|
||||
Portal2 as Portal,
|
||||
Portal,
|
||||
Root,
|
||||
Title,
|
||||
Trigger,
|
||||
|
|
|
|||
8
node_modules/.vite/deps/@radix-ui_react-dialog.js.map
generated
vendored
8
node_modules/.vite/deps/@radix-ui_react-dialog.js.map
generated
vendored
File diff suppressed because one or more lines are too long
893
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js
generated
vendored
893
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js
generated
vendored
File diff suppressed because it is too large
Load diff
8
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js.map
generated
vendored
8
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js.map
generated
vendored
File diff suppressed because one or more lines are too long
28
node_modules/.vite/deps/@radix-ui_react-radio-group.js
generated
vendored
28
node_modules/.vite/deps/@radix-ui_react-radio-group.js
generated
vendored
|
|
@ -6,27 +6,25 @@ import {
|
|||
Item,
|
||||
Root,
|
||||
createRovingFocusGroupScope
|
||||
} from "./chunk-ENGL2KVA.js";
|
||||
} from "./chunk-5ZUJRVG4.js";
|
||||
import "./chunk-6SPNF6KQ.js";
|
||||
import {
|
||||
useSize
|
||||
} from "./chunk-MR3TNHRB.js";
|
||||
import "./chunk-5I6CIHEW.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
useDirection
|
||||
} from "./chunk-O2UA4OQB.js";
|
||||
import {
|
||||
useSize
|
||||
} from "./chunk-AJMUNMLZ.js";
|
||||
import "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -62,12 +60,13 @@ var Radio = React.forwardRef(
|
|||
disabled,
|
||||
value = "on",
|
||||
onCheck,
|
||||
form,
|
||||
...radioProps
|
||||
} = props;
|
||||
const [button, setButton] = React.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
||||
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
||||
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
||||
const isFormControl = button ? form || !!button.closest("form") : true;
|
||||
return (0, import_jsx_runtime.jsxs)(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
||||
(0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
|
|
@ -100,6 +99,7 @@ var Radio = React.forwardRef(
|
|||
checked,
|
||||
required,
|
||||
disabled,
|
||||
form,
|
||||
style: { transform: "translateX(-100%)" }
|
||||
}
|
||||
)
|
||||
|
|
|
|||
4
node_modules/.vite/deps/@radix-ui_react-radio-group.js.map
generated
vendored
4
node_modules/.vite/deps/@radix-ui_react-radio-group.js.map
generated
vendored
File diff suppressed because one or more lines are too long
50
node_modules/.vite/deps/@radix-ui_react-scroll-area.js
generated
vendored
50
node_modules/.vite/deps/@radix-ui_react-scroll-area.js
generated
vendored
|
|
@ -7,15 +7,13 @@ import {
|
|||
} from "./chunk-O2UA4OQB.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
import {
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -111,7 +109,7 @@ ScrollArea.displayName = SCROLL_AREA_NAME;
|
|||
var VIEWPORT_NAME = "ScrollAreaViewport";
|
||||
var ScrollAreaViewport = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
|
||||
const { __scopeScrollArea, children, asChild, nonce, ...viewportProps } = props;
|
||||
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
||||
|
|
@ -120,7 +118,24 @@ var ScrollAreaViewport = React2.forwardRef(
|
|||
"style",
|
||||
{
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
|
||||
__html: `
|
||||
[data-radix-scroll-area-viewport] {
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
[data-radix-scroll-area-viewport]::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
:where([data-radix-scroll-area-viewport]) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
:where([data-radix-scroll-area-content]) {
|
||||
flex-grow: 1;
|
||||
}
|
||||
`
|
||||
},
|
||||
nonce
|
||||
}
|
||||
|
|
@ -130,12 +145,13 @@ var ScrollAreaViewport = React2.forwardRef(
|
|||
{
|
||||
"data-radix-scroll-area-viewport": "",
|
||||
...viewportProps,
|
||||
asChild,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
/**
|
||||
* We don't support `visible` because the intention is to have at least one scrollbar
|
||||
* if this component is used and `visible` will behave like `auto` in that case
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
|
||||
*
|
||||
* We don't handle `auto` because the intention is for the native implementation
|
||||
* to be hidden if using this component. We just want to ensure the node is scrollable
|
||||
|
|
@ -147,7 +163,15 @@ var ScrollAreaViewport = React2.forwardRef(
|
|||
overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
|
||||
...props.style
|
||||
},
|
||||
children: (0, import_jsx_runtime.jsx)("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children })
|
||||
children: getSubtree({ asChild, children }, (children2) => (0, import_jsx_runtime.jsx)(
|
||||
"div",
|
||||
{
|
||||
"data-radix-scroll-area-content": "",
|
||||
ref: context.onContentChange,
|
||||
style: { minWidth: context.scrollbarXEnabled ? "fit-content" : void 0 },
|
||||
children: children2
|
||||
}
|
||||
))
|
||||
}
|
||||
)
|
||||
] });
|
||||
|
|
@ -740,6 +764,14 @@ function useResizeObserver(element, onResize) {
|
|||
}
|
||||
}, [element, handleResize]);
|
||||
}
|
||||
function getSubtree(options, content) {
|
||||
const { asChild, children } = options;
|
||||
if (!asChild) return typeof content === "function" ? content(children) : content;
|
||||
const firstChild = React2.Children.only(children);
|
||||
return React2.cloneElement(firstChild, {
|
||||
children: typeof content === "function" ? content(firstChild.props.children) : content
|
||||
});
|
||||
}
|
||||
var Root = ScrollArea;
|
||||
var Viewport = ScrollAreaViewport;
|
||||
var Scrollbar = ScrollAreaScrollbar;
|
||||
|
|
|
|||
6
node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map
generated
vendored
6
node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map
generated
vendored
File diff suppressed because one or more lines are too long
949
node_modules/.vite/deps/@radix-ui_react-select.js
generated
vendored
949
node_modules/.vite/deps/@radix-ui_react-select.js
generated
vendored
File diff suppressed because it is too large
Load diff
8
node_modules/.vite/deps/@radix-ui_react-select.js.map
generated
vendored
8
node_modules/.vite/deps/@radix-ui_react-select.js.map
generated
vendored
File diff suppressed because one or more lines are too long
46
node_modules/.vite/deps/@radix-ui_react-separator.js
generated
vendored
46
node_modules/.vite/deps/@radix-ui_react-separator.js
generated
vendored
|
|
@ -1,46 +0,0 @@
|
|||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
import "./chunk-R6S4VRB5.js";
|
||||
import "./chunk-4WIT4MX7.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-S77I6LSE.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-separator/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var NAME = "Separator";
|
||||
var DEFAULT_ORIENTATION = "horizontal";
|
||||
var ORIENTATIONS = ["horizontal", "vertical"];
|
||||
var Separator = React.forwardRef((props, forwardedRef) => {
|
||||
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
||||
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
||||
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
||||
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-orientation": orientation,
|
||||
...semanticProps,
|
||||
...domProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
});
|
||||
Separator.displayName = NAME;
|
||||
function isValidOrientation(orientation) {
|
||||
return ORIENTATIONS.includes(orientation);
|
||||
}
|
||||
var Root = Separator;
|
||||
export {
|
||||
Root,
|
||||
Separator
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-separator.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-separator.js.map
generated
vendored
7
node_modules/.vite/deps/@radix-ui_react-separator.js.map
generated
vendored
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@radix-ui/react-separator/src/Separator.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\nconst DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\ntype SeparatorElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = React.forwardRef<SeparatorElement, SeparatorProps>((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === 'vertical' ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n <Primitive.div\n data-orientation={orientation}\n {...semanticProps}\n {...domProps}\n ref={forwardedRef}\n />\n );\n});\n\nSeparator.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;AAAA,YAAuB;AAoCnB,yBAAA;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,aACE;IAAC,UAAU;IAAV;MACC,oBAAkB;MACjB,GAAG;MACH,GAAG;MACJ,KAAK;IAAA;EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
29
node_modules/.vite/deps/@radix-ui_react-slider.js
generated
vendored
29
node_modules/.vite/deps/@radix-ui_react-slider.js
generated
vendored
|
|
@ -1,28 +1,26 @@
|
|||
"use client";
|
||||
import {
|
||||
clamp
|
||||
} from "./chunk-6ZMM2PAV.js";
|
||||
import {
|
||||
usePrevious
|
||||
} from "./chunk-DDW565K2.js";
|
||||
import {
|
||||
createCollection
|
||||
} from "./chunk-6SPNF6KQ.js";
|
||||
import {
|
||||
useSize
|
||||
} from "./chunk-MR3TNHRB.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
clamp
|
||||
} from "./chunk-6ZMM2PAV.js";
|
||||
import {
|
||||
useDirection
|
||||
} from "./chunk-O2UA4OQB.js";
|
||||
import {
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
useSize
|
||||
} from "./chunk-AJMUNMLZ.js";
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -74,6 +72,7 @@ var Slider = React.forwardRef(
|
|||
onValueCommit = () => {
|
||||
},
|
||||
inverted = false,
|
||||
form,
|
||||
...sliderProps
|
||||
} = props;
|
||||
const thumbRefs = React.useRef(/* @__PURE__ */ new Set());
|
||||
|
|
@ -132,6 +131,7 @@ var Slider = React.forwardRef(
|
|||
thumbs: thumbRefs.current,
|
||||
values,
|
||||
orientation,
|
||||
form,
|
||||
children: (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeSlider, children: (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeSlider, children: (0, import_jsx_runtime.jsx)(
|
||||
SliderOrientation,
|
||||
{
|
||||
|
|
@ -431,7 +431,7 @@ var SliderThumbImpl = React.forwardRef(
|
|||
const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider);
|
||||
const [thumb, setThumb] = React.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));
|
||||
const isFormControl = thumb ? Boolean(thumb.closest("form")) : true;
|
||||
const isFormControl = thumb ? context.form || !!thumb.closest("form") : true;
|
||||
const size = useSize(thumb);
|
||||
const value = context.values[index];
|
||||
const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max);
|
||||
|
|
@ -479,6 +479,7 @@ var SliderThumbImpl = React.forwardRef(
|
|||
BubbleInput,
|
||||
{
|
||||
name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0),
|
||||
form: context.form,
|
||||
value
|
||||
},
|
||||
index
|
||||
|
|
|
|||
4
node_modules/.vite/deps/@radix-ui_react-slider.js.map
generated
vendored
4
node_modules/.vite/deps/@radix-ui_react-slider.js.map
generated
vendored
File diff suppressed because one or more lines are too long
14
node_modules/.vite/deps/@radix-ui_react-switch.js
generated
vendored
14
node_modules/.vite/deps/@radix-ui_react-switch.js
generated
vendored
|
|
@ -4,16 +4,14 @@ import {
|
|||
} from "./chunk-DDW565K2.js";
|
||||
import {
|
||||
useSize
|
||||
} from "./chunk-MR3TNHRB.js";
|
||||
} from "./chunk-AJMUNMLZ.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -48,12 +46,13 @@ var Switch = React.forwardRef(
|
|||
disabled,
|
||||
value = "on",
|
||||
onCheckedChange,
|
||||
form,
|
||||
...switchProps
|
||||
} = props;
|
||||
const [button, setButton] = React.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
||||
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
||||
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
||||
const isFormControl = button ? form || !!button.closest("form") : true;
|
||||
const [checked = false, setChecked] = useControllableState({
|
||||
prop: checkedProp,
|
||||
defaultProp: defaultChecked,
|
||||
|
|
@ -92,6 +91,7 @@ var Switch = React.forwardRef(
|
|||
checked,
|
||||
required,
|
||||
disabled,
|
||||
form,
|
||||
style: { transform: "translateX(-100%)" }
|
||||
}
|
||||
)
|
||||
|
|
|
|||
4
node_modules/.vite/deps/@radix-ui_react-switch.js.map
generated
vendored
4
node_modules/.vite/deps/@radix-ui_react-switch.js.map
generated
vendored
File diff suppressed because one or more lines are too long
22
node_modules/.vite/deps/@radix-ui_react-tabs.js
generated
vendored
22
node_modules/.vite/deps/@radix-ui_react-tabs.js
generated
vendored
|
|
@ -3,26 +3,24 @@ import {
|
|||
Item,
|
||||
Root,
|
||||
createRovingFocusGroupScope
|
||||
} from "./chunk-ENGL2KVA.js";
|
||||
} from "./chunk-5ZUJRVG4.js";
|
||||
import "./chunk-6SPNF6KQ.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-5I6CIHEW.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
useDirection
|
||||
} from "./chunk-O2UA4OQB.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
|
|||
2
node_modules/.vite/deps/@radix-ui_react-tabs.js.map
generated
vendored
2
node_modules/.vite/deps/@radix-ui_react-tabs.js.map
generated
vendored
File diff suppressed because one or more lines are too long
908
node_modules/.vite/deps/@radix-ui_react-toast.js
generated
vendored
908
node_modules/.vite/deps/@radix-ui_react-toast.js
generated
vendored
|
|
@ -1,908 +0,0 @@
|
|||
"use client";
|
||||
import {
|
||||
VisuallyHidden
|
||||
} from "./chunk-3GV3KT4M.js";
|
||||
import {
|
||||
createCollection
|
||||
} from "./chunk-6SPNF6KQ.js";
|
||||
import {
|
||||
useEscapeKeydown
|
||||
} from "./chunk-J3JCCWF4.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-TZDCYJOT.js";
|
||||
import {
|
||||
createContextScope
|
||||
} from "./chunk-OAV3HHWW.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
import {
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-R6S4VRB5.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-4WIT4MX7.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-S77I6LSE.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var ReactDOM2 = __toESM(require_react_dom(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
||||
var CONTEXT_UPDATE = "dismissableLayer.update";
|
||||
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
||||
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
||||
var originalBodyPointerEvents;
|
||||
var DismissableLayerContext = React.createContext({
|
||||
layers: /* @__PURE__ */ new Set(),
|
||||
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
||||
branches: /* @__PURE__ */ new Set()
|
||||
});
|
||||
var DismissableLayer = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
disableOutsidePointerEvents = false,
|
||||
onEscapeKeyDown,
|
||||
onPointerDownOutside,
|
||||
onFocusOutside,
|
||||
onInteractOutside,
|
||||
onDismiss,
|
||||
...layerProps
|
||||
} = props;
|
||||
const context = React.useContext(DismissableLayerContext);
|
||||
const [node, setNode] = React.useState(null);
|
||||
const ownerDocument = (node == null ? void 0 : node.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document);
|
||||
const [, force] = React.useState({});
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
||||
const layers = Array.from(context.layers);
|
||||
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
||||
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
||||
const index = node ? layers.indexOf(node) : -1;
|
||||
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
||||
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
||||
const pointerDownOutside = usePointerDownOutside((event) => {
|
||||
const target = event.target;
|
||||
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
||||
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
||||
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
|
||||
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
||||
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
||||
}, ownerDocument);
|
||||
const focusOutside = useFocusOutside((event) => {
|
||||
const target = event.target;
|
||||
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
||||
if (isFocusInBranch) return;
|
||||
onFocusOutside == null ? void 0 : onFocusOutside(event);
|
||||
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
||||
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
||||
}, ownerDocument);
|
||||
useEscapeKeydown((event) => {
|
||||
const isHighestLayer = index === context.layers.size - 1;
|
||||
if (!isHighestLayer) return;
|
||||
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
|
||||
if (!event.defaultPrevented && onDismiss) {
|
||||
event.preventDefault();
|
||||
onDismiss();
|
||||
}
|
||||
}, ownerDocument);
|
||||
React.useEffect(() => {
|
||||
if (!node) return;
|
||||
if (disableOutsidePointerEvents) {
|
||||
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
||||
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
||||
ownerDocument.body.style.pointerEvents = "none";
|
||||
}
|
||||
context.layersWithOutsidePointerEventsDisabled.add(node);
|
||||
}
|
||||
context.layers.add(node);
|
||||
dispatchUpdate();
|
||||
return () => {
|
||||
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
||||
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
||||
}
|
||||
};
|
||||
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
||||
React.useEffect(() => {
|
||||
return () => {
|
||||
if (!node) return;
|
||||
context.layers.delete(node);
|
||||
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
||||
dispatchUpdate();
|
||||
};
|
||||
}, [node, context]);
|
||||
React.useEffect(() => {
|
||||
const handleUpdate = () => force({});
|
||||
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
...layerProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
||||
...props.style
|
||||
},
|
||||
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
||||
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
||||
onPointerDownCapture: composeEventHandlers(
|
||||
props.onPointerDownCapture,
|
||||
pointerDownOutside.onPointerDownCapture
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
||||
var BRANCH_NAME = "DismissableLayerBranch";
|
||||
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
||||
const context = React.useContext(DismissableLayerContext);
|
||||
const ref = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
React.useEffect(() => {
|
||||
const node = ref.current;
|
||||
if (node) {
|
||||
context.branches.add(node);
|
||||
return () => {
|
||||
context.branches.delete(node);
|
||||
};
|
||||
}
|
||||
}, [context.branches]);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
||||
});
|
||||
DismissableLayerBranch.displayName = BRANCH_NAME;
|
||||
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
||||
const isPointerInsideReactTreeRef = React.useRef(false);
|
||||
const handleClickRef = React.useRef(() => {
|
||||
});
|
||||
React.useEffect(() => {
|
||||
const handlePointerDown = (event) => {
|
||||
if (event.target && !isPointerInsideReactTreeRef.current) {
|
||||
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
||||
handleAndDispatchCustomEvent(
|
||||
POINTER_DOWN_OUTSIDE,
|
||||
handlePointerDownOutside,
|
||||
eventDetail,
|
||||
{ discrete: true }
|
||||
);
|
||||
};
|
||||
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
||||
const eventDetail = { originalEvent: event };
|
||||
if (event.pointerType === "touch") {
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
||||
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
||||
} else {
|
||||
handleAndDispatchPointerDownOutsideEvent2();
|
||||
}
|
||||
} else {
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
}
|
||||
isPointerInsideReactTreeRef.current = false;
|
||||
};
|
||||
const timerId = window.setTimeout(() => {
|
||||
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
||||
}, 0);
|
||||
return () => {
|
||||
window.clearTimeout(timerId);
|
||||
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
};
|
||||
}, [ownerDocument, handlePointerDownOutside]);
|
||||
return {
|
||||
// ensures we check React component tree (not just DOM tree)
|
||||
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
||||
};
|
||||
}
|
||||
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
||||
const isFocusInsideReactTreeRef = React.useRef(false);
|
||||
React.useEffect(() => {
|
||||
const handleFocus = (event) => {
|
||||
if (event.target && !isFocusInsideReactTreeRef.current) {
|
||||
const eventDetail = { originalEvent: event };
|
||||
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
||||
discrete: false
|
||||
});
|
||||
}
|
||||
};
|
||||
ownerDocument.addEventListener("focusin", handleFocus);
|
||||
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
||||
}, [ownerDocument, handleFocusOutside]);
|
||||
return {
|
||||
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
||||
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
||||
};
|
||||
}
|
||||
function dispatchUpdate() {
|
||||
const event = new CustomEvent(CONTEXT_UPDATE);
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
||||
const target = detail.originalEvent.target;
|
||||
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
||||
if (handler) target.addEventListener(name, handler, { once: true });
|
||||
if (discrete) {
|
||||
dispatchDiscreteCustomEvent(target, event);
|
||||
} else {
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
var Root = DismissableLayer;
|
||||
var Branch = DismissableLayerBranch;
|
||||
|
||||
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var import_react_dom = __toESM(require_react_dom(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var PORTAL_NAME = "Portal";
|
||||
var Portal = React2.forwardRef((props, forwardedRef) => {
|
||||
var _a;
|
||||
const { container: containerProp, ...portalProps } = props;
|
||||
const [mounted, setMounted] = React2.useState(false);
|
||||
useLayoutEffect2(() => setMounted(true), []);
|
||||
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
||||
return container ? import_react_dom.default.createPortal((0, import_jsx_runtime2.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
||||
});
|
||||
Portal.displayName = PORTAL_NAME;
|
||||
|
||||
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
var PROVIDER_NAME = "ToastProvider";
|
||||
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
||||
var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
|
||||
var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
|
||||
var ToastProvider = (props) => {
|
||||
const {
|
||||
__scopeToast,
|
||||
label = "Notification",
|
||||
duration = 5e3,
|
||||
swipeDirection = "right",
|
||||
swipeThreshold = 50,
|
||||
children
|
||||
} = props;
|
||||
const [viewport, setViewport] = React3.useState(null);
|
||||
const [toastCount, setToastCount] = React3.useState(0);
|
||||
const isFocusedToastEscapeKeyDownRef = React3.useRef(false);
|
||||
const isClosePausedRef = React3.useRef(false);
|
||||
if (!label.trim()) {
|
||||
console.error(
|
||||
`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`
|
||||
);
|
||||
}
|
||||
return (0, import_jsx_runtime3.jsx)(Collection.Provider, { scope: __scopeToast, children: (0, import_jsx_runtime3.jsx)(
|
||||
ToastProviderProvider,
|
||||
{
|
||||
scope: __scopeToast,
|
||||
label,
|
||||
duration,
|
||||
swipeDirection,
|
||||
swipeThreshold,
|
||||
toastCount,
|
||||
viewport,
|
||||
onViewportChange: setViewport,
|
||||
onToastAdd: React3.useCallback(() => setToastCount((prevCount) => prevCount + 1), []),
|
||||
onToastRemove: React3.useCallback(() => setToastCount((prevCount) => prevCount - 1), []),
|
||||
isFocusedToastEscapeKeyDownRef,
|
||||
isClosePausedRef,
|
||||
children
|
||||
}
|
||||
) });
|
||||
};
|
||||
ToastProvider.displayName = PROVIDER_NAME;
|
||||
var VIEWPORT_NAME = "ToastViewport";
|
||||
var VIEWPORT_DEFAULT_HOTKEY = ["F8"];
|
||||
var VIEWPORT_PAUSE = "toast.viewportPause";
|
||||
var VIEWPORT_RESUME = "toast.viewportResume";
|
||||
var ToastViewport = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeToast,
|
||||
hotkey = VIEWPORT_DEFAULT_HOTKEY,
|
||||
label = "Notifications ({hotkey})",
|
||||
...viewportProps
|
||||
} = props;
|
||||
const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);
|
||||
const getItems = useCollection(__scopeToast);
|
||||
const wrapperRef = React3.useRef(null);
|
||||
const headFocusProxyRef = React3.useRef(null);
|
||||
const tailFocusProxyRef = React3.useRef(null);
|
||||
const ref = React3.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
||||
const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
||||
const hasToasts = context.toastCount > 0;
|
||||
React3.useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
var _a;
|
||||
const isHotkeyPressed = hotkey.every((key) => event[key] || event.code === key);
|
||||
if (isHotkeyPressed) (_a = ref.current) == null ? void 0 : _a.focus();
|
||||
};
|
||||
document.addEventListener("keydown", handleKeyDown);
|
||||
return () => document.removeEventListener("keydown", handleKeyDown);
|
||||
}, [hotkey]);
|
||||
React3.useEffect(() => {
|
||||
const wrapper = wrapperRef.current;
|
||||
const viewport = ref.current;
|
||||
if (hasToasts && wrapper && viewport) {
|
||||
const handlePause = () => {
|
||||
if (!context.isClosePausedRef.current) {
|
||||
const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);
|
||||
viewport.dispatchEvent(pauseEvent);
|
||||
context.isClosePausedRef.current = true;
|
||||
}
|
||||
};
|
||||
const handleResume = () => {
|
||||
if (context.isClosePausedRef.current) {
|
||||
const resumeEvent = new CustomEvent(VIEWPORT_RESUME);
|
||||
viewport.dispatchEvent(resumeEvent);
|
||||
context.isClosePausedRef.current = false;
|
||||
}
|
||||
};
|
||||
const handleFocusOutResume = (event) => {
|
||||
const isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
|
||||
if (isFocusMovingOutside) handleResume();
|
||||
};
|
||||
const handlePointerLeaveResume = () => {
|
||||
const isFocusInside = wrapper.contains(document.activeElement);
|
||||
if (!isFocusInside) handleResume();
|
||||
};
|
||||
wrapper.addEventListener("focusin", handlePause);
|
||||
wrapper.addEventListener("focusout", handleFocusOutResume);
|
||||
wrapper.addEventListener("pointermove", handlePause);
|
||||
wrapper.addEventListener("pointerleave", handlePointerLeaveResume);
|
||||
window.addEventListener("blur", handlePause);
|
||||
window.addEventListener("focus", handleResume);
|
||||
return () => {
|
||||
wrapper.removeEventListener("focusin", handlePause);
|
||||
wrapper.removeEventListener("focusout", handleFocusOutResume);
|
||||
wrapper.removeEventListener("pointermove", handlePause);
|
||||
wrapper.removeEventListener("pointerleave", handlePointerLeaveResume);
|
||||
window.removeEventListener("blur", handlePause);
|
||||
window.removeEventListener("focus", handleResume);
|
||||
};
|
||||
}
|
||||
}, [hasToasts, context.isClosePausedRef]);
|
||||
const getSortedTabbableCandidates = React3.useCallback(
|
||||
({ tabbingDirection }) => {
|
||||
const toastItems = getItems();
|
||||
const tabbableCandidates = toastItems.map((toastItem) => {
|
||||
const toastNode = toastItem.ref.current;
|
||||
const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];
|
||||
return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse();
|
||||
});
|
||||
return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat();
|
||||
},
|
||||
[getItems]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
const viewport = ref.current;
|
||||
if (viewport) {
|
||||
const handleKeyDown = (event) => {
|
||||
var _a, _b, _c;
|
||||
const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
|
||||
const isTabKey = event.key === "Tab" && !isMetaKey;
|
||||
if (isTabKey) {
|
||||
const focusedElement = document.activeElement;
|
||||
const isTabbingBackwards = event.shiftKey;
|
||||
const targetIsViewport = event.target === viewport;
|
||||
if (targetIsViewport && isTabbingBackwards) {
|
||||
(_a = headFocusProxyRef.current) == null ? void 0 : _a.focus();
|
||||
return;
|
||||
}
|
||||
const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards";
|
||||
const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });
|
||||
const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);
|
||||
if (focusFirst(sortedCandidates.slice(index + 1))) {
|
||||
event.preventDefault();
|
||||
} else {
|
||||
isTabbingBackwards ? (_b = headFocusProxyRef.current) == null ? void 0 : _b.focus() : (_c = tailFocusProxyRef.current) == null ? void 0 : _c.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
viewport.addEventListener("keydown", handleKeyDown);
|
||||
return () => viewport.removeEventListener("keydown", handleKeyDown);
|
||||
}
|
||||
}, [getItems, getSortedTabbableCandidates]);
|
||||
return (0, import_jsx_runtime3.jsxs)(
|
||||
Branch,
|
||||
{
|
||||
ref: wrapperRef,
|
||||
role: "region",
|
||||
"aria-label": label.replace("{hotkey}", hotkeyLabel),
|
||||
tabIndex: -1,
|
||||
style: { pointerEvents: hasToasts ? void 0 : "none" },
|
||||
children: [
|
||||
hasToasts && (0, import_jsx_runtime3.jsx)(
|
||||
FocusProxy,
|
||||
{
|
||||
ref: headFocusProxyRef,
|
||||
onFocusFromOutsideViewport: () => {
|
||||
const tabbableCandidates = getSortedTabbableCandidates({
|
||||
tabbingDirection: "forwards"
|
||||
});
|
||||
focusFirst(tabbableCandidates);
|
||||
}
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime3.jsx)(Collection.Slot, { scope: __scopeToast, children: (0, import_jsx_runtime3.jsx)(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }),
|
||||
hasToasts && (0, import_jsx_runtime3.jsx)(
|
||||
FocusProxy,
|
||||
{
|
||||
ref: tailFocusProxyRef,
|
||||
onFocusFromOutsideViewport: () => {
|
||||
const tabbableCandidates = getSortedTabbableCandidates({
|
||||
tabbingDirection: "backwards"
|
||||
});
|
||||
focusFirst(tabbableCandidates);
|
||||
}
|
||||
}
|
||||
)
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ToastViewport.displayName = VIEWPORT_NAME;
|
||||
var FOCUS_PROXY_NAME = "ToastFocusProxy";
|
||||
var FocusProxy = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
|
||||
const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
|
||||
return (0, import_jsx_runtime3.jsx)(
|
||||
VisuallyHidden,
|
||||
{
|
||||
"aria-hidden": true,
|
||||
tabIndex: 0,
|
||||
...proxyProps,
|
||||
ref: forwardedRef,
|
||||
style: { position: "fixed" },
|
||||
onFocus: (event) => {
|
||||
var _a;
|
||||
const prevFocusedElement = event.relatedTarget;
|
||||
const isFocusFromOutsideViewport = !((_a = context.viewport) == null ? void 0 : _a.contains(prevFocusedElement));
|
||||
if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
FocusProxy.displayName = FOCUS_PROXY_NAME;
|
||||
var TOAST_NAME = "Toast";
|
||||
var TOAST_SWIPE_START = "toast.swipeStart";
|
||||
var TOAST_SWIPE_MOVE = "toast.swipeMove";
|
||||
var TOAST_SWIPE_CANCEL = "toast.swipeCancel";
|
||||
var TOAST_SWIPE_END = "toast.swipeEnd";
|
||||
var Toast = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;
|
||||
const [open = true, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
onChange: onOpenChange
|
||||
});
|
||||
return (0, import_jsx_runtime3.jsx)(Presence, { present: forceMount || open, children: (0, import_jsx_runtime3.jsx)(
|
||||
ToastImpl,
|
||||
{
|
||||
open,
|
||||
...toastProps,
|
||||
ref: forwardedRef,
|
||||
onClose: () => setOpen(false),
|
||||
onPause: useCallbackRef(props.onPause),
|
||||
onResume: useCallbackRef(props.onResume),
|
||||
onSwipeStart: composeEventHandlers(props.onSwipeStart, (event) => {
|
||||
event.currentTarget.setAttribute("data-swipe", "start");
|
||||
}),
|
||||
onSwipeMove: composeEventHandlers(props.onSwipeMove, (event) => {
|
||||
const { x, y } = event.detail.delta;
|
||||
event.currentTarget.setAttribute("data-swipe", "move");
|
||||
event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`);
|
||||
event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`);
|
||||
}),
|
||||
onSwipeCancel: composeEventHandlers(props.onSwipeCancel, (event) => {
|
||||
event.currentTarget.setAttribute("data-swipe", "cancel");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
||||
}),
|
||||
onSwipeEnd: composeEventHandlers(props.onSwipeEnd, (event) => {
|
||||
const { x, y } = event.detail.delta;
|
||||
event.currentTarget.setAttribute("data-swipe", "end");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
|
||||
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
|
||||
event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`);
|
||||
event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`);
|
||||
setOpen(false);
|
||||
})
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
Toast.displayName = TOAST_NAME;
|
||||
var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {
|
||||
onClose() {
|
||||
}
|
||||
});
|
||||
var ToastImpl = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeToast,
|
||||
type = "foreground",
|
||||
duration: durationProp,
|
||||
open,
|
||||
onClose,
|
||||
onEscapeKeyDown,
|
||||
onPause,
|
||||
onResume,
|
||||
onSwipeStart,
|
||||
onSwipeMove,
|
||||
onSwipeCancel,
|
||||
onSwipeEnd,
|
||||
...toastProps
|
||||
} = props;
|
||||
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
||||
const [node, setNode] = React3.useState(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
||||
const pointerStartRef = React3.useRef(null);
|
||||
const swipeDeltaRef = React3.useRef(null);
|
||||
const duration = durationProp || context.duration;
|
||||
const closeTimerStartTimeRef = React3.useRef(0);
|
||||
const closeTimerRemainingTimeRef = React3.useRef(duration);
|
||||
const closeTimerRef = React3.useRef(0);
|
||||
const { onToastAdd, onToastRemove } = context;
|
||||
const handleClose = useCallbackRef(() => {
|
||||
var _a;
|
||||
const isFocusInToast = node == null ? void 0 : node.contains(document.activeElement);
|
||||
if (isFocusInToast) (_a = context.viewport) == null ? void 0 : _a.focus();
|
||||
onClose();
|
||||
});
|
||||
const startTimer = React3.useCallback(
|
||||
(duration2) => {
|
||||
if (!duration2 || duration2 === Infinity) return;
|
||||
window.clearTimeout(closeTimerRef.current);
|
||||
closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
|
||||
closeTimerRef.current = window.setTimeout(handleClose, duration2);
|
||||
},
|
||||
[handleClose]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
const viewport = context.viewport;
|
||||
if (viewport) {
|
||||
const handleResume = () => {
|
||||
startTimer(closeTimerRemainingTimeRef.current);
|
||||
onResume == null ? void 0 : onResume();
|
||||
};
|
||||
const handlePause = () => {
|
||||
const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current;
|
||||
closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
|
||||
window.clearTimeout(closeTimerRef.current);
|
||||
onPause == null ? void 0 : onPause();
|
||||
};
|
||||
viewport.addEventListener(VIEWPORT_PAUSE, handlePause);
|
||||
viewport.addEventListener(VIEWPORT_RESUME, handleResume);
|
||||
return () => {
|
||||
viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);
|
||||
viewport.removeEventListener(VIEWPORT_RESUME, handleResume);
|
||||
};
|
||||
}
|
||||
}, [context.viewport, duration, onPause, onResume, startTimer]);
|
||||
React3.useEffect(() => {
|
||||
if (open && !context.isClosePausedRef.current) startTimer(duration);
|
||||
}, [open, duration, context.isClosePausedRef, startTimer]);
|
||||
React3.useEffect(() => {
|
||||
onToastAdd();
|
||||
return () => onToastRemove();
|
||||
}, [onToastAdd, onToastRemove]);
|
||||
const announceTextContent = React3.useMemo(() => {
|
||||
return node ? getAnnounceTextContent(node) : null;
|
||||
}, [node]);
|
||||
if (!context.viewport) return null;
|
||||
return (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
||||
announceTextContent && (0, import_jsx_runtime3.jsx)(
|
||||
ToastAnnounce,
|
||||
{
|
||||
__scopeToast,
|
||||
role: "status",
|
||||
"aria-live": type === "foreground" ? "assertive" : "polite",
|
||||
"aria-atomic": true,
|
||||
children: announceTextContent
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime3.jsx)(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM2.createPortal(
|
||||
(0, import_jsx_runtime3.jsx)(Collection.ItemSlot, { scope: __scopeToast, children: (0, import_jsx_runtime3.jsx)(
|
||||
Root,
|
||||
{
|
||||
asChild: true,
|
||||
onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => {
|
||||
if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
|
||||
context.isFocusedToastEscapeKeyDownRef.current = false;
|
||||
}),
|
||||
children: (0, import_jsx_runtime3.jsx)(
|
||||
Primitive.li,
|
||||
{
|
||||
role: "status",
|
||||
"aria-live": "off",
|
||||
"aria-atomic": true,
|
||||
tabIndex: 0,
|
||||
"data-state": open ? "open" : "closed",
|
||||
"data-swipe-direction": context.swipeDirection,
|
||||
...toastProps,
|
||||
ref: composedRefs,
|
||||
style: { userSelect: "none", touchAction: "none", ...props.style },
|
||||
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
||||
if (event.key !== "Escape") return;
|
||||
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event.nativeEvent);
|
||||
if (!event.nativeEvent.defaultPrevented) {
|
||||
context.isFocusedToastEscapeKeyDownRef.current = true;
|
||||
handleClose();
|
||||
}
|
||||
}),
|
||||
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
||||
if (event.button !== 0) return;
|
||||
pointerStartRef.current = { x: event.clientX, y: event.clientY };
|
||||
}),
|
||||
onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {
|
||||
if (!pointerStartRef.current) return;
|
||||
const x = event.clientX - pointerStartRef.current.x;
|
||||
const y = event.clientY - pointerStartRef.current.y;
|
||||
const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
|
||||
const isHorizontalSwipe = ["left", "right"].includes(context.swipeDirection);
|
||||
const clamp = ["left", "up"].includes(context.swipeDirection) ? Math.min : Math.max;
|
||||
const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
|
||||
const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
|
||||
const moveStartBuffer = event.pointerType === "touch" ? 10 : 2;
|
||||
const delta = { x: clampedX, y: clampedY };
|
||||
const eventDetail = { originalEvent: event, delta };
|
||||
if (hasSwipeMoveStarted) {
|
||||
swipeDeltaRef.current = delta;
|
||||
handleAndDispatchCustomEvent2(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
|
||||
discrete: false
|
||||
});
|
||||
} else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
|
||||
swipeDeltaRef.current = delta;
|
||||
handleAndDispatchCustomEvent2(TOAST_SWIPE_START, onSwipeStart, eventDetail, {
|
||||
discrete: false
|
||||
});
|
||||
event.target.setPointerCapture(event.pointerId);
|
||||
} else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {
|
||||
pointerStartRef.current = null;
|
||||
}
|
||||
}),
|
||||
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
||||
const delta = swipeDeltaRef.current;
|
||||
const target = event.target;
|
||||
if (target.hasPointerCapture(event.pointerId)) {
|
||||
target.releasePointerCapture(event.pointerId);
|
||||
}
|
||||
swipeDeltaRef.current = null;
|
||||
pointerStartRef.current = null;
|
||||
if (delta) {
|
||||
const toast = event.currentTarget;
|
||||
const eventDetail = { originalEvent: event, delta };
|
||||
if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
|
||||
handleAndDispatchCustomEvent2(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
|
||||
discrete: true
|
||||
});
|
||||
} else {
|
||||
handleAndDispatchCustomEvent2(
|
||||
TOAST_SWIPE_CANCEL,
|
||||
onSwipeCancel,
|
||||
eventDetail,
|
||||
{
|
||||
discrete: true
|
||||
}
|
||||
);
|
||||
}
|
||||
toast.addEventListener("click", (event2) => event2.preventDefault(), {
|
||||
once: true
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
) }),
|
||||
context.viewport
|
||||
) })
|
||||
] });
|
||||
}
|
||||
);
|
||||
var ToastAnnounce = (props) => {
|
||||
const { __scopeToast, children, ...announceProps } = props;
|
||||
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
||||
const [renderAnnounceText, setRenderAnnounceText] = React3.useState(false);
|
||||
const [isAnnounced, setIsAnnounced] = React3.useState(false);
|
||||
useNextFrame(() => setRenderAnnounceText(true));
|
||||
React3.useEffect(() => {
|
||||
const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
|
||||
return () => window.clearTimeout(timer);
|
||||
}, []);
|
||||
return isAnnounced ? null : (0, import_jsx_runtime3.jsx)(Portal, { asChild: true, children: (0, import_jsx_runtime3.jsx)(VisuallyHidden, { ...announceProps, children: renderAnnounceText && (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
||||
context.label,
|
||||
" ",
|
||||
children
|
||||
] }) }) });
|
||||
};
|
||||
var TITLE_NAME = "ToastTitle";
|
||||
var ToastTitle = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToast, ...titleProps } = props;
|
||||
return (0, import_jsx_runtime3.jsx)(Primitive.div, { ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
ToastTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "ToastDescription";
|
||||
var ToastDescription = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToast, ...descriptionProps } = props;
|
||||
return (0, import_jsx_runtime3.jsx)(Primitive.div, { ...descriptionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
ToastDescription.displayName = DESCRIPTION_NAME;
|
||||
var ACTION_NAME = "ToastAction";
|
||||
var ToastAction = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { altText, ...actionProps } = props;
|
||||
if (!altText.trim()) {
|
||||
console.error(
|
||||
`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
return (0, import_jsx_runtime3.jsx)(ToastAnnounceExclude, { altText, asChild: true, children: (0, import_jsx_runtime3.jsx)(ToastClose, { ...actionProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
ToastAction.displayName = ACTION_NAME;
|
||||
var CLOSE_NAME = "ToastClose";
|
||||
var ToastClose = React3.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToast, ...closeProps } = props;
|
||||
const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
|
||||
return (0, import_jsx_runtime3.jsx)(ToastAnnounceExclude, { asChild: true, children: (0, import_jsx_runtime3.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
...closeProps,
|
||||
ref: forwardedRef,
|
||||
onClick: composeEventHandlers(props.onClick, interactiveContext.onClose)
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
ToastClose.displayName = CLOSE_NAME;
|
||||
var ToastAnnounceExclude = React3.forwardRef((props, forwardedRef) => {
|
||||
const { __scopeToast, altText, ...announceExcludeProps } = props;
|
||||
return (0, import_jsx_runtime3.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-radix-toast-announce-exclude": "",
|
||||
"data-radix-toast-announce-alt": altText || void 0,
|
||||
...announceExcludeProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
});
|
||||
function getAnnounceTextContent(container) {
|
||||
const textContent = [];
|
||||
const childNodes = Array.from(container.childNodes);
|
||||
childNodes.forEach((node) => {
|
||||
if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
|
||||
if (isHTMLElement(node)) {
|
||||
const isHidden = node.ariaHidden || node.hidden || node.style.display === "none";
|
||||
const isExcluded = node.dataset.radixToastAnnounceExclude === "";
|
||||
if (!isHidden) {
|
||||
if (isExcluded) {
|
||||
const altText = node.dataset.radixToastAnnounceAlt;
|
||||
if (altText) textContent.push(altText);
|
||||
} else {
|
||||
textContent.push(...getAnnounceTextContent(node));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return textContent;
|
||||
}
|
||||
function handleAndDispatchCustomEvent2(name, handler, detail, { discrete }) {
|
||||
const currentTarget = detail.originalEvent.currentTarget;
|
||||
const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });
|
||||
if (handler) currentTarget.addEventListener(name, handler, { once: true });
|
||||
if (discrete) {
|
||||
dispatchDiscreteCustomEvent(currentTarget, event);
|
||||
} else {
|
||||
currentTarget.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
var isDeltaInDirection = (delta, direction, threshold = 0) => {
|
||||
const deltaX = Math.abs(delta.x);
|
||||
const deltaY = Math.abs(delta.y);
|
||||
const isDeltaX = deltaX > deltaY;
|
||||
if (direction === "left" || direction === "right") {
|
||||
return isDeltaX && deltaX > threshold;
|
||||
} else {
|
||||
return !isDeltaX && deltaY > threshold;
|
||||
}
|
||||
};
|
||||
function useNextFrame(callback = () => {
|
||||
}) {
|
||||
const fn = useCallbackRef(callback);
|
||||
useLayoutEffect2(() => {
|
||||
let raf1 = 0;
|
||||
let raf2 = 0;
|
||||
raf1 = window.requestAnimationFrame(() => raf2 = window.requestAnimationFrame(fn));
|
||||
return () => {
|
||||
window.cancelAnimationFrame(raf1);
|
||||
window.cancelAnimationFrame(raf2);
|
||||
};
|
||||
}, [fn]);
|
||||
}
|
||||
function isHTMLElement(node) {
|
||||
return node.nodeType === node.ELEMENT_NODE;
|
||||
}
|
||||
function getTabbableCandidates(container) {
|
||||
const nodes = [];
|
||||
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
||||
acceptNode: (node) => {
|
||||
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
||||
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
||||
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
||||
}
|
||||
});
|
||||
while (walker.nextNode()) nodes.push(walker.currentNode);
|
||||
return nodes;
|
||||
}
|
||||
function focusFirst(candidates) {
|
||||
const previouslyFocusedElement = document.activeElement;
|
||||
return candidates.some((candidate) => {
|
||||
if (candidate === previouslyFocusedElement) return true;
|
||||
candidate.focus();
|
||||
return document.activeElement !== previouslyFocusedElement;
|
||||
});
|
||||
}
|
||||
var Provider = ToastProvider;
|
||||
var Viewport = ToastViewport;
|
||||
var Root2 = Toast;
|
||||
var Title = ToastTitle;
|
||||
var Description = ToastDescription;
|
||||
var Action = ToastAction;
|
||||
var Close = ToastClose;
|
||||
export {
|
||||
Action,
|
||||
Close,
|
||||
Description,
|
||||
Provider,
|
||||
Root2 as Root,
|
||||
Title,
|
||||
Toast,
|
||||
ToastAction,
|
||||
ToastClose,
|
||||
ToastDescription,
|
||||
ToastProvider,
|
||||
ToastTitle,
|
||||
ToastViewport,
|
||||
Viewport,
|
||||
createToastScope
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-toast.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-toast.js.map
generated
vendored
7
node_modules/.vite/deps/@radix-ui_react-toast.js.map
generated
vendored
File diff suppressed because one or more lines are too long
310
node_modules/.vite/deps/@radix-ui_react-tooltip.js
generated
vendored
310
node_modules/.vite/deps/@radix-ui_react-tooltip.js
generated
vendored
|
|
@ -1,8 +1,4 @@
|
|||
"use client";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal
|
||||
} from "./chunk-JV5O627A.js";
|
||||
import {
|
||||
Root
|
||||
} from "./chunk-3GV3KT4M.js";
|
||||
|
|
@ -12,19 +8,25 @@ import {
|
|||
Content,
|
||||
Root2,
|
||||
createPopperScope
|
||||
} from "./chunk-6UE7W7QM.js";
|
||||
import "./chunk-MR3TNHRB.js";
|
||||
import "./chunk-J3JCCWF4.js";
|
||||
} from "./chunk-HUHORXLV.js";
|
||||
import "./chunk-AJMUNMLZ.js";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal
|
||||
} from "./chunk-CSR2432P.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-5I6CIHEW.js";
|
||||
} from "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
createContextScope
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -44,200 +46,8 @@ import {
|
|||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider2 = (props) => {
|
||||
var _a;
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider2.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
var _a;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider2, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React3.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var Presence = (props) => {
|
||||
const { present, children } = props;
|
||||
const presence = usePresence(present);
|
||||
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
|
||||
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
||||
const forceMount = typeof children === "function";
|
||||
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
|
||||
};
|
||||
Presence.displayName = "Presence";
|
||||
function usePresence(present) {
|
||||
const [node, setNode] = React2.useState();
|
||||
const stylesRef = React2.useRef({});
|
||||
const prevPresentRef = React2.useRef(present);
|
||||
const prevAnimationNameRef = React2.useRef("none");
|
||||
const initialState = present ? "mounted" : "unmounted";
|
||||
const [state, send] = useStateMachine(initialState, {
|
||||
mounted: {
|
||||
UNMOUNT: "unmounted",
|
||||
ANIMATION_OUT: "unmountSuspended"
|
||||
},
|
||||
unmountSuspended: {
|
||||
MOUNT: "mounted",
|
||||
ANIMATION_END: "unmounted"
|
||||
},
|
||||
unmounted: {
|
||||
MOUNT: "mounted"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
||||
}, [state]);
|
||||
useLayoutEffect2(() => {
|
||||
const styles = stylesRef.current;
|
||||
const wasPresent = prevPresentRef.current;
|
||||
const hasPresentChanged = wasPresent !== present;
|
||||
if (hasPresentChanged) {
|
||||
const prevAnimationName = prevAnimationNameRef.current;
|
||||
const currentAnimationName = getAnimationName(styles);
|
||||
if (present) {
|
||||
send("MOUNT");
|
||||
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
||||
send("UNMOUNT");
|
||||
} else {
|
||||
const isAnimating = prevAnimationName !== currentAnimationName;
|
||||
if (wasPresent && isAnimating) {
|
||||
send("ANIMATION_OUT");
|
||||
} else {
|
||||
send("UNMOUNT");
|
||||
}
|
||||
}
|
||||
prevPresentRef.current = present;
|
||||
}
|
||||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
if (event.target === node) {
|
||||
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
||||
}
|
||||
};
|
||||
node.addEventListener("animationstart", handleAnimationStart);
|
||||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
};
|
||||
} else {
|
||||
send("ANIMATION_END");
|
||||
}
|
||||
}, [node, send]);
|
||||
return {
|
||||
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
||||
ref: React2.useCallback((node2) => {
|
||||
if (node2) stylesRef.current = getComputedStyle(node2);
|
||||
setNode(node2);
|
||||
}, [])
|
||||
};
|
||||
}
|
||||
function getAnimationName(styles) {
|
||||
return (styles == null ? void 0 : styles.animationName) || "none";
|
||||
}
|
||||
function getElementRef(element) {
|
||||
var _a, _b;
|
||||
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
||||
createPopperScope
|
||||
]);
|
||||
|
|
@ -254,24 +64,24 @@ var TooltipProvider = (props) => {
|
|||
disableHoverableContent = false,
|
||||
children
|
||||
} = props;
|
||||
const [isOpenDelayed, setIsOpenDelayed] = React4.useState(true);
|
||||
const isPointerInTransitRef = React4.useRef(false);
|
||||
const skipDelayTimerRef = React4.useRef(0);
|
||||
React4.useEffect(() => {
|
||||
const [isOpenDelayed, setIsOpenDelayed] = React.useState(true);
|
||||
const isPointerInTransitRef = React.useRef(false);
|
||||
const skipDelayTimerRef = React.useRef(0);
|
||||
React.useEffect(() => {
|
||||
const skipDelayTimer = skipDelayTimerRef.current;
|
||||
return () => window.clearTimeout(skipDelayTimer);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
TooltipProviderContextProvider,
|
||||
{
|
||||
scope: __scopeTooltip,
|
||||
isOpenDelayed,
|
||||
delayDuration,
|
||||
onOpen: React4.useCallback(() => {
|
||||
onOpen: React.useCallback(() => {
|
||||
window.clearTimeout(skipDelayTimerRef.current);
|
||||
setIsOpenDelayed(false);
|
||||
}, []),
|
||||
onClose: React4.useCallback(() => {
|
||||
onClose: React.useCallback(() => {
|
||||
window.clearTimeout(skipDelayTimerRef.current);
|
||||
skipDelayTimerRef.current = window.setTimeout(
|
||||
() => setIsOpenDelayed(true),
|
||||
|
|
@ -279,7 +89,7 @@ var TooltipProvider = (props) => {
|
|||
);
|
||||
}, [skipDelayDuration]),
|
||||
isPointerInTransitRef,
|
||||
onPointerInTransitChange: React4.useCallback((inTransit) => {
|
||||
onPointerInTransitChange: React.useCallback((inTransit) => {
|
||||
isPointerInTransitRef.current = inTransit;
|
||||
}, []),
|
||||
disableHoverableContent,
|
||||
|
|
@ -302,12 +112,12 @@ var Tooltip = (props) => {
|
|||
} = props;
|
||||
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const [trigger, setTrigger] = React4.useState(null);
|
||||
const [trigger, setTrigger] = React.useState(null);
|
||||
const contentId = useId();
|
||||
const openTimerRef = React4.useRef(0);
|
||||
const openTimerRef = React.useRef(0);
|
||||
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
||||
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
||||
const wasOpenDelayedRef = React4.useRef(false);
|
||||
const wasOpenDelayedRef = React.useRef(false);
|
||||
const [open = false, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
|
|
@ -321,21 +131,21 @@ var Tooltip = (props) => {
|
|||
onOpenChange == null ? void 0 : onOpenChange(open2);
|
||||
}
|
||||
});
|
||||
const stateAttribute = React4.useMemo(() => {
|
||||
const stateAttribute = React.useMemo(() => {
|
||||
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
||||
}, [open]);
|
||||
const handleOpen = React4.useCallback(() => {
|
||||
const handleOpen = React.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
wasOpenDelayedRef.current = false;
|
||||
setOpen(true);
|
||||
}, [setOpen]);
|
||||
const handleClose = React4.useCallback(() => {
|
||||
const handleClose = React.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
setOpen(false);
|
||||
}, [setOpen]);
|
||||
const handleDelayedOpen = React4.useCallback(() => {
|
||||
const handleDelayedOpen = React.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = window.setTimeout(() => {
|
||||
wasOpenDelayedRef.current = true;
|
||||
|
|
@ -343,7 +153,7 @@ var Tooltip = (props) => {
|
|||
openTimerRef.current = 0;
|
||||
}, delayDuration);
|
||||
}, [delayDuration, setOpen]);
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
return () => {
|
||||
if (openTimerRef.current) {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
|
|
@ -351,7 +161,7 @@ var Tooltip = (props) => {
|
|||
}
|
||||
};
|
||||
}, []);
|
||||
return (0, import_jsx_runtime2.jsx)(Root2, { ...popperScope, children: (0, import_jsx_runtime2.jsx)(
|
||||
return (0, import_jsx_runtime.jsx)(Root2, { ...popperScope, children: (0, import_jsx_runtime.jsx)(
|
||||
TooltipContextProvider,
|
||||
{
|
||||
scope: __scopeTooltip,
|
||||
|
|
@ -360,11 +170,11 @@ var Tooltip = (props) => {
|
|||
stateAttribute,
|
||||
trigger,
|
||||
onTriggerChange: setTrigger,
|
||||
onTriggerEnter: React4.useCallback(() => {
|
||||
onTriggerEnter: React.useCallback(() => {
|
||||
if (providerContext.isOpenDelayed) handleDelayedOpen();
|
||||
else handleOpen();
|
||||
}, [providerContext.isOpenDelayed, handleDelayedOpen, handleOpen]),
|
||||
onTriggerLeave: React4.useCallback(() => {
|
||||
onTriggerLeave: React.useCallback(() => {
|
||||
if (disableHoverableContent) {
|
||||
handleClose();
|
||||
} else {
|
||||
|
|
@ -381,21 +191,21 @@ var Tooltip = (props) => {
|
|||
};
|
||||
Tooltip.displayName = TOOLTIP_NAME;
|
||||
var TRIGGER_NAME = "TooltipTrigger";
|
||||
var TooltipTrigger = React4.forwardRef(
|
||||
var TooltipTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeTooltip, ...triggerProps } = props;
|
||||
const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);
|
||||
const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const ref = React4.useRef(null);
|
||||
const ref = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
|
||||
const isPointerDownRef = React4.useRef(false);
|
||||
const hasPointerMoveOpenedRef = React4.useRef(false);
|
||||
const handlePointerUp = React4.useCallback(() => isPointerDownRef.current = false, []);
|
||||
React4.useEffect(() => {
|
||||
const isPointerDownRef = React.useRef(false);
|
||||
const hasPointerMoveOpenedRef = React.useRef(false);
|
||||
const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []);
|
||||
React.useEffect(() => {
|
||||
return () => document.removeEventListener("pointerup", handlePointerUp);
|
||||
}, [handlePointerUp]);
|
||||
return (0, import_jsx_runtime2.jsx)(Anchor, { asChild: true, ...popperScope, children: (0, import_jsx_runtime2.jsx)(
|
||||
return (0, import_jsx_runtime.jsx)(Anchor, { asChild: true, ...popperScope, children: (0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
"aria-describedby": context.open ? context.contentId : void 0,
|
||||
|
|
@ -434,32 +244,32 @@ var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {
|
|||
var TooltipPortal = (props) => {
|
||||
const { __scopeTooltip, forceMount, children, container } = props;
|
||||
const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);
|
||||
return (0, import_jsx_runtime2.jsx)(PortalProvider, { scope: __scopeTooltip, forceMount, children: (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(Portal, { asChild: true, container, children }) }) });
|
||||
return (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeTooltip, forceMount, children: (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(Portal, { asChild: true, container, children }) }) });
|
||||
};
|
||||
TooltipPortal.displayName = PORTAL_NAME;
|
||||
var CONTENT_NAME = "TooltipContent";
|
||||
var TooltipContent = React4.forwardRef(
|
||||
var TooltipContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
||||
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
return (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? (0, import_jsx_runtime2.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime2.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? (0, import_jsx_runtime.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
var TooltipContentHoverable = React4.forwardRef((props, forwardedRef) => {
|
||||
var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
||||
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const ref = React4.useRef(null);
|
||||
const ref = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
const [pointerGraceArea, setPointerGraceArea] = React4.useState(null);
|
||||
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
||||
const { trigger, onClose } = context;
|
||||
const content = ref.current;
|
||||
const { onPointerInTransitChange } = providerContext;
|
||||
const handleRemoveGraceArea = React4.useCallback(() => {
|
||||
const handleRemoveGraceArea = React.useCallback(() => {
|
||||
setPointerGraceArea(null);
|
||||
onPointerInTransitChange(false);
|
||||
}, [onPointerInTransitChange]);
|
||||
const handleCreateGraceArea = React4.useCallback(
|
||||
const handleCreateGraceArea = React.useCallback(
|
||||
(event, hoverTarget) => {
|
||||
const currentTarget = event.currentTarget;
|
||||
const exitPoint = { x: event.clientX, y: event.clientY };
|
||||
|
|
@ -472,10 +282,10 @@ var TooltipContentHoverable = React4.forwardRef((props, forwardedRef) => {
|
|||
},
|
||||
[onPointerInTransitChange]
|
||||
);
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
return () => handleRemoveGraceArea();
|
||||
}, [handleRemoveGraceArea]);
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
if (trigger && content) {
|
||||
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
||||
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
||||
|
|
@ -487,7 +297,7 @@ var TooltipContentHoverable = React4.forwardRef((props, forwardedRef) => {
|
|||
};
|
||||
}
|
||||
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
if (pointerGraceArea) {
|
||||
const handleTrackPointerGrace = (event) => {
|
||||
const target = event.target;
|
||||
|
|
@ -505,10 +315,10 @@ var TooltipContentHoverable = React4.forwardRef((props, forwardedRef) => {
|
|||
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
||||
}
|
||||
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
||||
return (0, import_jsx_runtime2.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
|
||||
return (0, import_jsx_runtime.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
|
||||
});
|
||||
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
||||
var TooltipContentImpl = React4.forwardRef(
|
||||
var TooltipContentImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeTooltip,
|
||||
|
|
@ -521,11 +331,11 @@ var TooltipContentImpl = React4.forwardRef(
|
|||
const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const { onClose } = context;
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
document.addEventListener(TOOLTIP_OPEN, onClose);
|
||||
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
||||
}, [onClose]);
|
||||
React4.useEffect(() => {
|
||||
React.useEffect(() => {
|
||||
if (context.trigger) {
|
||||
const handleScroll = (event) => {
|
||||
const target = event.target;
|
||||
|
|
@ -535,7 +345,7 @@ var TooltipContentImpl = React4.forwardRef(
|
|||
return () => window.removeEventListener("scroll", handleScroll, { capture: true });
|
||||
}
|
||||
}, [context.trigger, onClose]);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DismissableLayer,
|
||||
{
|
||||
asChild: true,
|
||||
|
|
@ -544,7 +354,7 @@ var TooltipContentImpl = React4.forwardRef(
|
|||
onPointerDownOutside,
|
||||
onFocusOutside: (event) => event.preventDefault(),
|
||||
onDismiss: onClose,
|
||||
children: (0, import_jsx_runtime2.jsxs)(
|
||||
children: (0, import_jsx_runtime.jsxs)(
|
||||
Content,
|
||||
{
|
||||
"data-state": context.stateAttribute,
|
||||
|
|
@ -563,8 +373,8 @@ var TooltipContentImpl = React4.forwardRef(
|
|||
}
|
||||
},
|
||||
children: [
|
||||
(0, import_jsx_runtime2.jsx)(Slottable, { children }),
|
||||
(0, import_jsx_runtime2.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: (0, import_jsx_runtime2.jsx)(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
||||
(0, import_jsx_runtime.jsx)(Slottable, { children }),
|
||||
(0, import_jsx_runtime.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: (0, import_jsx_runtime.jsx)(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
||||
]
|
||||
}
|
||||
)
|
||||
|
|
@ -574,7 +384,7 @@ var TooltipContentImpl = React4.forwardRef(
|
|||
);
|
||||
TooltipContent.displayName = CONTENT_NAME;
|
||||
var ARROW_NAME = "TooltipArrow";
|
||||
var TooltipArrow = React4.forwardRef(
|
||||
var TooltipArrow = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeTooltip, ...arrowProps } = props;
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
|
|
@ -582,7 +392,7 @@ var TooltipArrow = React4.forwardRef(
|
|||
ARROW_NAME,
|
||||
__scopeTooltip
|
||||
);
|
||||
return visuallyHiddenContentContext.isInside ? null : (0, import_jsx_runtime2.jsx)(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
||||
return visuallyHiddenContentContext.isInside ? null : (0, import_jsx_runtime.jsx)(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
TooltipArrow.displayName = ARROW_NAME;
|
||||
|
|
|
|||
8
node_modules/.vite/deps/@radix-ui_react-tooltip.js.map
generated
vendored
8
node_modules/.vite/deps/@radix-ui_react-tooltip.js.map
generated
vendored
File diff suppressed because one or more lines are too long
215
node_modules/.vite/deps/@tanstack_react-query.js
generated
vendored
215
node_modules/.vite/deps/@tanstack_react-query.js
generated
vendored
|
|
@ -378,6 +378,39 @@ var OnlineManager = (_a2 = class extends Subscribable {
|
|||
}, _online = new WeakMap(), _cleanup2 = new WeakMap(), _setup2 = new WeakMap(), _a2);
|
||||
var onlineManager = new OnlineManager();
|
||||
|
||||
// node_modules/@tanstack/query-core/build/modern/thenable.js
|
||||
function pendingThenable() {
|
||||
let resolve;
|
||||
let reject;
|
||||
const thenable = new Promise((_resolve, _reject) => {
|
||||
resolve = _resolve;
|
||||
reject = _reject;
|
||||
});
|
||||
thenable.status = "pending";
|
||||
thenable.catch(() => {
|
||||
});
|
||||
function finalize(data) {
|
||||
Object.assign(thenable, data);
|
||||
delete thenable.resolve;
|
||||
delete thenable.reject;
|
||||
}
|
||||
thenable.resolve = (value) => {
|
||||
finalize({
|
||||
status: "fulfilled",
|
||||
value
|
||||
});
|
||||
resolve(value);
|
||||
};
|
||||
thenable.reject = (reason) => {
|
||||
finalize({
|
||||
status: "rejected",
|
||||
reason
|
||||
});
|
||||
reject(reason);
|
||||
};
|
||||
return thenable;
|
||||
}
|
||||
|
||||
// node_modules/@tanstack/query-core/build/modern/retryer.js
|
||||
function defaultRetryDelay(failureCount) {
|
||||
return Math.min(1e3 * 2 ** failureCount, 3e4);
|
||||
|
|
@ -400,12 +433,7 @@ function createRetryer(config) {
|
|||
let failureCount = 0;
|
||||
let isResolved = false;
|
||||
let continueFn;
|
||||
let promiseResolve;
|
||||
let promiseReject;
|
||||
const promise = new Promise((outerResolve, outerReject) => {
|
||||
promiseResolve = outerResolve;
|
||||
promiseReject = outerReject;
|
||||
});
|
||||
const thenable = pendingThenable();
|
||||
const cancel = (cancelOptions) => {
|
||||
var _a12;
|
||||
if (!isResolved) {
|
||||
|
|
@ -427,7 +455,7 @@ function createRetryer(config) {
|
|||
isResolved = true;
|
||||
(_a12 = config.onSuccess) == null ? void 0 : _a12.call(config, value);
|
||||
continueFn == null ? void 0 : continueFn();
|
||||
promiseResolve(value);
|
||||
thenable.resolve(value);
|
||||
}
|
||||
};
|
||||
const reject = (value) => {
|
||||
|
|
@ -436,7 +464,7 @@ function createRetryer(config) {
|
|||
isResolved = true;
|
||||
(_a12 = config.onError) == null ? void 0 : _a12.call(config, value);
|
||||
continueFn == null ? void 0 : continueFn();
|
||||
promiseReject(value);
|
||||
thenable.reject(value);
|
||||
}
|
||||
};
|
||||
const pause = () => {
|
||||
|
|
@ -494,11 +522,11 @@ function createRetryer(config) {
|
|||
});
|
||||
};
|
||||
return {
|
||||
promise,
|
||||
promise: thenable,
|
||||
cancel,
|
||||
continue: () => {
|
||||
continueFn == null ? void 0 : continueFn();
|
||||
return promise;
|
||||
return thenable;
|
||||
},
|
||||
cancelRetry,
|
||||
continueRetry,
|
||||
|
|
@ -509,7 +537,7 @@ function createRetryer(config) {
|
|||
} else {
|
||||
pause().then(run);
|
||||
}
|
||||
return promise;
|
||||
return thenable;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -696,7 +724,10 @@ var Query = (_a4 = class extends Removable {
|
|||
);
|
||||
}
|
||||
isDisabled() {
|
||||
return this.getObserversCount() > 0 && !this.isActive();
|
||||
if (this.getObserversCount() > 0) {
|
||||
return !this.isActive();
|
||||
}
|
||||
return this.options.queryFn === skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
||||
}
|
||||
isStale() {
|
||||
if (this.state.isInvalidated) {
|
||||
|
|
@ -845,10 +876,7 @@ var Query = (_a4 = class extends Removable {
|
|||
this
|
||||
);
|
||||
}
|
||||
if (!this.isFetchingOptimistic) {
|
||||
this.scheduleGc();
|
||||
}
|
||||
this.isFetchingOptimistic = false;
|
||||
this.scheduleGc();
|
||||
};
|
||||
__privateSet(this, _retryer, createRetryer({
|
||||
initialPromise: fetchOptions == null ? void 0 : fetchOptions.initialPromise,
|
||||
|
|
@ -878,10 +906,7 @@ var Query = (_a4 = class extends Removable {
|
|||
this.state.error,
|
||||
this
|
||||
);
|
||||
if (!this.isFetchingOptimistic) {
|
||||
this.scheduleGc();
|
||||
}
|
||||
this.isFetchingOptimistic = false;
|
||||
this.scheduleGc();
|
||||
},
|
||||
onError,
|
||||
onFail: (failureCount, error) => {
|
||||
|
|
@ -1829,7 +1854,7 @@ var QueryClient = (_a8 = class {
|
|||
}, _queryCache = new WeakMap(), _mutationCache2 = new WeakMap(), _defaultOptions2 = new WeakMap(), _queryDefaults = new WeakMap(), _mutationDefaults = new WeakMap(), _mountCount = new WeakMap(), _unsubscribeFocus = new WeakMap(), _unsubscribeOnline = new WeakMap(), _a8);
|
||||
|
||||
// node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
||||
var _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _a9;
|
||||
var _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _a9;
|
||||
var QueryObserver = (_a9 = class extends Subscribable {
|
||||
constructor(client, options) {
|
||||
super();
|
||||
|
|
@ -1840,6 +1865,7 @@ var QueryObserver = (_a9 = class extends Subscribable {
|
|||
__privateAdd(this, _currentResult);
|
||||
__privateAdd(this, _currentResultState);
|
||||
__privateAdd(this, _currentResultOptions);
|
||||
__privateAdd(this, _currentThenable);
|
||||
__privateAdd(this, _selectError);
|
||||
__privateAdd(this, _selectFn);
|
||||
__privateAdd(this, _selectResult);
|
||||
|
|
@ -1853,6 +1879,12 @@ var QueryObserver = (_a9 = class extends Subscribable {
|
|||
this.options = options;
|
||||
__privateSet(this, _client, client);
|
||||
__privateSet(this, _selectError, null);
|
||||
__privateSet(this, _currentThenable, pendingThenable());
|
||||
if (!this.options.experimental_prefetchInRender) {
|
||||
__privateGet(this, _currentThenable).reject(
|
||||
new Error("experimental_prefetchInRender feature flag is not enabled")
|
||||
);
|
||||
}
|
||||
this.bindMethods();
|
||||
this.setOptions(options);
|
||||
}
|
||||
|
|
@ -1973,7 +2005,6 @@ var QueryObserver = (_a9 = class extends Subscribable {
|
|||
fetchOptimistic(options) {
|
||||
const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);
|
||||
const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), defaultedOptions);
|
||||
query.isFetchingOptimistic = true;
|
||||
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
||||
}
|
||||
fetch(fetchOptions) {
|
||||
|
|
@ -2093,9 +2124,42 @@ var QueryObserver = (_a9 = class extends Subscribable {
|
|||
isPlaceholderData,
|
||||
isRefetchError: isError && hasData,
|
||||
isStale: isStale(query, options),
|
||||
refetch: this.refetch
|
||||
refetch: this.refetch,
|
||||
promise: __privateGet(this, _currentThenable)
|
||||
};
|
||||
return result;
|
||||
const nextResult = result;
|
||||
if (this.options.experimental_prefetchInRender) {
|
||||
const finalizeThenableIfPossible = (thenable) => {
|
||||
if (nextResult.status === "error") {
|
||||
thenable.reject(nextResult.error);
|
||||
} else if (nextResult.data !== void 0) {
|
||||
thenable.resolve(nextResult.data);
|
||||
}
|
||||
};
|
||||
const recreateThenable = () => {
|
||||
const pending = __privateSet(this, _currentThenable, nextResult.promise = pendingThenable());
|
||||
finalizeThenableIfPossible(pending);
|
||||
};
|
||||
const prevThenable = __privateGet(this, _currentThenable);
|
||||
switch (prevThenable.status) {
|
||||
case "pending":
|
||||
if (query.queryHash === prevQuery.queryHash) {
|
||||
finalizeThenableIfPossible(prevThenable);
|
||||
}
|
||||
break;
|
||||
case "fulfilled":
|
||||
if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
|
||||
recreateThenable();
|
||||
}
|
||||
break;
|
||||
case "rejected":
|
||||
if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
|
||||
recreateThenable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return nextResult;
|
||||
}
|
||||
updateResult(notifyOptions) {
|
||||
const prevResult = __privateGet(this, _currentResult);
|
||||
|
|
@ -2142,7 +2206,7 @@ var QueryObserver = (_a9 = class extends Subscribable {
|
|||
__privateMethod(this, _QueryObserver_instances, updateTimers_fn).call(this);
|
||||
}
|
||||
}
|
||||
}, _client = new WeakMap(), _currentQuery = new WeakMap(), _currentQueryInitialState = new WeakMap(), _currentResult = new WeakMap(), _currentResultState = new WeakMap(), _currentResultOptions = new WeakMap(), _selectError = new WeakMap(), _selectFn = new WeakMap(), _selectResult = new WeakMap(), _lastQueryWithDefinedData = new WeakMap(), _staleTimeoutId = new WeakMap(), _refetchIntervalId = new WeakMap(), _currentRefetchInterval = new WeakMap(), _trackedProps = new WeakMap(), _QueryObserver_instances = new WeakSet(), executeFetch_fn = function(fetchOptions) {
|
||||
}, _client = new WeakMap(), _currentQuery = new WeakMap(), _currentQueryInitialState = new WeakMap(), _currentResult = new WeakMap(), _currentResultState = new WeakMap(), _currentResultOptions = new WeakMap(), _currentThenable = new WeakMap(), _selectError = new WeakMap(), _selectFn = new WeakMap(), _selectResult = new WeakMap(), _lastQueryWithDefinedData = new WeakMap(), _staleTimeoutId = new WeakMap(), _refetchIntervalId = new WeakMap(), _currentRefetchInterval = new WeakMap(), _trackedProps = new WeakMap(), _QueryObserver_instances = new WeakSet(), executeFetch_fn = function(fetchOptions) {
|
||||
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this);
|
||||
let promise = __privateGet(this, _currentQuery).fetch(
|
||||
this.options,
|
||||
|
|
@ -2254,19 +2318,21 @@ function replaceAt(array, index, value) {
|
|||
copy[index] = value;
|
||||
return copy;
|
||||
}
|
||||
var _client2, _result, _queries2, _observers2, _combinedResult, _lastCombine, _lastResult, _QueriesObserver_instances, combineResult_fn, findMatchingObservers_fn, onUpdate_fn, notify_fn2, _a10;
|
||||
var _client2, _result, _queries2, _options, _observers2, _combinedResult, _lastCombine, _lastResult, _QueriesObserver_instances, combineResult_fn, findMatchingObservers_fn, onUpdate_fn, notify_fn2, _a10;
|
||||
var QueriesObserver = (_a10 = class extends Subscribable {
|
||||
constructor(client, queries, _options) {
|
||||
constructor(client, queries, options) {
|
||||
super();
|
||||
__privateAdd(this, _QueriesObserver_instances);
|
||||
__privateAdd(this, _client2);
|
||||
__privateAdd(this, _result);
|
||||
__privateAdd(this, _queries2);
|
||||
__privateAdd(this, _options);
|
||||
__privateAdd(this, _observers2);
|
||||
__privateAdd(this, _combinedResult);
|
||||
__privateAdd(this, _lastCombine);
|
||||
__privateAdd(this, _lastResult);
|
||||
__privateSet(this, _client2, client);
|
||||
__privateSet(this, _options, options);
|
||||
__privateSet(this, _queries2, []);
|
||||
__privateSet(this, _observers2, []);
|
||||
__privateSet(this, _result, []);
|
||||
|
|
@ -2292,8 +2358,9 @@ var QueriesObserver = (_a10 = class extends Subscribable {
|
|||
observer.destroy();
|
||||
});
|
||||
}
|
||||
setQueries(queries, _options, notifyOptions) {
|
||||
setQueries(queries, options, notifyOptions) {
|
||||
__privateSet(this, _queries2, queries);
|
||||
__privateSet(this, _options, options);
|
||||
notifyManager.batch(() => {
|
||||
const prevObservers = __privateGet(this, _observers2);
|
||||
const newObserverMatches = __privateMethod(this, _QueriesObserver_instances, findMatchingObservers_fn).call(this, __privateGet(this, _queries2));
|
||||
|
|
@ -2357,7 +2424,7 @@ var QueriesObserver = (_a10 = class extends Subscribable {
|
|||
}
|
||||
];
|
||||
}
|
||||
}, _client2 = new WeakMap(), _result = new WeakMap(), _queries2 = new WeakMap(), _observers2 = new WeakMap(), _combinedResult = new WeakMap(), _lastCombine = new WeakMap(), _lastResult = new WeakMap(), _QueriesObserver_instances = new WeakSet(), combineResult_fn = function(input, combine) {
|
||||
}, _client2 = new WeakMap(), _result = new WeakMap(), _queries2 = new WeakMap(), _options = new WeakMap(), _observers2 = new WeakMap(), _combinedResult = new WeakMap(), _lastCombine = new WeakMap(), _lastResult = new WeakMap(), _QueriesObserver_instances = new WeakSet(), combineResult_fn = function(input, combine) {
|
||||
if (combine) {
|
||||
if (!__privateGet(this, _combinedResult) || __privateGet(this, _result) !== __privateGet(this, _lastResult) || combine !== __privateGet(this, _lastCombine)) {
|
||||
__privateSet(this, _lastCombine, combine);
|
||||
|
|
@ -2371,41 +2438,35 @@ var QueriesObserver = (_a10 = class extends Subscribable {
|
|||
}
|
||||
return input;
|
||||
}, findMatchingObservers_fn = function(queries) {
|
||||
const prevObservers = __privateGet(this, _observers2);
|
||||
const prevObserversMap = new Map(
|
||||
prevObservers.map((observer) => [observer.options.queryHash, observer])
|
||||
__privateGet(this, _observers2).map((observer) => [observer.options.queryHash, observer])
|
||||
);
|
||||
const defaultedQueryOptions = queries.map(
|
||||
(options) => __privateGet(this, _client2).defaultQueryOptions(options)
|
||||
);
|
||||
const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => {
|
||||
const match = prevObserversMap.get(defaultedOptions.queryHash);
|
||||
if (match != null) {
|
||||
return [{ defaultedQueryOptions: defaultedOptions, observer: match }];
|
||||
}
|
||||
return [];
|
||||
});
|
||||
const matchedQueryHashes = new Set(
|
||||
matchingObservers.map((match) => match.defaultedQueryOptions.queryHash)
|
||||
);
|
||||
const unmatchedQueries = defaultedQueryOptions.filter(
|
||||
(defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash)
|
||||
);
|
||||
const getObserver = (options) => {
|
||||
const observers = [];
|
||||
queries.forEach((options) => {
|
||||
const defaultedOptions = __privateGet(this, _client2).defaultQueryOptions(options);
|
||||
const currentObserver = __privateGet(this, _observers2).find(
|
||||
(o) => o.options.queryHash === defaultedOptions.queryHash
|
||||
);
|
||||
return currentObserver ?? new QueryObserver(__privateGet(this, _client2), defaultedOptions);
|
||||
};
|
||||
const newOrReusedObservers = unmatchedQueries.map((options) => {
|
||||
return {
|
||||
defaultedQueryOptions: options,
|
||||
observer: getObserver(options)
|
||||
};
|
||||
const match = prevObserversMap.get(defaultedOptions.queryHash);
|
||||
if (match) {
|
||||
observers.push({
|
||||
defaultedQueryOptions: defaultedOptions,
|
||||
observer: match
|
||||
});
|
||||
} else {
|
||||
const existingObserver = __privateGet(this, _observers2).find(
|
||||
(o) => o.options.queryHash === defaultedOptions.queryHash
|
||||
);
|
||||
observers.push({
|
||||
defaultedQueryOptions: defaultedOptions,
|
||||
observer: existingObserver ?? new QueryObserver(__privateGet(this, _client2), defaultedOptions)
|
||||
});
|
||||
}
|
||||
});
|
||||
return observers.sort((a, b) => {
|
||||
return queries.findIndex(
|
||||
(q) => q.queryHash === a.defaultedQueryOptions.queryHash
|
||||
) - queries.findIndex(
|
||||
(q) => q.queryHash === b.defaultedQueryOptions.queryHash
|
||||
);
|
||||
});
|
||||
const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions);
|
||||
return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries);
|
||||
}, onUpdate_fn = function(observer, result) {
|
||||
const index = __privateGet(this, _observers2).indexOf(observer);
|
||||
if (index !== -1) {
|
||||
|
|
@ -2413,11 +2474,18 @@ var QueriesObserver = (_a10 = class extends Subscribable {
|
|||
__privateMethod(this, _QueriesObserver_instances, notify_fn2).call(this);
|
||||
}
|
||||
}, notify_fn2 = function() {
|
||||
notifyManager.batch(() => {
|
||||
this.listeners.forEach((listener) => {
|
||||
listener(__privateGet(this, _result));
|
||||
});
|
||||
});
|
||||
var _a12;
|
||||
if (this.hasListeners()) {
|
||||
const previousResult = __privateGet(this, _combinedResult);
|
||||
const newResult = __privateMethod(this, _QueriesObserver_instances, combineResult_fn).call(this, __privateGet(this, _result), (_a12 = __privateGet(this, _options)) == null ? void 0 : _a12.combine);
|
||||
if (previousResult !== newResult) {
|
||||
notifyManager.batch(() => {
|
||||
this.listeners.forEach((listener) => {
|
||||
listener(__privateGet(this, _result));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}, _a10);
|
||||
|
||||
// node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
|
||||
|
|
@ -2806,7 +2874,7 @@ var getHasError = ({
|
|||
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
|
||||
var ensureSuspenseTimers = (defaultedOptions) => {
|
||||
if (defaultedOptions.suspense) {
|
||||
if (typeof defaultedOptions.staleTime !== "number") {
|
||||
if (defaultedOptions.staleTime === void 0) {
|
||||
defaultedOptions.staleTime = 1e3;
|
||||
}
|
||||
if (typeof defaultedOptions.gcTime === "number") {
|
||||
|
|
@ -2909,7 +2977,7 @@ function useQueries({
|
|||
// node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
||||
var React6 = __toESM(require_react(), 1);
|
||||
function useBaseQuery(options, Observer, queryClient) {
|
||||
var _a12, _b, _c, _d;
|
||||
var _a12, _b, _c, _d, _e;
|
||||
if (true) {
|
||||
if (typeof options !== "object" || Array.isArray(options)) {
|
||||
throw new Error(
|
||||
|
|
@ -2929,6 +2997,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|||
ensureSuspenseTimers(defaultedOptions);
|
||||
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
|
||||
useClearResetErrorBoundary(errorResetBoundary);
|
||||
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
||||
const [observer] = React6.useState(
|
||||
() => new Observer(
|
||||
client,
|
||||
|
|
@ -2968,6 +3037,18 @@ function useBaseQuery(options, Observer, queryClient) {
|
|||
defaultedOptions,
|
||||
result
|
||||
);
|
||||
if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {
|
||||
const promise = isNewCacheEntry ? (
|
||||
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
||||
fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
|
||||
) : (
|
||||
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
||||
(_e = client.getQueryCache().get(defaultedOptions.queryHash)) == null ? void 0 : _e.promise
|
||||
);
|
||||
promise == null ? void 0 : promise.catch(noop2).finally(() => {
|
||||
observer.updateResult();
|
||||
});
|
||||
}
|
||||
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
||||
}
|
||||
|
||||
|
|
|
|||
8
node_modules/.vite/deps/@tanstack_react-query.js.map
generated
vendored
8
node_modules/.vite/deps/@tanstack_react-query.js.map
generated
vendored
File diff suppressed because one or more lines are too long
8
node_modules/.vite/deps/BrowserPerformanceMeasurement-PMMEVXX3.js
generated
vendored
Normal file
8
node_modules/.vite/deps/BrowserPerformanceMeasurement-PMMEVXX3.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import {
|
||||
BrowserPerformanceMeasurement
|
||||
} from "./chunk-6NKFQNRI.js";
|
||||
import "./chunk-4MBMRILA.js";
|
||||
export {
|
||||
BrowserPerformanceMeasurement
|
||||
};
|
||||
//# sourceMappingURL=BrowserPerformanceMeasurement-PMMEVXX3.js.map
|
||||
7
node_modules/.vite/deps/BrowserPerformanceMeasurement-PMMEVXX3.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/BrowserPerformanceMeasurement-PMMEVXX3.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
488
node_modules/.vite/deps/_metadata.json
generated
vendored
488
node_modules/.vite/deps/_metadata.json
generated
vendored
|
|
@ -1,268 +1,310 @@
|
|||
{
|
||||
"hash": "f95c15b4",
|
||||
"hash": "e59da265",
|
||||
"configHash": "10f19e67",
|
||||
"lockfileHash": "b78ce9e4",
|
||||
"browserHash": "47e30824",
|
||||
"lockfileHash": "e009e63b",
|
||||
"browserHash": "c707363c",
|
||||
"optimized": {
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "47a50e1e",
|
||||
"fileHash": "296b0556",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@azure/msal-browser": {
|
||||
"src": "../../@azure/msal-browser/dist/index.mjs",
|
||||
"file": "@azure_msal-browser.js",
|
||||
"fileHash": "ea1ecf85",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@azure/msal-react": {
|
||||
"src": "../../@azure/msal-react/dist/index.js",
|
||||
"file": "@azure_msal-react.js",
|
||||
"fileHash": "7b5c3f7c",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@hookform/resolvers/zod": {
|
||||
"src": "../../@hookform/resolvers/zod/dist/zod.mjs",
|
||||
"file": "@hookform_resolvers_zod.js",
|
||||
"fileHash": "db727ac9",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-collapsible": {
|
||||
"src": "../../@radix-ui/react-collapsible/dist/index.mjs",
|
||||
"file": "@radix-ui_react-collapsible.js",
|
||||
"fileHash": "74ffe2a8",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-dropdown-menu": {
|
||||
"src": "../../@radix-ui/react-dropdown-menu/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dropdown-menu.js",
|
||||
"fileHash": "f8c23128",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-label": {
|
||||
"src": "../../@radix-ui/react-label/dist/index.mjs",
|
||||
"file": "@radix-ui_react-label.js",
|
||||
"fileHash": "283cca3f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-scroll-area": {
|
||||
"src": "../../@radix-ui/react-scroll-area/dist/index.mjs",
|
||||
"file": "@radix-ui_react-scroll-area.js",
|
||||
"fileHash": "a237c3eb",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-select": {
|
||||
"src": "../../@radix-ui/react-select/dist/index.mjs",
|
||||
"file": "@radix-ui_react-select.js",
|
||||
"fileHash": "7f84a6c4",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slider": {
|
||||
"src": "../../@radix-ui/react-slider/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slider.js",
|
||||
"fileHash": "d7fadad5",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slot": {
|
||||
"src": "../../@radix-ui/react-slot/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slot.js",
|
||||
"fileHash": "36ae901f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-switch": {
|
||||
"src": "../../@radix-ui/react-switch/dist/index.mjs",
|
||||
"file": "@radix-ui_react-switch.js",
|
||||
"fileHash": "d35f3f4c",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-tabs": {
|
||||
"src": "../../@radix-ui/react-tabs/dist/index.mjs",
|
||||
"file": "@radix-ui_react-tabs.js",
|
||||
"fileHash": "be3767b4",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-toast": {
|
||||
"src": "../../@radix-ui/react-toast/dist/index.mjs",
|
||||
"file": "@radix-ui_react-toast.js",
|
||||
"fileHash": "49507f30",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-tooltip": {
|
||||
"src": "../../@radix-ui/react-tooltip/dist/index.mjs",
|
||||
"file": "@radix-ui_react-tooltip.js",
|
||||
"fileHash": "9480d305",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@tanstack/react-query": {
|
||||
"src": "../../@tanstack/react-query/build/modern/index.js",
|
||||
"file": "@tanstack_react-query.js",
|
||||
"fileHash": "d65c5e94",
|
||||
"needsInterop": false
|
||||
},
|
||||
"axios": {
|
||||
"src": "../../axios/index.js",
|
||||
"file": "axios.js",
|
||||
"fileHash": "caf4de2c",
|
||||
"needsInterop": false
|
||||
},
|
||||
"class-variance-authority": {
|
||||
"src": "../../class-variance-authority/dist/index.mjs",
|
||||
"file": "class-variance-authority.js",
|
||||
"fileHash": "6bb1128b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"clsx": {
|
||||
"src": "../../clsx/dist/clsx.mjs",
|
||||
"file": "clsx.js",
|
||||
"fileHash": "a76e044b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.js",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "63cc8549",
|
||||
"needsInterop": false
|
||||
},
|
||||
"next-themes": {
|
||||
"src": "../../next-themes/dist/index.mjs",
|
||||
"file": "next-themes.js",
|
||||
"fileHash": "cdbfe2d9",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "7af2d18c",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "a198a0f8",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-hook-form": {
|
||||
"src": "../../react-hook-form/dist/index.esm.mjs",
|
||||
"file": "react-hook-form.js",
|
||||
"fileHash": "edc4deec",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.js",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "be629cd4",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "1181e0c9",
|
||||
"needsInterop": true
|
||||
},
|
||||
"recharts": {
|
||||
"src": "../../recharts/es6/index.js",
|
||||
"file": "recharts.js",
|
||||
"fileHash": "59ae00ff",
|
||||
"needsInterop": false
|
||||
},
|
||||
"sonner": {
|
||||
"src": "../../sonner/dist/index.mjs",
|
||||
"file": "sonner.js",
|
||||
"fileHash": "920a8bae",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tailwind-merge": {
|
||||
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
|
||||
"file": "tailwind-merge.js",
|
||||
"fileHash": "92e0356f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"zod": {
|
||||
"src": "../../zod/lib/index.mjs",
|
||||
"file": "zod.js",
|
||||
"fileHash": "15ec9263",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-checkbox": {
|
||||
"src": "../../@radix-ui/react-checkbox/dist/index.mjs",
|
||||
"file": "@radix-ui_react-checkbox.js",
|
||||
"fileHash": "e38ed247",
|
||||
"fileHash": "795721ac",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-alert-dialog": {
|
||||
"src": "../../@radix-ui/react-alert-dialog/dist/index.mjs",
|
||||
"file": "@radix-ui_react-alert-dialog.js",
|
||||
"fileHash": "3121dbdc",
|
||||
"fileHash": "5b04cd70",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-progress": {
|
||||
"src": "../../@radix-ui/react-progress/dist/index.mjs",
|
||||
"file": "@radix-ui_react-progress.js",
|
||||
"fileHash": "e73bcb88",
|
||||
"@radix-ui/react-checkbox": {
|
||||
"src": "../../@radix-ui/react-checkbox/dist/index.mjs",
|
||||
"file": "@radix-ui_react-checkbox.js",
|
||||
"fileHash": "4a42771f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-radio-group": {
|
||||
"src": "../../@radix-ui/react-radio-group/dist/index.mjs",
|
||||
"file": "@radix-ui_react-radio-group.js",
|
||||
"fileHash": "2075210c",
|
||||
"@radix-ui/react-collapsible": {
|
||||
"src": "../../@radix-ui/react-collapsible/dist/index.mjs",
|
||||
"file": "@radix-ui_react-collapsible.js",
|
||||
"fileHash": "b42d79cf",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-dialog": {
|
||||
"src": "../../@radix-ui/react-dialog/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dialog.js",
|
||||
"fileHash": "827d17ce",
|
||||
"fileHash": "6bf546e3",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-separator": {
|
||||
"src": "../../@radix-ui/react-separator/dist/index.mjs",
|
||||
"file": "@radix-ui_react-separator.js",
|
||||
"fileHash": "163f46fd",
|
||||
"@radix-ui/react-dropdown-menu": {
|
||||
"src": "../../@radix-ui/react-dropdown-menu/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dropdown-menu.js",
|
||||
"fileHash": "92df7f98",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-label": {
|
||||
"src": "../../@radix-ui/react-label/dist/index.mjs",
|
||||
"file": "@radix-ui_react-label.js",
|
||||
"fileHash": "18ac9357",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-progress": {
|
||||
"src": "../../@radix-ui/react-progress/dist/index.mjs",
|
||||
"file": "@radix-ui_react-progress.js",
|
||||
"fileHash": "2a3bf401",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-radio-group": {
|
||||
"src": "../../@radix-ui/react-radio-group/dist/index.mjs",
|
||||
"file": "@radix-ui_react-radio-group.js",
|
||||
"fileHash": "803e61ef",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-scroll-area": {
|
||||
"src": "../../@radix-ui/react-scroll-area/dist/index.mjs",
|
||||
"file": "@radix-ui_react-scroll-area.js",
|
||||
"fileHash": "b660bc14",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-select": {
|
||||
"src": "../../@radix-ui/react-select/dist/index.mjs",
|
||||
"file": "@radix-ui_react-select.js",
|
||||
"fileHash": "d251ec97",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slider": {
|
||||
"src": "../../@radix-ui/react-slider/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slider.js",
|
||||
"fileHash": "f6777095",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slot": {
|
||||
"src": "../../@radix-ui/react-slot/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slot.js",
|
||||
"fileHash": "b815ff54",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-switch": {
|
||||
"src": "../../@radix-ui/react-switch/dist/index.mjs",
|
||||
"file": "@radix-ui_react-switch.js",
|
||||
"fileHash": "09a04cf4",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-tabs": {
|
||||
"src": "../../@radix-ui/react-tabs/dist/index.mjs",
|
||||
"file": "@radix-ui_react-tabs.js",
|
||||
"fileHash": "efabe3ee",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-tooltip": {
|
||||
"src": "../../@radix-ui/react-tooltip/dist/index.mjs",
|
||||
"file": "@radix-ui_react-tooltip.js",
|
||||
"fileHash": "5b52a878",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@tanstack/react-query": {
|
||||
"src": "../../@tanstack/react-query/build/modern/index.js",
|
||||
"file": "@tanstack_react-query.js",
|
||||
"fileHash": "b60d1fb8",
|
||||
"needsInterop": false
|
||||
},
|
||||
"axios": {
|
||||
"src": "../../axios/index.js",
|
||||
"file": "axios.js",
|
||||
"fileHash": "c3bfc41e",
|
||||
"needsInterop": false
|
||||
},
|
||||
"class-variance-authority": {
|
||||
"src": "../../class-variance-authority/dist/index.mjs",
|
||||
"file": "class-variance-authority.js",
|
||||
"fileHash": "ba7742dd",
|
||||
"needsInterop": false
|
||||
},
|
||||
"clsx": {
|
||||
"src": "../../clsx/dist/clsx.mjs",
|
||||
"file": "clsx.js",
|
||||
"fileHash": "160c5f02",
|
||||
"needsInterop": false
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.js",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "ac5a7dee",
|
||||
"needsInterop": false
|
||||
},
|
||||
"next-themes": {
|
||||
"src": "../../next-themes/dist/index.mjs",
|
||||
"file": "next-themes.js",
|
||||
"fileHash": "41959e8d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "adaa75de",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "bb00e8d4",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-hook-form": {
|
||||
"src": "../../react-hook-form/dist/index.esm.mjs",
|
||||
"file": "react-hook-form.js",
|
||||
"fileHash": "028caf80",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.js",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "df78eb1d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "7855ecb0",
|
||||
"needsInterop": true
|
||||
},
|
||||
"recharts": {
|
||||
"src": "../../recharts/es6/index.js",
|
||||
"file": "recharts.js",
|
||||
"fileHash": "76cdee86",
|
||||
"needsInterop": false
|
||||
},
|
||||
"socket.io-client": {
|
||||
"src": "../../socket.io-client/build/esm/index.js",
|
||||
"file": "socket__io-client.js",
|
||||
"fileHash": "a8cc505b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"sonner": {
|
||||
"src": "../../sonner/dist/index.mjs",
|
||||
"file": "sonner.js",
|
||||
"fileHash": "cdc966e5",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tailwind-merge": {
|
||||
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
|
||||
"file": "tailwind-merge.js",
|
||||
"fileHash": "f3a03256",
|
||||
"needsInterop": false
|
||||
},
|
||||
"zod": {
|
||||
"src": "../../zod/lib/index.mjs",
|
||||
"file": "zod.js",
|
||||
"fileHash": "e6e5f53a",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@dnd-kit/sortable": {
|
||||
"src": "../../@dnd-kit/sortable/dist/sortable.esm.js",
|
||||
"file": "@dnd-kit_sortable.js",
|
||||
"fileHash": "fd349137",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@dnd-kit/utilities": {
|
||||
"src": "../../@dnd-kit/utilities/dist/utilities.esm.js",
|
||||
"file": "@dnd-kit_utilities.js",
|
||||
"fileHash": "0853e712",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@dnd-kit/core": {
|
||||
"src": "../../@dnd-kit/core/dist/core.esm.js",
|
||||
"file": "@dnd-kit_core.js",
|
||||
"fileHash": "30017f7d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@dnd-kit/modifiers": {
|
||||
"src": "../../@dnd-kit/modifiers/dist/modifiers.esm.js",
|
||||
"file": "@dnd-kit_modifiers.js",
|
||||
"fileHash": "6d5a7f21",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-V27RRWZQ": {
|
||||
"file": "chunk-V27RRWZQ.js"
|
||||
},
|
||||
"BrowserPerformanceMeasurement-PMMEVXX3": {
|
||||
"file": "BrowserPerformanceMeasurement-PMMEVXX3.js"
|
||||
},
|
||||
"chunk-U7P2NEEE": {
|
||||
"file": "chunk-U7P2NEEE.js"
|
||||
},
|
||||
"chunk-DDW565K2": {
|
||||
"file": "chunk-DDW565K2.js"
|
||||
},
|
||||
"chunk-JV5O627A": {
|
||||
"file": "chunk-JV5O627A.js"
|
||||
},
|
||||
"chunk-3GV3KT4M": {
|
||||
"file": "chunk-3GV3KT4M.js"
|
||||
},
|
||||
"chunk-HQGJFDI6": {
|
||||
"file": "chunk-HQGJFDI6.js"
|
||||
},
|
||||
"chunk-QYKEMCE4": {
|
||||
"file": "chunk-QYKEMCE4.js"
|
||||
},
|
||||
"chunk-ENGL2KVA": {
|
||||
"file": "chunk-ENGL2KVA.js"
|
||||
},
|
||||
"chunk-6SPNF6KQ": {
|
||||
"file": "chunk-6SPNF6KQ.js"
|
||||
},
|
||||
"chunk-6UE7W7QM": {
|
||||
"file": "chunk-6UE7W7QM.js"
|
||||
},
|
||||
"chunk-MR3TNHRB": {
|
||||
"file": "chunk-MR3TNHRB.js"
|
||||
},
|
||||
"chunk-J3JCCWF4": {
|
||||
"file": "chunk-J3JCCWF4.js"
|
||||
},
|
||||
"chunk-5I6CIHEW": {
|
||||
"file": "chunk-5I6CIHEW.js"
|
||||
},
|
||||
"chunk-H4VE5LV5": {
|
||||
"file": "chunk-H4VE5LV5.js"
|
||||
},
|
||||
"chunk-6ZMM2PAV": {
|
||||
"file": "chunk-6ZMM2PAV.js"
|
||||
},
|
||||
"chunk-3GV3KT4M": {
|
||||
"file": "chunk-3GV3KT4M.js"
|
||||
},
|
||||
"chunk-BAWHRVBE": {
|
||||
"file": "chunk-BAWHRVBE.js"
|
||||
},
|
||||
"chunk-Z3MJAI5R": {
|
||||
"file": "chunk-Z3MJAI5R.js"
|
||||
},
|
||||
"chunk-6NKFQNRI": {
|
||||
"file": "chunk-6NKFQNRI.js"
|
||||
},
|
||||
"chunk-RBMNEPGM": {
|
||||
"file": "chunk-RBMNEPGM.js"
|
||||
},
|
||||
"chunk-DDW565K2": {
|
||||
"file": "chunk-DDW565K2.js"
|
||||
},
|
||||
"chunk-HD7ZGEUK": {
|
||||
"file": "chunk-HD7ZGEUK.js"
|
||||
},
|
||||
"chunk-HUHORXLV": {
|
||||
"file": "chunk-HUHORXLV.js"
|
||||
},
|
||||
"chunk-5ZUJRVG4": {
|
||||
"file": "chunk-5ZUJRVG4.js"
|
||||
},
|
||||
"chunk-6SPNF6KQ": {
|
||||
"file": "chunk-6SPNF6KQ.js"
|
||||
},
|
||||
"chunk-O2UA4OQB": {
|
||||
"file": "chunk-O2UA4OQB.js"
|
||||
},
|
||||
"chunk-TZDCYJOT": {
|
||||
"file": "chunk-TZDCYJOT.js"
|
||||
"chunk-AJMUNMLZ": {
|
||||
"file": "chunk-AJMUNMLZ.js"
|
||||
},
|
||||
"chunk-OAV3HHWW": {
|
||||
"file": "chunk-OAV3HHWW.js"
|
||||
"chunk-3PHEZ67U": {
|
||||
"file": "chunk-3PHEZ67U.js"
|
||||
},
|
||||
"chunk-SZRZRZSM": {
|
||||
"file": "chunk-SZRZRZSM.js"
|
||||
"chunk-CSR2432P": {
|
||||
"file": "chunk-CSR2432P.js"
|
||||
},
|
||||
"chunk-ZZUMGTHG": {
|
||||
"file": "chunk-ZZUMGTHG.js"
|
||||
},
|
||||
"chunk-MZLEVI2I": {
|
||||
"file": "chunk-MZLEVI2I.js"
|
||||
},
|
||||
"chunk-I6MWER2B": {
|
||||
"file": "chunk-I6MWER2B.js"
|
||||
},
|
||||
"chunk-ILYE3ZA7": {
|
||||
"file": "chunk-ILYE3ZA7.js"
|
||||
},
|
||||
"chunk-H55D7VYG": {
|
||||
"file": "chunk-H55D7VYG.js"
|
||||
|
|
|
|||
1158
node_modules/.vite/deps/chunk-QYKEMCE4.js → node_modules/.vite/deps/chunk-3PHEZ67U.js
generated
vendored
1158
node_modules/.vite/deps/chunk-QYKEMCE4.js → node_modules/.vite/deps/chunk-3PHEZ67U.js
generated
vendored
File diff suppressed because it is too large
Load diff
7
node_modules/.vite/deps/chunk-3PHEZ67U.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-3PHEZ67U.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
node_modules/.vite/deps/chunk-ENGL2KVA.js → node_modules/.vite/deps/chunk-5ZUJRVG4.js
generated
vendored
16
node_modules/.vite/deps/chunk-ENGL2KVA.js → node_modules/.vite/deps/chunk-5ZUJRVG4.js
generated
vendored
|
|
@ -1,19 +1,19 @@
|
|||
import {
|
||||
createCollection
|
||||
} from "./chunk-6SPNF6KQ.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-5I6CIHEW.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-H4VE5LV5.js";
|
||||
import {
|
||||
useDirection
|
||||
} from "./chunk-O2UA4OQB.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
useCallbackRef
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -308,4 +308,4 @@ export {
|
|||
Root,
|
||||
Item
|
||||
};
|
||||
//# sourceMappingURL=chunk-ENGL2KVA.js.map
|
||||
//# sourceMappingURL=chunk-5ZUJRVG4.js.map
|
||||
85
node_modules/.vite/deps/chunk-6NKFQNRI.js
generated
vendored
Normal file
85
node_modules/.vite/deps/chunk-6NKFQNRI.js
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
// node_modules/@azure/msal-browser/dist/telemetry/BrowserPerformanceMeasurement.mjs
|
||||
var BrowserPerformanceMeasurement = class _BrowserPerformanceMeasurement {
|
||||
constructor(name, correlationId) {
|
||||
this.correlationId = correlationId;
|
||||
this.measureName = _BrowserPerformanceMeasurement.makeMeasureName(name, correlationId);
|
||||
this.startMark = _BrowserPerformanceMeasurement.makeStartMark(name, correlationId);
|
||||
this.endMark = _BrowserPerformanceMeasurement.makeEndMark(name, correlationId);
|
||||
}
|
||||
static makeMeasureName(name, correlationId) {
|
||||
return `msal.measure.${name}.${correlationId}`;
|
||||
}
|
||||
static makeStartMark(name, correlationId) {
|
||||
return `msal.start.${name}.${correlationId}`;
|
||||
}
|
||||
static makeEndMark(name, correlationId) {
|
||||
return `msal.end.${name}.${correlationId}`;
|
||||
}
|
||||
static supportsBrowserPerformance() {
|
||||
return typeof window !== "undefined" && typeof window.performance !== "undefined" && typeof window.performance.mark === "function" && typeof window.performance.measure === "function" && typeof window.performance.clearMarks === "function" && typeof window.performance.clearMeasures === "function" && typeof window.performance.getEntriesByName === "function";
|
||||
}
|
||||
/**
|
||||
* Flush browser marks and measurements.
|
||||
* @param {string} correlationId
|
||||
* @param {SubMeasurement} measurements
|
||||
*/
|
||||
static flushMeasurements(correlationId, measurements) {
|
||||
if (_BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
|
||||
try {
|
||||
measurements.forEach((measurement) => {
|
||||
const measureName = _BrowserPerformanceMeasurement.makeMeasureName(measurement.name, correlationId);
|
||||
const entriesForMeasurement = window.performance.getEntriesByName(measureName, "measure");
|
||||
if (entriesForMeasurement.length > 0) {
|
||||
window.performance.clearMeasures(measureName);
|
||||
window.performance.clearMarks(_BrowserPerformanceMeasurement.makeStartMark(measureName, correlationId));
|
||||
window.performance.clearMarks(_BrowserPerformanceMeasurement.makeEndMark(measureName, correlationId));
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
startMeasurement() {
|
||||
if (_BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
|
||||
try {
|
||||
window.performance.mark(this.startMark);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
endMeasurement() {
|
||||
if (_BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
|
||||
try {
|
||||
window.performance.mark(this.endMark);
|
||||
window.performance.measure(this.measureName, this.startMark, this.endMark);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
flushMeasurement() {
|
||||
if (_BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
|
||||
try {
|
||||
const entriesForMeasurement = window.performance.getEntriesByName(this.measureName, "measure");
|
||||
if (entriesForMeasurement.length > 0) {
|
||||
const durationMs = entriesForMeasurement[0].duration;
|
||||
window.performance.clearMeasures(this.measureName);
|
||||
window.performance.clearMarks(this.startMark);
|
||||
window.performance.clearMarks(this.endMark);
|
||||
return durationMs;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
BrowserPerformanceMeasurement
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
@azure/msal-browser/dist/telemetry/BrowserPerformanceMeasurement.mjs:
|
||||
(*! @azure/msal-browser v4.19.0 2025-08-05 *)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-6NKFQNRI.js.map
|
||||
7
node_modules/.vite/deps/chunk-6NKFQNRI.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-6NKFQNRI.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
|
|
@ -48,4 +48,4 @@ function useSize(element) {
|
|||
export {
|
||||
useSize
|
||||
};
|
||||
//# sourceMappingURL=chunk-MR3TNHRB.js.map
|
||||
//# sourceMappingURL=chunk-AJMUNMLZ.js.map
|
||||
311
node_modules/.vite/deps/chunk-BAWHRVBE.js
generated
vendored
Normal file
311
node_modules/.vite/deps/chunk-BAWHRVBE.js
generated
vendored
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
||||
var import_react = __toESM(require_react());
|
||||
function useCombinedRefs() {
|
||||
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
refs[_key] = arguments[_key];
|
||||
}
|
||||
return (0, import_react.useMemo)(
|
||||
() => (node) => {
|
||||
refs.forEach((ref) => ref(node));
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
refs
|
||||
);
|
||||
}
|
||||
var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
||||
function isWindow(element) {
|
||||
const elementString = Object.prototype.toString.call(element);
|
||||
return elementString === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
||||
elementString === "[object global]";
|
||||
}
|
||||
function isNode(node) {
|
||||
return "nodeType" in node;
|
||||
}
|
||||
function getWindow(target) {
|
||||
var _target$ownerDocument, _target$ownerDocument2;
|
||||
if (!target) {
|
||||
return window;
|
||||
}
|
||||
if (isWindow(target)) {
|
||||
return target;
|
||||
}
|
||||
if (!isNode(target)) {
|
||||
return window;
|
||||
}
|
||||
return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;
|
||||
}
|
||||
function isDocument(node) {
|
||||
const {
|
||||
Document
|
||||
} = getWindow(node);
|
||||
return node instanceof Document;
|
||||
}
|
||||
function isHTMLElement(node) {
|
||||
if (isWindow(node)) {
|
||||
return false;
|
||||
}
|
||||
return node instanceof getWindow(node).HTMLElement;
|
||||
}
|
||||
function isSVGElement(node) {
|
||||
return node instanceof getWindow(node).SVGElement;
|
||||
}
|
||||
function getOwnerDocument(target) {
|
||||
if (!target) {
|
||||
return document;
|
||||
}
|
||||
if (isWindow(target)) {
|
||||
return target.document;
|
||||
}
|
||||
if (!isNode(target)) {
|
||||
return document;
|
||||
}
|
||||
if (isDocument(target)) {
|
||||
return target;
|
||||
}
|
||||
if (isHTMLElement(target) || isSVGElement(target)) {
|
||||
return target.ownerDocument;
|
||||
}
|
||||
return document;
|
||||
}
|
||||
var useIsomorphicLayoutEffect = canUseDOM ? import_react.useLayoutEffect : import_react.useEffect;
|
||||
function useEvent(handler) {
|
||||
const handlerRef = (0, import_react.useRef)(handler);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
handlerRef.current = handler;
|
||||
});
|
||||
return (0, import_react.useCallback)(function() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
return handlerRef.current == null ? void 0 : handlerRef.current(...args);
|
||||
}, []);
|
||||
}
|
||||
function useInterval() {
|
||||
const intervalRef = (0, import_react.useRef)(null);
|
||||
const set = (0, import_react.useCallback)((listener, duration) => {
|
||||
intervalRef.current = setInterval(listener, duration);
|
||||
}, []);
|
||||
const clear = (0, import_react.useCallback)(() => {
|
||||
if (intervalRef.current !== null) {
|
||||
clearInterval(intervalRef.current);
|
||||
intervalRef.current = null;
|
||||
}
|
||||
}, []);
|
||||
return [set, clear];
|
||||
}
|
||||
function useLatestValue(value, dependencies) {
|
||||
if (dependencies === void 0) {
|
||||
dependencies = [value];
|
||||
}
|
||||
const valueRef = (0, import_react.useRef)(value);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
if (valueRef.current !== value) {
|
||||
valueRef.current = value;
|
||||
}
|
||||
}, dependencies);
|
||||
return valueRef;
|
||||
}
|
||||
function useLazyMemo(callback, dependencies) {
|
||||
const valueRef = (0, import_react.useRef)();
|
||||
return (0, import_react.useMemo)(
|
||||
() => {
|
||||
const newValue = callback(valueRef.current);
|
||||
valueRef.current = newValue;
|
||||
return newValue;
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[...dependencies]
|
||||
);
|
||||
}
|
||||
function useNodeRef(onChange) {
|
||||
const onChangeHandler = useEvent(onChange);
|
||||
const node = (0, import_react.useRef)(null);
|
||||
const setNodeRef = (0, import_react.useCallback)(
|
||||
(element) => {
|
||||
if (element !== node.current) {
|
||||
onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
|
||||
}
|
||||
node.current = element;
|
||||
},
|
||||
//eslint-disable-next-line
|
||||
[]
|
||||
);
|
||||
return [node, setNodeRef];
|
||||
}
|
||||
function usePrevious(value) {
|
||||
const ref = (0, import_react.useRef)();
|
||||
(0, import_react.useEffect)(() => {
|
||||
ref.current = value;
|
||||
}, [value]);
|
||||
return ref.current;
|
||||
}
|
||||
var ids = {};
|
||||
function useUniqueId(prefix, value) {
|
||||
return (0, import_react.useMemo)(() => {
|
||||
if (value) {
|
||||
return value;
|
||||
}
|
||||
const id = ids[prefix] == null ? 0 : ids[prefix] + 1;
|
||||
ids[prefix] = id;
|
||||
return prefix + "-" + id;
|
||||
}, [prefix, value]);
|
||||
}
|
||||
function createAdjustmentFn(modifier) {
|
||||
return function(object) {
|
||||
for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
adjustments[_key - 1] = arguments[_key];
|
||||
}
|
||||
return adjustments.reduce((accumulator, adjustment) => {
|
||||
const entries = Object.entries(adjustment);
|
||||
for (const [key, valueAdjustment] of entries) {
|
||||
const value = accumulator[key];
|
||||
if (value != null) {
|
||||
accumulator[key] = value + modifier * valueAdjustment;
|
||||
}
|
||||
}
|
||||
return accumulator;
|
||||
}, {
|
||||
...object
|
||||
});
|
||||
};
|
||||
}
|
||||
var add = createAdjustmentFn(1);
|
||||
var subtract = createAdjustmentFn(-1);
|
||||
function hasViewportRelativeCoordinates(event) {
|
||||
return "clientX" in event && "clientY" in event;
|
||||
}
|
||||
function isKeyboardEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
const {
|
||||
KeyboardEvent
|
||||
} = getWindow(event.target);
|
||||
return KeyboardEvent && event instanceof KeyboardEvent;
|
||||
}
|
||||
function isTouchEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
const {
|
||||
TouchEvent
|
||||
} = getWindow(event.target);
|
||||
return TouchEvent && event instanceof TouchEvent;
|
||||
}
|
||||
function getEventCoordinates(event) {
|
||||
if (isTouchEvent(event)) {
|
||||
if (event.touches && event.touches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.touches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
} else if (event.changedTouches && event.changedTouches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.changedTouches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
}
|
||||
}
|
||||
if (hasViewportRelativeCoordinates(event)) {
|
||||
return {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var CSS = Object.freeze({
|
||||
Translate: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
x,
|
||||
y
|
||||
} = transform;
|
||||
return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
|
||||
}
|
||||
},
|
||||
Scale: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
scaleX,
|
||||
scaleY
|
||||
} = transform;
|
||||
return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
|
||||
}
|
||||
},
|
||||
Transform: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" ");
|
||||
}
|
||||
},
|
||||
Transition: {
|
||||
toString(_ref) {
|
||||
let {
|
||||
property,
|
||||
duration,
|
||||
easing
|
||||
} = _ref;
|
||||
return property + " " + duration + "ms " + easing;
|
||||
}
|
||||
}
|
||||
});
|
||||
var SELECTOR = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
||||
function findFirstFocusableNode(element) {
|
||||
if (element.matches(SELECTOR)) {
|
||||
return element;
|
||||
}
|
||||
return element.querySelector(SELECTOR);
|
||||
}
|
||||
|
||||
export {
|
||||
useCombinedRefs,
|
||||
canUseDOM,
|
||||
isWindow,
|
||||
isNode,
|
||||
getWindow,
|
||||
isDocument,
|
||||
isHTMLElement,
|
||||
isSVGElement,
|
||||
getOwnerDocument,
|
||||
useIsomorphicLayoutEffect,
|
||||
useEvent,
|
||||
useInterval,
|
||||
useLatestValue,
|
||||
useLazyMemo,
|
||||
useNodeRef,
|
||||
usePrevious,
|
||||
useUniqueId,
|
||||
add,
|
||||
subtract,
|
||||
hasViewportRelativeCoordinates,
|
||||
isKeyboardEvent,
|
||||
isTouchEvent,
|
||||
getEventCoordinates,
|
||||
CSS,
|
||||
findFirstFocusableNode
|
||||
};
|
||||
//# sourceMappingURL=chunk-BAWHRVBE.js.map
|
||||
7
node_modules/.vite/deps/chunk-BAWHRVBE.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-BAWHRVBE.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
node_modules/.vite/deps/chunk-JV5O627A.js → node_modules/.vite/deps/chunk-CSR2432P.js
generated
vendored
64
node_modules/.vite/deps/chunk-JV5O627A.js → node_modules/.vite/deps/chunk-CSR2432P.js
generated
vendored
|
|
@ -1,11 +1,8 @@
|
|||
import {
|
||||
useEscapeKeydown
|
||||
} from "./chunk-J3JCCWF4.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent
|
||||
|
|
@ -27,19 +24,36 @@ import {
|
|||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
||||
React.useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.key === "Escape") {
|
||||
onEscapeKeyDown(event);
|
||||
}
|
||||
};
|
||||
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
||||
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
||||
}, [onEscapeKeyDown, ownerDocument]);
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
||||
var CONTEXT_UPDATE = "dismissableLayer.update";
|
||||
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
||||
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
||||
var originalBodyPointerEvents;
|
||||
var DismissableLayerContext = React.createContext({
|
||||
var DismissableLayerContext = React2.createContext({
|
||||
layers: /* @__PURE__ */ new Set(),
|
||||
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
||||
branches: /* @__PURE__ */ new Set()
|
||||
});
|
||||
var DismissableLayer = React.forwardRef(
|
||||
var DismissableLayer = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
disableOutsidePointerEvents = false,
|
||||
|
|
@ -50,10 +64,10 @@ var DismissableLayer = React.forwardRef(
|
|||
onDismiss,
|
||||
...layerProps
|
||||
} = props;
|
||||
const context = React.useContext(DismissableLayerContext);
|
||||
const [node, setNode] = React.useState(null);
|
||||
const context = React2.useContext(DismissableLayerContext);
|
||||
const [node, setNode] = React2.useState(null);
|
||||
const ownerDocument = (node == null ? void 0 : node.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document);
|
||||
const [, force] = React.useState({});
|
||||
const [, force] = React2.useState({});
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
||||
const layers = Array.from(context.layers);
|
||||
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
||||
|
|
@ -86,7 +100,7 @@ var DismissableLayer = React.forwardRef(
|
|||
onDismiss();
|
||||
}
|
||||
}, ownerDocument);
|
||||
React.useEffect(() => {
|
||||
React2.useEffect(() => {
|
||||
if (!node) return;
|
||||
if (disableOutsidePointerEvents) {
|
||||
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
||||
|
|
@ -103,7 +117,7 @@ var DismissableLayer = React.forwardRef(
|
|||
}
|
||||
};
|
||||
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
||||
React.useEffect(() => {
|
||||
React2.useEffect(() => {
|
||||
return () => {
|
||||
if (!node) return;
|
||||
context.layers.delete(node);
|
||||
|
|
@ -111,7 +125,7 @@ var DismissableLayer = React.forwardRef(
|
|||
dispatchUpdate();
|
||||
};
|
||||
}, [node, context]);
|
||||
React.useEffect(() => {
|
||||
React2.useEffect(() => {
|
||||
const handleUpdate = () => force({});
|
||||
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
|
|
@ -137,11 +151,11 @@ var DismissableLayer = React.forwardRef(
|
|||
);
|
||||
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
||||
var BRANCH_NAME = "DismissableLayerBranch";
|
||||
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
||||
const context = React.useContext(DismissableLayerContext);
|
||||
const ref = React.useRef(null);
|
||||
var DismissableLayerBranch = React2.forwardRef((props, forwardedRef) => {
|
||||
const context = React2.useContext(DismissableLayerContext);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
React.useEffect(() => {
|
||||
React2.useEffect(() => {
|
||||
const node = ref.current;
|
||||
if (node) {
|
||||
context.branches.add(node);
|
||||
|
|
@ -155,10 +169,10 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|||
DismissableLayerBranch.displayName = BRANCH_NAME;
|
||||
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
||||
const isPointerInsideReactTreeRef = React.useRef(false);
|
||||
const handleClickRef = React.useRef(() => {
|
||||
const isPointerInsideReactTreeRef = React2.useRef(false);
|
||||
const handleClickRef = React2.useRef(() => {
|
||||
});
|
||||
React.useEffect(() => {
|
||||
React2.useEffect(() => {
|
||||
const handlePointerDown = (event) => {
|
||||
if (event.target && !isPointerInsideReactTreeRef.current) {
|
||||
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
||||
|
|
@ -199,8 +213,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis
|
|||
}
|
||||
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
||||
const isFocusInsideReactTreeRef = React.useRef(false);
|
||||
React.useEffect(() => {
|
||||
const isFocusInsideReactTreeRef = React2.useRef(false);
|
||||
React2.useEffect(() => {
|
||||
const handleFocus = (event) => {
|
||||
if (event.target && !isFocusInsideReactTreeRef.current) {
|
||||
const eventDetail = { originalEvent: event };
|
||||
|
|
@ -233,14 +247,14 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|||
}
|
||||
|
||||
// node_modules/@radix-ui/react-portal/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var import_react_dom = __toESM(require_react_dom(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var PORTAL_NAME = "Portal";
|
||||
var Portal = React2.forwardRef((props, forwardedRef) => {
|
||||
var Portal = React3.forwardRef((props, forwardedRef) => {
|
||||
var _a;
|
||||
const { container: containerProp, ...portalProps } = props;
|
||||
const [mounted, setMounted] = React2.useState(false);
|
||||
const [mounted, setMounted] = React3.useState(false);
|
||||
useLayoutEffect2(() => setMounted(true), []);
|
||||
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
||||
return container ? import_react_dom.default.createPortal((0, import_jsx_runtime2.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
||||
|
|
@ -251,4 +265,4 @@ export {
|
|||
DismissableLayer,
|
||||
Portal
|
||||
};
|
||||
//# sourceMappingURL=chunk-JV5O627A.js.map
|
||||
//# sourceMappingURL=chunk-CSR2432P.js.map
|
||||
File diff suppressed because one or more lines are too long
370
node_modules/.vite/deps/chunk-HD7ZGEUK.js
generated
vendored
Normal file
370
node_modules/.vite/deps/chunk-HD7ZGEUK.js
generated
vendored
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
import {
|
||||
Combination_default,
|
||||
FocusScope,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-3PHEZ67U.js";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal
|
||||
} from "./chunk-CSR2432P.js";
|
||||
import {
|
||||
useId
|
||||
} from "./chunk-ZZUMGTHG.js";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-MZLEVI2I.js";
|
||||
import {
|
||||
useControllableState
|
||||
} from "./chunk-I6MWER2B.js";
|
||||
import {
|
||||
composeEventHandlers,
|
||||
createContext2,
|
||||
createContextScope
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
import {
|
||||
Slot,
|
||||
useComposedRefs
|
||||
} from "./chunk-4WIT4MX7.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-S77I6LSE.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DIALOG_NAME = "Dialog";
|
||||
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
||||
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
||||
var Dialog = (props) => {
|
||||
const {
|
||||
__scopeDialog,
|
||||
children,
|
||||
open: openProp,
|
||||
defaultOpen,
|
||||
onOpenChange,
|
||||
modal = true
|
||||
} = props;
|
||||
const triggerRef = React.useRef(null);
|
||||
const contentRef = React.useRef(null);
|
||||
const [open = false, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
onChange: onOpenChange
|
||||
});
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogProvider,
|
||||
{
|
||||
scope: __scopeDialog,
|
||||
triggerRef,
|
||||
contentRef,
|
||||
contentId: useId(),
|
||||
titleId: useId(),
|
||||
descriptionId: useId(),
|
||||
open,
|
||||
onOpenChange: setOpen,
|
||||
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
||||
modal,
|
||||
children
|
||||
}
|
||||
);
|
||||
};
|
||||
Dialog.displayName = DIALOG_NAME;
|
||||
var TRIGGER_NAME = "DialogTrigger";
|
||||
var DialogTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...triggerProps } = props;
|
||||
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
||||
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
"aria-haspopup": "dialog",
|
||||
"aria-expanded": context.open,
|
||||
"aria-controls": context.contentId,
|
||||
"data-state": getState(context.open),
|
||||
...triggerProps,
|
||||
ref: composedTriggerRef,
|
||||
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "DialogPortal";
|
||||
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
||||
forceMount: void 0
|
||||
});
|
||||
var DialogPortal = (props) => {
|
||||
const { __scopeDialog, forceMount, children, container } = props;
|
||||
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
||||
};
|
||||
DialogPortal.displayName = PORTAL_NAME;
|
||||
var OVERLAY_NAME = "DialogOverlay";
|
||||
var DialogOverlay = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
return context.modal ? (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
||||
}
|
||||
);
|
||||
DialogOverlay.displayName = OVERLAY_NAME;
|
||||
var DialogOverlayImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
||||
return (
|
||||
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
||||
// ie. when `Overlay` and `Content` are siblings
|
||||
(0, import_jsx_runtime.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-state": getState(context.open),
|
||||
...overlayProps,
|
||||
ref: forwardedRef,
|
||||
style: { pointerEvents: "auto", ...overlayProps.style }
|
||||
}
|
||||
) })
|
||||
);
|
||||
}
|
||||
);
|
||||
var CONTENT_NAME = "DialogContent";
|
||||
var DialogContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
DialogContent.displayName = CONTENT_NAME;
|
||||
var DialogContentModal = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
||||
React.useEffect(() => {
|
||||
const content = contentRef.current;
|
||||
if (content) return hideOthers(content);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: composedRefs,
|
||||
trapFocus: context.open,
|
||||
disableOutsidePointerEvents: true,
|
||||
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
||||
var _a;
|
||||
event.preventDefault();
|
||||
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
||||
}),
|
||||
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
||||
const originalEvent = event.detail.originalEvent;
|
||||
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
||||
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
||||
if (isRightClick) event.preventDefault();
|
||||
}),
|
||||
onFocusOutside: composeEventHandlers(
|
||||
props.onFocusOutside,
|
||||
(event) => event.preventDefault()
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentNonModal = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const hasInteractedOutsideRef = React.useRef(false);
|
||||
const hasPointerDownOutsideRef = React.useRef(false);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: forwardedRef,
|
||||
trapFocus: false,
|
||||
disableOutsidePointerEvents: false,
|
||||
onCloseAutoFocus: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
hasInteractedOutsideRef.current = false;
|
||||
hasPointerDownOutsideRef.current = false;
|
||||
},
|
||||
onInteractOutside: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
hasInteractedOutsideRef.current = true;
|
||||
if (event.detail.originalEvent.type === "pointerdown") {
|
||||
hasPointerDownOutsideRef.current = true;
|
||||
}
|
||||
}
|
||||
const target = event.target;
|
||||
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
||||
if (targetIsTrigger) event.preventDefault();
|
||||
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
||||
useFocusGuards();
|
||||
return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
||||
(0, import_jsx_runtime.jsx)(
|
||||
FocusScope,
|
||||
{
|
||||
asChild: true,
|
||||
loop: true,
|
||||
trapped: trapFocus,
|
||||
onMountAutoFocus: onOpenAutoFocus,
|
||||
onUnmountAutoFocus: onCloseAutoFocus,
|
||||
children: (0, import_jsx_runtime.jsx)(
|
||||
DismissableLayer,
|
||||
{
|
||||
role: "dialog",
|
||||
id: context.contentId,
|
||||
"aria-describedby": context.descriptionId,
|
||||
"aria-labelledby": context.titleId,
|
||||
"data-state": getState(context.open),
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
onDismiss: () => context.onOpenChange(false)
|
||||
}
|
||||
)
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
||||
(0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }),
|
||||
(0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
||||
] })
|
||||
] });
|
||||
}
|
||||
);
|
||||
var TITLE_NAME = "DialogTitle";
|
||||
var DialogTitle = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...titleProps } = props;
|
||||
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "DialogDescription";
|
||||
var DialogDescription = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...descriptionProps } = props;
|
||||
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogDescription.displayName = DESCRIPTION_NAME;
|
||||
var CLOSE_NAME = "DialogClose";
|
||||
var DialogClose = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...closeProps } = props;
|
||||
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
...closeProps,
|
||||
ref: forwardedRef,
|
||||
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogClose.displayName = CLOSE_NAME;
|
||||
function getState(open) {
|
||||
return open ? "open" : "closed";
|
||||
}
|
||||
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
||||
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
||||
contentName: CONTENT_NAME,
|
||||
titleName: TITLE_NAME,
|
||||
docsSlug: "dialog"
|
||||
});
|
||||
var TitleWarning = ({ titleId }) => {
|
||||
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
||||
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
||||
|
||||
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
||||
React.useEffect(() => {
|
||||
if (titleId) {
|
||||
const hasTitle = document.getElementById(titleId);
|
||||
if (!hasTitle) console.error(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, titleId]);
|
||||
return null;
|
||||
};
|
||||
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
||||
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
||||
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
||||
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
||||
React.useEffect(() => {
|
||||
var _a;
|
||||
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
||||
if (descriptionId && describedById) {
|
||||
const hasDescription = document.getElementById(descriptionId);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, contentRef, descriptionId]);
|
||||
return null;
|
||||
};
|
||||
var Root = Dialog;
|
||||
var Trigger = DialogTrigger;
|
||||
var Portal2 = DialogPortal;
|
||||
var Overlay = DialogOverlay;
|
||||
var Content = DialogContent;
|
||||
var Title = DialogTitle;
|
||||
var Description = DialogDescription;
|
||||
var Close = DialogClose;
|
||||
|
||||
export {
|
||||
createDialogScope,
|
||||
Dialog,
|
||||
DialogTrigger,
|
||||
DialogPortal,
|
||||
DialogOverlay,
|
||||
DialogContent,
|
||||
DialogTitle,
|
||||
DialogDescription,
|
||||
DialogClose,
|
||||
WarningProvider,
|
||||
Root,
|
||||
Trigger,
|
||||
Portal2 as Portal,
|
||||
Overlay,
|
||||
Content,
|
||||
Title,
|
||||
Description,
|
||||
Close
|
||||
};
|
||||
//# sourceMappingURL=chunk-HD7ZGEUK.js.map
|
||||
7
node_modules/.vite/deps/chunk-HD7ZGEUK.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-HD7ZGEUK.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/chunk-HQGJFDI6.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-HQGJFDI6.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,10 +1,10 @@
|
|||
import {
|
||||
useSize
|
||||
} from "./chunk-MR3TNHRB.js";
|
||||
} from "./chunk-AJMUNMLZ.js";
|
||||
import {
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
Primitive
|
||||
} from "./chunk-H55D7VYG.js";
|
||||
|
|
@ -2229,4 +2229,4 @@ export {
|
|||
Content,
|
||||
Arrow2 as Arrow
|
||||
};
|
||||
//# sourceMappingURL=chunk-6UE7W7QM.js.map
|
||||
//# sourceMappingURL=chunk-HUHORXLV.js.map
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
useCallbackRef
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
|
|
@ -54,4 +54,4 @@ function useUncontrolledState({
|
|||
export {
|
||||
useControllableState
|
||||
};
|
||||
//# sourceMappingURL=chunk-H4VE5LV5.js.map
|
||||
//# sourceMappingURL=chunk-I6MWER2B.js.map
|
||||
53
node_modules/.vite/deps/chunk-OAV3HHWW.js → node_modules/.vite/deps/chunk-ILYE3ZA7.js
generated
vendored
53
node_modules/.vite/deps/chunk-OAV3HHWW.js → node_modules/.vite/deps/chunk-ILYE3ZA7.js
generated
vendored
|
|
@ -13,18 +13,18 @@ var React = __toESM(require_react(), 1);
|
|||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
function Provider(props) {
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
}
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
|
|
@ -33,20 +33,22 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|||
const BaseContext = React.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
function Provider(props) {
|
||||
const Provider = (props) => {
|
||||
var _a;
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
}
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
||||
var _a;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
|
|
@ -85,8 +87,39 @@ function composeContextScopes(...scopes) {
|
|||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/primitive/dist/index.mjs
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React2.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
function useCallbackRef(callback) {
|
||||
const callbackRef = React3.useRef(callback);
|
||||
React3.useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
});
|
||||
return React3.useMemo(() => (...args) => {
|
||||
var _a;
|
||||
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
||||
}, []);
|
||||
}
|
||||
|
||||
export {
|
||||
createContext2,
|
||||
createContextScope
|
||||
createContextScope,
|
||||
composeEventHandlers,
|
||||
useLayoutEffect2,
|
||||
useCallbackRef
|
||||
};
|
||||
//# sourceMappingURL=chunk-OAV3HHWW.js.map
|
||||
//# sourceMappingURL=chunk-ILYE3ZA7.js.map
|
||||
7
node_modules/.vite/deps/chunk-ILYE3ZA7.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-ILYE3ZA7.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
29
node_modules/.vite/deps/chunk-J3JCCWF4.js
generated
vendored
29
node_modules/.vite/deps/chunk-J3JCCWF4.js
generated
vendored
|
|
@ -1,29 +0,0 @@
|
|||
import {
|
||||
useCallbackRef
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
||||
React.useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.key === "Escape") {
|
||||
onEscapeKeyDown(event);
|
||||
}
|
||||
};
|
||||
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
||||
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
||||
}, [onEscapeKeyDown, ownerDocument]);
|
||||
}
|
||||
|
||||
export {
|
||||
useEscapeKeydown
|
||||
};
|
||||
//# sourceMappingURL=chunk-J3JCCWF4.js.map
|
||||
7
node_modules/.vite/deps/chunk-J3JCCWF4.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-J3JCCWF4.js.map
generated
vendored
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@radix-ui/react-use-escape-keydown/src/useEscapeKeydown.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\n/**\n * Listens for when the escape key is down\n */\nfunction useEscapeKeydown(\n onEscapeKeyDownProp?: (event: KeyboardEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\n\nexport { useEscapeKeydown };\n"],
|
||||
"mappings": ";;;;;;;;;;;AAAA,YAAuB;AAMvB,SAAS,iBACP,qBACA,gBAA0B,yCAAY,UACtC;AACA,QAAM,kBAAkB,eAAe,mBAAmB;AAEpD,EAAA,gBAAU,MAAM;AACpB,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,UAAI,MAAM,QAAQ,UAAU;AAC1B,wBAAgB,KAAK;MACvB;IACF;AACA,kBAAc,iBAAiB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAC1E,WAAO,MAAM,cAAc,oBAAoB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;EAC5F,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;",
|
||||
"names": []
|
||||
}
|
||||
22
node_modules/.vite/deps/chunk-TZDCYJOT.js → node_modules/.vite/deps/chunk-MZLEVI2I.js
generated
vendored
22
node_modules/.vite/deps/chunk-TZDCYJOT.js → node_modules/.vite/deps/chunk-MZLEVI2I.js
generated
vendored
|
|
@ -1,9 +1,6 @@
|
|||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-R6S4VRB5.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-4WIT4MX7.js";
|
||||
|
|
@ -16,7 +13,6 @@ import {
|
|||
|
||||
// node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var ReactDOM = __toESM(require_react_dom(), 1);
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React.useReducer((state, event) => {
|
||||
|
|
@ -80,11 +76,22 @@ function usePresence(present) {
|
|||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
ReactDOM.flushSync(() => send("ANIMATION_END"));
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
|
|
@ -96,6 +103,7 @@ function usePresence(present) {
|
|||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
|
|
@ -133,4 +141,4 @@ function getElementRef(element) {
|
|||
export {
|
||||
Presence
|
||||
};
|
||||
//# sourceMappingURL=chunk-TZDCYJOT.js.map
|
||||
//# sourceMappingURL=chunk-MZLEVI2I.js.map
|
||||
7
node_modules/.vite/deps/chunk-MZLEVI2I.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-MZLEVI2I.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/chunk-OAV3HHWW.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-OAV3HHWW.js.map
generated
vendored
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/chunk-QYKEMCE4.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-QYKEMCE4.js.map
generated
vendored
File diff suppressed because one or more lines are too long
84
node_modules/.vite/deps/chunk-HQGJFDI6.js → node_modules/.vite/deps/chunk-RBMNEPGM.js
generated
vendored
84
node_modules/.vite/deps/chunk-HQGJFDI6.js → node_modules/.vite/deps/chunk-RBMNEPGM.js
generated
vendored
|
|
@ -311,6 +311,20 @@ function useController(props) {
|
|||
};
|
||||
}
|
||||
var Controller = (props) => props.render(useController(props));
|
||||
var flatten = (obj) => {
|
||||
const output = {};
|
||||
for (const key of Object.keys(obj)) {
|
||||
if (isObjectType(obj[key])) {
|
||||
const nested = flatten(obj[key]);
|
||||
for (const nestedKey of Object.keys(nested)) {
|
||||
output[`${key}.${nestedKey}`] = nested[nestedKey];
|
||||
}
|
||||
} else {
|
||||
output[key] = obj[key];
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
var POST_REQUEST = "post";
|
||||
function Form(props) {
|
||||
const methods = useFormContext();
|
||||
|
|
@ -326,8 +340,9 @@ function Form(props) {
|
|||
formDataJson = JSON.stringify(data);
|
||||
} catch (_a) {
|
||||
}
|
||||
for (const name of control._names.mount) {
|
||||
formData.append(name, get(data, name));
|
||||
const flattenFormValues = flatten(control._formValues);
|
||||
for (const key in flattenFormValues) {
|
||||
formData.append(key, flattenFormValues[key]);
|
||||
}
|
||||
if (onSubmit) {
|
||||
await onSubmit({
|
||||
|
|
@ -1118,7 +1133,7 @@ function createFormControl(props = {}) {
|
|||
timer = setTimeout(callback, wait);
|
||||
};
|
||||
const _updateValid = async (shouldUpdateValid) => {
|
||||
if (_proxyFormState.isValid || shouldUpdateValid) {
|
||||
if (!props.disabled && (_proxyFormState.isValid || shouldUpdateValid)) {
|
||||
const isValid = _options.resolver ? isEmptyObject((await _executeSchema()).errors) : await executeBuiltInValidation(_fields, true);
|
||||
if (isValid !== _formState.isValid) {
|
||||
_subjects.state.next({
|
||||
|
|
@ -1128,7 +1143,7 @@ function createFormControl(props = {}) {
|
|||
}
|
||||
};
|
||||
const _updateIsValidating = (names, isValidating) => {
|
||||
if (_proxyFormState.isValidating || _proxyFormState.validatingFields) {
|
||||
if (!props.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields)) {
|
||||
(names || Array.from(_names.mount)).forEach((name) => {
|
||||
if (name) {
|
||||
isValidating ? set(_formState.validatingFields, name, isValidating) : unset(_formState.validatingFields, name);
|
||||
|
|
@ -1141,7 +1156,7 @@ function createFormControl(props = {}) {
|
|||
}
|
||||
};
|
||||
const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
|
||||
if (args && method) {
|
||||
if (args && method && !props.disabled) {
|
||||
_state.action = true;
|
||||
if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
|
||||
const fieldValues = method(get(_fields, name), args.argA, args.argB);
|
||||
|
|
@ -1197,28 +1212,30 @@ function createFormControl(props = {}) {
|
|||
const output = {
|
||||
name
|
||||
};
|
||||
const disabledField = !!(get(_fields, name) && get(_fields, name)._f && get(_fields, name)._f.disabled);
|
||||
if (!isBlurEvent || shouldDirty) {
|
||||
if (_proxyFormState.isDirty) {
|
||||
isPreviousDirty = _formState.isDirty;
|
||||
_formState.isDirty = output.isDirty = _getDirty();
|
||||
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
||||
if (!props.disabled) {
|
||||
const disabledField = !!(get(_fields, name) && get(_fields, name)._f && get(_fields, name)._f.disabled);
|
||||
if (!isBlurEvent || shouldDirty) {
|
||||
if (_proxyFormState.isDirty) {
|
||||
isPreviousDirty = _formState.isDirty;
|
||||
_formState.isDirty = output.isDirty = _getDirty();
|
||||
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
||||
}
|
||||
const isCurrentFieldPristine = disabledField || deepEqual(get(_defaultValues, name), fieldValue);
|
||||
isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));
|
||||
isCurrentFieldPristine || disabledField ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
||||
output.dirtyFields = _formState.dirtyFields;
|
||||
shouldUpdateField = shouldUpdateField || _proxyFormState.dirtyFields && isPreviousDirty !== !isCurrentFieldPristine;
|
||||
}
|
||||
const isCurrentFieldPristine = disabledField || deepEqual(get(_defaultValues, name), fieldValue);
|
||||
isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));
|
||||
isCurrentFieldPristine || disabledField ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
||||
output.dirtyFields = _formState.dirtyFields;
|
||||
shouldUpdateField = shouldUpdateField || _proxyFormState.dirtyFields && isPreviousDirty !== !isCurrentFieldPristine;
|
||||
}
|
||||
if (isBlurEvent) {
|
||||
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
||||
if (!isPreviousFieldTouched) {
|
||||
set(_formState.touchedFields, name, isBlurEvent);
|
||||
output.touchedFields = _formState.touchedFields;
|
||||
shouldUpdateField = shouldUpdateField || _proxyFormState.touchedFields && isPreviousFieldTouched !== isBlurEvent;
|
||||
if (isBlurEvent) {
|
||||
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
||||
if (!isPreviousFieldTouched) {
|
||||
set(_formState.touchedFields, name, isBlurEvent);
|
||||
output.touchedFields = _formState.touchedFields;
|
||||
shouldUpdateField = shouldUpdateField || _proxyFormState.touchedFields && isPreviousFieldTouched !== isBlurEvent;
|
||||
}
|
||||
}
|
||||
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
||||
}
|
||||
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
||||
return shouldUpdateField ? output : {};
|
||||
};
|
||||
const shouldRenderByError = (name, isValid, error, fieldState) => {
|
||||
|
|
@ -1301,7 +1318,7 @@ function createFormControl(props = {}) {
|
|||
}
|
||||
_names.unMount = /* @__PURE__ */ new Set();
|
||||
};
|
||||
const _getDirty = (name, data) => (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
|
||||
const _getDirty = (name, data) => !props.disabled && (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
|
||||
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
||||
..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue
|
||||
}, isGlobal, defaultValue);
|
||||
|
|
@ -1343,7 +1360,7 @@ function createFormControl(props = {}) {
|
|||
const fieldValue = value[fieldKey];
|
||||
const fieldName = `${name}.${fieldKey}`;
|
||||
const field = get(_fields, fieldName);
|
||||
(_names.array.has(name) || !isPrimitive(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options);
|
||||
(_names.array.has(name) || isObject(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options);
|
||||
}
|
||||
};
|
||||
const setValue = (name, value, options = {}) => {
|
||||
|
|
@ -1380,7 +1397,7 @@ function createFormControl(props = {}) {
|
|||
const field = get(_fields, name);
|
||||
const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);
|
||||
const _updateIsFieldValueUpdated = (fieldValue) => {
|
||||
isFieldValueUpdated = Number.isNaN(fieldValue) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
||||
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
||||
};
|
||||
if (field) {
|
||||
let error;
|
||||
|
|
@ -1709,7 +1726,11 @@ function createFormControl(props = {}) {
|
|||
}
|
||||
if (!keepStateOptions.keepValues) {
|
||||
if (keepStateOptions.keepDirtyValues) {
|
||||
for (const fieldName of _names.mount) {
|
||||
const fieldsToCheck = /* @__PURE__ */ new Set([
|
||||
..._names.mount,
|
||||
...Object.keys(getDirtyFields(_defaultValues, _formValues))
|
||||
]);
|
||||
for (const fieldName of Array.from(fieldsToCheck)) {
|
||||
get(_formState.dirtyFields, fieldName) ? set(values, fieldName, get(_formValues, fieldName)) : setValue(fieldName, get(values, fieldName));
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1933,6 +1954,11 @@ function useForm(props = {}) {
|
|||
values: control._getWatch()
|
||||
});
|
||||
}, [props.shouldUnregister, control]);
|
||||
import_react.default.useEffect(() => {
|
||||
if (_formControl.current) {
|
||||
_formControl.current.watch = _formControl.current.watch.bind({});
|
||||
}
|
||||
}, [formState]);
|
||||
_formControl.current.formState = getProxyFormState(formState, control);
|
||||
return _formControl.current;
|
||||
}
|
||||
|
|
@ -1951,4 +1977,4 @@ export {
|
|||
useFieldArray,
|
||||
useForm
|
||||
};
|
||||
//# sourceMappingURL=chunk-HQGJFDI6.js.map
|
||||
//# sourceMappingURL=chunk-RBMNEPGM.js.map
|
||||
7
node_modules/.vite/deps/chunk-RBMNEPGM.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-RBMNEPGM.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
node_modules/.vite/deps/chunk-SZRZRZSM.js
generated
vendored
41
node_modules/.vite/deps/chunk-SZRZRZSM.js
generated
vendored
|
|
@ -1,41 +0,0 @@
|
|||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-4MBMRILA.js";
|
||||
|
||||
// node_modules/@radix-ui/primitive/dist/index.mjs
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useCallbackRef(callback) {
|
||||
const callbackRef = React.useRef(callback);
|
||||
React.useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
});
|
||||
return React.useMemo(() => (...args) => {
|
||||
var _a;
|
||||
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
||||
}, []);
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React2.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
export {
|
||||
composeEventHandlers,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
};
|
||||
//# sourceMappingURL=chunk-SZRZRZSM.js.map
|
||||
7
node_modules/.vite/deps/chunk-SZRZRZSM.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-SZRZRZSM.js.map
generated
vendored
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@radix-ui/primitive/src/primitive.tsx", "../../@radix-ui/react-use-callback-ref/src/useCallbackRef.tsx", "../../@radix-ui/react-use-layout-effect/src/useLayoutEffect.tsx"],
|
||||
"sourcesContent": ["function composeEventHandlers<E>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !((event as unknown) as Event).defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport { composeEventHandlers };\n", "import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n", "import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"],
|
||||
"mappings": ";;;;;;;;AAAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,iEAAuB;AAEvB,QAAI,6BAA6B,SAAS,CAAG,MAA4B,kBAAkB;AACzF,aAAO,mDAAkB;IAC3B;EACF;AACF;;;ACZA,YAAuB;AAMvB,SAAS,eAAkD,UAA4B;AACrF,QAAM,cAAoB,aAAO,QAAQ;AAEnC,EAAA,gBAAU,MAAM;AACpB,gBAAY,UAAU;EACxB,CAAC;AAGD,SAAa,cAAQ,MAAO,IAAI,SAAA;;AAAS,6BAAY,YAAZ,qCAAsB,GAAG;KAAa,CAAC,CAAC;AACnF;;;ACfA,IAAAA,SAAuB;AASvB,IAAMC,mBAAkB,QAAQ,yCAAY,QAAQ,IAAU,yBAAkB,MAAM;AAAC;",
|
||||
"names": ["React", "useLayoutEffect"]
|
||||
}
|
||||
7
node_modules/.vite/deps/chunk-TZDCYJOT.js.map
generated
vendored
7
node_modules/.vite/deps/chunk-TZDCYJOT.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3592
node_modules/.vite/deps/chunk-V27RRWZQ.js
generated
vendored
Normal file
3592
node_modules/.vite/deps/chunk-V27RRWZQ.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
node_modules/.vite/deps/chunk-V27RRWZQ.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-V27RRWZQ.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17537
node_modules/.vite/deps/chunk-Z3MJAI5R.js
generated
vendored
Normal file
17537
node_modules/.vite/deps/chunk-Z3MJAI5R.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
node_modules/.vite/deps/chunk-Z3MJAI5R.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-Z3MJAI5R.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-SZRZRZSM.js";
|
||||
} from "./chunk-ILYE3ZA7.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-3TFVT2CW.js";
|
||||
|
|
@ -23,4 +23,4 @@ function useId(deterministicId) {
|
|||
export {
|
||||
useId
|
||||
};
|
||||
//# sourceMappingURL=chunk-5I6CIHEW.js.map
|
||||
//# sourceMappingURL=chunk-ZZUMGTHG.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue