@saasbase-io/core-elements 2.0.0 → 2.0.1

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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/@saasbase-io/loginflow-websdk/dist/index.esm.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../src/components/wrappers/base-element/base-element.ts","../src/components/wrappers/layout/layout.ts","../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/create-context.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../node_modules/@lit/context/lib/decorators/provide.js","../node_modules/@lit/context/lib/decorators/consume.js","../src/context/env-context.ts","../src/context/auth-context.ts","../src/context/customization-context.ts","../src/context/render-spec.ts","../src/constants/classes.ts","../src/constants/enums.ts","../node_modules/clsx/dist/clsx.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/styles.ts","../src/utils/components.ts","../src/utils/svg-base64.ts","../src/components/wrappers/sb-provider/sb-provider.ts","../src/components/wrappers/sb-signed-out/sb-signed-out.ts","../src/components/wrappers/sb-signed-in/sb-signed-in.ts","../src/components/wrappers/sb-authenticated/sb-authenticated.ts","../src/types/components/user-profile.ts","../src/assets/icons/edit.icon.ts","../src/assets/icons/account.icon.ts","../src/assets/icons/personal-info.icon.ts","../src/assets/icons/location.icon.ts","../src/assets/icons/url.icon.ts","../src/assets/icons/close.icon.ts","../src/assets/icons/burger-menu.icon.ts","../src/components/widgets/sb-user-profile/profile/classes.ts","../src/components/widgets/sb-user-profile/profile/account-info.ts","../src/components/widgets/sb-user-profile/profile/personal-info.ts","../src/components/widgets/sb-user-profile/profile/location-info.ts","../src/components/widgets/sb-user-profile/profile/urls-info.ts","../src/components/widgets/sb-user-profile/profile/profile.ts","../src/components/widgets/sb-user-profile/sidebar/classes.ts","../src/components/widgets/sb-user-profile/sidebar/sidebar.ts","../src/components/widgets/sb-user-profile/sb-user-profile.ts","../src/components/widgets/sb-preview/sb-preview.ts","../src/components/widgets/sb-signin/sb-signin.ts","../src/components/widgets/sb-signup/sb-signup.ts","../src/components/ui/hint/index.ts","../src/components/ui/linear-loader/index.ts","../src/components/ui/spinner/index.ts","../src/components/renderers/error/error.defs.ts","../src/components/renderers/error/_error.ts","../src/components/renderers/field/_password-field.ts","../src/components/renderers/field/_confirm-field.ts","../src/components/renderers/field/_email-field.ts","../src/components/renderers/field/_identifier-field.ts","../src/components/renderers/field/_name-field.ts","../src/components/renderers/field/_phone-field.ts","../src/components/renderers/field/_username-field.ts","../src/components/renderers/form/_form-submit.ts","../src/components/renderers/form/form.defs.ts","../src/components/renderers/form/_form.ts","../src/components/renderers/form/_form-separator.ts","../src/components/renderers/form/_form-switch.ts","../src/components/renderers/passkey-button/_passkey-button.ts","../src/components/renderers/provider/provider.defs.ts","../src/components/renderers/provider/_provider-button.ts","../src/components/renderers/provider/_provider-field.ts","../src/components/renderers/gap/gap.ts","../src/components/renderers/header/header.ts","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/unsafe-html.js","../node_modules/lit-html/directives/unsafe-svg.js","../src/components/renderers/logo/logo.ts","../node_modules/lit-html/static.js","../src/components/renderers/otp/otp.ts","../src/components/renderers/subtitle/subtitle.ts","../src/components/renderers/container/container.ts","../src/components/renderers/title/title.ts","../src/components/renderers/watermark/_watermark.ts","../src/components/renderers/countdown/countdown.ts","../src/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nclass Store {\n constructor() {\n this.data = new Map();\n }\n static get Instance() {\n if (!Store.instance) {\n Store.instance = new Store();\n }\n return Store.instance;\n }\n get(key) {\n return this.data.get(key);\n }\n set(key, value) {\n this.data.set(key, value);\n }\n setConfig(value) {\n this.data.set(\"config\", value);\n }\n getConfig() {\n return this.data.get(\"config\");\n }\n getApiBaseUrl() {\n const domain = this.getConfig().domain;\n if (domain.startsWith(\"localhost\")) {\n return `http://${domain}`;\n }\n return `https://${domain}`;\n }\n remove(key) {\n this.data.delete(key);\n }\n clear() {\n this.data.clear();\n }\n}\nconst store = Store.Instance;\n\nclass LoginflowError extends Error {\n constructor(code, message, details) {\n // eslint-disable-line @typescript-eslint/no-explicit-any\n super(message);\n this.name = \"LoginflowError\";\n this.code = code;\n this.details = details;\n }\n}\n\nclass HttpClient {\n constructor() { }\n static get Instance() {\n if (!HttpClient.instance) {\n HttpClient.instance = new HttpClient();\n }\n return HttpClient.instance;\n }\n request(endpoint_1) {\n return __awaiter(this, arguments, void 0, function* (endpoint, options = {}) {\n const config = store.getConfig();\n const url = `${store.getApiBaseUrl()}${endpoint}`;\n const timeout = 50000;\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), timeout);\n try {\n const response = yield fetch(url, Object.assign(Object.assign({}, options), { signal: controller.signal, headers: Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, (config.apiKey && { 'Authorization': `Bearer ${config.apiKey}` })), config.headers), options.headers) }));\n clearTimeout(timeoutId);\n if (!response.ok) {\n const errorData = yield response.json().catch(() => ({}));\n throw new LoginflowError(errorData.code || 'API_ERROR', errorData.message || `HTTP ${response.status}: ${response.statusText}`, errorData.details);\n }\n return yield response.json();\n }\n catch (error) {\n clearTimeout(timeoutId);\n if (error instanceof LoginflowError) {\n throw error;\n }\n if (error instanceof Error) {\n if (error.name === 'AbortError') {\n throw new LoginflowError('TIMEOUT', 'Request timeout');\n }\n throw new LoginflowError('NETWORK_ERROR', error.message);\n }\n throw new LoginflowError('UNKNOWN_ERROR', 'An unknown error occurred');\n }\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n post(endpoint, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(endpoint, {\n credentials: 'include',\n method: 'POST',\n body: data ? JSON.stringify(data) : undefined,\n });\n });\n }\n get(endpoint) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(endpoint, {\n credentials: 'include',\n method: 'GET',\n });\n });\n }\n}\n\nclass SessionService {\n constructor() {\n this.AUTH_SESSION_STORAGE_KEY = 'saasbase_auth_session';\n this.refreshTimeoutId = null;\n this.refreshPromise = null;\n }\n static get Instance() {\n if (!SessionService.instance) {\n SessionService.instance = new SessionService();\n }\n return SessionService.instance;\n }\n setCurrentSession(session) {\n localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY, JSON.stringify(session));\n }\n getCurrentSession() {\n const session = this.getStoredSession();\n if (!session) {\n return null;\n }\n if (this.isSessionExpired(session)) {\n this.clearSession();\n return null;\n }\n // Check if we should refresh proactively (when 80% of token lifetime has passed)\n if (this.shouldRefreshToken(session)) {\n this.triggerBackgroundRefresh(session);\n }\n return session;\n }\n isAuthenticated() {\n return this.getCurrentSession() !== null;\n }\n getAuthenticatedUser() {\n const session = this.getCurrentSession();\n if (!session || !session.id_token) {\n return null;\n }\n const decodedToken = this.decodeJWT(session.id_token);\n if (!decodedToken) {\n return null;\n }\n return decodedToken;\n }\n cleanup() {\n // Call this method when unmounting/destroying the SDK instance\n if (this.refreshTimeoutId) {\n clearTimeout(this.refreshTimeoutId);\n this.refreshTimeoutId = null;\n }\n // if (this.redirectTimeoutId) {\n // clearTimeout(this.redirectTimeoutId);\n // this.redirectTimeoutId = null;\n // }\n this.refreshPromise = null;\n }\n clearSession() {\n localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY);\n }\n isSessionExpired(session) {\n if (!session || !session.expires_at) {\n return true;\n }\n return Date.now() >= session.expires_at;\n }\n cleanExpiredSession() {\n const session = this.getStoredSession();\n if (session && this.isSessionExpired(session)) {\n this.clearSession();\n }\n }\n getStoredSession() {\n const storedSession = localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);\n if (!storedSession) {\n return null;\n }\n try {\n return JSON.parse(storedSession);\n }\n catch (_a) {\n // Invalid JSON, clean it up\n this.clearSession();\n return null;\n }\n }\n decodeJWT(token) {\n try {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(atob(base64)\n .split('')\n .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''));\n return JSON.parse(jsonPayload);\n }\n catch (_a) {\n return null;\n }\n }\n shouldRefreshToken(session) {\n if (!session || !session.expires_at || !session.refresh_token) {\n return false;\n }\n const now = Date.now();\n const expiresAt = session.expires_at;\n const expiresIn = session.expires_in || 3600;\n // Refresh when 80% of the token lifetime has passed\n const refreshThreshold = now + (expiresIn * 1000 * 0.2);\n return expiresAt <= refreshThreshold;\n }\n scheduleTokenRefresh() {\n // Clear any existing timeout\n if (this.refreshTimeoutId) {\n clearTimeout(this.refreshTimeoutId);\n this.refreshTimeoutId = null;\n }\n const session = this.getCurrentSession();\n if (!session || !session.expires_at || !session.refresh_token) {\n return;\n }\n const now = Date.now();\n const expiresAt = session.expires_at;\n const expiresIn = session.expires_in || 3600;\n // Schedule refresh at 80% of token lifetime\n const timeUntilRefresh = (expiresAt - now) - (expiresIn * 1000 * 0.2);\n if (timeUntilRefresh > 0) {\n this.refreshTimeoutId = setTimeout(() => {\n this.triggerBackgroundRefresh(session);\n }, timeUntilRefresh);\n }\n }\n triggerBackgroundRefresh(session) {\n // Avoid multiple concurrent refresh attempts\n if (this.refreshPromise) {\n return;\n }\n // Don't refresh if no refresh token\n if (!session.refresh_token) {\n return;\n }\n this.refreshPromise = this.refreshTokens(session.refresh_token)\n .then((newSession) => {\n if (newSession) {\n // Store the new tokens\n this.setCurrentSession(newSession);\n // Schedule the next refresh\n this.scheduleTokenRefresh();\n }\n return newSession;\n })\n .catch((error) => {\n console.error('Background token refresh failed:', error);\n return null;\n })\n .finally(() => {\n this.refreshPromise = null;\n });\n }\n refreshTokens(refreshToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield HttpClient.Instance.post('/login-flow/v1/refresh', {\n refresh_token: refreshToken\n });\n return {\n id_token: response.id_token,\n access_token: response.access_token,\n refresh_token: response.refresh_token,\n expires_in: response.expires_in,\n expires_at: Date.now() + (response.expires_in * 1000)\n };\n }\n catch (error) {\n if (error instanceof LoginflowError) {\n console.error('Token refresh failed:', error.message, error.details);\n }\n else {\n console.error('Token refresh failed:', error);\n }\n // Clear the session if refresh fails\n this.clearSession();\n return null;\n }\n });\n }\n}\n\n/**\n * Centralized manager for flow state in sessionStorage.\n * Handles reading, writing, validation, and expiration of flow state.\n */\nclass FlowStateManager {\n constructor(storage = sessionStorage) {\n this.storage = storage;\n this.FLOW_STATE_KEY = 'saasbase_loginflow_state';\n this.FLOW_EXPIRY_MS = 9 * 60 * 1000; // 9 minutes\n }\n /**\n * Get the current flow state from storage.\n * Returns null if state doesn't exist or has expired.\n */\n getFlowState() {\n const storedFlow = this.storage.getItem(this.FLOW_STATE_KEY);\n if (!storedFlow) {\n return null;\n }\n try {\n const flowState = JSON.parse(storedFlow);\n if (this.isExpired(flowState)) {\n this.clearFlowState();\n return null;\n }\n return flowState;\n }\n catch (_a) {\n this.clearFlowState();\n return null;\n }\n }\n /**\n * Save flow state to storage.\n */\n saveFlowState(flowType, flow_id, response) {\n const now = Date.now();\n const existingState = this.getFlowState();\n const flowState = {\n flowType,\n flow_id,\n state: response.state,\n startedAt: (existingState === null || existingState === void 0 ? void 0 : existingState.startedAt) || now,\n lastUpdatedAt: now,\n render_spec: response.render_spec\n };\n this.storage.setItem(this.FLOW_STATE_KEY, JSON.stringify(flowState));\n }\n /**\n * Restore flow state from browser history state.\n * This is used when navigating back/forward to restore the flow state from history.\n * The restored state allows the SDK to resume the existing backend session.\n */\n restoreFromHistory(historyState) {\n const flowState = {\n flowType: historyState.flowType,\n flow_id: historyState.flow_id,\n state: historyState.state,\n startedAt: historyState.timestamp,\n lastUpdatedAt: historyState.timestamp,\n render_spec: undefined // Will be fetched during resume\n };\n this.storage.setItem(this.FLOW_STATE_KEY, JSON.stringify(flowState));\n }\n /**\n * Clear flow state from storage.\n */\n clearFlowState() {\n this.storage.removeItem(this.FLOW_STATE_KEY);\n }\n /**\n * Check if a flow state has expired.\n */\n isExpired(flowState) {\n const now = Date.now();\n return now - flowState.lastUpdatedAt > this.FLOW_EXPIRY_MS;\n }\n /**\n * Get the expiry time in milliseconds.\n */\n get expiryMs() {\n return this.FLOW_EXPIRY_MS;\n }\n}\n\n/**\n * Utility for detecting flow type based on URL path.\n */\nclass FlowTypeDetector {\n /**\n * Detect flow type from current URL path.\n */\n static detect(config, location = window.location) {\n const path = location.pathname.toLowerCase();\n if (path.includes(config.signinUrl)) {\n return 'signin';\n }\n if (path.includes(config.signupUrl)) {\n return 'signup';\n }\n return 'custom';\n }\n}\n\n/**\n * Simple event bus for flow-related events.\n * Enables loose coupling between Loginflow and NavigationManager.\n */\nclass FlowEventBus {\n constructor() {\n this.listeners = new Map();\n }\n /**\n * Subscribe to a flow event.\n */\n on(event, handler) {\n if (!this.listeners.has(event)) {\n this.listeners.set(event, new Set());\n }\n this.listeners.get(event).add(handler);\n }\n /**\n * Unsubscribe from a flow event.\n */\n off(event, handler) {\n var _a;\n (_a = this.listeners.get(event)) === null || _a === void 0 ? void 0 : _a.delete(handler);\n }\n /**\n * Emit a flow event to all subscribers.\n */\n emit(event, data) {\n const handlers = this.listeners.get(event);\n if (handlers) {\n handlers.forEach(handler => {\n try {\n handler(data);\n }\n catch (error) {\n console.error(`[FlowEventBus] Error in event handler for ${event}:`, error);\n }\n });\n }\n }\n /**\n * Remove all listeners.\n */\n clear() {\n this.listeners.clear();\n }\n /**\n * Remove all listeners for a specific event.\n */\n clearEvent(event) {\n this.listeners.delete(event);\n }\n}\n\n/**\n * Browser implementation using Performance Navigation Timing API.\n */\nclass BrowserNavigationTypeDetector {\n getNavigationType() {\n // Use the modern Navigation Timing API Level 2\n const navEntries = performance.getEntriesByType('navigation');\n if (navEntries.length > 0) {\n return navEntries[0].type;\n }\n // Fallback to deprecated API for older browsers\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const legacyNav = performance.navigation;\n if (legacyNav) {\n // TYPE_NAVIGATE = 0, TYPE_RELOAD = 1, TYPE_BACK_FORWARD = 2\n switch (legacyNav.type) {\n case 1:\n return 'reload';\n case 2:\n return 'back_forward';\n default:\n return 'navigate';\n }\n }\n // Default fallback if neither API is available\n return 'navigate';\n }\n}\n\nclass Loginflow {\n constructor(flowId, flowEventBus, location = window.location, flowStateManager, navigationTypeDetector) {\n this.httpClient = HttpClient.Instance;\n this.redirectTimeoutId = null;\n // Event handlers map for client-side events\n this.eventHandlers = new Map([\n [\"switch_to_signin\", this.handleSwitchToSignin.bind(this)],\n [\"switch_to_signup\", this.handleSwitchToSignup.bind(this)],\n ]);\n const config = store.getConfig();\n if (!config.domain) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"Domain is required\");\n }\n if (!config.appId) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"App ID is required\");\n }\n if (!config.clientSecret) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"Client Secret is required\");\n }\n this.flowId = flowId;\n this.location = location;\n this.flowStateManager = flowStateManager || new FlowStateManager();\n this.flowEventBus = flowEventBus || new FlowEventBus();\n this.navigationTypeDetector =\n navigationTypeDetector || new BrowserNavigationTypeDetector();\n // Check and clean expired auth on initialization\n SessionService.Instance.cleanExpiredSession();\n // Schedule refresh for existing valid tokens\n SessionService.Instance.scheduleTokenRefresh();\n }\n static init(flowId, flowEventBus, location, flowStateManager, navigationTypeDetector) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create SDK instance\n const sdk = new Loginflow(flowId, flowEventBus, location, flowStateManager, navigationTypeDetector);\n // Initialize flow automatically\n const flowResponse = yield sdk.initializeFlowInternal();\n return {\n sdk,\n flowType: flowResponse.flowType,\n isResumed: flowResponse.isResumed,\n state: flowResponse.state,\n render_spec: flowResponse.render_spec,\n auth_result: flowResponse.auth_result,\n };\n });\n }\n /**\n * Start a new flow with the server.\n */\n startFlow(flowType, request) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!request.app_id) {\n throw new LoginflowError(\"VALIDATION_ERROR\", \"Client ID is required\");\n }\n const endpoint = `/v1/auth-flow/${flowType}/start`;\n return this.executeFlowRequest(() => this.httpClient.post(endpoint, request), \"START_FLOW_ERROR\", \"Failed to start flow\");\n });\n }\n /**\n * Resume an existing flow with the server.\n */\n resumeFlow(flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n const endpoint = `/v1/auth-flow/${flowType}/resume`;\n return this.executeFlowRequest(() => this.httpClient.post(endpoint), \"RESUME_FLOW_ERROR\", \"Failed to resume flow\");\n });\n }\n /**\n * Process an event in the flow.\n */\n processEvent(request, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!request.event) {\n throw new LoginflowError(\"VALIDATION_ERROR\", \"Event type is required\");\n }\n // Check for client-side event handlers\n const handler = this.eventHandlers.get(request.event);\n if (handler) {\n return yield handler();\n }\n // Server-side event processing\n return yield this.processServerEvent(request, beforeFinishCallback);\n });\n }\n /**\n * Execute a flow request with consistent error handling and side effects.\n */\n executeFlowRequest(operation, errorCode, errorMessage, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield operation();\n if (beforeFinishCallback) {\n yield beforeFinishCallback(response);\n }\n this.processAuthResult(response.auth_result);\n if (response.redirection) {\n this.redirect(response.redirection);\n }\n return response;\n }\n catch (error) {\n if (error instanceof LoginflowError) {\n throw error;\n }\n throw new LoginflowError(errorCode, errorMessage, error instanceof Error\n ? { originalError: error.message, stack: error.stack }\n : error);\n }\n });\n }\n /**\n * Process server-side events.\n */\n processServerEvent(request, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n // Check if flow state has expired (9 minutes timeout)\n let flowState = this.flowStateManager.getFlowState();\n if (!flowState) {\n // Flow state expired - restart the flow to get a fresh server session\n console.warn(\"Flow state expired, restarting flow before processing event\");\n yield this.initializeFlowInternal();\n // Get the newly created flow state\n flowState = this.flowStateManager.getFlowState();\n if (!flowState) {\n throw new LoginflowError(\"FLOW_RESTART_ERROR\", \"Failed to restart flow - no flow state after initialization\");\n }\n }\n const previousState = flowState.state;\n const endpoint = `/v1/auth-flow/${flowState.flowType}/events`;\n const response = yield this.executeFlowRequest(() => this.httpClient.post(endpoint, request), \"PROCESS_EVENT_ERROR\", \"Failed to process event\", beforeFinishCallback);\n // Only save flow state if authentication is not complete\n // If auth_result exists, processAuthResult already cleared the state\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowState.flowType, flowState.flow_id, response);\n // Emit event to notify listeners (e.g., NavigationManager)\n const updatedFlowState = this.flowStateManager.getFlowState();\n if (updatedFlowState) {\n const isNewStep = previousState !== response.state;\n this.flowEventBus.emit(\"flow:updated\", {\n flowState: updatedFlowState,\n isNewStep,\n });\n }\n }\n return response;\n });\n }\n /**\n * Handle successful authentication.\n */\n processAuthResult(authResult) {\n if (authResult) {\n const authData = {\n id_token: authResult.id_token,\n access_token: authResult.access_token,\n refresh_token: authResult.refresh_token,\n expires_in: authResult.expires_in,\n expires_at: Date.now() + authResult.expires_in * 1000,\n };\n SessionService.Instance.setCurrentSession(authData);\n // Schedule the next refresh\n SessionService.Instance.scheduleTokenRefresh();\n // Clear flow states when authentication is successful\n this.flowStateManager.clearFlowState();\n // Reload the page to redirect to the configured home page\n this.reloadPage();\n }\n }\n /**\n * Initialize or resume the flow.\n */\n initializeFlowInternal() {\n return __awaiter(this, void 0, void 0, function* () {\n // Determine current flow type (from config or auto-detect)\n const config = store.getConfig();\n const currentFlowType = FlowTypeDetector.detect(config, this.location);\n this.validateFlowType(currentFlowType);\n // Check for existing flow state\n const existingFlowState = this.flowStateManager.getFlowState();\n if (this.shouldResumeFlow(existingFlowState, currentFlowType)) {\n return yield this.resumeExistingFlow(existingFlowState, currentFlowType);\n }\n return yield this.startNewFlow(currentFlowType);\n });\n }\n /**\n * Validate flow type requirements.\n */\n validateFlowType(flowType) {\n if (flowType === \"custom\" && !this.flowId) {\n throw new LoginflowError(\"FLOW_ID_ERROR\", \"Flow ID is required for custom flows\");\n }\n }\n /**\n * Check if we should resume an existing flow.\n */\n shouldResumeFlow(existingState, currentFlowType) {\n if (!existingState) {\n return false;\n }\n // Check for explicit resume query parameter from backend redirects\n const urlParams = new URLSearchParams(this.location.search);\n const explicitResume = urlParams.get(\"resume\") === \"true\";\n // Check navigation type - only resume for reload or back_forward\n // For 'navigate' (fresh link/URL entry), start a new flow unless explicitly told to resume\n const navType = this.navigationTypeDetector.getNavigationType();\n if (navType === \"navigate\" && !explicitResume) {\n this.flowStateManager.clearFlowState();\n console.log(`Fresh navigation detected (type: ${navType}), starting new flow`);\n return false;\n }\n // Check if flow type has changed\n if (existingState.flowType !== currentFlowType) {\n this.flowStateManager.clearFlowState();\n console.log(`Flow type changed from ${existingState.flowType} to ${currentFlowType}, starting new flow, flow_id: ${this.flowId}`);\n return false;\n }\n // Check if flow_id has changed for custom flows\n if (currentFlowType === \"custom\" && existingState.flow_id !== this.flowId) {\n this.flowStateManager.clearFlowState();\n console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`);\n return false;\n }\n const resumeReason = explicitResume\n ? \"explicit resume=true\"\n : `navigation type: ${navType}`;\n console.log(`Resuming existing flow (${resumeReason})`);\n return true;\n }\n /**\n * Resume an existing flow.\n */\n resumeExistingFlow(existingState, flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield this.resumeFlow(flowType);\n // Only save flow state if authentication is not complete\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowType, existingState.flow_id, response);\n // Emit event to notify listeners\n const flowState = this.flowStateManager.getFlowState();\n if (flowState) {\n this.flowEventBus.emit(\"flow:resumed\", { flowState });\n }\n }\n return {\n flowType,\n isResumed: true,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n };\n }\n catch (error) {\n // If resume fails, clear the state and start fresh\n this.flowStateManager.clearFlowState();\n console.warn(\"Failed to resume flow, starting fresh:\", error);\n return yield this.startNewFlow(flowType);\n }\n });\n }\n /**\n * Start a new flow.\n */\n startNewFlow(flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n const urlParams = new URLSearchParams(this.location.search);\n // convert url params to an object for metadata\n const metadata = {};\n urlParams.forEach((value, key) => {\n metadata[key] = value;\n });\n console.log(\"metadata\", metadata);\n // Build start flow request\n const startFlowRequest = {\n app_id: config.appId,\n client_secret: config.clientSecret,\n origin_url: this.location.href,\n signin_url: config.signinUrl,\n signup_url: config.signupUrl,\n locale: config.locale || \"en\",\n flow_id: this.determineFlowId(flowType),\n metadata: metadata,\n };\n const response = yield this.startFlow(flowType, startFlowRequest);\n // Only save flow state if authentication is not complete\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowType, startFlowRequest.flow_id, response);\n // Emit event to notify listeners\n const flowState = this.flowStateManager.getFlowState();\n if (flowState) {\n this.flowEventBus.emit(\"flow:started\", { flowState });\n }\n }\n return {\n flowType,\n isResumed: false,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n };\n });\n }\n /**\n * Determine the flow_id based on flow type.\n */\n determineFlowId(flowType) {\n switch (flowType) {\n case \"signin\":\n return this.flowId || \"signin-flow\";\n case \"signup\":\n return this.flowId || \"signup-flow\";\n case \"custom\":\n if (!this.flowId) {\n throw new LoginflowError(\"FLOW_ID_ERROR\", \"Flow ID is required for custom flows\");\n }\n return this.flowId;\n }\n }\n /**\n * Handle switch to signin event.\n */\n handleSwitchToSignin() {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n this.redirect({ url: config.signinUrl, redirect_delay: 0 });\n return { state: \"End\" };\n });\n }\n /**\n * Handle switch to signup event.\n */\n handleSwitchToSignup() {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n this.redirect({ url: config.signupUrl, redirect_delay: 0 });\n return { state: \"End\" };\n });\n }\n /**\n * Redirect to a URL.\n */\n redirect(rd) {\n if (!rd.url) {\n return;\n }\n // Clear any existing redirect timeout before scheduling a new one\n // This handles cases where navigation (like browser back) cancels a pending redirect\n if (this.redirectTimeoutId !== null) {\n console.log(\"Clearing existing redirect timeout before scheduling new redirect to:\", rd.url);\n clearTimeout(this.redirectTimeoutId);\n this.redirectTimeoutId = null;\n }\n // Redirect URL inside a timeout to ensure the page is rendered.\n // It guarantees that all code in the current execution context finishes first,\n // even though the delay is \"zero\". It's not about time—it's about execution order in the event loop.\n this.redirectTimeoutId = setTimeout(() => {\n this.location.href = rd.url;\n }, rd.redirect_delay * 1000);\n }\n /**\n * Reload the current page.\n */\n reloadPage() {\n // Defer reload to ensure sessionStorage operations complete\n // This guarantees that all code in the current execution context finishes first\n setTimeout(() => {\n this.location.reload();\n }, 0);\n }\n /**\n * Get the event bus for external listeners.\n */\n getEventBus() {\n return this.flowEventBus;\n }\n /**\n * Cleanup resources.\n */\n cleanup() {\n // Cancel any pending redirect\n if (this.redirectTimeoutId) {\n clearTimeout(this.redirectTimeoutId);\n this.redirectTimeoutId = null;\n }\n // Clear event bus\n this.flowEventBus.clear();\n }\n}\n\n/**\n * Utility class for debouncing function calls.\n * Ensures a function is only called after a specified delay has passed since the last invocation.\n */\nclass Debouncer {\n constructor(delayMs) {\n this.delayMs = delayMs;\n this.timerId = null;\n }\n /**\n * Debounce a function call.\n * If called again before delay expires, the previous call is cancelled.\n */\n debounce(fn) {\n if (this.timerId) {\n clearTimeout(this.timerId);\n }\n this.timerId = setTimeout(() => {\n fn();\n this.timerId = null;\n }, this.delayMs);\n }\n /**\n * Cancel any pending debounced call.\n */\n cancel() {\n if (this.timerId) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n }\n /**\n * Check if a debounced call is pending.\n */\n isPending() {\n return this.timerId !== null;\n }\n}\n\n/**\n * Adapter interfaces for browser APIs to enable dependency injection and testing.\n */\n/**\n * Default browser implementation of HistoryAdapter.\n */\nclass BrowserHistoryAdapter {\n pushState(state, title, url) {\n history.pushState(state, title, url);\n }\n replaceState(state, title, url) {\n history.replaceState(state, title, url);\n }\n get state() {\n return history.state;\n }\n}\n\n/**\n * Manages browser history integration for the authentication flow.\n * Listens to flow events via event bus and updates browser history accordingly.\n * Handles popstate events (browser back/forward) and triggers flow restart when needed.\n */\nclass NavigationManager {\n constructor(flowEventBus, onFlowRestartNeeded, skipHistoryTracking = false, location = window.location, flowStateManager, historyAdapter) {\n this.popstateListener = null;\n this.pageshowListener = null;\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n this.onFlowRestartNeeded = null;\n this.onFlowRestartNeeded = onFlowRestartNeeded;\n this.skipHistoryTracking = skipHistoryTracking;\n this.debouncer = new Debouncer(200);\n this.location = location;\n this.flowStateManager = flowStateManager || new FlowStateManager();\n this.historyAdapter = historyAdapter || new BrowserHistoryAdapter();\n // Subscribe to flow events\n this.subscribeToFlowEvents(flowEventBus);\n // Initialize popstate listener\n this.initializeListener();\n }\n /**\n * Subscribe to flow events from the event bus.\n */\n subscribeToFlowEvents(flowEventBus) {\n flowEventBus.on('flow:started', this.handleFlowStart.bind(this));\n flowEventBus.on('flow:updated', this.handleFlowUpdate.bind(this));\n flowEventBus.on('flow:resumed', this.handleFlowResume.bind(this));\n }\n /**\n * Initialize the popstate and pageshow listeners for browser navigation.\n */\n initializeListener() {\n this.popstateListener = (event) => {\n console.log('[NavigationManager] popstate event received');\n // Debounce rapid back/forward clicks\n this.debouncer.debounce(() => {\n console.log('[NavigationManager] Debounce timeout fired, handling popstate');\n void this.handlePopState(event);\n });\n };\n // Handle bfcache (back/forward cache) restoration\n // When a page is restored from bfcache, popstate might not fire reliably\n this.pageshowListener = (event) => {\n if (event.persisted) {\n console.log('[NavigationManager] Page restored from bfcache');\n // Debounce to handle potential race conditions\n this.debouncer.debounce(() => {\n console.log('[NavigationManager] Handling bfcache restoration');\n void this.handleBfcacheRestoration();\n });\n }\n };\n window.addEventListener('popstate', this.popstateListener);\n window.addEventListener('pageshow', this.pageshowListener);\n }\n /**\n * Handle browser back/forward navigation.\n */\n handlePopState(event) {\n return __awaiter(this, void 0, void 0, function* () {\n // Prevent concurrent processing\n if (this.isProcessing) {\n console.log('[NavigationManager] Already processing popstate, skipping');\n return;\n }\n console.log('[NavigationManager] Starting popstate processing');\n this.isProcessing = true;\n this.isHandlingNavigationEvent = true;\n try {\n const historyState = event.state;\n const sessionFlowState = this.flowStateManager.getFlowState();\n const config = store.getConfig();\n const urlFlowType = FlowTypeDetector.detect(config, this.location);\n // Restore history state to session storage BEFORE checking if restart is needed\n // This allows the SDK to resume the existing backend session using the flow-type-specific cookie\n if (historyState) {\n this.restoreHistoryStateToSession(historyState);\n }\n if (this.shouldRestartFlow(historyState, sessionFlowState, urlFlowType)) {\n yield this.triggerFlowRestart();\n return;\n }\n // Valid state - restored successfully\n console.log('[NavigationManager] Valid state restored from history');\n }\n finally {\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n }\n });\n }\n /**\n * Handle page restoration from bfcache (back/forward cache).\n * When a page is restored from bfcache, the popstate event might not fire reliably,\n * so we use the pageshow event with event.persisted=true to detect this case.\n */\n handleBfcacheRestoration() {\n return __awaiter(this, void 0, void 0, function* () {\n // Prevent concurrent processing\n if (this.isProcessing) {\n console.log('[NavigationManager] Already processing bfcache restoration, skipping');\n return;\n }\n console.log('[NavigationManager] Starting bfcache restoration processing');\n this.isProcessing = true;\n this.isHandlingNavigationEvent = true;\n try {\n // Get current history state (not from event, since pageshow doesn't provide it)\n const historyState = this.historyAdapter.state;\n const sessionFlowState = this.flowStateManager.getFlowState();\n const config = store.getConfig();\n const urlFlowType = FlowTypeDetector.detect(config, this.location);\n // Restore history state to session storage BEFORE checking if restart is needed\n if (historyState) {\n this.restoreHistoryStateToSession(historyState);\n }\n if (this.shouldRestartFlow(historyState, sessionFlowState, urlFlowType)) {\n yield this.triggerFlowRestart();\n return;\n }\n // Valid state - restored successfully\n console.log('[NavigationManager] Valid state restored from bfcache');\n }\n finally {\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n }\n });\n }\n /**\n * Restore history state to session storage.\n * This is crucial for cookie preservation: when navigating back, we restore the old flow state\n * so that Loginflow.initializeFlowInternal() can resume using the flow-type-specific cookie.\n */\n restoreHistoryStateToSession(historyState) {\n console.log('[NavigationManager] Restoring history state to session storage:', historyState);\n this.flowStateManager.restoreFromHistory(historyState);\n }\n /**\n * Determine if the flow should be restarted based on navigation state.\n * Note: We've already restored historyState to session storage at this point.\n */\n shouldRestartFlow(historyState, _sessionState, urlFlowType) {\n // Check for flow type mismatch between URL and history\n if (historyState && historyState.flowType !== urlFlowType) {\n console.log('[NavigationManager] Flow type changed via navigation:', historyState.flowType, '→', urlFlowType);\n // Clear the restored state since URL doesn't match\n this.flowStateManager.clearFlowState();\n return true;\n }\n // No history state - initial navigation\n if (!historyState) {\n console.log('[NavigationManager] No history state, skipping');\n return false;\n }\n // Check if session has expired based on timestamp\n const now = Date.now();\n if (now - historyState.timestamp > this.flowStateManager.expiryMs) {\n console.log('[NavigationManager] History state expired, clearing and restarting flow');\n this.flowStateManager.clearFlowState();\n return true;\n }\n // Always trigger restart after restoring state\n // The restored session storage will allow Loginflow to resume using the flow-type-specific cookie\n console.log('[NavigationManager] Valid history state restored, triggering restart to resume flow');\n return true;\n }\n /**\n * Trigger flow restart callback.\n */\n triggerFlowRestart() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.onFlowRestartNeeded) {\n yield this.onFlowRestartNeeded();\n }\n });\n }\n /**\n * Create a history state object from flow state.\n */\n createHistoryState(flowState) {\n return {\n flowType: flowState.flowType,\n flow_id: flowState.flow_id,\n state: flowState.state,\n timestamp: Date.now()\n };\n }\n /**\n * Update browser history.\n */\n updateBrowserHistory(flowState, mode) {\n // Skip history tracking if this instance was created with skipHistoryTracking\n if (this.skipHistoryTracking) {\n console.log('[NavigationManager] Skipping history tracking (created from navigation)');\n return;\n }\n const historyState = this.createHistoryState(flowState);\n try {\n if (mode === 'push') {\n this.historyAdapter.pushState(historyState, '', this.location.href);\n console.log('[NavigationManager] Pushed state to history');\n }\n else {\n this.historyAdapter.replaceState(historyState, '', this.location.href);\n console.log('[NavigationManager] Replaced state in history');\n }\n }\n catch (error) {\n console.error('[NavigationManager] Failed to update history:', error);\n }\n }\n /**\n * Handle flow start event.\n */\n handleFlowStart(data) {\n // When starting a flow, ALWAYS replace the current history entry\n // This works with app routers that already changed the URL\n this.updateBrowserHistory(data.flowState, 'replace');\n }\n /**\n * Handle flow update event.\n */\n handleFlowUpdate(data) {\n // If handling navigation, always replace; otherwise respect isNewStep\n const mode = this.isHandlingNavigationEvent || !data.isNewStep ? 'replace' : 'push';\n this.updateBrowserHistory(data.flowState, mode);\n }\n /**\n * Handle flow resume event.\n */\n handleFlowResume(data) {\n // Always replace state when resuming\n this.updateBrowserHistory(data.flowState, 'replace');\n }\n /**\n * Cleanup resources.\n */\n destroy() {\n // Cancel any pending debounced calls\n this.debouncer.cancel();\n // Remove popstate listener\n if (this.popstateListener) {\n window.removeEventListener('popstate', this.popstateListener);\n this.popstateListener = null;\n }\n // Remove pageshow listener\n if (this.pageshowListener) {\n window.removeEventListener('pageshow', this.pageshowListener);\n this.pageshowListener = null;\n }\n // Clear callback\n this.onFlowRestartNeeded = null;\n }\n}\n\n/*\n* global abort controller to abort all instances of the webauthn\n*/\nlet controller = new AbortController();\nclass WebAuthnService {\n constructor() {\n this.httpClient = HttpClient.Instance;\n this.capabilities = {\n webauthn: false,\n };\n this.capabilitiesDetected = false;\n }\n detectCapabilities() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.capabilitiesDetected)\n return;\n try {\n if (typeof window.PublicKeyCredential === 'function') {\n this.capabilities.webauthn = true;\n }\n else {\n this.capabilities.webauthn = false;\n }\n if (typeof PublicKeyCredential.getClientCapabilities === \"function\") {\n const caps = yield PublicKeyCredential.getClientCapabilities();\n this.capabilities = Object.assign(Object.assign({}, this.capabilities), caps);\n return;\n }\n if (typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable === \"function\") {\n this.capabilities.userVerifyingPlatformAuthenticator =\n yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n }\n if ((PublicKeyCredential === null || PublicKeyCredential === void 0 ? void 0 : PublicKeyCredential.isConditionalMediationAvailable) !== undefined && typeof PublicKeyCredential.isConditionalMediationAvailable === \"function\") {\n this.capabilities.conditionalGet = yield PublicKeyCredential.isConditionalMediationAvailable();\n }\n else {\n this.capabilities.conditionalGet = false;\n }\n }\n finally {\n this.capabilitiesDetected = true;\n }\n });\n }\n fetchPublicKeyCredentialRequestOptions(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const endpoint = `/webauthn/login/options`;\n return this.httpClient.post(endpoint, {\n conditional,\n flow_type: flowType,\n });\n }\n catch (error) {\n console.error(\"error\", error);\n return null;\n }\n });\n }\n fetchPublicKeyCredentialCreationOptions(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const endpoint = `/webauthn/register/options`;\n return this.httpClient.post(endpoint, {\n conditional,\n flow_type: flowType,\n });\n }\n catch (error) {\n console.error(\"error\", error);\n return null;\n }\n });\n }\n startRegistration(opts, useAutoRegister) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (!opts) {\n console.error(\"No PublicKeyCredentialCreationOptionsJSON provided\");\n return null;\n }\n controller.abort();\n controller = new AbortController();\n const options = this.toPublicKeyCredentialCreationOptions(opts);\n const createOptions = {\n signal: controller.signal,\n publicKey: options\n };\n if (useAutoRegister) {\n if (!this.isConditionalCreateAvailable()) {\n console.error(\"Conditional create mediation not supported in this browser\");\n return null;\n }\n // @ts-expect-error: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n createOptions.mediation = 'conditional';\n }\n try {\n const credential = (yield navigator.credentials.create(createOptions));\n if (!credential) {\n console.error(\"no credential returned by authenticator\");\n return;\n }\n const { id, rawId, response, type } = credential;\n // Continue to play it safe with `getTransports()` for now, even when L3 types say it's required\n let transports = undefined;\n if (typeof response.getTransports === 'function') {\n transports = response.getTransports();\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responsePublicKeyAlgorithm = undefined;\n if (typeof response.getPublicKeyAlgorithm === 'function') {\n try {\n responsePublicKeyAlgorithm = response.getPublicKeyAlgorithm();\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKeyAlgorithm()', error);\n }\n }\n let responsePublicKey = undefined;\n if (typeof response.getPublicKey === 'function') {\n try {\n const _publicKey = response.getPublicKey();\n if (_publicKey !== null) {\n responsePublicKey = this.bufferToBase64URLString(_publicKey);\n }\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKey()', error);\n }\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responseAuthenticatorData;\n if (typeof response.getAuthenticatorData === 'function') {\n try {\n responseAuthenticatorData = this.bufferToBase64URLString(response.getAuthenticatorData());\n }\n catch (error) {\n warnOnBrokenImplementation('getAuthenticatorData()', error);\n }\n }\n return {\n id,\n rawId: this.bufferToBase64URLString(rawId),\n response: {\n attestationObject: this.bufferToBase64URLString(response.attestationObject),\n clientDataJSON: this.bufferToBase64URLString(response.clientDataJSON),\n transports,\n publicKeyAlgorithm: responsePublicKeyAlgorithm,\n publicKey: responsePublicKey,\n authenticatorData: responseAuthenticatorData,\n },\n type,\n clientExtensionResults: credential.getClientExtensionResults(),\n authenticatorAttachment: this.toAuthenticatorAttachment(credential.authenticatorAttachment),\n };\n }\n catch (error) {\n const errorIdentified = this.identifyAuthenticationError({\n error: error,\n options: createOptions,\n });\n if (errorIdentified instanceof WebAuthnError) {\n console.error(`WebAuthn authentication failed with code: ${errorIdentified.code}, message: ${errorIdentified.message}`);\n }\n else {\n console.error(\"WebAuthn authentication failed with error:\", error);\n }\n return null;\n }\n });\n }\n startAuthentication(opts, useBrowserAutofill) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (!opts) {\n console.error(\"No PublicKeyCredentialRequestOptionsJSON provided\");\n return null;\n }\n if (!this.isWebAuthnAvailable()) {\n console.error(\"WebAuthn not supported in this browser\");\n return null;\n }\n // Abort any previous authentication attempt\n controller.abort();\n controller = new AbortController();\n const options = this.toPublicKeyCredentialRequestOptions(opts);\n const requestOptions = {\n signal: controller.signal,\n publicKey: options\n };\n if (useBrowserAutofill) {\n if (!this.isConditionalGetAvailable()) {\n console.error(\"Conditional mediation not supported in this browser\");\n return null;\n }\n requestOptions.mediation = \"conditional\";\n if (requestOptions.publicKey) {\n // in conditional get, allowCredentials must be an empty array to signal the browser to show all available credentials\n requestOptions.publicKey.allowCredentials = [];\n }\n }\n try {\n const result = yield navigator.credentials.get(requestOptions);\n return this.toPublicKeyCredentialJSON(result);\n }\n catch (error) {\n const errorIdentified = this.identifyAuthenticationError({\n error: error,\n options: requestOptions,\n });\n if (errorIdentified instanceof WebAuthnError) {\n console.error(`WebAuthn authentication failed with code: ${errorIdentified.code}, message: ${errorIdentified.message}`);\n }\n else {\n console.error(\"WebAuthn authentication failed with error:\", error);\n }\n return null;\n }\n });\n }\n signalUnknownCredential(rpId, credentialId) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (this.isSignalUnknownCredentialAvailable()) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yield PublicKeyCredential.signalUnknownCredential({\n rpId,\n credentialId,\n });\n }\n catch (err) {\n console.error(\"Failed to signal unknown credential:\", err);\n }\n }\n else {\n console.warn(\"signalUnknownCredential not supported in this browser\");\n }\n });\n }\n signalCurrentUserDetails(details) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (this.isSignalCurrentUserDetailsAvailable()) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yield PublicKeyCredential.signalCurrentUserDetails(details);\n }\n catch (err) {\n console.error(\"Failed to signal current user details:\", err);\n }\n }\n else {\n console.warn(\"signalCurrentUserDetails not supported. Ask user to update manually.\");\n }\n });\n }\n toPublicKeyCredentialDescriptor(descriptor) {\n const { id } = descriptor;\n return Object.assign(Object.assign({}, descriptor), { id: this.base64URLStringToBuffer(id), type: descriptor.type, transports: descriptor.transports });\n }\n toAuthenticatorAttachment(attachment) {\n const attachments = ['cross-platform', 'platform'];\n if (!attachment) {\n return;\n }\n if (attachments.indexOf(attachment) < 0) {\n return;\n }\n return attachment;\n }\n bufferToBase64URLString(buffer) {\n const bytes = new Uint8Array(buffer);\n let str = '';\n for (const charCode of bytes) {\n str += String.fromCharCode(charCode);\n }\n const base64String = btoa(str);\n return base64String.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n }\n base64URLStringToBuffer(base64URLString) {\n // Convert from Base64URL to Base64\n const base64 = base64URLString.replace(/-/g, '+').replace(/_/g, '/');\n const padLength = (4 - (base64.length % 4)) % 4;\n const padded = base64.padEnd(base64.length + padLength, '=');\n const binary = atob(padded);\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return buffer;\n }\n toPublicKeyCredentialJSON(cred) {\n if (typeof cred.toJSON === \"function\") {\n return cred.toJSON();\n }\n const response = cred.response;\n return {\n id: cred.id,\n type: cred.type,\n rawId: this.bufferToBase64URLString(cred.rawId),\n authenticatorAttachment: this.toAuthenticatorAttachment(cred.authenticatorAttachment),\n clientExtensionResults: cred === null || cred === void 0 ? void 0 : cred.getClientExtensionResults(),\n response: {\n clientDataJSON: this.bufferToBase64URLString(response.clientDataJSON),\n authenticatorData: this.bufferToBase64URLString(response.authenticatorData),\n signature: this.bufferToBase64URLString(response.signature),\n userHandle: response.userHandle ? this.bufferToBase64URLString(response.userHandle) : undefined,\n },\n };\n }\n toPublicKeyCredentialCreationOptions(optionJSON) {\n var _a;\n if (typeof PublicKeyCredential.parseCreationOptionsFromJSON === \"function\") {\n return PublicKeyCredential.parseCreationOptionsFromJSON(optionJSON);\n }\n const publicKey = {\n challenge: this.base64URLStringToBuffer(optionJSON.challenge),\n rp: {\n id: optionJSON.rp.id,\n name: optionJSON.rp.name\n },\n user: {\n displayName: optionJSON.user.displayName,\n id: this.base64URLStringToBuffer(optionJSON.user.id),\n name: optionJSON.user.name\n },\n pubKeyCredParams: optionJSON.pubKeyCredParams.map((p) => ({\n alg: p.alg,\n type: p.type\n })),\n timeout: optionJSON.timeout,\n };\n if (optionJSON.attestation) {\n publicKey.attestation = optionJSON.attestation;\n }\n if (optionJSON.extensions !== undefined) {\n publicKey.extensions = optionJSON.extensions;\n }\n if (optionJSON.authenticatorSelection) {\n const authenticatorSelection = {};\n if (optionJSON.authenticatorSelection.authenticatorAttachment) {\n authenticatorSelection.authenticatorAttachment = optionJSON.authenticatorSelection.authenticatorAttachment;\n }\n if (optionJSON.authenticatorSelection.requireResidentKey) {\n authenticatorSelection.requireResidentKey = optionJSON.authenticatorSelection.requireResidentKey;\n }\n if (optionJSON.authenticatorSelection.residentKey) {\n authenticatorSelection.residentKey = optionJSON.authenticatorSelection.residentKey;\n }\n if (optionJSON.authenticatorSelection.userVerification) {\n authenticatorSelection.userVerification = optionJSON.authenticatorSelection.userVerification;\n }\n publicKey.authenticatorSelection = authenticatorSelection;\n }\n if ((_a = optionJSON.excludeCredentials) === null || _a === void 0 ? void 0 : _a.length) {\n publicKey.excludeCredentials = optionJSON.excludeCredentials.map((desc) => this.toPublicKeyCredentialDescriptor(desc));\n }\n return publicKey;\n }\n toPublicKeyCredentialRequestOptions(optionJSON) {\n var _a;\n if (typeof PublicKeyCredential.parseRequestOptionsFromJSON === \"function\") {\n return PublicKeyCredential.parseRequestOptionsFromJSON(optionJSON);\n }\n const publicKey = {\n challenge: this.base64URLStringToBuffer(optionJSON.challenge),\n };\n if (optionJSON.rpId !== undefined) {\n publicKey.rpId = optionJSON.rpId;\n }\n if (optionJSON.timeout !== undefined) {\n publicKey.timeout = optionJSON.timeout;\n }\n if (optionJSON.userVerification !== undefined) {\n publicKey.userVerification = optionJSON.userVerification;\n }\n if (optionJSON.extensions !== undefined) {\n publicKey.extensions = optionJSON.extensions;\n }\n if ((_a = optionJSON.allowCredentials) === null || _a === void 0 ? void 0 : _a.length) {\n publicKey.allowCredentials = optionJSON.allowCredentials.map((desc) => this.toPublicKeyCredentialDescriptor(desc));\n }\n return publicKey;\n }\n identifyAuthenticationError({ error, options, }) {\n const { publicKey } = options;\n if (!publicKey) {\n throw Error('options was missing required publicKey property');\n }\n if (error.name === 'AbortError') {\n if (options.signal instanceof AbortSignal) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n return new WebAuthnError({\n message: 'Authentication ceremony was sent an abort signal',\n code: 'ERROR_CEREMONY_ABORTED',\n cause: error,\n });\n }\n }\n else if (error.name === 'NotAllowedError') {\n /**\n * Pass the error directly through. Platforms are overloading this error beyond what the spec\n * defines and we don't want to overwrite potentially useful error messages.\n */\n return new WebAuthnError({\n message: error.message,\n code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n cause: error,\n });\n }\n else if (error.name === 'SecurityError') {\n const effectiveDomain = window.location.hostname;\n if (!isValidDomain(effectiveDomain)) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)\n return new WebAuthnError({\n message: `${window.location.hostname} is an invalid domain`,\n code: 'ERROR_INVALID_DOMAIN',\n cause: error,\n });\n }\n else if (publicKey.rpId !== effectiveDomain) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)\n return new WebAuthnError({\n message: `The RP ID \"${publicKey.rpId}\" is invalid for this domain`,\n code: 'ERROR_INVALID_RP_ID',\n cause: error,\n });\n }\n }\n else if (error.name === 'UnknownError') {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)\n return new WebAuthnError({\n message: 'The authenticator was unable to process the specified options, or could not create a new assertion signature',\n code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n cause: error,\n });\n }\n return error;\n }\n isPublicKeyCredentialRequestOptionsJSON(v) {\n return typeof v === \"object\" && v !== null && \"challenge\" in v;\n }\n isWebAuthnAvailable() {\n return this.capabilities.webauthn;\n }\n // The browser can signal available credentials on the server to the passkey provider, \n // so that the passkey provider can keep the passkey list consistent with the server.\n isSignalAllAcceptedCredentialsAvailable() {\n return !!this.capabilities.signalAllAcceptedCredentials;\n }\n // The browser can signal user information such as username and display name on the server to the passkey provider, \n // so that the passkey provider can keep their passkey information consistent with the server.\n isSignalCurrentUserDetailsAvailable() {\n return !!this.capabilities.signalCurrentUserDetails;\n }\n // The browser can signal a deleted credential on the server to the passkey provider, \n // so that the passkey provider can keep the passkey list consistent with the server.\n isSignalUnknownCredentialAvailable() {\n return !!this.capabilities.signalUnknownCredential;\n }\n // The browser can authenticate by displaying passkeys as part of autofill dialog, \n // instead of a prominent modal UI.\n isConditionalGetAvailable() {\n return !!this.capabilities.conditionalGet;\n }\n isConditionalCreateAvailable() {\n return !!this.capabilities.conditionalCreate;\n }\n // the browser can create a credential and authenticate with it cross-device using the hybrid protocol.\n isHybridTransportAvailable() {\n return !!this.capabilities.hybridTransport;\n }\n destroy() {\n controller.abort();\n }\n}\n/**\n * Visibly warn when we detect an issue related to a passkey provider intercepting WebAuthn API\n * calls\n */\nfunction warnOnBrokenImplementation(methodName, cause) {\n console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${methodName}. You should report this error to them.\\n`, cause);\n}\n/**\n * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented\n * errors in the spec was raised after calling `navigator.credentials.create()` or\n * `navigator.credentials.get()`:\n *\n * - `AbortError`\n * - `ConstraintError`\n * - `InvalidStateError`\n * - `NotAllowedError`\n * - `NotSupportedError`\n * - `SecurityError`\n * - `TypeError`\n * - `UnknownError`\n *\n * Error messages were determined through investigation of the spec to determine under which\n * scenarios a given error would be raised.\n */\nclass WebAuthnError extends Error {\n constructor({ message, code, cause, name, }) {\n super(message);\n this.name = name !== null && name !== void 0 ? name : cause.name;\n this.code = code;\n }\n}\nfunction isValidDomain(hostname) {\n return (\n // Consider localhost valid as well since it's okay wrt Secure Contexts\n hostname === 'localhost' ||\n /^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$/i.test(hostname));\n}\n\nclass AuthService {\n constructor() {\n this.configured = false;\n this.loginflow = null;\n this.navigationManager = null;\n this.flowEventBus = null;\n this.webauthnService = null;\n }\n static get Instance() {\n if (!AuthService.instance) {\n AuthService.instance = new AuthService();\n }\n return AuthService.instance;\n }\n ensureConfigured() {\n if (!this.configured) {\n throw new LoginflowError(\"NOT_CONFIGURED\", \"Auth.configure() must be called before using Auth methods\");\n }\n }\n ensureLoginflowInitialized() {\n if (!this.loginflow) {\n throw new LoginflowError(\"LOGINFLOW_NOT_INITIALIZED\", \"Call Auth.startLoginflow() first\");\n }\n }\n startLoginflowInternal(flowId_1) {\n return __awaiter(this, arguments, void 0, function* (flowId, skipHistoryTracking = false) {\n this.ensureConfigured();\n // Cleanup old instances before creating new ones\n if (this.webauthnService) {\n console.log(\"[AuthService] Cleaning up and aborting ongoing webauthn flows\");\n this.webauthnService.destroy();\n this.webauthnService = null;\n }\n if (this.loginflow) {\n console.log(\"[AuthService] Cleaning up old loginflow instance\");\n this.loginflow.cleanup();\n this.loginflow = null;\n }\n if (this.navigationManager) {\n console.log(\"[AuthService] Cleaning up old navigation manager instance\");\n this.navigationManager.destroy();\n this.navigationManager = null;\n }\n this.webauthnService = new WebAuthnService();\n this.webauthnService.detectCapabilities();\n // Create shared event bus for communication between Loginflow and NavigationManager\n this.flowEventBus = new FlowEventBus();\n // Create navigation manager with event bus\n // Pass a callback that restarts the flow when navigation is detected\n this.navigationManager = new NavigationManager(this.flowEventBus, () => __awaiter(this, void 0, void 0, function* () {\n console.log(\"[AuthService] Navigation restart triggered, restarting loginflow\");\n // Don't pass flowId - let it auto-detect from current URL\n // Don't skip history tracking - we need to keep history in sync with session storage\n yield this.startLoginflowInternal(undefined, false);\n }), skipHistoryTracking);\n // Initialize Loginflow with the shared event bus\n const result = yield Loginflow.init(flowId, this.flowEventBus);\n const config = store.getConfig();\n // Attempt to get public key credential options for conditional flow (autofill)\n // TODO: we can parse the render spec to search for inputs that has webauthn attribute to avoid sending this\n // request if the webauthn attribute is not available for autofill\n this.startPasskeyAuthentication(result.flowType, true);\n this.loginflow = result.sdk;\n const response = {\n flowType: result.flowType,\n isResumed: result.isResumed,\n state: result.state,\n render_spec: result.render_spec,\n auth_result: result.auth_result,\n };\n // Emit flow state change event\n if (config.onFlowStateChange) {\n config.onFlowStateChange({\n eventType: result.isResumed ? \"flow_resumed\" : \"flow_started\",\n flowType: result.flowType,\n state: result.state,\n render_spec: result.render_spec,\n auth_result: result.auth_result,\n isResumed: result.isResumed,\n });\n }\n return response;\n });\n }\n configure(config) {\n // Validate required fields\n if (!config.domain || !config.appId || !config.clientSecret) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"domain, appId, and clientSecret are required\");\n }\n store.setConfig(config);\n this.configured = true;\n }\n isAuthenticated() {\n this.ensureConfigured();\n return SessionService.Instance.isAuthenticated();\n }\n getCurrentSession() {\n this.ensureConfigured();\n return SessionService.Instance.getCurrentSession();\n }\n getAuthenticatedUser() {\n this.ensureConfigured();\n return SessionService.Instance.getAuthenticatedUser();\n }\n startLoginflow(flowId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.startLoginflowInternal(flowId, false);\n });\n }\n processLoginflowEvent(request) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n this.ensureConfigured();\n this.ensureLoginflowInitialized();\n const config = store.getConfig();\n const flowType = FlowTypeDetector.detect(config, location);\n // we need to check for credential_request if it's present it means this method is called\n // from autofill authentication ceremony. if it's not present it means it's called by\n // signin with passkey button\n if (request.event === \"signin_with_passkey\" &&\n !((_a = request.data) === null || _a === void 0 ? void 0 : _a[\"credential_request\"])) {\n const result = yield this.getPasskeyCredential(flowType, false);\n if (!result || !result.cred) {\n console.error(\"no credential returned by browser\");\n return { state: \"\" };\n }\n request.data = { credential_request: result.cred };\n }\n // here we need to check if the request contains conditional=true it means\n // it's triggered by conditional passkey creation flow but if it's not it's triggered from\n // register passkey button\n if (request.event === \"register_passkey\" &&\n !((_b = request.data) === null || _b === void 0 ? void 0 : _b[\"conditional\"])) {\n console.log(\"attempt to register a passkey\");\n const cred = yield this.createPasskeyCredential(flowType, false);\n if (!cred) {\n console.error(\"no credential created by browser\");\n return { state: \"\" };\n }\n request.data = { credential_creation_response: cred, conditional: false };\n }\n const response = yield this.loginflow.processEvent(request, (res) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if ((_a = res.data) === null || _a === void 0 ? void 0 : _a[\"conditional_create_enabled\"]) {\n console.log(\"attempt to register a passkey conditionally\");\n const registerRes = yield this.registerPasskey(flowType, true);\n if (registerRes) {\n // we don't show the ui after signup\n registerRes.render_spec = undefined;\n res.render_spec = undefined;\n }\n }\n }));\n console.log(\"render spec\", response.render_spec);\n // Emit flow state change event\n if (config.onFlowStateChange) {\n // Get current flow state from sessionStorage to get flowType\n const flowStateStr = sessionStorage.getItem(\"saasbase_loginflow_state\");\n let flowType = \"custom\";\n if (flowStateStr) {\n try {\n const flowState = JSON.parse(flowStateStr);\n flowType = flowState.flowType;\n }\n catch (e) {\n console.error(\"Failed to parse flow state:\", e);\n }\n }\n config.onFlowStateChange({\n eventType: \"flow_updated\",\n flowType: flowType,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n });\n }\n return response;\n });\n }\n getPasskeyCredential(flowType, useBrowserAutofill) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const options = yield ((_a = this.webauthnService) === null || _a === void 0 ? void 0 : _a.fetchPublicKeyCredentialRequestOptions(flowType, useBrowserAutofill));\n if (!options) {\n console.error(\"failed to fetch public key request options\");\n return null;\n }\n try {\n const cred = yield ((_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.startAuthentication(options, useBrowserAutofill));\n return { cred, options };\n }\n catch (err) {\n console.error(\"error starting authentication\", err);\n return null;\n }\n });\n }\n startPasskeyAuthentication(flowType_1) {\n return __awaiter(this, arguments, void 0, function* (flowType, useBrowserAutofill = false) {\n var _a, _b;\n const result = yield this.getPasskeyCredential(flowType, useBrowserAutofill);\n if (!result || !result.cred) {\n console.error(\"no credential found\");\n return;\n }\n const { cred, options } = result;\n try {\n const resp = yield this.processLoginflowEvent({\n event: \"signin_with_passkey\",\n data: { credential_request: cred },\n });\n if (((_a = resp.data) === null || _a === void 0 ? void 0 : _a[\"error\"]) === \"CredentialNotFound\") {\n if (options.rpId && cred.id) {\n (_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.signalUnknownCredential(options.rpId, cred.id);\n }\n else {\n console.log(\"missing rpId or credential id for signalUnknownCredential\");\n }\n }\n }\n catch (err) {\n console.error(\"failed to signin with passkey\", err);\n }\n });\n }\n createPasskeyCredential(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n try {\n const res = yield ((_a = this.webauthnService) === null || _a === void 0 ? void 0 : _a.fetchPublicKeyCredentialCreationOptions(flowType, conditional));\n if (!res) {\n console.warn(\"no credential creation option returned by webauthn service\");\n console.log(\"skipping conditional passkey registration...\");\n return;\n }\n return (_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.startRegistration(res, conditional);\n }\n catch (error) {\n console.log(\"error\", error);\n }\n });\n }\n registerPasskey(flowType_1) {\n return __awaiter(this, arguments, void 0, function* (flowType, conditional = false) {\n try {\n const cred = yield this.createPasskeyCredential(flowType, conditional);\n const response = yield this.processLoginflowEvent({\n event: \"register_passkey\",\n data: {\n credential_creation_response: cred,\n conditional: conditional,\n },\n });\n console.log(\"passkey creation res\", response);\n return response;\n }\n catch (error) {\n console.log(\"error\", error);\n }\n });\n }\n signOut() {\n this.ensureConfigured();\n // Clear session\n SessionService.Instance.clearSession();\n SessionService.Instance.cleanup();\n // Clear loginflow instance and cancel any pending operations\n if (this.loginflow) {\n this.loginflow.cleanup();\n this.loginflow = null;\n }\n // Clear navigation manager\n if (this.navigationManager) {\n this.navigationManager.destroy();\n this.navigationManager = null;\n }\n // Clear event bus\n if (this.flowEventBus) {\n this.flowEventBus.clear();\n this.flowEventBus = null;\n }\n // Refresh the page to clear any in-memory state\n window.location.reload();\n console.log(\"Refreshed the page to clear any in-memory state\");\n }\n}\n\nconst Auth = AuthService.Instance;\n\nexport { Auth, LoginflowError };\n//# sourceMappingURL=index.esm.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.3\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { Style } from \"@/types/styles\";\nimport { LitElement } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nexport abstract class BaseElement extends LitElement {\n @property({ type: Boolean }) shadow = false;\n\n constructor() {\n super();\n }\n protected parseJsonAttribute<T = unknown>(attrName: string): T {\n try {\n const raw = this.getAttribute(attrName);\n return raw ? JSON.parse(raw) : ({} as T);\n } catch {\n return {} as T;\n }\n }\n\n protected get sbStyle(): Style {\n return this.parseJsonAttribute<Style>(\"sb-style\");\n }\n protected getAttributesToExclude(): string[] {\n return [];\n }\n\n // Filter attributes based on exclusion rules\n protected getFilteredAttributes(): Record<string, string> {\n const attributes: Record<string, string> = {};\n Array.from(this.attributes).forEach((attr) => {\n if (!this.getAttributesToExclude().includes(attr.name)) {\n attributes[attr.name] = attr.value ?? \"\";\n }\n });\n return attributes;\n }\n\n protected isCustomPropertySet(property: string): boolean {\n const value = getComputedStyle(this).getPropertyValue(property).trim();\n return value !== \"inherit\" && value.length > 0;\n }\n\n protected applyCustomClass(\n variables: string[],\n selector: string,\n className = \"\",\n ): void {\n if (variables.some((variable) => this.isCustomPropertySet(variable))) {\n this.shadowRoot?.querySelector(selector)?.classList.add(className);\n }\n }\n\n protected moveAttributesToElement(\n target: HTMLElement,\n attributesToMove: string[] = [\"id\", \"class\"],\n ): void {\n if (!target) return;\n\n attributesToMove.forEach((attr) => {\n const value = this.getAttribute(attr);\n\n if (value !== null) {\n target.setAttribute(attr, value);\n this.removeAttribute(attr);\n }\n });\n }\n\n protected removeAttributesFromHost(\n attributes: string[] = [\"id\", \"class\"],\n ): void {\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n this.removeAttribute(attr);\n }\n });\n }\n\n private __initialAttributesCache: Record<string, string> | null = null;\n\n protected captureHostAttributes(): Record<string, string> {\n if (this.__initialAttributesCache) return this.__initialAttributesCache;\n\n const attrs: Record<string, string> = {};\n\n Array.from(this.attributes).forEach((attr) => {\n attrs[attr.name] = attr.value;\n });\n\n this.__initialAttributesCache = attrs;\n return attrs;\n }\n\n protected getHostClass(): string {\n return this.captureHostAttributes()[\"class\"] ?? \"\";\n }\n\n protected removeDuplicateContent() {\n const walker = document.createTreeWalker(\n this,\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: (node) => {\n if (node.nodeType === Node.COMMENT_NODE)\n return NodeFilter.FILTER_REJECT;\n if (node.nodeType === Node.TEXT_NODE && !node.textContent?.trim())\n return NodeFilter.FILTER_REJECT;\n return NodeFilter.FILTER_ACCEPT;\n },\n },\n );\n\n const seen = new Map<string, Node>();\n const nodesToRemove: Node[] = [];\n\n let node: Node | null;\n while ((node = walker.nextNode())) {\n let key: string;\n if (node.nodeType === Node.TEXT_NODE) {\n const text = node.textContent?.trim();\n if (!text) continue;\n key = `text:${text}`;\n } else if (node instanceof HTMLElement) {\n const attributes = Array.from(node.attributes)\n .map((attr) => `${attr.name}=${attr.value}`)\n .sort()\n .join(\":\");\n key = `element:${node.tagName}:${attributes}`;\n } else {\n continue;\n }\n\n if (seen.has(key)) {\n const firstNode = seen.get(key);\n if (firstNode?.parentNode) nodesToRemove.push(firstNode);\n seen.set(key, node);\n } else {\n seen.set(key, node);\n }\n }\n\n nodesToRemove.forEach((node) => node.parentNode?.removeChild(node));\n }\n\n protected moveLightDomChildrenInto(\n target: HTMLElement,\n specificNodes?: Node[],\n ): void {\n let nodesToMove: Node[];\n\n if (specificNodes?.length) {\n nodesToMove = specificNodes.filter(\n (node) =>\n this.contains(node) && node !== target && !node.contains(target),\n );\n\n // Remove existing duplicates in target\n nodesToMove.forEach((node) => {\n const existing = Array.from(target.childNodes).find((n) =>\n n.isEqualNode?.(node),\n );\n if (existing) target.removeChild(existing);\n });\n } else {\n nodesToMove = Array.from(this.childNodes).filter(\n (node) =>\n node !== target && !target.contains(node) && !node.contains(target),\n );\n }\n\n nodesToMove.forEach((node) => target.appendChild(node));\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\n@customElement(\"sb-layout\")\nexport class SaasBaseLayout extends LitElement {\n @state() private spec: string = \"\";\n\n @property({ attribute: false })\n set renderSpec(v: string) {\n this.spec = v;\n this.requestUpdate();\n }\n\n createRenderRoot() {\n return this; // light DOM\n }\n\n updated() {\n this.renderDynamicContent();\n }\n\n private renderDynamicContent() {\n if (!this.spec) return;\n\n const container = this.shadowRoot || this;\n const contentWrapper = container.querySelector(\n \"#dynamic-content\",\n ) as HTMLElement;\n\n if (contentWrapper) {\n contentWrapper.innerHTML = this.spec;\n\n // Important: Upgrade all custom elements so they get connected properly\n contentWrapper.querySelectorAll(\"*\").forEach((el) => {\n if (el.localName.includes(\"-\") && !customElements.get(el.localName)) {\n // If somehow not registered yet\n console.warn(`Element ${el.localName} not registered`);\n } else {\n customElements.upgrade(el);\n }\n });\n }\n }\n\n render() {\n return html`\n <sb-form\n child-id=\"sb-layout-form\"\n @sb-form:success=${this.handleSuccess}\n @sb-form:error=${this.handleError}\n >\n <div class=\"sb-relative sb-flex sb-overflow-x-hidden\">\n <div id=\"dynamic-content\"></div>\n </div>\n </sb-form>\n `;\n }\n\n private handleSuccess = (e: CustomEvent) => console.log(\"success\", e.detail);\n private handleError = (e: CustomEvent) => console.error(\"error\", e.detail);\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e,o){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.contextTarget=t,this.callback=e,this.subscribe=o??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction n(n){return n}export{n as createContext};\n//# sourceMappingURL=create-context.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.host,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t,s){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=s}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{if(t.context!==this.context)return;const s=t.contextTarget??t.composedPath()[0];s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{if(s.context!==this.context)return;if((s.contextTarget??s.composedPath()[0])===this.host)return;const e=new Set;for(const[s,{consumerHost:i}]of this.subscriptions)e.has(s)||(e.add(s),i.dispatchEvent(new t(this.context,i,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context,this.host))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import{ContextProvider as t}from\"../controllers/context-provider.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e({context:e}){return(n,i)=>{const r=new WeakMap;if(\"object\"==typeof i)return{get(){return n.get.call(this)},set(t){return r.get(this).setValue(t),n.set.call(this,t)},init(n){return r.set(this,new t(this,{context:e,initialValue:n})),n}};{n.constructor.addInitializer((n=>{r.set(n,new t(n,{context:e}))}));const o=Object.getOwnPropertyDescriptor(n,i);let s;if(void 0===o){const t=new WeakMap;s={get(){return t.get(this)},set(e){r.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=o.set;s={...o,set(e){r.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(n,i,s)}}}export{e as provide};\n//# sourceMappingURL=provide.js.map\n","import{ContextConsumer as t}from\"../controllers/context-consumer.js\";\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function c({context:c,subscribe:e}){return(o,n)=>{\"object\"==typeof n?n.addInitializer((function(){new t(this,{context:c,callback:t=>{o.set.call(this,t)},subscribe:e})})):o.constructor.addInitializer((o=>{new t(o,{context:c,callback:t=>{o[n]=t},subscribe:e})}))}}export{c as consume};\n//# sourceMappingURL=consume.js.map\n","import { EnvConfig } from \"@/types\";\nimport { createContext } from \"@lit/context\";\n\nexport const envContext = createContext<EnvConfig | null>(\"sb:env\");\n","// controller/auth-context.ts\nimport { createContext } from \"@lit/context\";\n\nexport interface AuthState {\n isAuthenticated: boolean;\n}\n\nexport const authContext = createContext<AuthState>(\"sb:auth\");\n","// src/context/customizations.ts\nimport { createContext } from \"@lit/context\";\nimport type { ICustomizations } from \"@/types\";\n\nexport const customizationsContext = createContext<ICustomizations | null>(\n \"customizations\"\n);\n","// src/context.ts\nimport { createContext } from \"@lit/context\";\n\nexport const renderSpecContext = createContext<string | null>(\n Symbol(\"renderSpecContext\"),\n);\n","//loaders\nexport const linearLoaderClass =\n \"sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar\";\n\nexport const dashboardWidthClass =\n \"sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]\";\nexport const modalWidthClass =\n \"sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]\";\n\nexport const modalContainerClass =\n \"sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto\";\n\nexport const modalLayoutClass =\n \"sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden\";\n//dashboard\nexport const dashboardClass = \"sb-justify-self-center sb-rotate-0\";\n\nexport const pageClasses = \"sb-border-0 sb-bg-background !sb-m-0\";\n\nexport const modalClasses = \"sb-border sb-rounded-2xl sb-relative sb-py-6\";\n\nexport const tabTriggerClass =\n \"!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted\";\n\nexport const horizontalTabClass =\n \"!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6\";\n\nexport const verticalTabClass = \"!sb-w-[160px] sb-gap-4 \";\n\nexport const tailwindSafeClasses =\n \"sb-w-screen sm:sb-w-[375px] sb-p-[40px_24px] sm:sb-shadow-[0_4px_4px_rgba(0,0,0,0.25)] sb-bg-background sm:sb-border sm:sb-border-border sm:sb-rounded-[8px] font-geist\";\n","export enum ELEMENT_IDS {\n USER_PROFILE_CARD_HEADER_CONTAINER = \"sb-user-profile-card-header-container\",\n USER_PROFILE_CONTAINER = \"sb-user-profile\",\n USER_PROFILE_SIDEBAR = \"sb-user-profile-sidebar-tabs\",\n USER_PROFILE_SIDEBAR_TABS = \"sb-user-profile-sidebar-tabs\",\n USER_PROFILE_SIDEBAR_BURGER_MENU = \"sb-user-profile-sidebar-burger-menu\",\n USER_PROFILE_INPUT_LABEL = \"sb-user-profile-input-label\",\n USER_PROFILE_INPUT_FIELD = \"sb-user-profile-input-field\",\n USER_PROFILE_EDIT_FORM = \"sb-user-profile-edit-form\",\n USER_PROFILE_CARD_CONTAINER = \"sb-user-profile-card-container\",\n USER_PROFILE_EDITABLE_INPUT_FIELD = \"sb-user-profile-editable-input-field\",\n USER_PROFILE_DEFAULT_BUTTON = \"sb-user-profile-default-button\",\n USER_PROFILE_OUTLINE_BUTTON = \"sb-user-profile-outline-button\",\n USER_PROFILE_OTP = \"sb-user-profile-otp\",\n USER_PROFILE_EDIT_BUTTON = \"sb-user-profile-edit-button\",\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const CLASS_PART_SEPARATOR = '-';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift();\n }\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n const conflicts = conflictingClassGroups[classGroupId] || [];\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];\n }\n return conflicts;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, classPartObject) => {\n if (classParts.length === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[0];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart;\n }\n if (classPartObject.validators.length === 0) {\n return undefined;\n }\n const classRest = classParts.join(CLASS_PART_SEPARATOR);\n return classPartObject.validators.find(({\n validator\n }) => validator(classRest))?.classGroupId;\n};\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nconst getGroupIdForArbitraryProperty = className => {\n if (arbitraryPropertyRegex.test(className)) {\n const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property;\n }\n }\n};\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n prefix\n } = config;\n const classMap = {\n nextPart: new Map(),\n validators: []\n };\n const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);\n prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {\n processClassesRecursively(classGroup, classMap, classGroupId, theme);\n });\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n classGroup.forEach(classDefinition => {\n if (typeof classDefinition === 'string') {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n return;\n }\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId\n });\n return;\n }\n Object.entries(classDefinition).forEach(([key, classGroup]) => {\n processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n });\n });\n};\nconst getPart = (classPartObject, path) => {\n let currentClassPartObject = classPartObject;\n path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {\n if (!currentClassPartObject.nextPart.has(pathPart)) {\n currentClassPartObject.nextPart.set(pathPart, {\n nextPart: new Map(),\n validators: []\n });\n }\n currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n });\n return currentClassPartObject;\n};\nconst isThemeGetter = func => func.isThemeGetter;\nconst getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {\n if (!prefix) {\n return classGroupEntries;\n }\n return classGroupEntries.map(([classGroupId, classGroup]) => {\n const prefixedClassGroup = classGroup.map(classDefinition => {\n if (typeof classDefinition === 'string') {\n return prefix + classDefinition;\n }\n if (typeof classDefinition === 'object') {\n return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));\n }\n return classDefinition;\n });\n return [classGroupId, prefixedClassGroup];\n });\n};\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = new Map();\n let previousCache = new Map();\n const update = (key, value) => {\n cache.set(key, value);\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = new Map();\n }\n };\n return {\n get(key) {\n let value = cache.get(key);\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache.get(key)) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (cache.has(key)) {\n cache.set(key, value);\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst createParseClassName = config => {\n const {\n separator,\n experimentalParseClassName\n } = config;\n const isSeparatorSingleCharacter = separator.length === 1;\n const firstSeparatorCharacter = separator[0];\n const separatorLength = separator.length;\n // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n const parseClassName = className => {\n const modifiers = [];\n let bracketDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n for (let index = 0; index < className.length; index++) {\n let currentCharacter = className[index];\n if (bracketDepth === 0) {\n if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + separatorLength;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') {\n bracketDepth++;\n } else if (currentCharacter === ']') {\n bracketDepth--;\n }\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);\n const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n };\n };\n if (experimentalParseClassName) {\n return className => experimentalParseClassName({\n className,\n parseClassName\n });\n }\n return parseClassName;\n};\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst sortModifiers = modifiers => {\n if (modifiers.length <= 1) {\n return modifiers;\n }\n const sortedModifiers = [];\n let unsortedModifiers = [];\n modifiers.forEach(modifier => {\n const isArbitraryVariant = modifier[0] === '[';\n if (isArbitraryVariant) {\n sortedModifiers.push(...unsortedModifiers.sort(), modifier);\n unsortedModifiers = [];\n } else {\n unsortedModifiers.push(modifier);\n }\n });\n sortedModifiers.push(...unsortedModifiers.sort());\n return sortedModifiers;\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n let hasPostfixModifier = Boolean(maybePostfixModifierPosition);\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n const variantModifier = sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.includes(classId)) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nfunction twJoin() {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < arguments.length) {\n if (argument = arguments[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\nconst toValue = mix => {\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nfunction createTailwindMerge(createConfigFirst, ...createConfigRest) {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall = initTailwindMerge;\n function initTailwindMerge(classList) {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n }\n function tailwindMerge(classList) {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n }\n return function callTailwindMerge() {\n return functionToCall(twJoin.apply(null, arguments));\n };\n}\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || [];\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:([a-z-]+):)?(.+)\\]$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly);\nconst isNumber = value => Boolean(value) && !Number.isNaN(Number(value));\nconst isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber);\nconst isInteger = value => Boolean(value) && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);\nconst isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever);\nconst imageLabels = /*#__PURE__*/new Set(['image', 'url']);\nconst isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow);\nconst isAny = () => true;\nconst getIsArbitraryValue = (value, label, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return typeof label === 'string' ? result[1] === label : label.has(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isInteger,\n isLength,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n const colors = fromTheme('colors');\n const spacing = fromTheme('spacing');\n const blur = fromTheme('blur');\n const brightness = fromTheme('brightness');\n const borderColor = fromTheme('borderColor');\n const borderRadius = fromTheme('borderRadius');\n const borderSpacing = fromTheme('borderSpacing');\n const borderWidth = fromTheme('borderWidth');\n const contrast = fromTheme('contrast');\n const grayscale = fromTheme('grayscale');\n const hueRotate = fromTheme('hueRotate');\n const invert = fromTheme('invert');\n const gap = fromTheme('gap');\n const gradientColorStops = fromTheme('gradientColorStops');\n const gradientColorStopPositions = fromTheme('gradientColorStopPositions');\n const inset = fromTheme('inset');\n const margin = fromTheme('margin');\n const opacity = fromTheme('opacity');\n const padding = fromTheme('padding');\n const saturate = fromTheme('saturate');\n const scale = fromTheme('scale');\n const sepia = fromTheme('sepia');\n const skew = fromTheme('skew');\n const space = fromTheme('space');\n const translate = fromTheme('translate');\n const getOverscroll = () => ['auto', 'contain', 'none'];\n const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing];\n const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];\n const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength];\n const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue];\n const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];\n const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'];\n const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];\n const getZeroAndEmpty = () => ['', '0', isArbitraryValue];\n const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];\n return {\n cacheSize: 500,\n separator: ':',\n theme: {\n colors: [isAny],\n spacing: [isLength, isArbitraryLength],\n blur: ['none', '', isTshirtSize, isArbitraryValue],\n brightness: getNumberAndArbitrary(),\n borderColor: [colors],\n borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],\n borderSpacing: getSpacingWithArbitrary(),\n borderWidth: getLengthWithEmptyAndArbitrary(),\n contrast: getNumberAndArbitrary(),\n grayscale: getZeroAndEmpty(),\n hueRotate: getNumberAndArbitrary(),\n invert: getZeroAndEmpty(),\n gap: getSpacingWithArbitrary(),\n gradientColorStops: [colors],\n gradientColorStopPositions: [isPercent, isArbitraryLength],\n inset: getSpacingWithAutoAndArbitrary(),\n margin: getSpacingWithAutoAndArbitrary(),\n opacity: getNumberAndArbitrary(),\n padding: getSpacingWithArbitrary(),\n saturate: getNumberAndArbitrary(),\n scale: getNumberAndArbitrary(),\n sepia: getZeroAndEmpty(),\n skew: getNumberAndArbitrary(),\n space: getSpacingWithArbitrary(),\n translate: getSpacingWithArbitrary()\n },\n classGroups: {\n // Layout\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', 'video', isArbitraryValue]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isTshirtSize]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': getBreaks()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': getBreaks()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: [...getPositions(), isArbitraryValue]\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: getOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': getOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': getOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: getOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': getOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': getOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: [inset]\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': [inset]\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': [inset]\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: [inset]\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: [inset]\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: [inset]\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: [inset]\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: [inset]\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: [inset]\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: ['auto', isInteger, isArbitraryValue]\n }],\n // Flexbox and Grid\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: getSpacingWithAutoAndArbitrary()\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['wrap', 'wrap-reverse', 'nowrap']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: ['1', 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: getZeroAndEmpty()\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: getZeroAndEmpty()\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: ['first', 'last', 'none', isInteger, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': [isAny]\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: ['auto', {\n span: ['full', isInteger, isArbitraryValue]\n }, isArbitraryValue]\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': [isAny]\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: ['auto', {\n span: [isInteger, isArbitraryValue]\n }, isArbitraryValue]\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: [gap]\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': [gap]\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': [gap]\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: ['normal', ...getAlign()]\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': ['start', 'end', 'center', 'stretch']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...getAlign(), 'baseline']\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline']\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': [...getAlign(), 'baseline']\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: [padding]\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: [padding]\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: [padding]\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: [padding]\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: [padding]\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: [padding]\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: [padding]\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: [padding]\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: [padding]\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: [margin]\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: [margin]\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: [margin]\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: [margin]\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: [margin]\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: [margin]\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: [margin]\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: [margin]\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: [margin]\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x': [{\n 'space-x': [space]\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y': [{\n 'space-y': [space]\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y-reverse': ['space-y-reverse'],\n // Sizing\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit']\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', {\n screen: [isTshirtSize]\n }, isTshirtSize]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Size\n * @see https://tailwindcss.com/docs/size\n */\n size: [{\n size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']\n }],\n // Typography\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', isTshirtSize, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isAny]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': ['none', isNumber, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryValue]\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['none', 'disc', 'decimal', isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: [colors]\n }],\n /**\n * Placeholder Opacity\n * @see https://tailwindcss.com/docs/placeholder-opacity\n */\n 'placeholder-opacity': [{\n 'placeholder-opacity': [opacity]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: [colors]\n }],\n /**\n * Text Opacity\n * @see https://tailwindcss.com/docs/text-opacity\n */\n 'text-opacity': [{\n 'text-opacity': [opacity]\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...getLineStyles(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: ['auto', 'from-font', isLength, isArbitraryLength]\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': ['auto', isLength, isArbitraryValue]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: [colors]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: getSpacingWithArbitrary()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryValue]\n }],\n // Backgrounds\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Opacity\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/background-opacity\n */\n 'bg-opacity': [{\n 'bg-opacity': [opacity]\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: [...getPositions(), isArbitraryPosition]\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: ['no-repeat', {\n repeat: ['', 'x', 'y', 'round', 'space']\n }]\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: ['auto', 'cover', 'contain', isArbitrarySize]\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: [colors]\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: [gradientColorStops]\n }],\n // Borders\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: [borderRadius]\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': [borderRadius]\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': [borderRadius]\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': [borderRadius]\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': [borderRadius]\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': [borderRadius]\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': [borderRadius]\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': [borderRadius]\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': [borderRadius]\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': [borderRadius]\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': [borderRadius]\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': [borderRadius]\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': [borderRadius]\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': [borderRadius]\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': [borderRadius]\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: [borderWidth]\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': [borderWidth]\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': [borderWidth]\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': [borderWidth]\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': [borderWidth]\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': [borderWidth]\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': [borderWidth]\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': [borderWidth]\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': [borderWidth]\n }],\n /**\n * Border Opacity\n * @see https://tailwindcss.com/docs/border-opacity\n */\n 'border-opacity': [{\n 'border-opacity': [opacity]\n }],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...getLineStyles(), 'hidden']\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x': [{\n 'divide-x': [borderWidth]\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y': [{\n 'divide-y': [borderWidth]\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Divide Opacity\n * @see https://tailwindcss.com/docs/divide-opacity\n */\n 'divide-opacity': [{\n 'divide-opacity': [opacity]\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/divide-style\n */\n 'divide-style': [{\n divide: getLineStyles()\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: [borderColor]\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': [borderColor]\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': [borderColor]\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': [borderColor]\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': [borderColor]\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': [borderColor]\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': [borderColor]\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': [borderColor]\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': [borderColor]\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: [borderColor]\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: ['', ...getLineStyles()]\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isLength, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: [isLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: [colors]\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w': [{\n ring: getLengthWithEmptyAndArbitrary()\n }],\n /**\n * Ring Width Inset\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/ring-color\n */\n 'ring-color': [{\n ring: [colors]\n }],\n /**\n * Ring Opacity\n * @see https://tailwindcss.com/docs/ring-opacity\n */\n 'ring-opacity': [{\n 'ring-opacity': [opacity]\n }],\n /**\n * Ring Offset Width\n * @see https://tailwindcss.com/docs/ring-offset-width\n */\n 'ring-offset-w': [{\n 'ring-offset': [isLength, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://tailwindcss.com/docs/ring-offset-color\n */\n 'ring-offset-color': [{\n 'ring-offset': [colors]\n }],\n // Effects\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow-color\n */\n 'shadow-color': [{\n shadow: [isAny]\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [opacity]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': getBlendModes()\n }],\n // Filters\n /**\n * Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: ['', 'none']\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: [blur]\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [brightness]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [contrast]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue]\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: [grayscale]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [hueRotate]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: [invert]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [saturate]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: [sepia]\n }],\n /**\n * Backdrop Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': ['', 'none']\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': [blur]\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [brightness]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [contrast]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': [grayscale]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [hueRotate]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': [invert]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [opacity]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [saturate]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': [sepia]\n }],\n // Tables\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': [borderSpacing]\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': [borderSpacing]\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': [borderSpacing]\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // Transitions and Animation\n /**\n * Tranisition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue]\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: getNumberAndArbitrary()\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: getNumberAndArbitrary()\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue]\n }],\n // Transforms\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: ['', 'gpu', 'none']\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: [scale]\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': [scale]\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': [scale]\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: [isInteger, isArbitraryValue]\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': [translate]\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': [translate]\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': [skew]\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': [skew]\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue]\n }],\n // Interactivity\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: ['auto', colors]\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue]\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: [colors]\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['none', 'auto']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', 'y', 'x', '']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue]\n }],\n // SVG\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: [colors, 'none']\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: [colors, 'none']\n }],\n // Accessibility\n /**\n * Screen Readers\n * @see https://tailwindcss.com/docs/screen-readers\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n }\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n separator,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'separator', separator);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n for (const configKey in override) {\n overrideConfigProperties(baseConfig[configKey], override[configKey]);\n }\n for (const key in extend) {\n mergeConfigProperties(baseConfig[key], extend[key]);\n }\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = (baseObject[key] || []).concat(mergeValue);\n }\n }\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { BREAKPOINTS } from \"@/constants\";\nimport { Breakpoints, Style } from \"@/types\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n// Merge class names safely with Tailwind merge\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n// Convert style object to inline style string\nexport function mapStyles(style: Style): string {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n return Object.entries(style)\n .filter(([_, v]) => typeof v !== \"object\" && v != null)\n .map(([k, v]) => `${k}: ${v};`)\n .join(\" \");\n}\n// Change the current theme on the document\nexport function changeTheme(theme: \"light\" | \"dark\") {\n document.documentElement.setAttribute(\"data-theme\", theme);\n}\n\n// Initialize theme to light if not set\nexport function initTheme() {\n const currentTheme = document.documentElement.getAttribute(\"data-theme\");\n if (!currentTheme || (currentTheme !== \"light\" && currentTheme !== \"dark\")) {\n changeTheme(\"light\");\n }\n}\n\n// Get current theme\nexport function getTheme(): \"light\" | \"dark\" {\n return document.documentElement.getAttribute(\"data-theme\")! as\n | \"light\"\n | \"dark\";\n}\n\n// Resolve image URL based on theme\nexport function resolveImageUrl(\n url: string,\n theme: \"light\" | \"dark\" | string,\n): string {\n return url.includes(\"{{theme}}\") ? url.replace(\"{{theme}}\", theme) : url;\n}\n\n// Splits a Style object into base and responsive\nexport function splitStyle(style: Style) {\n const base: Style = {};\n const responsive: Record<Breakpoints, Style> = {} as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n for (const key in style) {\n const value = style[key];\n if (value == null) continue;\n\n if (key in BREAKPOINTS && typeof value === \"object\") {\n responsive[key as Breakpoints] = value as Style;\n } else {\n base[key] = value as string | number;\n }\n }\n\n return { base, responsive };\n}\n\n// helper: merges custom breakpoints with defaults\nexport function mergeBreakpoints(\n custom?: Partial<Record<Breakpoints, string>>,\n): Record<Breakpoints, string> {\n return { ...BREAKPOINTS, ...(custom ?? {}) };\n}\n\nexport function injectResponsiveStyles(\n id: string,\n responsive: Record<Breakpoints, Style>,\n customBreakpoints?: Partial<Record<Breakpoints, string>>,\n) {\n const breakpoints = mergeBreakpoints(customBreakpoints);\n let css = \"\";\n\n for (const bp in responsive) {\n const width = breakpoints[bp as Breakpoints];\n const mediaQuery = `(min-width: ${width})`;\n\n const rules = Object.entries(responsive[bp as Breakpoints])\n .map(([k, v]) => `${k}: ${v} !important;`)\n .join(\" \");\n\n css += `@media ${mediaQuery} { #${id} { ${rules} } }\\n`;\n }\n\n let styleTag = document.getElementById(\n `responsive-style-${id}`,\n ) as HTMLStyleElement;\n\n if (!styleTag) {\n styleTag = document.createElement(\"style\");\n styleTag.id = `responsive-style-${id}`;\n document.head.appendChild(styleTag);\n }\n\n styleTag.textContent = css;\n}\n\n// utils/layoutUtils.ts\nexport function nextPaint(): Promise<void> {\n return new Promise((resolve) => {\n requestAnimationFrame(() => requestAnimationFrame(() => resolve()));\n });\n}\n\n/**\n * Updates flex widths of buttons:\n * - Last row normally fixed width\n * - Other rows flex-grow: 1\n * - If last row === first row, last row grows instead\n */\n// export async function updateSocialLoginBtnWidths(buttons: HTMLElement[]) {\n// if (!buttons.length) return;\n\n// await nextPaint(); // wait for layout to settle\n\n// // Detect first row\n// let firstTop: number | null = null;\n// const firstRow: HTMLElement[] = [];\n// for (const btn of buttons) {\n// const { top } = btn.getBoundingClientRect();\n// if (firstTop === null) firstTop = top;\n// if (top !== firstTop) break;\n// firstRow.push(btn);\n// }\n\n// if (!firstRow.length) return;\n\n// const rectWidth = firstRow[0].getBoundingClientRect().width;\n// const width = `${rectWidth}px`;\n\n// const isSingleRow = firstRow.length === buttons.length; // all buttons are in the first row\n\n// // Apply width to all rows\n// buttons.forEach((b, i) => {\n// if (isSingleRow) {\n// b.style.flexBasis = \"0\";\n// b.style.flexGrow = \"1\"; // all buttons grow if single row\n// } else {\n// b.style.flexGrow = \"0\";\n// b.style.flexBasis = width;\n// }\n// });\n\n// await nextPaint(); // ensure the browser repaints with updated flex-basis\n// }\n\n// export async function updateSocialLoginBtnWidths(\n// container: HTMLElement,\n// buttons: HTMLElement[]\n// ) {\n// if (!buttons.length) return;\n\n// await nextPaint();\n\n// const containerWidth = container.offsetWidth;\n// const buttonCount = buttons.length;\n// const minButtonWidth = 50; // px\n// const gap = 8; // px, must match --sso-gap (0.5rem)\n\n// // Compute max number of buttons that can fit in one row (considering gaps)\n// let cols = Math.floor((containerWidth + gap) / (minButtonWidth + gap));\n// cols = Math.max(1, Math.min(cols, buttonCount)); // at least 1, at most total buttons\n\n// // Set CSS vars\n// container.style.setProperty(\"--sso-cols\", String(cols));\n// container.style.setProperty(\"--sso-gap\", `${gap}px`);\n// container.style.setProperty(\n// \"--sso-item-width\",\n// `calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))`\n// );\n\n// console.log(\n// `[updateSocialLoginBtnWidths] container=${containerWidth}px, cols=${cols}, totalButtons=${buttonCount}`\n// );\n// }\n\nexport async function updateSocialLoginBtnWidths(\n container: HTMLElement,\n buttons: HTMLElement[],\n) {\n if (!buttons.length) return;\n\n await nextPaint();\n\n const containerWidth = container.offsetWidth;\n const buttonCount = buttons.length;\n const minButtonWidth = 60; // px\n const gap = 8; // px\n\n let bestCols = 1;\n let bestItemWidth = 0;\n let bestPriority = -1; // higher is better\n\n for (let cols = 1; cols <= buttonCount; cols++) {\n const totalGap = gap * (cols - 1);\n const itemWidth = (containerWidth - totalGap) / cols;\n const lastRow = buttonCount % cols;\n\n if (itemWidth < minButtonWidth) continue; // too small, skip\n\n // Determine priority\n let priority = 0;\n if (lastRow === 0 && cols > bestCols)\n priority = bestPriority + 1; // full rows → best\n else if (lastRow >= 2)\n priority = 2; // last row ≥ 2 → good\n else continue; // lastRow = 1 → invalid\n\n // Choose if higher priority OR same priority but larger item width\n if (\n priority > bestPriority ||\n (priority === bestPriority && itemWidth > bestItemWidth)\n ) {\n bestCols = cols;\n bestItemWidth = itemWidth;\n bestPriority = priority;\n }\n }\n\n // Set CSS vars\n container.style.setProperty(\"--sso-cols\", String(bestCols));\n container.style.setProperty(\"--sso-gap\", `${gap}px`);\n container.style.setProperty(\n \"--sso-item-width\",\n `calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))`,\n );\n}\n\nexport function deepMerge<\n T extends Record<string, any>,\n U extends Record<string, any>,\n>(target: T, source: U): T & U {\n const result: any = { ...target };\n\n for (const key in source) {\n const sourceVal = source[key];\n const targetVal = result[key];\n\n if (\n sourceVal &&\n typeof sourceVal === \"object\" &&\n !Array.isArray(sourceVal)\n ) {\n result[key] = deepMerge(\n (targetVal ?? {}) as Record<string, any>,\n sourceVal as Record<string, any>,\n );\n } else {\n result[key] = sourceVal;\n }\n }\n\n return result as T & U;\n}\n","import { ICustomizationOptions, ICustomizations, Style } from \"@/types\";\nimport { cn } from \"./styles\";\n\n// Maps alignment string to CSS flex alignment\nexport function mapAlignment(alignment: string) {\n return (\n { start: \"flex-start\", center: \"center\", end: \"flex-end\" }[alignment] ||\n \"flex-start\"\n );\n}\n\n// Maps a button variant to its customization object\nexport function mapBtnToCustomizedStyle(\n variant:\n | \"secondary\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"outline\"\n | \"ghost\",\n customizations: ICustomizations,\n): ICustomizationOptions | undefined {\n return {\n default: customizations.byType?.buttons?.defaultButton,\n secondary: customizations.byType?.buttons?.secondaryButton,\n link: customizations.byType?.buttons?.linkButton,\n destructive: customizations.byType?.buttons?.destructiveButton,\n ghost: customizations.byType?.buttons?.ghostButton,\n outline: customizations.byType?.buttons?.outlineButton,\n }[variant];\n}\n\n// Applies customizations to class and style, respecting root container, type, and ID\n//TO DO: Check everything works with CSSStyleDeclaration as well\nexport function applyCustomizations(\n defaultClass: string,\n defaultStyle?: Style | CSSStyleDeclaration,\n typeCustomization?: ICustomizationOptions,\n elementId?: string,\n customizations?: ICustomizations,\n isRootContainer: boolean = false,\n): { class: string; style: Style } {\n let finalClass = defaultClass || \"\";\n let finalStyle = { ...defaultStyle };\n\n // Apply global font from root container\n if (isRootContainer && customizations?.config?.font) {\n finalClass = cn(finalClass, customizations.config.font);\n }\n\n const mergeCustomization = (cust?: ICustomizationOptions) => {\n if (!cust) return;\n const { class: cClass, style: cStyle, font: cFont, rule = \"merge\" } = cust;\n if (rule === \"override\") {\n finalClass = cFont || cClass || \"\";\n finalStyle = cStyle || {};\n } else {\n finalClass = cn(finalClass, cClass, cFont);\n finalStyle = { ...finalStyle, ...cStyle };\n }\n };\n\n mergeCustomization(typeCustomization);\n\n if (elementId && customizations?.byId?.[elementId]) {\n mergeCustomization(customizations.byId[elementId]);\n }\n\n return { class: finalClass, style: finalStyle };\n}\n\n// * ====================================================================== * //\n\nconst RAND_STR_CHARS = \"abcdefghijklmnopqrstuvwxyz0123456789\";\nconst RAND_STR_LENGTH = 6;\n\nfunction genRandStr(length?: number) {\n let rand = \"\";\n\n for (let i = 0; i < (length ?? RAND_STR_LENGTH); i++) {\n rand += RAND_STR_CHARS.charAt(\n Math.floor(Math.random() * RAND_STR_CHARS.length),\n );\n }\n\n return rand;\n}\n\nexport const genRandSeed = () => genRandStr();\n","export function decodeBase64Svg(icon: string): string | null {\n if (!icon?.startsWith(\"data:image/svg+xml;base64,\")) {\n return null;\n }\n\n try {\n const base64 = icon.replace(\"data:image/svg+xml;base64,\", \"\");\n return atob(base64);\n } catch (e) {\n console.error(\"Invalid base64 SVG:\", e);\n return null;\n }\n}\n\nexport function resolveIconSource(icon: string): string {\n if (/^https?:\\/\\//.test(icon)) {\n return icon;\n }\n\n if (icon?.startsWith(\"data:image/svg+xml;base64,\")) {\n return icon;\n }\n\n return `data:image/svg+xml;base64,${icon}`;\n}\n","import { LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { provide } from \"@lit/context\";\nimport {\n envContext,\n authContext,\n AuthState,\n renderSpecContext,\n} from \"@/context\";\nimport { EnvConfig, RenderSpec } from \"@/types\";\nimport { initTheme } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\n@customElement(\"sb-provider\")\nexport class SbProvider extends LitElement {\n createRenderRoot() {\n return this;\n }\n\n /**\n * ENV now comes from a property instead of getEnvConfig()\n */\n @property({ type: Object })\n @provide({ context: envContext })\n env: EnvConfig | null = null;\n\n /**\n * Auth state\n */\n @state()\n @provide({ context: authContext })\n auth: AuthState = { isAuthenticated: false };\n\n @state()\n @provide({ context: renderSpecContext })\n renderSpec: string | null = null;\n\n /**\n * Enable/disable automatic redirect for authenticated users on auth pages.\n */\n @property({ type: Boolean })\n autoRedirect: boolean = true;\n\n connectedCallback(): void {\n super.connectedCallback();\n initTheme();\n\n const waitForEnv = async () => {\n while (!this.env || !this.env.domain) {\n await new Promise((res) => setTimeout(res, 20));\n }\n\n Auth.configure({\n domain: this.env.domain,\n appId: this.env.appId,\n clientSecret: this.env.clientSecret ?? \"\",\n locale: this.env.locale,\n signinUrl: this.env.signinUrl,\n signupUrl: this.env.signupUrl,\n onFlowStateChange: (event) => {\n if (event.render_spec) {\n this.renderSpec = event.render_spec;\n }\n },\n });\n\n this.refreshAuthState();\n };\n\n waitForEnv().catch((err) =>\n console.error(\"Error initializing SbProvider:\", err),\n );\n }\n\n updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n\n if (changedProperties.has(\"env\")) {\n // Reconfigure SDK if env changes\n if (this.env?.domain) {\n Auth.configure({\n domain: this.env.domain,\n appId: this.env.appId,\n clientSecret: this.env.clientSecret ?? \"\",\n locale: this.env.locale,\n signinUrl: this.env.signinUrl,\n signupUrl: this.env.signupUrl,\n onFlowStateChange: (event) => {\n if (event.render_spec) {\n this.renderSpec = event.render_spec;\n }\n },\n });\n }\n }\n\n if (changedProperties.has(\"auth\")) {\n this.handleAuthStateChange();\n }\n }\n\n private handleAuthStateChange(): void {\n if (!this.autoRedirect || !this.auth.isAuthenticated) return;\n if (!this.env) return;\n\n const currentPath = window.location.pathname;\n const authPageUrls: string[] = [this.env.signinUrl, this.env.signupUrl];\n const isOnAuthPage = authPageUrls.some((authUrl) =>\n currentPath.includes(authUrl),\n );\n\n if (isOnAuthPage) {\n const qs = new URLSearchParams(window.location.search);\n const redirect_url = qs.get(\"redirect_url\");\n const signinRedirectUrl: string =\n redirect_url || this.env.signinRedirectUrl || \"/\";\n window.location.href = signinRedirectUrl;\n }\n }\n\n private refreshAuthState() {\n this.auth = { isAuthenticated: Auth.isAuthenticated() };\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState } from \"@/context\";\n\n@customElement(\"sb-signed-out\")\nexport class SignedOut extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n render() {\n if (!this.auth) return nothing;\n\n return html`\n <div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState } from \"@/context\";\n\n@customElement(\"sb-signed-in\")\nexport class SignedIn extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n render() {\n if (!this.auth) return nothing;\n\n return html`\n <div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState, envContext } from \"@/context\";\nimport { EnvConfig } from \"@/types\";\n\n@customElement(\"sb-authenticated\")\nexport class SbAuthenticated extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n /**\n * The URL to redirect to if the user is not authenticated.\n * Defaults to environment variable, can be overridden via property.\n */\n\n @property({ type: String })\n redirectUrl: string = \"\";\n\n @consume({ context: envContext })\n @property({ attribute: false })\n env: EnvConfig | null = null;\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n render() {\n if (!this.auth) return nothing;\n\n if (!this.auth.isAuthenticated) {\n // Redirect to the given URL\n window.location.href = this.redirectUrl || this.env?.signinUrl!;\n return nothing;\n }\n\n return html`${this._cachedChildren}`;\n }\n}\n","import { TemplateResult } from \"lit-html\";\n\nexport enum USER_PROFILE_TAB_VALUES {\n PROFILE = \"Profile\",\n SECURITY = \"Security\",\n APPEARANCE = \"Appearance\",\n NOTIFICATION = \"Notification\",\n}\n\nexport enum USER_PROFILE_TAB_LIST {\n PROFILE = \"Profile\",\n SECURITY = \"Security\",\n APPEARANCE = \"Appearance\",\n NOTIFICATION = \"Notification\",\n}\n\nexport enum USER_PROFILE_MODE {\n MODAL = \"MODAL\",\n PAGE = \"PAGE\",\n}\n\nexport enum USER_PROFILE_SIDEBAR_DISPLAY_TYPE {\n BURGER = \"BURGER\",\n REGULAR = \"REGULAR\",\n}\n\nexport enum USER_PROFILE_ORIENTATION {\n VERTICAL = \"VERTICAL\",\n HORIZONTAL = \"HORIZONTAL\",\n}\n\nexport enum USER_PROFILE_WIDGETS_LAYOUT {\n COLUMN = \"COLUMN\",\n ROW = \"ROW\",\n}\n\nexport interface IProfileContentCustomizations {\n account?: IProfileWidgetCustomization;\n personalInfo?: IProfileWidgetCustomization;\n locations?: IProfileWidgetCustomization;\n urls?: IProfileWidgetCustomization;\n}\n\nexport interface IProfileWidgetCustomization {\n icon?: HTMLElement | TemplateResult | Element;\n title?: string;\n}\n","import { svg } from \"lit\";\n\nexport function editIcon() {\n return svg`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"sb-text-foreground\"\n\n >\n <path\n d=\"M10.0007 3.33333L12.6673 6M14.1166 4.54126C14.4691 4.18888 14.6671 3.71091 14.6672 3.2125C14.6673 2.71409 14.4693 2.23607 14.1169 1.8836C13.7646 1.53112 13.2866 1.33307 12.7882 1.33301C12.2898 1.33295 11.8117 1.53088 11.4593 1.88326L2.56194 10.7826C2.40715 10.9369 2.29268 11.127 2.22861 11.3359L1.34794 14.2373C1.33071 14.2949 1.32941 14.3562 1.34417 14.4145C1.35894 14.4728 1.38922 14.5261 1.4318 14.5686C1.47439 14.6111 1.52769 14.6413 1.58605 14.656C1.6444 14.6707 1.70565 14.6693 1.76327 14.6519L4.66527 13.7719C4.87405 13.7084 5.06406 13.5947 5.21861 13.4406L14.1166 4.54126Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.33\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function accountIcon() {\n return svg`<svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.001 2.16699C11.8485 2.16699 13.3621 3.62252 13.4551 5.44727L13.46 5.625C13.4518 7.49878 11.988 9.0097 10.125 9.0752H10.085C10.0257 9.07061 9.96647 9.07024 9.91016 9.07422C7.99672 9.00424 6.54297 7.49098 6.54297 5.625C6.54315 3.71807 8.09404 2.16717 10.001 2.16699Z\"\n fill=\"#737373\"\n stroke=\"#737373\"\n />\n <path\n d=\"M14.2328 11.7914C11.9078 10.2414 8.11615 10.2414 5.77448 11.7914C4.71615 12.4997 4.13281 13.4581 4.13281 14.4831C4.13281 15.5081 4.71615 16.4581 5.76615 17.1581C6.93281 17.9414 8.46615 18.3331 9.99948 18.3331C11.5328 18.3331 13.0661 17.9414 14.2328 17.1581C15.2828 16.4497 15.8661 15.4997 15.8661 14.4664C15.8578 13.4414 15.2828 12.4914 14.2328 11.7914Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function personalInfoIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M22 12C22 6.49 17.51 2 12 2C6.49 2 2 6.49 2 12C2 14.9 3.25 17.51 5.23 19.34C5.23 19.35 5.23 19.35 5.22 19.36C5.32 19.46 5.44 19.54 5.54 19.63C5.6 19.68 5.65 19.73 5.71 19.77C5.89 19.92 6.09 20.06 6.28 20.2C6.35 20.25 6.41 20.29 6.48 20.34C6.67 20.47 6.87 20.59 7.08 20.7C7.15 20.74 7.23 20.79 7.3 20.83C7.5 20.94 7.71 21.04 7.93 21.13C8.01 21.17 8.09 21.21 8.17 21.24C8.39 21.33 8.61 21.41 8.83 21.48C8.91 21.51 8.99 21.54 9.07 21.56C9.31 21.63 9.55 21.69 9.79 21.75C9.86 21.77 9.93 21.79 10.01 21.8C10.29 21.86 10.57 21.9 10.86 21.93C10.9 21.93 10.94 21.94 10.98 21.95C11.32 21.98 11.66 22 12 22C12.34 22 12.68 21.98 13.01 21.95C13.05 21.95 13.09 21.94 13.13 21.93C13.42 21.9 13.7 21.86 13.98 21.8C14.05 21.79 14.12 21.76 14.2 21.75C14.44 21.69 14.69 21.64 14.92 21.56C15 21.53 15.08 21.5 15.16 21.48C15.38 21.4 15.61 21.33 15.82 21.24C15.9 21.21 15.98 21.17 16.06 21.13C16.27 21.04 16.48 20.94 16.69 20.83C16.77 20.79 16.84 20.74 16.91 20.7C17.11 20.58 17.31 20.47 17.51 20.34C17.58 20.3 17.64 20.25 17.71 20.2C17.91 20.06 18.1 19.92 18.28 19.77C18.34 19.72 18.39 19.67 18.45 19.63C18.56 19.54 18.67 19.45 18.77 19.36C18.77 19.35 18.77 19.35 18.76 19.34C20.75 17.51 22 14.9 22 12ZM16.94 16.97C14.23 15.15 9.79 15.15 7.06 16.97C6.62 17.26 6.26 17.6 5.96 17.97C4.44 16.43 3.5 14.32 3.5 12C3.5 7.31 7.31 3.5 12 3.5C16.69 3.5 20.5 7.31 20.5 12C20.5 14.32 19.56 16.43 18.04 17.97C17.75 17.6 17.38 17.26 16.94 16.97Z\"\n fill=\"#737373\"\n />\n <path\n d=\"M12 6.92969C9.93 6.92969 8.25 8.60969 8.25 10.6797C8.25 12.7097 9.84 14.3597 11.95 14.4197C11.98 14.4197 12.02 14.4197 12.04 14.4197C12.06 14.4197 12.09 14.4197 12.11 14.4197C12.12 14.4197 12.13 14.4197 12.13 14.4197C14.15 14.3497 15.74 12.7097 15.75 10.6797C15.75 8.60969 14.07 6.92969 12 6.92969Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function locationIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.6191 8.45C19.5691 3.83 15.5391 1.75 11.9991 1.75C11.9991 1.75 11.9991 1.75 11.9891 1.75C8.45912 1.75 4.41912 3.82 3.36912 8.44C2.19912 13.6 5.35912 17.97 8.21912 20.72C9.27912 21.74 10.6391 22.25 11.9991 22.25C13.3591 22.25 14.7191 21.74 15.7691 20.72C18.6291 17.97 21.7891 13.61 20.6191 8.45ZM11.9991 13.46C10.2591 13.46 8.84912 12.05 8.84912 10.31C8.84912 8.57 10.2591 7.16 11.9991 7.16C13.7391 7.16 15.1491 8.57 15.1491 10.31C15.1491 12.05 13.7391 13.46 11.9991 13.46Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function urlIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15 3H21M21 3V9M21 3L10 14M18 13V19C18 19.5304 17.7893 20.0391 17.4142 20.4142C17.0391 20.7893 16.5304 21 16 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V8C3 7.46957 3.21071 6.96086 3.58579 6.58579C3.96086 6.21071 4.46957 6 5 6H11\"\n stroke=\"#737373\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function closeIcon() {\n return svg`\n <svg \n class=\"sb-text-foreground\"\n xmlns=\"http://www.w3.org/2000/svg\"]\n width=\"10\"\n height=\"10\" \n viewBox=\"0 0 10 10\" \n fill=\"none\">\n <path d=\"M9 1L1 9M1 1L9 9\" stroke=\"currentColor\" stroke-width=\"1.33\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n`;\n}\n","import { svg } from \"lit\";\n\nexport function burgerMenuIcon() {\n return svg` \n <svg width=\"18\" height=\"14\" viewBox=\"0 0 18 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 7H17M1 1H17M1 13H17\" stroke=\"#0A0A0A\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n`;\n}\n","export const CARD_HEADER_CONTAINER_CLASS =\n \"sb-w-full sb-flex sb-justify-between sb-border-b sb-px-4 sb-py-2\";\nexport const CARD_HEADER_TITLE_CLASS =\n \"sb-flex sb-items-center sb-text-[18px] sb-font-medium sb-gap-2 sb-text-muted-foreground !sb-min-w-9 !sb-min-h-9\";\nexport const CARD_INPUT_LABEL_CLASS =\n \"sb-w-full sb-basis-36 sb-shrink-0 sb-text-sm sb-text-foreground sb-font-medium sb-truncate sb-overflow-hidden sb-text-ellipsis\";\nexport const CARD_INPUT_FIELD_CLASS =\n \"sb-w-full sb-border-none !sb-shadow-none !sb-px-0 disabled:!sb-opacity-100\";\nexport const CARD_EDIT_FORM_CONTAINER_CLASS =\n \"!sb-rounded-2xl !sb-p-0 !sb-bg-base-background\";\nexport const CARD_CONTAINER_CLASS = \"!sb-rounded-2xl !sb-p-0 sb-mb-4\";\nexport const CARD_EDITABLE_INPUT_CLASS = \"!sb-bg-background\";\nexport const CARD_DEFAULT_BUTTON = \"sb-w-full md:sb-w-[120px]\";\nexport const CARD_OUTLINE_BUTTON = \"sb-w-full md:sb-w-[120px]\";\nexport const CARD_EDIT_BUTTON =\n \"sb-text-muted-foreground sb-text-sm sb-mr-2 sb-flex sb-items-center sb-gap-1\";\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { accountIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface Account {\n email: string;\n phone: string;\n avatar: string;\n}\n\nconst renderOtpContent = (variant: string, length: number) => {\n const baseSlots = Array.from({ length }).map(\n (_, index) =>\n html`<rtg-input-otp-slot\n class=\"sb-bg-background\"\n index=${index}\n ></rtg-input-otp-slot>`\n );\n\n const group = (items: any) =>\n html`<rtg-input-otp-group>${items}</rtg-input-otp-group>`;\n const sep = () => html`<rtg-input-otp-separator></rtg-input-otp-separator>`;\n\n switch (variant) {\n case \"with_spacing\":\n return html`<rtg-input-otp-group class=\"gap-2\"\n >${baseSlots}</rtg-input-otp-group\n >`;\n case \"simple\":\n return html`${group(baseSlots.slice(0, 3))}${sep()}${group(\n baseSlots.slice(3)\n )}`;\n case \"with_separator\":\n return html`\n ${group(baseSlots.slice(0, 2))}${sep()}\n ${group(baseSlots.slice(2, 4))}${sep()} ${group(baseSlots.slice(4))}\n `;\n default:\n return group(baseSlots);\n }\n};\n\n@customElement(\"sb-account-info\")\nexport class SbAccountInfo extends LitElement {\n @property({ type: Object }) account!: Account;\n @property({ type: Boolean }) showAvatarMenu = false;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n @property({ type: Function }) toggleAvatarMenu!: (e: Event) => void;\n @property({ type: Function }) onAvatarChange!: () => void;\n @property({ type: Function }) onAvatarRemove!: () => void;\n @property({ type: Boolean }) showIcons = true;\n @property({ type: Object }) content: IProfileWidgetCustomization | null =\n null;\n @property({ type: String }) otpVariant:\n | \"simple\"\n | \"with_spacing\"\n | \"with_separator\"\n | \"digits_only\" = \"simple\";\n @property({ type: Number }) otpLength = 6;\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @state() private isEditingEmail = false;\n @state() private isVerifyingEmail = false;\n @state() private isEditingPhone = false;\n @state() private isVerifyingPhone = false;\n\n // Helpers to centralize customization mappings\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(CARD_INPUT_LABEL_CLASS, \"sb-hidden md:sb-inline\"),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n isEditContainer ? CARD_EDIT_FORM_CONTAINER_CLASS : CARD_CONTAINER_CLASS,\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n // Generic field display row\n private renderDisplayRow(label: string, value: string, onEdit: () => void) {\n const { class: labelClass, style: labelStyle } = this.getLabelStyles();\n const { class: inputClass, style: inputStyle } = this.getInputStyles();\n const isColumn = this.layout === USER_PROFILE_WIDGETS_LAYOUT.COLUMN;\n\n return html`\n <div\n class=${cn(\n \"sb-w-full\",\n isColumn\n ? \"sb-flex sb-flex-row-reverse md:sb-flex-col sb-gap-2\"\n : \"sb-flex sb-items-center sb-justify-between sb-gap-2\"\n )}\n >\n ${isColumn\n ? html`\n <div class=\"sb-flex sb-items-center sb-justify-between sb-gap-2\">\n <div class=${labelClass} style=${mapStyles(labelStyle)}>\n ${label}\n </div>\n <rtg-button variant=\"outline\" size=\"sm\" @click=${onEdit}>\n ${editIcon()}\n </rtg-button>\n </div>\n <div class=\"sb-flex-1 sb-min-w-0\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n .value=${value}\n disabled\n ></rtg-input>\n </div>\n `\n : html`\n <div class=${labelClass} style=${mapStyles(labelStyle)}>\n ${label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n .value=${value}\n disabled\n ></rtg-input>\n </div>\n <rtg-button variant=\"outline\" size=\"sm\" @click=${onEdit}>\n ${editIcon()}\n </rtg-button>\n `}\n </div>\n `;\n }\n\n // Generic edit form\n private renderEditForm(\n type: \"email\" | \"phone\",\n placeholder: string,\n onSend: () => void,\n onCancel: () => void\n ) {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(true);\n const { class: inputClass, style: inputStyle } = this.getInputStyles(true);\n const { defaultMapped, outlineMapped } = this.getButtonStyles();\n\n const title = type === \"email\" ? \"Edit email address\" : \"Edit phone number\";\n const desc =\n type === \"email\"\n ? \"Type your new email address to replace the old one.\"\n : \"Type your new phone number to replace the old one.\";\n\n return html`\n <rtg-card\n customClass=${cn(\"!sb-pt-4\", containerClass)}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title class=\"sb-flex sb-items-center sb-justify-between\">\n <span class=\"sb-text-[18px] sb-font-medium sb-mx-4 sb-mt-4 sb-mb-2\"\n >${title}</span\n >\n </rtg-card-title>\n <rtg-card-description>\n <div class=\"sb-text-sm sb-text-muted-foreground sb-mx-4\">${desc}</div>\n </rtg-card-description>\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n placeholder=${placeholder}\n type=${type === \"phone\" ? \"tel\" : \"text\"}\n ></rtg-input>\n </div>\n </rtg-card-content>\n <rtg-separator></rtg-separator>\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n class=${defaultMapped.class}\n style=${mapStyles(defaultMapped.style)}\n @click=${onSend}\n >Send Code</rtg-button\n >\n <rtg-button\n class=${outlineMapped.class}\n style=${mapStyles(outlineMapped.style)}\n variant=\"outline\"\n @click=${onCancel}\n >Cancel</rtg-button\n >\n </rtg-card-footer>\n </rtg-card>\n `;\n }\n\n // Generic verification form\n private renderVerificationForm(\n type: \"email\" | \"phone\",\n onCancel: () => void\n ) {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(true);\n const { defaultMapped, outlineMapped } = this.getButtonStyles();\n const { class: otpClass, style: otpStyle } = this.getInputStyles();\n\n const title =\n type === \"email\"\n ? \"Email verification required\"\n : \"Phone number verification required\";\n const desc =\n type === \"email\"\n ? \"Please enter the code to verify this email.\"\n : \"Please enter the code to verify this phone number.\";\n\n return html`\n <rtg-card\n customClass=${cn(\"!sb-pt-4\", containerClass)}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title class=\"sb-flex sb-items-center sb-justify-between\">\n <span class=\"sb-text-[18px] sb-font-medium sb-mx-4 sb-mt-4 sb-mb-2\"\n >${title}</span\n >\n </rtg-card-title>\n <rtg-card-description>\n <div class=\"sb-text-sm sb-text-muted-foreground sb-mx-4\">${desc}</div>\n </rtg-card-description>\n <rtg-card-content>\n <div\n class=\"sb-flex sb-items-center sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4\"\n >\n <rtg-input-otp\n customClass=${otpClass}\n customStyle=${mapStyles(otpStyle)}\n variant=${this.otpVariant}\n >\n ${renderOtpContent(this.otpVariant, this.otpLength)}\n </rtg-input-otp>\n <p class=\"sb-text-[12px] sb-font-medium\">\n Resend Verification Code\n </p>\n </div>\n </rtg-card-content>\n <rtg-separator></rtg-separator>\n <rtg-card-footer\n class=\"sb-flex sb-flex-row sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"outline\"\n class=${outlineMapped.class}\n style=${mapStyles(outlineMapped.style)}\n @click=${onCancel}\n >Cancel</rtg-button\n >\n <rtg-button\n class=${defaultMapped.class}\n style=${mapStyles(defaultMapped.style)}\n >Confirm</rtg-button\n >\n </rtg-card-footer>\n </rtg-card>\n `;\n }\n\n // EMAIL\n private renderEmailSection() {\n if (this.isVerifyingEmail)\n return this.renderVerificationForm(\n \"email\",\n () => ((this.isVerifyingEmail = false), (this.isEditingEmail = true))\n );\n if (this.isEditingEmail)\n return this.renderEditForm(\n \"email\",\n \"Email\",\n () => ((this.isVerifyingEmail = true), (this.isEditingEmail = false)),\n () => (this.isEditingEmail = false)\n );\n return this.renderDisplayRow(\n \"Email\",\n this.account.email,\n () => (this.isEditingEmail = true)\n );\n }\n\n // PHONE\n private renderPhoneSection() {\n if (this.isVerifyingPhone)\n return this.renderVerificationForm(\n \"phone\",\n () => ((this.isVerifyingPhone = false), (this.isEditingPhone = true))\n );\n if (this.isEditingPhone)\n return this.renderEditForm(\n \"phone\",\n \"Phone Number\",\n () => ((this.isVerifyingPhone = true), (this.isEditingPhone = false)),\n () => (this.isEditingPhone = false)\n );\n return this.renderDisplayRow(\n \"Phone number\",\n this.account.phone,\n () => (this.isEditingPhone = true)\n );\n }\n\n private renderHeader() {\n const { class: containerClass, style: containerStyle } =\n applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const { class: titleClass, style: titleStyle } = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n return html`\n <rtg-card-header\n customClass=${containerClass}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title\n customClass=${titleClass}\n customStyle=${mapStyles(titleStyle)}\n >\n ${this.content?.icon || accountIcon()}\n <span>${this.content?.title || \"Account\"}</span>\n </rtg-card-title>\n </rtg-card-header>\n `;\n }\n\n private renderAvatar() {\n return html`\n <div\n class=${cn(\n \"sb-relative sb-flex sb-mx-auto md:sb-px-4 md:sb-pb-4\",\n \"sb-my-4\"\n )}\n @click=${this.toggleAvatarMenu}\n >\n <rtg-avatar customClass=\"sb-cursor-pointer !sb-w-[80px] !sb-h-[80px]\">\n ${this.account.avatar\n ? html`<rtg-avatar-image\n src=${this.account.avatar}\n ></rtg-avatar-image>`\n : html`<rtg-avatar-fallback></rtg-avatar-fallback>`}\n </rtg-avatar>\n ${this.showAvatarMenu && !(this.isEditingEmail || this.isEditingPhone)\n ? html`\n <rtg-card\n customClass=\"sb-absolute !sb-p-2 sb-top-full sb-left-1/2 -sb-translate-y-1/2 sb-z-[999] sb-w-[200px] sb-shadow-md sb-bg-background sb-rounded-2xl\"\n >\n <div\n class=\"sb-py-[6px] sb-px-2 sb-mb-2 sb-text-sm sb-cursor-pointer\"\n @click=${(e: Event) => (\n e.stopPropagation(), this.onAvatarChange?.()\n )}\n >\n Change profile picture\n </div>\n <div\n class=\"sb-py-[6px] sb-px-2 sb-text-sm sb-cursor-pointer\"\n @click=${(e: Event) => (\n e.stopPropagation(), this.onAvatarRemove?.()\n )}\n >\n Remove\n </div>\n </rtg-card>\n `\n : null}\n </div>\n `;\n }\n\n private renderAccountDetails() {\n return html`<div\n class=\"sb-flex sb-flex-col sb-mx-4 sb-my-2 md:sb-my-4 sb-gap-1 sb-flex-1\"\n >\n ${this.renderEmailSection()} ${this.renderPhoneSection()}\n </div>`;\n }\n\n render() {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(false);\n return html`\n <rtg-card\n customStyle=${mapStyles(containerStyle)}\n customClass=${containerClass}\n >\n ${this.renderHeader()}\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col md:sb-flex-row\">\n ${this.renderAvatar()} ${this.renderAccountDetails()}\n </div>\n </rtg-card-content>\n </rtg-card>\n `;\n }\n\n createRenderRoot() {\n return this;\n }\n}\n","import { LitElement, html, TemplateResult, PropertyValues } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { personalInfoIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface PersonalInfo {\n username: string;\n first: string;\n middle: string;\n last: string;\n nickname: string;\n gender: string;\n bio: string;\n}\n\n@customElement(\"sb-personal-info\")\nexport class SbPersonalInfo extends LitElement {\n @property({ type: Object }) personal!: PersonalInfo;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer\n ? CARD_EDIT_FORM_CONTAINER_CLASS + \" sb-mb-4\"\n : CARD_CONTAINER_CLASS\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [\n { label: \"Username\", value: this.personal.username },\n { label: \"First name\", value: this.personal.first },\n { label: \"Middle name\", value: this.personal.middle },\n { label: \"Last name\", value: this.personal.last },\n { label: \"Nickname\", value: this.personal.nickname },\n { label: \"Gender\", value: this.personal.gender },\n { label: \"Bio\", value: this.personal.bio },\n ];\n\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content?.icon : personalInfoIcon()}\n\n <span>\n ${this.content?.title ? this.content?.title : \"Personal Info\"}\n </span>\n </rtg-card-title>\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-p-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center sb-gap-2\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { locationIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface LocationInfo {\n location: string;\n zoneInfo: string;\n}\n\n@customElement(\"sb-location-info\")\nexport class SbLocationInfo extends LitElement {\n @property({ type: Object }) locationInfo!: LocationInfo;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer\n ? CARD_EDIT_FORM_CONTAINER_CLASS + \" sb-mb-4\"\n : CARD_CONTAINER_CLASS\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [\n { label: \"Location\", value: this.locationInfo.location },\n { label: \"Zone Info\", value: this.locationInfo.zoneInfo },\n ];\n\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content.icon : locationIcon()}\n <span>\n ${this.content?.title ? this.content.title : \"Location\"}\n </span>\n </rtg-card-title>\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-m-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center sb-gap-2\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { urlIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface URLsInfo {\n website: string;\n}\n\n@customElement(\"sb-urls-info\")\nexport class SbUrlsInfo extends LitElement {\n @property({ type: Object }) URLsInfo!: URLsInfo;\n @property({ type: Boolean }) showIcons: boolean = true;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer ? CARD_EDIT_FORM_CONTAINER_CLASS : CARD_CONTAINER_CLASS,\n \"!sb-mb-0\"\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [{ label: \"Website\", value: this.URLsInfo.website }];\n\n // ===== Customizations =====\n // Containers\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n\n // ===== Render =====\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content.icon : urlIcon()}\n <span>${this.content?.title ?? \"URLs\"}</span>\n </rtg-card-title>\n\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-p-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","// user-profile-tab-content.ts\nimport { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { Account } from \"./account-info\";\nimport { PersonalInfo } from \"./personal-info\";\nimport { LocationInfo } from \"./location-info\";\nimport { URLsInfo } from \"./urls-info\";\nimport \"./personal-info\";\nimport \"./location-info\";\nimport \"./urls-info\";\nimport \"./account-info\";\nimport {\n USER_PROFILE_WIDGETS_LAYOUT,\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n IProfileContentCustomizations,\n ICustomizations,\n} from \"@/types\";\n\n@customElement(\"sb-profile\")\nexport class Profile extends LitElement {\n @property({ type: Object }) account!: Account;\n @property({ type: Object }) personal!: PersonalInfo;\n @property({ type: Object }) location!: LocationInfo;\n @property({ type: Object }) urls!: URLsInfo;\n @property({ type: Boolean }) showAvatarMenu: boolean = false;\n @property({ type: Object })\n customizations: ICustomizations | null = null;\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ attribute: false }) modalIcon?: TemplateResult;\n\n @property({ type: String }) orientation: USER_PROFILE_ORIENTATION =\n USER_PROFILE_ORIENTATION.HORIZONTAL;\n @property({ type: String })\n sidebarDisplayType: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n @property({ type: String }) mode: USER_PROFILE_MODE = USER_PROFILE_MODE?.PAGE;\n\n @property({ type: String }) widgetsLayout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Function }) toggleAvatarMenu!: (e: Event) => void;\n @property({ type: Function }) onAvatarChange!: () => void;\n @property({ type: Function }) onAvatarRemove!: () => void;\n @property({ type: Object }) content: IProfileContentCustomizations | null =\n null;\n createRenderRoot() {\n return this;\n }\n\n render() {\n const containerClasses =\n \"sb-flex sb-items-center sb-justify-between sb-mb-4\";\n const titleClasses = \"sb-font-medium sb-text-[18px] sb-text-foreground\";\n\n return html`\n ${this.orientation === USER_PROFILE_ORIENTATION.VERTICAL ||\n this.sidebarDisplayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? null\n : html`\n <div class=${containerClasses}>\n <div class=${titleClasses}>Profile</div>\n </div>\n `}\n\n <sb-account-info\n .customizations=${this.customizations}\n .content=${this.content?.account!}\n .account=${this.account}\n .layout=${this.widgetsLayout}\n .showAvatarMenu=${this.showAvatarMenu}\n .toggleAvatarMenu=${this.toggleAvatarMenu}\n ></sb-account-info>\n\n <sb-personal-info\n .customizations=${this.customizations}\n .content=${this.content?.personalInfo!}\n .personal=${this.personal}\n .layout=${this.widgetsLayout}\n ></sb-personal-info>\n <sb-location-info\n .customizations=${this.customizations}\n .content=${this.content?.locations!}\n .locationInfo=${this.location}\n .layout=${this.widgetsLayout}\n ></sb-location-info>\n <sb-urls-info\n .customizations=${this.customizations}\n .content=${this.content?.urls!}\n .URLsInfo=${this.urls}\n .layout=${this.widgetsLayout}\n ></sb-urls-info>\n `;\n }\n}\n","export const BASE_CLASSES = \"!sb-bg-background\";\nexport const SIDEBAR_CONTAINER_CLASSES = {\n vertical: \"sb-justify-between sb-w-full\",\n horizontal: \"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6\",\n};\nexport const BURGER_BUTTON_CLASSES =\n \"sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background\";\nexport const BURGER_LABEL_CLASSES =\n \"sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground\";\nexport const MOBILE_DRAWER_CLASSES =\n \"mobile-sidebar-drawer sb-fixed sb-top-0 sb-left-0 sb-h-full sb-max-w-xs sb-bg-background sb-shadow-lg sb-z-[9999] sb-transform sb-transition-all sb-duration-300 sb-ease-in-out\";\nexport const MOBILE_OVERLAY_CLASSES =\n \"mobile-sidebar-overlay sb-fixed sb-inset-0 sb-bg-black/50 sb-z-[9998] sb-transition-opacity sb-duration-300 sb-ease-in-out\";\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { burgerMenuIcon } from \"@/assets/icons\";\nimport {\n horizontalTabClass,\n verticalTabClass,\n tabTriggerClass,\n ELEMENT_IDS,\n} from \"@/constants\";\nimport {\n ICustomizations,\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n USER_PROFILE_TAB_LIST,\n} from \"@/types\";\n\nimport {\n BASE_CLASSES,\n BURGER_BUTTON_CLASSES,\n BURGER_LABEL_CLASSES,\n MOBILE_DRAWER_CLASSES,\n MOBILE_OVERLAY_CLASSES,\n SIDEBAR_CONTAINER_CLASSES,\n} from \"./classes\";\nimport { applyCustomizations, cn, mapStyles } from \"@/utils\";\n\nexport interface SidebarConfig {\n showIcons: boolean;\n modalIcon?: TemplateResult;\n}\n\nconst DEFAULT_TABS = [\n { label: \"Profile\", value: USER_PROFILE_TAB_LIST.PROFILE },\n { label: \"Security\", value: USER_PROFILE_TAB_LIST.SECURITY },\n];\n\n@customElement(\"sb-profile-sidebar\")\nexport class SbProfileSidebar extends LitElement {\n @property({ type: String })\n orientation: USER_PROFILE_ORIENTATION = USER_PROFILE_ORIENTATION.HORIZONTAL;\n\n @property({ type: String })\n displayType: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n\n @property({ type: String })\n mode: USER_PROFILE_MODE = USER_PROFILE_MODE.PAGE;\n\n @property({ type: Object })\n config: SidebarConfig = { showIcons: true };\n\n @property({ type: Object })\n customizations: ICustomizations | null = null;\n\n @state()\n private isMenuOpen = false;\n\n createRenderRoot() {\n return this;\n }\n\n private toggleMenu() {\n const parentTabDiv = this.closest('div[role=\"tab\"]');\n if (parentTabDiv) {\n parentTabDiv.classList.toggle(\"sb-rotate-0\");\n }\n this.isMenuOpen = !this.isMenuOpen;\n this.requestUpdate();\n }\n\n private handleCloseProfile(e: Event) {\n e.stopPropagation();\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", { bubbles: true, composed: true })\n );\n }\n\n private renderTabs(\n tabs = DEFAULT_TABS,\n isVertical = false,\n onClick?: () => void\n ) {\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebarTabs,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR_TABS,\n this.customizations!\n );\n return html`\n <rtg-tab-list\n orientation=${isVertical ? \"vertical\" : \"horizontal\"}\n class=\"sb-flex sb-w-full ${isVertical ? \"\" : \"sb-mb-4\"}\"\n customStyle=\"${mapStyles(finalStyle)}\"\n customClass=\"${cn(\n BASE_CLASSES,\n isVertical ? verticalTabClass : horizontalTabClass,\n finalClass\n )}\"\n >\n ${tabs.map(\n (tab) => html`\n <div class=${isVertical ? \"sb-mb-2\" : \"\"}>\n <rtg-tab-trigger\n customClass=\"${tabTriggerClass}\"\n value=${tab.value}\n @tab-trigger-click=${onClick}\n >\n ${tab.label}\n </rtg-tab-trigger>\n </div>\n `\n )}\n </rtg-tab-list>\n `;\n }\n\n private renderWatermark() {\n return html`<sb-watermark child-id=\"sb-watermark\"></sb-watermark>`;\n }\n\n private renderBurger() {\n return html`\n <div class=\"sb-flex sb-items-center\">\n <div class=\"${BURGER_BUTTON_CLASSES}\" @click=${this.toggleMenu}>\n ${burgerMenuIcon()}\n </div>\n <div class=\"${BURGER_LABEL_CLASSES}\">Profile</div>\n </div>\n `;\n }\n\n private renderMobileDrawer() {\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebarBurgerMenu,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR_BURGER_MENU,\n this.customizations!\n );\n return html`\n <div\n style=\"${mapStyles(finalStyle)}\"\n class=\"${cn(\n MOBILE_DRAWER_CLASSES,\n this.isMenuOpen\n ? \"sb-translate-x-0 sb-opacity-100\"\n : \"sb-translate-x-[-100%] sb-opacity-0\",\n finalClass\n )}\"\n >\n <div\n class=\"sb-flex sb-flex-col sb-justify-between sb-h-[100%] sb-p-4 sb-w-min\"\n >\n <div class=\"sb-flex sb-flex-col sb-gap-2 sb-w-min\">\n ${this.renderTabs(DEFAULT_TABS, true, this.toggleMenu.bind(this))}\n </div>\n ${this.renderWatermark()}\n </div>\n </div>\n <div\n class=\"${MOBILE_OVERLAY_CLASSES} ${this.isMenuOpen\n ? \"sb-block sb-opacity-100\"\n : \"sb-hidden sb-opacity-0\"}\"\n @click=${this.toggleMenu}\n ></div>\n `;\n }\n\n render() {\n const isVertical = this.orientation === USER_PROFILE_ORIENTATION.VERTICAL;\n const isHorizontal =\n this.orientation === USER_PROFILE_ORIENTATION.HORIZONTAL;\n\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebar,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR,\n this.customizations!\n );\n return html`\n <div\n style=\"${mapStyles(finalStyle)}\"\n class=\"${cn(\n \"sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]\",\n isVertical\n ? SIDEBAR_CONTAINER_CLASSES.vertical\n : SIDEBAR_CONTAINER_CLASSES.horizontal,\n finalClass\n )}\"\n >\n ${this.displayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? this.renderBurger()\n : null}\n ${isVertical ? this.renderTabs() : null}\n ${isHorizontal &&\n this.displayType !== USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? html`\n <div class=\"sb-flex sb-flex-col sb-justify-between sb-flex-1\">\n ${this.renderTabs(DEFAULT_TABS, true)} ${this.renderWatermark()}\n </div>\n `\n : null}\n </div>\n ${this.displayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? this.renderMobileDrawer()\n : null}\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { customizationsContext } from \"@/context\";\nimport {\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n USER_PROFILE_TAB_VALUES,\n USER_PROFILE_WIDGETS_LAYOUT,\n ICustomizations,\n IProfileContentCustomizations,\n} from \"@/types\";\nimport {\n dashboardClass,\n pageClasses,\n modalClasses,\n modalWidthClass,\n dashboardWidthClass,\n modalContainerClass,\n modalLayoutClass,\n ELEMENT_IDS,\n} from \"@/constants\";\nimport { cn, applyCustomizations, deepMerge, mapStyles } from \"@/utils\";\nimport { closeIcon } from \"@/assets/icons\";\n\nimport \"./profile\";\nimport \"./sidebar/sidebar\";\nimport \"./profile/profile\";\nimport { Account } from \"./profile/account-info\";\nimport { PersonalInfo } from \"./profile/personal-info\";\nimport { LocationInfo } from \"./profile/location-info\";\nimport { URLsInfo } from \"./profile/urls-info\";\n\nconst BREAKPOINTS = {\n xs: 640,\n sm: 768,\n md: Infinity,\n} as const;\n\nexport class SbUserProfile extends LitElement {\n // === Public Properties ===\n @property({ type: Boolean }) showAvatarMenu = false;\n @property({ type: String }) orientation: USER_PROFILE_ORIENTATION =\n USER_PROFILE_ORIENTATION.HORIZONTAL;\n @property({ type: String }) mobileDisplay: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n @property({ type: String }) mode: USER_PROFILE_MODE = USER_PROFILE_MODE.PAGE;\n @property({ type: String }) widgetsLayout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n @property({ type: Object }) content: IProfileContentCustomizations | null =\n null;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n // === Context ===\n @consume({ context: customizationsContext, subscribe: true })\n providedCustomizations: ICustomizations | null = null;\n\n // === Internal State ===\n @state() private isOpen = true;\n @state() private currentBreakpoint: keyof typeof BREAKPOINTS = \"md\";\n\n // === Default Profile Data ===\n private account: Account = {\n email: \"J.Doe@gmail.com\",\n phone: \"+989390717800\",\n avatar: \"https://github.com/shadcn.png\",\n };\n\n private personal: PersonalInfo = {\n username: \"@JaneeDoe\",\n first: \"Jane\",\n middle: \"Michelle\",\n last: \"Doe\",\n nickname: \"Janee\",\n gender: \"Female\",\n bio: \"-\",\n };\n\n private location: LocationInfo = {\n location: \"Iran, Tehran\",\n zoneInfo: \"GMT+3:30\",\n };\n private urls: URLsInfo = { website: \"www.janeedoe.com\" };\n\n private defaultTab = \"Profile\";\n\n // === Lifecycle ===\n connectedCallback() {\n super.connectedCallback();\n this._updateBreakpoint();\n window.addEventListener(\"resize\", this._handleResize);\n document.addEventListener(\"remove-avatar\", this._handleAvatarRemove);\n document.addEventListener(\"click\", this._handleClickOutside);\n this.addEventListener(\"close-user-profile\", this._handleClose);\n this.addEventListener(\"change-avatar\", this._handleAvatarChange);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"resize\", this._handleResize);\n document.removeEventListener(\"remove-avatar\", this._handleAvatarRemove);\n document.removeEventListener(\"click\", this._handleClickOutside);\n this.removeEventListener(\"close-user-profile\", this._handleClose);\n this.removeEventListener(\"change-avatar\", this._handleAvatarChange);\n }\n\n protected firstUpdated() {\n this.style.width = \"100%\";\n }\n\n // === Event Handlers ===\n private _handleResize = () => {\n this._updateBreakpoint();\n };\n\n private _updateBreakpoint() {\n const width = window.innerWidth;\n this.currentBreakpoint =\n width < BREAKPOINTS.xs ? \"xs\" : width < BREAKPOINTS.sm ? \"sm\" : \"md\";\n }\n\n private _handleClose = () => {\n if (this.mode === USER_PROFILE_MODE.MODAL) {\n this.isOpen = false;\n }\n };\n\n private _toggleAvatarMenu = (e: Event) => {\n e.stopPropagation();\n this.showAvatarMenu = !this.showAvatarMenu;\n };\n\n private _handleAvatarChange = () => {\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = \"image/*\";\n\n input.onchange = (e: Event) => {\n const file = (e.target as HTMLInputElement).files?.[0];\n if (!file) return;\n\n const reader = new FileReader();\n reader.onload = () => {\n this.account.avatar = reader.result as string;\n this.requestUpdate();\n };\n reader.readAsDataURL(file);\n };\n\n input.click();\n };\n\n private _handleAvatarRemove = () => {\n this.account.avatar = \"https://via.placeholder.com/80\";\n this.showAvatarMenu = false;\n };\n\n private _handleClickOutside = (e: MouseEvent) => {\n if (!this.showAvatarMenu) return;\n\n const target = e.target as HTMLElement;\n const avatarContainer = this.querySelector(\"sb-account-info\");\n const avatarMenu = this.querySelector(\"rtg-card\");\n\n if (avatarContainer?.contains(target) || avatarMenu?.contains(target))\n return;\n\n this.showAvatarMenu = false;\n };\n\n // === Computed Helpers ===\n private get effectiveCustomizations(): ICustomizations {\n return deepMerge(\n this.providedCustomizations ?? {},\n this.customizations ?? {}\n );\n }\n\n private get isModal() {\n return this.mode === USER_PROFILE_MODE.MODAL;\n }\n\n private get sidebarDisplayType(): USER_PROFILE_SIDEBAR_DISPLAY_TYPE {\n if (this.orientation === USER_PROFILE_ORIENTATION.VERTICAL) {\n return USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n }\n return this.currentBreakpoint === \"md\"\n ? USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR\n : USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER;\n }\n\n private get containerClasses() {\n return cn(\n dashboardClass,\n this.isModal ? modalClasses : pageClasses,\n this.isModal ? modalWidthClass : dashboardWidthClass,\n this.sidebarDisplayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER ||\n this.orientation === USER_PROFILE_ORIENTATION.VERTICAL\n ? \"!sb-flex-col\"\n : \"!sb-flex-row\"\n );\n }\n\n private get contentClasses() {\n return cn(\n \"sb-flex-grow\",\n this.isModal\n ? \"sb-max-h-[864px] sb-mx-4 sb-px-2 md:sb-mx-0 md:sb-px-6 md:sb-pl-0 sb-overflow-auto\"\n : \"md:sb-max-h-[100%]\",\n this.orientation === USER_PROFILE_ORIENTATION.VERTICAL\n ? \"md:sb-pl-6 sb-mb-16\"\n : \"\"\n );\n }\n\n // === Render Helpers ===\n private renderCloseButton() {\n if (!this.isModal) return nothing;\n\n return html`\n <button\n class=\"sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10\"\n @click=${() =>\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", {\n bubbles: true,\n composed: true,\n })\n )}\n >\n ${closeIcon()}\n </button>\n `;\n }\n\n private renderWatermark() {\n if (this.orientation !== USER_PROFILE_ORIENTATION.VERTICAL) return nothing;\n\n return html`\n <div\n class=\"sb-fixed sb-bottom-0 sb-w-[-webkit-fill-available] sb-py-4 sb-bg-background\"\n >\n <sb-watermark child-id=\"sb-watermark\"></sb-watermark>\n </div>\n `;\n }\n\n private renderProfileContent() {\n const cz = this.effectiveCustomizations;\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n this.containerClasses,\n {},\n cz?.byType?.userProfile?.container,\n ELEMENT_IDS.USER_PROFILE_CONTAINER,\n cz,\n true\n );\n\n return html`\n <rtg-tab\n customStyle=${mapStyles(finalStyle)}\n customClass=${finalClass}\n defaultValue=${this.defaultTab}\n orientation=${this.orientation.toLowerCase() as\n | \"horizontal\"\n | \"vertical\"}\n >\n ${this.renderCloseButton()}\n\n <sb-profile-sidebar\n .orientation=${this.orientation}\n .mode=${this.mode}\n .mobileDisplay=${this.mobileDisplay}\n .displayType=${this.sidebarDisplayType}\n .customizations=${cz}\n ></sb-profile-sidebar>\n\n <div class=${this.contentClasses}>\n <div class=\"sb-relative sb-[transform:translateZ(0)]\">\n <rtg-tab-content value=${USER_PROFILE_TAB_VALUES.PROFILE}>\n <sb-profile\n .customizations=${cz}\n .content=${this.content}\n .account=${this.account}\n .personal=${this.personal}\n .location=${this.location}\n .urls=${this.urls}\n .orientation=${this.orientation}\n .sidebarDisplayType=${this.sidebarDisplayType}\n .mode=${this.mode}\n .widgetsLayout=${this.widgetsLayout}\n .showAvatarMenu=${this.showAvatarMenu}\n .toggleAvatarMenu=${this._toggleAvatarMenu}\n ></sb-profile>\n </rtg-tab-content>\n </div>\n </div>\n\n ${this.renderWatermark()}\n </rtg-tab>\n `;\n }\n\n // === Main Render ===\n render() {\n if (!this.isOpen) return nothing;\n\n if (this.isModal) {\n return html`\n <div\n class=\"sb-fixed sb-inset-0 sb-z-[9998] sb-bg-black/50 sb-backdrop-blur-sm\"\n @click=${() =>\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", {\n bubbles: true,\n composed: true,\n })\n )}\n ></div>\n\n <div class=${modalContainerClass}>\n <div class=${modalLayoutClass}>${this.renderProfileContent()}</div>\n </div>\n `;\n }\n\n return this.renderProfileContent();\n }\n\n // Use shadow DOM? No — matches original behavior\n createRenderRoot() {\n return this;\n }\n}\n\ncustomElements.define(\"sb-user-profile\", SbUserProfile);\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-preview\")\nexport class PreviewComponent extends LitElement {\n @property({ type: Boolean }) loading = false;\n @property({ type: Object }) renderSpec: TemplateResult | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this; // use light DOM so shadcn/Tailwind styles apply\n }\n\n render() {\n return html`\n ${this.loading\n ? html`<div class=\"sb-p-8 sb-text-center\">Loading...</div>`\n : html`\n <sb-provider>\n <signed-out>\n <sb-layout .renderSpec=${this.renderSpec}> </sb-layout>\n </signed-out>\n </sb-provider>\n `}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-preview\": PreviewComponent;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { ICustomizations, RenderSpec } from \"@/types\";\nimport { applyCustomizations, deepMerge } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { consume } from \"@lit/context\";\nimport { customizationsContext, renderSpecContext } from \"@/context\";\n\n@customElement(\"sb-signin\")\nexport class SbSignIn extends LitElement {\n @consume({ context: renderSpecContext, subscribe: true })\n renderSpec: string | null = null; // Direct prop override (optional)\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n // Internal guards to avoid duplicate/parallel flow starts\n private __flowStarted = false;\n private __flowInitAttempted = false;\n\n private async waitForAuthConfigured(timeoutMs = 5000) {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n if (!auth) return;\n if ((auth as any).__configured) return;\n const when = (auth as any).__whenConfigured as Promise<void> | undefined;\n if (!when) return;\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, timeoutMs)),\n ]);\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n\n // Prevent duplicate attempts\n if (this.__flowInitAttempted) return;\n this.__flowInitAttempted = true;\n\n // Wait a short time for Auth.configure if available (avoids noisy errors)\n await this.waitForAuthConfigured();\n\n if (this.__flowStarted) return;\n this.__flowStarted = true;\n\n try {\n // Initialize login flow through Auth (sign-in)\n const resp = await Auth.startLoginflow(\"signin-flow-passkey\");\n\n console.log(\n resp.isResumed ? \"Resumed login flow\" : \"Started new login flow\",\n );\n } catch (err: any) {\n console.error(\"Sign-in flow init failed:\", err);\n\n // If it failed due to missing config, mark and attempt a single retry\n if (\n err &&\n typeof err.message === \"string\" &&\n err.message.includes(\"Auth.configure() must be called\")\n ) {\n (this as any).__saasbaseFailedForConfig = true;\n try {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n const when = auth?.__whenConfigured as Promise<void> | undefined;\n if (when) {\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, 10000)),\n ]);\n try {\n const resp = await Auth.startLoginflow(\"signin-flow-passkey\");\n console.log(\n resp.isResumed\n ? \"Resumed login flow\"\n : \"Started new login flow\",\n );\n } catch (e) {\n console.error(\"Sign-in retry failed:\", e);\n }\n }\n } catch (e) {\n /* ignore */\n }\n } else {\n // For other errors like aborts allow retry by user interaction\n this.__flowStarted = false;\n }\n }\n }\n\n // Explicit retry hook used by the loader\n __saasbaseRetryInit() {\n if (!this.__flowStarted) {\n this.__flowInitAttempted = false;\n // re-run init logic\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.connectedCallback();\n }\n }\n\n render() {\n if (!this.renderSpec) {\n return html`\n <linear-loader\n class=\"sb-fixed sb-w-full sb-top-0 sb-left-0\"\n ></linear-loader>\n `;\n }\n\n return html` <sb-layout .renderSpec=${this.renderSpec}></sb-layout> `;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { renderSpecContext } from \"@/context\";\nimport { consume } from \"@lit/context\";\n\n@customElement(\"sb-signup\")\nexport class SbSignUp extends LitElement {\n @consume({ context: renderSpecContext, subscribe: true })\n renderSpec: string | null = null; // Direct prop override (optional)\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n // Internal guards to avoid duplicate/parallel flow starts\n private __flowStarted = false;\n private __flowInitAttempted = false;\n\n private async waitForAuthConfigured(timeoutMs = 5000) {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n if (!auth) return;\n if ((auth as any).__configured) return;\n const when = (auth as any).__whenConfigured as Promise<void> | undefined;\n if (!when) return;\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, timeoutMs)),\n ]);\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n\n if (this.__flowInitAttempted) return;\n this.__flowInitAttempted = true;\n\n await this.waitForAuthConfigured();\n\n if (this.__flowStarted) return;\n this.__flowStarted = true;\n\n try {\n // Initialize signup flow through Auth (sign-up)\n const resp = await Auth.startLoginflow(\"signup-flow\");\n\n console.log(\n resp.isResumed ? \"Resumed signup flow\" : \"Started new signup flow\",\n );\n } catch (err: any) {\n console.error(\"Sign-up flow init failed:\", err);\n\n if (\n err &&\n typeof err.message === \"string\" &&\n err.message.includes(\"Auth.configure() must be called\")\n ) {\n (this as any).__saasbaseFailedForConfig = true;\n try {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n const when = auth?.__whenConfigured as Promise<void> | undefined;\n if (when) {\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, 10000)),\n ]);\n try {\n const resp = await Auth.startLoginflow(\"signup-flow\");\n console.log(\n resp.isResumed\n ? \"Resumed signup flow\"\n : \"Started new signup flow\",\n );\n } catch (e) {\n console.error(\"Sign-up retry failed:\", e);\n }\n }\n } catch (e) {\n /* ignore */\n }\n } else {\n this.__flowStarted = false;\n }\n }\n }\n\n // explicit retry hook used by the loader\n __saasbaseRetryInit() {\n if (!this.__flowStarted) {\n this.__flowInitAttempted = false;\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.connectedCallback();\n }\n }\n\n render() {\n if (!this.renderSpec) {\n return html`\n <linear-loader\n class=\"sb-fixed sb-w-full sb-top-0 sb-left-0\"\n ></linear-loader>\n `;\n }\n\n return html` <sb-layout .renderSpec=${this.renderSpec}></sb-layout> `;\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n// TODO: deprecated\n// Use `rtg-field-description` in place of `sb-hint`\n\n@customElement(\"sb-hint\")\nexport class SbHint extends LitElement {\n // Use light DOM\n createRenderRoot() {\n return this;\n }\n\n @property({ type: String }) content = \"\";\n\n render() {\n return html`<p class=\"sb-mt-2\">${this.content}</p>`;\n }\n}\n","import { linearLoaderClass } from \"@/constants\";\nimport { cn, mapStyles } from \"@/utils\";\nimport { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"linear-loader\")\nexport class LinearLoader extends LitElement {\n @property({ type: String }) customClass: string = \"\";\n @property({ type: Object }) customStyle = {};\n\n createRenderRoot() {\n return this;\n }\n\n render() {\n return html`\n <div\n class=${cn(linearLoaderClass, this.customClass)}\n style=${mapStyles(this.customStyle)}\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"linear-loader\": LinearLoader;\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-spinner\")\nexport class SbSpinner extends LitElement {\n createRenderRoot() {\n return this; // light DOM\n }\n\n /** Diameter in px */\n @property({ type: Number }) size = 16;\n\n /** Stroke thickness */\n @property({ type: Number, attribute: \"stroke-width\" }) strokeWidth = 2;\n\n /** Color (defaults to currentColor) */\n @property() color: string = \"currentColor\";\n\n /** Accessible label */\n @property() label: string = \"Loading…\";\n\n @property({ type: Number }) duration = 1;\n\n render() {\n const radius = Math.max(0, (this.size - this.strokeWidth) / 2);\n const circumference = 2 * Math.PI * radius;\n const normalizedRadius = radius - this.strokeWidth / 2;\n\n return html`\n <style>\n .chrome-spinner {\n width: ${this.size}px;\n height: ${this.size}px;\n display: inline-block;\n animation: chrome-spinner-rotate ${this.duration}s linear infinite;\n }\n\n .chrome-spinner-circle {\n stroke: ${this.color};\n stroke-width: ${this.strokeWidth};\n stroke-linecap: round;\n fill: none;\n transform-origin: 50% 50%;\n stroke-dasharray: ${circumference};\n stroke-dashoffset: 0;\n animation: chrome-spinner-dash ${this.duration}s linear infinite;\n }\n\n @keyframes chrome-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes chrome-spinner-dash {\n 0% {\n stroke-dashoffset: ${circumference};\n transform: rotate(0deg);\n }\n 50% {\n stroke-dashoffset: ${circumference * 0.2};\n transform: rotate(180deg);\n }\n 100% {\n stroke-dashoffset: ${circumference};\n transform: rotate(360deg);\n }\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n overflow: hidden;\n white-space: nowrap;\n }\n </style>\n\n <svg\n class=\"chrome-spinner\"\n viewBox=\"0 0 ${this.size} ${this.size}\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <circle\n class=\"chrome-spinner-circle\"\n cx=\"${this.size / 2}\"\n cy=\"${this.size / 2}\"\n r=\"${normalizedRadius}\"\n ></circle>\n </svg>\n ${this.label ? html`<span class=\"sr-only\">${this.label}</span>` : null}\n `;\n }\n}\n","import { html, type TemplateResult } from \"lit\";\n\nimport type { ErrorIcon } from \"./error.types\";\n\nconst badgeAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"badge-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-badge-alert-icon lucide-badge-alert\"\n >\n <path\n d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\"\n />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n`;\n\nconst badgeXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"badge-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-badge-x-icon lucide-badge-x\"\n >\n <path\n d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\"\n />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </svg>\n`;\n\nconst circleAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"circle-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle-alert-icon lucide-circle-alert\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n`;\n\nconst circleXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"circle-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle-x-icon lucide-circle-x\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m15 9-6 6\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n`;\n\nconst shieldAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"shield-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-shield-alert-icon lucide-shield-alert\"\n >\n <path\n d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n`;\n\nconst shieldXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"shield-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-shield-x-icon lucide-shield-x\"\n >\n <path\n d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"\n />\n <path d=\"m14.5 9.5-5 5\" />\n <path d=\"m9.5 9.5 5 5\" />\n </svg>\n`;\n\nexport const ERROR_ICONS: Record<\n ErrorIcon,\n (id: string, part: string) => TemplateResult<1>\n> = {\n \"badge-alert\": badgeAlertIcon,\n \"badge-x\": badgeXIcon,\n \"circle-alert\": circleAlertIcon,\n \"circle-x\": circleXIcon,\n \"shield-alert\": shieldAlertIcon,\n \"shield-x\": shieldXIcon,\n};\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { ERROR_ICONS } from \"./error.defs\";\nimport type {\n ErrorContent,\n ErrorIcon,\n ErrorProps,\n ErrorVariant,\n} from \"./error.types\";\n\n/**\n * A destructive alert used for displaying auth errors.\n * @element sb-error\n *\n * @part error (rtg-alert)\n * @part error-icon (svg)\n * @part error-title (rtg-alert-title)\n * @part error-description (rtg-alert-description)\n */\n@customElement(\"sb-error\")\nexport class SbError extends LitElement implements ErrorProps {\n private static readonly _ROOT = \"error\";\n private static readonly _ICON = \"icon\";\n private static readonly _TITLE = \"title\";\n private static readonly _DESCRIPTION = \"description\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const icon = `${root}-${this._ICON}`;\n const title = `${root}-${this._TITLE}`;\n const description = `${root}-${this._DESCRIPTION}`;\n\n return { root, icon, title, description };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the alert.\n */\n @property({ type: String })\n variant: ErrorVariant = \"default\";\n\n /**\n * The text content (title and/or description) of the error alert.\n */\n @property({ type: Object })\n content: ErrorContent = { description: \"Something went wrong.\" };\n\n /**\n * The Lucide icon rendered in the error alert.\n */\n @property({ type: String })\n icon?: ErrorIcon;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbError.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the icon part\n * name appended.\n */\n get iconId() {\n return `${this.rootId}-${SbError._ICON}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the title part\n * name appended.\n */\n get titleId() {\n return `${this.rootId}-${SbError._TITLE}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the description\n * part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbError._DESCRIPTION}`;\n }\n\n /**\n * Uses the `variant` prop to derive the `variant` prop passed to `rtg-alert`.\n * - `\"default\"` error = `\"destructive\"` alert\n * - `\"tonal\"` error = `\"destructive-tonal\"` alert\n */\n private get _variant() {\n let variant = \"destructive\";\n if (this.variant === \"tonal\") variant += \"-tonal\";\n\n return variant;\n }\n\n render() {\n const icon = this.icon ? ERROR_ICONS[this.icon] : null;\n const { title, description } = this.content;\n\n return html`\n <rtg-alert\n id=\"${this.rootId}\"\n part=\"${SbError.parts.root}\"\n variant=\"${this._variant}\"\n >\n ${icon ? icon(this.iconId, SbError.parts.icon) : nothing}\n ${title\n ? html`\n <rtg-alert-title\n id=\"${this.titleId}\"\n part=\"${SbError.parts.title}\"\n >\n ${title}\n </rtg-alert-title>\n `\n : nothing}\n ${description\n ? html`\n <rtg-alert-description\n id=\"${this.descriptionId}\"\n part=\"${SbError.parts.description}\"\n >\n ${description}\n </rtg-alert-description>\n `\n : nothing}\n </rtg-alert>\n `;\n }\n}\n","import type {\n Input as RtgInput,\n PasswordInput as RtgPasswordInput,\n} from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PasswordFieldContent,\n PasswordFieldProps,\n PasswordFieldRule,\n PasswordFieldRuleName,\n PasswordFieldValidateType,\n PasswordFieldValidation,\n PasswordFieldVariant,\n} from \"./field.types\";\n\n/**\n * A self-validating password field for auth widget forms.\n * @element sb-password-field\n *\n * @part password-field (rtg-field)\n * @part password-field-content (rtg-field-content): label + description wrapper\n * @part password-field-label (rtg-field-label)\n * @part password-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part password-field-description (rtg-field-description)\n * @part password-field-input (rtg-input/rtg-password-input)\n * @part password-field-error (rtg-field-error)\n *\n * @fires sb-password-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-password-field\")\nexport class SbPasswordField extends LitElement implements PasswordFieldProps {\n private static readonly _ROOT = \"password-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbPasswordField._ROOT}`;\n\n private static readonly _PATTERNS: Record<PasswordFieldRuleName, RegExp> = {\n uppercase: /[A-Z]/,\n lowercase: /[a-z]/,\n number: /[0-9]/,\n special: /[!@#$%^&*()_=+{}[\\]|\\\\;:\"<>,./?-]/,\n };\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"password\";\n\n /**\n * The variant of the password field input, where `\"toggle\"` renders a\n * hide/show button addon in the input element.\n */\n @property({ type: String })\n variant: PasswordFieldVariant = \"toggle\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: PasswordFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Password\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid password.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid password.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The format rules for the password, detailing the `name` or `pattern` for\n * each rule, as well as an optional `error` message pairing.\n */\n @property({ type: Array })\n rules: PasswordFieldRule[] = [\n { name: \"uppercase\", error: \"Must contain an uppercase letter.\" },\n { name: \"lowercase\", error: \"Must contain a lowercase letter.\" },\n { name: \"number\", error: \"Must contain a number.\" },\n { name: \"special\", error: \"Must contain a special character.\" },\n ];\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: PasswordFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Password is a required field.\";\n\n /**\n * Custom error message shown when the password is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the password is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Fallback error message shown when the field is invalid upon submission and\n * the unmet rules have not specified an error message.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid password.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The error message(s) rendered in field error when in an invalid state.\n */\n @state()\n private _errors: string[] = [];\n\n /**\n * The current value of the password input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPasswordField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbPasswordField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbPasswordField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbPasswordField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbPasswordField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbPasswordField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbPasswordField._ERROR}`;\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: PasswordFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbPasswordField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid password.\") {\n this._invalid = false;\n this._errors = [];\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: PasswordFieldValidateType,\n value: string,\n message: string = \"Invalid password.\",\n messages: string[] = [],\n ) {\n if (!messages.length) messages.push(message);\n\n this._invalid = true;\n this._errors = messages;\n this._dispatchValidate(false, type, value, messages.join(\" \"));\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._value;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Password must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Password must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n let valid = true;\n const messages: string[] = [];\n\n for (const rule of this.rules) {\n const pattern = rule.name\n ? SbPasswordField._PATTERNS[rule.name]\n : new RegExp(rule.pattern);\n\n if (!pattern.test(value)) {\n valid = false;\n if (rule.error) messages.push(rule.error);\n }\n }\n\n if (!valid) {\n this._handleValidateError(\n \"format\",\n value,\n messages.length ? undefined : this.formatError,\n messages,\n );\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbPasswordField.parts.input}\"] input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the password field's private props: `_value`, `_invalid`, and `_errors`.\n */\n private _handleFormReset = () => {\n const partSelector = `[part=\"${SbPasswordField.parts.input}\"]`;\n const selectors =\n this.variant === \"toggle\"\n ? `rtg-password-input${partSelector}`\n : `rtg-input${partSelector}`;\n\n const input = this.querySelector(selectors) as\n | RtgInput\n | RtgPasswordInput\n | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._errors = [];\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbPasswordField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbPasswordField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbPasswordField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_errors` messages if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n const errors = this._errors.map((error) => ({ message: error }));\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbPasswordField.parts.error}\"\n .errors=${errors}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbPasswordField.parts.root}\"\n data-variant=\"${this.variant}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbPasswordField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n ${this.variant === \"toggle\"\n ? html`\n <rtg-password-input\n id=\"${this.inputId}\"\n part=\"${SbPasswordField.parts.input}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-password-input>\n `\n : html`\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbPasswordField.parts.input}\"\n type=\"password\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n `}\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type {\n Input as RtgInput,\n PasswordInput as RtgPasswordInput,\n} from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { SbPasswordField } from \"./_password-field\";\nimport type {\n ConfirmFieldContent,\n ConfirmFieldProps,\n ConfirmFieldValidateType,\n ConfirmFieldValidation,\n ConfirmFieldVariant,\n} from \"./field.types\";\n\n/**\n * A self-validating confirm password field for auth widget forms.\n * @element sb-confirm-field\n *\n * @part confirm-field (rtg-field)\n * @part confirm-field-content (rtg-field-content): label + description wrapper\n * @part confirm-field-label (rtg-field-label)\n * @part confirm-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part confirm-field-description (rtg-field-description)\n * @part confirm-field-input (rtg-input/rtg-password-input)\n * @part confirm-field-error (rtg-field-error)\n *\n * @fires sb-confirm-field:validate\n * { id, parentId, name, value, pairSelector, pairValue, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-confirm-field\")\nexport class SbConfirmField extends LitElement implements ConfirmFieldProps {\n private static readonly _ROOT = \"confirm-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbConfirmField._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"confirm\";\n\n /**\n * The variant of the confirm field input, where `\"toggle\"` renders a\n * hide/show button addon in the input element.\n */\n @property({ type: String })\n variant: ConfirmFieldVariant = \"toggle\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: ConfirmFieldContent = \"split\";\n\n /**\n * A CSS selector for the paired `sb-password-field`.\n */\n @property({ type: String })\n pair = \"sb-password-field\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Confirm Password\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: ConfirmFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Confirm password is a required field.\";\n\n /**\n * Error message shown when the confirm value does not match the `pair`\n * password field's value.\n */\n @property({ attribute: \"match-error\", type: String })\n matchError = \"Passwords do not match.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The error message rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the confirm input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbConfirmField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbConfirmField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbConfirmField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbConfirmField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbConfirmField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbConfirmField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbConfirmField._ERROR}`;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Returns the paired password field's value or an empty string if the pair\n * cannot be found.\n */\n private _pairValue() {\n const scope = this._form ?? document;\n const selector = this.pair;\n\n const field = scope.querySelector(selector) as SbPasswordField | null;\n if (!field) return \"\";\n\n const input = field.querySelector(\n `[part=\"${SbPasswordField.parts.input}\"] input`,\n ) as HTMLInputElement | null;\n\n return input?.value ?? \"\";\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: ConfirmFieldValidateType,\n value: string,\n message: string,\n pairValue?: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n const pairSelector = this.pair;\n\n const validateEvent = new CustomEvent(SbConfirmField.validateEventName, {\n detail: {\n id,\n parentId,\n name,\n value,\n pairSelector,\n pairValue,\n valid,\n type,\n message,\n },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid confirm.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: ConfirmFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._value;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const pairValue = this._pairValue();\n\n if (value !== pairValue) {\n this._handleValidateError(\"match\", value, this.matchError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbConfirmField.parts.input}\"] input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the confirm field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const partSelector = `[part=\"${SbConfirmField.parts.input}\"]`;\n const selectors =\n this.variant === \"toggle\"\n ? `rtg-password-input${partSelector}`\n : `rtg-input${partSelector}`;\n\n const input = this.querySelector(selectors) as\n | RtgInput\n | RtgPasswordInput\n | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbConfirmField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbConfirmField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbConfirmField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbConfirmField.parts.error}\"\n .errors=\"${[{ message: this._error }]}\"\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbConfirmField.parts.root}\"\n data-variant=\"${this.variant}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbConfirmField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n ${this.variant === \"toggle\"\n ? html`\n <rtg-password-input\n id=\"${this.inputId}\"\n part=\"${SbConfirmField.parts.input}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-password-input>\n `\n : html`\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbConfirmField.parts.input}\"\n type=\"password\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n `}\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n EmailFieldContent,\n EmailFieldProps,\n EmailFieldValidateType,\n EmailFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating email field for auth widget forms.\n * @element sb-email-field\n *\n * @part email-field (rtg-field)\n * @part email-field-content (rtg-field-content): label + description wrapper\n * @part email-field-label (rtg-field-label)\n * @part email-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part email-field-description (rtg-field-description)\n * @part email-field-input (rtg-input)\n * @part email-field-error (rtg-field-error)\n *\n * @fires sb-email-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\"\n */\n@customElement(\"sb-email-field\")\nexport class SbEmailField extends LitElement implements EmailFieldProps {\n private static readonly _ROOT = \"email-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbEmailField._ROOT}`;\n\n private static readonly _PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"email\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: EmailFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Email\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: EmailFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Email is a required field.\";\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid email address.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the email input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbEmailField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbEmailField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbEmailField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbEmailField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbEmailField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbEmailField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbEmailField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: EmailFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbEmailField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid email.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: EmailFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n if (!SbEmailField._PATTERN.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbEmailField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the email field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbEmailField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbEmailField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbEmailField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbEmailField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbEmailField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbEmailField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbEmailField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbEmailField.parts.input}\"\n type=\"email\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n IdentifierFieldAutocomplete,\n IdentifierFieldContent,\n IdentifierFieldIdentifier,\n IdentifierFieldProps,\n IdentifierFieldValidateType,\n IdentifierFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating identifier field for auth widget forms.\n * @element sb-identifier-field\n *\n * @part identifier-field (rtg-field)\n * @part identifier-field-content (rtg-field-content): label + description wrapper\n * @part identifier-field-label (rtg-field-label)\n * @part identifier-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part identifier-field-description (rtg-field-description)\n * @part identifier-field-input (rtg-input)\n * @part identifier-field-error (rtg-field-error)\n *\n * @fires sb-identifier-field:validate\n * { id, parentId, name, identifiers, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\"\n */\n@customElement(\"sb-identifier-field\")\nexport class SbIdentifierField\n extends LitElement\n implements IdentifierFieldProps\n{\n private static readonly _ROOT = \"identifier-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbIdentifierField._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"identifier\";\n\n /**\n * The identifiers enabled in the identifier field.\n */\n @property({ type: Array })\n identifiers: IdentifierFieldIdentifier[] = [];\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: IdentifierFieldContent = \"split\";\n\n /**\n * The text content of the field label. If undefined, a label is generated\n * using the `identifiers` items.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * The `autocomplete` prop given to the field input.\n */\n @property({ type: String })\n autocomplete?: IdentifierFieldAutocomplete;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: IdentifierFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Identifier is a required field.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the identifier input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbIdentifierField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbIdentifierField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbIdentifierField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbIdentifierField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbIdentifierField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbIdentifierField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbIdentifierField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * The fallback label text generated, formatting the `identifiers` array into\n * a readable field label string.\n */\n private get _label() {\n const identifiers = this.identifiers;\n if (identifiers.length === 0) return \"Identifier\";\n\n let label = identifiers[0];\n if (identifiers.length > 1) {\n const start = identifiers.slice(0, -1).join(\", \");\n const middle = identifiers.length > 2 ? \", or \" : \" or \";\n const end = identifiers.slice(-1)[0];\n\n label = start + middle + end;\n }\n\n return label.charAt(0).toUpperCase() + label.slice(1);\n }\n\n /**\n * The type of the field input, using identifier-specific types if possible,\n * otherwise using `\"text\"`.\n */\n private get _type() {\n if (this.identifiers.length === 1 && this.identifiers[0] === \"email\")\n return \"email\";\n\n if (this.identifiers.length === 1 && this.identifiers[0] === \"phone\")\n return \"tel\";\n\n return \"text\";\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: IdentifierFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n const identifiers = this.identifiers;\n\n const validateEvent = new CustomEvent(SbIdentifierField.validateEventName, {\n detail: { id, parentId, name, identifiers, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid identifier.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: IdentifierFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n // Note: this check has been placed here for extendability and consistency\n // between `sb-*-field` elements. The `validation` option currently makes\n // no difference as the required check is the only validation check.\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbIdentifierField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the identifier field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbIdentifierField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbIdentifierField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbIdentifierField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label ?? this._label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbIdentifierField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbIdentifierField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbIdentifierField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbIdentifierField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbIdentifierField.parts.input}\"\n type=\"${this._type}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n autocomplete=\"${this.autocomplete ?? nothing}\"\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n NameFieldContent,\n NameFieldProps,\n NameFieldValidateType,\n NameFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating name field for auth widget forms.\n * @element sb-name-field\n *\n * @part name-field (rtg-field)\n * @part name-field-content (rtg-field-content): label + description wrapper\n * @part name-field-label (rtg-field-label)\n * @part name-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part name-field-description (rtg-field-description)\n * @part name-field-input (rtg-input)\n * @part name-field-error (rtg-field-error)\n *\n * @fires sb-name-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-name-field\")\nexport class SbNameField extends LitElement implements NameFieldProps {\n private static readonly _ROOT = \"name-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbNameField._ROOT}`;\n\n private static readonly _PATTERN = /^[\\p{L} .'-]*$/u;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"name\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: NameFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Name\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid name.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid name.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The regex pattern for a valid name, used in place of `_PATTERN`.\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: NameFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Name is a required field.\";\n\n /**\n * Custom error message shown when the name is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the name is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid name.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the name input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbNameField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbNameField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbNameField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbNameField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbNameField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbNameField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbNameField._ERROR}`;\n }\n\n /**\n * Returns the normalized value of `_value` by trimming leading/trailing\n * whitespace and collapsing consecutive interior spaces into one.\n */\n private get _normalizedValue() {\n return this._value.trim().replace(/\\s+/g, \" \");\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Returns the resolved regex pattern, using a `RegExp` built from the\n * `pattern` prop when provided, otherwise falling back to `_PATTERN`.\n */\n private get _pattern() {\n return this.pattern ? new RegExp(this.pattern) : SbNameField._PATTERN;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: NameFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbNameField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid name.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: NameFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Username must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Username must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n if (!this._pattern.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbNameField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the name field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbNameField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbNameField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbNameField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbNameField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbNameField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbNameField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbNameField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbNameField.parts.input}\"\n type=\"text\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PhoneFieldContent,\n PhoneFieldProps,\n PhoneFieldValidateType,\n PhoneFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating phone field for auth widget forms.\n * @element sb-phone-field\n *\n * @part phone-field (rtg-field)\n * @part phone-field-content (rtg-field-content): label + description wrapper\n * @part phone-field-label (rtg-field-label)\n * @part phone-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part phone-field-description (rtg-field-description)\n * @part phone-field-input (rtg-input)\n * @part phone-field-error (rtg-field-error)\n *\n * @fires sb-phone-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\"\n */\n@customElement(\"sb-phone-field\")\nexport class SbPhoneField extends LitElement implements PhoneFieldProps {\n private static readonly _ROOT = \"phone-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbPhoneField._ROOT}`;\n\n private static readonly _PATTERN =\n /^\\+?(\\d[\\d-.() ]+)?(\\([\\d-.() ]+\\))?[\\d-.() ]+\\d$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"phone\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: PhoneFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Phone\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: PhoneFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Phone is a required field.\";\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid phone number.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the phone input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPhoneField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbPhoneField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbPhoneField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbPhoneField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbPhoneField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbPhoneField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbPhoneField._ERROR}`;\n }\n\n /**\n * Returns the normalized value of `_value` by stripping all whitespace.\n */\n private get _normalizedValue() {\n return this._value.replace(/\\s/g, \"\");\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: PhoneFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbPhoneField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid phone.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: PhoneFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n if (!SbPhoneField._PATTERN.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbPhoneField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the phone field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbPhoneField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbPhoneField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbPhoneField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbPhoneField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbPhoneField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbPhoneField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbPhoneField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbPhoneField.parts.input}\"\n type=\"tel\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n UsernameFieldContent,\n UsernameFieldProps,\n UsernameFieldValidateType,\n UsernameFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating username field for auth widget forms.\n * @element sb-username-field\n *\n * @part username-field (rtg-field)\n * @part username-field-content (rtg-field-content): label + description wrapper\n * @part username-field-label (rtg-field-label)\n * @part username-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part username-field-description (rtg-field-description)\n * @part username-field-input (rtg-input)\n * @part username-field-error (rtg-field-error)\n *\n * @fires sb-username-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-username-field\")\nexport class SbUsernameField extends LitElement implements UsernameFieldProps {\n private static readonly _ROOT = \"username-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbUsernameField._ROOT}`;\n\n private static readonly _PATTERN = /^[a-z0-9_]*$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"username\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: UsernameFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Username\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid username.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid username.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The regex pattern for a valid username, used in place of `_PATTERN`.\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: UsernameFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Username is a required field.\";\n\n /**\n * Custom error message shown when the username is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the username is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid username.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the username input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbUsernameField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbUsernameField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbUsernameField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbUsernameField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbUsernameField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbUsernameField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbUsernameField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Returns the resolved regex pattern, using a `RegExp` built from the\n * `pattern` prop when provided, otherwise falling back to `_PATTERN`.\n */\n private get _pattern() {\n return this.pattern ? new RegExp(this.pattern) : SbUsernameField._PATTERN;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: UsernameFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbUsernameField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid username.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: UsernameFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Username must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Username must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n if (!this._pattern.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbUsernameField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the username field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbUsernameField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbUsernameField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbUsernameField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbUsernameField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbUsernameField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbUsernameField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbUsernameField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbUsernameField.parts.input}\"\n type=\"text\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n FormSubmitProps,\n FormSubmitSize,\n FormSubmitSpinnerAlign,\n FormSubmitVariant,\n} from \"./form.types\";\n\n/**\n * A submit button for auth widget forms.\n * @element sb-form-submit\n *\n * @part form-submit (rtg-button)\n * @part form-submit-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-form-submit:click { id, event }\n */\n@customElement(\"sb-form-submit\")\nexport class SbFormSubmit extends LitElement implements FormSubmitProps {\n private static readonly _ROOT = \"form-submit\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbFormSubmit._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, spinner };\n }\n\n /**\n * The name of the custom event fired on click.\n */\n static get clickEventName() {\n return `${this.TAG}:click`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: FormSubmitVariant = \"default\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: FormSubmitSize = \"default\";\n\n /**\n * The text used as the button label.\n */\n @property({ type: String })\n label = \"Submit\";\n\n /**\n * Whether the loading spinner should be rendered before or after the label.\n */\n @property({ attribute: \"spinner-align\", type: String })\n spinnerAlign: FormSubmitSpinnerAlign = \"start\";\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the button reflects a loading state.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSubmit.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the spinner\n * part name appended.\n */\n get spinnerId() {\n return `${this.rootId}-${SbFormSubmit._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, and\n * firing the click event.\n */\n private _handleClick = () => {\n if (this.disabled || this.isLoading) return;\n\n this.dispatchEvent(\n new CustomEvent(SbFormSubmit.clickEventName, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbFormSubmit.parts.spinner}\"\n class=\"rtg-icon-inline-${this.spinnerAlign}\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbFormSubmit.parts.root}\"\n data-event=\"${this.event}\"\n ?data-loading=${this.isLoading}\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n type=\"submit\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.spinnerAlign === \"start\" ? this._renderSpinner() : nothing}\n ${this.label}\n ${this.spinnerAlign === \"end\" ? this._renderSpinner() : nothing}\n </rtg-button>\n `;\n }\n}\n","import {\n SbConfirmField,\n SbEmailField,\n SbIdentifierField,\n SbNameField,\n SbPasswordField,\n SbPhoneField,\n SbUsernameField,\n} from \"../field\";\n\nconst FIELDS = [\n SbEmailField,\n SbPhoneField,\n SbUsernameField,\n SbIdentifierField,\n SbNameField,\n SbPasswordField,\n SbConfirmField,\n];\n\nexport const FIELD_SELECTORS = FIELDS.map((f) => f.TAG).join(\", \");\nexport const FIELD_VALIDATE_EVENTS = FIELDS.map((f) => f.validateEventName);\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { SbFormSubmit } from \"./_form-submit\";\nimport { FIELD_SELECTORS, FIELD_VALIDATE_EVENTS } from \"./form.defs\";\nimport type { Field, FormOnReset, FormOnSubmit, FormProps } from \"./form.types\";\n\n/**\n * A composable form container that orchestrates validation, collects form data,\n * and handles auth service communications.\n * @element sb-form\n *\n * @part form (form)\n *\n * @fires sb-form:success { id, data, event }\n * @fires sb-form:error { id, data, event, message }\n * @fires sb-form:reset { id }\n */\n@customElement(\"sb-form\")\nexport class SbForm extends LitElement implements FormProps {\n private static readonly _ROOT = \"form\";\n\n static readonly TAG = `sb-${SbForm._ROOT}`;\n\n static readonly SUCCESS_EVENT = `${SbForm.TAG}:success`;\n static readonly ERROR_EVENT = `${SbForm.TAG}:error`;\n static readonly RESET_EVENT = `${SbForm.TAG}:reset`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n return { root };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * When provided, called with the collected form data and the auth event\n * string instead of the default `Auth.processLoginflowEvent` call.\n * Use this to plug in custom submission logic or to handle auth externally.\n */\n @property({ attribute: false })\n onSubmit?: FormOnSubmit;\n\n /**\n * Called after the native form reset event fires.\n */\n @property({ attribute: false })\n onReset?: FormOnReset;\n\n /**\n * Auth event string captured from the most recent `sb-form-submit:click`\n * event. Cleared after each submission attempt.\n */\n private _pendingEvent?: string;\n\n /**\n * Guards against double-submission while an async auth call is in-flight.\n */\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbForm.parts.root}-${this.seed}`;\n }\n\n /**\n * The native `<form>` element rendered as the root part.\n */\n private get _form() {\n return this.querySelector<HTMLFormElement>(\n `form[part=\"${SbForm.parts.root}\"]`,\n );\n }\n\n /**\n * All `sb-*-field` descendants inside the form element.\n */\n private get _fields() {\n const form = this._form;\n if (!form) return [];\n\n return Array.from(form.querySelectorAll<Field>(FIELD_SELECTORS));\n }\n\n /**\n * The first `sb-form-submit` descendant inside the form element.\n */\n private get _submit() {\n const form = this._form;\n if (!form) return null;\n\n return form.querySelector<SbFormSubmit>(SbFormSubmit.TAG);\n }\n\n /**\n * Subscribes to the `sb-form-submit:click` event so the auth event string\n * is captured before the native form `submit` event fires.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(SbFormSubmit.clickEventName, this._handleSubmitClick);\n }\n\n /**\n * Removes the `sb-form-submit:click` listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\n SbFormSubmit.clickEventName,\n this._handleSubmitClick,\n );\n }\n\n /**\n * Moves initial children (authored inside `<sb-form>` in markup) into the\n * rendered `<form>` element. The DOM move disconnects and reconnects each\n * custom-element child, letting field elements re-run `connectedCallback`\n * and find the native form ancestor via `this.closest(\"form\")`.\n */\n protected firstUpdated() {\n const form = this._form;\n if (!form) return;\n\n const children = Array.from(this.childNodes).filter((n) => n !== form);\n children.forEach((n) => form.appendChild(n));\n }\n\n /**\n * Captures the auth event string emitted by `sb-form-submit` before the\n * native form submit fires.\n */\n private _handleSubmitClick = (e: Event) => {\n this._pendingEvent = (e as CustomEvent<{ event?: string }>).detail?.event;\n };\n\n /**\n * Dispatches a bubbling, composed custom event from `sb-form`.\n */\n private _dispatch(name: string, detail: Record<string, unknown> = {}) {\n this.dispatchEvent(\n new CustomEvent(name, { detail, bubbles: true, composed: true }),\n );\n }\n\n /**\n * Applies or removes the loading state on every field element and the\n * submit button. `wasDisabled` records the pre-loading state so that\n * fields that were already disabled are not re-enabled when loading ends.\n */\n private _setLoading(\n loading: boolean,\n fields: Field[],\n wasDisabled: boolean[],\n ) {\n fields.forEach((field, i) => {\n field.disabled = loading ? true : wasDisabled[i];\n });\n\n const submit = this._submit;\n if (submit) submit.loading = loading;\n\n this._loading = loading;\n }\n\n /**\n * Handles the native form submit event:\n *\n * 1. Always prevents the default browser navigation.\n * 2. Adds temporary listeners for every `sb-*-field:validate` event on\n * `this`. These events bubble from field elements and carry `{ name,\n * value, valid }` in their detail — the exact values each field uses\n * for its own validation. The temporary listener builds the form-data\n * object as a side effect of the validation calls in step 3.\n * 3. Calls `field.validate()` on every `sb-*-field` via `Array.map` (not\n * `Array.every`) so ALL fields are validated and ALL inline errors are\n * shown even when multiple fields are invalid simultaneously.\n * 4. Removes the temporary validate listeners.\n * 5. Aborts if any field returned `false`.\n * 6. Calls `onSubmit` if provided, bypassing the default auth flow.\n * 7. Otherwise calls `Auth.processLoginflowEvent` with the captured auth\n * event string and the collected data, managing loading state throughout.\n */\n private _handleSubmit = async (e: SubmitEvent) => {\n e.preventDefault();\n\n if (this._loading) return;\n\n const fields = this._fields;\n\n // Collect form data from validate events fired during validation below.\n const data: Record<string, string> = {};\n const collector = (evt: Event) => {\n const detail = (evt as CustomEvent<{ name?: string; value?: string }>)\n .detail;\n if (detail?.name !== undefined && detail.value !== undefined) {\n data[detail.name] = detail.value;\n }\n };\n\n FIELD_VALIDATE_EVENTS.forEach((n) => this.addEventListener(n, collector));\n // Use map (not every) so all fields are validated and show their errors.\n const results = fields.map((field) => field.validate());\n FIELD_VALIDATE_EVENTS.forEach((n) =>\n this.removeEventListener(n, collector),\n );\n\n const allValid = results.every(Boolean);\n if (!allValid) return;\n\n const event = this._pendingEvent;\n\n if (this.onSubmit) {\n this.onSubmit(data, event);\n return;\n }\n\n if (!event) return;\n\n const wasDisabled = fields.map((f) => !!f.disabled);\n this._setLoading(true, fields, wasDisabled);\n\n try {\n await Auth.processLoginflowEvent({\n event,\n ...(Object.keys(data).length ? { data } : {}),\n } as Parameters<typeof Auth.processLoginflowEvent>[0]);\n\n this._dispatch(SbForm.SUCCESS_EVENT, { id: this.rootId, data, event });\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n this._dispatch(SbForm.ERROR_EVENT, {\n id: this.rootId,\n data,\n event,\n message,\n });\n } finally {\n this._setLoading(false, fields, wasDisabled);\n this._pendingEvent = undefined;\n }\n };\n\n /**\n * Handles the native form reset event. Field elements handle their own\n * internal state reset via their own form-reset listeners.\n */\n private _handleReset = (e: Event) => {\n this._pendingEvent = undefined;\n if (this.onReset) this.onReset(e);\n this._dispatch(SbForm.RESET_EVENT, { id: this.rootId });\n };\n\n render() {\n return html`\n <form\n id=\"${this.rootId}\"\n part=\"${SbForm.parts.root}\"\n @submit=${this._handleSubmit}\n @reset=${this._handleReset}\n ></form>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type { SbFormSeparatorProps } from \"./form.types\";\n\n/**\n * Visual divider to separate sections inside a form. Accepts optional inline\n * text content.\n * @element sb-form-separator\n *\n * @slot form-separator (rtg-field-separator)\n */\n@customElement(\"sb-form-separator\")\nexport class SbFormSeparator\n extends LitElement\n implements SbFormSeparatorProps\n{\n private static readonly _ROOT = \"form-separator\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n return { root };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The optional text used as the separator inline content.\n */\n @property({ type: String })\n content?: string;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSeparator.parts.root}-${this.seed}`;\n }\n\n render() {\n return html`\n <rtg-field-separator\n id=\"${this.rootId}\"\n part=\"${SbFormSeparator.parts.root}\"\n data-content=\"${this.content ? \"true\" : \"false\"}\"\n >\n ${this.content ?? nothing}\n </rtg-field-separator>\n `;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n FormSwitchProps,\n FormSwitchSize,\n FormSwitchType,\n FormSwitchVariant,\n} from \"./form.types\";\n\n/**\n * A button for switching between auth widgets.\n * @element sb-form-switch\n *\n * @part form-switch (rtg-button)\n * @part form-switch-wrapper (div): contains root and optional prompt\n * @part form-switch-prompt (p): prompt text for `\"default\"` form switches\n * @part form-swith-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-form-switch:click { id, event }\n */\n@customElement(\"sb-form-switch\")\nexport class SbFormSwitch extends LitElement implements FormSwitchProps {\n private static readonly _ROOT = \"form-switch\";\n private static readonly _WRAPPER = \"wrapper\";\n private static readonly _PROMPT = \"prompt\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbFormSwitch._ROOT}`;\n\n static readonly CLICK_EVENT = `${SbFormSwitch.TAG}:click`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const wrapper = `${root}-${this._WRAPPER}`;\n const prompt = `${root}-${this._PROMPT}`;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, wrapper, prompt, spinner };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * Whether the form switch is a link button with optional prompt text, or a\n * configurable button element.\n */\n @property({ type: String })\n type: FormSwitchType = \"default\";\n\n /**\n * The visual variant of the (button) form switch.\n */\n @property({ type: String })\n variant: FormSwitchVariant = \"secondary\";\n\n /**\n * The size of the (button) form switch.\n */\n @property({ type: String })\n size: FormSwitchSize = \"default\";\n\n /**\n * The text used as the form switch button label.\n */\n @property({ type: String })\n label = \"Switch\";\n\n /**\n * Optional text which precedes the button in a `\"default\"` form switch.\n */\n @property({ type: String })\n prompt?: string;\n\n /**\n * When provided, the switch reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the switch reflects a loading state.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the switch is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSwitch.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the wrapper element, derived from `rootId` and the part name.\n */\n get wrapperId() {\n return `${this.rootId}-${SbFormSwitch._WRAPPER}`;\n }\n\n /**\n * The `id` of the prompt element, derived from `rootId` and the part name.\n */\n get promptId() {\n return `${this.rootId}-${SbFormSwitch._PROMPT}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` and the part name.\n */\n get spinnerId() {\n return `${this.rootId}-${SbFormSwitch._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = async () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this.dispatchEvent(\n new CustomEvent(SbFormSwitch.CLICK_EVENT, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n\n try {\n if (this.event) await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n };\n\n /**\n * Returns the prompt paragraph template for `\"default\"` form switches.\n */\n private _renderPrompt() {\n if (this.type === \"button\" || !this.prompt) return nothing;\n\n return html`\n <p id=\"${this.promptId}\" part=\"${SbFormSwitch.parts.prompt}\">\n ${this.prompt}\n </p>\n `;\n }\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbFormSwitch.parts.spinner}\"\n class=\"rtg-icon-inline-end\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n const variant = this.type === \"button\" ? this.variant : \"link\";\n const size = this.type === \"button\" ? this.size : \"default\";\n\n return html`\n <div id=\"${this.wrapperId}\" part=\"${SbFormSwitch.parts.wrapper}\">\n ${this._renderPrompt()}\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbFormSwitch.parts.root}\"\n data-type=\"${this.type}\"\n data-event=\"${this.event ?? nothing}\"\n data-loading=\"${this.isLoading ? \"true\" : nothing}\"\n variant=\"${variant}\"\n size=\"${size}\"\n ?disabled=\"${this.disabled || this.isLoading}\"\n >\n ${this.label} ${this._renderSpinner()}\n </rtg-button>\n </div>\n `;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PasskeyButtonProps,\n PasskeyButtonSize,\n PasskeyButtonSpinnerAlign,\n PasskeyButtonVariant,\n} from \"./passkey-button.types\";\n\n/**\n * A button for passkey authentication in auth widgets.\n * @element sb-passkey-button\n *\n * @part passkey-button (rtg-button)\n * @part passkey-button-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-passkey-button:click { id, event }\n */\n@customElement(\"sb-passkey-button\")\nexport class SbPasskeyButton extends LitElement implements PasskeyButtonProps {\n private static readonly _ROOT = \"passkey-button\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbPasskeyButton._ROOT}`;\n\n static readonly CLICK_EVENT = `${SbPasskeyButton.TAG}:click`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, spinner };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: PasskeyButtonVariant = \"secondary\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: PasskeyButtonSize = \"default\";\n\n /**\n * The text used as the button label.\n */\n @property({ type: String })\n label = \"Use Passkey\";\n\n /**\n * Whether the loading spinner should be rendered before or after the label.\n */\n @property({ attribute: \"spinner-align\", type: String })\n spinnerAlign: PasskeyButtonSpinnerAlign = \"start\";\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, a loading state is applied.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPasskeyButton.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` and the part name.\n */\n get spinnerId() {\n return `${this.rootId}-${SbPasskeyButton._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = async () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this.dispatchEvent(\n new CustomEvent(SbPasskeyButton.CLICK_EVENT, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n\n try {\n if (this.event) await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n };\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbPasskeyButton.parts.spinner}\"\n class=\"rtg-icon-inline-${this.spinnerAlign}\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbPasskeyButton.parts.root}\"\n data-event=\"${this.event ?? nothing}\"\n data-loading=\"${this.isLoading ? \"true\" : nothing}\"\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.spinnerAlign === \"start\" ? this._renderSpinner() : nothing}\n ${this.label}\n ${this.spinnerAlign === \"end\" ? this._renderSpinner() : nothing}\n </rtg-button>\n `;\n }\n}\n","import type { Provider } from \"./provider.types\";\n\nexport const PROVIDER_NAMES: Record<Provider, string> = {\n apple: \"Apple\",\n discord: \"Discord\",\n facebook: \"Facebook\",\n github: \"GitHub\",\n google: \"Google\",\n linkedin: \"LinkedIn\",\n meta: \"Meta\",\n microsoft: \"Microsoft\",\n x: \"X\",\n};\n\nexport const PROVIDER_ICON_PATHS: Record<Provider, string> = {\n apple:\n \"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\",\n discord:\n \"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z\",\n facebook:\n \"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z\",\n github:\n \"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\",\n google:\n \"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\",\n linkedin:\n \"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\",\n meta: \"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z\",\n microsoft:\n \"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z\",\n x: \"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z\",\n};\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\nimport { PROVIDER_ICON_PATHS, PROVIDER_NAMES } from \"./provider.defs\";\nimport type {\n Provider,\n ProviderButtonContent,\n ProviderButtonIconAlign,\n ProviderButtonProps,\n ProviderButtonSize,\n ProviderButtonVariant,\n} from \"./provider.types\";\n\n/**\n * A button for auth provider authentication.\n * @element sb-provider-button\n *\n * @part provider-button (rtg-button)\n * @part provider-button-icon (svg/rtg-spinner): logo icon or loading indicator\n *\n * @fires sb-provider-button:click { id, provider, event }\n */\n@customElement(\"sb-provider-button\")\nexport class SbProviderButton\n extends LitElement\n implements ProviderButtonProps\n{\n private static readonly _ROOT = \"provider-button\";\n private static readonly _ICON = \"icon\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const icon = `${root}-${this._ICON}`;\n\n return { root, icon };\n }\n\n /**\n * The name of the custom event fired on click.\n */\n static get clickEventName() {\n return `sb-${this._ROOT}:click`;\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The auth provider associated to this button.\n */\n @property({ type: String })\n provider!: Provider;\n\n /**\n * Whether the button content is an icon, label, or both.\n */\n @property({ type: String })\n content: ProviderButtonContent = \"icon-label\";\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: ProviderButtonVariant = \"outline\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: ProviderButtonSize = \"default\";\n\n /**\n * The text of the button label, preceding the provider name.\n */\n @property({ type: String })\n prompt = \"Use\";\n\n /**\n * Whether the icon is rendered before or after (`\"start\"` or `\"end\"`) the\n * button label.\n */\n @property({ attribute: \"icon-align\", type: String })\n iconAlign: ProviderButtonIconAlign = \"start\";\n\n /**\n * The text of the entire button label, overriding the default `prompt` and\n * provider name label template.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, a loading state is applied.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event identifier/name as defined in auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name, `seed`, and `provider`.\n */\n get rootId() {\n return (\n this.childId ??\n `sb-${SbProviderButton.parts.root}-${this.provider}-${this.seed}`\n );\n }\n\n /**\n * The `id` of the icon (logo and spinner) element, derived from `rootId` with\n * the icon part name appended.\n */\n get iconId() {\n return `${this.rootId}-${SbProviderButton._ICON}`;\n }\n\n /**\n * The `class` given to the icon part handling button alignment.\n */\n private get iconCn() {\n if (this.content === \"icon\") return \"\";\n return `rtg-icon-align-${this.iconAlign}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Defines and dispatches the click event.\n */\n private _dispatchClick() {\n const clickEvent = new CustomEvent(SbProviderButton.clickEventName, {\n detail: { id: this.rootId, provider: this.provider, event: this.event },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(clickEvent);\n }\n\n /**\n * Emits the provided `event` to the auth service to process.\n */\n private async _emitClickEvent() {\n if (!this.event) return;\n if (!this._loading) this._loading = true;\n\n try {\n await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this._dispatchClick();\n this._emitClickEvent();\n };\n\n /**\n * Returns the provider logo icon template.\n */\n private _renderLogo() {\n return html`\n <svg\n id=\"${this.iconId}\"\n part=\"${SbProviderButton.parts.icon}\"\n data-icon=\"logo\"\n data-provider=\"${this.provider}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"${this.iconCn}\"\n >\n <path d=\"${PROVIDER_ICON_PATHS[this.provider]}\" />\n </svg>\n `;\n }\n\n /**\n * Returns the loading spinner icon template.\n */\n private _renderSpinner() {\n return html`\n <rtg-spinner\n id=\"${this.iconId}\"\n part=\"${SbProviderButton.parts.icon}\"\n data-icon=\"spinner\"\n class=\"${this.iconCn}\"\n ></rtg-spinner>\n `;\n }\n\n /**\n * Returns the spinner template if loading, and the logo template if the\n * `content` prop requires the icon part.\n */\n private _renderIcon() {\n return this.isLoading\n ? this._renderSpinner()\n : this.content.includes(\"icon\")\n ? this._renderLogo()\n : nothing;\n }\n\n render() {\n const name = PROVIDER_NAMES[this.provider];\n const label = this.label ?? `${this.prompt} ${name}`;\n\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbProviderButton.parts.root}\"\n data-provider=\"${this.provider}\"\n data-content=\"${this.content}\"\n data-event=\"${this.event}\"\n ?data-disabled=${this.disabled || this.isLoading}\n ?data-loading=${this.isLoading}\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.iconAlign === \"start\" ? this._renderIcon() : nothing}\n ${this.content.includes(\"label\") ? label : nothing}\n ${this.iconAlign === \"end\" ? this._renderIcon() : nothing}\n </rtg-button>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n Provider,\n ProviderButtonContent,\n ProviderButtonIconAlign,\n ProviderButtonSize,\n ProviderButtonVariant,\n ProviderFieldOverride,\n ProviderFieldProps,\n} from \"./provider.types\";\n\n/**\n * A wrapper field, containing and styling auth provider buttons.\n * @element sb-provider-field\n *\n * @part provider-field (rtg-field)\n * @part provider-field-button (sb-provider-button)\n */\n@customElement(\"sb-provider-field\")\nexport class SbProviderField extends LitElement implements ProviderFieldProps {\n private static readonly _ROOT = \"provider-field\";\n private static readonly _BUTTON = \"button\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const button = `${root}-${this._BUTTON}`;\n\n return { root, button };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The providers included as provider buttons in this field.\n */\n @property({ type: Array })\n providers: Provider[] = [];\n\n /**\n * The `content` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n content?: ProviderButtonContent;\n\n /**\n * The `variant` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n variant?: ProviderButtonVariant;\n\n /**\n * The `size` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n size?: ProviderButtonSize;\n\n /**\n * The `prompt` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n prompt?: string;\n\n /**\n * The `icon-align` prop passed to each of the provider buttons.\n */\n @property({ attribute: \"icon-align\", type: String })\n iconAlign?: ProviderButtonIconAlign;\n\n /**\n * The `label` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * The `disabled` prop passed to each of the provider buttons.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * The `loading` prop passed to each of the provider buttons.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The `event` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * A list of provider-specific prop overrides.\n */\n @property({ type: Array })\n overrides: ProviderFieldOverride[] = [];\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbProviderField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the provider button element, derived from `rootId` with the\n * button part name appended.\n */\n get buttonId() {\n return `${this.rootId}-${SbProviderField._BUTTON}`;\n }\n\n /**\n * The number of columns within the field, given to the root element via its\n * `data-columns` attribute. In hyphenated values (e.g. `\"two-three\"`), the\n * first part is the number of columns in the first row, and the second part\n * is the number of columns in the second row.\n */\n get columns() {\n const total = this._providers.length;\n\n if (total < 3) return \"one\";\n if (total % 3 === 0) return \"three\";\n if (total === 5) return \"two-three\";\n if (total === 7) return \"three-four\";\n\n return \"four\";\n }\n\n /**\n * The `providers` array without any duplicates.\n */\n private get _providers() {\n return [...new Set(this.providers)];\n }\n\n /**\n * The `overrides` array without any duplicate `provider` entries (i.e. no\n * two override items have the same `provider` value).\n */\n private get _overrides() {\n return this.overrides.filter(\n (override, index, self) =>\n index === self.findIndex((o) => o.provider === override.provider),\n );\n }\n\n /**\n * Returns the template for the button part, specifically an\n * `sb-provider-button` element with props originating from `overrides` if\n * given, otherwise the general prop given to this field component.\n */\n private _renderButton(props: ProviderFieldOverride) {\n return html`\n <sb-provider-button\n id=\"${this.buttonId}\"\n part=\"${SbProviderField.parts.button}\"\n seed=\"${props.seed ?? this.seed}\"\n child-id=\"${props.childId ?? nothing}\"\n provider=\"${props.provider}\"\n content=\"${props.content ??\n this.content ??\n (this._providers.length > 2 ? \"icon\" : nothing)}\"\n variant=\"${props.variant ?? this.variant ?? nothing}\"\n size=\"${props.size ?? this.size ?? nothing}\"\n prompt=\"${props.prompt ?? this.prompt ?? nothing}\"\n icon-align=\"${props.iconAlign ?? this.iconAlign ?? nothing}\"\n label=\"${props.label ?? this.label ?? nothing}\"\n ?disabled=\"${props.disabled || this.disabled}\"\n ?loading=\"${props.loading || this.loading}\"\n event=\"${props.event ?? this.event ?? nothing}\"\n ></sb-provider-button>\n `;\n }\n\n render() {\n const overrides = this._overrides;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbProviderField.parts.root}\"\n data-columns=\"${this.columns}\"\n >\n ${this._providers.map((provider) =>\n this._renderButton(\n overrides.find((o) => o.provider === provider) ?? { provider },\n ),\n )}\n </rtg-field>\n `;\n }\n}\n","import { BaseElement, SaasBaseLayout } from \"@/components\";\nimport { html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { mapStyles } from \"@/utils\";\n\nimport { BREAKPOINTS } from \"@/constants\";\nimport { GapType } from \"./gap.types\";\n\n@customElement(\"sb-gap\")\nexport class SbGap extends BaseElement {\n @property() size = \"8px\";\n @property() type: GapType = \"vertical\";\n\n @property() id = \"\";\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n // ---------------------------\n // SIZE LOGIC\n // ---------------------------\n let sizeStyle: Record<string, string> = {\n width: \"0px\",\n height: \"0px\",\n };\n\n if (this.type === \"vertical\") {\n sizeStyle = {\n width: \"1px\",\n height: this.size,\n };\n } else {\n sizeStyle = {\n height: \"1px\",\n width: this.size,\n };\n }\n\n return html`\n <div\n part=${this.id ? this.id : \"gap\"}\n style=${mapStyles({\n ...sizeStyle,\n })}\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-gap\": SbGap;\n }\n}\n","import { BaseElement } from \"@/components\";\n\nimport { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-header\")\nexport class SbHeader extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(`div[part=${this.id ? this.id : \"header\"}]`);\n }\n\n @property({ type: String }) align: string = \"center\";\n @property({ type: String, attribute: \"gap\" }) gap: string = \"8px\";\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.moveLightDomChildrenInto(this._containerElement!);\n }\n\n render() {\n return html` <div part=${this.id ? this.id : \"header\"}></div> `;\n }\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{directive as r,Directive as s,PartType as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends s{constructor(i){if(super(i),this.it=t,i.type!==n.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=r(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","import { LitElement, html, css } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { resolveIconSource, decodeBase64Svg, resolveImageUrl } from \"@/utils\";\nimport { unsafeSVG } from \"lit/directives/unsafe-svg.js\";\nimport { BaseElement } from \"@/components\";\nimport { LogoTheme } from \"./logo.types\";\n\n@customElement(\"sb-logo\")\nexport class SbLogo extends BaseElement {\n @property({ type: String }) id!: string;\n @property({ type: String, attribute: \"image-url\" }) imageUrl!: string;\n\n @property({ type: String, reflect: true }) align: string = \"center\";\n @property({ type: String, reflect: true }) width: string = \"\";\n @property({ type: String, reflect: true }) height: string = \"\";\n\n @state() private theme: LogoTheme = this.getTheme();\n @state() private isSvg = false;\n\n private observer?: MutationObserver;\n\n get _containerElement(): HTMLElement | null {\n return this.querySelector(\".sb-logo-wrapper\");\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.style.display = \"grid\";\n this.updateLayoutFromProps();\n\n this.observer = new MutationObserver(() => {\n this.theme = this.getTheme();\n });\n\n this.observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\"],\n });\n }\n\n updated(changed: Map<string, unknown>) {\n super.updated(changed);\n\n if (changed.has(\"align\") || changed.has(\"width\") || changed.has(\"height\")) {\n this.updateLayoutFromProps();\n }\n }\n\n private updateLayoutFromProps() {\n const el = this._containerElement as HTMLElement | null;\n if (!el) return;\n\n if (this.align) {\n el.style.justifySelf = this.align;\n }\n if (this.width) {\n el.style.width = this.width;\n }\n if (this.height) {\n el.style.height = this.height;\n }\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n super.disconnectedCallback();\n }\n\n private getTheme(): \"light\" | \"dark\" {\n return (\n (document.documentElement.getAttribute(\"data-theme\") as\n | \"light\"\n | \"dark\") ?? \"light\"\n );\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n const resolvedImage = resolveImageUrl(this.imageUrl, this.theme);\n const decodedSvg = resolvedImage ? decodeBase64Svg(resolvedImage) : null;\n this.isSvg = !!decodedSvg;\n\n return html`\n <div class=\"sb-logo-wrapper\">\n ${decodedSvg\n ? unsafeSVG(decodedSvg)\n : html`\n <img\n part=${this.id ? this.id : \"logo\"}\n src=${resolveIconSource(resolvedImage)}\n alt=\"Logo\"\n />\n `}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-logo\": SbLogo;\n }\n}\n","import{html as t,svg as r,mathml as e}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst a=Symbol.for(\"\"),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++}if($===a&&n.push(r[a]),f){const t=n.join(\"$$lit$$\");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u}return t(r,...e)},u=n(t),c=n(r),$=n(e);export{u as html,i as literal,$ as mathml,c as svg,s as unsafeStatic,n as withStatic};\n//# sourceMappingURL=static.js.map\n","import { nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { html, unsafeStatic } from \"lit/static-html.js\";\nimport { BaseElement } from \"@/components\";\nimport { OtpVariant } from \"./otp.types\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\n@customElement(\"sb-otp\")\nexport class SbOtp extends BaseElement {\n // ---------------------------\n // PROPS\n // ---------------------------\n\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-input-otp[part=${this.id ? this.id : \"otp\"}]`,\n );\n }\n\n @property() variant: OtpVariant = \"with_separator\";\n @property({ type: Number }) length = 6;\n @property({ type: Number }) timeout = 300;\n\n @property({ attribute: \"data-key\" }) dataKey = \"\";\n @property() event = \"\";\n\n @property({ attribute: \"resend-text\" }) resendText = \"\";\n @property({ attribute: \"resend-button-text\" }) resendButtonText = \"\";\n @property({ attribute: \"resend-event\" }) resendEvent = \"\";\n\n @property() id = \"otp\";\n\n protected createRenderRoot() {\n return this;\n }\n\n // ---------------------------\n // EVENTS (NEW CLEAN API)\n // ---------------------------\n\n private emit(name: string, detail: any) {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail,\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // ---------------------------\n // OTP STRUCTURE\n // ---------------------------\n\n private buildOTPContentHTML(): string {\n const variant = this.variant;\n const length = this.length;\n\n const slotsHTML = (start: number, end: number): string =>\n Array.from(\n { length: end - start },\n (_, i) =>\n `<rtg-input-otp-slot index=\"${start + i}\"></rtg-input-otp-slot>`,\n ).join(\"\");\n\n const group = (inner: string) =>\n `<rtg-input-otp-group>${inner}</rtg-input-otp-group>`;\n\n const sep = `<rtg-input-otp-separator></rtg-input-otp-separator>`;\n\n if (variant === \"simple\") {\n const half = Math.ceil(length / 2);\n return group(slotsHTML(0, half)) + sep + group(slotsHTML(half, length));\n }\n\n if (variant === \"with_separator\") {\n const third = Math.ceil(length / 3);\n return (\n group(slotsHTML(0, third)) +\n sep +\n group(slotsHTML(third, third * 2)) +\n sep +\n group(slotsHTML(third * 2, length))\n );\n }\n\n if (variant === \"with_spacing\") {\n return Array.from({ length }, (_, i) =>\n group(`<rtg-input-otp-slot index=\"${i}\"></rtg-input-otp-slot>`),\n ).join(\"\");\n }\n\n return group(slotsHTML(0, length));\n }\n\n // ---------------------------\n // HANDLERS (NOW EMIT EVENTS)\n // ---------------------------\n\n private handleComplete = async (value: string) => {\n const formData: { [key: string]: any } = {};\n formData[this.dataKey] = value;\n try {\n await Auth.processLoginflowEvent({\n event: this.event,\n data: formData,\n });\n } finally {\n this.emit(\"sb-otp:complete\", {\n id: this.id,\n dataKey: this.dataKey,\n value,\n event: this.event || null,\n });\n }\n };\n\n private handleFocus = () => {\n this.emit(\"sb-otp:focus\", {\n id: this.id,\n dataKey: this.dataKey,\n });\n };\n\n private handleBlur = () => {\n this.emit(\"sb-otp:blur\", {\n id: this.id,\n dataKey: this.dataKey,\n });\n };\n\n private handleResend = async () => {\n if (!this.resendEvent) return;\n try {\n await Auth.processLoginflowEvent({\n event: this.resendEvent,\n });\n } finally {\n this.emit(\"sb-otp:resend\", {\n id: this.id,\n event: this.resendEvent,\n });\n }\n };\n\n // ---------------------------\n // RENDER\n // ---------------------------\n\n render() {\n const variant = this.variant || \"digits_only\";\n\n return html`\n <rtg-input-otp\n part=${this.id ? this.id : \"otp\"}\n id=${this.dataKey ?? this.id ?? nothing}\n name=${this.dataKey ?? this.id ?? nothing}\n maxlength=${this.length}\n pattern=${variant === \"digits_only\" ? \"\\\\d+\" : nothing}\n data-key=${this.dataKey || \"\"}\n .onComplete=${this.handleComplete}\n .onFocus=${this.handleFocus}\n .onBlur=${this.handleBlur}\n >\n ${unsafeStatic(this.buildOTPContentHTML())}\n </rtg-input-otp>\n\n ${this.resendButtonText\n ? html`\n <div class=\"sb-flex\">\n <rtg-typography-p>${this.resendText}</rtg-typography-p>\n\n <rtg-button variant=\"link\" @click=${this.handleResend}>\n ${this.resendButtonText}\n </rtg-button>\n </div>\n `\n : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-otp\": SbOtp;\n }\n}\n","import { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BaseElement } from \"@/components\";\n\n@customElement(\"sb-subtitle\")\nexport class SbSubtitle extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-typography-p[part=${this.id ? this.id : \"subtitle\"}]`,\n );\n }\n @property({ type: String }) id!: string;\n @property({ type: String }) content!: string;\n\n protected createRenderRoot() {\n return this; // Render directly without Shadow DOM\n }\n\n render() {\n return html`\n <rtg-typography-p part=${this.id ? this.id : \"subtitle\"} id=${this.id}>\n ${this.content}\n </rtg-typography-p>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-subtitle\": SbSubtitle;\n }\n}\n","import { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BaseElement } from \"@/components/wrappers/base-element/base-element\";\nimport { mapStyles, nextPaint } from \"@/utils\";\nimport { ContainerAlignment, ContainerType } from \"./container.types\";\n\n@customElement(\"sb-container\")\nexport class SbContainer extends BaseElement {\n @property() id = \"\";\n\n @property() type: ContainerType = \"flex_column\";\n @property({ type: Boolean }) root: boolean = false;\n @property({ type: Boolean }) form: boolean = false;\n\n @property() alignment?: ContainerAlignment;\n\n protected createRenderRoot() {\n return this;\n }\n\n protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n if (!this.root) {\n const outer = this.querySelector(\n `div[part=${this.id ? this.id : \"container\"}]`,\n ) as HTMLElement;\n console.log(\"first updated\", outer);\n if (outer) {\n this.moveLightDomChildrenInto(outer);\n }\n return;\n }\n const outer = this.querySelector(\"rtg-card-content\") as any;\n\n if (outer?.updateComplete) {\n await outer.updateComplete; // 🔥 THIS is the missing piece\n }\n\n const inner = outer?.querySelector('div[data-slot=\"card-content\"]');\n\n if (inner) {\n this.moveLightDomChildrenInto(inner);\n }\n\n await nextPaint();\n }\n\n protected async updated(_changed: PropertyValues) {\n await this.updateComplete;\n await nextPaint();\n // this.updateWidthsIfNeeded();\n }\n\n private get containerStyles() {\n return {\n display: \"flex\",\n \"flex-direction\": this.type === \"flex_column\" ? \"column\" : \"row\",\n };\n }\n\n render() {\n if (this.root) {\n return html`\n <rtg-card part=${this.id ? this.id : \"container\"}>\n <rtg-card-content></rtg-card-content>\n </rtg-card>\n `;\n }\n return html`<div\n part=${this.id ? this.id : \"container\"}\n style=${mapStyles(this.containerStyles)}\n ></div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-container\": SbContainer;\n }\n}\n","import { LitElement, PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BREAKPOINTS } from \"@/constants\";\nimport { BaseElement } from \"@/components\";\n\n@customElement(\"sb-title\")\nexport class SbTitle extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-typography-h[part=${this.id ? this.id : \"title\"}]`,\n );\n }\n @property({ type: String }) id!: string;\n @property({ type: String }) content!: string;\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n return html`\n <rtg-typography-h\n part=${this.id ? this.id : \"title\"}\n level=\"h4\"\n id=${this.id}\n >\n ${this.content}\n </rtg-typography-h>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-title\": SbTitle;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n SbWatermarkProps,\n WatermarkBadge,\n WatermarkLogoAlign,\n WatermarkVariant,\n} from \"./watermark.types\";\n\n/**\n * Saasbase watermark badge used in widgets.\n * @element sb-watermark\n *\n * @slot watermark (rtg-badge)\n * @slot watermark-logo (svg): Saasbase logo\n */\n@customElement(\"sb-watermark\")\nexport class SbWatermark extends LitElement implements SbWatermarkProps {\n private static readonly _ROOT = \"watermark\";\n private static readonly _LOGO = \"logo\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const logo = `${root}-${this._LOGO}`;\n\n return { root, logo };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The text used as the badge label.\n */\n @property({ type: String })\n label = \"Powered by\";\n\n /**\n * The visual variant of the watermark, determining font and logo styles.\n */\n @property({ type: String })\n variant: WatermarkVariant = \"brand\";\n\n /**\n * The variant of the root child/part badge element.\n */\n @property({ type: String })\n badge: WatermarkBadge = \"ghost\";\n\n /**\n * Whether the Saasbase logo is rendered at the `\"start\"` or `\"end\"` of the\n * watermark (before or after the label text).\n */\n @property({ attribute: \"logo-align\", type: String })\n logoAlign: WatermarkLogoAlign = \"end\";\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root badge element. Equal to `childId` when provided,\n * otherwise derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbWatermark.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the logo SVG element. Always derived from `rootId` with the\n * logo part segment appended.\n */\n get logoId() {\n return `${this.rootId}-${SbWatermark._LOGO}`;\n }\n\n /**\n * Returns the Saasbase logo template.\n */\n private _renderLogo() {\n return html`\n <svg\n id=\"${this.logoId}\"\n part=\"${SbWatermark.parts.logo}\"\n class=\"saasbase-logo rtg-icon-inline-${this.logoAlign}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1400 1400\"\n fill=\"none\"\n >\n <path\n class=\"saasbase-logo-cube\"\n d=\"M590.428 29.5039C658.541 -9.83465 742.459 -9.83465 810.572 29.5039L1225.93 269.394C1294.04 308.732 1336 381.433 1336 460.11V939.89C1336 1018.57 1294.04 1091.27 1225.93 1130.61L810.572 1370.5C742.459 1409.83 658.541 1409.83 590.428 1370.5L175.072 1130.61C106.959 1091.27 65 1018.57 65 939.89V460.11C65 381.433 106.959 308.732 175.072 269.394L590.428 29.5039Z\"\n fill=\"#6366F1\"\n />\n <path\n class=\"saasbase-logo-vector\"\n d=\"M699.69 220L320 439.215C297.723 452.077 284 475.846 284 501.569L284 640M284 640L284 898.431C284 924.154 297.723 947.923 320 960.785L543.81 1090M284 640L531.81 783.072C539.236 787.359 543.81 795.282 543.81 803.856V1090M543.81 1090L663.69 1159.21C685.967 1172.08 713.413 1172.08 735.691 1159.21L1079.38 960.785C1095.38 951.547 1095.38 928.453 1079.38 919.215L771.69 741.569C739.69 723.094 739.69 676.906 771.69 658.431L1115.38 460M1115.38 460V700M1115.38 460L907.54 340\"\n stroke-width=\"140\"\n stroke-linecap=\"round\"\n stroke=\"#FFFFFF\"\n />\n </svg>\n `;\n }\n\n render() {\n return html`\n <rtg-badge\n id=\"${this.rootId}\"\n part=\"${SbWatermark.parts.root}\"\n data-variant=\"${this.variant}\"\n data-badge=\"${this.badge}\"\n variant=\"${this.badge}\"\n >\n ${this.logoAlign === \"start\" ? this._renderLogo() : nothing}\n ${this.label} ${this.logoAlign === \"end\" ? this._renderLogo() : nothing}\n </rtg-badge>\n `;\n }\n}\n","import { LitElement, PropertyValues, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport {\n applyCustomizations,\n injectResponsiveStyles,\n mapStyles,\n splitStyle,\n} from \"@/utils\";\n\nimport { Style } from \"@/types\";\nimport { BREAKPOINTS } from \"@/constants\";\nimport { BaseElement, SaasBaseLayout } from \"@/components\";\n\n@customElement(\"sb-countdown\")\nexport class SbCountdown extends BaseElement {\n // ---------------------------\n // PROPS (from backend HTML)\n // ---------------------------\n\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(`div[part=${this.id ? this.id : \"countdown\"}]`);\n }\n\n @property() content = \"\";\n @property({ type: Number }) duration = 5;\n\n @property({ attribute: \"redirect-url\" }) redirectUrl = \"/\";\n\n @property() id = \"\";\n\n // ---------------------------\n // STATE\n // ---------------------------\n @state() private seconds = 0;\n private timerId: number | null = null;\n\n protected createRenderRoot() {\n return this;\n }\n\n // ---------------------------\n // LIFECYCLE\n // ---------------------------\n\n protected firstUpdated(_changedProperties: PropertyValues): void {}\n connectedCallback() {\n super.connectedCallback();\n this.initializeCountdown();\n }\n\n disconnectedCallback() {\n this.clearTimer();\n super.disconnectedCallback();\n }\n\n private initializeCountdown() {\n this.seconds = Math.max(0, this.duration || 0);\n this.startTimer();\n }\n\n private startTimer() {\n this.clearTimer();\n\n this.timerId = window.setInterval(() => {\n if (this.seconds <= 1) {\n this.completeCountdown();\n } else {\n this.seconds--;\n }\n }, 1000);\n }\n\n private completeCountdown() {\n this.clearTimer();\n window.location.href = this.redirectUrl || \"/\";\n }\n\n private clearTimer() {\n if (this.timerId !== null) {\n clearInterval(this.timerId);\n this.timerId = null;\n }\n }\n\n private renderContent() {\n return `${this.content} ${this.seconds}s...`;\n }\n\n // ---------------------------\n // RENDER\n // ---------------------------\n render() {\n return html`\n <div part=${this.id ? this.id : \"countdown\"}>\n <rtg-typography-p>${this.renderContent()}</rtg-typography-p>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-countdown\": SbCountdown;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\n\nexport * from \"@/components/wrappers\";\nexport * from \"@/components/widgets\";\nexport * from \"@/components/ui\";\nexport * from \"@/components/renderers\";\n\nexport function useAuthProvider() {\n return Auth;\n}\n"],"names":["__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","Store","key","domain","store","LoginflowError","code","message","details","HttpClient","endpoint_1","endpoint","options","config","url","timeout","controller","timeoutId","response","errorData","error","data","SessionService","session","decodedToken","storedSession","token","base64","jsonPayload","c","now","expiresAt","expiresIn","refreshThreshold","timeUntilRefresh","newSession","refreshToken","FlowStateManager","storage","storedFlow","flowState","flowType","flow_id","existingState","historyState","FlowTypeDetector","location","path","FlowEventBus","event","handler","_a","handlers","BrowserNavigationTypeDetector","navEntries","legacyNav","Loginflow","flowId","flowEventBus","flowStateManager","navigationTypeDetector","sdk","flowResponse","request","beforeFinishCallback","operation","errorCode","errorMessage","previousState","updatedFlowState","isNewStep","authResult","authData","currentFlowType","existingFlowState","explicitResume","navType","resumeReason","urlParams","metadata","startFlowRequest","rd","Debouncer","delayMs","fn","BrowserHistoryAdapter","state","title","NavigationManager","onFlowRestartNeeded","skipHistoryTracking","historyAdapter","sessionFlowState","urlFlowType","_sessionState","mode","WebAuthnService","caps","conditional","opts","useAutoRegister","createOptions","credential","id","rawId","type","transports","responsePublicKeyAlgorithm","warnOnBrokenImplementation","responsePublicKey","_publicKey","responseAuthenticatorData","errorIdentified","WebAuthnError","useBrowserAutofill","requestOptions","rpId","credentialId","err","descriptor","attachment","attachments","buffer","bytes","str","charCode","base64URLString","padLength","padded","binary","i","cred","optionJSON","publicKey","p","authenticatorSelection","desc","effectiveDomain","isValidDomain","v","methodName","cause","name","hostname","AuthService","flowId_1","_b","res","registerRes","flowStateStr","flowType_1","Auth","t","s","o","n$5","r","n","S","h","a","l","d","u","f","b","y$1","y","_","m","g","$","x","w","E","A","C","V","N","I","L","z","H","M","R","k","Z","B","D","BaseElement","LitElement","attrName","raw","attributes","attr","property","variables","selector","className","variable","target","attributesToMove","attrs","walker","node","seen","nodesToRemove","text","firstNode","specificNodes","nodesToMove","existing","__decorateClass","SaasBaseLayout","contentWrapper","el","html","customElement","s$2","e$3","i$1","envContext","authContext","customizationsContext","renderSpecContext","linearLoaderClass","dashboardWidthClass","modalWidthClass","modalContainerClass","modalLayoutClass","dashboardClass","pageClasses","modalClasses","tabTriggerClass","horizontalTabClass","verticalTabClass","ELEMENT_IDS","clsx","CLASS_PART_SEPARATOR","createClassGroupUtils","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","theme","prefix","getPrefixedClassGroupEntries","classGroup","processClassesRecursively","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","currentClassPartObject","pathPart","func","classGroupEntries","prefixedClassGroup","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","createParseClassName","separator","experimentalParseClassName","isSeparatorSingleCharacter","firstSeparatorCharacter","separatorLength","parseClassName","modifiers","bracketDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","hasImportantModifier","baseClassName","maybePostfixModifierPosition","sortModifiers","sortedModifiers","unsortedModifiers","modifier","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","classGroupsInConflict","classNames","originalClassName","variantModifier","modifierId","classId","conflictGroups","group","twJoin","argument","resolvedValue","string","toValue","mix","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","fractionRegex","stringLengths","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isLength","isNumber","isArbitraryLength","getIsArbitraryValue","isLengthOnly","isArbitraryNumber","isInteger","isPercent","isArbitraryValue","isTshirtSize","sizeLabels","isArbitrarySize","isNever","isArbitraryPosition","imageLabels","isArbitraryImage","isImage","isArbitraryShadow","isShadow","isAny","label","testValue","getDefaultConfig","colors","spacing","blur","brightness","borderColor","borderRadius","borderSpacing","borderWidth","contrast","grayscale","hueRotate","invert","gap","gradientColorStops","gradientColorStopPositions","inset","margin","opacity","padding","saturate","scale","sepia","skew","space","translate","getOverscroll","getOverflow","getSpacingWithAutoAndArbitrary","getSpacingWithArbitrary","getLengthWithEmptyAndArbitrary","getNumberWithAutoAndArbitrary","getPositions","getLineStyles","getBlendModes","getAlign","getZeroAndEmpty","getBreaks","getNumberAndArbitrary","twMerge","cn","inputs","mapStyles","style","changeTheme","initTheme","currentTheme","resolveImageUrl","nextPaint","deepMerge","source","sourceVal","targetVal","mapBtnToCustomizedStyle","variant","customizations","_d","_c","_f","_e","_h","_g","_j","_i","_l","_k","applyCustomizations","defaultClass","defaultStyle","typeCustomization","elementId","isRootContainer","finalClass","finalStyle","mergeCustomization","cust","cClass","cStyle","cFont","rule","RAND_STR_CHARS","RAND_STR_LENGTH","genRandStr","length","rand","genRandSeed","decodeBase64Svg","icon","resolveIconSource","SbProvider","changedProperties","currentPath","authUrl","signinRedirectUrl","provide","SignedOut","nothing","consume","SignedIn","SbAuthenticated","USER_PROFILE_TAB_VALUES","USER_PROFILE_TAB_LIST","USER_PROFILE_MODE","USER_PROFILE_SIDEBAR_DISPLAY_TYPE","USER_PROFILE_ORIENTATION","USER_PROFILE_WIDGETS_LAYOUT","editIcon","svg","accountIcon","personalInfoIcon","locationIcon","urlIcon","closeIcon","burgerMenuIcon","CARD_HEADER_CONTAINER_CLASS","CARD_HEADER_TITLE_CLASS","CARD_INPUT_LABEL_CLASS","CARD_INPUT_FIELD_CLASS","CARD_EDIT_FORM_CONTAINER_CLASS","CARD_CONTAINER_CLASS","CARD_EDITABLE_INPUT_CLASS","CARD_DEFAULT_BUTTON","CARD_OUTLINE_BUTTON","CARD_EDIT_BUTTON","renderOtpContent","baseSlots","items","sep","SbAccountInfo","defaultBtn","outlineBtn","defaultMapped","outlineMapped","isEditable","baseClass","isEditContainer","onEdit","labelClass","labelStyle","inputClass","inputStyle","isColumn","placeholder","onSend","onCancel","containerClass","containerStyle","otpClass","otpStyle","titleClass","titleStyle","SbPersonalInfo","ghostBtn","ghostMapped","input","fields","container","editContainer","headerContainer","headerTitle","activeContainer","_m","_n","item","SbLocationInfo","SbUrlsInfo","Profile","BASE_CLASSES","SIDEBAR_CONTAINER_CLASSES","BURGER_BUTTON_CLASSES","BURGER_LABEL_CLASSES","MOBILE_DRAWER_CLASSES","MOBILE_OVERLAY_CLASSES","DEFAULT_TABS","SbProfileSidebar","parentTabDiv","tabs","isVertical","onClick","tab","isHorizontal","BREAKPOINTS","SbUserProfile","file","reader","avatarContainer","avatarMenu","width","cz","PreviewComponent","SbSignIn","timeoutMs","auth","when","resp","SbSignUp","SbHint","LinearLoader","SbSpinner","radius","circumference","normalizedRadius","badgeAlertIcon","part","badgeXIcon","circleAlertIcon","circleXIcon","shieldAlertIcon","shieldXIcon","ERROR_ICONS","SbError","root","description","SbPasswordField","partSelector","selectors","content","mark","lengths","valid","parentId","validateEvent","messages","minlength","maxlength","errors","SbConfirmField","scope","field","pairValue","pairSelector","SbEmailField","SbIdentifierField","identifiers","start","middle","end","SbNameField","SbPhoneField","SbUsernameField","SbFormSubmit","spinner","FIELDS","FIELD_SELECTORS","FIELD_VALIDATE_EVENTS","SbForm","collector","evt","detail","results","wasDisabled","form","loading","submit","SbFormSeparator","SbFormSwitch","wrapper","prompt","size","SbPasskeyButton","PROVIDER_NAMES","PROVIDER_ICON_PATHS","SbProviderButton","clickEvent","SbProviderField","button","total","override","self","props","overrides","provider","SbGap","sizeStyle","SbHeader","_changedProperties","SbLogo","changed","resolvedImage","decodedSvg","unsafeSVG","SbOtp","formData","slotsHTML","inner","half","third","unsafeStatic","SbSubtitle","SbContainer","_changed","outer","SbTitle","SbWatermark","logo","SbCountdown","useAuthProvider"],"mappings":"g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AAA,EAE7B/b,GAAA,CAAXjB,EAAA,CAAS,EAdCgd,oBAcC,UAAA,KAAA,CAAA,EAKK/b,GAAA,CAAhB9H,EAAA,CAAM,EAnBI6jB,oBAmBM,UAAA,UAAA,CAAA,EAnBNA,QAAAA,YAAN/b,GAAA,CADNK,EAAc,cAAc,CAAA,EAChB0b,mBAAA,ECRN,SAASC,IAAkB,CAChC,OAAO7f,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,23,24,75,76,77,79]}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/@saasbase-io/loginflow-websdk/dist/index.esm.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../src/components/wrappers/base-element/base-element.ts","../src/components/wrappers/layout/layout.ts","../node_modules/@lit/context/lib/context-request-event.js","../node_modules/@lit/context/lib/create-context.js","../node_modules/@lit/context/lib/controllers/context-consumer.js","../node_modules/@lit/context/lib/value-notifier.js","../node_modules/@lit/context/lib/controllers/context-provider.js","../node_modules/@lit/context/lib/decorators/provide.js","../node_modules/@lit/context/lib/decorators/consume.js","../src/context/env-context.ts","../src/context/auth-context.ts","../src/context/customization-context.ts","../src/context/render-spec.ts","../src/constants/classes.ts","../src/constants/enums.ts","../node_modules/clsx/dist/clsx.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/styles.ts","../src/utils/components.ts","../src/utils/svg-base64.ts","../src/components/wrappers/sb-provider/sb-provider.ts","../src/components/wrappers/sb-signed-out/sb-signed-out.ts","../src/components/wrappers/sb-signed-in/sb-signed-in.ts","../src/components/wrappers/sb-authenticated/sb-authenticated.ts","../src/types/components/user-profile.ts","../src/assets/icons/edit.icon.ts","../src/assets/icons/account.icon.ts","../src/assets/icons/personal-info.icon.ts","../src/assets/icons/location.icon.ts","../src/assets/icons/url.icon.ts","../src/assets/icons/close.icon.ts","../src/assets/icons/burger-menu.icon.ts","../src/components/widgets/sb-user-profile/profile/classes.ts","../src/components/widgets/sb-user-profile/profile/account-info.ts","../src/components/widgets/sb-user-profile/profile/personal-info.ts","../src/components/widgets/sb-user-profile/profile/location-info.ts","../src/components/widgets/sb-user-profile/profile/urls-info.ts","../src/components/widgets/sb-user-profile/profile/profile.ts","../src/components/widgets/sb-user-profile/sidebar/classes.ts","../src/components/widgets/sb-user-profile/sidebar/sidebar.ts","../src/components/widgets/sb-user-profile/sb-user-profile.ts","../src/components/widgets/sb-preview/sb-preview.ts","../src/components/widgets/sb-signin/sb-signin.ts","../src/components/widgets/sb-signup/sb-signup.ts","../src/components/ui/hint/index.ts","../src/components/ui/linear-loader/index.ts","../src/components/ui/spinner/index.ts","../src/components/renderers/error/error.defs.ts","../src/components/renderers/error/_error.ts","../src/components/renderers/field/_password-field.ts","../src/components/renderers/field/_confirm-field.ts","../src/components/renderers/field/_email-field.ts","../src/components/renderers/field/_identifier-field.ts","../src/components/renderers/field/_name-field.ts","../src/components/renderers/field/_phone-field.ts","../src/components/renderers/field/_username-field.ts","../src/components/renderers/form/_form-submit.ts","../src/components/renderers/form/form.defs.ts","../src/components/renderers/form/_form.ts","../src/components/renderers/form/_form-separator.ts","../src/components/renderers/form/_form-switch.ts","../src/components/renderers/passkey-button/_passkey-button.ts","../src/components/renderers/provider/provider.defs.ts","../src/components/renderers/provider/_provider-button.ts","../src/components/renderers/provider/_provider-field.ts","../src/components/renderers/gap/gap.ts","../src/components/renderers/header/header.ts","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/unsafe-html.js","../node_modules/lit-html/directives/unsafe-svg.js","../src/components/renderers/logo/logo.ts","../node_modules/lit-html/static.js","../src/components/renderers/otp/otp.ts","../src/components/renderers/subtitle/subtitle.ts","../src/components/renderers/container/container.ts","../src/components/renderers/title/title.ts","../src/components/renderers/watermark/_watermark.ts","../src/components/renderers/countdown/countdown.ts","../src/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nclass Store {\n constructor() {\n this.data = new Map();\n }\n static get Instance() {\n if (!Store.instance) {\n Store.instance = new Store();\n }\n return Store.instance;\n }\n get(key) {\n return this.data.get(key);\n }\n set(key, value) {\n this.data.set(key, value);\n }\n setConfig(value) {\n this.data.set(\"config\", value);\n }\n getConfig() {\n return this.data.get(\"config\");\n }\n getApiBaseUrl() {\n const domain = this.getConfig().domain;\n if (domain.startsWith(\"localhost\")) {\n return `http://${domain}`;\n }\n return `https://${domain}`;\n }\n remove(key) {\n this.data.delete(key);\n }\n clear() {\n this.data.clear();\n }\n}\nconst store = Store.Instance;\n\nclass LoginflowError extends Error {\n constructor(code, message, details) {\n // eslint-disable-line @typescript-eslint/no-explicit-any\n super(message);\n this.name = \"LoginflowError\";\n this.code = code;\n this.details = details;\n }\n}\n\nclass HttpClient {\n constructor() { }\n static get Instance() {\n if (!HttpClient.instance) {\n HttpClient.instance = new HttpClient();\n }\n return HttpClient.instance;\n }\n request(endpoint_1) {\n return __awaiter(this, arguments, void 0, function* (endpoint, options = {}) {\n const config = store.getConfig();\n const url = `${store.getApiBaseUrl()}${endpoint}`;\n const timeout = 50000;\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), timeout);\n try {\n const response = yield fetch(url, Object.assign(Object.assign({}, options), { signal: controller.signal, headers: Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, (config.apiKey && { 'Authorization': `Bearer ${config.apiKey}` })), config.headers), options.headers) }));\n clearTimeout(timeoutId);\n if (!response.ok) {\n const errorData = yield response.json().catch(() => ({}));\n throw new LoginflowError(errorData.code || 'API_ERROR', errorData.message || `HTTP ${response.status}: ${response.statusText}`, errorData.details);\n }\n return yield response.json();\n }\n catch (error) {\n clearTimeout(timeoutId);\n if (error instanceof LoginflowError) {\n throw error;\n }\n if (error instanceof Error) {\n if (error.name === 'AbortError') {\n throw new LoginflowError('TIMEOUT', 'Request timeout');\n }\n throw new LoginflowError('NETWORK_ERROR', error.message);\n }\n throw new LoginflowError('UNKNOWN_ERROR', 'An unknown error occurred');\n }\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n post(endpoint, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(endpoint, {\n credentials: 'include',\n method: 'POST',\n body: data ? JSON.stringify(data) : undefined,\n });\n });\n }\n get(endpoint) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(endpoint, {\n credentials: 'include',\n method: 'GET',\n });\n });\n }\n}\n\nclass SessionService {\n constructor() {\n this.AUTH_SESSION_STORAGE_KEY = 'saasbase_auth_session';\n this.refreshTimeoutId = null;\n this.refreshPromise = null;\n }\n static get Instance() {\n if (!SessionService.instance) {\n SessionService.instance = new SessionService();\n }\n return SessionService.instance;\n }\n setCurrentSession(session) {\n localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY, JSON.stringify(session));\n }\n getCurrentSession() {\n const session = this.getStoredSession();\n if (!session) {\n return null;\n }\n if (this.isSessionExpired(session)) {\n this.clearSession();\n return null;\n }\n // Check if we should refresh proactively (when 80% of token lifetime has passed)\n if (this.shouldRefreshToken(session)) {\n this.triggerBackgroundRefresh(session);\n }\n return session;\n }\n isAuthenticated() {\n return this.getCurrentSession() !== null;\n }\n getAuthenticatedUser() {\n const session = this.getCurrentSession();\n if (!session || !session.id_token) {\n return null;\n }\n const decodedToken = this.decodeJWT(session.id_token);\n if (!decodedToken) {\n return null;\n }\n return decodedToken;\n }\n cleanup() {\n // Call this method when unmounting/destroying the SDK instance\n if (this.refreshTimeoutId) {\n clearTimeout(this.refreshTimeoutId);\n this.refreshTimeoutId = null;\n }\n // if (this.redirectTimeoutId) {\n // clearTimeout(this.redirectTimeoutId);\n // this.redirectTimeoutId = null;\n // }\n this.refreshPromise = null;\n }\n clearSession() {\n localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY);\n }\n isSessionExpired(session) {\n if (!session || !session.expires_at) {\n return true;\n }\n return Date.now() >= session.expires_at;\n }\n cleanExpiredSession() {\n const session = this.getStoredSession();\n if (session && this.isSessionExpired(session)) {\n this.clearSession();\n }\n }\n getStoredSession() {\n const storedSession = localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);\n if (!storedSession) {\n return null;\n }\n try {\n return JSON.parse(storedSession);\n }\n catch (_a) {\n // Invalid JSON, clean it up\n this.clearSession();\n return null;\n }\n }\n decodeJWT(token) {\n try {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(atob(base64)\n .split('')\n .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join(''));\n return JSON.parse(jsonPayload);\n }\n catch (_a) {\n return null;\n }\n }\n shouldRefreshToken(session) {\n if (!session || !session.expires_at || !session.refresh_token) {\n return false;\n }\n const now = Date.now();\n const expiresAt = session.expires_at;\n const expiresIn = session.expires_in || 3600;\n // Refresh when 80% of the token lifetime has passed\n const refreshThreshold = now + (expiresIn * 1000 * 0.2);\n return expiresAt <= refreshThreshold;\n }\n scheduleTokenRefresh() {\n // Clear any existing timeout\n if (this.refreshTimeoutId) {\n clearTimeout(this.refreshTimeoutId);\n this.refreshTimeoutId = null;\n }\n const session = this.getCurrentSession();\n if (!session || !session.expires_at || !session.refresh_token) {\n return;\n }\n const now = Date.now();\n const expiresAt = session.expires_at;\n const expiresIn = session.expires_in || 3600;\n // Schedule refresh at 80% of token lifetime\n const timeUntilRefresh = (expiresAt - now) - (expiresIn * 1000 * 0.2);\n if (timeUntilRefresh > 0) {\n this.refreshTimeoutId = setTimeout(() => {\n this.triggerBackgroundRefresh(session);\n }, timeUntilRefresh);\n }\n }\n triggerBackgroundRefresh(session) {\n // Avoid multiple concurrent refresh attempts\n if (this.refreshPromise) {\n return;\n }\n // Don't refresh if no refresh token\n if (!session.refresh_token) {\n return;\n }\n this.refreshPromise = this.refreshTokens(session.refresh_token)\n .then((newSession) => {\n if (newSession) {\n // Store the new tokens\n this.setCurrentSession(newSession);\n // Schedule the next refresh\n this.scheduleTokenRefresh();\n }\n return newSession;\n })\n .catch((error) => {\n console.error('Background token refresh failed:', error);\n return null;\n })\n .finally(() => {\n this.refreshPromise = null;\n });\n }\n refreshTokens(refreshToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield HttpClient.Instance.post('/login-flow/v1/refresh', {\n refresh_token: refreshToken\n });\n return {\n id_token: response.id_token,\n access_token: response.access_token,\n refresh_token: response.refresh_token,\n expires_in: response.expires_in,\n expires_at: Date.now() + (response.expires_in * 1000)\n };\n }\n catch (error) {\n if (error instanceof LoginflowError) {\n console.error('Token refresh failed:', error.message, error.details);\n }\n else {\n console.error('Token refresh failed:', error);\n }\n // Clear the session if refresh fails\n this.clearSession();\n return null;\n }\n });\n }\n}\n\n/**\n * Centralized manager for flow state in sessionStorage.\n * Handles reading, writing, validation, and expiration of flow state.\n */\nclass FlowStateManager {\n constructor(storage = sessionStorage) {\n this.storage = storage;\n this.FLOW_STATE_KEY = 'saasbase_loginflow_state';\n this.FLOW_EXPIRY_MS = 9 * 60 * 1000; // 9 minutes\n }\n /**\n * Get the current flow state from storage.\n * Returns null if state doesn't exist or has expired.\n */\n getFlowState() {\n const storedFlow = this.storage.getItem(this.FLOW_STATE_KEY);\n if (!storedFlow) {\n return null;\n }\n try {\n const flowState = JSON.parse(storedFlow);\n if (this.isExpired(flowState)) {\n this.clearFlowState();\n return null;\n }\n return flowState;\n }\n catch (_a) {\n this.clearFlowState();\n return null;\n }\n }\n /**\n * Save flow state to storage.\n */\n saveFlowState(flowType, flow_id, response) {\n const now = Date.now();\n const existingState = this.getFlowState();\n const flowState = {\n flowType,\n flow_id,\n state: response.state,\n startedAt: (existingState === null || existingState === void 0 ? void 0 : existingState.startedAt) || now,\n lastUpdatedAt: now,\n render_spec: response.render_spec\n };\n this.storage.setItem(this.FLOW_STATE_KEY, JSON.stringify(flowState));\n }\n /**\n * Restore flow state from browser history state.\n * This is used when navigating back/forward to restore the flow state from history.\n * The restored state allows the SDK to resume the existing backend session.\n */\n restoreFromHistory(historyState) {\n const flowState = {\n flowType: historyState.flowType,\n flow_id: historyState.flow_id,\n state: historyState.state,\n startedAt: historyState.timestamp,\n lastUpdatedAt: historyState.timestamp,\n render_spec: undefined // Will be fetched during resume\n };\n this.storage.setItem(this.FLOW_STATE_KEY, JSON.stringify(flowState));\n }\n /**\n * Clear flow state from storage.\n */\n clearFlowState() {\n this.storage.removeItem(this.FLOW_STATE_KEY);\n }\n /**\n * Check if a flow state has expired.\n */\n isExpired(flowState) {\n const now = Date.now();\n return now - flowState.lastUpdatedAt > this.FLOW_EXPIRY_MS;\n }\n /**\n * Get the expiry time in milliseconds.\n */\n get expiryMs() {\n return this.FLOW_EXPIRY_MS;\n }\n}\n\n/**\n * Utility for detecting flow type based on URL path.\n */\nclass FlowTypeDetector {\n /**\n * Detect flow type from current URL path.\n */\n static detect(config, location = window.location) {\n const path = location.pathname.toLowerCase();\n if (path.includes(config.signinUrl)) {\n return 'signin';\n }\n if (path.includes(config.signupUrl)) {\n return 'signup';\n }\n return 'custom';\n }\n}\n\n/**\n * Simple event bus for flow-related events.\n * Enables loose coupling between Loginflow and NavigationManager.\n */\nclass FlowEventBus {\n constructor() {\n this.listeners = new Map();\n }\n /**\n * Subscribe to a flow event.\n */\n on(event, handler) {\n if (!this.listeners.has(event)) {\n this.listeners.set(event, new Set());\n }\n this.listeners.get(event).add(handler);\n }\n /**\n * Unsubscribe from a flow event.\n */\n off(event, handler) {\n var _a;\n (_a = this.listeners.get(event)) === null || _a === void 0 ? void 0 : _a.delete(handler);\n }\n /**\n * Emit a flow event to all subscribers.\n */\n emit(event, data) {\n const handlers = this.listeners.get(event);\n if (handlers) {\n handlers.forEach(handler => {\n try {\n handler(data);\n }\n catch (error) {\n console.error(`[FlowEventBus] Error in event handler for ${event}:`, error);\n }\n });\n }\n }\n /**\n * Remove all listeners.\n */\n clear() {\n this.listeners.clear();\n }\n /**\n * Remove all listeners for a specific event.\n */\n clearEvent(event) {\n this.listeners.delete(event);\n }\n}\n\n/**\n * Browser implementation using Performance Navigation Timing API.\n */\nclass BrowserNavigationTypeDetector {\n getNavigationType() {\n // Use the modern Navigation Timing API Level 2\n const navEntries = performance.getEntriesByType('navigation');\n if (navEntries.length > 0) {\n return navEntries[0].type;\n }\n // Fallback to deprecated API for older browsers\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const legacyNav = performance.navigation;\n if (legacyNav) {\n // TYPE_NAVIGATE = 0, TYPE_RELOAD = 1, TYPE_BACK_FORWARD = 2\n switch (legacyNav.type) {\n case 1:\n return 'reload';\n case 2:\n return 'back_forward';\n default:\n return 'navigate';\n }\n }\n // Default fallback if neither API is available\n return 'navigate';\n }\n}\n\nclass Loginflow {\n constructor(flowId, flowEventBus, location = window.location, flowStateManager, navigationTypeDetector) {\n this.httpClient = HttpClient.Instance;\n this.redirectTimeoutId = null;\n // Event handlers map for client-side events\n this.eventHandlers = new Map([\n [\"switch_to_signin\", this.handleSwitchToSignin.bind(this)],\n [\"switch_to_signup\", this.handleSwitchToSignup.bind(this)],\n ]);\n const config = store.getConfig();\n if (!config.domain) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"Domain is required\");\n }\n if (!config.appId) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"App ID is required\");\n }\n if (!config.clientSecret) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"Client Secret is required\");\n }\n this.flowId = flowId;\n this.location = location;\n this.flowStateManager = flowStateManager || new FlowStateManager();\n this.flowEventBus = flowEventBus || new FlowEventBus();\n this.navigationTypeDetector =\n navigationTypeDetector || new BrowserNavigationTypeDetector();\n // Check and clean expired auth on initialization\n SessionService.Instance.cleanExpiredSession();\n // Schedule refresh for existing valid tokens\n SessionService.Instance.scheduleTokenRefresh();\n }\n static init(flowId, flowEventBus, location, flowStateManager, navigationTypeDetector) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create SDK instance\n const sdk = new Loginflow(flowId, flowEventBus, location, flowStateManager, navigationTypeDetector);\n // Initialize flow automatically\n const flowResponse = yield sdk.initializeFlowInternal();\n return {\n sdk,\n flowType: flowResponse.flowType,\n isResumed: flowResponse.isResumed,\n state: flowResponse.state,\n render_spec: flowResponse.render_spec,\n auth_result: flowResponse.auth_result,\n };\n });\n }\n /**\n * Start a new flow with the server.\n */\n startFlow(flowType, request) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!request.app_id) {\n throw new LoginflowError(\"VALIDATION_ERROR\", \"Client ID is required\");\n }\n const endpoint = `/v1/auth-flow/${flowType}/start`;\n return this.executeFlowRequest(() => this.httpClient.post(endpoint, request), \"START_FLOW_ERROR\", \"Failed to start flow\");\n });\n }\n /**\n * Resume an existing flow with the server.\n */\n resumeFlow(flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n const endpoint = `/v1/auth-flow/${flowType}/resume`;\n return this.executeFlowRequest(() => this.httpClient.post(endpoint), \"RESUME_FLOW_ERROR\", \"Failed to resume flow\");\n });\n }\n /**\n * Process an event in the flow.\n */\n processEvent(request, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!request.event) {\n throw new LoginflowError(\"VALIDATION_ERROR\", \"Event type is required\");\n }\n // Check for client-side event handlers\n const handler = this.eventHandlers.get(request.event);\n if (handler) {\n return yield handler();\n }\n // Server-side event processing\n return yield this.processServerEvent(request, beforeFinishCallback);\n });\n }\n /**\n * Execute a flow request with consistent error handling and side effects.\n */\n executeFlowRequest(operation, errorCode, errorMessage, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield operation();\n if (beforeFinishCallback) {\n yield beforeFinishCallback(response);\n }\n this.processAuthResult(response.auth_result);\n if (response.redirection) {\n this.redirect(response.redirection);\n }\n return response;\n }\n catch (error) {\n if (error instanceof LoginflowError) {\n throw error;\n }\n throw new LoginflowError(errorCode, errorMessage, error instanceof Error\n ? { originalError: error.message, stack: error.stack }\n : error);\n }\n });\n }\n /**\n * Process server-side events.\n */\n processServerEvent(request, beforeFinishCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n // Check if flow state has expired (9 minutes timeout)\n let flowState = this.flowStateManager.getFlowState();\n if (!flowState) {\n // Flow state expired - restart the flow to get a fresh server session\n console.warn(\"Flow state expired, restarting flow before processing event\");\n yield this.initializeFlowInternal();\n // Get the newly created flow state\n flowState = this.flowStateManager.getFlowState();\n if (!flowState) {\n throw new LoginflowError(\"FLOW_RESTART_ERROR\", \"Failed to restart flow - no flow state after initialization\");\n }\n }\n const previousState = flowState.state;\n const endpoint = `/v1/auth-flow/${flowState.flowType}/events`;\n const response = yield this.executeFlowRequest(() => this.httpClient.post(endpoint, request), \"PROCESS_EVENT_ERROR\", \"Failed to process event\", beforeFinishCallback);\n // Only save flow state if authentication is not complete\n // If auth_result exists, processAuthResult already cleared the state\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowState.flowType, flowState.flow_id, response);\n // Emit event to notify listeners (e.g., NavigationManager)\n const updatedFlowState = this.flowStateManager.getFlowState();\n if (updatedFlowState) {\n const isNewStep = previousState !== response.state;\n this.flowEventBus.emit(\"flow:updated\", {\n flowState: updatedFlowState,\n isNewStep,\n });\n }\n }\n return response;\n });\n }\n /**\n * Handle successful authentication.\n */\n processAuthResult(authResult) {\n if (authResult) {\n const authData = {\n id_token: authResult.id_token,\n access_token: authResult.access_token,\n refresh_token: authResult.refresh_token,\n expires_in: authResult.expires_in,\n expires_at: Date.now() + authResult.expires_in * 1000,\n };\n SessionService.Instance.setCurrentSession(authData);\n // Schedule the next refresh\n SessionService.Instance.scheduleTokenRefresh();\n // Clear flow states when authentication is successful\n this.flowStateManager.clearFlowState();\n // Reload the page to redirect to the configured home page\n this.reloadPage();\n }\n }\n /**\n * Initialize or resume the flow.\n */\n initializeFlowInternal() {\n return __awaiter(this, void 0, void 0, function* () {\n // Determine current flow type (from config or auto-detect)\n const config = store.getConfig();\n const currentFlowType = FlowTypeDetector.detect(config, this.location);\n this.validateFlowType(currentFlowType);\n // Check for existing flow state\n const existingFlowState = this.flowStateManager.getFlowState();\n if (this.shouldResumeFlow(existingFlowState, currentFlowType)) {\n return yield this.resumeExistingFlow(existingFlowState, currentFlowType);\n }\n return yield this.startNewFlow(currentFlowType);\n });\n }\n /**\n * Validate flow type requirements.\n */\n validateFlowType(flowType) {\n if (flowType === \"custom\" && !this.flowId) {\n throw new LoginflowError(\"FLOW_ID_ERROR\", \"Flow ID is required for custom flows\");\n }\n }\n /**\n * Check if we should resume an existing flow.\n */\n shouldResumeFlow(existingState, currentFlowType) {\n if (!existingState) {\n return false;\n }\n // Check for explicit resume query parameter from backend redirects\n const urlParams = new URLSearchParams(this.location.search);\n const explicitResume = urlParams.get(\"resume\") === \"true\";\n // Check navigation type - only resume for reload or back_forward\n // For 'navigate' (fresh link/URL entry), start a new flow unless explicitly told to resume\n const navType = this.navigationTypeDetector.getNavigationType();\n if (navType === \"navigate\" && !explicitResume) {\n this.flowStateManager.clearFlowState();\n console.log(`Fresh navigation detected (type: ${navType}), starting new flow`);\n return false;\n }\n // Check if flow type has changed\n if (existingState.flowType !== currentFlowType) {\n this.flowStateManager.clearFlowState();\n console.log(`Flow type changed from ${existingState.flowType} to ${currentFlowType}, starting new flow, flow_id: ${this.flowId}`);\n return false;\n }\n // Check if flow_id has changed for custom flows\n if (currentFlowType === \"custom\" && existingState.flow_id !== this.flowId) {\n this.flowStateManager.clearFlowState();\n console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`);\n return false;\n }\n const resumeReason = explicitResume\n ? \"explicit resume=true\"\n : `navigation type: ${navType}`;\n console.log(`Resuming existing flow (${resumeReason})`);\n return true;\n }\n /**\n * Resume an existing flow.\n */\n resumeExistingFlow(existingState, flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield this.resumeFlow(flowType);\n // Only save flow state if authentication is not complete\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowType, existingState.flow_id, response);\n // Emit event to notify listeners\n const flowState = this.flowStateManager.getFlowState();\n if (flowState) {\n this.flowEventBus.emit(\"flow:resumed\", { flowState });\n }\n }\n return {\n flowType,\n isResumed: true,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n };\n }\n catch (error) {\n // If resume fails, clear the state and start fresh\n this.flowStateManager.clearFlowState();\n console.warn(\"Failed to resume flow, starting fresh:\", error);\n return yield this.startNewFlow(flowType);\n }\n });\n }\n /**\n * Start a new flow.\n */\n startNewFlow(flowType) {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n const urlParams = new URLSearchParams(this.location.search);\n // convert url params to an object for metadata\n const metadata = {};\n urlParams.forEach((value, key) => {\n metadata[key] = value;\n });\n console.log(\"metadata\", metadata);\n // Build start flow request\n const startFlowRequest = {\n app_id: config.appId,\n client_secret: config.clientSecret,\n origin_url: this.location.href,\n signin_url: config.signinUrl,\n signup_url: config.signupUrl,\n locale: config.locale || \"en\",\n flow_id: this.determineFlowId(flowType),\n metadata: metadata,\n };\n const response = yield this.startFlow(flowType, startFlowRequest);\n // Only save flow state if authentication is not complete\n if (!response.auth_result) {\n this.flowStateManager.saveFlowState(flowType, startFlowRequest.flow_id, response);\n // Emit event to notify listeners\n const flowState = this.flowStateManager.getFlowState();\n if (flowState) {\n this.flowEventBus.emit(\"flow:started\", { flowState });\n }\n }\n return {\n flowType,\n isResumed: false,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n };\n });\n }\n /**\n * Determine the flow_id based on flow type.\n */\n determineFlowId(flowType) {\n switch (flowType) {\n case \"signin\":\n return this.flowId || \"signin-flow\";\n case \"signup\":\n return this.flowId || \"signup-flow\";\n case \"custom\":\n if (!this.flowId) {\n throw new LoginflowError(\"FLOW_ID_ERROR\", \"Flow ID is required for custom flows\");\n }\n return this.flowId;\n }\n }\n /**\n * Handle switch to signin event.\n */\n handleSwitchToSignin() {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n this.redirect({ url: config.signinUrl, redirect_delay: 0 });\n return { state: \"End\" };\n });\n }\n /**\n * Handle switch to signup event.\n */\n handleSwitchToSignup() {\n return __awaiter(this, void 0, void 0, function* () {\n const config = store.getConfig();\n this.redirect({ url: config.signupUrl, redirect_delay: 0 });\n return { state: \"End\" };\n });\n }\n /**\n * Redirect to a URL.\n */\n redirect(rd) {\n if (!rd.url) {\n return;\n }\n // Clear any existing redirect timeout before scheduling a new one\n // This handles cases where navigation (like browser back) cancels a pending redirect\n if (this.redirectTimeoutId !== null) {\n console.log(\"Clearing existing redirect timeout before scheduling new redirect to:\", rd.url);\n clearTimeout(this.redirectTimeoutId);\n this.redirectTimeoutId = null;\n }\n // Redirect URL inside a timeout to ensure the page is rendered.\n // It guarantees that all code in the current execution context finishes first,\n // even though the delay is \"zero\". It's not about time—it's about execution order in the event loop.\n this.redirectTimeoutId = setTimeout(() => {\n this.location.href = rd.url;\n }, rd.redirect_delay * 1000);\n }\n /**\n * Reload the current page.\n */\n reloadPage() {\n // Defer reload to ensure sessionStorage operations complete\n // This guarantees that all code in the current execution context finishes first\n setTimeout(() => {\n this.location.reload();\n }, 0);\n }\n /**\n * Get the event bus for external listeners.\n */\n getEventBus() {\n return this.flowEventBus;\n }\n /**\n * Cleanup resources.\n */\n cleanup() {\n // Cancel any pending redirect\n if (this.redirectTimeoutId) {\n clearTimeout(this.redirectTimeoutId);\n this.redirectTimeoutId = null;\n }\n // Clear event bus\n this.flowEventBus.clear();\n }\n}\n\n/**\n * Utility class for debouncing function calls.\n * Ensures a function is only called after a specified delay has passed since the last invocation.\n */\nclass Debouncer {\n constructor(delayMs) {\n this.delayMs = delayMs;\n this.timerId = null;\n }\n /**\n * Debounce a function call.\n * If called again before delay expires, the previous call is cancelled.\n */\n debounce(fn) {\n if (this.timerId) {\n clearTimeout(this.timerId);\n }\n this.timerId = setTimeout(() => {\n fn();\n this.timerId = null;\n }, this.delayMs);\n }\n /**\n * Cancel any pending debounced call.\n */\n cancel() {\n if (this.timerId) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n }\n /**\n * Check if a debounced call is pending.\n */\n isPending() {\n return this.timerId !== null;\n }\n}\n\n/**\n * Adapter interfaces for browser APIs to enable dependency injection and testing.\n */\n/**\n * Default browser implementation of HistoryAdapter.\n */\nclass BrowserHistoryAdapter {\n pushState(state, title, url) {\n history.pushState(state, title, url);\n }\n replaceState(state, title, url) {\n history.replaceState(state, title, url);\n }\n get state() {\n return history.state;\n }\n}\n\n/**\n * Manages browser history integration for the authentication flow.\n * Listens to flow events via event bus and updates browser history accordingly.\n * Handles popstate events (browser back/forward) and triggers flow restart when needed.\n */\nclass NavigationManager {\n constructor(flowEventBus, onFlowRestartNeeded, skipHistoryTracking = false, location = window.location, flowStateManager, historyAdapter) {\n this.popstateListener = null;\n this.pageshowListener = null;\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n this.onFlowRestartNeeded = null;\n this.onFlowRestartNeeded = onFlowRestartNeeded;\n this.skipHistoryTracking = skipHistoryTracking;\n this.debouncer = new Debouncer(200);\n this.location = location;\n this.flowStateManager = flowStateManager || new FlowStateManager();\n this.historyAdapter = historyAdapter || new BrowserHistoryAdapter();\n // Subscribe to flow events\n this.subscribeToFlowEvents(flowEventBus);\n // Initialize popstate listener\n this.initializeListener();\n }\n /**\n * Subscribe to flow events from the event bus.\n */\n subscribeToFlowEvents(flowEventBus) {\n flowEventBus.on('flow:started', this.handleFlowStart.bind(this));\n flowEventBus.on('flow:updated', this.handleFlowUpdate.bind(this));\n flowEventBus.on('flow:resumed', this.handleFlowResume.bind(this));\n }\n /**\n * Initialize the popstate and pageshow listeners for browser navigation.\n */\n initializeListener() {\n this.popstateListener = (event) => {\n console.log('[NavigationManager] popstate event received');\n // Debounce rapid back/forward clicks\n this.debouncer.debounce(() => {\n console.log('[NavigationManager] Debounce timeout fired, handling popstate');\n void this.handlePopState(event);\n });\n };\n // Handle bfcache (back/forward cache) restoration\n // When a page is restored from bfcache, popstate might not fire reliably\n this.pageshowListener = (event) => {\n if (event.persisted) {\n console.log('[NavigationManager] Page restored from bfcache');\n // Debounce to handle potential race conditions\n this.debouncer.debounce(() => {\n console.log('[NavigationManager] Handling bfcache restoration');\n void this.handleBfcacheRestoration();\n });\n }\n };\n window.addEventListener('popstate', this.popstateListener);\n window.addEventListener('pageshow', this.pageshowListener);\n }\n /**\n * Handle browser back/forward navigation.\n */\n handlePopState(event) {\n return __awaiter(this, void 0, void 0, function* () {\n // Prevent concurrent processing\n if (this.isProcessing) {\n console.log('[NavigationManager] Already processing popstate, skipping');\n return;\n }\n console.log('[NavigationManager] Starting popstate processing');\n this.isProcessing = true;\n this.isHandlingNavigationEvent = true;\n try {\n const historyState = event.state;\n const sessionFlowState = this.flowStateManager.getFlowState();\n const config = store.getConfig();\n const urlFlowType = FlowTypeDetector.detect(config, this.location);\n // Restore history state to session storage BEFORE checking if restart is needed\n // This allows the SDK to resume the existing backend session using the flow-type-specific cookie\n if (historyState) {\n this.restoreHistoryStateToSession(historyState);\n }\n if (this.shouldRestartFlow(historyState, sessionFlowState, urlFlowType)) {\n yield this.triggerFlowRestart();\n return;\n }\n // Valid state - restored successfully\n console.log('[NavigationManager] Valid state restored from history');\n }\n finally {\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n }\n });\n }\n /**\n * Handle page restoration from bfcache (back/forward cache).\n * When a page is restored from bfcache, the popstate event might not fire reliably,\n * so we use the pageshow event with event.persisted=true to detect this case.\n */\n handleBfcacheRestoration() {\n return __awaiter(this, void 0, void 0, function* () {\n // Prevent concurrent processing\n if (this.isProcessing) {\n console.log('[NavigationManager] Already processing bfcache restoration, skipping');\n return;\n }\n console.log('[NavigationManager] Starting bfcache restoration processing');\n this.isProcessing = true;\n this.isHandlingNavigationEvent = true;\n try {\n // Get current history state (not from event, since pageshow doesn't provide it)\n const historyState = this.historyAdapter.state;\n const sessionFlowState = this.flowStateManager.getFlowState();\n const config = store.getConfig();\n const urlFlowType = FlowTypeDetector.detect(config, this.location);\n // Restore history state to session storage BEFORE checking if restart is needed\n if (historyState) {\n this.restoreHistoryStateToSession(historyState);\n }\n if (this.shouldRestartFlow(historyState, sessionFlowState, urlFlowType)) {\n yield this.triggerFlowRestart();\n return;\n }\n // Valid state - restored successfully\n console.log('[NavigationManager] Valid state restored from bfcache');\n }\n finally {\n this.isProcessing = false;\n this.isHandlingNavigationEvent = false;\n }\n });\n }\n /**\n * Restore history state to session storage.\n * This is crucial for cookie preservation: when navigating back, we restore the old flow state\n * so that Loginflow.initializeFlowInternal() can resume using the flow-type-specific cookie.\n */\n restoreHistoryStateToSession(historyState) {\n console.log('[NavigationManager] Restoring history state to session storage:', historyState);\n this.flowStateManager.restoreFromHistory(historyState);\n }\n /**\n * Determine if the flow should be restarted based on navigation state.\n * Note: We've already restored historyState to session storage at this point.\n */\n shouldRestartFlow(historyState, _sessionState, urlFlowType) {\n // Check for flow type mismatch between URL and history\n if (historyState && historyState.flowType !== urlFlowType) {\n console.log('[NavigationManager] Flow type changed via navigation:', historyState.flowType, '→', urlFlowType);\n // Clear the restored state since URL doesn't match\n this.flowStateManager.clearFlowState();\n return true;\n }\n // No history state - initial navigation\n if (!historyState) {\n console.log('[NavigationManager] No history state, skipping');\n return false;\n }\n // Check if session has expired based on timestamp\n const now = Date.now();\n if (now - historyState.timestamp > this.flowStateManager.expiryMs) {\n console.log('[NavigationManager] History state expired, clearing and restarting flow');\n this.flowStateManager.clearFlowState();\n return true;\n }\n // Always trigger restart after restoring state\n // The restored session storage will allow Loginflow to resume using the flow-type-specific cookie\n console.log('[NavigationManager] Valid history state restored, triggering restart to resume flow');\n return true;\n }\n /**\n * Trigger flow restart callback.\n */\n triggerFlowRestart() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.onFlowRestartNeeded) {\n yield this.onFlowRestartNeeded();\n }\n });\n }\n /**\n * Create a history state object from flow state.\n */\n createHistoryState(flowState) {\n return {\n flowType: flowState.flowType,\n flow_id: flowState.flow_id,\n state: flowState.state,\n timestamp: Date.now()\n };\n }\n /**\n * Update browser history.\n */\n updateBrowserHistory(flowState, mode) {\n // Skip history tracking if this instance was created with skipHistoryTracking\n if (this.skipHistoryTracking) {\n console.log('[NavigationManager] Skipping history tracking (created from navigation)');\n return;\n }\n const historyState = this.createHistoryState(flowState);\n try {\n if (mode === 'push') {\n this.historyAdapter.pushState(historyState, '', this.location.href);\n console.log('[NavigationManager] Pushed state to history');\n }\n else {\n this.historyAdapter.replaceState(historyState, '', this.location.href);\n console.log('[NavigationManager] Replaced state in history');\n }\n }\n catch (error) {\n console.error('[NavigationManager] Failed to update history:', error);\n }\n }\n /**\n * Handle flow start event.\n */\n handleFlowStart(data) {\n // When starting a flow, ALWAYS replace the current history entry\n // This works with app routers that already changed the URL\n this.updateBrowserHistory(data.flowState, 'replace');\n }\n /**\n * Handle flow update event.\n */\n handleFlowUpdate(data) {\n // If handling navigation, always replace; otherwise respect isNewStep\n const mode = this.isHandlingNavigationEvent || !data.isNewStep ? 'replace' : 'push';\n this.updateBrowserHistory(data.flowState, mode);\n }\n /**\n * Handle flow resume event.\n */\n handleFlowResume(data) {\n // Always replace state when resuming\n this.updateBrowserHistory(data.flowState, 'replace');\n }\n /**\n * Cleanup resources.\n */\n destroy() {\n // Cancel any pending debounced calls\n this.debouncer.cancel();\n // Remove popstate listener\n if (this.popstateListener) {\n window.removeEventListener('popstate', this.popstateListener);\n this.popstateListener = null;\n }\n // Remove pageshow listener\n if (this.pageshowListener) {\n window.removeEventListener('pageshow', this.pageshowListener);\n this.pageshowListener = null;\n }\n // Clear callback\n this.onFlowRestartNeeded = null;\n }\n}\n\n/*\n* global abort controller to abort all instances of the webauthn\n*/\nlet controller = new AbortController();\nclass WebAuthnService {\n constructor() {\n this.httpClient = HttpClient.Instance;\n this.capabilities = {\n webauthn: false,\n };\n this.capabilitiesDetected = false;\n }\n detectCapabilities() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.capabilitiesDetected)\n return;\n try {\n if (typeof window.PublicKeyCredential === 'function') {\n this.capabilities.webauthn = true;\n }\n else {\n this.capabilities.webauthn = false;\n }\n if (typeof PublicKeyCredential.getClientCapabilities === \"function\") {\n const caps = yield PublicKeyCredential.getClientCapabilities();\n this.capabilities = Object.assign(Object.assign({}, this.capabilities), caps);\n return;\n }\n if (typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable === \"function\") {\n this.capabilities.userVerifyingPlatformAuthenticator =\n yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n }\n if ((PublicKeyCredential === null || PublicKeyCredential === void 0 ? void 0 : PublicKeyCredential.isConditionalMediationAvailable) !== undefined && typeof PublicKeyCredential.isConditionalMediationAvailable === \"function\") {\n this.capabilities.conditionalGet = yield PublicKeyCredential.isConditionalMediationAvailable();\n }\n else {\n this.capabilities.conditionalGet = false;\n }\n }\n finally {\n this.capabilitiesDetected = true;\n }\n });\n }\n fetchPublicKeyCredentialRequestOptions(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const endpoint = `/webauthn/login/options`;\n return this.httpClient.post(endpoint, {\n conditional,\n flow_type: flowType,\n });\n }\n catch (error) {\n console.error(\"error\", error);\n return null;\n }\n });\n }\n fetchPublicKeyCredentialCreationOptions(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const endpoint = `/webauthn/register/options`;\n return this.httpClient.post(endpoint, {\n conditional,\n flow_type: flowType,\n });\n }\n catch (error) {\n console.error(\"error\", error);\n return null;\n }\n });\n }\n startRegistration(opts, useAutoRegister) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (!opts) {\n console.error(\"No PublicKeyCredentialCreationOptionsJSON provided\");\n return null;\n }\n controller.abort();\n controller = new AbortController();\n const options = this.toPublicKeyCredentialCreationOptions(opts);\n const createOptions = {\n signal: controller.signal,\n publicKey: options\n };\n if (useAutoRegister) {\n if (!this.isConditionalCreateAvailable()) {\n console.error(\"Conditional create mediation not supported in this browser\");\n return null;\n }\n // @ts-expect-error: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n createOptions.mediation = 'conditional';\n }\n try {\n const credential = (yield navigator.credentials.create(createOptions));\n if (!credential) {\n console.error(\"no credential returned by authenticator\");\n return;\n }\n const { id, rawId, response, type } = credential;\n // Continue to play it safe with `getTransports()` for now, even when L3 types say it's required\n let transports = undefined;\n if (typeof response.getTransports === 'function') {\n transports = response.getTransports();\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responsePublicKeyAlgorithm = undefined;\n if (typeof response.getPublicKeyAlgorithm === 'function') {\n try {\n responsePublicKeyAlgorithm = response.getPublicKeyAlgorithm();\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKeyAlgorithm()', error);\n }\n }\n let responsePublicKey = undefined;\n if (typeof response.getPublicKey === 'function') {\n try {\n const _publicKey = response.getPublicKey();\n if (_publicKey !== null) {\n responsePublicKey = this.bufferToBase64URLString(_publicKey);\n }\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKey()', error);\n }\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responseAuthenticatorData;\n if (typeof response.getAuthenticatorData === 'function') {\n try {\n responseAuthenticatorData = this.bufferToBase64URLString(response.getAuthenticatorData());\n }\n catch (error) {\n warnOnBrokenImplementation('getAuthenticatorData()', error);\n }\n }\n return {\n id,\n rawId: this.bufferToBase64URLString(rawId),\n response: {\n attestationObject: this.bufferToBase64URLString(response.attestationObject),\n clientDataJSON: this.bufferToBase64URLString(response.clientDataJSON),\n transports,\n publicKeyAlgorithm: responsePublicKeyAlgorithm,\n publicKey: responsePublicKey,\n authenticatorData: responseAuthenticatorData,\n },\n type,\n clientExtensionResults: credential.getClientExtensionResults(),\n authenticatorAttachment: this.toAuthenticatorAttachment(credential.authenticatorAttachment),\n };\n }\n catch (error) {\n const errorIdentified = this.identifyAuthenticationError({\n error: error,\n options: createOptions,\n });\n if (errorIdentified instanceof WebAuthnError) {\n console.error(`WebAuthn authentication failed with code: ${errorIdentified.code}, message: ${errorIdentified.message}`);\n }\n else {\n console.error(\"WebAuthn authentication failed with error:\", error);\n }\n return null;\n }\n });\n }\n startAuthentication(opts, useBrowserAutofill) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (!opts) {\n console.error(\"No PublicKeyCredentialRequestOptionsJSON provided\");\n return null;\n }\n if (!this.isWebAuthnAvailable()) {\n console.error(\"WebAuthn not supported in this browser\");\n return null;\n }\n // Abort any previous authentication attempt\n controller.abort();\n controller = new AbortController();\n const options = this.toPublicKeyCredentialRequestOptions(opts);\n const requestOptions = {\n signal: controller.signal,\n publicKey: options\n };\n if (useBrowserAutofill) {\n if (!this.isConditionalGetAvailable()) {\n console.error(\"Conditional mediation not supported in this browser\");\n return null;\n }\n requestOptions.mediation = \"conditional\";\n if (requestOptions.publicKey) {\n // in conditional get, allowCredentials must be an empty array to signal the browser to show all available credentials\n requestOptions.publicKey.allowCredentials = [];\n }\n }\n try {\n const result = yield navigator.credentials.get(requestOptions);\n return this.toPublicKeyCredentialJSON(result);\n }\n catch (error) {\n const errorIdentified = this.identifyAuthenticationError({\n error: error,\n options: requestOptions,\n });\n if (errorIdentified instanceof WebAuthnError) {\n console.error(`WebAuthn authentication failed with code: ${errorIdentified.code}, message: ${errorIdentified.message}`);\n }\n else {\n console.error(\"WebAuthn authentication failed with error:\", error);\n }\n return null;\n }\n });\n }\n signalUnknownCredential(rpId, credentialId) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (this.isSignalUnknownCredentialAvailable()) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yield PublicKeyCredential.signalUnknownCredential({\n rpId,\n credentialId,\n });\n }\n catch (err) {\n console.error(\"Failed to signal unknown credential:\", err);\n }\n }\n else {\n console.warn(\"signalUnknownCredential not supported in this browser\");\n }\n });\n }\n signalCurrentUserDetails(details) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.detectCapabilities();\n if (this.isSignalCurrentUserDetailsAvailable()) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yield PublicKeyCredential.signalCurrentUserDetails(details);\n }\n catch (err) {\n console.error(\"Failed to signal current user details:\", err);\n }\n }\n else {\n console.warn(\"signalCurrentUserDetails not supported. Ask user to update manually.\");\n }\n });\n }\n toPublicKeyCredentialDescriptor(descriptor) {\n const { id } = descriptor;\n return Object.assign(Object.assign({}, descriptor), { id: this.base64URLStringToBuffer(id), type: descriptor.type, transports: descriptor.transports });\n }\n toAuthenticatorAttachment(attachment) {\n const attachments = ['cross-platform', 'platform'];\n if (!attachment) {\n return;\n }\n if (attachments.indexOf(attachment) < 0) {\n return;\n }\n return attachment;\n }\n bufferToBase64URLString(buffer) {\n const bytes = new Uint8Array(buffer);\n let str = '';\n for (const charCode of bytes) {\n str += String.fromCharCode(charCode);\n }\n const base64String = btoa(str);\n return base64String.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n }\n base64URLStringToBuffer(base64URLString) {\n // Convert from Base64URL to Base64\n const base64 = base64URLString.replace(/-/g, '+').replace(/_/g, '/');\n const padLength = (4 - (base64.length % 4)) % 4;\n const padded = base64.padEnd(base64.length + padLength, '=');\n const binary = atob(padded);\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return buffer;\n }\n toPublicKeyCredentialJSON(cred) {\n if (typeof cred.toJSON === \"function\") {\n return cred.toJSON();\n }\n const response = cred.response;\n return {\n id: cred.id,\n type: cred.type,\n rawId: this.bufferToBase64URLString(cred.rawId),\n authenticatorAttachment: this.toAuthenticatorAttachment(cred.authenticatorAttachment),\n clientExtensionResults: cred === null || cred === void 0 ? void 0 : cred.getClientExtensionResults(),\n response: {\n clientDataJSON: this.bufferToBase64URLString(response.clientDataJSON),\n authenticatorData: this.bufferToBase64URLString(response.authenticatorData),\n signature: this.bufferToBase64URLString(response.signature),\n userHandle: response.userHandle ? this.bufferToBase64URLString(response.userHandle) : undefined,\n },\n };\n }\n toPublicKeyCredentialCreationOptions(optionJSON) {\n var _a;\n if (typeof PublicKeyCredential.parseCreationOptionsFromJSON === \"function\") {\n return PublicKeyCredential.parseCreationOptionsFromJSON(optionJSON);\n }\n const publicKey = {\n challenge: this.base64URLStringToBuffer(optionJSON.challenge),\n rp: {\n id: optionJSON.rp.id,\n name: optionJSON.rp.name\n },\n user: {\n displayName: optionJSON.user.displayName,\n id: this.base64URLStringToBuffer(optionJSON.user.id),\n name: optionJSON.user.name\n },\n pubKeyCredParams: optionJSON.pubKeyCredParams.map((p) => ({\n alg: p.alg,\n type: p.type\n })),\n timeout: optionJSON.timeout,\n };\n if (optionJSON.attestation) {\n publicKey.attestation = optionJSON.attestation;\n }\n if (optionJSON.extensions !== undefined) {\n publicKey.extensions = optionJSON.extensions;\n }\n if (optionJSON.authenticatorSelection) {\n const authenticatorSelection = {};\n if (optionJSON.authenticatorSelection.authenticatorAttachment) {\n authenticatorSelection.authenticatorAttachment = optionJSON.authenticatorSelection.authenticatorAttachment;\n }\n if (optionJSON.authenticatorSelection.requireResidentKey) {\n authenticatorSelection.requireResidentKey = optionJSON.authenticatorSelection.requireResidentKey;\n }\n if (optionJSON.authenticatorSelection.residentKey) {\n authenticatorSelection.residentKey = optionJSON.authenticatorSelection.residentKey;\n }\n if (optionJSON.authenticatorSelection.userVerification) {\n authenticatorSelection.userVerification = optionJSON.authenticatorSelection.userVerification;\n }\n publicKey.authenticatorSelection = authenticatorSelection;\n }\n if ((_a = optionJSON.excludeCredentials) === null || _a === void 0 ? void 0 : _a.length) {\n publicKey.excludeCredentials = optionJSON.excludeCredentials.map((desc) => this.toPublicKeyCredentialDescriptor(desc));\n }\n return publicKey;\n }\n toPublicKeyCredentialRequestOptions(optionJSON) {\n var _a;\n if (typeof PublicKeyCredential.parseRequestOptionsFromJSON === \"function\") {\n return PublicKeyCredential.parseRequestOptionsFromJSON(optionJSON);\n }\n const publicKey = {\n challenge: this.base64URLStringToBuffer(optionJSON.challenge),\n };\n if (optionJSON.rpId !== undefined) {\n publicKey.rpId = optionJSON.rpId;\n }\n if (optionJSON.timeout !== undefined) {\n publicKey.timeout = optionJSON.timeout;\n }\n if (optionJSON.userVerification !== undefined) {\n publicKey.userVerification = optionJSON.userVerification;\n }\n if (optionJSON.extensions !== undefined) {\n publicKey.extensions = optionJSON.extensions;\n }\n if ((_a = optionJSON.allowCredentials) === null || _a === void 0 ? void 0 : _a.length) {\n publicKey.allowCredentials = optionJSON.allowCredentials.map((desc) => this.toPublicKeyCredentialDescriptor(desc));\n }\n return publicKey;\n }\n identifyAuthenticationError({ error, options, }) {\n const { publicKey } = options;\n if (!publicKey) {\n throw Error('options was missing required publicKey property');\n }\n if (error.name === 'AbortError') {\n if (options.signal instanceof AbortSignal) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n return new WebAuthnError({\n message: 'Authentication ceremony was sent an abort signal',\n code: 'ERROR_CEREMONY_ABORTED',\n cause: error,\n });\n }\n }\n else if (error.name === 'NotAllowedError') {\n /**\n * Pass the error directly through. Platforms are overloading this error beyond what the spec\n * defines and we don't want to overwrite potentially useful error messages.\n */\n return new WebAuthnError({\n message: error.message,\n code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n cause: error,\n });\n }\n else if (error.name === 'SecurityError') {\n const effectiveDomain = window.location.hostname;\n if (!isValidDomain(effectiveDomain)) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)\n return new WebAuthnError({\n message: `${window.location.hostname} is an invalid domain`,\n code: 'ERROR_INVALID_DOMAIN',\n cause: error,\n });\n }\n else if (publicKey.rpId !== effectiveDomain) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)\n return new WebAuthnError({\n message: `The RP ID \"${publicKey.rpId}\" is invalid for this domain`,\n code: 'ERROR_INVALID_RP_ID',\n cause: error,\n });\n }\n }\n else if (error.name === 'UnknownError') {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)\n return new WebAuthnError({\n message: 'The authenticator was unable to process the specified options, or could not create a new assertion signature',\n code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n cause: error,\n });\n }\n return error;\n }\n isPublicKeyCredentialRequestOptionsJSON(v) {\n return typeof v === \"object\" && v !== null && \"challenge\" in v;\n }\n isWebAuthnAvailable() {\n return this.capabilities.webauthn;\n }\n // The browser can signal available credentials on the server to the passkey provider, \n // so that the passkey provider can keep the passkey list consistent with the server.\n isSignalAllAcceptedCredentialsAvailable() {\n return !!this.capabilities.signalAllAcceptedCredentials;\n }\n // The browser can signal user information such as username and display name on the server to the passkey provider, \n // so that the passkey provider can keep their passkey information consistent with the server.\n isSignalCurrentUserDetailsAvailable() {\n return !!this.capabilities.signalCurrentUserDetails;\n }\n // The browser can signal a deleted credential on the server to the passkey provider, \n // so that the passkey provider can keep the passkey list consistent with the server.\n isSignalUnknownCredentialAvailable() {\n return !!this.capabilities.signalUnknownCredential;\n }\n // The browser can authenticate by displaying passkeys as part of autofill dialog, \n // instead of a prominent modal UI.\n isConditionalGetAvailable() {\n return !!this.capabilities.conditionalGet;\n }\n isConditionalCreateAvailable() {\n return !!this.capabilities.conditionalCreate;\n }\n // the browser can create a credential and authenticate with it cross-device using the hybrid protocol.\n isHybridTransportAvailable() {\n return !!this.capabilities.hybridTransport;\n }\n destroy() {\n controller.abort();\n }\n}\n/**\n * Visibly warn when we detect an issue related to a passkey provider intercepting WebAuthn API\n * calls\n */\nfunction warnOnBrokenImplementation(methodName, cause) {\n console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${methodName}. You should report this error to them.\\n`, cause);\n}\n/**\n * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented\n * errors in the spec was raised after calling `navigator.credentials.create()` or\n * `navigator.credentials.get()`:\n *\n * - `AbortError`\n * - `ConstraintError`\n * - `InvalidStateError`\n * - `NotAllowedError`\n * - `NotSupportedError`\n * - `SecurityError`\n * - `TypeError`\n * - `UnknownError`\n *\n * Error messages were determined through investigation of the spec to determine under which\n * scenarios a given error would be raised.\n */\nclass WebAuthnError extends Error {\n constructor({ message, code, cause, name, }) {\n super(message);\n this.name = name !== null && name !== void 0 ? name : cause.name;\n this.code = code;\n }\n}\nfunction isValidDomain(hostname) {\n return (\n // Consider localhost valid as well since it's okay wrt Secure Contexts\n hostname === 'localhost' ||\n /^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$/i.test(hostname));\n}\n\nclass AuthService {\n constructor() {\n this.configured = false;\n this.loginflow = null;\n this.navigationManager = null;\n this.flowEventBus = null;\n this.webauthnService = null;\n }\n static get Instance() {\n if (!AuthService.instance) {\n AuthService.instance = new AuthService();\n }\n return AuthService.instance;\n }\n ensureConfigured() {\n if (!this.configured) {\n throw new LoginflowError(\"NOT_CONFIGURED\", \"Auth.configure() must be called before using Auth methods\");\n }\n }\n ensureLoginflowInitialized() {\n if (!this.loginflow) {\n throw new LoginflowError(\"LOGINFLOW_NOT_INITIALIZED\", \"Call Auth.startLoginflow() first\");\n }\n }\n startLoginflowInternal(flowId_1) {\n return __awaiter(this, arguments, void 0, function* (flowId, skipHistoryTracking = false) {\n this.ensureConfigured();\n // Cleanup old instances before creating new ones\n if (this.webauthnService) {\n console.log(\"[AuthService] Cleaning up and aborting ongoing webauthn flows\");\n this.webauthnService.destroy();\n this.webauthnService = null;\n }\n if (this.loginflow) {\n console.log(\"[AuthService] Cleaning up old loginflow instance\");\n this.loginflow.cleanup();\n this.loginflow = null;\n }\n if (this.navigationManager) {\n console.log(\"[AuthService] Cleaning up old navigation manager instance\");\n this.navigationManager.destroy();\n this.navigationManager = null;\n }\n this.webauthnService = new WebAuthnService();\n this.webauthnService.detectCapabilities();\n // Create shared event bus for communication between Loginflow and NavigationManager\n this.flowEventBus = new FlowEventBus();\n // Create navigation manager with event bus\n // Pass a callback that restarts the flow when navigation is detected\n this.navigationManager = new NavigationManager(this.flowEventBus, () => __awaiter(this, void 0, void 0, function* () {\n console.log(\"[AuthService] Navigation restart triggered, restarting loginflow\");\n // Don't pass flowId - let it auto-detect from current URL\n // Don't skip history tracking - we need to keep history in sync with session storage\n yield this.startLoginflowInternal(undefined, false);\n }), skipHistoryTracking);\n // Initialize Loginflow with the shared event bus\n const result = yield Loginflow.init(flowId, this.flowEventBus);\n const config = store.getConfig();\n // Attempt to get public key credential options for conditional flow (autofill)\n // TODO: we can parse the render spec to search for inputs that has webauthn attribute to avoid sending this\n // request if the webauthn attribute is not available for autofill\n this.startPasskeyAuthentication(result.flowType, true);\n this.loginflow = result.sdk;\n const response = {\n flowType: result.flowType,\n isResumed: result.isResumed,\n state: result.state,\n render_spec: result.render_spec,\n auth_result: result.auth_result,\n };\n // Emit flow state change event\n if (config.onFlowStateChange) {\n config.onFlowStateChange({\n eventType: result.isResumed ? \"flow_resumed\" : \"flow_started\",\n flowType: result.flowType,\n state: result.state,\n render_spec: result.render_spec,\n auth_result: result.auth_result,\n isResumed: result.isResumed,\n });\n }\n return response;\n });\n }\n configure(config) {\n // Validate required fields\n if (!config.domain || !config.appId || !config.clientSecret) {\n throw new LoginflowError(\"CONFIG_ERROR\", \"domain, appId, and clientSecret are required\");\n }\n store.setConfig(config);\n this.configured = true;\n }\n isAuthenticated() {\n this.ensureConfigured();\n return SessionService.Instance.isAuthenticated();\n }\n getCurrentSession() {\n this.ensureConfigured();\n return SessionService.Instance.getCurrentSession();\n }\n getAuthenticatedUser() {\n this.ensureConfigured();\n return SessionService.Instance.getAuthenticatedUser();\n }\n startLoginflow(flowId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.startLoginflowInternal(flowId, false);\n });\n }\n processLoginflowEvent(request) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n this.ensureConfigured();\n this.ensureLoginflowInitialized();\n const config = store.getConfig();\n const flowType = FlowTypeDetector.detect(config, location);\n // we need to check for credential_request if it's present it means this method is called\n // from autofill authentication ceremony. if it's not present it means it's called by\n // signin with passkey button\n if (request.event === \"signin_with_passkey\" &&\n !((_a = request.data) === null || _a === void 0 ? void 0 : _a[\"credential_request\"])) {\n const result = yield this.getPasskeyCredential(flowType, false);\n if (!result || !result.cred) {\n console.error(\"no credential returned by browser\");\n return { state: \"\" };\n }\n request.data = { credential_request: result.cred };\n }\n // here we need to check if the request contains conditional=true it means\n // it's triggered by conditional passkey creation flow but if it's not it's triggered from\n // register passkey button\n if (request.event === \"register_passkey\" &&\n !((_b = request.data) === null || _b === void 0 ? void 0 : _b[\"conditional\"])) {\n console.log(\"attempt to register a passkey\");\n const cred = yield this.createPasskeyCredential(flowType, false);\n if (!cred) {\n console.error(\"no credential created by browser\");\n return { state: \"\" };\n }\n request.data = { credential_creation_response: cred, conditional: false };\n }\n const response = yield this.loginflow.processEvent(request, (res) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if ((_a = res.data) === null || _a === void 0 ? void 0 : _a[\"conditional_create_enabled\"]) {\n console.log(\"attempt to register a passkey conditionally\");\n const registerRes = yield this.registerPasskey(flowType, true);\n if (registerRes) {\n // we don't show the ui after signup\n registerRes.render_spec = undefined;\n res.render_spec = undefined;\n }\n }\n }));\n console.log(\"render spec\", response.render_spec);\n // Emit flow state change event\n if (config.onFlowStateChange) {\n // Get current flow state from sessionStorage to get flowType\n const flowStateStr = sessionStorage.getItem(\"saasbase_loginflow_state\");\n let flowType = \"custom\";\n if (flowStateStr) {\n try {\n const flowState = JSON.parse(flowStateStr);\n flowType = flowState.flowType;\n }\n catch (e) {\n console.error(\"Failed to parse flow state:\", e);\n }\n }\n config.onFlowStateChange({\n eventType: \"flow_updated\",\n flowType: flowType,\n state: response.state,\n render_spec: response.render_spec,\n auth_result: response.auth_result,\n });\n }\n return response;\n });\n }\n getPasskeyCredential(flowType, useBrowserAutofill) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const options = yield ((_a = this.webauthnService) === null || _a === void 0 ? void 0 : _a.fetchPublicKeyCredentialRequestOptions(flowType, useBrowserAutofill));\n if (!options) {\n console.error(\"failed to fetch public key request options\");\n return null;\n }\n try {\n const cred = yield ((_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.startAuthentication(options, useBrowserAutofill));\n return { cred, options };\n }\n catch (err) {\n console.error(\"error starting authentication\", err);\n return null;\n }\n });\n }\n startPasskeyAuthentication(flowType_1) {\n return __awaiter(this, arguments, void 0, function* (flowType, useBrowserAutofill = false) {\n var _a, _b;\n const result = yield this.getPasskeyCredential(flowType, useBrowserAutofill);\n if (!result || !result.cred) {\n console.error(\"no credential found\");\n return;\n }\n const { cred, options } = result;\n try {\n const resp = yield this.processLoginflowEvent({\n event: \"signin_with_passkey\",\n data: { credential_request: cred },\n });\n if (((_a = resp.data) === null || _a === void 0 ? void 0 : _a[\"error\"]) === \"CredentialNotFound\") {\n if (options.rpId && cred.id) {\n (_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.signalUnknownCredential(options.rpId, cred.id);\n }\n else {\n console.log(\"missing rpId or credential id for signalUnknownCredential\");\n }\n }\n }\n catch (err) {\n console.error(\"failed to signin with passkey\", err);\n }\n });\n }\n createPasskeyCredential(flowType, conditional) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n try {\n const res = yield ((_a = this.webauthnService) === null || _a === void 0 ? void 0 : _a.fetchPublicKeyCredentialCreationOptions(flowType, conditional));\n if (!res) {\n console.warn(\"no credential creation option returned by webauthn service\");\n console.log(\"skipping conditional passkey registration...\");\n return;\n }\n return (_b = this.webauthnService) === null || _b === void 0 ? void 0 : _b.startRegistration(res, conditional);\n }\n catch (error) {\n console.log(\"error\", error);\n }\n });\n }\n registerPasskey(flowType_1) {\n return __awaiter(this, arguments, void 0, function* (flowType, conditional = false) {\n try {\n const cred = yield this.createPasskeyCredential(flowType, conditional);\n const response = yield this.processLoginflowEvent({\n event: \"register_passkey\",\n data: {\n credential_creation_response: cred,\n conditional: conditional,\n },\n });\n console.log(\"passkey creation res\", response);\n return response;\n }\n catch (error) {\n console.log(\"error\", error);\n }\n });\n }\n signOut() {\n this.ensureConfigured();\n // Clear session\n SessionService.Instance.clearSession();\n SessionService.Instance.cleanup();\n // Clear loginflow instance and cancel any pending operations\n if (this.loginflow) {\n this.loginflow.cleanup();\n this.loginflow = null;\n }\n // Clear navigation manager\n if (this.navigationManager) {\n this.navigationManager.destroy();\n this.navigationManager = null;\n }\n // Clear event bus\n if (this.flowEventBus) {\n this.flowEventBus.clear();\n this.flowEventBus = null;\n }\n // Refresh the page to clear any in-memory state\n window.location.reload();\n console.log(\"Refreshed the page to clear any in-memory state\");\n }\n}\n\nconst Auth = AuthService.Instance;\n\nexport { Auth, LoginflowError };\n//# sourceMappingURL=index.esm.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.3\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { Style } from \"@/types/styles\";\nimport { LitElement } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nexport abstract class BaseElement extends LitElement {\n @property({ type: Boolean }) shadow = false;\n\n constructor() {\n super();\n }\n protected parseJsonAttribute<T = unknown>(attrName: string): T {\n try {\n const raw = this.getAttribute(attrName);\n return raw ? JSON.parse(raw) : ({} as T);\n } catch {\n return {} as T;\n }\n }\n\n protected get sbStyle(): Style {\n return this.parseJsonAttribute<Style>(\"sb-style\");\n }\n protected getAttributesToExclude(): string[] {\n return [];\n }\n\n // Filter attributes based on exclusion rules\n protected getFilteredAttributes(): Record<string, string> {\n const attributes: Record<string, string> = {};\n Array.from(this.attributes).forEach((attr) => {\n if (!this.getAttributesToExclude().includes(attr.name)) {\n attributes[attr.name] = attr.value ?? \"\";\n }\n });\n return attributes;\n }\n\n protected isCustomPropertySet(property: string): boolean {\n const value = getComputedStyle(this).getPropertyValue(property).trim();\n return value !== \"inherit\" && value.length > 0;\n }\n\n protected applyCustomClass(\n variables: string[],\n selector: string,\n className = \"\",\n ): void {\n if (variables.some((variable) => this.isCustomPropertySet(variable))) {\n this.shadowRoot?.querySelector(selector)?.classList.add(className);\n }\n }\n\n protected moveAttributesToElement(\n target: HTMLElement,\n attributesToMove: string[] = [\"id\", \"class\"],\n ): void {\n if (!target) return;\n\n attributesToMove.forEach((attr) => {\n const value = this.getAttribute(attr);\n\n if (value !== null) {\n target.setAttribute(attr, value);\n this.removeAttribute(attr);\n }\n });\n }\n\n protected removeAttributesFromHost(\n attributes: string[] = [\"id\", \"class\"],\n ): void {\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n this.removeAttribute(attr);\n }\n });\n }\n\n private __initialAttributesCache: Record<string, string> | null = null;\n\n protected captureHostAttributes(): Record<string, string> {\n if (this.__initialAttributesCache) return this.__initialAttributesCache;\n\n const attrs: Record<string, string> = {};\n\n Array.from(this.attributes).forEach((attr) => {\n attrs[attr.name] = attr.value;\n });\n\n this.__initialAttributesCache = attrs;\n return attrs;\n }\n\n protected getHostClass(): string {\n return this.captureHostAttributes()[\"class\"] ?? \"\";\n }\n\n protected removeDuplicateContent() {\n const walker = document.createTreeWalker(\n this,\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: (node) => {\n if (node.nodeType === Node.COMMENT_NODE)\n return NodeFilter.FILTER_REJECT;\n if (node.nodeType === Node.TEXT_NODE && !node.textContent?.trim())\n return NodeFilter.FILTER_REJECT;\n return NodeFilter.FILTER_ACCEPT;\n },\n },\n );\n\n const seen = new Map<string, Node>();\n const nodesToRemove: Node[] = [];\n\n let node: Node | null;\n while ((node = walker.nextNode())) {\n let key: string;\n if (node.nodeType === Node.TEXT_NODE) {\n const text = node.textContent?.trim();\n if (!text) continue;\n key = `text:${text}`;\n } else if (node instanceof HTMLElement) {\n const attributes = Array.from(node.attributes)\n .map((attr) => `${attr.name}=${attr.value}`)\n .sort()\n .join(\":\");\n key = `element:${node.tagName}:${attributes}`;\n } else {\n continue;\n }\n\n if (seen.has(key)) {\n const firstNode = seen.get(key);\n if (firstNode?.parentNode) nodesToRemove.push(firstNode);\n seen.set(key, node);\n } else {\n seen.set(key, node);\n }\n }\n\n nodesToRemove.forEach((node) => node.parentNode?.removeChild(node));\n }\n\n protected moveLightDomChildrenInto(\n target: HTMLElement,\n specificNodes?: Node[],\n ): void {\n let nodesToMove: Node[];\n\n if (specificNodes?.length) {\n nodesToMove = specificNodes.filter(\n (node) =>\n this.contains(node) && node !== target && !node.contains(target),\n );\n\n // Remove existing duplicates in target\n nodesToMove.forEach((node) => {\n const existing = Array.from(target.childNodes).find((n) =>\n n.isEqualNode?.(node),\n );\n if (existing) target.removeChild(existing);\n });\n } else {\n nodesToMove = Array.from(this.childNodes).filter(\n (node) =>\n node !== target && !target.contains(node) && !node.contains(target),\n );\n }\n\n nodesToMove.forEach((node) => target.appendChild(node));\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\n@customElement(\"sb-layout\")\nexport class SaasBaseLayout extends LitElement {\n @state() private spec: string = \"\";\n\n @property({ attribute: false })\n set renderSpec(v: string) {\n this.spec = v;\n this.requestUpdate();\n }\n\n createRenderRoot() {\n return this; // light DOM\n }\n\n updated() {\n this.renderDynamicContent();\n }\n\n private renderDynamicContent() {\n if (!this.spec) return;\n\n const container = this.shadowRoot || this;\n const contentWrapper = container.querySelector(\n \"#dynamic-content\",\n ) as HTMLElement;\n\n if (contentWrapper) {\n contentWrapper.innerHTML = this.spec;\n\n // Important: Upgrade all custom elements so they get connected properly\n contentWrapper.querySelectorAll(\"*\").forEach((el) => {\n if (el.localName.includes(\"-\") && !customElements.get(el.localName)) {\n // If somehow not registered yet\n console.warn(`Element ${el.localName} not registered`);\n } else {\n customElements.upgrade(el);\n }\n });\n }\n }\n\n render() {\n return html`\n <sb-form\n child-id=\"sb-layout-form\"\n @sb-form:success=${this.handleSuccess}\n @sb-form:error=${this.handleError}\n >\n <div class=\"sb-relative sb-flex sb-overflow-x-hidden\">\n <div id=\"dynamic-content\"></div>\n </div>\n </sb-form>\n `;\n }\n\n private handleSuccess = (e: CustomEvent) => console.log(\"success\", e.detail);\n private handleError = (e: CustomEvent) => console.error(\"error\", e.detail);\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s extends Event{constructor(s,t,e,o){super(\"context-request\",{bubbles:!0,composed:!0}),this.context=s,this.contextTarget=t,this.callback=e,this.subscribe=o??!1}}export{s as ContextRequestEvent};\n//# sourceMappingURL=context-request-event.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction n(n){return n}export{n as createContext};\n//# sourceMappingURL=create-context.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s{constructor(t,s,i,h){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,s)),this.unsubscribe=s},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=s,this.callback=i,this.subscribe=h??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new t(this.context,this.host,this.t,this.subscribe))}}export{s as ContextConsumer};\n//# sourceMappingURL=context-consumer.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nclass s{get value(){return this.o}set value(s){this.setValue(s)}setValue(s,t=!1){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers()}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t)},void 0!==s&&(this.value=s)}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s)},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h)}clearCallbacks(){this.subscriptions.clear()}}export{s as ValueNotifier};\n//# sourceMappingURL=value-notifier.js.map\n","import{ContextRequestEvent as t}from\"../context-request-event.js\";import{ValueNotifier as s}from\"../value-notifier.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends Event{constructor(t,s){super(\"context-provider\",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=s}}class i extends s{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{if(t.context!==this.context)return;const s=t.contextTarget??t.composedPath()[0];s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe))},this.onProviderRequest=s=>{if(s.context!==this.context)return;if((s.contextTarget??s.composedPath()[0])===this.host)return;const e=new Set;for(const[s,{consumerHost:i}]of this.subscriptions)e.has(s)||(e.add(s),i.dispatchEvent(new t(this.context,i,s,!0)));s.stopPropagation()},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(\"context-request\",this.onContextRequest),this.host.addEventListener(\"context-provider\",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new e(this.context,this.host))}}export{i as ContextProvider,e as ContextProviderEvent};\n//# sourceMappingURL=context-provider.js.map\n","import{ContextProvider as t}from\"../controllers/context-provider.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e({context:e}){return(n,i)=>{const r=new WeakMap;if(\"object\"==typeof i)return{get(){return n.get.call(this)},set(t){return r.get(this).setValue(t),n.set.call(this,t)},init(n){return r.set(this,new t(this,{context:e,initialValue:n})),n}};{n.constructor.addInitializer((n=>{r.set(n,new t(n,{context:e}))}));const o=Object.getOwnPropertyDescriptor(n,i);let s;if(void 0===o){const t=new WeakMap;s={get(){return t.get(this)},set(e){r.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=o.set;s={...o,set(e){r.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(n,i,s)}}}export{e as provide};\n//# sourceMappingURL=provide.js.map\n","import{ContextConsumer as t}from\"../controllers/context-consumer.js\";\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function c({context:c,subscribe:e}){return(o,n)=>{\"object\"==typeof n?n.addInitializer((function(){new t(this,{context:c,callback:t=>{o.set.call(this,t)},subscribe:e})})):o.constructor.addInitializer((o=>{new t(o,{context:c,callback:t=>{o[n]=t},subscribe:e})}))}}export{c as consume};\n//# sourceMappingURL=consume.js.map\n","import { EnvConfig } from \"@/types\";\nimport { createContext } from \"@lit/context\";\n\nexport const envContext = createContext<EnvConfig | null>(\"sb:env\");\n","// controller/auth-context.ts\nimport { createContext } from \"@lit/context\";\n\nexport interface AuthState {\n isAuthenticated: boolean;\n}\n\nexport const authContext = createContext<AuthState>(\"sb:auth\");\n","// src/context/customizations.ts\nimport { createContext } from \"@lit/context\";\nimport type { ICustomizations } from \"@/types\";\n\nexport const customizationsContext = createContext<ICustomizations | null>(\n \"customizations\"\n);\n","// src/context.ts\nimport { createContext } from \"@lit/context\";\n\nexport const renderSpecContext = createContext<string | null>(\n Symbol(\"renderSpecContext\"),\n);\n","//loaders\nexport const linearLoaderClass =\n \"sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar\";\n\nexport const dashboardWidthClass =\n \"sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]\";\nexport const modalWidthClass =\n \"sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]\";\n\nexport const modalContainerClass =\n \"sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto\";\n\nexport const modalLayoutClass =\n \"sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden\";\n//dashboard\nexport const dashboardClass = \"sb-justify-self-center sb-rotate-0\";\n\nexport const pageClasses = \"sb-border-0 sb-bg-background !sb-m-0\";\n\nexport const modalClasses = \"sb-border sb-rounded-2xl sb-relative sb-py-6\";\n\nexport const tabTriggerClass =\n \"!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted\";\n\nexport const horizontalTabClass =\n \"!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6\";\n\nexport const verticalTabClass = \"!sb-w-[160px] sb-gap-4 \";\n\nexport const tailwindSafeClasses =\n \"sb-w-screen sm:sb-w-[375px] sb-p-[40px_24px] sm:sb-shadow-[0_4px_4px_rgba(0,0,0,0.25)] sb-bg-background sm:sb-border sm:sb-border-border sm:sb-rounded-[8px] font-geist\";\n","export enum ELEMENT_IDS {\n USER_PROFILE_CARD_HEADER_CONTAINER = \"sb-user-profile-card-header-container\",\n USER_PROFILE_CONTAINER = \"sb-user-profile\",\n USER_PROFILE_SIDEBAR = \"sb-user-profile-sidebar-tabs\",\n USER_PROFILE_SIDEBAR_TABS = \"sb-user-profile-sidebar-tabs\",\n USER_PROFILE_SIDEBAR_BURGER_MENU = \"sb-user-profile-sidebar-burger-menu\",\n USER_PROFILE_INPUT_LABEL = \"sb-user-profile-input-label\",\n USER_PROFILE_INPUT_FIELD = \"sb-user-profile-input-field\",\n USER_PROFILE_EDIT_FORM = \"sb-user-profile-edit-form\",\n USER_PROFILE_CARD_CONTAINER = \"sb-user-profile-card-container\",\n USER_PROFILE_EDITABLE_INPUT_FIELD = \"sb-user-profile-editable-input-field\",\n USER_PROFILE_DEFAULT_BUTTON = \"sb-user-profile-default-button\",\n USER_PROFILE_OUTLINE_BUTTON = \"sb-user-profile-outline-button\",\n USER_PROFILE_OTP = \"sb-user-profile-otp\",\n USER_PROFILE_EDIT_BUTTON = \"sb-user-profile-edit-button\",\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const CLASS_PART_SEPARATOR = '-';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift();\n }\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n const conflicts = conflictingClassGroups[classGroupId] || [];\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];\n }\n return conflicts;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, classPartObject) => {\n if (classParts.length === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[0];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart;\n }\n if (classPartObject.validators.length === 0) {\n return undefined;\n }\n const classRest = classParts.join(CLASS_PART_SEPARATOR);\n return classPartObject.validators.find(({\n validator\n }) => validator(classRest))?.classGroupId;\n};\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nconst getGroupIdForArbitraryProperty = className => {\n if (arbitraryPropertyRegex.test(className)) {\n const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property;\n }\n }\n};\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n prefix\n } = config;\n const classMap = {\n nextPart: new Map(),\n validators: []\n };\n const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);\n prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {\n processClassesRecursively(classGroup, classMap, classGroupId, theme);\n });\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n classGroup.forEach(classDefinition => {\n if (typeof classDefinition === 'string') {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n return;\n }\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId\n });\n return;\n }\n Object.entries(classDefinition).forEach(([key, classGroup]) => {\n processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n });\n });\n};\nconst getPart = (classPartObject, path) => {\n let currentClassPartObject = classPartObject;\n path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {\n if (!currentClassPartObject.nextPart.has(pathPart)) {\n currentClassPartObject.nextPart.set(pathPart, {\n nextPart: new Map(),\n validators: []\n });\n }\n currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n });\n return currentClassPartObject;\n};\nconst isThemeGetter = func => func.isThemeGetter;\nconst getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {\n if (!prefix) {\n return classGroupEntries;\n }\n return classGroupEntries.map(([classGroupId, classGroup]) => {\n const prefixedClassGroup = classGroup.map(classDefinition => {\n if (typeof classDefinition === 'string') {\n return prefix + classDefinition;\n }\n if (typeof classDefinition === 'object') {\n return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));\n }\n return classDefinition;\n });\n return [classGroupId, prefixedClassGroup];\n });\n};\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = new Map();\n let previousCache = new Map();\n const update = (key, value) => {\n cache.set(key, value);\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = new Map();\n }\n };\n return {\n get(key) {\n let value = cache.get(key);\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache.get(key)) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (cache.has(key)) {\n cache.set(key, value);\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst createParseClassName = config => {\n const {\n separator,\n experimentalParseClassName\n } = config;\n const isSeparatorSingleCharacter = separator.length === 1;\n const firstSeparatorCharacter = separator[0];\n const separatorLength = separator.length;\n // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n const parseClassName = className => {\n const modifiers = [];\n let bracketDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n for (let index = 0; index < className.length; index++) {\n let currentCharacter = className[index];\n if (bracketDepth === 0) {\n if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + separatorLength;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') {\n bracketDepth++;\n } else if (currentCharacter === ']') {\n bracketDepth--;\n }\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);\n const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n };\n };\n if (experimentalParseClassName) {\n return className => experimentalParseClassName({\n className,\n parseClassName\n });\n }\n return parseClassName;\n};\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst sortModifiers = modifiers => {\n if (modifiers.length <= 1) {\n return modifiers;\n }\n const sortedModifiers = [];\n let unsortedModifiers = [];\n modifiers.forEach(modifier => {\n const isArbitraryVariant = modifier[0] === '[';\n if (isArbitraryVariant) {\n sortedModifiers.push(...unsortedModifiers.sort(), modifier);\n unsortedModifiers = [];\n } else {\n unsortedModifiers.push(modifier);\n }\n });\n sortedModifiers.push(...unsortedModifiers.sort());\n return sortedModifiers;\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n let hasPostfixModifier = Boolean(maybePostfixModifierPosition);\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n const variantModifier = sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.includes(classId)) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nfunction twJoin() {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < arguments.length) {\n if (argument = arguments[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\nconst toValue = mix => {\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nfunction createTailwindMerge(createConfigFirst, ...createConfigRest) {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall = initTailwindMerge;\n function initTailwindMerge(classList) {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n }\n function tailwindMerge(classList) {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n }\n return function callTailwindMerge() {\n return functionToCall(twJoin.apply(null, arguments));\n };\n}\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || [];\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:([a-z-]+):)?(.+)\\]$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly);\nconst isNumber = value => Boolean(value) && !Number.isNaN(Number(value));\nconst isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber);\nconst isInteger = value => Boolean(value) && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);\nconst isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever);\nconst imageLabels = /*#__PURE__*/new Set(['image', 'url']);\nconst isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow);\nconst isAny = () => true;\nconst getIsArbitraryValue = (value, label, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return typeof label === 'string' ? result[1] === label : label.has(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isInteger,\n isLength,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n const colors = fromTheme('colors');\n const spacing = fromTheme('spacing');\n const blur = fromTheme('blur');\n const brightness = fromTheme('brightness');\n const borderColor = fromTheme('borderColor');\n const borderRadius = fromTheme('borderRadius');\n const borderSpacing = fromTheme('borderSpacing');\n const borderWidth = fromTheme('borderWidth');\n const contrast = fromTheme('contrast');\n const grayscale = fromTheme('grayscale');\n const hueRotate = fromTheme('hueRotate');\n const invert = fromTheme('invert');\n const gap = fromTheme('gap');\n const gradientColorStops = fromTheme('gradientColorStops');\n const gradientColorStopPositions = fromTheme('gradientColorStopPositions');\n const inset = fromTheme('inset');\n const margin = fromTheme('margin');\n const opacity = fromTheme('opacity');\n const padding = fromTheme('padding');\n const saturate = fromTheme('saturate');\n const scale = fromTheme('scale');\n const sepia = fromTheme('sepia');\n const skew = fromTheme('skew');\n const space = fromTheme('space');\n const translate = fromTheme('translate');\n const getOverscroll = () => ['auto', 'contain', 'none'];\n const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing];\n const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];\n const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength];\n const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue];\n const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];\n const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'];\n const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];\n const getZeroAndEmpty = () => ['', '0', isArbitraryValue];\n const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];\n return {\n cacheSize: 500,\n separator: ':',\n theme: {\n colors: [isAny],\n spacing: [isLength, isArbitraryLength],\n blur: ['none', '', isTshirtSize, isArbitraryValue],\n brightness: getNumberAndArbitrary(),\n borderColor: [colors],\n borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],\n borderSpacing: getSpacingWithArbitrary(),\n borderWidth: getLengthWithEmptyAndArbitrary(),\n contrast: getNumberAndArbitrary(),\n grayscale: getZeroAndEmpty(),\n hueRotate: getNumberAndArbitrary(),\n invert: getZeroAndEmpty(),\n gap: getSpacingWithArbitrary(),\n gradientColorStops: [colors],\n gradientColorStopPositions: [isPercent, isArbitraryLength],\n inset: getSpacingWithAutoAndArbitrary(),\n margin: getSpacingWithAutoAndArbitrary(),\n opacity: getNumberAndArbitrary(),\n padding: getSpacingWithArbitrary(),\n saturate: getNumberAndArbitrary(),\n scale: getNumberAndArbitrary(),\n sepia: getZeroAndEmpty(),\n skew: getNumberAndArbitrary(),\n space: getSpacingWithArbitrary(),\n translate: getSpacingWithArbitrary()\n },\n classGroups: {\n // Layout\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', 'video', isArbitraryValue]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isTshirtSize]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': getBreaks()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': getBreaks()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: [...getPositions(), isArbitraryValue]\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: getOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': getOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': getOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: getOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': getOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': getOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: [inset]\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': [inset]\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': [inset]\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: [inset]\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: [inset]\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: [inset]\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: [inset]\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: [inset]\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: [inset]\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: ['auto', isInteger, isArbitraryValue]\n }],\n // Flexbox and Grid\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: getSpacingWithAutoAndArbitrary()\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['wrap', 'wrap-reverse', 'nowrap']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: ['1', 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: getZeroAndEmpty()\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: getZeroAndEmpty()\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: ['first', 'last', 'none', isInteger, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': [isAny]\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: ['auto', {\n span: ['full', isInteger, isArbitraryValue]\n }, isArbitraryValue]\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': [isAny]\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: ['auto', {\n span: [isInteger, isArbitraryValue]\n }, isArbitraryValue]\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: [gap]\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': [gap]\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': [gap]\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: ['normal', ...getAlign()]\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': ['start', 'end', 'center', 'stretch']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...getAlign(), 'baseline']\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline']\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': [...getAlign(), 'baseline']\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: [padding]\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: [padding]\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: [padding]\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: [padding]\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: [padding]\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: [padding]\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: [padding]\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: [padding]\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: [padding]\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: [margin]\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: [margin]\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: [margin]\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: [margin]\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: [margin]\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: [margin]\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: [margin]\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: [margin]\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: [margin]\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x': [{\n 'space-x': [space]\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y': [{\n 'space-y': [space]\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y-reverse': ['space-y-reverse'],\n // Sizing\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit']\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', {\n screen: [isTshirtSize]\n }, isTshirtSize]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']\n }],\n /**\n * Size\n * @see https://tailwindcss.com/docs/size\n */\n size: [{\n size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']\n }],\n // Typography\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', isTshirtSize, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isAny]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': ['none', isNumber, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryValue]\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['none', 'disc', 'decimal', isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: [colors]\n }],\n /**\n * Placeholder Opacity\n * @see https://tailwindcss.com/docs/placeholder-opacity\n */\n 'placeholder-opacity': [{\n 'placeholder-opacity': [opacity]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: [colors]\n }],\n /**\n * Text Opacity\n * @see https://tailwindcss.com/docs/text-opacity\n */\n 'text-opacity': [{\n 'text-opacity': [opacity]\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...getLineStyles(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: ['auto', 'from-font', isLength, isArbitraryLength]\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': ['auto', isLength, isArbitraryValue]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: [colors]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: getSpacingWithArbitrary()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryValue]\n }],\n // Backgrounds\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Opacity\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/background-opacity\n */\n 'bg-opacity': [{\n 'bg-opacity': [opacity]\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: [...getPositions(), isArbitraryPosition]\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: ['no-repeat', {\n repeat: ['', 'x', 'y', 'round', 'space']\n }]\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: ['auto', 'cover', 'contain', isArbitrarySize]\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: [colors]\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: [gradientColorStops]\n }],\n // Borders\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: [borderRadius]\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': [borderRadius]\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': [borderRadius]\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': [borderRadius]\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': [borderRadius]\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': [borderRadius]\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': [borderRadius]\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': [borderRadius]\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': [borderRadius]\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': [borderRadius]\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': [borderRadius]\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': [borderRadius]\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': [borderRadius]\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': [borderRadius]\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': [borderRadius]\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: [borderWidth]\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': [borderWidth]\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': [borderWidth]\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': [borderWidth]\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': [borderWidth]\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': [borderWidth]\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': [borderWidth]\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': [borderWidth]\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': [borderWidth]\n }],\n /**\n * Border Opacity\n * @see https://tailwindcss.com/docs/border-opacity\n */\n 'border-opacity': [{\n 'border-opacity': [opacity]\n }],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...getLineStyles(), 'hidden']\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x': [{\n 'divide-x': [borderWidth]\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y': [{\n 'divide-y': [borderWidth]\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Divide Opacity\n * @see https://tailwindcss.com/docs/divide-opacity\n */\n 'divide-opacity': [{\n 'divide-opacity': [opacity]\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/divide-style\n */\n 'divide-style': [{\n divide: getLineStyles()\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: [borderColor]\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': [borderColor]\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': [borderColor]\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': [borderColor]\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': [borderColor]\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': [borderColor]\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': [borderColor]\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': [borderColor]\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': [borderColor]\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: [borderColor]\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: ['', ...getLineStyles()]\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isLength, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: [isLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: [colors]\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w': [{\n ring: getLengthWithEmptyAndArbitrary()\n }],\n /**\n * Ring Width Inset\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/ring-color\n */\n 'ring-color': [{\n ring: [colors]\n }],\n /**\n * Ring Opacity\n * @see https://tailwindcss.com/docs/ring-opacity\n */\n 'ring-opacity': [{\n 'ring-opacity': [opacity]\n }],\n /**\n * Ring Offset Width\n * @see https://tailwindcss.com/docs/ring-offset-width\n */\n 'ring-offset-w': [{\n 'ring-offset': [isLength, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://tailwindcss.com/docs/ring-offset-color\n */\n 'ring-offset-color': [{\n 'ring-offset': [colors]\n }],\n // Effects\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow-color\n */\n 'shadow-color': [{\n shadow: [isAny]\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [opacity]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': getBlendModes()\n }],\n // Filters\n /**\n * Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: ['', 'none']\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: [blur]\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [brightness]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [contrast]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue]\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: [grayscale]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [hueRotate]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: [invert]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [saturate]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: [sepia]\n }],\n /**\n * Backdrop Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': ['', 'none']\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': [blur]\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [brightness]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [contrast]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': [grayscale]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [hueRotate]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': [invert]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [opacity]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [saturate]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': [sepia]\n }],\n // Tables\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': [borderSpacing]\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': [borderSpacing]\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': [borderSpacing]\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // Transitions and Animation\n /**\n * Tranisition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue]\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: getNumberAndArbitrary()\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: getNumberAndArbitrary()\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue]\n }],\n // Transforms\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: ['', 'gpu', 'none']\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: [scale]\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': [scale]\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': [scale]\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: [isInteger, isArbitraryValue]\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': [translate]\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': [translate]\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': [skew]\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': [skew]\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue]\n }],\n // Interactivity\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: ['auto', colors]\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue]\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: [colors]\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['none', 'auto']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', 'y', 'x', '']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': getSpacingWithArbitrary()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue]\n }],\n // SVG\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: [colors, 'none']\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: [colors, 'none']\n }],\n // Accessibility\n /**\n * Screen Readers\n * @see https://tailwindcss.com/docs/screen-readers\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n }\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n separator,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'separator', separator);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n for (const configKey in override) {\n overrideConfigProperties(baseConfig[configKey], override[configKey]);\n }\n for (const key in extend) {\n mergeConfigProperties(baseConfig[key], extend[key]);\n }\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = (baseObject[key] || []).concat(mergeValue);\n }\n }\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { BREAKPOINTS } from \"@/constants\";\nimport { Breakpoints, Style } from \"@/types\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n// Merge class names safely with Tailwind merge\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n// Convert style object to inline style string\nexport function mapStyles(style: Style): string {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n return Object.entries(style)\n .filter(([_, v]) => typeof v !== \"object\" && v != null)\n .map(([k, v]) => `${k}: ${v};`)\n .join(\" \");\n}\n// Change the current theme on the document\nexport function changeTheme(theme: \"light\" | \"dark\") {\n document.documentElement.setAttribute(\"data-theme\", theme);\n}\n\n// Initialize theme to light if not set\nexport function initTheme() {\n const currentTheme = document.documentElement.getAttribute(\"data-theme\");\n if (!currentTheme || (currentTheme !== \"light\" && currentTheme !== \"dark\")) {\n changeTheme(\"light\");\n }\n}\n\n// Get current theme\nexport function getTheme(): \"light\" | \"dark\" {\n return document.documentElement.getAttribute(\"data-theme\")! as\n | \"light\"\n | \"dark\";\n}\n\n// Resolve image URL based on theme\nexport function resolveImageUrl(\n url: string,\n theme: \"light\" | \"dark\" | string,\n): string {\n return url.includes(\"{{theme}}\") ? url.replace(\"{{theme}}\", theme) : url;\n}\n\n// Splits a Style object into base and responsive\nexport function splitStyle(style: Style) {\n const base: Style = {};\n const responsive: Record<Breakpoints, Style> = {} as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n for (const key in style) {\n const value = style[key];\n if (value == null) continue;\n\n if (key in BREAKPOINTS && typeof value === \"object\") {\n responsive[key as Breakpoints] = value as Style;\n } else {\n base[key] = value as string | number;\n }\n }\n\n return { base, responsive };\n}\n\n// helper: merges custom breakpoints with defaults\nexport function mergeBreakpoints(\n custom?: Partial<Record<Breakpoints, string>>,\n): Record<Breakpoints, string> {\n return { ...BREAKPOINTS, ...(custom ?? {}) };\n}\n\nexport function injectResponsiveStyles(\n id: string,\n responsive: Record<Breakpoints, Style>,\n customBreakpoints?: Partial<Record<Breakpoints, string>>,\n) {\n const breakpoints = mergeBreakpoints(customBreakpoints);\n let css = \"\";\n\n for (const bp in responsive) {\n const width = breakpoints[bp as Breakpoints];\n const mediaQuery = `(min-width: ${width})`;\n\n const rules = Object.entries(responsive[bp as Breakpoints])\n .map(([k, v]) => `${k}: ${v} !important;`)\n .join(\" \");\n\n css += `@media ${mediaQuery} { #${id} { ${rules} } }\\n`;\n }\n\n let styleTag = document.getElementById(\n `responsive-style-${id}`,\n ) as HTMLStyleElement;\n\n if (!styleTag) {\n styleTag = document.createElement(\"style\");\n styleTag.id = `responsive-style-${id}`;\n document.head.appendChild(styleTag);\n }\n\n styleTag.textContent = css;\n}\n\n// utils/layoutUtils.ts\nexport function nextPaint(): Promise<void> {\n return new Promise((resolve) => {\n requestAnimationFrame(() => requestAnimationFrame(() => resolve()));\n });\n}\n\n/**\n * Updates flex widths of buttons:\n * - Last row normally fixed width\n * - Other rows flex-grow: 1\n * - If last row === first row, last row grows instead\n */\n// export async function updateSocialLoginBtnWidths(buttons: HTMLElement[]) {\n// if (!buttons.length) return;\n\n// await nextPaint(); // wait for layout to settle\n\n// // Detect first row\n// let firstTop: number | null = null;\n// const firstRow: HTMLElement[] = [];\n// for (const btn of buttons) {\n// const { top } = btn.getBoundingClientRect();\n// if (firstTop === null) firstTop = top;\n// if (top !== firstTop) break;\n// firstRow.push(btn);\n// }\n\n// if (!firstRow.length) return;\n\n// const rectWidth = firstRow[0].getBoundingClientRect().width;\n// const width = `${rectWidth}px`;\n\n// const isSingleRow = firstRow.length === buttons.length; // all buttons are in the first row\n\n// // Apply width to all rows\n// buttons.forEach((b, i) => {\n// if (isSingleRow) {\n// b.style.flexBasis = \"0\";\n// b.style.flexGrow = \"1\"; // all buttons grow if single row\n// } else {\n// b.style.flexGrow = \"0\";\n// b.style.flexBasis = width;\n// }\n// });\n\n// await nextPaint(); // ensure the browser repaints with updated flex-basis\n// }\n\n// export async function updateSocialLoginBtnWidths(\n// container: HTMLElement,\n// buttons: HTMLElement[]\n// ) {\n// if (!buttons.length) return;\n\n// await nextPaint();\n\n// const containerWidth = container.offsetWidth;\n// const buttonCount = buttons.length;\n// const minButtonWidth = 50; // px\n// const gap = 8; // px, must match --sso-gap (0.5rem)\n\n// // Compute max number of buttons that can fit in one row (considering gaps)\n// let cols = Math.floor((containerWidth + gap) / (minButtonWidth + gap));\n// cols = Math.max(1, Math.min(cols, buttonCount)); // at least 1, at most total buttons\n\n// // Set CSS vars\n// container.style.setProperty(\"--sso-cols\", String(cols));\n// container.style.setProperty(\"--sso-gap\", `${gap}px`);\n// container.style.setProperty(\n// \"--sso-item-width\",\n// `calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))`\n// );\n\n// console.log(\n// `[updateSocialLoginBtnWidths] container=${containerWidth}px, cols=${cols}, totalButtons=${buttonCount}`\n// );\n// }\n\nexport async function updateSocialLoginBtnWidths(\n container: HTMLElement,\n buttons: HTMLElement[],\n) {\n if (!buttons.length) return;\n\n await nextPaint();\n\n const containerWidth = container.offsetWidth;\n const buttonCount = buttons.length;\n const minButtonWidth = 60; // px\n const gap = 8; // px\n\n let bestCols = 1;\n let bestItemWidth = 0;\n let bestPriority = -1; // higher is better\n\n for (let cols = 1; cols <= buttonCount; cols++) {\n const totalGap = gap * (cols - 1);\n const itemWidth = (containerWidth - totalGap) / cols;\n const lastRow = buttonCount % cols;\n\n if (itemWidth < minButtonWidth) continue; // too small, skip\n\n // Determine priority\n let priority = 0;\n if (lastRow === 0 && cols > bestCols)\n priority = bestPriority + 1; // full rows → best\n else if (lastRow >= 2)\n priority = 2; // last row ≥ 2 → good\n else continue; // lastRow = 1 → invalid\n\n // Choose if higher priority OR same priority but larger item width\n if (\n priority > bestPriority ||\n (priority === bestPriority && itemWidth > bestItemWidth)\n ) {\n bestCols = cols;\n bestItemWidth = itemWidth;\n bestPriority = priority;\n }\n }\n\n // Set CSS vars\n container.style.setProperty(\"--sso-cols\", String(bestCols));\n container.style.setProperty(\"--sso-gap\", `${gap}px`);\n container.style.setProperty(\n \"--sso-item-width\",\n `calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))`,\n );\n}\n\nexport function deepMerge<\n T extends Record<string, any>,\n U extends Record<string, any>,\n>(target: T, source: U): T & U {\n const result: any = { ...target };\n\n for (const key in source) {\n const sourceVal = source[key];\n const targetVal = result[key];\n\n if (\n sourceVal &&\n typeof sourceVal === \"object\" &&\n !Array.isArray(sourceVal)\n ) {\n result[key] = deepMerge(\n (targetVal ?? {}) as Record<string, any>,\n sourceVal as Record<string, any>,\n );\n } else {\n result[key] = sourceVal;\n }\n }\n\n return result as T & U;\n}\n","import { ICustomizationOptions, ICustomizations, Style } from \"@/types\";\nimport { cn } from \"./styles\";\n\n// Maps alignment string to CSS flex alignment\nexport function mapAlignment(alignment: string) {\n return (\n { start: \"flex-start\", center: \"center\", end: \"flex-end\" }[alignment] ||\n \"flex-start\"\n );\n}\n\n// Maps a button variant to its customization object\nexport function mapBtnToCustomizedStyle(\n variant:\n | \"secondary\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"outline\"\n | \"ghost\",\n customizations: ICustomizations,\n): ICustomizationOptions | undefined {\n return {\n default: customizations.byType?.buttons?.defaultButton,\n secondary: customizations.byType?.buttons?.secondaryButton,\n link: customizations.byType?.buttons?.linkButton,\n destructive: customizations.byType?.buttons?.destructiveButton,\n ghost: customizations.byType?.buttons?.ghostButton,\n outline: customizations.byType?.buttons?.outlineButton,\n }[variant];\n}\n\n// Applies customizations to class and style, respecting root container, type, and ID\n//TO DO: Check everything works with CSSStyleDeclaration as well\nexport function applyCustomizations(\n defaultClass: string,\n defaultStyle?: Style | CSSStyleDeclaration,\n typeCustomization?: ICustomizationOptions,\n elementId?: string,\n customizations?: ICustomizations,\n isRootContainer: boolean = false,\n): { class: string; style: Style } {\n let finalClass = defaultClass || \"\";\n let finalStyle = { ...defaultStyle };\n\n // Apply global font from root container\n if (isRootContainer && customizations?.config?.font) {\n finalClass = cn(finalClass, customizations.config.font);\n }\n\n const mergeCustomization = (cust?: ICustomizationOptions) => {\n if (!cust) return;\n const { class: cClass, style: cStyle, font: cFont, rule = \"merge\" } = cust;\n if (rule === \"override\") {\n finalClass = cFont || cClass || \"\";\n finalStyle = cStyle || {};\n } else {\n finalClass = cn(finalClass, cClass, cFont);\n finalStyle = { ...finalStyle, ...cStyle };\n }\n };\n\n mergeCustomization(typeCustomization);\n\n if (elementId && customizations?.byId?.[elementId]) {\n mergeCustomization(customizations.byId[elementId]);\n }\n\n return { class: finalClass, style: finalStyle };\n}\n\n// * ====================================================================== * //\n\nconst RAND_STR_CHARS = \"abcdefghijklmnopqrstuvwxyz0123456789\";\nconst RAND_STR_LENGTH = 6;\n\nfunction genRandStr(length?: number) {\n let rand = \"\";\n\n for (let i = 0; i < (length ?? RAND_STR_LENGTH); i++) {\n rand += RAND_STR_CHARS.charAt(\n Math.floor(Math.random() * RAND_STR_CHARS.length),\n );\n }\n\n return rand;\n}\n\nexport const genRandSeed = () => genRandStr();\n","export function decodeBase64Svg(icon: string): string | null {\n if (!icon?.startsWith(\"data:image/svg+xml;base64,\")) {\n return null;\n }\n\n try {\n const base64 = icon.replace(\"data:image/svg+xml;base64,\", \"\");\n return atob(base64);\n } catch (e) {\n console.error(\"Invalid base64 SVG:\", e);\n return null;\n }\n}\n\nexport function resolveIconSource(icon: string): string {\n if (/^https?:\\/\\//.test(icon)) {\n return icon;\n }\n\n if (icon?.startsWith(\"data:image/svg+xml;base64,\")) {\n return icon;\n }\n\n return `data:image/svg+xml;base64,${icon}`;\n}\n","import { LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { provide } from \"@lit/context\";\nimport {\n envContext,\n authContext,\n AuthState,\n renderSpecContext,\n} from \"@/context\";\nimport { EnvConfig, RenderSpec } from \"@/types\";\nimport { initTheme } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\n@customElement(\"sb-provider\")\nexport class SbProvider extends LitElement {\n createRenderRoot() {\n return this;\n }\n\n /**\n * ENV now comes from a property instead of getEnvConfig()\n */\n @property({ type: Object })\n @provide({ context: envContext })\n env: EnvConfig | null = null;\n\n /**\n * Auth state\n */\n @state()\n @provide({ context: authContext })\n auth: AuthState = { isAuthenticated: false };\n\n @state()\n @provide({ context: renderSpecContext })\n renderSpec: string | null = null;\n\n /**\n * Enable/disable automatic redirect for authenticated users on auth pages.\n */\n @property({ type: Boolean })\n autoRedirect: boolean = true;\n\n connectedCallback(): void {\n super.connectedCallback();\n initTheme();\n\n const waitForEnv = async () => {\n while (!this.env || !this.env.domain) {\n await new Promise((res) => setTimeout(res, 20));\n }\n\n Auth.configure({\n domain: this.env.domain,\n appId: this.env.appId,\n clientSecret: this.env.clientSecret ?? \"\",\n locale: this.env.locale,\n signinUrl: this.env.signinUrl,\n signupUrl: this.env.signupUrl,\n onFlowStateChange: (event) => {\n if (event.render_spec) {\n this.renderSpec = event.render_spec;\n }\n },\n });\n\n this.refreshAuthState();\n };\n\n waitForEnv().catch((err) =>\n console.error(\"Error initializing SbProvider:\", err),\n );\n }\n\n updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n\n if (changedProperties.has(\"env\")) {\n // Reconfigure SDK if env changes\n if (this.env?.domain) {\n Auth.configure({\n domain: this.env.domain,\n appId: this.env.appId,\n clientSecret: this.env.clientSecret ?? \"\",\n locale: this.env.locale,\n signinUrl: this.env.signinUrl,\n signupUrl: this.env.signupUrl,\n onFlowStateChange: (event) => {\n if (event.render_spec) {\n this.renderSpec = event.render_spec;\n }\n },\n });\n }\n }\n\n if (changedProperties.has(\"auth\")) {\n this.handleAuthStateChange();\n }\n }\n\n private handleAuthStateChange(): void {\n if (!this.autoRedirect || !this.auth.isAuthenticated) return;\n if (!this.env) return;\n\n const currentPath = window.location.pathname;\n const authPageUrls: string[] = [this.env.signinUrl, this.env.signupUrl];\n const isOnAuthPage = authPageUrls.some((authUrl) =>\n currentPath.includes(authUrl),\n );\n\n if (isOnAuthPage) {\n const qs = new URLSearchParams(window.location.search);\n const redirect_url = qs.get(\"redirect_url\");\n const signinRedirectUrl: string =\n redirect_url || this.env.signinRedirectUrl || \"/\";\n window.location.href = signinRedirectUrl;\n }\n }\n\n private refreshAuthState() {\n this.auth = { isAuthenticated: Auth.isAuthenticated() };\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState } from \"@/context\";\n\n@customElement(\"sb-signed-out\")\nexport class SignedOut extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n render() {\n if (!this.auth) return nothing;\n\n return html`\n <div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState } from \"@/context\";\n\n@customElement(\"sb-signed-in\")\nexport class SignedIn extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n render() {\n if (!this.auth) return nothing;\n\n return html`\n <div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { authContext, AuthState, envContext } from \"@/context\";\nimport { EnvConfig } from \"@/types\";\n\n@customElement(\"sb-authenticated\")\nexport class SbAuthenticated extends LitElement {\n private _cachedChildren: Node[] = [];\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this._cachedChildren.length === 0) {\n // detach and cache children once\n this._cachedChildren = Array.from(this.childNodes);\n this._cachedChildren.forEach((c) => this.removeChild(c));\n }\n }\n\n /**\n * The URL to redirect to if the user is not authenticated.\n * Defaults to environment variable, can be overridden via property.\n */\n\n @property({ type: String })\n redirectUrl: string = \"\";\n\n @consume({ context: envContext })\n @property({ attribute: false })\n env: EnvConfig | null = null;\n\n @consume({ context: authContext, subscribe: true })\n @property({ attribute: false })\n auth?: AuthState;\n\n render() {\n if (!this.auth) return nothing;\n\n if (!this.auth.isAuthenticated) {\n // Redirect to the given URL\n window.location.href = this.redirectUrl || this.env?.signinUrl!;\n return nothing;\n }\n\n return html`${this._cachedChildren}`;\n }\n}\n","import { TemplateResult } from \"lit-html\";\n\nexport enum USER_PROFILE_TAB_VALUES {\n PROFILE = \"Profile\",\n SECURITY = \"Security\",\n APPEARANCE = \"Appearance\",\n NOTIFICATION = \"Notification\",\n}\n\nexport enum USER_PROFILE_TAB_LIST {\n PROFILE = \"Profile\",\n SECURITY = \"Security\",\n APPEARANCE = \"Appearance\",\n NOTIFICATION = \"Notification\",\n}\n\nexport enum USER_PROFILE_MODE {\n MODAL = \"MODAL\",\n PAGE = \"PAGE\",\n}\n\nexport enum USER_PROFILE_SIDEBAR_DISPLAY_TYPE {\n BURGER = \"BURGER\",\n REGULAR = \"REGULAR\",\n}\n\nexport enum USER_PROFILE_ORIENTATION {\n VERTICAL = \"VERTICAL\",\n HORIZONTAL = \"HORIZONTAL\",\n}\n\nexport enum USER_PROFILE_WIDGETS_LAYOUT {\n COLUMN = \"COLUMN\",\n ROW = \"ROW\",\n}\n\nexport interface IProfileContentCustomizations {\n account?: IProfileWidgetCustomization;\n personalInfo?: IProfileWidgetCustomization;\n locations?: IProfileWidgetCustomization;\n urls?: IProfileWidgetCustomization;\n}\n\nexport interface IProfileWidgetCustomization {\n icon?: HTMLElement | TemplateResult | Element;\n title?: string;\n}\n","import { svg } from \"lit\";\n\nexport function editIcon() {\n return svg`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"sb-text-foreground\"\n\n >\n <path\n d=\"M10.0007 3.33333L12.6673 6M14.1166 4.54126C14.4691 4.18888 14.6671 3.71091 14.6672 3.2125C14.6673 2.71409 14.4693 2.23607 14.1169 1.8836C13.7646 1.53112 13.2866 1.33307 12.7882 1.33301C12.2898 1.33295 11.8117 1.53088 11.4593 1.88326L2.56194 10.7826C2.40715 10.9369 2.29268 11.127 2.22861 11.3359L1.34794 14.2373C1.33071 14.2949 1.32941 14.3562 1.34417 14.4145C1.35894 14.4728 1.38922 14.5261 1.4318 14.5686C1.47439 14.6111 1.52769 14.6413 1.58605 14.656C1.6444 14.6707 1.70565 14.6693 1.76327 14.6519L4.66527 13.7719C4.87405 13.7084 5.06406 13.5947 5.21861 13.4406L14.1166 4.54126Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.33\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function accountIcon() {\n return svg`<svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.001 2.16699C11.8485 2.16699 13.3621 3.62252 13.4551 5.44727L13.46 5.625C13.4518 7.49878 11.988 9.0097 10.125 9.0752H10.085C10.0257 9.07061 9.96647 9.07024 9.91016 9.07422C7.99672 9.00424 6.54297 7.49098 6.54297 5.625C6.54315 3.71807 8.09404 2.16717 10.001 2.16699Z\"\n fill=\"#737373\"\n stroke=\"#737373\"\n />\n <path\n d=\"M14.2328 11.7914C11.9078 10.2414 8.11615 10.2414 5.77448 11.7914C4.71615 12.4997 4.13281 13.4581 4.13281 14.4831C4.13281 15.5081 4.71615 16.4581 5.76615 17.1581C6.93281 17.9414 8.46615 18.3331 9.99948 18.3331C11.5328 18.3331 13.0661 17.9414 14.2328 17.1581C15.2828 16.4497 15.8661 15.4997 15.8661 14.4664C15.8578 13.4414 15.2828 12.4914 14.2328 11.7914Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function personalInfoIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M22 12C22 6.49 17.51 2 12 2C6.49 2 2 6.49 2 12C2 14.9 3.25 17.51 5.23 19.34C5.23 19.35 5.23 19.35 5.22 19.36C5.32 19.46 5.44 19.54 5.54 19.63C5.6 19.68 5.65 19.73 5.71 19.77C5.89 19.92 6.09 20.06 6.28 20.2C6.35 20.25 6.41 20.29 6.48 20.34C6.67 20.47 6.87 20.59 7.08 20.7C7.15 20.74 7.23 20.79 7.3 20.83C7.5 20.94 7.71 21.04 7.93 21.13C8.01 21.17 8.09 21.21 8.17 21.24C8.39 21.33 8.61 21.41 8.83 21.48C8.91 21.51 8.99 21.54 9.07 21.56C9.31 21.63 9.55 21.69 9.79 21.75C9.86 21.77 9.93 21.79 10.01 21.8C10.29 21.86 10.57 21.9 10.86 21.93C10.9 21.93 10.94 21.94 10.98 21.95C11.32 21.98 11.66 22 12 22C12.34 22 12.68 21.98 13.01 21.95C13.05 21.95 13.09 21.94 13.13 21.93C13.42 21.9 13.7 21.86 13.98 21.8C14.05 21.79 14.12 21.76 14.2 21.75C14.44 21.69 14.69 21.64 14.92 21.56C15 21.53 15.08 21.5 15.16 21.48C15.38 21.4 15.61 21.33 15.82 21.24C15.9 21.21 15.98 21.17 16.06 21.13C16.27 21.04 16.48 20.94 16.69 20.83C16.77 20.79 16.84 20.74 16.91 20.7C17.11 20.58 17.31 20.47 17.51 20.34C17.58 20.3 17.64 20.25 17.71 20.2C17.91 20.06 18.1 19.92 18.28 19.77C18.34 19.72 18.39 19.67 18.45 19.63C18.56 19.54 18.67 19.45 18.77 19.36C18.77 19.35 18.77 19.35 18.76 19.34C20.75 17.51 22 14.9 22 12ZM16.94 16.97C14.23 15.15 9.79 15.15 7.06 16.97C6.62 17.26 6.26 17.6 5.96 17.97C4.44 16.43 3.5 14.32 3.5 12C3.5 7.31 7.31 3.5 12 3.5C16.69 3.5 20.5 7.31 20.5 12C20.5 14.32 19.56 16.43 18.04 17.97C17.75 17.6 17.38 17.26 16.94 16.97Z\"\n fill=\"#737373\"\n />\n <path\n d=\"M12 6.92969C9.93 6.92969 8.25 8.60969 8.25 10.6797C8.25 12.7097 9.84 14.3597 11.95 14.4197C11.98 14.4197 12.02 14.4197 12.04 14.4197C12.06 14.4197 12.09 14.4197 12.11 14.4197C12.12 14.4197 12.13 14.4197 12.13 14.4197C14.15 14.3497 15.74 12.7097 15.75 10.6797C15.75 8.60969 14.07 6.92969 12 6.92969Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function locationIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.6191 8.45C19.5691 3.83 15.5391 1.75 11.9991 1.75C11.9991 1.75 11.9991 1.75 11.9891 1.75C8.45912 1.75 4.41912 3.82 3.36912 8.44C2.19912 13.6 5.35912 17.97 8.21912 20.72C9.27912 21.74 10.6391 22.25 11.9991 22.25C13.3591 22.25 14.7191 21.74 15.7691 20.72C18.6291 17.97 21.7891 13.61 20.6191 8.45ZM11.9991 13.46C10.2591 13.46 8.84912 12.05 8.84912 10.31C8.84912 8.57 10.2591 7.16 11.9991 7.16C13.7391 7.16 15.1491 8.57 15.1491 10.31C15.1491 12.05 13.7391 13.46 11.9991 13.46Z\"\n fill=\"#737373\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function urlIcon() {\n return svg`<svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15 3H21M21 3V9M21 3L10 14M18 13V19C18 19.5304 17.7893 20.0391 17.4142 20.4142C17.0391 20.7893 16.5304 21 16 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V8C3 7.46957 3.21071 6.96086 3.58579 6.58579C3.96086 6.21071 4.46957 6 5 6H11\"\n stroke=\"#737373\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>`;\n}\n","import { svg } from \"lit\";\n\nexport function closeIcon() {\n return svg`\n <svg \n class=\"sb-text-foreground\"\n xmlns=\"http://www.w3.org/2000/svg\"]\n width=\"10\"\n height=\"10\" \n viewBox=\"0 0 10 10\" \n fill=\"none\">\n <path d=\"M9 1L1 9M1 1L9 9\" stroke=\"currentColor\" stroke-width=\"1.33\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n`;\n}\n","import { svg } from \"lit\";\n\nexport function burgerMenuIcon() {\n return svg` \n <svg width=\"18\" height=\"14\" viewBox=\"0 0 18 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1 7H17M1 1H17M1 13H17\" stroke=\"#0A0A0A\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n`;\n}\n","export const CARD_HEADER_CONTAINER_CLASS =\n \"sb-w-full sb-flex sb-justify-between sb-border-b sb-px-4 sb-py-2\";\nexport const CARD_HEADER_TITLE_CLASS =\n \"sb-flex sb-items-center sb-text-[18px] sb-font-medium sb-gap-2 sb-text-muted-foreground !sb-min-w-9 !sb-min-h-9\";\nexport const CARD_INPUT_LABEL_CLASS =\n \"sb-w-full sb-basis-36 sb-shrink-0 sb-text-sm sb-text-foreground sb-font-medium sb-truncate sb-overflow-hidden sb-text-ellipsis\";\nexport const CARD_INPUT_FIELD_CLASS =\n \"sb-w-full sb-border-none !sb-shadow-none !sb-px-0 disabled:!sb-opacity-100\";\nexport const CARD_EDIT_FORM_CONTAINER_CLASS =\n \"!sb-rounded-2xl !sb-p-0 !sb-bg-base-background\";\nexport const CARD_CONTAINER_CLASS = \"!sb-rounded-2xl !sb-p-0 sb-mb-4\";\nexport const CARD_EDITABLE_INPUT_CLASS = \"!sb-bg-background\";\nexport const CARD_DEFAULT_BUTTON = \"sb-w-full md:sb-w-[120px]\";\nexport const CARD_OUTLINE_BUTTON = \"sb-w-full md:sb-w-[120px]\";\nexport const CARD_EDIT_BUTTON =\n \"sb-text-muted-foreground sb-text-sm sb-mr-2 sb-flex sb-items-center sb-gap-1\";\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { accountIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface Account {\n email: string;\n phone: string;\n avatar: string;\n}\n\nconst renderOtpContent = (variant: string, length: number) => {\n const baseSlots = Array.from({ length }).map(\n (_, index) =>\n html`<rtg-input-otp-slot\n class=\"sb-bg-background\"\n index=${index}\n ></rtg-input-otp-slot>`\n );\n\n const group = (items: any) =>\n html`<rtg-input-otp-group>${items}</rtg-input-otp-group>`;\n const sep = () => html`<rtg-input-otp-separator></rtg-input-otp-separator>`;\n\n switch (variant) {\n case \"with_spacing\":\n return html`<rtg-input-otp-group class=\"gap-2\"\n >${baseSlots}</rtg-input-otp-group\n >`;\n case \"simple\":\n return html`${group(baseSlots.slice(0, 3))}${sep()}${group(\n baseSlots.slice(3)\n )}`;\n case \"with_separator\":\n return html`\n ${group(baseSlots.slice(0, 2))}${sep()}\n ${group(baseSlots.slice(2, 4))}${sep()} ${group(baseSlots.slice(4))}\n `;\n default:\n return group(baseSlots);\n }\n};\n\n@customElement(\"sb-account-info\")\nexport class SbAccountInfo extends LitElement {\n @property({ type: Object }) account!: Account;\n @property({ type: Boolean }) showAvatarMenu = false;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n @property({ type: Function }) toggleAvatarMenu!: (e: Event) => void;\n @property({ type: Function }) onAvatarChange!: () => void;\n @property({ type: Function }) onAvatarRemove!: () => void;\n @property({ type: Boolean }) showIcons = true;\n @property({ type: Object }) content: IProfileWidgetCustomization | null =\n null;\n @property({ type: String }) otpVariant:\n | \"simple\"\n | \"with_spacing\"\n | \"with_separator\"\n | \"digits_only\" = \"simple\";\n @property({ type: Number }) otpLength = 6;\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @state() private isEditingEmail = false;\n @state() private isVerifyingEmail = false;\n @state() private isEditingPhone = false;\n @state() private isVerifyingPhone = false;\n\n // Helpers to centralize customization mappings\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(CARD_INPUT_LABEL_CLASS, \"sb-hidden md:sb-inline\"),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n isEditContainer ? CARD_EDIT_FORM_CONTAINER_CLASS : CARD_CONTAINER_CLASS,\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n // Generic field display row\n private renderDisplayRow(label: string, value: string, onEdit: () => void) {\n const { class: labelClass, style: labelStyle } = this.getLabelStyles();\n const { class: inputClass, style: inputStyle } = this.getInputStyles();\n const isColumn = this.layout === USER_PROFILE_WIDGETS_LAYOUT.COLUMN;\n\n return html`\n <div\n class=${cn(\n \"sb-w-full\",\n isColumn\n ? \"sb-flex sb-flex-row-reverse md:sb-flex-col sb-gap-2\"\n : \"sb-flex sb-items-center sb-justify-between sb-gap-2\"\n )}\n >\n ${isColumn\n ? html`\n <div class=\"sb-flex sb-items-center sb-justify-between sb-gap-2\">\n <div class=${labelClass} style=${mapStyles(labelStyle)}>\n ${label}\n </div>\n <rtg-button variant=\"outline\" size=\"sm\" @click=${onEdit}>\n ${editIcon()}\n </rtg-button>\n </div>\n <div class=\"sb-flex-1 sb-min-w-0\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n .value=${value}\n disabled\n ></rtg-input>\n </div>\n `\n : html`\n <div class=${labelClass} style=${mapStyles(labelStyle)}>\n ${label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n .value=${value}\n disabled\n ></rtg-input>\n </div>\n <rtg-button variant=\"outline\" size=\"sm\" @click=${onEdit}>\n ${editIcon()}\n </rtg-button>\n `}\n </div>\n `;\n }\n\n // Generic edit form\n private renderEditForm(\n type: \"email\" | \"phone\",\n placeholder: string,\n onSend: () => void,\n onCancel: () => void\n ) {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(true);\n const { class: inputClass, style: inputStyle } = this.getInputStyles(true);\n const { defaultMapped, outlineMapped } = this.getButtonStyles();\n\n const title = type === \"email\" ? \"Edit email address\" : \"Edit phone number\";\n const desc =\n type === \"email\"\n ? \"Type your new email address to replace the old one.\"\n : \"Type your new phone number to replace the old one.\";\n\n return html`\n <rtg-card\n customClass=${cn(\"!sb-pt-4\", containerClass)}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title class=\"sb-flex sb-items-center sb-justify-between\">\n <span class=\"sb-text-[18px] sb-font-medium sb-mx-4 sb-mt-4 sb-mb-2\"\n >${title}</span\n >\n </rtg-card-title>\n <rtg-card-description>\n <div class=\"sb-text-sm sb-text-muted-foreground sb-mx-4\">${desc}</div>\n </rtg-card-description>\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4\">\n <rtg-input\n customClass=${inputClass}\n customStyle=${mapStyles(inputStyle)}\n placeholder=${placeholder}\n type=${type === \"phone\" ? \"tel\" : \"text\"}\n ></rtg-input>\n </div>\n </rtg-card-content>\n <rtg-separator></rtg-separator>\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n class=${defaultMapped.class}\n style=${mapStyles(defaultMapped.style)}\n @click=${onSend}\n >Send Code</rtg-button\n >\n <rtg-button\n class=${outlineMapped.class}\n style=${mapStyles(outlineMapped.style)}\n variant=\"outline\"\n @click=${onCancel}\n >Cancel</rtg-button\n >\n </rtg-card-footer>\n </rtg-card>\n `;\n }\n\n // Generic verification form\n private renderVerificationForm(\n type: \"email\" | \"phone\",\n onCancel: () => void\n ) {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(true);\n const { defaultMapped, outlineMapped } = this.getButtonStyles();\n const { class: otpClass, style: otpStyle } = this.getInputStyles();\n\n const title =\n type === \"email\"\n ? \"Email verification required\"\n : \"Phone number verification required\";\n const desc =\n type === \"email\"\n ? \"Please enter the code to verify this email.\"\n : \"Please enter the code to verify this phone number.\";\n\n return html`\n <rtg-card\n customClass=${cn(\"!sb-pt-4\", containerClass)}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title class=\"sb-flex sb-items-center sb-justify-between\">\n <span class=\"sb-text-[18px] sb-font-medium sb-mx-4 sb-mt-4 sb-mb-2\"\n >${title}</span\n >\n </rtg-card-title>\n <rtg-card-description>\n <div class=\"sb-text-sm sb-text-muted-foreground sb-mx-4\">${desc}</div>\n </rtg-card-description>\n <rtg-card-content>\n <div\n class=\"sb-flex sb-items-center sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4\"\n >\n <rtg-input-otp\n customClass=${otpClass}\n customStyle=${mapStyles(otpStyle)}\n variant=${this.otpVariant}\n >\n ${renderOtpContent(this.otpVariant, this.otpLength)}\n </rtg-input-otp>\n <p class=\"sb-text-[12px] sb-font-medium\">\n Resend Verification Code\n </p>\n </div>\n </rtg-card-content>\n <rtg-separator></rtg-separator>\n <rtg-card-footer\n class=\"sb-flex sb-flex-row sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"outline\"\n class=${outlineMapped.class}\n style=${mapStyles(outlineMapped.style)}\n @click=${onCancel}\n >Cancel</rtg-button\n >\n <rtg-button\n class=${defaultMapped.class}\n style=${mapStyles(defaultMapped.style)}\n >Confirm</rtg-button\n >\n </rtg-card-footer>\n </rtg-card>\n `;\n }\n\n // EMAIL\n private renderEmailSection() {\n if (this.isVerifyingEmail)\n return this.renderVerificationForm(\n \"email\",\n () => ((this.isVerifyingEmail = false), (this.isEditingEmail = true))\n );\n if (this.isEditingEmail)\n return this.renderEditForm(\n \"email\",\n \"Email\",\n () => ((this.isVerifyingEmail = true), (this.isEditingEmail = false)),\n () => (this.isEditingEmail = false)\n );\n return this.renderDisplayRow(\n \"Email\",\n this.account.email,\n () => (this.isEditingEmail = true)\n );\n }\n\n // PHONE\n private renderPhoneSection() {\n if (this.isVerifyingPhone)\n return this.renderVerificationForm(\n \"phone\",\n () => ((this.isVerifyingPhone = false), (this.isEditingPhone = true))\n );\n if (this.isEditingPhone)\n return this.renderEditForm(\n \"phone\",\n \"Phone Number\",\n () => ((this.isVerifyingPhone = true), (this.isEditingPhone = false)),\n () => (this.isEditingPhone = false)\n );\n return this.renderDisplayRow(\n \"Phone number\",\n this.account.phone,\n () => (this.isEditingPhone = true)\n );\n }\n\n private renderHeader() {\n const { class: containerClass, style: containerStyle } =\n applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const { class: titleClass, style: titleStyle } = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n return html`\n <rtg-card-header\n customClass=${containerClass}\n customStyle=${mapStyles(containerStyle)}\n >\n <rtg-card-title\n customClass=${titleClass}\n customStyle=${mapStyles(titleStyle)}\n >\n ${this.content?.icon || accountIcon()}\n <span>${this.content?.title || \"Account\"}</span>\n </rtg-card-title>\n </rtg-card-header>\n `;\n }\n\n private renderAvatar() {\n return html`\n <div\n class=${cn(\n \"sb-relative sb-flex sb-mx-auto md:sb-px-4 md:sb-pb-4\",\n \"sb-my-4\"\n )}\n @click=${this.toggleAvatarMenu}\n >\n <rtg-avatar customClass=\"sb-cursor-pointer !sb-w-[80px] !sb-h-[80px]\">\n ${this.account.avatar\n ? html`<rtg-avatar-image\n src=${this.account.avatar}\n ></rtg-avatar-image>`\n : html`<rtg-avatar-fallback></rtg-avatar-fallback>`}\n </rtg-avatar>\n ${this.showAvatarMenu && !(this.isEditingEmail || this.isEditingPhone)\n ? html`\n <rtg-card\n customClass=\"sb-absolute !sb-p-2 sb-top-full sb-left-1/2 -sb-translate-y-1/2 sb-z-[999] sb-w-[200px] sb-shadow-md sb-bg-background sb-rounded-2xl\"\n >\n <div\n class=\"sb-py-[6px] sb-px-2 sb-mb-2 sb-text-sm sb-cursor-pointer\"\n @click=${(e: Event) => (\n e.stopPropagation(), this.onAvatarChange?.()\n )}\n >\n Change profile picture\n </div>\n <div\n class=\"sb-py-[6px] sb-px-2 sb-text-sm sb-cursor-pointer\"\n @click=${(e: Event) => (\n e.stopPropagation(), this.onAvatarRemove?.()\n )}\n >\n Remove\n </div>\n </rtg-card>\n `\n : null}\n </div>\n `;\n }\n\n private renderAccountDetails() {\n return html`<div\n class=\"sb-flex sb-flex-col sb-mx-4 sb-my-2 md:sb-my-4 sb-gap-1 sb-flex-1\"\n >\n ${this.renderEmailSection()} ${this.renderPhoneSection()}\n </div>`;\n }\n\n render() {\n const { class: containerClass, style: containerStyle } =\n this.getContainerStyles(false);\n return html`\n <rtg-card\n customStyle=${mapStyles(containerStyle)}\n customClass=${containerClass}\n >\n ${this.renderHeader()}\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col md:sb-flex-row\">\n ${this.renderAvatar()} ${this.renderAccountDetails()}\n </div>\n </rtg-card-content>\n </rtg-card>\n `;\n }\n\n createRenderRoot() {\n return this;\n }\n}\n","import { LitElement, html, TemplateResult, PropertyValues } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { personalInfoIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface PersonalInfo {\n username: string;\n first: string;\n middle: string;\n last: string;\n nickname: string;\n gender: string;\n bio: string;\n}\n\n@customElement(\"sb-personal-info\")\nexport class SbPersonalInfo extends LitElement {\n @property({ type: Object }) personal!: PersonalInfo;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer\n ? CARD_EDIT_FORM_CONTAINER_CLASS + \" sb-mb-4\"\n : CARD_CONTAINER_CLASS\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [\n { label: \"Username\", value: this.personal.username },\n { label: \"First name\", value: this.personal.first },\n { label: \"Middle name\", value: this.personal.middle },\n { label: \"Last name\", value: this.personal.last },\n { label: \"Nickname\", value: this.personal.nickname },\n { label: \"Gender\", value: this.personal.gender },\n { label: \"Bio\", value: this.personal.bio },\n ];\n\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content?.icon : personalInfoIcon()}\n\n <span>\n ${this.content?.title ? this.content?.title : \"Personal Info\"}\n </span>\n </rtg-card-title>\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-p-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center sb-gap-2\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { locationIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface LocationInfo {\n location: string;\n zoneInfo: string;\n}\n\n@customElement(\"sb-location-info\")\nexport class SbLocationInfo extends LitElement {\n @property({ type: Object }) locationInfo!: LocationInfo;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer\n ? CARD_EDIT_FORM_CONTAINER_CLASS + \" sb-mb-4\"\n : CARD_CONTAINER_CLASS\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [\n { label: \"Location\", value: this.locationInfo.location },\n { label: \"Zone Info\", value: this.locationInfo.zoneInfo },\n ];\n\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content.icon : locationIcon()}\n <span>\n ${this.content?.title ? this.content.title : \"Location\"}\n </span>\n </rtg-card-title>\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-m-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center sb-gap-2\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { urlIcon, editIcon } from \"@/assets/icons\";\nimport {\n ICustomizations,\n IProfileWidgetCustomization,\n USER_PROFILE_WIDGETS_LAYOUT,\n} from \"@/types\";\nimport {\n applyCustomizations,\n cn,\n mapBtnToCustomizedStyle,\n mapStyles,\n} from \"@/utils\";\nimport {\n CARD_CONTAINER_CLASS,\n CARD_DEFAULT_BUTTON,\n CARD_EDIT_BUTTON,\n CARD_EDIT_FORM_CONTAINER_CLASS,\n CARD_EDITABLE_INPUT_CLASS,\n CARD_HEADER_CONTAINER_CLASS,\n CARD_HEADER_TITLE_CLASS,\n CARD_INPUT_FIELD_CLASS,\n CARD_INPUT_LABEL_CLASS,\n CARD_OUTLINE_BUTTON,\n} from \"./classes\";\nimport { ELEMENT_IDS } from \"@/constants\";\n\nexport interface URLsInfo {\n website: string;\n}\n\n@customElement(\"sb-urls-info\")\nexport class SbUrlsInfo extends LitElement {\n @property({ type: Object }) URLsInfo!: URLsInfo;\n @property({ type: Boolean }) showIcons: boolean = true;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n @property({ type: String }) layout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Object })\n content: IProfileWidgetCustomization | null = null;\n\n @state() private isEditing: boolean = false;\n\n private handleEdit() {\n this.isEditing = true;\n }\n\n private handleCancel() {\n this.isEditing = false;\n }\n\n private handleSave() {\n this.isEditing = false;\n }\n\n createRenderRoot() {\n return this; // Light DOM\n }\n\n private getButtonStyles() {\n const defaultBtn = mapBtnToCustomizedStyle(\"default\", this.customizations!);\n const outlineBtn = mapBtnToCustomizedStyle(\"outline\", this.customizations!);\n const ghostBtn = mapBtnToCustomizedStyle(\"ghost\", this.customizations!);\n\n const defaultMapped = applyCustomizations(\n CARD_DEFAULT_BUTTON,\n {},\n defaultBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const outlineMapped = applyCustomizations(\n CARD_OUTLINE_BUTTON,\n {},\n outlineBtn,\n ELEMENT_IDS.USER_PROFILE_DEFAULT_BUTTON,\n this.customizations!\n );\n const ghostMapped = applyCustomizations(\n CARD_EDIT_BUTTON,\n {},\n ghostBtn,\n ELEMENT_IDS.USER_PROFILE_EDIT_BUTTON,\n this.customizations!\n );\n return { defaultMapped, outlineMapped, ghostMapped };\n }\n\n private getInputStyles(isEditable = false) {\n const baseClass = isEditable\n ? CARD_EDITABLE_INPUT_CLASS\n : cn(CARD_INPUT_FIELD_CLASS);\n return applyCustomizations(\n baseClass,\n {},\n this.customizations?.byType?.inputs?.inputField,\n isEditable\n ? ELEMENT_IDS.USER_PROFILE_EDITABLE_INPUT_FIELD\n : ELEMENT_IDS.USER_PROFILE_INPUT_FIELD,\n this.customizations!\n );\n }\n\n private getLabelStyles() {\n return applyCustomizations(\n cn(\n CARD_INPUT_LABEL_CLASS,\n this.layout !== USER_PROFILE_WIDGETS_LAYOUT.ROW ? \"sb-basis-auto\" : \"\"\n ),\n {},\n this.customizations?.byType?.labels?.inputLabel,\n ELEMENT_IDS.USER_PROFILE_INPUT_LABEL,\n this.customizations!\n );\n }\n\n private getContainerStyles(isEditContainer: boolean) {\n return applyCustomizations(\n cn(\n isEditContainer ? CARD_EDIT_FORM_CONTAINER_CLASS : CARD_CONTAINER_CLASS,\n \"!sb-mb-0\"\n ),\n {},\n isEditContainer\n ? this.customizations?.byType?.userProfile?.userProfileCard?.editForm\n : this.customizations?.byType?.userProfile?.userProfileCard?.container,\n isEditContainer\n ? ELEMENT_IDS.USER_PROFILE_EDIT_FORM\n : ELEMENT_IDS.USER_PROFILE_CARD_CONTAINER,\n this.customizations!\n );\n }\n\n private renderInput(value: string): TemplateResult {\n const input = this.getInputStyles(this.isEditing);\n return html`\n <rtg-input\n customClass=\"${input.class}\"\n customStyle=\"${mapStyles(input.style)}\"\n ?disabled=${!this.isEditing}\n .value=${value}\n ></rtg-input>\n `;\n }\n\n private renderFooter(\n defaultMapped: ReturnType<typeof this.getButtonStyles>[\"defaultMapped\"],\n outlineMapped: ReturnType<typeof this.getButtonStyles>[\"outlineMapped\"]\n ): TemplateResult {\n return html`\n <rtg-card-footer\n customClass=\"sb-flex sb-flex-col md:sb-flex-row-reverse sb-gap-2 sb-m-4\"\n >\n <rtg-button\n variant=\"default\"\n customClass=${defaultMapped.class}\n customStyle=${mapStyles(defaultMapped.style)}\n @click=${this.handleSave}\n >\n Save\n </rtg-button>\n\n <rtg-button\n variant=\"outline\"\n customClass=${outlineMapped.class}\n customStyle=${mapStyles(outlineMapped.style)}\n @click=${this.handleCancel}\n >\n Cancel\n </rtg-button>\n </rtg-card-footer>\n `;\n }\n\n render() {\n const fields = [{ label: \"Website\", value: this.URLsInfo.website }];\n\n // ===== Customizations =====\n // Containers\n const container = this.getContainerStyles(false);\n const editContainer = this.getContainerStyles(true);\n\n // Buttons\n const { defaultMapped, outlineMapped, ghostMapped } =\n this.getButtonStyles();\n\n // Header\n const headerContainer = applyCustomizations(\n CARD_HEADER_CONTAINER_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header\n ?.container,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n const headerTitle = applyCustomizations(\n CARD_HEADER_TITLE_CLASS,\n {},\n this.customizations?.byType?.userProfile?.userProfileCard?.header?.title,\n ELEMENT_IDS.USER_PROFILE_CARD_HEADER_CONTAINER,\n this.customizations!\n );\n\n // Labels\n const label = this.getLabelStyles();\n\n // ===== Render =====\n const activeContainer = this.isEditing ? editContainer : container;\n\n return html`\n <rtg-card\n customClass=${activeContainer.class}\n customStyle=${mapStyles(activeContainer.style)}\n >\n <!-- Header -->\n <rtg-card-header\n customClass=${headerContainer.class}\n customStyle=${mapStyles(headerContainer.style)}\n >\n <rtg-card-title\n customClass=${headerTitle.class}\n customStyle=${mapStyles(headerTitle.style)}\n >\n ${this.content?.icon ? this.content.icon : urlIcon()}\n <span>${this.content?.title ?? \"URLs\"}</span>\n </rtg-card-title>\n\n ${!this.isEditing\n ? html`\n <rtg-button\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Edit\"\n @click=${this.handleEdit}\n customClass=${ghostMapped.class}\n customStyle=${mapStyles(ghostMapped.style)}\n >\n ${editIcon()}\n </rtg-button>\n `\n : null}\n </rtg-card-header>\n\n <!-- Content -->\n <rtg-card-content>\n <div class=\"sb-flex sb-flex-col sb-gap-3 sb-p-4\">\n ${fields.map(\n (item) => html`\n <div\n class=\"sb-flex ${this.layout ===\n USER_PROFILE_WIDGETS_LAYOUT.ROW\n ? \"sb-flex-row sb-items-center\"\n : \"sb-flex-col sb-gap-1\"}\"\n >\n <div class=${label.class} style=${mapStyles(label.style)}>\n ${item.label}\n </div>\n <div class=\"sb-flex-1 sb-min-w-0 sb-mr-4\">\n ${this.renderInput(item.value)}\n </div>\n </div>\n `\n )}\n </div>\n </rtg-card-content>\n\n ${this.isEditing ? html`<rtg-separator></rtg-separator>` : null}\n\n <!-- Footer -->\n ${this.isEditing\n ? this.renderFooter(defaultMapped, outlineMapped)\n : null}\n </rtg-card>\n `;\n }\n}\n","// user-profile-tab-content.ts\nimport { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { Account } from \"./account-info\";\nimport { PersonalInfo } from \"./personal-info\";\nimport { LocationInfo } from \"./location-info\";\nimport { URLsInfo } from \"./urls-info\";\nimport \"./personal-info\";\nimport \"./location-info\";\nimport \"./urls-info\";\nimport \"./account-info\";\nimport {\n USER_PROFILE_WIDGETS_LAYOUT,\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n IProfileContentCustomizations,\n ICustomizations,\n} from \"@/types\";\n\n@customElement(\"sb-profile\")\nexport class Profile extends LitElement {\n @property({ type: Object }) account!: Account;\n @property({ type: Object }) personal!: PersonalInfo;\n @property({ type: Object }) location!: LocationInfo;\n @property({ type: Object }) urls!: URLsInfo;\n @property({ type: Boolean }) showAvatarMenu: boolean = false;\n @property({ type: Object })\n customizations: ICustomizations | null = null;\n @property({ type: Boolean }) showIcons: boolean = true;\n\n @property({ attribute: false }) modalIcon?: TemplateResult;\n\n @property({ type: String }) orientation: USER_PROFILE_ORIENTATION =\n USER_PROFILE_ORIENTATION.HORIZONTAL;\n @property({ type: String })\n sidebarDisplayType: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n @property({ type: String }) mode: USER_PROFILE_MODE = USER_PROFILE_MODE?.PAGE;\n\n @property({ type: String }) widgetsLayout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n\n @property({ type: Function }) toggleAvatarMenu!: (e: Event) => void;\n @property({ type: Function }) onAvatarChange!: () => void;\n @property({ type: Function }) onAvatarRemove!: () => void;\n @property({ type: Object }) content: IProfileContentCustomizations | null =\n null;\n createRenderRoot() {\n return this;\n }\n\n render() {\n const containerClasses =\n \"sb-flex sb-items-center sb-justify-between sb-mb-4\";\n const titleClasses = \"sb-font-medium sb-text-[18px] sb-text-foreground\";\n\n return html`\n ${this.orientation === USER_PROFILE_ORIENTATION.VERTICAL ||\n this.sidebarDisplayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? null\n : html`\n <div class=${containerClasses}>\n <div class=${titleClasses}>Profile</div>\n </div>\n `}\n\n <sb-account-info\n .customizations=${this.customizations}\n .content=${this.content?.account!}\n .account=${this.account}\n .layout=${this.widgetsLayout}\n .showAvatarMenu=${this.showAvatarMenu}\n .toggleAvatarMenu=${this.toggleAvatarMenu}\n ></sb-account-info>\n\n <sb-personal-info\n .customizations=${this.customizations}\n .content=${this.content?.personalInfo!}\n .personal=${this.personal}\n .layout=${this.widgetsLayout}\n ></sb-personal-info>\n <sb-location-info\n .customizations=${this.customizations}\n .content=${this.content?.locations!}\n .locationInfo=${this.location}\n .layout=${this.widgetsLayout}\n ></sb-location-info>\n <sb-urls-info\n .customizations=${this.customizations}\n .content=${this.content?.urls!}\n .URLsInfo=${this.urls}\n .layout=${this.widgetsLayout}\n ></sb-urls-info>\n `;\n }\n}\n","export const BASE_CLASSES = \"!sb-bg-background\";\nexport const SIDEBAR_CONTAINER_CLASSES = {\n vertical: \"sb-justify-between sb-w-full\",\n horizontal: \"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6\",\n};\nexport const BURGER_BUTTON_CLASSES =\n \"sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background\";\nexport const BURGER_LABEL_CLASSES =\n \"sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground\";\nexport const MOBILE_DRAWER_CLASSES =\n \"mobile-sidebar-drawer sb-fixed sb-top-0 sb-left-0 sb-h-full sb-max-w-xs sb-bg-background sb-shadow-lg sb-z-[9999] sb-transform sb-transition-all sb-duration-300 sb-ease-in-out\";\nexport const MOBILE_OVERLAY_CLASSES =\n \"mobile-sidebar-overlay sb-fixed sb-inset-0 sb-bg-black/50 sb-z-[9998] sb-transition-opacity sb-duration-300 sb-ease-in-out\";\n","import { LitElement, html, TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { burgerMenuIcon } from \"@/assets/icons\";\nimport {\n horizontalTabClass,\n verticalTabClass,\n tabTriggerClass,\n ELEMENT_IDS,\n} from \"@/constants\";\nimport {\n ICustomizations,\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n USER_PROFILE_TAB_LIST,\n} from \"@/types\";\n\nimport {\n BASE_CLASSES,\n BURGER_BUTTON_CLASSES,\n BURGER_LABEL_CLASSES,\n MOBILE_DRAWER_CLASSES,\n MOBILE_OVERLAY_CLASSES,\n SIDEBAR_CONTAINER_CLASSES,\n} from \"./classes\";\nimport { applyCustomizations, cn, mapStyles } from \"@/utils\";\n\nexport interface SidebarConfig {\n showIcons: boolean;\n modalIcon?: TemplateResult;\n}\n\nconst DEFAULT_TABS = [\n { label: \"Profile\", value: USER_PROFILE_TAB_LIST.PROFILE },\n { label: \"Security\", value: USER_PROFILE_TAB_LIST.SECURITY },\n];\n\n@customElement(\"sb-profile-sidebar\")\nexport class SbProfileSidebar extends LitElement {\n @property({ type: String })\n orientation: USER_PROFILE_ORIENTATION = USER_PROFILE_ORIENTATION.HORIZONTAL;\n\n @property({ type: String })\n displayType: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n\n @property({ type: String })\n mode: USER_PROFILE_MODE = USER_PROFILE_MODE.PAGE;\n\n @property({ type: Object })\n config: SidebarConfig = { showIcons: true };\n\n @property({ type: Object })\n customizations: ICustomizations | null = null;\n\n @state()\n private isMenuOpen = false;\n\n createRenderRoot() {\n return this;\n }\n\n private toggleMenu() {\n const parentTabDiv = this.closest('div[role=\"tab\"]');\n if (parentTabDiv) {\n parentTabDiv.classList.toggle(\"sb-rotate-0\");\n }\n this.isMenuOpen = !this.isMenuOpen;\n this.requestUpdate();\n }\n\n private handleCloseProfile(e: Event) {\n e.stopPropagation();\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", { bubbles: true, composed: true })\n );\n }\n\n private renderTabs(\n tabs = DEFAULT_TABS,\n isVertical = false,\n onClick?: () => void\n ) {\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebarTabs,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR_TABS,\n this.customizations!\n );\n return html`\n <rtg-tab-list\n orientation=${isVertical ? \"vertical\" : \"horizontal\"}\n class=\"sb-flex sb-w-full ${isVertical ? \"\" : \"sb-mb-4\"}\"\n customStyle=\"${mapStyles(finalStyle)}\"\n customClass=\"${cn(\n BASE_CLASSES,\n isVertical ? verticalTabClass : horizontalTabClass,\n finalClass\n )}\"\n >\n ${tabs.map(\n (tab) => html`\n <div class=${isVertical ? \"sb-mb-2\" : \"\"}>\n <rtg-tab-trigger\n customClass=\"${tabTriggerClass}\"\n value=${tab.value}\n @tab-trigger-click=${onClick}\n >\n ${tab.label}\n </rtg-tab-trigger>\n </div>\n `\n )}\n </rtg-tab-list>\n `;\n }\n\n private renderWatermark() {\n return html`<sb-watermark child-id=\"sb-watermark\"></sb-watermark>`;\n }\n\n private renderBurger() {\n return html`\n <div class=\"sb-flex sb-items-center\">\n <div class=\"${BURGER_BUTTON_CLASSES}\" @click=${this.toggleMenu}>\n ${burgerMenuIcon()}\n </div>\n <div class=\"${BURGER_LABEL_CLASSES}\">Profile</div>\n </div>\n `;\n }\n\n private renderMobileDrawer() {\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebarBurgerMenu,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR_BURGER_MENU,\n this.customizations!\n );\n return html`\n <div\n style=\"${mapStyles(finalStyle)}\"\n class=\"${cn(\n MOBILE_DRAWER_CLASSES,\n this.isMenuOpen\n ? \"sb-translate-x-0 sb-opacity-100\"\n : \"sb-translate-x-[-100%] sb-opacity-0\",\n finalClass\n )}\"\n >\n <div\n class=\"sb-flex sb-flex-col sb-justify-between sb-h-[100%] sb-p-4 sb-w-min\"\n >\n <div class=\"sb-flex sb-flex-col sb-gap-2 sb-w-min\">\n ${this.renderTabs(DEFAULT_TABS, true, this.toggleMenu.bind(this))}\n </div>\n ${this.renderWatermark()}\n </div>\n </div>\n <div\n class=\"${MOBILE_OVERLAY_CLASSES} ${this.isMenuOpen\n ? \"sb-block sb-opacity-100\"\n : \"sb-hidden sb-opacity-0\"}\"\n @click=${this.toggleMenu}\n ></div>\n `;\n }\n\n render() {\n const isVertical = this.orientation === USER_PROFILE_ORIENTATION.VERTICAL;\n const isHorizontal =\n this.orientation === USER_PROFILE_ORIENTATION.HORIZONTAL;\n\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n \"\",\n {},\n this.customizations?.byType?.userProfile?.sidebar,\n ELEMENT_IDS.USER_PROFILE_SIDEBAR,\n this.customizations!\n );\n return html`\n <div\n style=\"${mapStyles(finalStyle)}\"\n class=\"${cn(\n \"sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]\",\n isVertical\n ? SIDEBAR_CONTAINER_CLASSES.vertical\n : SIDEBAR_CONTAINER_CLASSES.horizontal,\n finalClass\n )}\"\n >\n ${this.displayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? this.renderBurger()\n : null}\n ${isVertical ? this.renderTabs() : null}\n ${isHorizontal &&\n this.displayType !== USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? html`\n <div class=\"sb-flex sb-flex-col sb-justify-between sb-flex-1\">\n ${this.renderTabs(DEFAULT_TABS, true)} ${this.renderWatermark()}\n </div>\n `\n : null}\n </div>\n ${this.displayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER\n ? this.renderMobileDrawer()\n : null}\n `;\n }\n}\n","import { LitElement, html, nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { consume } from \"@lit/context\";\nimport { customizationsContext } from \"@/context\";\nimport {\n USER_PROFILE_MODE,\n USER_PROFILE_ORIENTATION,\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE,\n USER_PROFILE_TAB_VALUES,\n USER_PROFILE_WIDGETS_LAYOUT,\n ICustomizations,\n IProfileContentCustomizations,\n} from \"@/types\";\nimport {\n dashboardClass,\n pageClasses,\n modalClasses,\n modalWidthClass,\n dashboardWidthClass,\n modalContainerClass,\n modalLayoutClass,\n ELEMENT_IDS,\n} from \"@/constants\";\nimport { cn, applyCustomizations, deepMerge, mapStyles } from \"@/utils\";\nimport { closeIcon } from \"@/assets/icons\";\n\nimport \"./profile\";\nimport \"./sidebar/sidebar\";\nimport \"./profile/profile\";\nimport { Account } from \"./profile/account-info\";\nimport { PersonalInfo } from \"./profile/personal-info\";\nimport { LocationInfo } from \"./profile/location-info\";\nimport { URLsInfo } from \"./profile/urls-info\";\n\nconst BREAKPOINTS = {\n xs: 640,\n sm: 768,\n md: Infinity,\n} as const;\n\nexport class SbUserProfile extends LitElement {\n // === Public Properties ===\n @property({ type: Boolean }) showAvatarMenu = false;\n @property({ type: String }) orientation: USER_PROFILE_ORIENTATION =\n USER_PROFILE_ORIENTATION.HORIZONTAL;\n @property({ type: String }) mobileDisplay: USER_PROFILE_SIDEBAR_DISPLAY_TYPE =\n USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n @property({ type: String }) mode: USER_PROFILE_MODE = USER_PROFILE_MODE.PAGE;\n @property({ type: String }) widgetsLayout: USER_PROFILE_WIDGETS_LAYOUT =\n USER_PROFILE_WIDGETS_LAYOUT.ROW;\n @property({ type: Object }) content: IProfileContentCustomizations | null =\n null;\n @property({ type: Object }) customizations: ICustomizations | null = null;\n\n // === Context ===\n @consume({ context: customizationsContext, subscribe: true })\n providedCustomizations: ICustomizations | null = null;\n\n // === Internal State ===\n @state() private isOpen = true;\n @state() private currentBreakpoint: keyof typeof BREAKPOINTS = \"md\";\n\n // === Default Profile Data ===\n private account: Account = {\n email: \"J.Doe@gmail.com\",\n phone: \"+989390717800\",\n avatar: \"https://github.com/shadcn.png\",\n };\n\n private personal: PersonalInfo = {\n username: \"@JaneeDoe\",\n first: \"Jane\",\n middle: \"Michelle\",\n last: \"Doe\",\n nickname: \"Janee\",\n gender: \"Female\",\n bio: \"-\",\n };\n\n private location: LocationInfo = {\n location: \"Iran, Tehran\",\n zoneInfo: \"GMT+3:30\",\n };\n private urls: URLsInfo = { website: \"www.janeedoe.com\" };\n\n private defaultTab = \"Profile\";\n\n // === Lifecycle ===\n connectedCallback() {\n super.connectedCallback();\n this._updateBreakpoint();\n window.addEventListener(\"resize\", this._handleResize);\n document.addEventListener(\"remove-avatar\", this._handleAvatarRemove);\n document.addEventListener(\"click\", this._handleClickOutside);\n this.addEventListener(\"close-user-profile\", this._handleClose);\n this.addEventListener(\"change-avatar\", this._handleAvatarChange);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"resize\", this._handleResize);\n document.removeEventListener(\"remove-avatar\", this._handleAvatarRemove);\n document.removeEventListener(\"click\", this._handleClickOutside);\n this.removeEventListener(\"close-user-profile\", this._handleClose);\n this.removeEventListener(\"change-avatar\", this._handleAvatarChange);\n }\n\n protected firstUpdated() {\n this.style.width = \"100%\";\n }\n\n // === Event Handlers ===\n private _handleResize = () => {\n this._updateBreakpoint();\n };\n\n private _updateBreakpoint() {\n const width = window.innerWidth;\n this.currentBreakpoint =\n width < BREAKPOINTS.xs ? \"xs\" : width < BREAKPOINTS.sm ? \"sm\" : \"md\";\n }\n\n private _handleClose = () => {\n if (this.mode === USER_PROFILE_MODE.MODAL) {\n this.isOpen = false;\n }\n };\n\n private _toggleAvatarMenu = (e: Event) => {\n e.stopPropagation();\n this.showAvatarMenu = !this.showAvatarMenu;\n };\n\n private _handleAvatarChange = () => {\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = \"image/*\";\n\n input.onchange = (e: Event) => {\n const file = (e.target as HTMLInputElement).files?.[0];\n if (!file) return;\n\n const reader = new FileReader();\n reader.onload = () => {\n this.account.avatar = reader.result as string;\n this.requestUpdate();\n };\n reader.readAsDataURL(file);\n };\n\n input.click();\n };\n\n private _handleAvatarRemove = () => {\n this.account.avatar = \"https://via.placeholder.com/80\";\n this.showAvatarMenu = false;\n };\n\n private _handleClickOutside = (e: MouseEvent) => {\n if (!this.showAvatarMenu) return;\n\n const target = e.target as HTMLElement;\n const avatarContainer = this.querySelector(\"sb-account-info\");\n const avatarMenu = this.querySelector(\"rtg-card\");\n\n if (avatarContainer?.contains(target) || avatarMenu?.contains(target))\n return;\n\n this.showAvatarMenu = false;\n };\n\n // === Computed Helpers ===\n private get effectiveCustomizations(): ICustomizations {\n return deepMerge(\n this.providedCustomizations ?? {},\n this.customizations ?? {}\n );\n }\n\n private get isModal() {\n return this.mode === USER_PROFILE_MODE.MODAL;\n }\n\n private get sidebarDisplayType(): USER_PROFILE_SIDEBAR_DISPLAY_TYPE {\n if (this.orientation === USER_PROFILE_ORIENTATION.VERTICAL) {\n return USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR;\n }\n return this.currentBreakpoint === \"md\"\n ? USER_PROFILE_SIDEBAR_DISPLAY_TYPE.REGULAR\n : USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER;\n }\n\n private get containerClasses() {\n return cn(\n dashboardClass,\n this.isModal ? modalClasses : pageClasses,\n this.isModal ? modalWidthClass : dashboardWidthClass,\n this.sidebarDisplayType === USER_PROFILE_SIDEBAR_DISPLAY_TYPE.BURGER ||\n this.orientation === USER_PROFILE_ORIENTATION.VERTICAL\n ? \"!sb-flex-col\"\n : \"!sb-flex-row\"\n );\n }\n\n private get contentClasses() {\n return cn(\n \"sb-flex-grow\",\n this.isModal\n ? \"sb-max-h-[864px] sb-mx-4 sb-px-2 md:sb-mx-0 md:sb-px-6 md:sb-pl-0 sb-overflow-auto\"\n : \"md:sb-max-h-[100%]\",\n this.orientation === USER_PROFILE_ORIENTATION.VERTICAL\n ? \"md:sb-pl-6 sb-mb-16\"\n : \"\"\n );\n }\n\n // === Render Helpers ===\n private renderCloseButton() {\n if (!this.isModal) return nothing;\n\n return html`\n <button\n class=\"sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10\"\n @click=${() =>\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", {\n bubbles: true,\n composed: true,\n })\n )}\n >\n ${closeIcon()}\n </button>\n `;\n }\n\n private renderWatermark() {\n if (this.orientation !== USER_PROFILE_ORIENTATION.VERTICAL) return nothing;\n\n return html`\n <div\n class=\"sb-fixed sb-bottom-0 sb-w-[-webkit-fill-available] sb-py-4 sb-bg-background\"\n >\n <sb-watermark child-id=\"sb-watermark\"></sb-watermark>\n </div>\n `;\n }\n\n private renderProfileContent() {\n const cz = this.effectiveCustomizations;\n const { class: finalClass, style: finalStyle } = applyCustomizations(\n this.containerClasses,\n {},\n cz?.byType?.userProfile?.container,\n ELEMENT_IDS.USER_PROFILE_CONTAINER,\n cz,\n true\n );\n\n return html`\n <rtg-tab\n customStyle=${mapStyles(finalStyle)}\n customClass=${finalClass}\n defaultValue=${this.defaultTab}\n orientation=${this.orientation.toLowerCase() as\n | \"horizontal\"\n | \"vertical\"}\n >\n ${this.renderCloseButton()}\n\n <sb-profile-sidebar\n .orientation=${this.orientation}\n .mode=${this.mode}\n .mobileDisplay=${this.mobileDisplay}\n .displayType=${this.sidebarDisplayType}\n .customizations=${cz}\n ></sb-profile-sidebar>\n\n <div class=${this.contentClasses}>\n <div class=\"sb-relative sb-[transform:translateZ(0)]\">\n <rtg-tab-content value=${USER_PROFILE_TAB_VALUES.PROFILE}>\n <sb-profile\n .customizations=${cz}\n .content=${this.content}\n .account=${this.account}\n .personal=${this.personal}\n .location=${this.location}\n .urls=${this.urls}\n .orientation=${this.orientation}\n .sidebarDisplayType=${this.sidebarDisplayType}\n .mode=${this.mode}\n .widgetsLayout=${this.widgetsLayout}\n .showAvatarMenu=${this.showAvatarMenu}\n .toggleAvatarMenu=${this._toggleAvatarMenu}\n ></sb-profile>\n </rtg-tab-content>\n </div>\n </div>\n\n ${this.renderWatermark()}\n </rtg-tab>\n `;\n }\n\n // === Main Render ===\n render() {\n if (!this.isOpen) return nothing;\n\n if (this.isModal) {\n return html`\n <div\n class=\"sb-fixed sb-inset-0 sb-z-[9998] sb-bg-black/50 sb-backdrop-blur-sm\"\n @click=${() =>\n this.dispatchEvent(\n new CustomEvent(\"close-user-profile\", {\n bubbles: true,\n composed: true,\n })\n )}\n ></div>\n\n <div class=${modalContainerClass}>\n <div class=${modalLayoutClass}>${this.renderProfileContent()}</div>\n </div>\n `;\n }\n\n return this.renderProfileContent();\n }\n\n // Use shadow DOM? No — matches original behavior\n createRenderRoot() {\n return this;\n }\n}\n\ncustomElements.define(\"sb-user-profile\", SbUserProfile);\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-preview\")\nexport class PreviewComponent extends LitElement {\n @property({ type: Boolean }) loading = false;\n @property({ type: Object }) renderSpec: TemplateResult | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this; // use light DOM so shadcn/Tailwind styles apply\n }\n\n render() {\n return html`\n ${this.loading\n ? html`<div class=\"sb-p-8 sb-text-center\">Loading...</div>`\n : html`\n <sb-provider>\n <signed-out>\n <sb-layout .renderSpec=${this.renderSpec}> </sb-layout>\n </signed-out>\n </sb-provider>\n `}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-preview\": PreviewComponent;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { ICustomizations, RenderSpec } from \"@/types\";\nimport { applyCustomizations, deepMerge } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { consume } from \"@lit/context\";\nimport { customizationsContext, renderSpecContext } from \"@/context\";\n\n@customElement(\"sb-signin\")\nexport class SbSignIn extends LitElement {\n @consume({ context: renderSpecContext, subscribe: true })\n renderSpec: string | null = null; // Direct prop override (optional)\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n // Internal guards to avoid duplicate/parallel flow starts\n private __flowStarted = false;\n private __flowInitAttempted = false;\n\n private async waitForAuthConfigured(timeoutMs = 5000) {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n if (!auth) return;\n if ((auth as any).__configured) return;\n const when = (auth as any).__whenConfigured as Promise<void> | undefined;\n if (!when) return;\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, timeoutMs)),\n ]);\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n\n // Prevent duplicate attempts\n if (this.__flowInitAttempted) return;\n this.__flowInitAttempted = true;\n\n // Wait a short time for Auth.configure if available (avoids noisy errors)\n await this.waitForAuthConfigured();\n\n if (this.__flowStarted) return;\n this.__flowStarted = true;\n\n try {\n // Initialize login flow through Auth (sign-in)\n const resp = await Auth.startLoginflow(\"signin-flow-passkey\");\n\n console.log(\n resp.isResumed ? \"Resumed login flow\" : \"Started new login flow\",\n );\n } catch (err: any) {\n console.error(\"Sign-in flow init failed:\", err);\n\n // If it failed due to missing config, mark and attempt a single retry\n if (\n err &&\n typeof err.message === \"string\" &&\n err.message.includes(\"Auth.configure() must be called\")\n ) {\n (this as any).__saasbaseFailedForConfig = true;\n try {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n const when = auth?.__whenConfigured as Promise<void> | undefined;\n if (when) {\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, 10000)),\n ]);\n try {\n const resp = await Auth.startLoginflow(\"signin-flow-passkey\");\n console.log(\n resp.isResumed\n ? \"Resumed login flow\"\n : \"Started new login flow\",\n );\n } catch (e) {\n console.error(\"Sign-in retry failed:\", e);\n }\n }\n } catch (e) {\n /* ignore */\n }\n } else {\n // For other errors like aborts allow retry by user interaction\n this.__flowStarted = false;\n }\n }\n }\n\n // Explicit retry hook used by the loader\n __saasbaseRetryInit() {\n if (!this.__flowStarted) {\n this.__flowInitAttempted = false;\n // re-run init logic\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.connectedCallback();\n }\n }\n\n render() {\n if (!this.renderSpec) {\n return html`\n <linear-loader\n class=\"sb-fixed sb-w-full sb-top-0 sb-left-0\"\n ></linear-loader>\n `;\n }\n\n return html` <sb-layout .renderSpec=${this.renderSpec}></sb-layout> `;\n }\n}\n","import { LitElement, TemplateResult, html } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { renderSpecContext } from \"@/context\";\nimport { consume } from \"@lit/context\";\n\n@customElement(\"sb-signup\")\nexport class SbSignUp extends LitElement {\n @consume({ context: renderSpecContext, subscribe: true })\n renderSpec: string | null = null; // Direct prop override (optional)\n\n createRenderRoot() {\n return this; // stay in light DOM\n }\n\n // Internal guards to avoid duplicate/parallel flow starts\n private __flowStarted = false;\n private __flowInitAttempted = false;\n\n private async waitForAuthConfigured(timeoutMs = 5000) {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n if (!auth) return;\n if ((auth as any).__configured) return;\n const when = (auth as any).__whenConfigured as Promise<void> | undefined;\n if (!when) return;\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, timeoutMs)),\n ]);\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n\n if (this.__flowInitAttempted) return;\n this.__flowInitAttempted = true;\n\n await this.waitForAuthConfigured();\n\n if (this.__flowStarted) return;\n this.__flowStarted = true;\n\n try {\n // Initialize signup flow through Auth (sign-up)\n const resp = await Auth.startLoginflow(\"signup-flow\");\n\n console.log(\n resp.isResumed ? \"Resumed signup flow\" : \"Started new signup flow\",\n );\n } catch (err: any) {\n console.error(\"Sign-up flow init failed:\", err);\n\n if (\n err &&\n typeof err.message === \"string\" &&\n err.message.includes(\"Auth.configure() must be called\")\n ) {\n (this as any).__saasbaseFailedForConfig = true;\n try {\n const auth = (Auth as any) ?? (window as any).__saasbaseCoreSdk?.Auth;\n const when = auth?.__whenConfigured as Promise<void> | undefined;\n if (when) {\n await Promise.race([\n when,\n new Promise((res) => setTimeout(res, 10000)),\n ]);\n try {\n const resp = await Auth.startLoginflow(\"signup-flow\");\n console.log(\n resp.isResumed\n ? \"Resumed signup flow\"\n : \"Started new signup flow\",\n );\n } catch (e) {\n console.error(\"Sign-up retry failed:\", e);\n }\n }\n } catch (e) {\n /* ignore */\n }\n } else {\n this.__flowStarted = false;\n }\n }\n }\n\n // explicit retry hook used by the loader\n __saasbaseRetryInit() {\n if (!this.__flowStarted) {\n this.__flowInitAttempted = false;\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.connectedCallback();\n }\n }\n\n render() {\n if (!this.renderSpec) {\n return html`\n <linear-loader\n class=\"sb-fixed sb-w-full sb-top-0 sb-left-0\"\n ></linear-loader>\n `;\n }\n\n return html` <sb-layout .renderSpec=${this.renderSpec}></sb-layout> `;\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n// TODO: deprecated\n// Use `rtg-field-description` in place of `sb-hint`\n\n@customElement(\"sb-hint\")\nexport class SbHint extends LitElement {\n // Use light DOM\n createRenderRoot() {\n return this;\n }\n\n @property({ type: String }) content = \"\";\n\n render() {\n return html`<p class=\"sb-mt-2\">${this.content}</p>`;\n }\n}\n","import { linearLoaderClass } from \"@/constants\";\nimport { cn, mapStyles } from \"@/utils\";\nimport { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"linear-loader\")\nexport class LinearLoader extends LitElement {\n @property({ type: String }) customClass: string = \"\";\n @property({ type: Object }) customStyle = {};\n\n createRenderRoot() {\n return this;\n }\n\n render() {\n return html`\n <div\n class=${cn(linearLoaderClass, this.customClass)}\n style=${mapStyles(this.customStyle)}\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"linear-loader\": LinearLoader;\n }\n}\n","import { LitElement, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-spinner\")\nexport class SbSpinner extends LitElement {\n createRenderRoot() {\n return this; // light DOM\n }\n\n /** Diameter in px */\n @property({ type: Number }) size = 16;\n\n /** Stroke thickness */\n @property({ type: Number, attribute: \"stroke-width\" }) strokeWidth = 2;\n\n /** Color (defaults to currentColor) */\n @property() color: string = \"currentColor\";\n\n /** Accessible label */\n @property() label: string = \"Loading…\";\n\n @property({ type: Number }) duration = 1;\n\n render() {\n const radius = Math.max(0, (this.size - this.strokeWidth) / 2);\n const circumference = 2 * Math.PI * radius;\n const normalizedRadius = radius - this.strokeWidth / 2;\n\n return html`\n <style>\n .chrome-spinner {\n width: ${this.size}px;\n height: ${this.size}px;\n display: inline-block;\n animation: chrome-spinner-rotate ${this.duration}s linear infinite;\n }\n\n .chrome-spinner-circle {\n stroke: ${this.color};\n stroke-width: ${this.strokeWidth};\n stroke-linecap: round;\n fill: none;\n transform-origin: 50% 50%;\n stroke-dasharray: ${circumference};\n stroke-dashoffset: 0;\n animation: chrome-spinner-dash ${this.duration}s linear infinite;\n }\n\n @keyframes chrome-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes chrome-spinner-dash {\n 0% {\n stroke-dashoffset: ${circumference};\n transform: rotate(0deg);\n }\n 50% {\n stroke-dashoffset: ${circumference * 0.2};\n transform: rotate(180deg);\n }\n 100% {\n stroke-dashoffset: ${circumference};\n transform: rotate(360deg);\n }\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n overflow: hidden;\n white-space: nowrap;\n }\n </style>\n\n <svg\n class=\"chrome-spinner\"\n viewBox=\"0 0 ${this.size} ${this.size}\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <circle\n class=\"chrome-spinner-circle\"\n cx=\"${this.size / 2}\"\n cy=\"${this.size / 2}\"\n r=\"${normalizedRadius}\"\n ></circle>\n </svg>\n ${this.label ? html`<span class=\"sr-only\">${this.label}</span>` : null}\n `;\n }\n}\n","import { html, type TemplateResult } from \"lit\";\n\nimport type { ErrorIcon } from \"./error.types\";\n\nconst badgeAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"badge-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-badge-alert-icon lucide-badge-alert\"\n >\n <path\n d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\"\n />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n`;\n\nconst badgeXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"badge-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-badge-x-icon lucide-badge-x\"\n >\n <path\n d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\"\n />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </svg>\n`;\n\nconst circleAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"circle-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle-alert-icon lucide-circle-alert\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" />\n <line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n`;\n\nconst circleXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"circle-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle-x-icon lucide-circle-x\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m15 9-6 6\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n`;\n\nconst shieldAlertIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"shield-alert\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-shield-alert-icon lucide-shield-alert\"\n >\n <path\n d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n`;\n\nconst shieldXIcon = (id: string, part: string) => html`\n <svg\n id=\"${id}\"\n part=\"${part}\"\n data-icon=\"shield-x\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-shield-x-icon lucide-shield-x\"\n >\n <path\n d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"\n />\n <path d=\"m14.5 9.5-5 5\" />\n <path d=\"m9.5 9.5 5 5\" />\n </svg>\n`;\n\nexport const ERROR_ICONS: Record<\n ErrorIcon,\n (id: string, part: string) => TemplateResult<1>\n> = {\n \"badge-alert\": badgeAlertIcon,\n \"badge-x\": badgeXIcon,\n \"circle-alert\": circleAlertIcon,\n \"circle-x\": circleXIcon,\n \"shield-alert\": shieldAlertIcon,\n \"shield-x\": shieldXIcon,\n};\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { ERROR_ICONS } from \"./error.defs\";\nimport type {\n ErrorContent,\n ErrorIcon,\n ErrorProps,\n ErrorVariant,\n} from \"./error.types\";\n\n/**\n * A destructive alert used for displaying auth errors.\n * @element sb-error\n *\n * @part error (rtg-alert)\n * @part error-icon (svg)\n * @part error-title (rtg-alert-title)\n * @part error-description (rtg-alert-description)\n */\n@customElement(\"sb-error\")\nexport class SbError extends LitElement implements ErrorProps {\n private static readonly _ROOT = \"error\";\n private static readonly _ICON = \"icon\";\n private static readonly _TITLE = \"title\";\n private static readonly _DESCRIPTION = \"description\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const icon = `${root}-${this._ICON}`;\n const title = `${root}-${this._TITLE}`;\n const description = `${root}-${this._DESCRIPTION}`;\n\n return { root, icon, title, description };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the alert.\n */\n @property({ type: String })\n variant: ErrorVariant = \"default\";\n\n /**\n * The text content (title and/or description) of the error alert.\n */\n @property({ type: Object })\n content: ErrorContent = { description: \"Something went wrong.\" };\n\n /**\n * The Lucide icon rendered in the error alert.\n */\n @property({ type: String })\n icon?: ErrorIcon;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbError.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the icon part\n * name appended.\n */\n get iconId() {\n return `${this.rootId}-${SbError._ICON}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the title part\n * name appended.\n */\n get titleId() {\n return `${this.rootId}-${SbError._TITLE}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the description\n * part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbError._DESCRIPTION}`;\n }\n\n /**\n * Uses the `variant` prop to derive the `variant` prop passed to `rtg-alert`.\n * - `\"default\"` error = `\"destructive\"` alert\n * - `\"tonal\"` error = `\"destructive-tonal\"` alert\n */\n private get _variant() {\n let variant = \"destructive\";\n if (this.variant === \"tonal\") variant += \"-tonal\";\n\n return variant;\n }\n\n render() {\n const icon = this.icon ? ERROR_ICONS[this.icon] : null;\n const { title, description } = this.content;\n\n return html`\n <rtg-alert\n id=\"${this.rootId}\"\n part=\"${SbError.parts.root}\"\n variant=\"${this._variant}\"\n >\n ${icon ? icon(this.iconId, SbError.parts.icon) : nothing}\n ${title\n ? html`\n <rtg-alert-title\n id=\"${this.titleId}\"\n part=\"${SbError.parts.title}\"\n >\n ${title}\n </rtg-alert-title>\n `\n : nothing}\n ${description\n ? html`\n <rtg-alert-description\n id=\"${this.descriptionId}\"\n part=\"${SbError.parts.description}\"\n >\n ${description}\n </rtg-alert-description>\n `\n : nothing}\n </rtg-alert>\n `;\n }\n}\n","import type {\n Input as RtgInput,\n PasswordInput as RtgPasswordInput,\n} from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PasswordFieldContent,\n PasswordFieldProps,\n PasswordFieldRule,\n PasswordFieldRuleName,\n PasswordFieldValidateType,\n PasswordFieldValidation,\n PasswordFieldVariant,\n} from \"./field.types\";\n\n/**\n * A self-validating password field for auth widget forms.\n * @element sb-password-field\n *\n * @part password-field (rtg-field)\n * @part password-field-content (rtg-field-content): label + description wrapper\n * @part password-field-label (rtg-field-label)\n * @part password-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part password-field-description (rtg-field-description)\n * @part password-field-input (rtg-input/rtg-password-input)\n * @part password-field-error (rtg-field-error)\n *\n * @fires sb-password-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-password-field\")\nexport class SbPasswordField extends LitElement implements PasswordFieldProps {\n private static readonly _ROOT = \"password-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbPasswordField._ROOT}`;\n\n private static readonly _PATTERNS: Record<PasswordFieldRuleName, RegExp> = {\n uppercase: /[A-Z]/,\n lowercase: /[a-z]/,\n number: /[0-9]/,\n special: /[!@#$%^&*()_=+{}[\\]|\\\\;:\"<>,./?-]/,\n };\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"password\";\n\n /**\n * The variant of the password field input, where `\"toggle\"` renders a\n * hide/show button addon in the input element.\n */\n @property({ type: String })\n variant: PasswordFieldVariant = \"toggle\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: PasswordFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Password\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid password.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid password.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The format rules for the password, detailing the `name` or `pattern` for\n * each rule, as well as an optional `error` message pairing.\n */\n @property({ type: Array })\n rules: PasswordFieldRule[] = [\n { name: \"uppercase\", error: \"Must contain an uppercase letter.\" },\n { name: \"lowercase\", error: \"Must contain a lowercase letter.\" },\n { name: \"number\", error: \"Must contain a number.\" },\n { name: \"special\", error: \"Must contain a special character.\" },\n ];\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: PasswordFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Password is a required field.\";\n\n /**\n * Custom error message shown when the password is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the password is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Fallback error message shown when the field is invalid upon submission and\n * the unmet rules have not specified an error message.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid password.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The error message(s) rendered in field error when in an invalid state.\n */\n @state()\n private _errors: string[] = [];\n\n /**\n * The current value of the password input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPasswordField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbPasswordField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbPasswordField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbPasswordField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbPasswordField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbPasswordField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbPasswordField._ERROR}`;\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: PasswordFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbPasswordField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid password.\") {\n this._invalid = false;\n this._errors = [];\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: PasswordFieldValidateType,\n value: string,\n message: string = \"Invalid password.\",\n messages: string[] = [],\n ) {\n if (!messages.length) messages.push(message);\n\n this._invalid = true;\n this._errors = messages;\n this._dispatchValidate(false, type, value, messages.join(\" \"));\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._value;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Password must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Password must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n let valid = true;\n const messages: string[] = [];\n\n for (const rule of this.rules) {\n const pattern = rule.name\n ? SbPasswordField._PATTERNS[rule.name]\n : new RegExp(rule.pattern);\n\n if (!pattern.test(value)) {\n valid = false;\n if (rule.error) messages.push(rule.error);\n }\n }\n\n if (!valid) {\n this._handleValidateError(\n \"format\",\n value,\n messages.length ? undefined : this.formatError,\n messages,\n );\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbPasswordField.parts.input}\"] input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the password field's private props: `_value`, `_invalid`, and `_errors`.\n */\n private _handleFormReset = () => {\n const partSelector = `[part=\"${SbPasswordField.parts.input}\"]`;\n const selectors =\n this.variant === \"toggle\"\n ? `rtg-password-input${partSelector}`\n : `rtg-input${partSelector}`;\n\n const input = this.querySelector(selectors) as\n | RtgInput\n | RtgPasswordInput\n | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._errors = [];\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbPasswordField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbPasswordField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbPasswordField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_errors` messages if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n const errors = this._errors.map((error) => ({ message: error }));\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbPasswordField.parts.error}\"\n .errors=${errors}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbPasswordField.parts.root}\"\n data-variant=\"${this.variant}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbPasswordField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n ${this.variant === \"toggle\"\n ? html`\n <rtg-password-input\n id=\"${this.inputId}\"\n part=\"${SbPasswordField.parts.input}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-password-input>\n `\n : html`\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbPasswordField.parts.input}\"\n type=\"password\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n `}\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type {\n Input as RtgInput,\n PasswordInput as RtgPasswordInput,\n} from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { SbPasswordField } from \"./_password-field\";\nimport type {\n ConfirmFieldContent,\n ConfirmFieldProps,\n ConfirmFieldValidateType,\n ConfirmFieldValidation,\n ConfirmFieldVariant,\n} from \"./field.types\";\n\n/**\n * A self-validating confirm password field for auth widget forms.\n * @element sb-confirm-field\n *\n * @part confirm-field (rtg-field)\n * @part confirm-field-content (rtg-field-content): label + description wrapper\n * @part confirm-field-label (rtg-field-label)\n * @part confirm-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part confirm-field-description (rtg-field-description)\n * @part confirm-field-input (rtg-input/rtg-password-input)\n * @part confirm-field-error (rtg-field-error)\n *\n * @fires sb-confirm-field:validate\n * { id, parentId, name, value, pairSelector, pairValue, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-confirm-field\")\nexport class SbConfirmField extends LitElement implements ConfirmFieldProps {\n private static readonly _ROOT = \"confirm-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbConfirmField._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"confirm\";\n\n /**\n * The variant of the confirm field input, where `\"toggle\"` renders a\n * hide/show button addon in the input element.\n */\n @property({ type: String })\n variant: ConfirmFieldVariant = \"toggle\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: ConfirmFieldContent = \"split\";\n\n /**\n * A CSS selector for the paired `sb-password-field`.\n */\n @property({ type: String })\n pair = \"sb-password-field\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Confirm Password\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: ConfirmFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Confirm password is a required field.\";\n\n /**\n * Error message shown when the confirm value does not match the `pair`\n * password field's value.\n */\n @property({ attribute: \"match-error\", type: String })\n matchError = \"Passwords do not match.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The error message rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the confirm input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbConfirmField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbConfirmField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbConfirmField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbConfirmField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbConfirmField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbConfirmField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbConfirmField._ERROR}`;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Returns the paired password field's value or an empty string if the pair\n * cannot be found.\n */\n private _pairValue() {\n const scope = this._form ?? document;\n const selector = this.pair;\n\n const field = scope.querySelector(selector) as SbPasswordField | null;\n if (!field) return \"\";\n\n const input = field.querySelector(\n `[part=\"${SbPasswordField.parts.input}\"] input`,\n ) as HTMLInputElement | null;\n\n return input?.value ?? \"\";\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: ConfirmFieldValidateType,\n value: string,\n message: string,\n pairValue?: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n const pairSelector = this.pair;\n\n const validateEvent = new CustomEvent(SbConfirmField.validateEventName, {\n detail: {\n id,\n parentId,\n name,\n value,\n pairSelector,\n pairValue,\n valid,\n type,\n message,\n },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid confirm.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: ConfirmFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._value;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const pairValue = this._pairValue();\n\n if (value !== pairValue) {\n this._handleValidateError(\"match\", value, this.matchError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbConfirmField.parts.input}\"] input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the confirm field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const partSelector = `[part=\"${SbConfirmField.parts.input}\"]`;\n const selectors =\n this.variant === \"toggle\"\n ? `rtg-password-input${partSelector}`\n : `rtg-input${partSelector}`;\n\n const input = this.querySelector(selectors) as\n | RtgInput\n | RtgPasswordInput\n | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbConfirmField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbConfirmField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbConfirmField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbConfirmField.parts.error}\"\n .errors=\"${[{ message: this._error }]}\"\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbConfirmField.parts.root}\"\n data-variant=\"${this.variant}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbConfirmField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n ${this.variant === \"toggle\"\n ? html`\n <rtg-password-input\n id=\"${this.inputId}\"\n part=\"${SbConfirmField.parts.input}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-password-input>\n `\n : html`\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbConfirmField.parts.input}\"\n type=\"password\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n `}\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n EmailFieldContent,\n EmailFieldProps,\n EmailFieldValidateType,\n EmailFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating email field for auth widget forms.\n * @element sb-email-field\n *\n * @part email-field (rtg-field)\n * @part email-field-content (rtg-field-content): label + description wrapper\n * @part email-field-label (rtg-field-label)\n * @part email-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part email-field-description (rtg-field-description)\n * @part email-field-input (rtg-input)\n * @part email-field-error (rtg-field-error)\n *\n * @fires sb-email-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\"\n */\n@customElement(\"sb-email-field\")\nexport class SbEmailField extends LitElement implements EmailFieldProps {\n private static readonly _ROOT = \"email-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbEmailField._ROOT}`;\n\n private static readonly _PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"email\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: EmailFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Email\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: EmailFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Email is a required field.\";\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid email address.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the email input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbEmailField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbEmailField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbEmailField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbEmailField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbEmailField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbEmailField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbEmailField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: EmailFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbEmailField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid email.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: EmailFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n if (!SbEmailField._PATTERN.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbEmailField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the email field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbEmailField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbEmailField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbEmailField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbEmailField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbEmailField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbEmailField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbEmailField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbEmailField.parts.input}\"\n type=\"email\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n IdentifierFieldAutocomplete,\n IdentifierFieldContent,\n IdentifierFieldIdentifier,\n IdentifierFieldProps,\n IdentifierFieldValidateType,\n IdentifierFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating identifier field for auth widget forms.\n * @element sb-identifier-field\n *\n * @part identifier-field (rtg-field)\n * @part identifier-field-content (rtg-field-content): label + description wrapper\n * @part identifier-field-label (rtg-field-label)\n * @part identifier-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part identifier-field-description (rtg-field-description)\n * @part identifier-field-input (rtg-input)\n * @part identifier-field-error (rtg-field-error)\n *\n * @fires sb-identifier-field:validate\n * { id, parentId, name, identifiers, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\"\n */\n@customElement(\"sb-identifier-field\")\nexport class SbIdentifierField\n extends LitElement\n implements IdentifierFieldProps\n{\n private static readonly _ROOT = \"identifier-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbIdentifierField._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"identifier\";\n\n /**\n * The identifiers enabled in the identifier field.\n */\n @property({ type: Array })\n identifiers: IdentifierFieldIdentifier[] = [];\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: IdentifierFieldContent = \"split\";\n\n /**\n * The text content of the field label. If undefined, a label is generated\n * using the `identifiers` items.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * The `autocomplete` prop given to the field input.\n */\n @property({ type: String })\n autocomplete?: IdentifierFieldAutocomplete;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: IdentifierFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Identifier is a required field.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the identifier input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbIdentifierField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbIdentifierField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbIdentifierField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbIdentifierField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbIdentifierField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbIdentifierField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbIdentifierField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * The fallback label text generated, formatting the `identifiers` array into\n * a readable field label string.\n */\n private get _label() {\n const identifiers = this.identifiers;\n if (identifiers.length === 0) return \"Identifier\";\n\n let label = identifiers[0];\n if (identifiers.length > 1) {\n const start = identifiers.slice(0, -1).join(\", \");\n const middle = identifiers.length > 2 ? \", or \" : \" or \";\n const end = identifiers.slice(-1)[0];\n\n label = start + middle + end;\n }\n\n return label.charAt(0).toUpperCase() + label.slice(1);\n }\n\n /**\n * The type of the field input, using identifier-specific types if possible,\n * otherwise using `\"text\"`.\n */\n private get _type() {\n if (this.identifiers.length === 1 && this.identifiers[0] === \"email\")\n return \"email\";\n\n if (this.identifiers.length === 1 && this.identifiers[0] === \"phone\")\n return \"tel\";\n\n return \"text\";\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: IdentifierFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n const identifiers = this.identifiers;\n\n const validateEvent = new CustomEvent(SbIdentifierField.validateEventName, {\n detail: { id, parentId, name, identifiers, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid identifier.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: IdentifierFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n // Note: this check has been placed here for extendability and consistency\n // between `sb-*-field` elements. The `validation` option currently makes\n // no difference as the required check is the only validation check.\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbIdentifierField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the identifier field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbIdentifierField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbIdentifierField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbIdentifierField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label ?? this._label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbIdentifierField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbIdentifierField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbIdentifierField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbIdentifierField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbIdentifierField.parts.input}\"\n type=\"${this._type}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n autocomplete=\"${this.autocomplete ?? nothing}\"\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n NameFieldContent,\n NameFieldProps,\n NameFieldValidateType,\n NameFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating name field for auth widget forms.\n * @element sb-name-field\n *\n * @part name-field (rtg-field)\n * @part name-field-content (rtg-field-content): label + description wrapper\n * @part name-field-label (rtg-field-label)\n * @part name-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part name-field-description (rtg-field-description)\n * @part name-field-input (rtg-input)\n * @part name-field-error (rtg-field-error)\n *\n * @fires sb-name-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-name-field\")\nexport class SbNameField extends LitElement implements NameFieldProps {\n private static readonly _ROOT = \"name-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbNameField._ROOT}`;\n\n private static readonly _PATTERN = /^[\\p{L} .'-]*$/u;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"name\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: NameFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Name\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid name.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid name.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The regex pattern for a valid name, used in place of `_PATTERN`.\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: NameFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Name is a required field.\";\n\n /**\n * Custom error message shown when the name is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the name is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid name.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the name input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbNameField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbNameField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbNameField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbNameField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbNameField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbNameField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbNameField._ERROR}`;\n }\n\n /**\n * Returns the normalized value of `_value` by trimming leading/trailing\n * whitespace and collapsing consecutive interior spaces into one.\n */\n private get _normalizedValue() {\n return this._value.trim().replace(/\\s+/g, \" \");\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Returns the resolved regex pattern, using a `RegExp` built from the\n * `pattern` prop when provided, otherwise falling back to `_PATTERN`.\n */\n private get _pattern() {\n return this.pattern ? new RegExp(this.pattern) : SbNameField._PATTERN;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: NameFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbNameField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid name.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: NameFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Username must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Username must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n if (!this._pattern.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbNameField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the name field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbNameField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbNameField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbNameField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbNameField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbNameField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbNameField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbNameField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbNameField.parts.input}\"\n type=\"text\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PhoneFieldContent,\n PhoneFieldProps,\n PhoneFieldValidateType,\n PhoneFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating phone field for auth widget forms.\n * @element sb-phone-field\n *\n * @part phone-field (rtg-field)\n * @part phone-field-content (rtg-field-content): label + description wrapper\n * @part phone-field-label (rtg-field-label)\n * @part phone-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part phone-field-description (rtg-field-description)\n * @part phone-field-input (rtg-input)\n * @part phone-field-error (rtg-field-error)\n *\n * @fires sb-phone-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\"\n */\n@customElement(\"sb-phone-field\")\nexport class SbPhoneField extends LitElement implements PhoneFieldProps {\n private static readonly _ROOT = \"phone-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbPhoneField._ROOT}`;\n\n private static readonly _PATTERN =\n /^\\+?(\\d[\\d-.() ]+)?(\\([\\d-.() ]+\\))?[\\d-.() ]+\\d$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"phone\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: PhoneFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Phone\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: PhoneFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Phone is a required field.\";\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid phone number.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the phone input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPhoneField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbPhoneField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbPhoneField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbPhoneField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbPhoneField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbPhoneField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbPhoneField._ERROR}`;\n }\n\n /**\n * Returns the normalized value of `_value` by stripping all whitespace.\n */\n private get _normalizedValue() {\n return this._value.replace(/\\s/g, \"\");\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: PhoneFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbPhoneField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid phone.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: PhoneFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n if (!SbPhoneField._PATTERN.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbPhoneField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the phone field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbPhoneField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbPhoneField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbPhoneField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbPhoneField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbPhoneField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbPhoneField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbPhoneField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbPhoneField.parts.input}\"\n type=\"tel\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import type { Input as RtgInput } from \"@revotech-group/revotech-ui-kit\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n UsernameFieldContent,\n UsernameFieldProps,\n UsernameFieldValidateType,\n UsernameFieldValidation,\n} from \"./field.types\";\n\n/**\n * A self-validating username field for auth widget forms.\n * @element sb-username-field\n *\n * @part username-field (rtg-field)\n * @part username-field-content (rtg-field-content): label + description wrapper\n * @part username-field-label (rtg-field-label)\n * @part username-field-mark (span): decorative marker with text or `\"*\"` in label\n * @part username-field-description (rtg-field-description)\n * @part username-field-input (rtg-input)\n * @part username-field-error (rtg-field-error)\n *\n * @fires sb-username-field:validate\n * { id, parentId, name, value, valid, type, message }\n * - id: inputId\n * - parentId: rootId\n * - type: \"required\" | \"format\" | \"success\" | \"minlength\" | \"maxlength\"\n */\n@customElement(\"sb-username-field\")\nexport class SbUsernameField extends LitElement implements UsernameFieldProps {\n private static readonly _ROOT = \"username-field\";\n private static readonly _CONTENT = \"content\";\n private static readonly _LABEL = \"label\";\n private static readonly _MARK = \"mark\";\n private static readonly _DESCRIPTION = \"description\";\n private static readonly _INPUT = \"input\";\n private static readonly _ERROR = \"error\";\n\n static readonly TAG = `sb-${SbUsernameField._ROOT}`;\n\n private static readonly _PATTERN = /^[a-z0-9_]*$/;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const content = `${root}-${this._CONTENT}`;\n const label = `${root}-${this._LABEL}`;\n const mark = `${root}-${this._MARK}`;\n const description = `${root}-${this._DESCRIPTION}`;\n const input = `${root}-${this._INPUT}`;\n const error = `${root}-${this._ERROR}`;\n\n return { root, content, label, mark, description, input, error };\n }\n\n /**\n * The name of the custom event fired on validate.\n */\n static get validateEventName() {\n return `${this.TAG}:validate`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The `id` value given to the input child/part to override the auto-generated\n * input ID, derived from the `rootId`.\n */\n @property({ attribute: \"field-id\", type: String })\n fieldId?: string;\n\n /**\n * The `name` prop of the input part, used by the parent form.\n */\n @property({ type: String })\n name = \"username\";\n\n /**\n * Whether the label and description are grouped together above the input, or\n * split up with the input in-between them.\n */\n @property({ type: String })\n content: UsernameFieldContent = \"split\";\n\n /**\n * The text content of the field label.\n */\n @property({ type: String })\n label = \"Username\";\n\n /**\n * The text used as the input placeholder.\n */\n @property({ type: String })\n placeholder?: string;\n\n /**\n * The text content of the field description.\n */\n @property({ type: String })\n description?: string;\n\n /**\n * The text rendered in the field label as a custom mark.\n */\n @property({ type: String })\n mark?: string;\n\n /**\n * When provided with `required`, a caret mark is rendered in the field label.\n */\n @property({ type: Boolean })\n caret?: boolean;\n\n /**\n * Whether the field is in a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the parent form cannot be submitted without this field.\n */\n @property({ type: Boolean })\n required?: boolean;\n\n /**\n * The minimum number of characters required for a valid username.\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * The maximum number of characters accepted for a valid username.\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * The regex pattern for a valid username, used in place of `_PATTERN`.\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Controls validation depth: `\"default\"` applies all rules, while `\"simple\"`\n * only enforces the `required` check.\n */\n @property({ type: String })\n validation: UsernameFieldValidation = \"default\";\n\n /**\n * Error message shown when the field is required but empty upon submission.\n */\n @property({ attribute: \"required-error\", type: String })\n requiredError = \"Username is a required field.\";\n\n /**\n * Custom error message shown when the username is shorter than minlength.\n */\n @property({ attribute: \"minlength-error\", type: String })\n minlengthError?: string;\n\n /**\n * Custom error message shown when the username is longer than maxlength.\n */\n @property({ attribute: \"maxlength-error\", type: String })\n maxlengthError?: string;\n\n /**\n * Error message shown when the field is invalid upon submission.\n */\n @property({ attribute: \"format-error\", type: String })\n formatError = \"Enter a valid username.\";\n\n /**\n * Indicates that the field is in an invalid state.\n */\n @state()\n private _invalid = false;\n\n /**\n * The text rendered in field error when in an invalid state.\n */\n @state()\n private _error = \"\";\n\n /**\n * The current value of the username input.\n */\n @state()\n private _value = \"\";\n\n /**\n * Reference to the nearest `form` ancestor.\n */\n private _form: HTMLFormElement | null = null;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbUsernameField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the field content element, derived from `rootId` with the\n * content part name appended.\n */\n get contentId() {\n return `${this.rootId}-${SbUsernameField._CONTENT}`;\n }\n\n /**\n * The `id` of the field label element, derived from `rootId` with the label\n * part name appended.\n */\n get labelId() {\n return `${this.rootId}-${SbUsernameField._LABEL}`;\n }\n\n /**\n * The `id` of the field description element, derived from `rootId` with the\n * description part name appended.\n */\n get descriptionId() {\n return `${this.rootId}-${SbUsernameField._DESCRIPTION}`;\n }\n\n /**\n * The `id` of the mark element, derived from `rootId` with the mark part name\n * appended.\n */\n get markId() {\n return `${this.rootId}-${SbUsernameField._MARK}`;\n }\n\n /**\n * The `id` of the input element, equal to `fieldId` when provided, otherwise\n * derived from `rootId` with the input part name appended.\n */\n get inputId() {\n return this.fieldId ?? `${this.rootId}-${SbUsernameField._INPUT}`;\n }\n\n /**\n * The `id` of the field error element, derived from `rootId` with the error\n * part name appended.\n */\n get errorId() {\n return `${this.rootId}-${SbUsernameField._ERROR}`;\n }\n\n /**\n * Returns a the normalized value of `_value` by trimming whitespace and\n * converting letters to lowercase.\n */\n private get _normalizedValue() {\n return this._value.trim().toLowerCase();\n }\n\n /**\n * Returns sanitized `minlength` and `maxlength` values, filtering out\n * non-positive numbers and discarding `maxlength` if it is less than\n * `minlength` to prevent conflicting length constraints.\n */\n private get _lengths() {\n const lengths = {\n minlength:\n this.minlength && this.minlength > 0 ? this.minlength : undefined,\n maxlength:\n this.maxlength && this.maxlength > 0 ? this.maxlength : undefined,\n };\n\n if (\n lengths.minlength &&\n lengths.maxlength &&\n lengths.maxlength < lengths.minlength\n )\n lengths.maxlength = undefined;\n\n return lengths;\n }\n\n /**\n * Returns the resolved regex pattern, using a `RegExp` built from the\n * `pattern` prop when provided, otherwise falling back to `_PATTERN`.\n */\n private get _pattern() {\n return this.pattern ? new RegExp(this.pattern) : SbUsernameField._PATTERN;\n }\n\n /**\n * Adds the input, form submit, and form reset event listeners.\n */\n connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener(\"input\", this._handleInput);\n\n this._form = this.closest(\"form\");\n if (this._form) this._form.noValidate = true;\n this._form?.addEventListener(\"submit\", this._handleFormSubmit);\n this._form?.addEventListener(\"reset\", this._handleFormReset);\n }\n\n /**\n * Removes the input, form submit, and form reset event listeners.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener(\"input\", this._handleInput);\n\n this._form?.removeEventListener(\"submit\", this._handleFormSubmit);\n this._form?.removeEventListener(\"reset\", this._handleFormReset);\n this._form = null;\n }\n\n /**\n * The public validate method that calls the private `_validate()` method for\n * manual, external validation.\n */\n validate() {\n return this._validate();\n }\n\n /**\n * Defines and dispatches the validate event.\n */\n private _dispatchValidate(\n valid: boolean,\n type: UsernameFieldValidateType,\n value: string,\n message: string,\n ) {\n const id = this.inputId;\n const parentId = this.rootId;\n const name = this.name;\n\n const validateEvent = new CustomEvent(SbUsernameField.validateEventName, {\n detail: { id, parentId, name, value, valid, type, message },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(validateEvent);\n }\n\n /**\n * Clears the invalid state and error, and dispatches a valid validate event.\n */\n private _handleValidateSuccess(value: string, message = \"Valid username.\") {\n this._invalid = false;\n this._error = \"\";\n this._dispatchValidate(true, \"success\", value, message);\n }\n\n /**\n * Sets the invalid state and error, and dispatches an invalid validate event.\n */\n private _handleValidateError(\n type: UsernameFieldValidateType,\n value: string,\n message: string,\n ) {\n this._invalid = true;\n this._error = message;\n this._dispatchValidate(false, type, value, message);\n }\n\n /**\n * Validates the current value against the applicable rules in sequence,\n * dispatches the validate event, and returns `true` if the value passes.\n */\n private _validate() {\n const value = this._normalizedValue;\n\n if (this.required && !value) {\n this._handleValidateError(\"required\", value, this.requiredError);\n return false;\n }\n\n if (!value || this.validation === \"simple\") {\n this._handleValidateSuccess(value);\n return true;\n }\n\n const { minlength, maxlength } = this._lengths;\n\n if (minlength && value.length < minlength) {\n this._handleValidateError(\n \"minlength\",\n value,\n this.minlengthError ??\n `Username must be at least ${minlength} characters.`,\n );\n return false;\n }\n\n if (maxlength && value.length > maxlength) {\n this._handleValidateError(\n \"maxlength\",\n value,\n this.maxlengthError ??\n `Username must be at most ${maxlength} characters.`,\n );\n return false;\n }\n\n if (!this._pattern.test(value)) {\n this._handleValidateError(\"format\", value, this.formatError);\n return false;\n }\n\n this._handleValidateSuccess(value);\n return true;\n }\n\n /**\n * Handles the input event, updating the private `_value` prop.\n */\n private _handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (target.matches(`[part=\"${SbUsernameField.parts.input}\"]>input`))\n this._value = target.value;\n };\n\n /**\n * Handles the form submit event, running the `_validate()` method and\n * preventing the default submission behavior if invalid.\n */\n private _handleFormSubmit = (e: Event) => {\n const valid = this._validate();\n if (!valid) e.preventDefault();\n };\n\n /**\n * Handles the form reset event, resetting the input element's `value` as well\n * as the username field's private props: `_value`, `_invalid`, and `_error`.\n */\n private _handleFormReset = () => {\n const input = this.querySelector(\n `rtg-input[part=\"${SbUsernameField.parts.input}\"]`,\n ) as RtgInput | null;\n\n if (input) input.value = \"\";\n\n this._value = \"\";\n this._invalid = false;\n this._error = \"\";\n };\n\n /**\n * Conditionally returns the mark template for the field label. When `caret`\n * and `required` are provided, the mark becomes an asterisk. When `mark` is\n * provided, its value is rendered inside the element.\n * If both a caret and custom text mark have their conditions met, the custom\n * mark will be prioritised and rendered instead of the asterisk.\n */\n private _renderMark() {\n if (!this.mark && (!this.caret || !this.required)) return nothing;\n\n return html`\n <span\n id=\"${this.markId}\"\n part=\"${SbUsernameField.parts.mark}\"\n data-content=\"${this.mark ? \"text\" : \"caret\"}\"\n >\n ${this.mark ? this.mark : html`&ast;`}\n </span>\n `;\n }\n\n /**\n * Returns the field label template with the label text and optional mark.\n */\n private _renderLabel() {\n return html`\n <rtg-field-label\n id=\"${this.labelId}\"\n part=\"${SbUsernameField.parts.label}\"\n for=\"${this.inputId}\"\n >\n ${this.label} ${this._renderMark()}\n </rtg-field-label>\n `;\n }\n\n /**\n * Returns the field description template if `description` is defined.\n */\n private _renderDescription() {\n if (!this.description) return nothing;\n\n return html`\n <rtg-field-description\n id=\"${this.descriptionId}\"\n part=\"${SbUsernameField.parts.description}\"\n >\n ${this.description}\n </rtg-field-description>\n `;\n }\n\n /**\n * Returns the field error template with the `_error` message if the\n * `_invalid` state is `true`.\n */\n private _renderError() {\n if (!this._invalid) return nothing;\n\n return html`\n <rtg-field-error\n id=\"${this.errorId}\"\n part=\"${SbUsernameField.parts.error}\"\n .errors=${[{ message: this._error }]}\n ></rtg-field-error>\n `;\n }\n\n render() {\n const { minlength, maxlength } = this._lengths;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbUsernameField.parts.root}\"\n data-content=\"${this.content}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=\"${this._invalid}\"\n >\n ${this.content === \"group\"\n ? html`\n <rtg-field-content\n id=\"${this.contentId}\"\n part=\"${SbUsernameField.parts.content}\"\n >\n ${this._renderLabel()} ${this._renderDescription()}\n </rtg-field-content>\n `\n : this._renderLabel()}\n\n <rtg-input\n id=\"${this.inputId}\"\n part=\"${SbUsernameField.parts.input}\"\n type=\"text\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder ?? nothing}\"\n minlength=\"${minlength ?? nothing}\"\n maxlength=\"${maxlength ?? nothing}\"\n ?disabled=\"${this.disabled}\"\n ?invalid=${this._invalid}\n ?required=${this.required}\n ></rtg-input>\n\n ${this._renderError()}\n ${this.content === \"split\" && !this._invalid\n ? this._renderDescription()\n : nothing}\n </rtg-field>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n FormSubmitProps,\n FormSubmitSize,\n FormSubmitSpinnerAlign,\n FormSubmitVariant,\n} from \"./form.types\";\n\n/**\n * A submit button for auth widget forms.\n * @element sb-form-submit\n *\n * @part form-submit (rtg-button)\n * @part form-submit-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-form-submit:click { id, event }\n */\n@customElement(\"sb-form-submit\")\nexport class SbFormSubmit extends LitElement implements FormSubmitProps {\n private static readonly _ROOT = \"form-submit\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbFormSubmit._ROOT}`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, spinner };\n }\n\n /**\n * The name of the custom event fired on click.\n */\n static get clickEventName() {\n return `${this.TAG}:click`;\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: FormSubmitVariant = \"default\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: FormSubmitSize = \"default\";\n\n /**\n * The text used as the button label.\n */\n @property({ type: String })\n label = \"Submit\";\n\n /**\n * Whether the loading spinner should be rendered before or after the label.\n */\n @property({ attribute: \"spinner-align\", type: String })\n spinnerAlign: FormSubmitSpinnerAlign = \"start\";\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the button reflects a loading state.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSubmit.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` with the spinner\n * part name appended.\n */\n get spinnerId() {\n return `${this.rootId}-${SbFormSubmit._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, and\n * firing the click event.\n */\n private _handleClick = () => {\n if (this.disabled || this.isLoading) return;\n\n this.dispatchEvent(\n new CustomEvent(SbFormSubmit.clickEventName, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbFormSubmit.parts.spinner}\"\n class=\"rtg-icon-inline-${this.spinnerAlign}\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbFormSubmit.parts.root}\"\n data-event=\"${this.event}\"\n ?data-loading=${this.isLoading}\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n type=\"submit\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.spinnerAlign === \"start\" ? this._renderSpinner() : nothing}\n ${this.label}\n ${this.spinnerAlign === \"end\" ? this._renderSpinner() : nothing}\n </rtg-button>\n `;\n }\n}\n","import {\n SbConfirmField,\n SbEmailField,\n SbIdentifierField,\n SbNameField,\n SbPasswordField,\n SbPhoneField,\n SbUsernameField,\n} from \"../field\";\n\nconst FIELDS = [\n SbEmailField,\n SbPhoneField,\n SbUsernameField,\n SbIdentifierField,\n SbNameField,\n SbPasswordField,\n SbConfirmField,\n];\n\nexport const FIELD_SELECTORS = FIELDS.map((f) => f.TAG).join(\", \");\nexport const FIELD_VALIDATE_EVENTS = FIELDS.map((f) => f.validateEventName);\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport { SbFormSubmit } from \"./_form-submit\";\nimport { FIELD_SELECTORS, FIELD_VALIDATE_EVENTS } from \"./form.defs\";\nimport type { Field, FormOnReset, FormOnSubmit, FormProps } from \"./form.types\";\n\n/**\n * A composable form container that orchestrates validation, collects form data,\n * and handles auth service communications.\n * @element sb-form\n *\n * @part form (form)\n *\n * @fires sb-form:success { id, data, event }\n * @fires sb-form:error { id, data, event, message }\n * @fires sb-form:reset { id }\n */\n@customElement(\"sb-form\")\nexport class SbForm extends LitElement implements FormProps {\n private static readonly _ROOT = \"form\";\n\n static readonly TAG = `sb-${SbForm._ROOT}`;\n\n static readonly SUCCESS_EVENT = `${SbForm.TAG}:success`;\n static readonly ERROR_EVENT = `${SbForm.TAG}:error`;\n static readonly RESET_EVENT = `${SbForm.TAG}:reset`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n return { root };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * When provided, called with the collected form data and the auth event\n * string instead of the default `Auth.processLoginflowEvent` call.\n * Use this to plug in custom submission logic or to handle auth externally.\n */\n @property({ attribute: false })\n onSubmit?: FormOnSubmit;\n\n /**\n * Called after the native form reset event fires.\n */\n @property({ attribute: false })\n onReset?: FormOnReset;\n\n /**\n * Auth event string captured from the most recent `sb-form-submit:click`\n * event. Cleared after each submission attempt.\n */\n private _pendingEvent?: string;\n\n /**\n * Guards against double-submission while an async auth call is in-flight.\n */\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbForm.parts.root}-${this.seed}`;\n }\n\n /**\n * The native `<form>` element rendered as the root part.\n */\n private get _form() {\n return this.querySelector<HTMLFormElement>(\n `form[part=\"${SbForm.parts.root}\"]`,\n );\n }\n\n /**\n * All `sb-*-field` descendants inside the form element.\n */\n private get _fields() {\n const form = this._form;\n if (!form) return [];\n\n return Array.from(form.querySelectorAll<Field>(FIELD_SELECTORS));\n }\n\n /**\n * The first `sb-form-submit` descendant inside the form element.\n */\n private get _submit() {\n const form = this._form;\n if (!form) return null;\n\n return form.querySelector<SbFormSubmit>(SbFormSubmit.TAG);\n }\n\n /**\n * Subscribes to the `sb-form-submit:click` event so the auth event string\n * is captured before the native form `submit` event fires.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(SbFormSubmit.clickEventName, this._handleSubmitClick);\n }\n\n /**\n * Removes the `sb-form-submit:click` listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\n SbFormSubmit.clickEventName,\n this._handleSubmitClick,\n );\n }\n\n /**\n * Moves initial children (authored inside `<sb-form>` in markup) into the\n * rendered `<form>` element. The DOM move disconnects and reconnects each\n * custom-element child, letting field elements re-run `connectedCallback`\n * and find the native form ancestor via `this.closest(\"form\")`.\n */\n protected firstUpdated() {\n const form = this._form;\n if (!form) return;\n\n const children = Array.from(this.childNodes).filter((n) => n !== form);\n children.forEach((n) => form.appendChild(n));\n }\n\n /**\n * Captures the auth event string emitted by `sb-form-submit` before the\n * native form submit fires.\n */\n private _handleSubmitClick = (e: Event) => {\n this._pendingEvent = (e as CustomEvent<{ event?: string }>).detail?.event;\n };\n\n /**\n * Dispatches a bubbling, composed custom event from `sb-form`.\n */\n private _dispatch(name: string, detail: Record<string, unknown> = {}) {\n this.dispatchEvent(\n new CustomEvent(name, { detail, bubbles: true, composed: true }),\n );\n }\n\n /**\n * Applies or removes the loading state on every field element and the\n * submit button. `wasDisabled` records the pre-loading state so that\n * fields that were already disabled are not re-enabled when loading ends.\n */\n private _setLoading(\n loading: boolean,\n fields: Field[],\n wasDisabled: boolean[],\n ) {\n fields.forEach((field, i) => {\n field.disabled = loading ? true : wasDisabled[i];\n });\n\n const submit = this._submit;\n if (submit) submit.loading = loading;\n\n this._loading = loading;\n }\n\n /**\n * Handles the native form submit event:\n *\n * 1. Always prevents the default browser navigation.\n * 2. Adds temporary listeners for every `sb-*-field:validate` event on\n * `this`. These events bubble from field elements and carry `{ name,\n * value, valid }` in their detail — the exact values each field uses\n * for its own validation. The temporary listener builds the form-data\n * object as a side effect of the validation calls in step 3.\n * 3. Calls `field.validate()` on every `sb-*-field` via `Array.map` (not\n * `Array.every`) so ALL fields are validated and ALL inline errors are\n * shown even when multiple fields are invalid simultaneously.\n * 4. Removes the temporary validate listeners.\n * 5. Aborts if any field returned `false`.\n * 6. Calls `onSubmit` if provided, bypassing the default auth flow.\n * 7. Otherwise calls `Auth.processLoginflowEvent` with the captured auth\n * event string and the collected data, managing loading state throughout.\n */\n private _handleSubmit = async (e: SubmitEvent) => {\n e.preventDefault();\n\n if (this._loading) return;\n\n const fields = this._fields;\n\n // Collect form data from validate events fired during validation below.\n const data: Record<string, string> = {};\n const collector = (evt: Event) => {\n const detail = (evt as CustomEvent<{ name?: string; value?: string }>)\n .detail;\n if (detail?.name !== undefined && detail.value !== undefined) {\n data[detail.name] = detail.value;\n }\n };\n\n FIELD_VALIDATE_EVENTS.forEach((n) => this.addEventListener(n, collector));\n // Use map (not every) so all fields are validated and show their errors.\n const results = fields.map((field) => field.validate());\n FIELD_VALIDATE_EVENTS.forEach((n) =>\n this.removeEventListener(n, collector),\n );\n\n const allValid = results.every(Boolean);\n if (!allValid) return;\n\n const event = this._pendingEvent;\n\n if (this.onSubmit) {\n this.onSubmit(data, event);\n return;\n }\n\n if (!event) return;\n\n const wasDisabled = fields.map((f) => !!f.disabled);\n this._setLoading(true, fields, wasDisabled);\n\n try {\n await Auth.processLoginflowEvent({\n event,\n ...(Object.keys(data).length ? { data } : {}),\n } as Parameters<typeof Auth.processLoginflowEvent>[0]);\n\n this._dispatch(SbForm.SUCCESS_EVENT, { id: this.rootId, data, event });\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n this._dispatch(SbForm.ERROR_EVENT, {\n id: this.rootId,\n data,\n event,\n message,\n });\n } finally {\n this._setLoading(false, fields, wasDisabled);\n this._pendingEvent = undefined;\n }\n };\n\n /**\n * Handles the native form reset event. Field elements handle their own\n * internal state reset via their own form-reset listeners.\n */\n private _handleReset = (e: Event) => {\n this._pendingEvent = undefined;\n if (this.onReset) this.onReset(e);\n this._dispatch(SbForm.RESET_EVENT, { id: this.rootId });\n };\n\n render() {\n return html`\n <form\n id=\"${this.rootId}\"\n part=\"${SbForm.parts.root}\"\n @submit=${this._handleSubmit}\n @reset=${this._handleReset}\n ></form>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type { SbFormSeparatorProps } from \"./form.types\";\n\n/**\n * Visual divider to separate sections inside a form. Accepts optional inline\n * text content.\n * @element sb-form-separator\n *\n * @slot form-separator (rtg-field-separator)\n */\n@customElement(\"sb-form-separator\")\nexport class SbFormSeparator\n extends LitElement\n implements SbFormSeparatorProps\n{\n private static readonly _ROOT = \"form-separator\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n return { root };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The optional text used as the separator inline content.\n */\n @property({ type: String })\n content?: string;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSeparator.parts.root}-${this.seed}`;\n }\n\n render() {\n return html`\n <rtg-field-separator\n id=\"${this.rootId}\"\n part=\"${SbFormSeparator.parts.root}\"\n data-content=\"${this.content ? \"true\" : \"false\"}\"\n >\n ${this.content ?? nothing}\n </rtg-field-separator>\n `;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n FormSwitchProps,\n FormSwitchSize,\n FormSwitchType,\n FormSwitchVariant,\n} from \"./form.types\";\n\n/**\n * A button for switching between auth widgets.\n * @element sb-form-switch\n *\n * @part form-switch (rtg-button)\n * @part form-switch-wrapper (div): contains root and optional prompt\n * @part form-switch-prompt (p): prompt text for `\"default\"` form switches\n * @part form-swith-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-form-switch:click { id, event }\n */\n@customElement(\"sb-form-switch\")\nexport class SbFormSwitch extends LitElement implements FormSwitchProps {\n private static readonly _ROOT = \"form-switch\";\n private static readonly _WRAPPER = \"wrapper\";\n private static readonly _PROMPT = \"prompt\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbFormSwitch._ROOT}`;\n\n static readonly CLICK_EVENT = `${SbFormSwitch.TAG}:click`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const wrapper = `${root}-${this._WRAPPER}`;\n const prompt = `${root}-${this._PROMPT}`;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, wrapper, prompt, spinner };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * Whether the form switch is a link button with optional prompt text, or a\n * configurable button element.\n */\n @property({ type: String })\n type: FormSwitchType = \"default\";\n\n /**\n * The visual variant of the (button) form switch.\n */\n @property({ type: String })\n variant: FormSwitchVariant = \"secondary\";\n\n /**\n * The size of the (button) form switch.\n */\n @property({ type: String })\n size: FormSwitchSize = \"default\";\n\n /**\n * The text used as the form switch button label.\n */\n @property({ type: String })\n label = \"Switch\";\n\n /**\n * Optional text which precedes the button in a `\"default\"` form switch.\n */\n @property({ type: String })\n prompt?: string;\n\n /**\n * When provided, the switch reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, the switch reflects a loading state.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the switch is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbFormSwitch.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the wrapper element, derived from `rootId` and the part name.\n */\n get wrapperId() {\n return `${this.rootId}-${SbFormSwitch._WRAPPER}`;\n }\n\n /**\n * The `id` of the prompt element, derived from `rootId` and the part name.\n */\n get promptId() {\n return `${this.rootId}-${SbFormSwitch._PROMPT}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` and the part name.\n */\n get spinnerId() {\n return `${this.rootId}-${SbFormSwitch._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = async () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this.dispatchEvent(\n new CustomEvent(SbFormSwitch.CLICK_EVENT, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n\n try {\n if (this.event) await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n };\n\n /**\n * Returns the prompt paragraph template for `\"default\"` form switches.\n */\n private _renderPrompt() {\n if (this.type === \"button\" || !this.prompt) return nothing;\n\n return html`\n <p id=\"${this.promptId}\" part=\"${SbFormSwitch.parts.prompt}\">\n ${this.prompt}\n </p>\n `;\n }\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbFormSwitch.parts.spinner}\"\n class=\"rtg-icon-inline-end\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n const variant = this.type === \"button\" ? this.variant : \"link\";\n const size = this.type === \"button\" ? this.size : \"default\";\n\n return html`\n <div id=\"${this.wrapperId}\" part=\"${SbFormSwitch.parts.wrapper}\">\n ${this._renderPrompt()}\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbFormSwitch.parts.root}\"\n data-type=\"${this.type}\"\n data-event=\"${this.event ?? nothing}\"\n data-loading=\"${this.isLoading ? \"true\" : nothing}\"\n variant=\"${variant}\"\n size=\"${size}\"\n ?disabled=\"${this.disabled || this.isLoading}\"\n >\n ${this.label} ${this._renderSpinner()}\n </rtg-button>\n </div>\n `;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n PasskeyButtonProps,\n PasskeyButtonSize,\n PasskeyButtonSpinnerAlign,\n PasskeyButtonVariant,\n} from \"./passkey-button.types\";\n\n/**\n * A button for passkey authentication in auth widgets.\n * @element sb-passkey-button\n *\n * @part passkey-button (rtg-button)\n * @part passkey-button-spinner (rtg-spinner): loading indicator\n *\n * @fires sb-passkey-button:click { id, event }\n */\n@customElement(\"sb-passkey-button\")\nexport class SbPasskeyButton extends LitElement implements PasskeyButtonProps {\n private static readonly _ROOT = \"passkey-button\";\n private static readonly _SPINNER = \"spinner\";\n\n static readonly TAG = `sb-${SbPasskeyButton._ROOT}`;\n\n static readonly CLICK_EVENT = `${SbPasskeyButton.TAG}:click`;\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const spinner = `${root}-${this._SPINNER}`;\n\n return { root, spinner };\n }\n\n /**\n * A unique substring for fallback part IDs generated.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` of the root part and the base of sub-part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: PasskeyButtonVariant = \"secondary\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: PasskeyButtonSize = \"default\";\n\n /**\n * The text used as the button label.\n */\n @property({ type: String })\n label = \"Use Passkey\";\n\n /**\n * Whether the loading spinner should be rendered before or after the label.\n */\n @property({ attribute: \"spinner-align\", type: String })\n spinnerAlign: PasskeyButtonSpinnerAlign = \"start\";\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, a loading state is applied.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event name as defined in the loginflow auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbPasskeyButton.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the spinner element, derived from `rootId` and the part name.\n */\n get spinnerId() {\n return `${this.rootId}-${SbPasskeyButton._SPINNER}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = async () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this.dispatchEvent(\n new CustomEvent(SbPasskeyButton.CLICK_EVENT, {\n detail: { id: this.rootId, event: this.event },\n bubbles: true,\n composed: true,\n }),\n );\n\n try {\n if (this.event) await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n };\n\n /**\n * Returns the loading spinner template.\n */\n private _renderSpinner() {\n if (!this.isLoading) return nothing;\n\n return html`\n <rtg-spinner\n id=\"${this.spinnerId}\"\n part=\"${SbPasskeyButton.parts.spinner}\"\n class=\"rtg-icon-inline-${this.spinnerAlign}\"\n ></rtg-spinner>\n `;\n }\n\n render() {\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbPasskeyButton.parts.root}\"\n data-event=\"${this.event ?? nothing}\"\n data-loading=\"${this.isLoading ? \"true\" : nothing}\"\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.spinnerAlign === \"start\" ? this._renderSpinner() : nothing}\n ${this.label}\n ${this.spinnerAlign === \"end\" ? this._renderSpinner() : nothing}\n </rtg-button>\n `;\n }\n}\n","import type { Provider } from \"./provider.types\";\n\nexport const PROVIDER_NAMES: Record<Provider, string> = {\n apple: \"Apple\",\n discord: \"Discord\",\n facebook: \"Facebook\",\n github: \"GitHub\",\n google: \"Google\",\n linkedin: \"LinkedIn\",\n meta: \"Meta\",\n microsoft: \"Microsoft\",\n x: \"X\",\n};\n\nexport const PROVIDER_ICON_PATHS: Record<Provider, string> = {\n apple:\n \"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\",\n discord:\n \"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z\",\n facebook:\n \"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z\",\n github:\n \"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\",\n google:\n \"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\",\n linkedin:\n \"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\",\n meta: \"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z\",\n microsoft:\n \"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z\",\n x: \"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z\",\n};\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\nimport { PROVIDER_ICON_PATHS, PROVIDER_NAMES } from \"./provider.defs\";\nimport type {\n Provider,\n ProviderButtonContent,\n ProviderButtonIconAlign,\n ProviderButtonProps,\n ProviderButtonSize,\n ProviderButtonVariant,\n} from \"./provider.types\";\n\n/**\n * A button for auth provider authentication.\n * @element sb-provider-button\n *\n * @part provider-button (rtg-button)\n * @part provider-button-icon (svg/rtg-spinner): logo icon or loading indicator\n *\n * @fires sb-provider-button:click { id, provider, event }\n */\n@customElement(\"sb-provider-button\")\nexport class SbProviderButton\n extends LitElement\n implements ProviderButtonProps\n{\n private static readonly _ROOT = \"provider-button\";\n private static readonly _ICON = \"icon\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const icon = `${root}-${this._ICON}`;\n\n return { root, icon };\n }\n\n /**\n * The name of the custom event fired on click.\n */\n static get clickEventName() {\n return `sb-${this._ROOT}:click`;\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The auth provider associated to this button.\n */\n @property({ type: String })\n provider!: Provider;\n\n /**\n * Whether the button content is an icon, label, or both.\n */\n @property({ type: String })\n content: ProviderButtonContent = \"icon-label\";\n\n /**\n * The visual variant of the button.\n */\n @property({ type: String })\n variant: ProviderButtonVariant = \"outline\";\n\n /**\n * The size of the button.\n */\n @property({ type: String })\n size: ProviderButtonSize = \"default\";\n\n /**\n * The text of the button label, preceding the provider name.\n */\n @property({ type: String })\n prompt = \"Use\";\n\n /**\n * Whether the icon is rendered before or after (`\"start\"` or `\"end\"`) the\n * button label.\n */\n @property({ attribute: \"icon-align\", type: String })\n iconAlign: ProviderButtonIconAlign = \"start\";\n\n /**\n * The text of the entire button label, overriding the default `prompt` and\n * provider name label template.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * When provided, the button reflects a disabled state.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * When provided, a loading state is applied.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The event identifier/name as defined in auth service.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * Whether the button is in a loading state.\n */\n @state()\n private _loading = false;\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name, `seed`, and `provider`.\n */\n get rootId() {\n return (\n this.childId ??\n `sb-${SbProviderButton.parts.root}-${this.provider}-${this.seed}`\n );\n }\n\n /**\n * The `id` of the icon (logo and spinner) element, derived from `rootId` with\n * the icon part name appended.\n */\n get iconId() {\n return `${this.rootId}-${SbProviderButton._ICON}`;\n }\n\n /**\n * The `class` given to the icon part handling button alignment.\n */\n private get iconCn() {\n if (this.content === \"icon\") return \"\";\n return `rtg-icon-align-${this.iconAlign}`;\n }\n\n /**\n * The loading state, derived from the private `_loading` and `loading` prop.\n */\n get isLoading() {\n return this._loading || this.loading;\n }\n\n /**\n * Adds the click event listener.\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Removes the click event listener.\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this._handleClick);\n }\n\n /**\n * Defines and dispatches the click event.\n */\n private _dispatchClick() {\n const clickEvent = new CustomEvent(SbProviderButton.clickEventName, {\n detail: { id: this.rootId, provider: this.provider, event: this.event },\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(clickEvent);\n }\n\n /**\n * Emits the provided `event` to the auth service to process.\n */\n private async _emitClickEvent() {\n if (!this.event) return;\n if (!this._loading) this._loading = true;\n\n try {\n await Auth.processLoginflowEvent({ event: this.event });\n } finally {\n this._loading = false;\n }\n }\n\n /**\n * Handles the click event, preventing execution when disabled/loading, firing\n * the click event, and emitting to auth service.\n */\n private _handleClick = () => {\n if (this.disabled || this.isLoading) return;\n this._loading = true;\n\n this._dispatchClick();\n this._emitClickEvent();\n };\n\n /**\n * Returns the provider logo icon template.\n */\n private _renderLogo() {\n return html`\n <svg\n id=\"${this.iconId}\"\n part=\"${SbProviderButton.parts.icon}\"\n data-icon=\"logo\"\n data-provider=\"${this.provider}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"${this.iconCn}\"\n >\n <path d=\"${PROVIDER_ICON_PATHS[this.provider]}\" />\n </svg>\n `;\n }\n\n /**\n * Returns the loading spinner icon template.\n */\n private _renderSpinner() {\n return html`\n <rtg-spinner\n id=\"${this.iconId}\"\n part=\"${SbProviderButton.parts.icon}\"\n data-icon=\"spinner\"\n class=\"${this.iconCn}\"\n ></rtg-spinner>\n `;\n }\n\n /**\n * Returns the spinner template if loading, and the logo template if the\n * `content` prop requires the icon part.\n */\n private _renderIcon() {\n return this.isLoading\n ? this._renderSpinner()\n : this.content.includes(\"icon\")\n ? this._renderLogo()\n : nothing;\n }\n\n render() {\n const name = PROVIDER_NAMES[this.provider];\n const label = this.label ?? `${this.prompt} ${name}`;\n\n return html`\n <rtg-button\n id=\"${this.rootId}\"\n part=\"${SbProviderButton.parts.root}\"\n data-provider=\"${this.provider}\"\n data-content=\"${this.content}\"\n data-event=\"${this.event}\"\n ?data-disabled=${this.disabled || this.isLoading}\n ?data-loading=${this.isLoading}\n variant=\"${this.variant}\"\n size=\"${this.size}\"\n ?disabled=${this.disabled || this.isLoading}\n >\n ${this.iconAlign === \"start\" ? this._renderIcon() : nothing}\n ${this.content.includes(\"label\") ? label : nothing}\n ${this.iconAlign === \"end\" ? this._renderIcon() : nothing}\n </rtg-button>\n `;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n Provider,\n ProviderButtonContent,\n ProviderButtonIconAlign,\n ProviderButtonSize,\n ProviderButtonVariant,\n ProviderFieldOverride,\n ProviderFieldProps,\n} from \"./provider.types\";\n\n/**\n * A wrapper field, containing and styling auth provider buttons.\n * @element sb-provider-field\n *\n * @part provider-field (rtg-field)\n * @part provider-field-button (sb-provider-button)\n */\n@customElement(\"sb-provider-field\")\nexport class SbProviderField extends LitElement implements ProviderFieldProps {\n private static readonly _ROOT = \"provider-field\";\n private static readonly _BUTTON = \"button\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const button = `${root}-${this._BUTTON}`;\n\n return { root, button };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The providers included as provider buttons in this field.\n */\n @property({ type: Array })\n providers: Provider[] = [];\n\n /**\n * The `content` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n content?: ProviderButtonContent;\n\n /**\n * The `variant` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n variant?: ProviderButtonVariant;\n\n /**\n * The `size` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n size?: ProviderButtonSize;\n\n /**\n * The `prompt` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n prompt?: string;\n\n /**\n * The `icon-align` prop passed to each of the provider buttons.\n */\n @property({ attribute: \"icon-align\", type: String })\n iconAlign?: ProviderButtonIconAlign;\n\n /**\n * The `label` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * The `disabled` prop passed to each of the provider buttons.\n */\n @property({ type: Boolean })\n disabled?: boolean;\n\n /**\n * The `loading` prop passed to each of the provider buttons.\n */\n @property({ type: Boolean })\n loading?: boolean;\n\n /**\n * The `event` prop passed to each of the provider buttons.\n */\n @property({ type: String })\n event?: string;\n\n /**\n * A list of provider-specific prop overrides.\n */\n @property({ type: Array })\n overrides: ProviderFieldOverride[] = [];\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root element. Equal to `childId` when provided, otherwise\n * derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbProviderField.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the provider button element, derived from `rootId` with the\n * button part name appended.\n */\n get buttonId() {\n return `${this.rootId}-${SbProviderField._BUTTON}`;\n }\n\n /**\n * The number of columns within the field, given to the root element via its\n * `data-columns` attribute. In hyphenated values (e.g. `\"two-three\"`), the\n * first part is the number of columns in the first row, and the second part\n * is the number of columns in the second row.\n */\n get columns() {\n const total = this._providers.length;\n\n if (total < 3) return \"one\";\n if (total % 3 === 0) return \"three\";\n if (total === 5) return \"two-three\";\n if (total === 7) return \"three-four\";\n\n return \"four\";\n }\n\n /**\n * Returns the correct event for a provider:\n * 1. Override event (if provided)\n * 2. Global event prop\n * 3. Fallback: `signin_with_oauth(${provider})`\n */\n private _getEventForProvider(\n provider: Provider,\n overrideEvent?: string,\n ): string {\n if (overrideEvent) return overrideEvent;\n if (this.event) return this.event;\n return `signin_with_oauth(${provider})`;\n }\n\n /**\n * The `providers` array without any duplicates.\n */\n private get _providers() {\n return [...new Set(this.providers)];\n }\n\n /**\n * The `overrides` array without any duplicate `provider` entries (i.e. no\n * two override items have the same `provider` value).\n */\n private get _overrides() {\n return this.overrides.filter(\n (override, index, self) =>\n index === self.findIndex((o) => o.provider === override.provider),\n );\n }\n\n /**\n * Returns the template for the button part, specifically an\n * `sb-provider-button` element with props originating from `overrides` if\n * given, otherwise the general prop given to this field component.\n */\n private _renderButton(props: ProviderFieldOverride) {\n const event = this._getEventForProvider(props.provider, props.event);\n return html`\n <sb-provider-button\n id=\"${this.buttonId}\"\n part=\"${SbProviderField.parts.button}\"\n seed=\"${props.seed ?? this.seed}\"\n child-id=\"${props.childId ?? nothing}\"\n provider=\"${props.provider}\"\n content=\"${props.content ??\n this.content ??\n (this._providers.length > 2 ? \"icon\" : nothing)}\"\n variant=\"${props.variant ?? this.variant ?? nothing}\"\n size=\"${props.size ?? this.size ?? nothing}\"\n prompt=\"${props.prompt ?? this.prompt ?? nothing}\"\n icon-align=\"${props.iconAlign ?? this.iconAlign ?? nothing}\"\n label=\"${props.label ?? this.label ?? nothing}\"\n ?disabled=\"${props.disabled || this.disabled}\"\n ?loading=\"${props.loading || this.loading}\"\n event=\"${event}\"\n ></sb-provider-button>\n `;\n }\n\n render() {\n const overrides = this._overrides;\n\n return html`\n <rtg-field\n id=\"${this.rootId}\"\n part=\"${SbProviderField.parts.root}\"\n data-columns=\"${this.columns}\"\n >\n ${this._providers.map((provider) =>\n this._renderButton(\n overrides.find((o) => o.provider === provider) ?? { provider },\n ),\n )}\n </rtg-field>\n `;\n }\n}\n","import { BaseElement, SaasBaseLayout } from \"@/components\";\nimport { html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { mapStyles } from \"@/utils\";\n\nimport { BREAKPOINTS } from \"@/constants\";\nimport { GapType } from \"./gap.types\";\n\n@customElement(\"sb-gap\")\nexport class SbGap extends BaseElement {\n @property() size = \"8px\";\n @property() type: GapType = \"vertical\";\n\n @property() id = \"\";\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n // ---------------------------\n // SIZE LOGIC\n // ---------------------------\n let sizeStyle: Record<string, string> = {\n width: \"0px\",\n height: \"0px\",\n };\n\n if (this.type === \"vertical\") {\n sizeStyle = {\n width: \"1px\",\n height: this.size,\n };\n } else {\n sizeStyle = {\n height: \"1px\",\n width: this.size,\n };\n }\n\n return html`\n <div\n part=${this.id ? this.id : \"gap\"}\n style=${mapStyles({\n ...sizeStyle,\n })}\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-gap\": SbGap;\n }\n}\n","import { BaseElement } from \"@/components\";\n\nimport { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\n@customElement(\"sb-header\")\nexport class SbHeader extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(`div[part=${this.id ? this.id : \"header\"}]`);\n }\n\n @property({ type: String }) align: string = \"center\";\n @property({ type: String, attribute: \"gap\" }) gap: string = \"8px\";\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.moveLightDomChildrenInto(this._containerElement!);\n }\n\n render() {\n return html` <div part=${this.id ? this.id : \"header\"}></div> `;\n }\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{directive as r,Directive as s,PartType as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends s{constructor(i){if(super(i),this.it=t,i.type!==n.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=r(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","import { LitElement, html, css } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { resolveIconSource, decodeBase64Svg, resolveImageUrl } from \"@/utils\";\nimport { unsafeSVG } from \"lit/directives/unsafe-svg.js\";\nimport { BaseElement } from \"@/components\";\nimport { LogoTheme } from \"./logo.types\";\n\n@customElement(\"sb-logo\")\nexport class SbLogo extends BaseElement {\n @property({ type: String }) id!: string;\n @property({ type: String, attribute: \"image-url\" }) imageUrl!: string;\n\n @property({ type: String, reflect: true }) align: string = \"center\";\n @property({ type: String, reflect: true }) width: string = \"\";\n @property({ type: String, reflect: true }) height: string = \"\";\n\n @state() private theme: LogoTheme = this.getTheme();\n @state() private isSvg = false;\n\n private observer?: MutationObserver;\n\n get _containerElement(): HTMLElement | null {\n return this.querySelector(\".sb-logo-wrapper\");\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.style.display = \"grid\";\n this.updateLayoutFromProps();\n\n this.observer = new MutationObserver(() => {\n this.theme = this.getTheme();\n });\n\n this.observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\"],\n });\n }\n\n updated(changed: Map<string, unknown>) {\n super.updated(changed);\n\n if (changed.has(\"align\") || changed.has(\"width\") || changed.has(\"height\")) {\n this.updateLayoutFromProps();\n }\n }\n\n private updateLayoutFromProps() {\n const el = this._containerElement as HTMLElement | null;\n if (!el) return;\n\n if (this.align) {\n el.style.justifySelf = this.align;\n }\n if (this.width) {\n el.style.width = this.width;\n }\n if (this.height) {\n el.style.height = this.height;\n }\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n super.disconnectedCallback();\n }\n\n private getTheme(): \"light\" | \"dark\" {\n return (\n (document.documentElement.getAttribute(\"data-theme\") as\n | \"light\"\n | \"dark\") ?? \"light\"\n );\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n const resolvedImage = resolveImageUrl(this.imageUrl, this.theme);\n const decodedSvg = resolvedImage ? decodeBase64Svg(resolvedImage) : null;\n this.isSvg = !!decodedSvg;\n\n return html`\n <div class=\"sb-logo-wrapper\">\n ${decodedSvg\n ? unsafeSVG(decodedSvg)\n : html`\n <img\n part=${this.id ? this.id : \"logo\"}\n src=${resolveIconSource(resolvedImage)}\n alt=\"Logo\"\n />\n `}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-logo\": SbLogo;\n }\n}\n","import{html as t,svg as r,mathml as e}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst a=Symbol.for(\"\"),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++}if($===a&&n.push(r[a]),f){const t=n.join(\"$$lit$$\");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u}return t(r,...e)},u=n(t),c=n(r),$=n(e);export{u as html,i as literal,$ as mathml,c as svg,s as unsafeStatic,n as withStatic};\n//# sourceMappingURL=static.js.map\n","import { nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { html, unsafeStatic } from \"lit/static-html.js\";\nimport { BaseElement } from \"@/components\";\nimport { OtpVariant } from \"./otp.types\";\nimport { Auth } from \"@saasbase-io/loginflow-websdk\";\n\n@customElement(\"sb-otp\")\nexport class SbOtp extends BaseElement {\n // ---------------------------\n // PROPS\n // ---------------------------\n\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-input-otp[part=${this.id ? this.id : \"otp\"}]`,\n );\n }\n\n @property() variant: OtpVariant = \"with_separator\";\n @property({ type: Number }) length = 6;\n @property({ type: Number }) timeout = 300;\n\n @property({ attribute: \"data-key\" }) dataKey = \"\";\n @property() event = \"\";\n\n @property({ attribute: \"resend-text\" }) resendText = \"\";\n @property({ attribute: \"resend-button-text\" }) resendButtonText = \"\";\n @property({ attribute: \"resend-event\" }) resendEvent = \"\";\n\n @property() id = \"otp\";\n\n protected createRenderRoot() {\n return this;\n }\n\n // ---------------------------\n // EVENTS (NEW CLEAN API)\n // ---------------------------\n\n private emit(name: string, detail: any) {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail,\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // ---------------------------\n // OTP STRUCTURE\n // ---------------------------\n\n private buildOTPContentHTML(): string {\n const variant = this.variant;\n const length = this.length;\n\n const slotsHTML = (start: number, end: number): string =>\n Array.from(\n { length: end - start },\n (_, i) =>\n `<rtg-input-otp-slot index=\"${start + i}\"></rtg-input-otp-slot>`,\n ).join(\"\");\n\n const group = (inner: string) =>\n `<rtg-input-otp-group>${inner}</rtg-input-otp-group>`;\n\n const sep = `<rtg-input-otp-separator></rtg-input-otp-separator>`;\n\n if (variant === \"simple\") {\n const half = Math.ceil(length / 2);\n return group(slotsHTML(0, half)) + sep + group(slotsHTML(half, length));\n }\n\n if (variant === \"with_separator\") {\n const third = Math.ceil(length / 3);\n return (\n group(slotsHTML(0, third)) +\n sep +\n group(slotsHTML(third, third * 2)) +\n sep +\n group(slotsHTML(third * 2, length))\n );\n }\n\n if (variant === \"with_spacing\") {\n return Array.from({ length }, (_, i) =>\n group(`<rtg-input-otp-slot index=\"${i}\"></rtg-input-otp-slot>`),\n ).join(\"\");\n }\n\n return group(slotsHTML(0, length));\n }\n\n // ---------------------------\n // HANDLERS (NOW EMIT EVENTS)\n // ---------------------------\n\n private handleComplete = async (value: string) => {\n const formData: { [key: string]: any } = {};\n formData[this.dataKey] = value;\n try {\n await Auth.processLoginflowEvent({\n event: this.event,\n data: formData,\n });\n } finally {\n this.emit(\"sb-otp:complete\", {\n id: this.id,\n dataKey: this.dataKey,\n value,\n event: this.event || null,\n });\n }\n };\n\n private handleFocus = () => {\n this.emit(\"sb-otp:focus\", {\n id: this.id,\n dataKey: this.dataKey,\n });\n };\n\n private handleBlur = () => {\n this.emit(\"sb-otp:blur\", {\n id: this.id,\n dataKey: this.dataKey,\n });\n };\n\n private handleResend = async () => {\n if (!this.resendEvent) return;\n try {\n await Auth.processLoginflowEvent({\n event: this.resendEvent,\n });\n } finally {\n this.emit(\"sb-otp:resend\", {\n id: this.id,\n event: this.resendEvent,\n });\n }\n };\n\n // ---------------------------\n // RENDER\n // ---------------------------\n\n render() {\n const variant = this.variant || \"digits_only\";\n\n return html`\n <rtg-input-otp\n part=${this.id ? this.id : \"otp\"}\n id=${this.dataKey ?? this.id ?? nothing}\n name=${this.dataKey ?? this.id ?? nothing}\n maxlength=${this.length}\n pattern=${variant === \"digits_only\" ? \"\\\\d+\" : nothing}\n data-key=${this.dataKey || \"\"}\n .onComplete=${this.handleComplete}\n .onFocus=${this.handleFocus}\n .onBlur=${this.handleBlur}\n >\n ${unsafeStatic(this.buildOTPContentHTML())}\n </rtg-input-otp>\n\n ${this.resendButtonText\n ? html`\n <div class=\"sb-flex\">\n <rtg-typography-p>${this.resendText}</rtg-typography-p>\n\n <rtg-button variant=\"link\" @click=${this.handleResend}>\n ${this.resendButtonText}\n </rtg-button>\n </div>\n `\n : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-otp\": SbOtp;\n }\n}\n","import { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BaseElement } from \"@/components\";\n\n@customElement(\"sb-subtitle\")\nexport class SbSubtitle extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-typography-p[part=${this.id ? this.id : \"subtitle\"}]`,\n );\n }\n @property({ type: String }) id!: string;\n @property({ type: String }) content!: string;\n\n protected createRenderRoot() {\n return this; // Render directly without Shadow DOM\n }\n\n render() {\n return html`\n <rtg-typography-p part=${this.id ? this.id : \"subtitle\"} id=${this.id}>\n ${this.content}\n </rtg-typography-p>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-subtitle\": SbSubtitle;\n }\n}\n","import { PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BaseElement } from \"@/components/wrappers/base-element/base-element\";\nimport { mapStyles, nextPaint } from \"@/utils\";\nimport { ContainerAlignment, ContainerType } from \"./container.types\";\n\n@customElement(\"sb-container\")\nexport class SbContainer extends BaseElement {\n @property() id = \"\";\n\n @property() type: ContainerType = \"flex_column\";\n @property({ type: Boolean }) root: boolean = false;\n @property({ type: Boolean }) form: boolean = false;\n\n @property() alignment?: ContainerAlignment;\n\n protected createRenderRoot() {\n return this;\n }\n\n protected async firstUpdated(_changed: PropertyValues) {\n await this.updateComplete;\n if (!this.root) {\n const outer = this.querySelector(\n `div[part=${this.id ? this.id : \"container\"}]`,\n ) as HTMLElement;\n console.log(\"first updated\", outer);\n if (outer) {\n this.moveLightDomChildrenInto(outer);\n }\n return;\n }\n const outer = this.querySelector(\"rtg-card-content\") as any;\n\n if (outer?.updateComplete) {\n await outer.updateComplete; // 🔥 THIS is the missing piece\n }\n\n const inner = outer?.querySelector('div[data-slot=\"card-content\"]');\n\n if (inner) {\n this.moveLightDomChildrenInto(inner);\n }\n\n await nextPaint();\n }\n\n protected async updated(_changed: PropertyValues) {\n await this.updateComplete;\n await nextPaint();\n // this.updateWidthsIfNeeded();\n }\n\n private get containerStyles() {\n return {\n display: \"flex\",\n \"flex-direction\": this.type === \"flex_column\" ? \"column\" : \"row\",\n };\n }\n\n render() {\n if (this.root) {\n return html`\n <rtg-card part=${this.id ? this.id : \"container\"}>\n <rtg-card-content></rtg-card-content>\n </rtg-card>\n `;\n }\n return html`<div\n part=${this.id ? this.id : \"container\"}\n style=${mapStyles(this.containerStyles)}\n ></div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-container\": SbContainer;\n }\n}\n","import { LitElement, PropertyValues, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { BREAKPOINTS } from \"@/constants\";\nimport { BaseElement } from \"@/components\";\n\n@customElement(\"sb-title\")\nexport class SbTitle extends BaseElement {\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(\n `rtg-typography-h[part=${this.id ? this.id : \"title\"}]`,\n );\n }\n @property({ type: String }) id!: string;\n @property({ type: String }) content!: string;\n\n protected createRenderRoot() {\n return this;\n }\n\n render() {\n return html`\n <rtg-typography-h\n part=${this.id ? this.id : \"title\"}\n level=\"h4\"\n id=${this.id}\n >\n ${this.content}\n </rtg-typography-h>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-title\": SbTitle;\n }\n}\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\n\nimport { genRandSeed } from \"@/utils\";\n\nimport type {\n SbWatermarkProps,\n WatermarkBadge,\n WatermarkLogoAlign,\n WatermarkVariant,\n} from \"./watermark.types\";\n\n/**\n * Saasbase watermark badge used in widgets.\n * @element sb-watermark\n *\n * @slot watermark (rtg-badge)\n * @slot watermark-logo (svg): Saasbase logo\n */\n@customElement(\"sb-watermark\")\nexport class SbWatermark extends LitElement implements SbWatermarkProps {\n private static readonly _ROOT = \"watermark\";\n private static readonly _LOGO = \"logo\";\n\n /**\n * The stable CSS part names exposed for external targeting.\n */\n static get parts() {\n const root = this._ROOT;\n const logo = `${root}-${this._LOGO}`;\n\n return { root, logo };\n }\n\n /**\n * A unique value used as a substring in the generated part/child IDs, when\n * the `child-id` prop is not provided.\n */\n @property({ type: String })\n seed = genRandSeed();\n\n /**\n * The `id` value given to the root child/part and used as the base of other\n * child/part IDs.\n */\n @property({ attribute: \"child-id\", type: String })\n childId?: string;\n\n /**\n * The text used as the badge label.\n */\n @property({ type: String })\n label = \"Powered by\";\n\n /**\n * The visual variant of the watermark, determining font and logo styles.\n */\n @property({ type: String })\n variant: WatermarkVariant = \"brand\";\n\n /**\n * The variant of the root child/part badge element.\n */\n @property({ type: String })\n badge: WatermarkBadge = \"ghost\";\n\n /**\n * Whether the Saasbase logo is rendered at the `\"start\"` or `\"end\"` of the\n * watermark (before or after the label text).\n */\n @property({ attribute: \"logo-align\", type: String })\n logoAlign: WatermarkLogoAlign = \"end\";\n\n /**\n * Overrides default behavior to render into light DOM.\n */\n protected createRenderRoot() {\n return this;\n }\n\n /**\n * The `id` of the root badge element. Equal to `childId` when provided,\n * otherwise derived from the component's part name and `seed`.\n */\n get rootId() {\n return this.childId ?? `sb-${SbWatermark.parts.root}-${this.seed}`;\n }\n\n /**\n * The `id` of the logo SVG element. Always derived from `rootId` with the\n * logo part segment appended.\n */\n get logoId() {\n return `${this.rootId}-${SbWatermark._LOGO}`;\n }\n\n /**\n * Returns the Saasbase logo template.\n */\n private _renderLogo() {\n return html`\n <svg\n id=\"${this.logoId}\"\n part=\"${SbWatermark.parts.logo}\"\n class=\"saasbase-logo rtg-icon-inline-${this.logoAlign}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1400 1400\"\n fill=\"none\"\n >\n <path\n class=\"saasbase-logo-cube\"\n d=\"M590.428 29.5039C658.541 -9.83465 742.459 -9.83465 810.572 29.5039L1225.93 269.394C1294.04 308.732 1336 381.433 1336 460.11V939.89C1336 1018.57 1294.04 1091.27 1225.93 1130.61L810.572 1370.5C742.459 1409.83 658.541 1409.83 590.428 1370.5L175.072 1130.61C106.959 1091.27 65 1018.57 65 939.89V460.11C65 381.433 106.959 308.732 175.072 269.394L590.428 29.5039Z\"\n fill=\"#6366F1\"\n />\n <path\n class=\"saasbase-logo-vector\"\n d=\"M699.69 220L320 439.215C297.723 452.077 284 475.846 284 501.569L284 640M284 640L284 898.431C284 924.154 297.723 947.923 320 960.785L543.81 1090M284 640L531.81 783.072C539.236 787.359 543.81 795.282 543.81 803.856V1090M543.81 1090L663.69 1159.21C685.967 1172.08 713.413 1172.08 735.691 1159.21L1079.38 960.785C1095.38 951.547 1095.38 928.453 1079.38 919.215L771.69 741.569C739.69 723.094 739.69 676.906 771.69 658.431L1115.38 460M1115.38 460V700M1115.38 460L907.54 340\"\n stroke-width=\"140\"\n stroke-linecap=\"round\"\n stroke=\"#FFFFFF\"\n />\n </svg>\n `;\n }\n\n render() {\n return html`\n <rtg-badge\n id=\"${this.rootId}\"\n part=\"${SbWatermark.parts.root}\"\n data-variant=\"${this.variant}\"\n data-badge=\"${this.badge}\"\n variant=\"${this.badge}\"\n >\n ${this.logoAlign === \"start\" ? this._renderLogo() : nothing}\n ${this.label} ${this.logoAlign === \"end\" ? this._renderLogo() : nothing}\n </rtg-badge>\n `;\n }\n}\n","import { LitElement, PropertyValues, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\nimport {\n applyCustomizations,\n injectResponsiveStyles,\n mapStyles,\n splitStyle,\n} from \"@/utils\";\n\nimport { Style } from \"@/types\";\nimport { BREAKPOINTS } from \"@/constants\";\nimport { BaseElement, SaasBaseLayout } from \"@/components\";\n\n@customElement(\"sb-countdown\")\nexport class SbCountdown extends BaseElement {\n // ---------------------------\n // PROPS (from backend HTML)\n // ---------------------------\n\n get _containerElement(): HTMLLIElement | null {\n return this.querySelector(`div[part=${this.id ? this.id : \"countdown\"}]`);\n }\n\n @property() content = \"\";\n @property({ type: Number }) duration = 5;\n\n @property({ attribute: \"redirect-url\" }) redirectUrl = \"/\";\n\n @property() id = \"\";\n\n // ---------------------------\n // STATE\n // ---------------------------\n @state() private seconds = 0;\n private timerId: number | null = null;\n\n protected createRenderRoot() {\n return this;\n }\n\n // ---------------------------\n // LIFECYCLE\n // ---------------------------\n\n protected firstUpdated(_changedProperties: PropertyValues): void {}\n connectedCallback() {\n super.connectedCallback();\n this.initializeCountdown();\n }\n\n disconnectedCallback() {\n this.clearTimer();\n super.disconnectedCallback();\n }\n\n private initializeCountdown() {\n this.seconds = Math.max(0, this.duration || 0);\n this.startTimer();\n }\n\n private startTimer() {\n this.clearTimer();\n\n this.timerId = window.setInterval(() => {\n if (this.seconds <= 1) {\n this.completeCountdown();\n } else {\n this.seconds--;\n }\n }, 1000);\n }\n\n private completeCountdown() {\n this.clearTimer();\n window.location.href = this.redirectUrl || \"/\";\n }\n\n private clearTimer() {\n if (this.timerId !== null) {\n clearInterval(this.timerId);\n this.timerId = null;\n }\n }\n\n private renderContent() {\n return `${this.content} ${this.seconds}s...`;\n }\n\n // ---------------------------\n // RENDER\n // ---------------------------\n render() {\n return html`\n <div part=${this.id ? this.id : \"countdown\"}>\n <rtg-typography-p>${this.renderContent()}</rtg-typography-p>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sb-countdown\": SbCountdown;\n }\n}\n","import { Auth } from \"@saasbase-io/loginflow-websdk\";\n\nexport * from \"@/components/wrappers\";\nexport * from \"@/components/widgets\";\nexport * from \"@/components/ui\";\nexport * from \"@/components/renderers\";\n\nexport function useAuthProvider() {\n return Auth;\n}\n"],"names":["__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","Store","key","domain","store","LoginflowError","code","message","details","HttpClient","endpoint_1","endpoint","options","config","url","timeout","controller","timeoutId","response","errorData","error","data","SessionService","session","decodedToken","storedSession","token","base64","jsonPayload","c","now","expiresAt","expiresIn","refreshThreshold","timeUntilRefresh","newSession","refreshToken","FlowStateManager","storage","storedFlow","flowState","flowType","flow_id","existingState","historyState","FlowTypeDetector","location","path","FlowEventBus","event","handler","_a","handlers","BrowserNavigationTypeDetector","navEntries","legacyNav","Loginflow","flowId","flowEventBus","flowStateManager","navigationTypeDetector","sdk","flowResponse","request","beforeFinishCallback","operation","errorCode","errorMessage","previousState","updatedFlowState","isNewStep","authResult","authData","currentFlowType","existingFlowState","explicitResume","navType","resumeReason","urlParams","metadata","startFlowRequest","rd","Debouncer","delayMs","fn","BrowserHistoryAdapter","state","title","NavigationManager","onFlowRestartNeeded","skipHistoryTracking","historyAdapter","sessionFlowState","urlFlowType","_sessionState","mode","WebAuthnService","caps","conditional","opts","useAutoRegister","createOptions","credential","id","rawId","type","transports","responsePublicKeyAlgorithm","warnOnBrokenImplementation","responsePublicKey","_publicKey","responseAuthenticatorData","errorIdentified","WebAuthnError","useBrowserAutofill","requestOptions","rpId","credentialId","err","descriptor","attachment","attachments","buffer","bytes","str","charCode","base64URLString","padLength","padded","binary","i","cred","optionJSON","publicKey","p","authenticatorSelection","desc","effectiveDomain","isValidDomain","v","methodName","cause","name","hostname","AuthService","flowId_1","_b","res","registerRes","flowStateStr","flowType_1","Auth","t","s","o","n$5","r","n","S","h","a","l","d","u","f","b","y$1","y","_","m","g","$","x","w","E","A","C","V","N","I","L","z","H","M","R","k","Z","B","D","BaseElement","LitElement","attrName","raw","attributes","attr","property","variables","selector","className","variable","target","attributesToMove","attrs","walker","node","seen","nodesToRemove","text","firstNode","specificNodes","nodesToMove","existing","__decorateClass","SaasBaseLayout","contentWrapper","el","html","customElement","s$2","e$3","i$1","envContext","authContext","customizationsContext","renderSpecContext","linearLoaderClass","dashboardWidthClass","modalWidthClass","modalContainerClass","modalLayoutClass","dashboardClass","pageClasses","modalClasses","tabTriggerClass","horizontalTabClass","verticalTabClass","ELEMENT_IDS","clsx","CLASS_PART_SEPARATOR","createClassGroupUtils","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","theme","prefix","getPrefixedClassGroupEntries","classGroup","processClassesRecursively","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","currentClassPartObject","pathPart","func","classGroupEntries","prefixedClassGroup","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","createParseClassName","separator","experimentalParseClassName","isSeparatorSingleCharacter","firstSeparatorCharacter","separatorLength","parseClassName","modifiers","bracketDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","hasImportantModifier","baseClassName","maybePostfixModifierPosition","sortModifiers","sortedModifiers","unsortedModifiers","modifier","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","classGroupsInConflict","classNames","originalClassName","variantModifier","modifierId","classId","conflictGroups","group","twJoin","argument","resolvedValue","string","toValue","mix","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","fractionRegex","stringLengths","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isLength","isNumber","isArbitraryLength","getIsArbitraryValue","isLengthOnly","isArbitraryNumber","isInteger","isPercent","isArbitraryValue","isTshirtSize","sizeLabels","isArbitrarySize","isNever","isArbitraryPosition","imageLabels","isArbitraryImage","isImage","isArbitraryShadow","isShadow","isAny","label","testValue","getDefaultConfig","colors","spacing","blur","brightness","borderColor","borderRadius","borderSpacing","borderWidth","contrast","grayscale","hueRotate","invert","gap","gradientColorStops","gradientColorStopPositions","inset","margin","opacity","padding","saturate","scale","sepia","skew","space","translate","getOverscroll","getOverflow","getSpacingWithAutoAndArbitrary","getSpacingWithArbitrary","getLengthWithEmptyAndArbitrary","getNumberWithAutoAndArbitrary","getPositions","getLineStyles","getBlendModes","getAlign","getZeroAndEmpty","getBreaks","getNumberAndArbitrary","twMerge","cn","inputs","mapStyles","style","changeTheme","initTheme","currentTheme","resolveImageUrl","nextPaint","deepMerge","source","sourceVal","targetVal","mapBtnToCustomizedStyle","variant","customizations","_d","_c","_f","_e","_h","_g","_j","_i","_l","_k","applyCustomizations","defaultClass","defaultStyle","typeCustomization","elementId","isRootContainer","finalClass","finalStyle","mergeCustomization","cust","cClass","cStyle","cFont","rule","RAND_STR_CHARS","RAND_STR_LENGTH","genRandStr","length","rand","genRandSeed","decodeBase64Svg","icon","resolveIconSource","SbProvider","changedProperties","currentPath","authUrl","signinRedirectUrl","provide","SignedOut","nothing","consume","SignedIn","SbAuthenticated","USER_PROFILE_TAB_VALUES","USER_PROFILE_TAB_LIST","USER_PROFILE_MODE","USER_PROFILE_SIDEBAR_DISPLAY_TYPE","USER_PROFILE_ORIENTATION","USER_PROFILE_WIDGETS_LAYOUT","editIcon","svg","accountIcon","personalInfoIcon","locationIcon","urlIcon","closeIcon","burgerMenuIcon","CARD_HEADER_CONTAINER_CLASS","CARD_HEADER_TITLE_CLASS","CARD_INPUT_LABEL_CLASS","CARD_INPUT_FIELD_CLASS","CARD_EDIT_FORM_CONTAINER_CLASS","CARD_CONTAINER_CLASS","CARD_EDITABLE_INPUT_CLASS","CARD_DEFAULT_BUTTON","CARD_OUTLINE_BUTTON","CARD_EDIT_BUTTON","renderOtpContent","baseSlots","items","sep","SbAccountInfo","defaultBtn","outlineBtn","defaultMapped","outlineMapped","isEditable","baseClass","isEditContainer","onEdit","labelClass","labelStyle","inputClass","inputStyle","isColumn","placeholder","onSend","onCancel","containerClass","containerStyle","otpClass","otpStyle","titleClass","titleStyle","SbPersonalInfo","ghostBtn","ghostMapped","input","fields","container","editContainer","headerContainer","headerTitle","activeContainer","_m","_n","item","SbLocationInfo","SbUrlsInfo","Profile","BASE_CLASSES","SIDEBAR_CONTAINER_CLASSES","BURGER_BUTTON_CLASSES","BURGER_LABEL_CLASSES","MOBILE_DRAWER_CLASSES","MOBILE_OVERLAY_CLASSES","DEFAULT_TABS","SbProfileSidebar","parentTabDiv","tabs","isVertical","onClick","tab","isHorizontal","BREAKPOINTS","SbUserProfile","file","reader","avatarContainer","avatarMenu","width","cz","PreviewComponent","SbSignIn","timeoutMs","auth","when","resp","SbSignUp","SbHint","LinearLoader","SbSpinner","radius","circumference","normalizedRadius","badgeAlertIcon","part","badgeXIcon","circleAlertIcon","circleXIcon","shieldAlertIcon","shieldXIcon","ERROR_ICONS","SbError","root","description","SbPasswordField","partSelector","selectors","content","mark","lengths","valid","parentId","validateEvent","messages","minlength","maxlength","errors","SbConfirmField","scope","field","pairValue","pairSelector","SbEmailField","SbIdentifierField","identifiers","start","middle","end","SbNameField","SbPhoneField","SbUsernameField","SbFormSubmit","spinner","FIELDS","FIELD_SELECTORS","FIELD_VALIDATE_EVENTS","SbForm","collector","evt","detail","results","wasDisabled","form","loading","submit","SbFormSeparator","SbFormSwitch","wrapper","prompt","size","SbPasskeyButton","PROVIDER_NAMES","PROVIDER_ICON_PATHS","SbProviderButton","clickEvent","SbProviderField","button","total","provider","overrideEvent","override","self","props","overrides","SbGap","sizeStyle","SbHeader","_changedProperties","SbLogo","changed","resolvedImage","decodedSvg","unsafeSVG","SbOtp","formData","slotsHTML","inner","half","third","unsafeStatic","SbSubtitle","SbContainer","_changed","outer","SbTitle","SbWatermark","logo","SbCountdown","useAuthProvider"],"mappings":"gFAiBA,SAASA,EAAUC,EAASC,EAAYC,EAAGC,EAAW,CAClD,SAASC,EAAMC,EAAO,CAAE,OAAOA,aAAiBH,EAAIG,EAAQ,IAAIH,EAAE,SAAUI,EAAS,CAAEA,EAAQD,CAAK,CAAG,CAAC,CAAG,CAC3G,OAAO,IAAKH,IAAMA,EAAI,UAAU,SAAUI,EAASC,EAAQ,CACvD,SAASC,EAAUH,EAAO,CAAE,GAAI,CAAEI,EAAKN,EAAU,KAAKE,CAAK,CAAC,CAAG,OAASK,EAAG,CAAEH,EAAOG,CAAC,CAAG,CAAE,CAC1F,SAASC,EAASN,EAAO,CAAE,GAAI,CAAEI,EAAKN,EAAU,MAASE,CAAK,CAAC,CAAG,OAASK,EAAG,CAAEH,EAAOG,CAAC,CAAG,CAAE,CAC7F,SAASD,EAAKG,EAAQ,CAAEA,EAAO,KAAON,EAAQM,EAAO,KAAK,EAAIR,EAAMQ,EAAO,KAAK,EAAE,KAAKJ,EAAWG,CAAQ,CAAG,CAC7GF,GAAMN,EAAYA,EAAU,MAAMH,EAASC,GAAc,CAAA,CAAE,GAAG,KAAI,CAAE,CACxE,CAAC,CACL,CAOA,MAAMY,EAAM,CACR,aAAc,CACV,KAAK,KAAO,IAAI,GACpB,CACA,WAAW,UAAW,CAClB,OAAKA,GAAM,WACPA,GAAM,SAAW,IAAIA,IAEl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