@iblai/web-utils 1.11.7 → 1.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.esm.js.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/web-utils/src/__tests__/index.mobile.test.d.ts +7 -0
- package/dist/auth/web-utils/src/__tests__/index.web.test.d.ts +8 -0
- package/dist/auth/web-utils/src/constants/__tests__/chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/constants/chat.d.ts +8 -0
- package/dist/auth/web-utils/src/features/apple-restriction/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/apple-restriction/slice.d.ts +7 -0
- package/dist/auth/web-utils/src/features/chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat/slice.d.ts +164 -0
- package/dist/auth/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
- package/dist/auth/web-utils/src/features/csv/combine-csv.d.ts +35 -0
- package/dist/auth/web-utils/src/features/csv/index.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/__tests__/filesSlice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/filesSlice.d.ts +23 -0
- package/dist/auth/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/host-chat/slice.d.ts +17 -0
- package/dist/auth/web-utils/src/features/index.d.ts +11 -0
- package/dist/auth/web-utils/src/features/monetization/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/monetization/slice.d.ts +16 -0
- package/dist/auth/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
- package/dist/auth/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/subscription/constants.d.ts +12 -0
- package/dist/auth/web-utils/src/features/subscription/slice.d.ts +28 -0
- package/dist/auth/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/top-banner/slice.d.ts +24 -0
- package/dist/auth/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/tracking/examples.d.ts +4 -0
- package/dist/auth/web-utils/src/features/tracking/index.d.ts +6 -0
- package/dist/auth/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
- package/dist/auth/web-utils/src/hoc/index.d.ts +2 -0
- package/dist/auth/web-utils/src/hoc/with-permissions.d.ts +44 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-mentor-settings.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/chat/ollama-client.d.ts +57 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.d.ts +61 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.d.ts +146 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat.d.ts +53 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.d.ts +24 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/index.d.ts +42 -0
- package/dist/auth/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
- package/dist/auth/web-utils/src/hooks/stripe/__tests__/use-stripe-upgrade.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/stripe/use-stripe-upgrade.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
- package/dist/auth/web-utils/src/hooks/subscription/constants.d.ts +4 -0
- package/dist/auth/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +78 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/constants.d.ts +56 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +71 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/config-loader.test.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/use-tenant-metadata.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +29 -0
- package/dist/auth/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/use-day-js.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-event-callback.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-event-listener.d.ts +6 -0
- package/dist/auth/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
- package/dist/auth/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-local-storage.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-mentor-settings.d.ts +46 -0
- package/dist/auth/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
- package/dist/auth/web-utils/src/hooks/use-os.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-responsive.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tenant-switch-sync.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-timer.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tokens.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-user-agreement.d.ts +18 -0
- package/dist/auth/web-utils/src/hooks/use-user.d.ts +23 -0
- package/dist/auth/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
- package/dist/auth/web-utils/src/index.d.ts +8 -0
- package/dist/auth/web-utils/src/index.mobile.d.ts +86 -0
- package/dist/auth/web-utils/src/index.web.d.ts +142 -0
- package/dist/auth/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/mentor-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/tenant-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/auth-provider.d.ts +129 -0
- package/dist/auth/web-utils/src/providers/index.d.ts +4 -0
- package/dist/auth/web-utils/src/providers/mentor-provider.d.ts +44 -0
- package/dist/auth/web-utils/src/providers/service-worker-provider.d.ts +21 -0
- package/dist/auth/web-utils/src/providers/tenant-provider.d.ts +77 -0
- package/dist/auth/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/event-bus.d.ts +6 -0
- package/dist/auth/web-utils/src/services/file-upload.d.ts +60 -0
- package/dist/auth/web-utils/src/services/index.d.ts +3 -0
- package/dist/auth/web-utils/src/services/register-sw.d.ts +71 -0
- package/dist/auth/web-utils/src/types/chat.d.ts +1 -0
- package/dist/auth/web-utils/src/types/file-upload.d.ts +62 -0
- package/dist/auth/web-utils/src/types/index.d.ts +68 -0
- package/dist/auth/web-utils/src/types/subscription.d.ts +40 -0
- package/dist/auth/web-utils/src/utils/__tests__/auth.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/constants.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/helpers.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/platform.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tenant-switch.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/constants.d.ts +69 -0
- package/dist/auth/web-utils/src/utils/data/__tests__/advanced-tab.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
- package/dist/auth/web-utils/src/utils/helpers.d.ts +33 -0
- package/dist/auth/web-utils/src/utils/index.d.ts +6 -0
- package/dist/auth/web-utils/src/utils/platform.d.ts +9 -0
- package/dist/auth/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
- package/dist/index.esm.js +581 -266
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +594 -279
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -2
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +4 -4
- package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +3 -3
- package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +3 -3
- package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -2
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -21
- package/dist/web-utils/src/hooks/use-user-agreement.d.ts +3 -6
- package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -2
- package/dist/data-layer/src/config.d.ts +0 -8
- package/dist/data-layer/src/constants.d.ts +0 -31
- package/dist/data-layer/src/core/index.d.ts +0 -11
- package/dist/data-layer/src/features/analytics/api-slice.d.ts +0 -3756
- package/dist/data-layer/src/features/analytics/constants.d.ts +0 -133
- package/dist/data-layer/src/features/analytics/custom-api-slice.d.ts +0 -311
- package/dist/data-layer/src/features/analytics/types.d.ts +0 -696
- package/dist/data-layer/src/features/api-keys/api-slice.d.ts +0 -702
- package/dist/data-layer/src/features/apps/api-slice.d.ts +0 -720
- package/dist/data-layer/src/features/artifacts/api-slice.d.ts +0 -1798
- package/dist/data-layer/src/features/artifacts/constants.d.ts +0 -42
- package/dist/data-layer/src/features/artifacts/types.d.ts +0 -37
- package/dist/data-layer/src/features/audit-logs/api-slice.d.ts +0 -268
- package/dist/data-layer/src/features/audit-logs/constants.d.ts +0 -11
- package/dist/data-layer/src/features/audit-logs/types.d.ts +0 -32
- package/dist/data-layer/src/features/auth/api-slice.d.ts +0 -639
- package/dist/data-layer/src/features/auth/constants.d.ts +0 -20
- package/dist/data-layer/src/features/auth/types.d.ts +0 -33
- package/dist/data-layer/src/features/billing/api-slice.d.ts +0 -359
- package/dist/data-layer/src/features/billing/constants.d.ts +0 -16
- package/dist/data-layer/src/features/billing/custom-api-slice.d.ts +0 -634
- package/dist/data-layer/src/features/billing/types.d.ts +0 -36
- package/dist/data-layer/src/features/call-configurations/api-slice.d.ts +0 -855
- package/dist/data-layer/src/features/call-configurations/constants.d.ts +0 -16
- package/dist/data-layer/src/features/call-configurations/types.d.ts +0 -49
- package/dist/data-layer/src/features/career/api-slice.d.ts +0 -3080
- package/dist/data-layer/src/features/catalog/api-slice.d.ts +0 -10260
- package/dist/data-layer/src/features/chat/api-slice.d.ts +0 -1977
- package/dist/data-layer/src/features/chat/constants.d.ts +0 -8
- package/dist/data-layer/src/features/chat/custom-api-slice.d.ts +0 -272
- package/dist/data-layer/src/features/chat-files/api-slice.d.ts +0 -185
- package/dist/data-layer/src/features/chat-files/types.d.ts +0 -32
- package/dist/data-layer/src/features/chat-history/api-slice.d.ts +0 -1528
- package/dist/data-layer/src/features/chat-privacy/api-slice.d.ts +0 -1398
- package/dist/data-layer/src/features/chat-privacy/constants.d.ts +0 -13
- package/dist/data-layer/src/features/claw/api-slice.d.ts +0 -5471
- package/dist/data-layer/src/features/claw/constants.d.ts +0 -126
- package/dist/data-layer/src/features/claw/types.d.ts +0 -275
- package/dist/data-layer/src/features/constants.d.ts +0 -3
- package/dist/data-layer/src/features/core/api-slice.d.ts +0 -6188
- package/dist/data-layer/src/features/core/constants.d.ts +0 -51
- package/dist/data-layer/src/features/core/custom-api-slice.d.ts +0 -1766
- package/dist/data-layer/src/features/core/custom-public-image-asset-api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/core/types.d.ts +0 -73
- package/dist/data-layer/src/features/course-metadata/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/course-metadata/types.d.ts +0 -179
- package/dist/data-layer/src/features/courses/api-slice.d.ts +0 -664
- package/dist/data-layer/src/features/courses/types.d.ts +0 -26
- package/dist/data-layer/src/features/credentials/api-slice.d.ts +0 -6360
- package/dist/data-layer/src/features/credentials/constants.d.ts +0 -36
- package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +0 -1839
- package/dist/data-layer/src/features/credentials/types.d.ts +0 -39
- package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +0 -602
- package/dist/data-layer/src/features/custom-domain/constants.d.ts +0 -20
- package/dist/data-layer/src/features/custom-domain/types.d.ts +0 -46
- package/dist/data-layer/src/features/datasets/api-slice.d.ts +0 -439
- package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +0 -912
- package/dist/data-layer/src/features/disclaimers/constants.d.ts +0 -27
- package/dist/data-layer/src/features/disclaimers/types.d.ts +0 -67
- package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +0 -590
- package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +0 -15
- package/dist/data-layer/src/features/edx-proctoring/types.d.ts +0 -61
- package/dist/data-layer/src/features/edx-sso/api-slice.d.ts +0 -334
- package/dist/data-layer/src/features/edx-sso/types.d.ts +0 -10
- package/dist/data-layer/src/features/llms/api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/mcp/api-slice.d.ts +0 -2613
- package/dist/data-layer/src/features/mcp/constants.d.ts +0 -57
- package/dist/data-layer/src/features/mcp/types.d.ts +0 -176
- package/dist/data-layer/src/features/memory/api-slice.d.ts +0 -3462
- package/dist/data-layer/src/features/memory/constants.d.ts +0 -80
- package/dist/data-layer/src/features/memory/types.d.ts +0 -190
- package/dist/data-layer/src/features/mentor/api-slice.d.ts +0 -7984
- package/dist/data-layer/src/features/mentor/constants.d.ts +0 -45
- package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +0 -957
- package/dist/data-layer/src/features/mentor/privacy.d.ts +0 -61
- package/dist/data-layer/src/features/mentor/types.d.ts +0 -83
- package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +0 -785
- package/dist/data-layer/src/features/moderation-logs/api-slice.d.ts +0 -705
- package/dist/data-layer/src/features/monetization/constants.d.ts +0 -76
- package/dist/data-layer/src/features/monetization/custom-api-slice.d.ts +0 -5178
- package/dist/data-layer/src/features/monetization/types.d.ts +0 -229
- package/dist/data-layer/src/features/notifications/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/notifications/constants.d.ts +0 -26
- package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +0 -996
- package/dist/data-layer/src/features/notifications/types.d.ts +0 -69
- package/dist/data-layer/src/features/per-learner/api-slice.d.ts +0 -1329
- package/dist/data-layer/src/features/periodic-agents/api-slice.d.ts +0 -2347
- package/dist/data-layer/src/features/platform/api-slice.d.ts +0 -2553
- package/dist/data-layer/src/features/platform/constants.d.ts +0 -17
- package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +0 -493
- package/dist/data-layer/src/features/platform/types.d.ts +0 -61
- package/dist/data-layer/src/features/projects/api-slice.d.ts +0 -2026
- package/dist/data-layer/src/features/projects/constants.d.ts +0 -51
- package/dist/data-layer/src/features/projects/types.d.ts +0 -79
- package/dist/data-layer/src/features/prompts/api-slice.d.ts +0 -2464
- package/dist/data-layer/src/features/reports/api-slice.d.ts +0 -789
- package/dist/data-layer/src/features/retirement/api-slice.d.ts +0 -165
- package/dist/data-layer/src/features/retirement/constants.d.ts +0 -7
- package/dist/data-layer/src/features/retirement/types.d.ts +0 -3
- package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +0 -1413
- package/dist/data-layer/src/features/search/api-slice.d.ts +0 -2017
- package/dist/data-layer/src/features/search/constants.d.ts +0 -41
- package/dist/data-layer/src/features/search/types.d.ts +0 -161
- package/dist/data-layer/src/features/sessions/api-slice.d.ts +0 -969
- package/dist/data-layer/src/features/sessions/constants.d.ts +0 -3
- package/dist/data-layer/src/features/sessions/url.d.ts +0 -9
- package/dist/data-layer/src/features/skills/api-slice.d.ts +0 -1389
- package/dist/data-layer/src/features/stripe/api-slice.d.ts +0 -803
- package/dist/data-layer/src/features/stripe/constants.d.ts +0 -19
- package/dist/data-layer/src/features/stripe/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant/api-slice.d.ts +0 -832
- package/dist/data-layer/src/features/tenant/constants.d.ts +0 -11
- package/dist/data-layer/src/features/tenant/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +0 -349
- package/dist/data-layer/src/features/tenant-logo/constants.d.ts +0 -24
- package/dist/data-layer/src/features/tools/api-slice.d.ts +0 -417
- package/dist/data-layer/src/features/training-documents/api-slice.d.ts +0 -1523
- package/dist/data-layer/src/features/user/api-slice.d.ts +0 -2128
- package/dist/data-layer/src/features/user/constants.d.ts +0 -47
- package/dist/data-layer/src/features/user/types.d.ts +0 -134
- package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +0 -762
- package/dist/data-layer/src/features/utils.d.ts +0 -94
- package/dist/data-layer/src/features/watched-groups/api-slice.d.ts +0 -2481
- package/dist/data-layer/src/features/watched-groups/constants.d.ts +0 -66
- package/dist/data-layer/src/features/watched-groups/types.d.ts +0 -143
- package/dist/data-layer/src/features/workflows/api-slice.d.ts +0 -2454
- package/dist/data-layer/src/features/workflows/constants.d.ts +0 -57
- package/dist/data-layer/src/features/workflows/types.d.ts +0 -130
- package/dist/data-layer/src/index.d.ts +0 -121
- package/dist/data-layer/src/reducers/index.d.ts +0 -2
- package/dist/data-layer/src/reducers/mentor.d.ts +0 -2
- package/dist/data-layer/src/reducers/skills.d.ts +0 -2
- package/dist/data-layer/src/services/StorageService.d.ts +0 -5
- package/dist/data-layer/src/utils/index.d.ts +0 -6
package/dist/index.esm.js
CHANGED
|
@@ -10387,7 +10387,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10387
10387
|
* Returns the mentor object if found, undefined otherwise
|
|
10388
10388
|
*/
|
|
10389
10389
|
async function determineMentorToRedirectTo() {
|
|
10390
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
10390
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
10391
10391
|
setIsLoading(true);
|
|
10392
10392
|
try {
|
|
10393
10393
|
// Get the user's recent mentors
|
|
@@ -10422,9 +10422,9 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10422
10422
|
console.log("[determineMentorToRedirectTo] starredMentors ", starredMentors);
|
|
10423
10423
|
if (starredMentors && starredMentors.length > 0) {
|
|
10424
10424
|
const starredMentor = starredMentors[0];
|
|
10425
|
-
|
|
10426
|
-
if (
|
|
10427
|
-
return starredMentor;
|
|
10425
|
+
const uniqueId = (_a = starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.unique_id) !== null && _a !== void 0 ? _a : starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.mentor;
|
|
10426
|
+
if (uniqueId) {
|
|
10427
|
+
return { ...starredMentor, unique_id: uniqueId };
|
|
10428
10428
|
}
|
|
10429
10429
|
}
|
|
10430
10430
|
console.log("[determineMentorToRedirectTo] recentMentors ", recentMentors);
|
|
@@ -10441,12 +10441,12 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10441
10441
|
orderBy: "recently_accessed_at",
|
|
10442
10442
|
});
|
|
10443
10443
|
console.log("[determineMentorToRedirectTo] recentMentorsResult ", recentMentorsResult);
|
|
10444
|
-
recentMentors = ((
|
|
10444
|
+
recentMentors = ((_b = recentMentorsResult.data) === null || _b === void 0 ? void 0 : _b.results) || [];
|
|
10445
10445
|
// Check if we found recent mentors for the tenant
|
|
10446
10446
|
if (recentMentors.length > 0) {
|
|
10447
10447
|
console.log("found recent mentor", JSON.stringify({
|
|
10448
|
-
selectedMentorId: (
|
|
10449
|
-
mentorName: (
|
|
10448
|
+
selectedMentorId: (_c = recentMentors[0]) === null || _c === void 0 ? void 0 : _c.unique_id,
|
|
10449
|
+
mentorName: (_d = recentMentors[0]) === null || _d === void 0 ? void 0 : _d.name,
|
|
10450
10450
|
tenantKey,
|
|
10451
10451
|
}));
|
|
10452
10452
|
return recentMentors[0];
|
|
@@ -10462,7 +10462,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10462
10462
|
limit: QUERY_LIMIT,
|
|
10463
10463
|
orderBy: "recently_accessed_at",
|
|
10464
10464
|
});
|
|
10465
|
-
const featuredMentors = ((
|
|
10465
|
+
const featuredMentors = ((_e = featuredMentorsResult.data) === null || _e === void 0 ? void 0 : _e.results) || [];
|
|
10466
10466
|
console.log("featured mentors fetched", {
|
|
10467
10467
|
count: featuredMentors.length,
|
|
10468
10468
|
mentorIds: featuredMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
@@ -10506,8 +10506,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10506
10506
|
}
|
|
10507
10507
|
// If no default mentor, select the first featured mentor
|
|
10508
10508
|
console.log("found first featured mentor", {
|
|
10509
|
-
mentorId: (
|
|
10510
|
-
mentorName: (
|
|
10509
|
+
mentorId: (_f = featuredMentors[0]) === null || _f === void 0 ? void 0 : _f.unique_id,
|
|
10510
|
+
mentorName: (_g = featuredMentors[0]) === null || _g === void 0 ? void 0 : _g.name,
|
|
10511
10511
|
});
|
|
10512
10512
|
return featuredMentors[0];
|
|
10513
10513
|
}
|
|
@@ -10522,7 +10522,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10522
10522
|
limit: QUERY_LIMIT,
|
|
10523
10523
|
orderBy: "recently_accessed_at",
|
|
10524
10524
|
});
|
|
10525
|
-
const nonFeaturedMentors = ((
|
|
10525
|
+
const nonFeaturedMentors = ((_h = nonFeaturedMentorsResult.data) === null || _h === void 0 ? void 0 : _h.results) || [];
|
|
10526
10526
|
console.log("non-featured mentors fetched", {
|
|
10527
10527
|
count: nonFeaturedMentors.length,
|
|
10528
10528
|
mentorIds: nonFeaturedMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
@@ -10530,8 +10530,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10530
10530
|
// Check if we found non-featured mentors
|
|
10531
10531
|
if (nonFeaturedMentors.length > 0) {
|
|
10532
10532
|
console.log("found first non-featured mentor", {
|
|
10533
|
-
mentorId: (
|
|
10534
|
-
mentorName: (
|
|
10533
|
+
mentorId: (_j = nonFeaturedMentors[0]) === null || _j === void 0 ? void 0 : _j.unique_id,
|
|
10534
|
+
mentorName: (_k = nonFeaturedMentors[0]) === null || _k === void 0 ? void 0 : _k.name,
|
|
10535
10535
|
});
|
|
10536
10536
|
return nonFeaturedMentors[0];
|
|
10537
10537
|
}
|
|
@@ -10552,7 +10552,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10552
10552
|
// @ts-expect-error - userId is passed but not in generated API types
|
|
10553
10553
|
userId: username,
|
|
10554
10554
|
});
|
|
10555
|
-
const seededMentorsDetails = (
|
|
10555
|
+
const seededMentorsDetails = (_l = seedMentorsResult.data) === null || _l === void 0 ? void 0 : _l.detail;
|
|
10556
10556
|
console.log("mentor seeding completed", {
|
|
10557
10557
|
success: !!seededMentorsDetails,
|
|
10558
10558
|
details: seededMentorsDetails,
|
|
@@ -10566,15 +10566,15 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10566
10566
|
username,
|
|
10567
10567
|
limit: QUERY_LIMIT,
|
|
10568
10568
|
});
|
|
10569
|
-
const featuredMentorsAfterSeed = ((
|
|
10569
|
+
const featuredMentorsAfterSeed = ((_m = featuredMentorsAfterSeedResult.data) === null || _m === void 0 ? void 0 : _m.results) || [];
|
|
10570
10570
|
console.log("featured mentors after seeding", {
|
|
10571
10571
|
count: featuredMentorsAfterSeed.length,
|
|
10572
10572
|
mentorIds: featuredMentorsAfterSeed.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
10573
10573
|
});
|
|
10574
10574
|
if (featuredMentorsAfterSeed.length > 0) {
|
|
10575
10575
|
console.log("found seeded mentor", {
|
|
10576
|
-
mentorId: (
|
|
10577
|
-
mentorName: (
|
|
10576
|
+
mentorId: (_o = featuredMentorsAfterSeed[0]) === null || _o === void 0 ? void 0 : _o.unique_id,
|
|
10577
|
+
mentorName: (_p = featuredMentorsAfterSeed[0]) === null || _p === void 0 ? void 0 : _p.name,
|
|
10578
10578
|
});
|
|
10579
10579
|
return featuredMentorsAfterSeed[0];
|
|
10580
10580
|
}
|
|
@@ -14479,6 +14479,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14479
14479
|
// `addUserMessage`) between the two `getChats` resolutions.
|
|
14480
14480
|
const startNewChatInFlightRef = React__default.useRef(false);
|
|
14481
14481
|
const startNewChat = React__default.useCallback(async () => {
|
|
14482
|
+
var _a, _b, _c;
|
|
14482
14483
|
// Reset all chat state
|
|
14483
14484
|
if (!showingSharedChat) {
|
|
14484
14485
|
dispatch(chatActions.resetChats(undefined));
|
|
@@ -14511,6 +14512,10 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14511
14512
|
requestBody,
|
|
14512
14513
|
}).unwrap();
|
|
14513
14514
|
dispatch(chatActions.updateSessionIds(response.session_id));
|
|
14515
|
+
// The backend is the source of truth for which tools/artifacts are
|
|
14516
|
+
// enabled by default; seed the UI toggles from the create-session response.
|
|
14517
|
+
dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
|
|
14518
|
+
dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
|
|
14514
14519
|
onStartNewChat === null || onStartNewChat === void 0 ? void 0 : onStartNewChat(response.session_id);
|
|
14515
14520
|
}
|
|
14516
14521
|
catch (error) {
|
|
@@ -14630,7 +14635,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14630
14635
|
sendMessage,
|
|
14631
14636
|
]);
|
|
14632
14637
|
async function changeTab(tab) {
|
|
14633
|
-
var _a, _b, _c, _d;
|
|
14638
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
14634
14639
|
// while responding to a message, do not change the tab
|
|
14635
14640
|
if (streaming) {
|
|
14636
14641
|
errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler("Cannot change tab while streaming");
|
|
@@ -14659,14 +14664,18 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14659
14664
|
requestBody,
|
|
14660
14665
|
}).unwrap();
|
|
14661
14666
|
dispatch(chatActions.updateSessionIds(response.session_id));
|
|
14667
|
+
// The backend is the source of truth for which tools/artifacts are
|
|
14668
|
+
// enabled by default; seed the UI toggles from the create-session response.
|
|
14669
|
+
dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
|
|
14670
|
+
dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
|
|
14662
14671
|
// if the tab we are going to activate has no session Id (this is the first time we are creating the session for this tag)
|
|
14663
14672
|
// we need to send a proactive prompt if the advanced tabs properties has no tag.
|
|
14664
14673
|
// (presence of tag indicates an ACTIONABLE UI)
|
|
14665
|
-
if (!((
|
|
14666
|
-
for (const prompt of (
|
|
14674
|
+
if (!((_d = advancedTabsProperties[tab]) === null || _d === void 0 ? void 0 : _d.tag)) {
|
|
14675
|
+
for (const prompt of (_f = (_e = advancedTabsProperties[tab]) === null || _e === void 0 ? void 0 : _e.prompts) !== null && _f !== void 0 ? _f : []) {
|
|
14667
14676
|
// @ts-expect-error - Type mismatch
|
|
14668
14677
|
if (prompt.type === "human" && (prompt === null || prompt === void 0 ? void 0 : prompt.proactive)) {
|
|
14669
|
-
sendMessage(tab, (
|
|
14678
|
+
sendMessage(tab, (_g = prompt.content) !== null && _g !== void 0 ? _g : "", { visible: false });
|
|
14670
14679
|
}
|
|
14671
14680
|
}
|
|
14672
14681
|
}
|
|
@@ -15816,6 +15825,9 @@ function requireDynamicRenderingUtils () {
|
|
|
15816
15825
|
isHangingPromiseRejectionError: function() {
|
|
15817
15826
|
return isHangingPromiseRejectionError;
|
|
15818
15827
|
},
|
|
15828
|
+
makeDevtoolsIOAwarePromise: function() {
|
|
15829
|
+
return makeDevtoolsIOAwarePromise;
|
|
15830
|
+
},
|
|
15819
15831
|
makeHangingPromise: function() {
|
|
15820
15832
|
return makeHangingPromise;
|
|
15821
15833
|
}
|
|
@@ -15828,17 +15840,17 @@ function requireDynamicRenderingUtils () {
|
|
|
15828
15840
|
}
|
|
15829
15841
|
const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';
|
|
15830
15842
|
class HangingPromiseRejectionError extends Error {
|
|
15831
|
-
constructor(expression){
|
|
15832
|
-
super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`), this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
|
|
15843
|
+
constructor(route, expression){
|
|
15844
|
+
super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
|
|
15833
15845
|
}
|
|
15834
15846
|
}
|
|
15835
15847
|
const abortListenersBySignal = new WeakMap();
|
|
15836
|
-
function makeHangingPromise(signal, expression) {
|
|
15848
|
+
function makeHangingPromise(signal, route, expression) {
|
|
15837
15849
|
if (signal.aborted) {
|
|
15838
|
-
return Promise.reject(new HangingPromiseRejectionError(expression));
|
|
15850
|
+
return Promise.reject(new HangingPromiseRejectionError(route, expression));
|
|
15839
15851
|
} else {
|
|
15840
15852
|
const hangingPromise = new Promise((_, reject)=>{
|
|
15841
|
-
const boundRejection = reject.bind(null, new HangingPromiseRejectionError(expression));
|
|
15853
|
+
const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));
|
|
15842
15854
|
let currentListeners = abortListenersBySignal.get(signal);
|
|
15843
15855
|
if (currentListeners) {
|
|
15844
15856
|
currentListeners.push(boundRejection);
|
|
@@ -15864,6 +15876,16 @@ function requireDynamicRenderingUtils () {
|
|
|
15864
15876
|
}
|
|
15865
15877
|
}
|
|
15866
15878
|
function ignoreReject() {}
|
|
15879
|
+
function makeDevtoolsIOAwarePromise(underlying) {
|
|
15880
|
+
// in React DevTools if we resolve in a setTimeout we will observe
|
|
15881
|
+
// the promise resolution as something that can suspend a boundary or root.
|
|
15882
|
+
return new Promise((resolve)=>{
|
|
15883
|
+
// Must use setTimeout to be considered IO React DevTools. setImmediate will not work.
|
|
15884
|
+
setTimeout(()=>{
|
|
15885
|
+
resolve(underlying);
|
|
15886
|
+
}, 0);
|
|
15887
|
+
});
|
|
15888
|
+
}
|
|
15867
15889
|
|
|
15868
15890
|
|
|
15869
15891
|
} (dynamicRenderingUtils));
|
|
@@ -16125,6 +16147,9 @@ function requireAppRouterHeaders () {
|
|
|
16125
16147
|
FLIGHT_HEADERS: function() {
|
|
16126
16148
|
return FLIGHT_HEADERS;
|
|
16127
16149
|
},
|
|
16150
|
+
NEXT_ACTION_NOT_FOUND_HEADER: function() {
|
|
16151
|
+
return NEXT_ACTION_NOT_FOUND_HEADER;
|
|
16152
|
+
},
|
|
16128
16153
|
NEXT_DID_POSTPONE_HEADER: function() {
|
|
16129
16154
|
return NEXT_DID_POSTPONE_HEADER;
|
|
16130
16155
|
},
|
|
@@ -16168,14 +16193,14 @@ function requireAppRouterHeaders () {
|
|
|
16168
16193
|
return RSC_HEADER;
|
|
16169
16194
|
}
|
|
16170
16195
|
});
|
|
16171
|
-
const RSC_HEADER = '
|
|
16172
|
-
const ACTION_HEADER = '
|
|
16173
|
-
const NEXT_ROUTER_STATE_TREE_HEADER = '
|
|
16174
|
-
const NEXT_ROUTER_PREFETCH_HEADER = '
|
|
16175
|
-
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = '
|
|
16176
|
-
const NEXT_HMR_REFRESH_HEADER = '
|
|
16196
|
+
const RSC_HEADER = 'rsc';
|
|
16197
|
+
const ACTION_HEADER = 'next-action';
|
|
16198
|
+
const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';
|
|
16199
|
+
const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';
|
|
16200
|
+
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';
|
|
16201
|
+
const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
|
|
16177
16202
|
const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
|
|
16178
|
-
const NEXT_URL = '
|
|
16203
|
+
const NEXT_URL = 'next-url';
|
|
16179
16204
|
const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
|
|
16180
16205
|
const FLIGHT_HEADERS = [
|
|
16181
16206
|
RSC_HEADER,
|
|
@@ -16190,6 +16215,7 @@ function requireAppRouterHeaders () {
|
|
|
16190
16215
|
const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
|
|
16191
16216
|
const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
|
|
16192
16217
|
const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
|
|
16218
|
+
const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';
|
|
16193
16219
|
|
|
16194
16220
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
16195
16221
|
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
@@ -16202,6 +16228,35 @@ function requireAppRouterHeaders () {
|
|
|
16202
16228
|
return appRouterHeaders.exports;
|
|
16203
16229
|
}
|
|
16204
16230
|
|
|
16231
|
+
var invariantError = {};
|
|
16232
|
+
|
|
16233
|
+
var hasRequiredInvariantError;
|
|
16234
|
+
|
|
16235
|
+
function requireInvariantError () {
|
|
16236
|
+
if (hasRequiredInvariantError) return invariantError;
|
|
16237
|
+
hasRequiredInvariantError = 1;
|
|
16238
|
+
(function (exports$1) {
|
|
16239
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
16240
|
+
value: true
|
|
16241
|
+
});
|
|
16242
|
+
Object.defineProperty(exports$1, "InvariantError", {
|
|
16243
|
+
enumerable: true,
|
|
16244
|
+
get: function() {
|
|
16245
|
+
return InvariantError;
|
|
16246
|
+
}
|
|
16247
|
+
});
|
|
16248
|
+
class InvariantError extends Error {
|
|
16249
|
+
constructor(message, options){
|
|
16250
|
+
super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options);
|
|
16251
|
+
this.name = 'InvariantError';
|
|
16252
|
+
}
|
|
16253
|
+
}
|
|
16254
|
+
|
|
16255
|
+
|
|
16256
|
+
} (invariantError));
|
|
16257
|
+
return invariantError;
|
|
16258
|
+
}
|
|
16259
|
+
|
|
16205
16260
|
var hasRequiredWorkUnitAsyncStorage_external;
|
|
16206
16261
|
|
|
16207
16262
|
function requireWorkUnitAsyncStorage_external () {
|
|
@@ -16218,12 +16273,12 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16218
16273
|
});
|
|
16219
16274
|
}
|
|
16220
16275
|
_export(exports$1, {
|
|
16276
|
+
getCacheSignal: function() {
|
|
16277
|
+
return getCacheSignal;
|
|
16278
|
+
},
|
|
16221
16279
|
getDraftModeProviderForCacheScope: function() {
|
|
16222
16280
|
return getDraftModeProviderForCacheScope;
|
|
16223
16281
|
},
|
|
16224
|
-
getExpectedRequestStore: function() {
|
|
16225
|
-
return getExpectedRequestStore;
|
|
16226
|
-
},
|
|
16227
16282
|
getHmrRefreshHash: function() {
|
|
16228
16283
|
return getHmrRefreshHash;
|
|
16229
16284
|
},
|
|
@@ -16233,49 +16288,28 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16233
16288
|
getRenderResumeDataCache: function() {
|
|
16234
16289
|
return getRenderResumeDataCache;
|
|
16235
16290
|
},
|
|
16291
|
+
getRuntimeStagePromise: function() {
|
|
16292
|
+
return getRuntimeStagePromise;
|
|
16293
|
+
},
|
|
16294
|
+
getServerComponentsHmrCache: function() {
|
|
16295
|
+
return getServerComponentsHmrCache;
|
|
16296
|
+
},
|
|
16297
|
+
isHmrRefresh: function() {
|
|
16298
|
+
return isHmrRefresh;
|
|
16299
|
+
},
|
|
16236
16300
|
throwForMissingRequestStore: function() {
|
|
16237
16301
|
return throwForMissingRequestStore;
|
|
16238
16302
|
},
|
|
16303
|
+
throwInvariantForMissingStore: function() {
|
|
16304
|
+
return throwInvariantForMissingStore;
|
|
16305
|
+
},
|
|
16239
16306
|
workUnitAsyncStorage: function() {
|
|
16240
16307
|
return _workunitasyncstorageinstance.workUnitAsyncStorageInstance;
|
|
16241
16308
|
}
|
|
16242
16309
|
});
|
|
16243
16310
|
const _workunitasyncstorageinstance = requireWorkUnitAsyncStorageInstance();
|
|
16244
16311
|
const _approuterheaders = requireAppRouterHeaders();
|
|
16245
|
-
|
|
16246
|
-
const workUnitStore = _workunitasyncstorageinstance.workUnitAsyncStorageInstance.getStore();
|
|
16247
|
-
if (!workUnitStore) {
|
|
16248
|
-
throwForMissingRequestStore(callingExpression);
|
|
16249
|
-
}
|
|
16250
|
-
switch(workUnitStore.type){
|
|
16251
|
-
case 'request':
|
|
16252
|
-
return workUnitStore;
|
|
16253
|
-
case 'prerender':
|
|
16254
|
-
case 'prerender-ppr':
|
|
16255
|
-
case 'prerender-legacy':
|
|
16256
|
-
// This should not happen because we should have checked it already.
|
|
16257
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside a prerender. This is a bug in Next.js.`), "__NEXT_ERROR_CODE", {
|
|
16258
|
-
value: "E401",
|
|
16259
|
-
enumerable: false,
|
|
16260
|
-
configurable: true
|
|
16261
|
-
});
|
|
16262
|
-
case 'cache':
|
|
16263
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
16264
|
-
value: "E37",
|
|
16265
|
-
enumerable: false,
|
|
16266
|
-
configurable: true
|
|
16267
|
-
});
|
|
16268
|
-
case 'unstable-cache':
|
|
16269
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
|
|
16270
|
-
value: "E69",
|
|
16271
|
-
enumerable: false,
|
|
16272
|
-
configurable: true
|
|
16273
|
-
});
|
|
16274
|
-
default:
|
|
16275
|
-
const _exhaustiveCheck = workUnitStore;
|
|
16276
|
-
return _exhaustiveCheck;
|
|
16277
|
-
}
|
|
16278
|
-
}
|
|
16312
|
+
const _invarianterror = requireInvariantError();
|
|
16279
16313
|
function throwForMissingRequestStore(callingExpression) {
|
|
16280
16314
|
throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", {
|
|
16281
16315
|
value: "E251",
|
|
@@ -16283,43 +16317,143 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16283
16317
|
configurable: true
|
|
16284
16318
|
});
|
|
16285
16319
|
}
|
|
16320
|
+
function throwInvariantForMissingStore() {
|
|
16321
|
+
throw Object.defineProperty(new _invarianterror.InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", {
|
|
16322
|
+
value: "E696",
|
|
16323
|
+
enumerable: false,
|
|
16324
|
+
configurable: true
|
|
16325
|
+
});
|
|
16326
|
+
}
|
|
16286
16327
|
function getPrerenderResumeDataCache(workUnitStore) {
|
|
16287
|
-
|
|
16288
|
-
|
|
16328
|
+
switch(workUnitStore.type){
|
|
16329
|
+
case 'prerender':
|
|
16330
|
+
case 'prerender-runtime':
|
|
16331
|
+
case 'prerender-ppr':
|
|
16332
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16333
|
+
case 'prerender-client':
|
|
16334
|
+
// TODO eliminate fetch caching in client scope and stop exposing this data
|
|
16335
|
+
// cache during SSR.
|
|
16336
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16337
|
+
case 'prerender-legacy':
|
|
16338
|
+
case 'request':
|
|
16339
|
+
case 'cache':
|
|
16340
|
+
case 'private-cache':
|
|
16341
|
+
case 'unstable-cache':
|
|
16342
|
+
return null;
|
|
16343
|
+
default:
|
|
16344
|
+
return workUnitStore;
|
|
16289
16345
|
}
|
|
16290
|
-
return null;
|
|
16291
16346
|
}
|
|
16292
16347
|
function getRenderResumeDataCache(workUnitStore) {
|
|
16293
|
-
|
|
16294
|
-
|
|
16348
|
+
switch(workUnitStore.type){
|
|
16349
|
+
case 'request':
|
|
16295
16350
|
return workUnitStore.renderResumeDataCache;
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16351
|
+
case 'prerender':
|
|
16352
|
+
case 'prerender-runtime':
|
|
16353
|
+
case 'prerender-client':
|
|
16354
|
+
if (workUnitStore.renderResumeDataCache) {
|
|
16355
|
+
// If we are in a prerender, we might have a render resume data cache
|
|
16356
|
+
// that is used to read from prefilled caches.
|
|
16357
|
+
return workUnitStore.renderResumeDataCache;
|
|
16358
|
+
}
|
|
16359
|
+
// fallthrough
|
|
16360
|
+
case 'prerender-ppr':
|
|
16361
|
+
// Otherwise we return the mutable resume data cache here as an immutable
|
|
16362
|
+
// version of the cache as it can also be used for reading.
|
|
16363
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16364
|
+
case 'cache':
|
|
16365
|
+
case 'private-cache':
|
|
16366
|
+
case 'unstable-cache':
|
|
16367
|
+
case 'prerender-legacy':
|
|
16368
|
+
return null;
|
|
16369
|
+
default:
|
|
16370
|
+
return workUnitStore;
|
|
16300
16371
|
}
|
|
16301
|
-
return null;
|
|
16302
16372
|
}
|
|
16303
16373
|
function getHmrRefreshHash(workStore, workUnitStore) {
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16374
|
+
if (workStore.dev) {
|
|
16375
|
+
switch(workUnitStore.type){
|
|
16376
|
+
case 'cache':
|
|
16377
|
+
case 'private-cache':
|
|
16378
|
+
case 'prerender':
|
|
16379
|
+
case 'prerender-runtime':
|
|
16380
|
+
return workUnitStore.hmrRefreshHash;
|
|
16381
|
+
case 'request':
|
|
16382
|
+
var _workUnitStore_cookies_get;
|
|
16383
|
+
return (_workUnitStore_cookies_get = workUnitStore.cookies.get(_approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;
|
|
16384
|
+
}
|
|
16307
16385
|
}
|
|
16308
|
-
return
|
|
16386
|
+
return undefined;
|
|
16387
|
+
}
|
|
16388
|
+
function isHmrRefresh(workStore, workUnitStore) {
|
|
16389
|
+
if (workStore.dev) {
|
|
16390
|
+
switch(workUnitStore.type){
|
|
16391
|
+
case 'cache':
|
|
16392
|
+
case 'private-cache':
|
|
16393
|
+
case 'request':
|
|
16394
|
+
return workUnitStore.isHmrRefresh ?? false;
|
|
16395
|
+
}
|
|
16396
|
+
}
|
|
16397
|
+
return false;
|
|
16398
|
+
}
|
|
16399
|
+
function getServerComponentsHmrCache(workStore, workUnitStore) {
|
|
16400
|
+
if (workStore.dev) {
|
|
16401
|
+
switch(workUnitStore.type){
|
|
16402
|
+
case 'cache':
|
|
16403
|
+
case 'private-cache':
|
|
16404
|
+
case 'request':
|
|
16405
|
+
return workUnitStore.serverComponentsHmrCache;
|
|
16406
|
+
}
|
|
16407
|
+
}
|
|
16408
|
+
return undefined;
|
|
16309
16409
|
}
|
|
16310
16410
|
function getDraftModeProviderForCacheScope(workStore, workUnitStore) {
|
|
16311
16411
|
if (workStore.isDraftMode) {
|
|
16312
16412
|
switch(workUnitStore.type){
|
|
16313
16413
|
case 'cache':
|
|
16414
|
+
case 'private-cache':
|
|
16314
16415
|
case 'unstable-cache':
|
|
16416
|
+
case 'prerender-runtime':
|
|
16315
16417
|
case 'request':
|
|
16316
16418
|
return workUnitStore.draftMode;
|
|
16317
|
-
default:
|
|
16318
|
-
return undefined;
|
|
16319
16419
|
}
|
|
16320
16420
|
}
|
|
16321
16421
|
return undefined;
|
|
16322
16422
|
}
|
|
16423
|
+
function getCacheSignal(workUnitStore) {
|
|
16424
|
+
switch(workUnitStore.type){
|
|
16425
|
+
case 'prerender':
|
|
16426
|
+
case 'prerender-client':
|
|
16427
|
+
case 'prerender-runtime':
|
|
16428
|
+
return workUnitStore.cacheSignal;
|
|
16429
|
+
case 'prerender-ppr':
|
|
16430
|
+
case 'prerender-legacy':
|
|
16431
|
+
case 'request':
|
|
16432
|
+
case 'cache':
|
|
16433
|
+
case 'private-cache':
|
|
16434
|
+
case 'unstable-cache':
|
|
16435
|
+
return null;
|
|
16436
|
+
default:
|
|
16437
|
+
return workUnitStore;
|
|
16438
|
+
}
|
|
16439
|
+
}
|
|
16440
|
+
function getRuntimeStagePromise(workUnitStore) {
|
|
16441
|
+
switch(workUnitStore.type){
|
|
16442
|
+
case 'prerender-runtime':
|
|
16443
|
+
case 'private-cache':
|
|
16444
|
+
return workUnitStore.runtimeStagePromise;
|
|
16445
|
+
case 'prerender':
|
|
16446
|
+
case 'prerender-client':
|
|
16447
|
+
case 'prerender-ppr':
|
|
16448
|
+
case 'prerender-legacy':
|
|
16449
|
+
case 'request':
|
|
16450
|
+
case 'cache':
|
|
16451
|
+
case 'unstable-cache':
|
|
16452
|
+
return null;
|
|
16453
|
+
default:
|
|
16454
|
+
return workUnitStore;
|
|
16455
|
+
}
|
|
16456
|
+
}
|
|
16323
16457
|
|
|
16324
16458
|
|
|
16325
16459
|
} (workUnitAsyncStorage_external));
|
|
@@ -16375,13 +16509,13 @@ function requireWorkAsyncStorage_external () {
|
|
|
16375
16509
|
return workAsyncStorage_external;
|
|
16376
16510
|
}
|
|
16377
16511
|
|
|
16378
|
-
var
|
|
16512
|
+
var boundaryConstants = {};
|
|
16379
16513
|
|
|
16380
|
-
var
|
|
16514
|
+
var hasRequiredBoundaryConstants;
|
|
16381
16515
|
|
|
16382
|
-
function
|
|
16383
|
-
if (
|
|
16384
|
-
|
|
16516
|
+
function requireBoundaryConstants () {
|
|
16517
|
+
if (hasRequiredBoundaryConstants) return boundaryConstants;
|
|
16518
|
+
hasRequiredBoundaryConstants = 1;
|
|
16385
16519
|
(function (exports$1) {
|
|
16386
16520
|
Object.defineProperty(exports$1, "__esModule", {
|
|
16387
16521
|
value: true
|
|
@@ -16399,6 +16533,9 @@ function requireMetadataConstants () {
|
|
|
16399
16533
|
OUTLET_BOUNDARY_NAME: function() {
|
|
16400
16534
|
return OUTLET_BOUNDARY_NAME;
|
|
16401
16535
|
},
|
|
16536
|
+
ROOT_LAYOUT_BOUNDARY_NAME: function() {
|
|
16537
|
+
return ROOT_LAYOUT_BOUNDARY_NAME;
|
|
16538
|
+
},
|
|
16402
16539
|
VIEWPORT_BOUNDARY_NAME: function() {
|
|
16403
16540
|
return VIEWPORT_BOUNDARY_NAME;
|
|
16404
16541
|
}
|
|
@@ -16406,10 +16543,11 @@ function requireMetadataConstants () {
|
|
|
16406
16543
|
const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';
|
|
16407
16544
|
const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';
|
|
16408
16545
|
const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';
|
|
16546
|
+
const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';
|
|
16409
16547
|
|
|
16410
16548
|
|
|
16411
|
-
} (
|
|
16412
|
-
return
|
|
16549
|
+
} (boundaryConstants));
|
|
16550
|
+
return boundaryConstants;
|
|
16413
16551
|
}
|
|
16414
16552
|
|
|
16415
16553
|
var scheduler = {};
|
|
@@ -16522,6 +16660,9 @@ function requireDynamicRendering () {
|
|
|
16522
16660
|
Postpone: function() {
|
|
16523
16661
|
return Postpone;
|
|
16524
16662
|
},
|
|
16663
|
+
PreludeState: function() {
|
|
16664
|
+
return PreludeState;
|
|
16665
|
+
},
|
|
16525
16666
|
abortAndThrowOnSynchronousRequestDataAccess: function() {
|
|
16526
16667
|
return abortAndThrowOnSynchronousRequestDataAccess;
|
|
16527
16668
|
},
|
|
@@ -16546,8 +16687,11 @@ function requireDynamicRendering () {
|
|
|
16546
16687
|
createHangingInputAbortSignal: function() {
|
|
16547
16688
|
return createHangingInputAbortSignal;
|
|
16548
16689
|
},
|
|
16549
|
-
|
|
16550
|
-
return
|
|
16690
|
+
createRenderInBrowserAbortSignal: function() {
|
|
16691
|
+
return createRenderInBrowserAbortSignal;
|
|
16692
|
+
},
|
|
16693
|
+
delayUntilRuntimeStage: function() {
|
|
16694
|
+
return delayUntilRuntimeStage;
|
|
16551
16695
|
},
|
|
16552
16696
|
formatDynamicAPIAccesses: function() {
|
|
16553
16697
|
return formatDynamicAPIAccesses;
|
|
@@ -16561,6 +16705,9 @@ function requireDynamicRendering () {
|
|
|
16561
16705
|
isPrerenderInterruptedError: function() {
|
|
16562
16706
|
return isPrerenderInterruptedError;
|
|
16563
16707
|
},
|
|
16708
|
+
logDisallowedDynamicError: function() {
|
|
16709
|
+
return logDisallowedDynamicError;
|
|
16710
|
+
},
|
|
16564
16711
|
markCurrentScopeAsDynamic: function() {
|
|
16565
16712
|
return markCurrentScopeAsDynamic;
|
|
16566
16713
|
},
|
|
@@ -16579,9 +16726,6 @@ function requireDynamicRendering () {
|
|
|
16579
16726
|
trackDynamicDataInDynamicRender: function() {
|
|
16580
16727
|
return trackDynamicDataInDynamicRender;
|
|
16581
16728
|
},
|
|
16582
|
-
trackFallbackParamAccessed: function() {
|
|
16583
|
-
return trackFallbackParamAccessed;
|
|
16584
|
-
},
|
|
16585
16729
|
trackSynchronousPlatformIOAccessInDev: function() {
|
|
16586
16730
|
return trackSynchronousPlatformIOAccessInDev;
|
|
16587
16731
|
},
|
|
@@ -16590,6 +16734,9 @@ function requireDynamicRendering () {
|
|
|
16590
16734
|
},
|
|
16591
16735
|
useDynamicRouteParams: function() {
|
|
16592
16736
|
return useDynamicRouteParams;
|
|
16737
|
+
},
|
|
16738
|
+
warnOnSyncDynamicError: function() {
|
|
16739
|
+
return warnOnSyncDynamicError;
|
|
16593
16740
|
}
|
|
16594
16741
|
});
|
|
16595
16742
|
const _react = /*#__PURE__*/ _interop_require_default(React__default);
|
|
@@ -16598,8 +16745,10 @@ function requireDynamicRendering () {
|
|
|
16598
16745
|
const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
|
|
16599
16746
|
const _workasyncstorageexternal = requireWorkAsyncStorage_external();
|
|
16600
16747
|
const _dynamicrenderingutils = requireDynamicRenderingUtils();
|
|
16601
|
-
const
|
|
16748
|
+
const _boundaryconstants = requireBoundaryConstants();
|
|
16602
16749
|
const _scheduler = requireScheduler();
|
|
16750
|
+
const _bailouttocsr = requireBailoutToCsr();
|
|
16751
|
+
const _invarianterror = requireInvariantError();
|
|
16603
16752
|
function _interop_require_default(obj) {
|
|
16604
16753
|
return obj && obj.__esModule ? obj : {
|
|
16605
16754
|
default: obj
|
|
@@ -16610,16 +16759,15 @@ function requireDynamicRendering () {
|
|
|
16610
16759
|
return {
|
|
16611
16760
|
isDebugDynamicAccesses,
|
|
16612
16761
|
dynamicAccesses: [],
|
|
16613
|
-
syncDynamicExpression: undefined,
|
|
16614
16762
|
syncDynamicErrorWithStack: null
|
|
16615
16763
|
};
|
|
16616
16764
|
}
|
|
16617
16765
|
function createDynamicValidationState() {
|
|
16618
16766
|
return {
|
|
16619
|
-
|
|
16767
|
+
hasSuspenseAboveBody: false,
|
|
16620
16768
|
hasDynamicMetadata: false,
|
|
16621
16769
|
hasDynamicViewport: false,
|
|
16622
|
-
|
|
16770
|
+
hasAllowedDynamic: false,
|
|
16623
16771
|
dynamicErrors: []
|
|
16624
16772
|
};
|
|
16625
16773
|
}
|
|
@@ -16629,11 +16777,17 @@ function requireDynamicRendering () {
|
|
|
16629
16777
|
}
|
|
16630
16778
|
function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
|
|
16631
16779
|
if (workUnitStore) {
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16780
|
+
switch(workUnitStore.type){
|
|
16781
|
+
case 'cache':
|
|
16782
|
+
case 'unstable-cache':
|
|
16783
|
+
// Inside cache scopes, marking a scope as dynamic has no effect,
|
|
16784
|
+
// because the outer cache scope creates a cache boundary. This is
|
|
16785
|
+
// subtly different from reading a dynamic data source, which is
|
|
16786
|
+
// forbidden inside a cache scope.
|
|
16787
|
+
return;
|
|
16788
|
+
case 'private-cache':
|
|
16789
|
+
// A private cache scope is already dynamic by definition.
|
|
16790
|
+
return;
|
|
16637
16791
|
}
|
|
16638
16792
|
}
|
|
16639
16793
|
// If we're forcing dynamic rendering or we're forcing static rendering, we
|
|
@@ -16648,29 +16802,29 @@ function requireDynamicRendering () {
|
|
|
16648
16802
|
});
|
|
16649
16803
|
}
|
|
16650
16804
|
if (workUnitStore) {
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16805
|
+
switch(workUnitStore.type){
|
|
16806
|
+
case 'prerender-ppr':
|
|
16807
|
+
return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
|
|
16808
|
+
case 'prerender-legacy':
|
|
16809
|
+
workUnitStore.revalidate = 0;
|
|
16810
|
+
// We aren't prerendering, but we are generating a static page. We need
|
|
16811
|
+
// to bail out of static generation.
|
|
16812
|
+
const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
|
|
16813
|
+
value: "E550",
|
|
16814
|
+
enumerable: false,
|
|
16815
|
+
configurable: true
|
|
16816
|
+
});
|
|
16817
|
+
store.dynamicUsageDescription = expression;
|
|
16818
|
+
store.dynamicUsageStack = err.stack;
|
|
16819
|
+
throw err;
|
|
16820
|
+
case 'request':
|
|
16821
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16822
|
+
workUnitStore.usedDynamic = true;
|
|
16823
|
+
}
|
|
16824
|
+
break;
|
|
16666
16825
|
}
|
|
16667
16826
|
}
|
|
16668
16827
|
}
|
|
16669
|
-
function trackFallbackParamAccessed(store, expression) {
|
|
16670
|
-
const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
16671
|
-
if (!prerenderStore || prerenderStore.type !== 'prerender-ppr') return;
|
|
16672
|
-
postponeWithTracking(store.route, expression, prerenderStore.dynamicTracking);
|
|
16673
|
-
}
|
|
16674
16828
|
function throwToInterruptStaticGeneration(expression, store, prerenderStore) {
|
|
16675
16829
|
// We aren't prerendering but we are generating a static page. We need to bail out of static generation
|
|
16676
16830
|
const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
|
|
@@ -16683,25 +16837,31 @@ function requireDynamicRendering () {
|
|
|
16683
16837
|
store.dynamicUsageStack = err.stack;
|
|
16684
16838
|
throw err;
|
|
16685
16839
|
}
|
|
16686
|
-
function trackDynamicDataInDynamicRender(
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
//
|
|
16840
|
+
function trackDynamicDataInDynamicRender(workUnitStore) {
|
|
16841
|
+
switch(workUnitStore.type){
|
|
16842
|
+
case 'cache':
|
|
16843
|
+
case 'unstable-cache':
|
|
16844
|
+
// Inside cache scopes, marking a scope as dynamic has no effect,
|
|
16845
|
+
// because the outer cache scope creates a cache boundary. This is
|
|
16846
|
+
// subtly different from reading a dynamic data source, which is
|
|
16691
16847
|
// forbidden inside a cache scope.
|
|
16692
16848
|
return;
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
|
|
16696
|
-
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16849
|
+
case 'private-cache':
|
|
16850
|
+
// A private cache scope is already dynamic by definition.
|
|
16851
|
+
return;
|
|
16852
|
+
case 'prerender':
|
|
16853
|
+
case 'prerender-runtime':
|
|
16854
|
+
case 'prerender-legacy':
|
|
16855
|
+
case 'prerender-ppr':
|
|
16856
|
+
case 'prerender-client':
|
|
16857
|
+
break;
|
|
16858
|
+
case 'request':
|
|
16859
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16860
|
+
workUnitStore.usedDynamic = true;
|
|
16861
|
+
}
|
|
16862
|
+
break;
|
|
16700
16863
|
}
|
|
16701
16864
|
}
|
|
16702
|
-
// Despite it's name we don't actually abort unless we have a controller to call abort on
|
|
16703
|
-
// There are times when we let a prerender run long to discover caches where we want the semantics
|
|
16704
|
-
// of tracking dynamic access without terminating the prerender early
|
|
16705
16865
|
function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {
|
|
16706
16866
|
const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;
|
|
16707
16867
|
const error = createPrerenderInterruptedError(reason);
|
|
@@ -16718,13 +16878,16 @@ function requireDynamicRendering () {
|
|
|
16718
16878
|
}
|
|
16719
16879
|
function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {
|
|
16720
16880
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
16881
|
+
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16882
|
+
// It is important that we set this tracking value after aborting. Aborts are executed
|
|
16883
|
+
// synchronously except for the case where you abort during render itself. By setting this
|
|
16884
|
+
// value late we can use it to determine if any of the aborted tasks are the task that
|
|
16885
|
+
// called the sync IO expression in the first place.
|
|
16721
16886
|
if (dynamicTracking) {
|
|
16722
16887
|
if (dynamicTracking.syncDynamicErrorWithStack === null) {
|
|
16723
|
-
dynamicTracking.syncDynamicExpression = expression;
|
|
16724
16888
|
dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
|
|
16725
16889
|
}
|
|
16726
16890
|
}
|
|
16727
|
-
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16728
16891
|
}
|
|
16729
16892
|
function trackSynchronousPlatformIOAccessInDev(requestStore) {
|
|
16730
16893
|
// We don't actually have a controller to abort but we do the semantic equivalent by
|
|
@@ -16739,22 +16902,27 @@ function requireDynamicRendering () {
|
|
|
16739
16902
|
// since we need the throw semantics regardless of whether we abort it is easier to land
|
|
16740
16903
|
// this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer
|
|
16741
16904
|
// to ideal implementation
|
|
16905
|
+
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16906
|
+
// It is important that we set this tracking value after aborting. Aborts are executed
|
|
16907
|
+
// synchronously except for the case where you abort during render itself. By setting this
|
|
16908
|
+
// value late we can use it to determine if any of the aborted tasks are the task that
|
|
16909
|
+
// called the sync IO expression in the first place.
|
|
16742
16910
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
16743
16911
|
if (dynamicTracking) {
|
|
16744
16912
|
if (dynamicTracking.syncDynamicErrorWithStack === null) {
|
|
16745
|
-
dynamicTracking.syncDynamicExpression = expression;
|
|
16746
16913
|
dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
|
|
16747
|
-
if (prerenderStore.validating === true) {
|
|
16748
|
-
// We always log Request Access in dev at the point of calling the function
|
|
16749
|
-
// So we mark the dynamic validation as not requiring it to be printed
|
|
16750
|
-
dynamicTracking.syncDynamicLogged = true;
|
|
16751
|
-
}
|
|
16752
16914
|
}
|
|
16753
16915
|
}
|
|
16754
|
-
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16755
16916
|
}
|
|
16756
16917
|
throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);
|
|
16757
16918
|
}
|
|
16919
|
+
function warnOnSyncDynamicError(dynamicTracking) {
|
|
16920
|
+
if (dynamicTracking.syncDynamicErrorWithStack) {
|
|
16921
|
+
// the server did something sync dynamic, likely
|
|
16922
|
+
// leading to an early termination of the prerender.
|
|
16923
|
+
console.error(dynamicTracking.syncDynamicErrorWithStack);
|
|
16924
|
+
}
|
|
16925
|
+
}
|
|
16758
16926
|
const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev;
|
|
16759
16927
|
function Postpone({ reason, route }) {
|
|
16760
16928
|
const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
@@ -16847,35 +17015,57 @@ function requireDynamicRendering () {
|
|
|
16847
17015
|
});
|
|
16848
17016
|
}
|
|
16849
17017
|
}
|
|
16850
|
-
function
|
|
16851
|
-
assertPostpone();
|
|
17018
|
+
function createRenderInBrowserAbortSignal() {
|
|
16852
17019
|
const controller = new AbortController();
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
}
|
|
17020
|
+
controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", {
|
|
17021
|
+
value: "E721",
|
|
17022
|
+
enumerable: false,
|
|
17023
|
+
configurable: true
|
|
17024
|
+
}));
|
|
16859
17025
|
return controller.signal;
|
|
16860
17026
|
}
|
|
16861
17027
|
function createHangingInputAbortSignal(workUnitStore) {
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
17028
|
+
switch(workUnitStore.type){
|
|
17029
|
+
case 'prerender':
|
|
17030
|
+
case 'prerender-runtime':
|
|
17031
|
+
const controller = new AbortController();
|
|
17032
|
+
if (workUnitStore.cacheSignal) {
|
|
17033
|
+
// If we have a cacheSignal it means we're in a prospective render. If
|
|
17034
|
+
// the input we're waiting on is coming from another cache, we do want
|
|
17035
|
+
// to wait for it so that we can resolve this cache entry too.
|
|
17036
|
+
workUnitStore.cacheSignal.inputReady().then(()=>{
|
|
17037
|
+
controller.abort();
|
|
17038
|
+
});
|
|
17039
|
+
} else {
|
|
17040
|
+
// Otherwise we're in the final render and we should already have all
|
|
17041
|
+
// our caches filled.
|
|
17042
|
+
// If the prerender uses stages, we have wait until the runtime stage,
|
|
17043
|
+
// at which point all runtime inputs will be resolved.
|
|
17044
|
+
// (otherwise, a runtime prerender might consider `cookies()` hanging
|
|
17045
|
+
// even though they'd resolve in the next task.)
|
|
17046
|
+
//
|
|
17047
|
+
// We might still be waiting on some microtasks so we
|
|
17048
|
+
// wait one tick before giving up. When we give up, we still want to
|
|
17049
|
+
// render the content of this cache as deeply as we can so that we can
|
|
17050
|
+
// suspend as deeply as possible in the tree or not at all if we don't
|
|
17051
|
+
// end up waiting for the input.
|
|
17052
|
+
const runtimeStagePromise = (0, _workunitasyncstorageexternal.getRuntimeStagePromise)(workUnitStore);
|
|
17053
|
+
if (runtimeStagePromise) {
|
|
17054
|
+
runtimeStagePromise.then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort()));
|
|
17055
|
+
} else {
|
|
17056
|
+
(0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
|
|
17057
|
+
}
|
|
17058
|
+
}
|
|
17059
|
+
return controller.signal;
|
|
17060
|
+
case 'prerender-client':
|
|
17061
|
+
case 'prerender-ppr':
|
|
17062
|
+
case 'prerender-legacy':
|
|
17063
|
+
case 'request':
|
|
17064
|
+
case 'cache':
|
|
17065
|
+
case 'private-cache':
|
|
17066
|
+
case 'unstable-cache':
|
|
17067
|
+
return undefined;
|
|
16877
17068
|
}
|
|
16878
|
-
return controller.signal;
|
|
16879
17069
|
}
|
|
16880
17070
|
function annotateDynamicAccess(expression, prerenderStore) {
|
|
16881
17071
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
@@ -16888,31 +17078,65 @@ function requireDynamicRendering () {
|
|
|
16888
17078
|
}
|
|
16889
17079
|
function useDynamicRouteParams(expression) {
|
|
16890
17080
|
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
17081
|
+
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
17082
|
+
if (workStore && workUnitStore) {
|
|
17083
|
+
switch(workUnitStore.type){
|
|
17084
|
+
case 'prerender-client':
|
|
17085
|
+
case 'prerender':
|
|
17086
|
+
{
|
|
17087
|
+
const fallbackParams = workUnitStore.fallbackRouteParams;
|
|
17088
|
+
if (fallbackParams && fallbackParams.size > 0) {
|
|
17089
|
+
// We are in a prerender with cacheComponents semantics. We are going to
|
|
17090
|
+
// hang here and never resolve. This will cause the currently
|
|
17091
|
+
// rendering component to effectively be a dynamic hole.
|
|
17092
|
+
_react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
|
|
17093
|
+
}
|
|
17094
|
+
break;
|
|
17095
|
+
}
|
|
17096
|
+
case 'prerender-ppr':
|
|
17097
|
+
{
|
|
17098
|
+
const fallbackParams = workUnitStore.fallbackRouteParams;
|
|
17099
|
+
if (fallbackParams && fallbackParams.size > 0) {
|
|
17100
|
+
return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
|
|
17101
|
+
}
|
|
17102
|
+
break;
|
|
17103
|
+
}
|
|
17104
|
+
case 'prerender-runtime':
|
|
17105
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
17106
|
+
value: "E771",
|
|
17107
|
+
enumerable: false,
|
|
17108
|
+
configurable: true
|
|
17109
|
+
});
|
|
17110
|
+
case 'cache':
|
|
17111
|
+
case 'private-cache':
|
|
17112
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
17113
|
+
value: "E745",
|
|
17114
|
+
enumerable: false,
|
|
17115
|
+
configurable: true
|
|
17116
|
+
});
|
|
16908
17117
|
}
|
|
16909
17118
|
}
|
|
16910
17119
|
}
|
|
16911
17120
|
const hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/;
|
|
16912
|
-
|
|
16913
|
-
const
|
|
16914
|
-
|
|
16915
|
-
|
|
17121
|
+
// Common implicit body tags that React will treat as body when placed directly in html
|
|
17122
|
+
const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6';
|
|
17123
|
+
// Detects when RootLayoutBoundary (our framework marker component) appears
|
|
17124
|
+
// after Suspense in the component stack, indicating the root layout is wrapped
|
|
17125
|
+
// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.
|
|
17126
|
+
//
|
|
17127
|
+
// Example matches:
|
|
17128
|
+
// at Suspense (<anonymous>)
|
|
17129
|
+
// at __next_root_layout_boundary__ (<anonymous>)
|
|
17130
|
+
//
|
|
17131
|
+
// Or with other components in between (but not body/html/implicit-body):
|
|
17132
|
+
// at Suspense (<anonymous>)
|
|
17133
|
+
// at SomeComponent (<anonymous>)
|
|
17134
|
+
// at __next_root_layout_boundary__ (<anonymous>)
|
|
17135
|
+
const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`);
|
|
17136
|
+
const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
|
|
17137
|
+
const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
|
|
17138
|
+
const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
|
|
17139
|
+
function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
16916
17140
|
if (hasOutletRegex.test(componentStack)) {
|
|
16917
17141
|
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
16918
17142
|
return;
|
|
@@ -16922,92 +17146,112 @@ function requireDynamicRendering () {
|
|
|
16922
17146
|
} else if (hasViewportRegex.test(componentStack)) {
|
|
16923
17147
|
dynamicValidation.hasDynamicViewport = true;
|
|
16924
17148
|
return;
|
|
17149
|
+
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
17150
|
+
// For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
|
|
17151
|
+
// But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
|
|
17152
|
+
// is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
|
|
17153
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
17154
|
+
dynamicValidation.hasSuspenseAboveBody = true;
|
|
17155
|
+
return;
|
|
16925
17156
|
} else if (hasSuspenseRegex.test(componentStack)) {
|
|
16926
|
-
|
|
17157
|
+
// this error had a Suspense boundary above it so we don't need to report it as a source
|
|
17158
|
+
// of disallowed
|
|
17159
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
16927
17160
|
return;
|
|
16928
|
-
} else if (
|
|
16929
|
-
|
|
17161
|
+
} else if (clientDynamic.syncDynamicErrorWithStack) {
|
|
17162
|
+
// This task was the task that called the sync error.
|
|
17163
|
+
dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
|
|
16930
17164
|
return;
|
|
16931
17165
|
} else {
|
|
16932
|
-
const message = `Route "${route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it.
|
|
16933
|
-
const error =
|
|
17166
|
+
const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`;
|
|
17167
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
16934
17168
|
dynamicValidation.dynamicErrors.push(error);
|
|
16935
17169
|
return;
|
|
16936
17170
|
}
|
|
16937
17171
|
}
|
|
16938
|
-
|
|
17172
|
+
/**
|
|
17173
|
+
* In dev mode, we prefer using the owner stack, otherwise the provided
|
|
17174
|
+
* component stack is used.
|
|
17175
|
+
*/ function createErrorWithComponentOrOwnerStack(message, componentStack) {
|
|
17176
|
+
const ownerStack = process.env.NODE_ENV !== 'production' && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null;
|
|
16939
17177
|
const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
16940
17178
|
value: "E394",
|
|
16941
17179
|
enumerable: false,
|
|
16942
17180
|
configurable: true
|
|
16943
17181
|
});
|
|
16944
|
-
error.stack = '
|
|
17182
|
+
error.stack = error.name + ': ' + message + (ownerStack ?? componentStack);
|
|
16945
17183
|
return error;
|
|
16946
17184
|
}
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
syncLogged = false;
|
|
16963
|
-
}
|
|
16964
|
-
if (dynamicValidation.hasSyncDynamicErrors && syncError) {
|
|
16965
|
-
if (!syncLogged) {
|
|
16966
|
-
// In dev we already log errors about sync dynamic access. But during builds we need to ensure
|
|
16967
|
-
// the offending sync error is logged before we exit the build
|
|
16968
|
-
console.error(syncError);
|
|
17185
|
+
var PreludeState = /*#__PURE__*/ function(PreludeState) {
|
|
17186
|
+
PreludeState[PreludeState["Full"] = 0] = "Full";
|
|
17187
|
+
PreludeState[PreludeState["Empty"] = 1] = "Empty";
|
|
17188
|
+
PreludeState[PreludeState["Errored"] = 2] = "Errored";
|
|
17189
|
+
return PreludeState;
|
|
17190
|
+
}({});
|
|
17191
|
+
function logDisallowedDynamicError(workStore, error) {
|
|
17192
|
+
console.error(error);
|
|
17193
|
+
if (!workStore.dev) {
|
|
17194
|
+
if (workStore.hasReadableErrorStacks) {
|
|
17195
|
+
console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`);
|
|
17196
|
+
} else {
|
|
17197
|
+
console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
|
17198
|
+
- Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.
|
|
17199
|
+
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`);
|
|
16969
17200
|
}
|
|
16970
|
-
// The actual error should have been logged when the sync access ocurred
|
|
16971
|
-
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
16972
17201
|
}
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
17202
|
+
}
|
|
17203
|
+
function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) {
|
|
17204
|
+
if (prelude !== 0) {
|
|
17205
|
+
if (dynamicValidation.hasSuspenseAboveBody) {
|
|
17206
|
+
// This route has opted into allowing fully dynamic rendering
|
|
17207
|
+
// by including a Suspense boundary above the body. In this case
|
|
17208
|
+
// a lack of a shell is not considered disallowed so we simply return
|
|
17209
|
+
return;
|
|
16977
17210
|
}
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
enumerable: false,
|
|
16993
|
-
configurable: true
|
|
16994
|
-
});
|
|
16995
|
-
} else if (dynamicValidation.hasDynamicViewport) {
|
|
16996
|
-
if (syncError) {
|
|
16997
|
-
console.error(syncError);
|
|
16998
|
-
throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateViewport\` that could not finish rendering before ${syncExpression} was used. Follow the instructions in the error for this expression to resolve.`), "__NEXT_ERROR_CODE", {
|
|
16999
|
-
value: "E573",
|
|
17000
|
-
enumerable: false,
|
|
17001
|
-
configurable: true
|
|
17002
|
-
});
|
|
17211
|
+
if (serverDynamic.syncDynamicErrorWithStack) {
|
|
17212
|
+
// There is no shell and the server did something sync dynamic likely
|
|
17213
|
+
// leading to an early termination of the prerender before the shell
|
|
17214
|
+
// could be completed. We terminate the build/validating render.
|
|
17215
|
+
logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);
|
|
17216
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17217
|
+
}
|
|
17218
|
+
// We didn't have any sync bailouts but there may be user code which
|
|
17219
|
+
// blocked the root. We would have captured these during the prerender
|
|
17220
|
+
// and can log them here and then terminate the build/validating render
|
|
17221
|
+
const dynamicErrors = dynamicValidation.dynamicErrors;
|
|
17222
|
+
if (dynamicErrors.length > 0) {
|
|
17223
|
+
for(let i = 0; i < dynamicErrors.length; i++){
|
|
17224
|
+
logDisallowedDynamicError(workStore, dynamicErrors[i]);
|
|
17003
17225
|
}
|
|
17004
|
-
throw
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17226
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17227
|
+
}
|
|
17228
|
+
// If we got this far then the only other thing that could be blocking
|
|
17229
|
+
// the root is dynamic Viewport. If this is dynamic then
|
|
17230
|
+
// you need to opt into that by adding a Suspense boundary above the body
|
|
17231
|
+
// to indicate your are ok with fully dynamic rendering.
|
|
17232
|
+
if (dynamicValidation.hasDynamicViewport) {
|
|
17233
|
+
console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`);
|
|
17234
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17235
|
+
}
|
|
17236
|
+
if (prelude === 1) {
|
|
17237
|
+
// If we ever get this far then we messed up the tracking of invalid dynamic.
|
|
17238
|
+
// We still adhere to the constraint that you must produce a shell but invite the
|
|
17239
|
+
// user to report this as a bug in Next.js.
|
|
17240
|
+
console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`);
|
|
17241
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17009
17242
|
}
|
|
17243
|
+
} else {
|
|
17244
|
+
if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {
|
|
17245
|
+
console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`);
|
|
17246
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17247
|
+
}
|
|
17248
|
+
}
|
|
17249
|
+
}
|
|
17250
|
+
function delayUntilRuntimeStage(prerenderStore, result) {
|
|
17251
|
+
if (prerenderStore.runtimeStagePromise) {
|
|
17252
|
+
return prerenderStore.runtimeStagePromise.then(()=>result);
|
|
17010
17253
|
}
|
|
17254
|
+
return result;
|
|
17011
17255
|
}
|
|
17012
17256
|
|
|
17013
17257
|
|
|
@@ -17170,6 +17414,9 @@ function requireNavigation_reactServer () {
|
|
|
17170
17414
|
unauthorized: function() {
|
|
17171
17415
|
return _unauthorized.unauthorized;
|
|
17172
17416
|
},
|
|
17417
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17418
|
+
return unstable_isUnrecognizedActionError;
|
|
17419
|
+
},
|
|
17173
17420
|
unstable_rethrow: function() {
|
|
17174
17421
|
return _unstablerethrow.unstable_rethrow;
|
|
17175
17422
|
}
|
|
@@ -17199,6 +17446,13 @@ function requireNavigation_reactServer () {
|
|
|
17199
17446
|
throw new ReadonlyURLSearchParamsError();
|
|
17200
17447
|
}
|
|
17201
17448
|
}
|
|
17449
|
+
function unstable_isUnrecognizedActionError() {
|
|
17450
|
+
throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", {
|
|
17451
|
+
value: "E776",
|
|
17452
|
+
enumerable: false,
|
|
17453
|
+
configurable: true
|
|
17454
|
+
});
|
|
17455
|
+
}
|
|
17202
17456
|
|
|
17203
17457
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
17204
17458
|
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
@@ -17300,6 +17554,52 @@ function requireServerInsertedHtml_sharedRuntime () {
|
|
|
17300
17554
|
return serverInsertedHtml_sharedRuntime;
|
|
17301
17555
|
}
|
|
17302
17556
|
|
|
17557
|
+
var unrecognizedActionError = {exports: {}};
|
|
17558
|
+
|
|
17559
|
+
var hasRequiredUnrecognizedActionError;
|
|
17560
|
+
|
|
17561
|
+
function requireUnrecognizedActionError () {
|
|
17562
|
+
if (hasRequiredUnrecognizedActionError) return unrecognizedActionError.exports;
|
|
17563
|
+
hasRequiredUnrecognizedActionError = 1;
|
|
17564
|
+
(function (module, exports$1) {
|
|
17565
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
17566
|
+
value: true
|
|
17567
|
+
});
|
|
17568
|
+
function _export(target, all) {
|
|
17569
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
17570
|
+
enumerable: true,
|
|
17571
|
+
get: all[name]
|
|
17572
|
+
});
|
|
17573
|
+
}
|
|
17574
|
+
_export(exports$1, {
|
|
17575
|
+
UnrecognizedActionError: function() {
|
|
17576
|
+
return UnrecognizedActionError;
|
|
17577
|
+
},
|
|
17578
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17579
|
+
return unstable_isUnrecognizedActionError;
|
|
17580
|
+
}
|
|
17581
|
+
});
|
|
17582
|
+
class UnrecognizedActionError extends Error {
|
|
17583
|
+
constructor(...args){
|
|
17584
|
+
super(...args);
|
|
17585
|
+
this.name = 'UnrecognizedActionError';
|
|
17586
|
+
}
|
|
17587
|
+
}
|
|
17588
|
+
function unstable_isUnrecognizedActionError(error) {
|
|
17589
|
+
return !!(error && typeof error === 'object' && error instanceof UnrecognizedActionError);
|
|
17590
|
+
}
|
|
17591
|
+
|
|
17592
|
+
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
17593
|
+
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
17594
|
+
Object.assign(exports$1.default, exports$1);
|
|
17595
|
+
module.exports = exports$1.default;
|
|
17596
|
+
}
|
|
17597
|
+
|
|
17598
|
+
|
|
17599
|
+
} (unrecognizedActionError, unrecognizedActionError.exports));
|
|
17600
|
+
return unrecognizedActionError.exports;
|
|
17601
|
+
}
|
|
17602
|
+
|
|
17303
17603
|
var bailoutToClientRendering = {exports: {}};
|
|
17304
17604
|
|
|
17305
17605
|
var hasRequiredBailoutToClientRendering;
|
|
@@ -17319,14 +17619,25 @@ function requireBailoutToClientRendering () {
|
|
|
17319
17619
|
});
|
|
17320
17620
|
const _bailouttocsr = requireBailoutToCsr();
|
|
17321
17621
|
const _workasyncstorageexternal = requireWorkAsyncStorage_external();
|
|
17622
|
+
const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
|
|
17322
17623
|
function bailoutToClientRendering(reason) {
|
|
17323
17624
|
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
17324
17625
|
if (workStore == null ? void 0 : workStore.forceStatic) return;
|
|
17325
|
-
|
|
17326
|
-
|
|
17327
|
-
|
|
17328
|
-
|
|
17329
|
-
|
|
17626
|
+
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
17627
|
+
if (workUnitStore) {
|
|
17628
|
+
switch(workUnitStore.type){
|
|
17629
|
+
case 'prerender':
|
|
17630
|
+
case 'prerender-runtime':
|
|
17631
|
+
case 'prerender-client':
|
|
17632
|
+
case 'prerender-ppr':
|
|
17633
|
+
case 'prerender-legacy':
|
|
17634
|
+
throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
|
|
17635
|
+
value: "E394",
|
|
17636
|
+
enumerable: false,
|
|
17637
|
+
configurable: true
|
|
17638
|
+
});
|
|
17639
|
+
}
|
|
17640
|
+
}
|
|
17330
17641
|
}
|
|
17331
17642
|
|
|
17332
17643
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
@@ -17380,6 +17691,9 @@ function requireNavigation$1 () {
|
|
|
17380
17691
|
unauthorized: function() {
|
|
17381
17692
|
return _navigationreactserver.unauthorized;
|
|
17382
17693
|
},
|
|
17694
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17695
|
+
return _unrecognizedactionerror.unstable_isUnrecognizedActionError;
|
|
17696
|
+
},
|
|
17383
17697
|
unstable_rethrow: function() {
|
|
17384
17698
|
return _navigationreactserver.unstable_rethrow;
|
|
17385
17699
|
},
|
|
@@ -17412,6 +17726,7 @@ function requireNavigation$1 () {
|
|
|
17412
17726
|
const _segment = requireSegment();
|
|
17413
17727
|
const _navigationreactserver = requireNavigation_reactServer();
|
|
17414
17728
|
const _serverinsertedhtmlsharedruntime = requireServerInsertedHtml_sharedRuntime();
|
|
17729
|
+
const _unrecognizedactionerror = requireUnrecognizedActionError();
|
|
17415
17730
|
const useDynamicRouteParams = typeof window === 'undefined' ? requireDynamicRendering().useDynamicRouteParams : undefined;
|
|
17416
17731
|
function useSearchParams() {
|
|
17417
17732
|
const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext);
|