diff --git a/Frontend-Learner/.nuxt/app.config.mjs b/Frontend-Learner/.nuxt/app.config.mjs deleted file mode 100644 index fc95a313..00000000 --- a/Frontend-Learner/.nuxt/app.config.mjs +++ /dev/null @@ -1,18 +0,0 @@ - -import { _replaceAppConfig } from '#app/config' -import { defuFn } from 'defu' - -const inlineConfig = { - "nuxt": {} -} - -// Vite - webpack is handled directly in #app/config -if (import.meta.hot) { - import.meta.hot.accept((newModule) => { - _replaceAppConfig(newModule.default) - }) -} - - - -export default /*@__PURE__*/ defuFn(inlineConfig) diff --git a/Frontend-Learner/.nuxt/components.d.ts b/Frontend-Learner/.nuxt/components.d.ts deleted file mode 100644 index c0fccc52..00000000 --- a/Frontend-Learner/.nuxt/components.d.ts +++ /dev/null @@ -1,334 +0,0 @@ - -import type { DefineComponent, SlotsType } from 'vue' -type IslandComponent = DefineComponent<{}, {refresh: () => Promise}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, SlotsType<{ fallback: { error: unknown } }>> & T - -type HydrationStrategies = { - hydrateOnVisible?: IntersectionObserverInit | true - hydrateOnIdle?: number | true - hydrateOnInteraction?: keyof HTMLElementEventMap | Array | true - hydrateOnMediaQuery?: string - hydrateAfter?: number - hydrateWhen?: boolean - hydrateNever?: true -} -type LazyComponent = DefineComponent void }> & T - - -export const AppHeader: typeof import("../components/common/AppHeader.vue").default -export const AppSidebar: typeof import("../components/common/AppSidebar.vue").default -export const FormInput: typeof import("../components/common/FormInput.vue").default -export const GlobalLoader: typeof import("../components/common/GlobalLoader.vue").default -export const LandingFooter: typeof import("../components/common/LandingFooter.vue").default -export const LandingHeader: typeof import("../components/common/LandingHeader.vue").default -export const LoadingSkeleton: typeof import("../components/common/LoadingSkeleton.vue").default -export const LoadingSpinner: typeof import("../components/common/LoadingSpinner.vue").default -export const MobileNav: typeof import("../components/common/MobileNav.vue").default -export const CourseCard: typeof import("../components/course/CourseCard.vue").default -export const UserAvatar: typeof import("../components/user/UserAvatar.vue").default -export const UserMenu: typeof import("../components/user/UserMenu.vue").default -export const NuxtWelcome: typeof import("../node_modules/nuxt/dist/app/components/welcome.vue").default -export const NuxtLayout: typeof import("../node_modules/nuxt/dist/app/components/nuxt-layout").default -export const NuxtErrorBoundary: typeof import("../node_modules/nuxt/dist/app/components/nuxt-error-boundary.vue").default -export const ClientOnly: typeof import("../node_modules/nuxt/dist/app/components/client-only").default -export const DevOnly: typeof import("../node_modules/nuxt/dist/app/components/dev-only").default -export const ServerPlaceholder: typeof import("../node_modules/nuxt/dist/app/components/server-placeholder").default -export const NuxtLink: typeof import("../node_modules/nuxt/dist/app/components/nuxt-link").default -export const NuxtLoadingIndicator: typeof import("../node_modules/nuxt/dist/app/components/nuxt-loading-indicator").default -export const NuxtTime: typeof import("../node_modules/nuxt/dist/app/components/nuxt-time.vue").default -export const NuxtRouteAnnouncer: typeof import("../node_modules/nuxt/dist/app/components/nuxt-route-announcer").default -export const NuxtImg: typeof import("../node_modules/nuxt/dist/app/components/nuxt-stubs").NuxtImg -export const NuxtPicture: typeof import("../node_modules/nuxt/dist/app/components/nuxt-stubs").NuxtPicture -export const QAjaxBar: typeof import("quasar").QAjaxBar -export const QAvatar: typeof import("quasar").QAvatar -export const QBadge: typeof import("quasar").QBadge -export const QBanner: typeof import("quasar").QBanner -export const QBar: typeof import("quasar").QBar -export const QBreadcrumbs: typeof import("quasar").QBreadcrumbs -export const QBreadcrumbsEl: typeof import("quasar").QBreadcrumbsEl -export const QBtn: typeof import("quasar").QBtn -export const QBtnDropdown: typeof import("quasar").QBtnDropdown -export const QBtnGroup: typeof import("quasar").QBtnGroup -export const QBtnToggle: typeof import("quasar").QBtnToggle -export const QCard: typeof import("quasar").QCard -export const QCardActions: typeof import("quasar").QCardActions -export const QCardSection: typeof import("quasar").QCardSection -export const QCarousel: typeof import("quasar").QCarousel -export const QCarouselControl: typeof import("quasar").QCarouselControl -export const QCarouselSlide: typeof import("quasar").QCarouselSlide -export const QChatMessage: typeof import("quasar").QChatMessage -export const QCheckbox: typeof import("quasar").QCheckbox -export const QChip: typeof import("quasar").QChip -export const QCircularProgress: typeof import("quasar").QCircularProgress -export const QColor: typeof import("quasar").QColor -export const QDate: typeof import("quasar").QDate -export const QDialog: typeof import("quasar").QDialog -export const QDrawer: typeof import("quasar").QDrawer -export const QEditor: typeof import("quasar").QEditor -export const QExpansionItem: typeof import("quasar").QExpansionItem -export const QFab: typeof import("quasar").QFab -export const QFabAction: typeof import("quasar").QFabAction -export const QField: typeof import("quasar").QField -export const QFile: typeof import("quasar").QFile -export const QFooter: typeof import("quasar").QFooter -export const QForm: typeof import("quasar").QForm -export const QFormChildMixin: typeof import("quasar").QFormChildMixin -export const QHeader: typeof import("quasar").QHeader -export const QIcon: typeof import("quasar").QIcon -export const QImg: typeof import("quasar").QImg -export const QInfiniteScroll: typeof import("quasar").QInfiniteScroll -export const QInnerLoading: typeof import("quasar").QInnerLoading -export const QInput: typeof import("quasar").QInput -export const QIntersection: typeof import("quasar").QIntersection -export const QItem: typeof import("quasar").QItem -export const QItemLabel: typeof import("quasar").QItemLabel -export const QItemSection: typeof import("quasar").QItemSection -export const QList: typeof import("quasar").QList -export const QKnob: typeof import("quasar").QKnob -export const QLayout: typeof import("quasar").QLayout -export const QLinearProgress: typeof import("quasar").QLinearProgress -export const QMarkupTable: typeof import("quasar").QMarkupTable -export const QMenu: typeof import("quasar").QMenu -export const QNoSsr: typeof import("quasar").QNoSsr -export const QOptionGroup: typeof import("quasar").QOptionGroup -export const QPage: typeof import("quasar").QPage -export const QPageContainer: typeof import("quasar").QPageContainer -export const QPageScroller: typeof import("quasar").QPageScroller -export const QPageSticky: typeof import("quasar").QPageSticky -export const QPagination: typeof import("quasar").QPagination -export const QParallax: typeof import("quasar").QParallax -export const QPopupEdit: typeof import("quasar").QPopupEdit -export const QPopupProxy: typeof import("quasar").QPopupProxy -export const QPullToRefresh: typeof import("quasar").QPullToRefresh -export const QRadio: typeof import("quasar").QRadio -export const QRange: typeof import("quasar").QRange -export const QRating: typeof import("quasar").QRating -export const QResizeObserver: typeof import("quasar").QResizeObserver -export const QResponsive: typeof import("quasar").QResponsive -export const QScrollArea: typeof import("quasar").QScrollArea -export const QScrollObserver: typeof import("quasar").QScrollObserver -export const QSelect: typeof import("quasar").QSelect -export const QSeparator: typeof import("quasar").QSeparator -export const QSkeleton: typeof import("quasar").QSkeleton -export const QSlideItem: typeof import("quasar").QSlideItem -export const QSlideTransition: typeof import("quasar").QSlideTransition -export const QSlider: typeof import("quasar").QSlider -export const QSpace: typeof import("quasar").QSpace -export const QSpinner: typeof import("quasar").QSpinner -export const QSpinnerAudio: typeof import("quasar").QSpinnerAudio -export const QSpinnerBall: typeof import("quasar").QSpinnerBall -export const QSpinnerBars: typeof import("quasar").QSpinnerBars -export const QSpinnerBox: typeof import("quasar").QSpinnerBox -export const QSpinnerClock: typeof import("quasar").QSpinnerClock -export const QSpinnerComment: typeof import("quasar").QSpinnerComment -export const QSpinnerCube: typeof import("quasar").QSpinnerCube -export const QSpinnerDots: typeof import("quasar").QSpinnerDots -export const QSpinnerFacebook: typeof import("quasar").QSpinnerFacebook -export const QSpinnerGears: typeof import("quasar").QSpinnerGears -export const QSpinnerGrid: typeof import("quasar").QSpinnerGrid -export const QSpinnerHearts: typeof import("quasar").QSpinnerHearts -export const QSpinnerHourglass: typeof import("quasar").QSpinnerHourglass -export const QSpinnerInfinity: typeof import("quasar").QSpinnerInfinity -export const QSpinnerIos: typeof import("quasar").QSpinnerIos -export const QSpinnerOrbit: typeof import("quasar").QSpinnerOrbit -export const QSpinnerOval: typeof import("quasar").QSpinnerOval -export const QSpinnerPie: typeof import("quasar").QSpinnerPie -export const QSpinnerPuff: typeof import("quasar").QSpinnerPuff -export const QSpinnerRadio: typeof import("quasar").QSpinnerRadio -export const QSpinnerRings: typeof import("quasar").QSpinnerRings -export const QSpinnerTail: typeof import("quasar").QSpinnerTail -export const QSplitter: typeof import("quasar").QSplitter -export const QStep: typeof import("quasar").QStep -export const QStepper: typeof import("quasar").QStepper -export const QStepperNavigation: typeof import("quasar").QStepperNavigation -export const QTabPanel: typeof import("quasar").QTabPanel -export const QTabPanels: typeof import("quasar").QTabPanels -export const QTable: typeof import("quasar").QTable -export const QTd: typeof import("quasar").QTd -export const QTh: typeof import("quasar").QTh -export const QTr: typeof import("quasar").QTr -export const QRouteTab: typeof import("quasar").QRouteTab -export const QTab: typeof import("quasar").QTab -export const QTabs: typeof import("quasar").QTabs -export const QTime: typeof import("quasar").QTime -export const QTimeline: typeof import("quasar").QTimeline -export const QTimelineEntry: typeof import("quasar").QTimelineEntry -export const QToggle: typeof import("quasar").QToggle -export const QToolbar: typeof import("quasar").QToolbar -export const QToolbarTitle: typeof import("quasar").QToolbarTitle -export const QTooltip: typeof import("quasar").QTooltip -export const QTree: typeof import("quasar").QTree -export const QUploader: typeof import("quasar").QUploader -export const QUploaderAddTrigger: typeof import("quasar").QUploaderAddTrigger -export const QVideo: typeof import("quasar").QVideo -export const QVirtualScroll: typeof import("quasar").QVirtualScroll -export const NuxtPage: typeof import("../node_modules/nuxt/dist/pages/runtime/page").default -export const NoScript: typeof import("../node_modules/nuxt/dist/head/runtime/components").NoScript -export const Link: typeof import("../node_modules/nuxt/dist/head/runtime/components").Link -export const Base: typeof import("../node_modules/nuxt/dist/head/runtime/components").Base -export const Title: typeof import("../node_modules/nuxt/dist/head/runtime/components").Title -export const Meta: typeof import("../node_modules/nuxt/dist/head/runtime/components").Meta -export const Style: typeof import("../node_modules/nuxt/dist/head/runtime/components").Style -export const Head: typeof import("../node_modules/nuxt/dist/head/runtime/components").Head -export const Html: typeof import("../node_modules/nuxt/dist/head/runtime/components").Html -export const Body: typeof import("../node_modules/nuxt/dist/head/runtime/components").Body -export const NuxtIsland: typeof import("../node_modules/nuxt/dist/app/components/nuxt-island").default -export const LazyAppHeader: LazyComponent -export const LazyAppSidebar: LazyComponent -export const LazyFormInput: LazyComponent -export const LazyGlobalLoader: LazyComponent -export const LazyLandingFooter: LazyComponent -export const LazyLandingHeader: LazyComponent -export const LazyLoadingSkeleton: LazyComponent -export const LazyLoadingSpinner: LazyComponent -export const LazyMobileNav: LazyComponent -export const LazyCourseCard: LazyComponent -export const LazyUserAvatar: LazyComponent -export const LazyUserMenu: LazyComponent -export const LazyNuxtWelcome: LazyComponent -export const LazyNuxtLayout: LazyComponent -export const LazyNuxtErrorBoundary: LazyComponent -export const LazyClientOnly: LazyComponent -export const LazyDevOnly: LazyComponent -export const LazyServerPlaceholder: LazyComponent -export const LazyNuxtLink: LazyComponent -export const LazyNuxtLoadingIndicator: LazyComponent -export const LazyNuxtTime: LazyComponent -export const LazyNuxtRouteAnnouncer: LazyComponent -export const LazyNuxtImg: LazyComponent -export const LazyNuxtPicture: LazyComponent -export const LazyQAjaxBar: LazyComponent -export const LazyQAvatar: LazyComponent -export const LazyQBadge: LazyComponent -export const LazyQBanner: LazyComponent -export const LazyQBar: LazyComponent -export const LazyQBreadcrumbs: LazyComponent -export const LazyQBreadcrumbsEl: LazyComponent -export const LazyQBtn: LazyComponent -export const LazyQBtnDropdown: LazyComponent -export const LazyQBtnGroup: LazyComponent -export const LazyQBtnToggle: LazyComponent -export const LazyQCard: LazyComponent -export const LazyQCardActions: LazyComponent -export const LazyQCardSection: LazyComponent -export const LazyQCarousel: LazyComponent -export const LazyQCarouselControl: LazyComponent -export const LazyQCarouselSlide: LazyComponent -export const LazyQChatMessage: LazyComponent -export const LazyQCheckbox: LazyComponent -export const LazyQChip: LazyComponent -export const LazyQCircularProgress: LazyComponent -export const LazyQColor: LazyComponent -export const LazyQDate: LazyComponent -export const LazyQDialog: LazyComponent -export const LazyQDrawer: LazyComponent -export const LazyQEditor: LazyComponent -export const LazyQExpansionItem: LazyComponent -export const LazyQFab: LazyComponent -export const LazyQFabAction: LazyComponent -export const LazyQField: LazyComponent -export const LazyQFile: LazyComponent -export const LazyQFooter: LazyComponent -export const LazyQForm: LazyComponent -export const LazyQFormChildMixin: LazyComponent -export const LazyQHeader: LazyComponent -export const LazyQIcon: LazyComponent -export const LazyQImg: LazyComponent -export const LazyQInfiniteScroll: LazyComponent -export const LazyQInnerLoading: LazyComponent -export const LazyQInput: LazyComponent -export const LazyQIntersection: LazyComponent -export const LazyQItem: LazyComponent -export const LazyQItemLabel: LazyComponent -export const LazyQItemSection: LazyComponent -export const LazyQList: LazyComponent -export const LazyQKnob: LazyComponent -export const LazyQLayout: LazyComponent -export const LazyQLinearProgress: LazyComponent -export const LazyQMarkupTable: LazyComponent -export const LazyQMenu: LazyComponent -export const LazyQNoSsr: LazyComponent -export const LazyQOptionGroup: LazyComponent -export const LazyQPage: LazyComponent -export const LazyQPageContainer: LazyComponent -export const LazyQPageScroller: LazyComponent -export const LazyQPageSticky: LazyComponent -export const LazyQPagination: LazyComponent -export const LazyQParallax: LazyComponent -export const LazyQPopupEdit: LazyComponent -export const LazyQPopupProxy: LazyComponent -export const LazyQPullToRefresh: LazyComponent -export const LazyQRadio: LazyComponent -export const LazyQRange: LazyComponent -export const LazyQRating: LazyComponent -export const LazyQResizeObserver: LazyComponent -export const LazyQResponsive: LazyComponent -export const LazyQScrollArea: LazyComponent -export const LazyQScrollObserver: LazyComponent -export const LazyQSelect: LazyComponent -export const LazyQSeparator: LazyComponent -export const LazyQSkeleton: LazyComponent -export const LazyQSlideItem: LazyComponent -export const LazyQSlideTransition: LazyComponent -export const LazyQSlider: LazyComponent -export const LazyQSpace: LazyComponent -export const LazyQSpinner: LazyComponent -export const LazyQSpinnerAudio: LazyComponent -export const LazyQSpinnerBall: LazyComponent -export const LazyQSpinnerBars: LazyComponent -export const LazyQSpinnerBox: LazyComponent -export const LazyQSpinnerClock: LazyComponent -export const LazyQSpinnerComment: LazyComponent -export const LazyQSpinnerCube: LazyComponent -export const LazyQSpinnerDots: LazyComponent -export const LazyQSpinnerFacebook: LazyComponent -export const LazyQSpinnerGears: LazyComponent -export const LazyQSpinnerGrid: LazyComponent -export const LazyQSpinnerHearts: LazyComponent -export const LazyQSpinnerHourglass: LazyComponent -export const LazyQSpinnerInfinity: LazyComponent -export const LazyQSpinnerIos: LazyComponent -export const LazyQSpinnerOrbit: LazyComponent -export const LazyQSpinnerOval: LazyComponent -export const LazyQSpinnerPie: LazyComponent -export const LazyQSpinnerPuff: LazyComponent -export const LazyQSpinnerRadio: LazyComponent -export const LazyQSpinnerRings: LazyComponent -export const LazyQSpinnerTail: LazyComponent -export const LazyQSplitter: LazyComponent -export const LazyQStep: LazyComponent -export const LazyQStepper: LazyComponent -export const LazyQStepperNavigation: LazyComponent -export const LazyQTabPanel: LazyComponent -export const LazyQTabPanels: LazyComponent -export const LazyQTable: LazyComponent -export const LazyQTd: LazyComponent -export const LazyQTh: LazyComponent -export const LazyQTr: LazyComponent -export const LazyQRouteTab: LazyComponent -export const LazyQTab: LazyComponent -export const LazyQTabs: LazyComponent -export const LazyQTime: LazyComponent -export const LazyQTimeline: LazyComponent -export const LazyQTimelineEntry: LazyComponent -export const LazyQToggle: LazyComponent -export const LazyQToolbar: LazyComponent -export const LazyQToolbarTitle: LazyComponent -export const LazyQTooltip: LazyComponent -export const LazyQTree: LazyComponent -export const LazyQUploader: LazyComponent -export const LazyQUploaderAddTrigger: LazyComponent -export const LazyQVideo: LazyComponent -export const LazyQVirtualScroll: LazyComponent -export const LazyNuxtPage: LazyComponent -export const LazyNoScript: LazyComponent -export const LazyLink: LazyComponent -export const LazyBase: LazyComponent -export const LazyTitle: LazyComponent -export const LazyMeta: LazyComponent -export const LazyStyle: LazyComponent -export const LazyHead: LazyComponent -export const LazyHtml: LazyComponent -export const LazyBody: LazyComponent -export const LazyNuxtIsland: LazyComponent - -export const componentNames: string[] diff --git a/Frontend-Learner/.nuxt/dev/index.mjs b/Frontend-Learner/.nuxt/dev/index.mjs deleted file mode 100644 index 2a30f93c..00000000 --- a/Frontend-Learner/.nuxt/dev/index.mjs +++ /dev/null @@ -1,2412 +0,0 @@ -import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import { tmpdir } from 'node:os'; -import { Server } from 'node:http'; -import { resolve, dirname, join } from 'node:path'; -import nodeCrypto from 'node:crypto'; -import { parentPort, threadId } from 'node:worker_threads'; -import { defineEventHandler, handleCacheHeaders, splitCookiesString, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, getRequestHeader, setResponseHeaders, setResponseStatus, send, getRequestHeaders, setResponseHeader, appendResponseHeader, getRequestURL, getResponseHeader, removeResponseHeader, createError, getRequestPath, getQuery as getQuery$1, readBody, createApp, createRouter as createRouter$1, toNodeListener, lazyEventHandler, getResponseStatus, getRouterParam, getResponseStatusText } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/h3/dist/index.mjs'; -import { escapeHtml } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/@vue/shared/dist/shared.cjs.js'; -import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/vue-bundle-renderer/dist/runtime.mjs'; -import { parseURL, withoutBase, joinURL, getQuery, withQuery, withTrailingSlash, decodePath, withLeadingSlash, withoutTrailingSlash, joinRelativeURL } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/ufo/dist/index.mjs'; -import process$1 from 'node:process'; -import { renderToString } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/vue/server-renderer/index.mjs'; -import { klona } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/klona/dist/index.mjs'; -import defu, { defuFn } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/defu/dist/defu.mjs'; -import destr, { destr as destr$1 } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/destr/dist/index.mjs'; -import { snakeCase } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/scule/dist/index.mjs'; -import { createHead as createHead$1, propsToString, renderSSRHead } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unhead/dist/server.mjs'; -import { stringify, uneval } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/devalue/index.js'; -import { isVNode, toValue, isRef } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/vue/index.mjs'; -import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unhead/dist/plugins.mjs'; -import { createHooks } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/hookable/dist/index.mjs'; -import { createFetch, Headers as Headers$1 } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/ofetch/dist/node.mjs'; -import { fetchNodeRequestHandler, callNodeRequestHandler } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/node-mock-http/dist/index.mjs'; -import { createStorage, prefixStorage } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unstorage/dist/index.mjs'; -import unstorage_47drivers_47fs from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unstorage/drivers/fs.mjs'; -import { digest } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/ohash/dist/index.mjs'; -import { toRouteMatcher, createRouter } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/radix3/dist/index.mjs'; -import { readFile } from 'node:fs/promises'; -import consola, { consola as consola$1 } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/consola/dist/index.mjs'; -import { ErrorParser } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/youch-core/build/index.js'; -import { Youch } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/youch/build/index.js'; -import { SourceMapConsumer } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/source-map/source-map.js'; -import { AsyncLocalStorage } from 'node:async_hooks'; -import { getContext } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unctx/dist/index.mjs'; -import { captureRawStackTrace, parseRawStackTrace } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/errx/dist/index.js'; -import { promises } from 'node:fs'; -import { fileURLToPath } from 'node:url'; -import { dirname as dirname$1, resolve as resolve$1 } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/pathe/dist/index.mjs'; -import { walkResolver } from 'file://C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/node_modules/unhead/dist/utils.mjs'; - -const serverAssets = [{"baseName":"server","dir":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/server/assets"}]; - -const assets$1 = createStorage(); - -for (const asset of serverAssets) { - assets$1.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) })); -} - -const storage = createStorage({}); - -storage.mount('/assets', assets$1); - -storage.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner","watchOptions":{"ignored":[null]}})); -storage.mount('src', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/server","watchOptions":{"ignored":[null]}})); -storage.mount('build', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/.nuxt"})); -storage.mount('cache', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/.nuxt/cache"})); -storage.mount('data', unstorage_47drivers_47fs({"driver":"fs","base":"C:/Users/Boybo/OneDrive/Desktop/e-learning/Frontend-Learner/.data/kv"})); - -function useStorage(base = "") { - return base ? prefixStorage(storage, base) : storage; -} - -const Hasher = /* @__PURE__ */ (() => { - class Hasher2 { - buff = ""; - #context = /* @__PURE__ */ new Map(); - write(str) { - this.buff += str; - } - dispatch(value) { - const type = value === null ? "null" : typeof value; - return this[type](value); - } - object(object) { - if (object && typeof object.toJSON === "function") { - return this.object(object.toJSON()); - } - const objString = Object.prototype.toString.call(object); - let objType = ""; - const objectLength = objString.length; - objType = objectLength < 10 ? "unknown:[" + objString + "]" : objString.slice(8, objectLength - 1); - objType = objType.toLowerCase(); - let objectNumber = null; - if ((objectNumber = this.#context.get(object)) === void 0) { - this.#context.set(object, this.#context.size); - } else { - return this.dispatch("[CIRCULAR:" + objectNumber + "]"); - } - if (typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(object)) { - this.write("buffer:"); - return this.write(object.toString("utf8")); - } - if (objType !== "object" && objType !== "function" && objType !== "asyncfunction") { - if (this[objType]) { - this[objType](object); - } else { - this.unknown(object, objType); - } - } else { - const keys = Object.keys(object).sort(); - const extraKeys = []; - this.write("object:" + (keys.length + extraKeys.length) + ":"); - const dispatchForKey = (key) => { - this.dispatch(key); - this.write(":"); - this.dispatch(object[key]); - this.write(","); - }; - for (const key of keys) { - dispatchForKey(key); - } - for (const key of extraKeys) { - dispatchForKey(key); - } - } - } - array(arr, unordered) { - unordered = unordered === void 0 ? false : unordered; - this.write("array:" + arr.length + ":"); - if (!unordered || arr.length <= 1) { - for (const entry of arr) { - this.dispatch(entry); - } - return; - } - const contextAdditions = /* @__PURE__ */ new Map(); - const entries = arr.map((entry) => { - const hasher = new Hasher2(); - hasher.dispatch(entry); - for (const [key, value] of hasher.#context) { - contextAdditions.set(key, value); - } - return hasher.toString(); - }); - this.#context = contextAdditions; - entries.sort(); - return this.array(entries, false); - } - date(date) { - return this.write("date:" + date.toJSON()); - } - symbol(sym) { - return this.write("symbol:" + sym.toString()); - } - unknown(value, type) { - this.write(type); - if (!value) { - return; - } - this.write(":"); - if (value && typeof value.entries === "function") { - return this.array( - [...value.entries()], - true - /* ordered */ - ); - } - } - error(err) { - return this.write("error:" + err.toString()); - } - boolean(bool) { - return this.write("bool:" + bool); - } - string(string) { - this.write("string:" + string.length + ":"); - this.write(string); - } - function(fn) { - this.write("fn:"); - if (isNativeFunction(fn)) { - this.dispatch("[native]"); - } else { - this.dispatch(fn.toString()); - } - } - number(number) { - return this.write("number:" + number); - } - null() { - return this.write("Null"); - } - undefined() { - return this.write("Undefined"); - } - regexp(regex) { - return this.write("regex:" + regex.toString()); - } - arraybuffer(arr) { - this.write("arraybuffer:"); - return this.dispatch(new Uint8Array(arr)); - } - url(url) { - return this.write("url:" + url.toString()); - } - map(map) { - this.write("map:"); - const arr = [...map]; - return this.array(arr, false); - } - set(set) { - this.write("set:"); - const arr = [...set]; - return this.array(arr, false); - } - bigint(number) { - return this.write("bigint:" + number.toString()); - } - } - for (const type of [ - "uint8array", - "uint8clampedarray", - "unt8array", - "uint16array", - "unt16array", - "uint32array", - "unt32array", - "float32array", - "float64array" - ]) { - Hasher2.prototype[type] = function(arr) { - this.write(type + ":"); - return this.array([...arr], false); - }; - } - function isNativeFunction(f) { - if (typeof f !== "function") { - return false; - } - return Function.prototype.toString.call(f).slice( - -15 - /* "[native code] }".length */ - ) === "[native code] }"; - } - return Hasher2; -})(); -function serialize(object) { - const hasher = new Hasher(); - hasher.dispatch(object); - return hasher.buff; -} -function hash(value) { - return digest(typeof value === "string" ? value : serialize(value)).replace(/[-_]/g, "").slice(0, 10); -} - -function defaultCacheOptions() { - return { - name: "_", - base: "/cache", - swr: true, - maxAge: 1 - }; -} -function defineCachedFunction(fn, opts = {}) { - opts = { ...defaultCacheOptions(), ...opts }; - const pending = {}; - const group = opts.group || "nitro/functions"; - const name = opts.name || fn.name || "_"; - const integrity = opts.integrity || hash([fn, opts]); - const validate = opts.validate || ((entry) => entry.value !== void 0); - async function get(key, resolver, shouldInvalidateCache, event) { - const cacheKey = [opts.base, group, name, key + ".json"].filter(Boolean).join(":").replace(/:\/$/, ":index"); - let entry = await useStorage().getItem(cacheKey).catch((error) => { - console.error(`[cache] Cache read error.`, error); - useNitroApp().captureError(error, { event, tags: ["cache"] }); - }) || {}; - if (typeof entry !== "object") { - entry = {}; - const error = new Error("Malformed data read from cache."); - console.error("[cache]", error); - useNitroApp().captureError(error, { event, tags: ["cache"] }); - } - const ttl = (opts.maxAge ?? 0) * 1e3; - if (ttl) { - entry.expires = Date.now() + ttl; - } - const expired = shouldInvalidateCache || entry.integrity !== integrity || ttl && Date.now() - (entry.mtime || 0) > ttl || validate(entry) === false; - const _resolve = async () => { - const isPending = pending[key]; - if (!isPending) { - if (entry.value !== void 0 && (opts.staleMaxAge || 0) >= 0 && opts.swr === false) { - entry.value = void 0; - entry.integrity = void 0; - entry.mtime = void 0; - entry.expires = void 0; - } - pending[key] = Promise.resolve(resolver()); - } - try { - entry.value = await pending[key]; - } catch (error) { - if (!isPending) { - delete pending[key]; - } - throw error; - } - if (!isPending) { - entry.mtime = Date.now(); - entry.integrity = integrity; - delete pending[key]; - if (validate(entry) !== false) { - let setOpts; - if (opts.maxAge && !opts.swr) { - setOpts = { ttl: opts.maxAge }; - } - const promise = useStorage().setItem(cacheKey, entry, setOpts).catch((error) => { - console.error(`[cache] Cache write error.`, error); - useNitroApp().captureError(error, { event, tags: ["cache"] }); - }); - if (event?.waitUntil) { - event.waitUntil(promise); - } - } - } - }; - const _resolvePromise = expired ? _resolve() : Promise.resolve(); - if (entry.value === void 0) { - await _resolvePromise; - } else if (expired && event && event.waitUntil) { - event.waitUntil(_resolvePromise); - } - if (opts.swr && validate(entry) !== false) { - _resolvePromise.catch((error) => { - console.error(`[cache] SWR handler error.`, error); - useNitroApp().captureError(error, { event, tags: ["cache"] }); - }); - return entry; - } - return _resolvePromise.then(() => entry); - } - return async (...args) => { - const shouldBypassCache = await opts.shouldBypassCache?.(...args); - if (shouldBypassCache) { - return fn(...args); - } - const key = await (opts.getKey || getKey)(...args); - const shouldInvalidateCache = await opts.shouldInvalidateCache?.(...args); - const entry = await get( - key, - () => fn(...args), - shouldInvalidateCache, - args[0] && isEvent(args[0]) ? args[0] : void 0 - ); - let value = entry.value; - if (opts.transform) { - value = await opts.transform(entry, ...args) || value; - } - return value; - }; -} -function cachedFunction(fn, opts = {}) { - return defineCachedFunction(fn, opts); -} -function getKey(...args) { - return args.length > 0 ? hash(args) : ""; -} -function escapeKey(key) { - return String(key).replace(/\W/g, ""); -} -function defineCachedEventHandler(handler, opts = defaultCacheOptions()) { - const variableHeaderNames = (opts.varies || []).filter(Boolean).map((h) => h.toLowerCase()).sort(); - const _opts = { - ...opts, - getKey: async (event) => { - const customKey = await opts.getKey?.(event); - if (customKey) { - return escapeKey(customKey); - } - const _path = event.node.req.originalUrl || event.node.req.url || event.path; - let _pathname; - try { - _pathname = escapeKey(decodeURI(parseURL(_path).pathname)).slice(0, 16) || "index"; - } catch { - _pathname = "-"; - } - const _hashedPath = `${_pathname}.${hash(_path)}`; - const _headers = variableHeaderNames.map((header) => [header, event.node.req.headers[header]]).map(([name, value]) => `${escapeKey(name)}.${hash(value)}`); - return [_hashedPath, ..._headers].join(":"); - }, - validate: (entry) => { - if (!entry.value) { - return false; - } - if (entry.value.code >= 400) { - return false; - } - if (entry.value.body === void 0) { - return false; - } - if (entry.value.headers.etag === "undefined" || entry.value.headers["last-modified"] === "undefined") { - return false; - } - return true; - }, - group: opts.group || "nitro/handlers", - integrity: opts.integrity || hash([handler, opts]) - }; - const _cachedHandler = cachedFunction( - async (incomingEvent) => { - const variableHeaders = {}; - for (const header of variableHeaderNames) { - const value = incomingEvent.node.req.headers[header]; - if (value !== void 0) { - variableHeaders[header] = value; - } - } - const reqProxy = cloneWithProxy(incomingEvent.node.req, { - headers: variableHeaders - }); - const resHeaders = {}; - let _resSendBody; - const resProxy = cloneWithProxy(incomingEvent.node.res, { - statusCode: 200, - writableEnded: false, - writableFinished: false, - headersSent: false, - closed: false, - getHeader(name) { - return resHeaders[name]; - }, - setHeader(name, value) { - resHeaders[name] = value; - return this; - }, - getHeaderNames() { - return Object.keys(resHeaders); - }, - hasHeader(name) { - return name in resHeaders; - }, - removeHeader(name) { - delete resHeaders[name]; - }, - getHeaders() { - return resHeaders; - }, - end(chunk, arg2, arg3) { - if (typeof chunk === "string") { - _resSendBody = chunk; - } - if (typeof arg2 === "function") { - arg2(); - } - if (typeof arg3 === "function") { - arg3(); - } - return this; - }, - write(chunk, arg2, arg3) { - if (typeof chunk === "string") { - _resSendBody = chunk; - } - if (typeof arg2 === "function") { - arg2(void 0); - } - if (typeof arg3 === "function") { - arg3(); - } - return true; - }, - writeHead(statusCode, headers2) { - this.statusCode = statusCode; - if (headers2) { - if (Array.isArray(headers2) || typeof headers2 === "string") { - throw new TypeError("Raw headers is not supported."); - } - for (const header in headers2) { - const value = headers2[header]; - if (value !== void 0) { - this.setHeader( - header, - value - ); - } - } - } - return this; - } - }); - const event = createEvent(reqProxy, resProxy); - event.fetch = (url, fetchOptions) => fetchWithEvent(event, url, fetchOptions, { - fetch: useNitroApp().localFetch - }); - event.$fetch = (url, fetchOptions) => fetchWithEvent(event, url, fetchOptions, { - fetch: globalThis.$fetch - }); - event.waitUntil = incomingEvent.waitUntil; - event.context = incomingEvent.context; - event.context.cache = { - options: _opts - }; - const body = await handler(event) || _resSendBody; - const headers = event.node.res.getHeaders(); - headers.etag = String( - headers.Etag || headers.etag || `W/"${hash(body)}"` - ); - headers["last-modified"] = String( - headers["Last-Modified"] || headers["last-modified"] || (/* @__PURE__ */ new Date()).toUTCString() - ); - const cacheControl = []; - if (opts.swr) { - if (opts.maxAge) { - cacheControl.push(`s-maxage=${opts.maxAge}`); - } - if (opts.staleMaxAge) { - cacheControl.push(`stale-while-revalidate=${opts.staleMaxAge}`); - } else { - cacheControl.push("stale-while-revalidate"); - } - } else if (opts.maxAge) { - cacheControl.push(`max-age=${opts.maxAge}`); - } - if (cacheControl.length > 0) { - headers["cache-control"] = cacheControl.join(", "); - } - const cacheEntry = { - code: event.node.res.statusCode, - headers, - body - }; - return cacheEntry; - }, - _opts - ); - return defineEventHandler(async (event) => { - if (opts.headersOnly) { - if (handleCacheHeaders(event, { maxAge: opts.maxAge })) { - return; - } - return handler(event); - } - const response = await _cachedHandler( - event - ); - if (event.node.res.headersSent || event.node.res.writableEnded) { - return response.body; - } - if (handleCacheHeaders(event, { - modifiedTime: new Date(response.headers["last-modified"]), - etag: response.headers.etag, - maxAge: opts.maxAge - })) { - return; - } - event.node.res.statusCode = response.code; - for (const name in response.headers) { - const value = response.headers[name]; - if (name === "set-cookie") { - event.node.res.appendHeader( - name, - splitCookiesString(value) - ); - } else { - if (value !== void 0) { - event.node.res.setHeader(name, value); - } - } - } - return response.body; - }); -} -function cloneWithProxy(obj, overrides) { - return new Proxy(obj, { - get(target, property, receiver) { - if (property in overrides) { - return overrides[property]; - } - return Reflect.get(target, property, receiver); - }, - set(target, property, value, receiver) { - if (property in overrides) { - overrides[property] = value; - return true; - } - return Reflect.set(target, property, value, receiver); - } - }); -} -const cachedEventHandler = defineCachedEventHandler; - -const inlineAppConfig = { - "nuxt": {} -}; - - - -const appConfig = defuFn(inlineAppConfig); - -function getEnv(key, opts) { - const envKey = snakeCase(key).toUpperCase(); - return destr( - process.env[opts.prefix + envKey] ?? process.env[opts.altPrefix + envKey] - ); -} -function _isObject(input) { - return typeof input === "object" && !Array.isArray(input); -} -function applyEnv(obj, opts, parentKey = "") { - for (const key in obj) { - const subKey = parentKey ? `${parentKey}_${key}` : key; - const envValue = getEnv(subKey, opts); - if (_isObject(obj[key])) { - if (_isObject(envValue)) { - obj[key] = { ...obj[key], ...envValue }; - applyEnv(obj[key], opts, subKey); - } else if (envValue === void 0) { - applyEnv(obj[key], opts, subKey); - } else { - obj[key] = envValue ?? obj[key]; - } - } else { - obj[key] = envValue ?? obj[key]; - } - if (opts.envExpansion && typeof obj[key] === "string") { - obj[key] = _expandFromEnv(obj[key]); - } - } - return obj; -} -const envExpandRx = /\{\{([^{}]*)\}\}/g; -function _expandFromEnv(value) { - return value.replace(envExpandRx, (match, key) => { - return process.env[key] || match; - }); -} - -const _inlineRuntimeConfig = { - "app": { - "baseURL": "/", - "buildId": "dev", - "buildAssetsDir": "/_nuxt/", - "cdnURL": "" - }, - "nitro": { - "envPrefix": "NUXT_", - "routeRules": { - "/__nuxt_error": { - "cache": false - }, - "/_nuxt/builds/meta/**": { - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - }, - "/_nuxt/builds/**": { - "headers": { - "cache-control": "public, max-age=1, immutable" - } - } - } - }, - "public": { - "apiBase": "http://192.168.1.137:4000/api" - } -}; -const envOptions = { - prefix: "NITRO_", - altPrefix: _inlineRuntimeConfig.nitro.envPrefix ?? process.env.NITRO_ENV_PREFIX ?? "_", - envExpansion: _inlineRuntimeConfig.nitro.envExpansion ?? process.env.NITRO_ENV_EXPANSION ?? false -}; -const _sharedRuntimeConfig = _deepFreeze( - applyEnv(klona(_inlineRuntimeConfig), envOptions) -); -function useRuntimeConfig(event) { - if (!event) { - return _sharedRuntimeConfig; - } - if (event.context.nitro.runtimeConfig) { - return event.context.nitro.runtimeConfig; - } - const runtimeConfig = klona(_inlineRuntimeConfig); - applyEnv(runtimeConfig, envOptions); - event.context.nitro.runtimeConfig = runtimeConfig; - return runtimeConfig; -} -_deepFreeze(klona(appConfig)); -function _deepFreeze(object) { - const propNames = Object.getOwnPropertyNames(object); - for (const name of propNames) { - const value = object[name]; - if (value && typeof value === "object") { - _deepFreeze(value); - } - } - return Object.freeze(object); -} -new Proxy(/* @__PURE__ */ Object.create(null), { - get: (_, prop) => { - console.warn( - "Please use `useRuntimeConfig()` instead of accessing config directly." - ); - const runtimeConfig = useRuntimeConfig(); - if (prop in runtimeConfig) { - return runtimeConfig[prop]; - } - return void 0; - } -}); - -const config = useRuntimeConfig(); -const _routeRulesMatcher = toRouteMatcher( - createRouter({ routes: config.nitro.routeRules }) -); -function createRouteRulesHandler(ctx) { - return eventHandler((event) => { - const routeRules = getRouteRules(event); - if (routeRules.headers) { - setHeaders(event, routeRules.headers); - } - if (routeRules.redirect) { - let target = routeRules.redirect.to; - if (target.endsWith("/**")) { - let targetPath = event.path; - const strpBase = routeRules.redirect._redirectStripBase; - if (strpBase) { - targetPath = withoutBase(targetPath, strpBase); - } - target = joinURL(target.slice(0, -3), targetPath); - } else if (event.path.includes("?")) { - const query = getQuery(event.path); - target = withQuery(target, query); - } - return sendRedirect(event, target, routeRules.redirect.statusCode); - } - if (routeRules.proxy) { - let target = routeRules.proxy.to; - if (target.endsWith("/**")) { - let targetPath = event.path; - const strpBase = routeRules.proxy._proxyStripBase; - if (strpBase) { - targetPath = withoutBase(targetPath, strpBase); - } - target = joinURL(target.slice(0, -3), targetPath); - } else if (event.path.includes("?")) { - const query = getQuery(event.path); - target = withQuery(target, query); - } - return proxyRequest(event, target, { - fetch: ctx.localFetch, - ...routeRules.proxy - }); - } - }); -} -function getRouteRules(event) { - event.context._nitro = event.context._nitro || {}; - if (!event.context._nitro.routeRules) { - event.context._nitro.routeRules = getRouteRulesForPath( - withoutBase(event.path.split("?")[0], useRuntimeConfig().app.baseURL) - ); - } - return event.context._nitro.routeRules; -} -function getRouteRulesForPath(path) { - return defu({}, ..._routeRulesMatcher.matchAll(path).reverse()); -} - -function _captureError(error, type) { - console.error(`[${type}]`, error); - useNitroApp().captureError(error, { tags: [type] }); -} -function trapUnhandledNodeErrors() { - process.on( - "unhandledRejection", - (error) => _captureError(error, "unhandledRejection") - ); - process.on( - "uncaughtException", - (error) => _captureError(error, "uncaughtException") - ); -} -function joinHeaders(value) { - return Array.isArray(value) ? value.join(", ") : String(value); -} -function normalizeFetchResponse(response) { - if (!response.headers.has("set-cookie")) { - return response; - } - return new Response(response.body, { - status: response.status, - statusText: response.statusText, - headers: normalizeCookieHeaders(response.headers) - }); -} -function normalizeCookieHeader(header = "") { - return splitCookiesString(joinHeaders(header)); -} -function normalizeCookieHeaders(headers) { - const outgoingHeaders = new Headers(); - for (const [name, header] of headers) { - if (name === "set-cookie") { - for (const cookie of normalizeCookieHeader(header)) { - outgoingHeaders.append("set-cookie", cookie); - } - } else { - outgoingHeaders.set(name, joinHeaders(header)); - } - } - return outgoingHeaders; -} - -function isJsonRequest(event) { - if (hasReqHeader(event, "accept", "text/html")) { - return false; - } - return hasReqHeader(event, "accept", "application/json") || hasReqHeader(event, "user-agent", "curl/") || hasReqHeader(event, "user-agent", "httpie/") || hasReqHeader(event, "sec-fetch-mode", "cors") || event.path.startsWith("/api/") || event.path.endsWith(".json"); -} -function hasReqHeader(event, name, includes) { - const value = getRequestHeader(event, name); - return value && typeof value === "string" && value.toLowerCase().includes(includes); -} - -const iframeStorageBridge = (nonce) => ( - /* js */ - ` -(function() { - const memoryStore = {}; - - const NONCE = ${JSON.stringify(nonce)} - - const mockStorage = { - getItem: function(key) { - return memoryStore[key] !== undefined ? memoryStore[key] : null; - }, - setItem: function(key, value) { - memoryStore[key] = String(value); - window.parent.postMessage({ - type: 'storage-set', - key: key, - value: String(value), - nonce: NONCE - }, '*'); - }, - removeItem: function(key) { - delete memoryStore[key]; - window.parent.postMessage({ - type: 'storage-remove', - key: key, - nonce: NONCE - }, '*'); - }, - clear: function() { - for (const key in memoryStore) { - delete memoryStore[key]; - } - window.parent.postMessage({ - type: 'storage-clear', - nonce: NONCE - }, '*'); - }, - key: function(index) { - const keys = Object.keys(memoryStore); - return keys[index] !== undefined ? keys[index] : null; - }, - get length() { - return Object.keys(memoryStore).length; - } - }; - - try { - Object.defineProperty(window, 'localStorage', { - value: mockStorage, - writable: false, - configurable: true - }); - } catch (e) { - window.localStorage = mockStorage; - } - - window.addEventListener('message', function(event) { - if (event.data.type === 'storage-sync-data' && event.data.nonce === NONCE) { - const data = event.data.data; - for (const key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - memoryStore[key] = data[key]; - } - } - if (typeof window.initTheme === 'function') { - window.initTheme(); - } - window.dispatchEvent(new Event('storage-ready')); - } - }); - - window.parent.postMessage({ - type: 'storage-sync-request', - nonce: NONCE - }, '*'); -})(); -` -); -const parentStorageBridge = (nonce) => ( - /* js */ - ` -(function() { - const host = document.querySelector('nuxt-error-overlay'); - if (!host) return; - - // Wait for shadow root to be attached - const checkShadow = setInterval(function() { - if (host.shadowRoot) { - clearInterval(checkShadow); - const iframe = host.shadowRoot.getElementById('frame'); - if (!iframe) return; - - const NONCE = ${JSON.stringify(nonce)} - - window.addEventListener('message', function(event) { - if (!event.data || event.data.nonce !== NONCE) return; - - const data = event.data; - - if (data.type === 'storage-set') { - localStorage.setItem(data.key, data.value); - } else if (data.type === 'storage-remove') { - localStorage.removeItem(data.key); - } else if (data.type === 'storage-clear') { - localStorage.clear(); - } else if (data.type === 'storage-sync-request') { - const allData = {}; - for (let i = 0; i < localStorage.length; i++) { - const key = localStorage.key(i); - allData[key] = localStorage.getItem(key); - } - iframe.contentWindow.postMessage({ - type: 'storage-sync-data', - data: allData, - nonce: NONCE - }, '*'); - } - }); - } - }, 10); -})(); -` -); -const errorCSS = ( - /* css */ - ` -:host { - --preview-width: 240px; - --preview-height: 180px; - --base-width: 1200px; - --base-height: 900px; - --z-base: 999999998; - all: initial; - display: contents; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} -#frame { - position: fixed; - left: 0; - top: 0; - width: 100vw; - height: 100vh; - border: none; - z-index: var(--z-base); -} -#frame[inert] { - right: 5px; - bottom: 5px; - left: auto; - top: auto; - width: var(--base-width); - height: var(--base-height); - transform: scale(calc(240 / 1200)); - transform-origin: bottom right; - overflow: hidden; - border-radius: calc(1200 * 8px / 240); -} -#preview { - position: fixed; - right: 5px; - bottom: 5px; - width: var(--preview-width); - height: var(--preview-height); - overflow: hidden; - border-radius: 8px; - pointer-events: none; - z-index: var(--z-base); - background: white; - display: none; -} -#frame:not([inert]) + #preview { - display: block; -} -#toggle { - position: fixed; - right: 5px; - bottom: 5px; - width: var(--preview-width); - height: var(--preview-height); - background: none; - border: 3px solid #00DC82; - border-radius: 8px; - cursor: pointer; - opacity: 0.8; - transition: opacity 0.2s, box-shadow 0.2s; - z-index: calc(var(--z-base) + 1); -} -#toggle:hover, -#toggle:focus { - opacity: 1; - box-shadow: 0 0 20px rgba(0, 220, 130, 0.6); -} -#toggle:focus-visible { - outline: 3px solid #00DC82; - outline-offset: 3px; - box-shadow: 0 0 24px rgba(0, 220, 130, 0.8); -} -@media (prefers-reduced-motion: reduce) { - #toggle { - transition: none; - } -} -` -); -function webComponentScript(base64HTML, startMinimized) { - return ( - /* js */ - ` - (function() { - try { - const host = document.querySelector('nuxt-error-overlay'); - if (!host) return; - - const shadow = host.attachShadow({ mode: 'open' }); - - // Create elements - const style = document.createElement('style'); - style.textContent = ${JSON.stringify(errorCSS)}; - - const iframe = document.createElement('iframe'); - iframe.id = 'frame'; - iframe.src = 'data:text/html;base64,${base64HTML}'; - iframe.title = 'Detailed error stack trace'; - iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin'); - - const preview = document.createElement('div'); - preview.id = 'preview'; - - const button = document.createElement('button'); - button.id = 'toggle'; - button.setAttribute('aria-expanded', 'true'); - button.setAttribute('type', 'button'); - button.innerHTML = 'Toggle detailed error view'; - - const liveRegion = document.createElement('div'); - liveRegion.setAttribute('role', 'status'); - liveRegion.setAttribute('aria-live', 'polite'); - liveRegion.className = 'sr-only'; - - // Update preview snapshot - function updatePreview() { - try { - let previewIframe = preview.querySelector('iframe'); - if (!previewIframe) { - previewIframe = document.createElement('iframe'); - previewIframe.style.cssText = 'width: 1200px; height: 900px; transform: scale(0.2); transform-origin: top left; border: none;'; - previewIframe.setAttribute('sandbox', 'allow-scripts allow-same-origin'); - preview.appendChild(previewIframe); - } - - const doctype = document.doctype ? '' : ''; - const cleanedHTML = document.documentElement.outerHTML - .replace(/]*>.*?<\\/nuxt-error-overlay>/gs, '') - .replace(/]*>.*?<\\/script>/gs, ''); - - const iframeDoc = previewIframe.contentDocument || previewIframe.contentWindow.document; - iframeDoc.open(); - iframeDoc.write(doctype + cleanedHTML); - iframeDoc.close(); - } catch (error) { - console.error('Failed to update preview:', error); - } - } - - function toggleView() { - const isMinimized = iframe.hasAttribute('inert'); - - if (isMinimized) { - updatePreview(); - iframe.removeAttribute('inert'); - button.setAttribute('aria-expanded', 'true'); - liveRegion.textContent = 'Showing detailed error view'; - setTimeout(function() { - try { iframe.contentWindow.focus(); } catch {} - }, 100); - } else { - iframe.setAttribute('inert', ''); - button.setAttribute('aria-expanded', 'false'); - liveRegion.textContent = 'Showing error page'; - button.focus(); - } - } - - button.onclick = toggleView; - - document.addEventListener('keydown', function(e) { - if ((e.key === 'Escape' || e.key === 'Esc') && !iframe.hasAttribute('inert')) { - toggleView(); - } - }); - - // Append to shadow DOM - shadow.appendChild(style); - shadow.appendChild(liveRegion); - shadow.appendChild(iframe); - shadow.appendChild(preview); - shadow.appendChild(button); - - if (${startMinimized}) { - iframe.setAttribute('inert', ''); - button.setAttribute('aria-expanded', 'false'); - } - - // Initialize preview - setTimeout(updatePreview, 100); - - } catch (error) { - console.error('Failed to initialize Nuxt error overlay:', error); - } - })(); - ` - ); -} -function generateErrorOverlayHTML(html, options) { - const nonce = Array.from(crypto.getRandomValues(new Uint8Array(16)), (b) => b.toString(16).padStart(2, "0")).join(""); - const errorPage = html.replace("", `