@saasbase-io/core-elements 1.1.5 → 1.1.6
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function M(e,t,s,o){function r(n){return n instanceof s?n:new s(function(i){i(n)})}return new(s||(s=Promise))(function(n,i){function a(m){try{u(o.next(m))}catch(f){i(f)}}function d(m){try{u(o.throw(m))}catch(f){i(f)}}function u(m){m.done?n(m.value):r(m.value).then(a,d)}u((o=o.apply(e,t||[])).next())})}class Je{constructor(){this.data=new Map}static get Instance(){return Je.instance||(Je.instance=new Je),Je.instance}get(t){return this.data.get(t)}set(t,s){this.data.set(t,s)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const ft=Je.Instance;class Z extends Error{constructor(t,s,o){super(s),this.name="LoginflowError",this.code=t,this.details=o}}class te{constructor(){}static get Instance(){return te.instance||(te.instance=new te),te.instance}request(t){return M(this,arguments,void 0,function*(s,o={}){const r=ft.getConfig(),n=`${ft.getApiBaseUrl()}${s}`,i=5e4,a=new AbortController,d=setTimeout(()=>a.abort(),i);try{const u=yield fetch(n,Object.assign(Object.assign({},o),{signal:a.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},r.apiKey&&{Authorization:`Bearer ${r.apiKey}`}),r.headers),o.headers)}));if(clearTimeout(d),!u.ok){const m=yield u.json().catch(()=>({}));throw new Z(m.code||"API_ERROR",m.message||`HTTP ${u.status}: ${u.statusText}`,m.details)}return yield u.json()}catch(u){throw clearTimeout(d),u instanceof Z?u:u instanceof Error?u.name==="AbortError"?new Z("TIMEOUT","Request timeout"):new Z("NETWORK_ERROR",u.message):new Z("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,s){return M(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:s?JSON.stringify(s):void 0})})}get(t){return M(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class ct{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return ct.instance||(ct.instance=new ct),ct.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const s=this.decodeJWT(t.id_token);return s||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(o).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(r)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const s=Date.now(),o=t.expires_at,r=t.expires_in||3600,n=s+r*1e3*.2;return o<=n}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const s=Date.now(),o=t.expires_at,r=t.expires_in||3600,n=o-s-r*1e3*.2;n>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},n))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(s=>(s&&(this.setCurrentSession(s),this.scheduleTokenRefresh()),s)).catch(s=>(console.error("Background token refresh failed:",s),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return M(this,void 0,void 0,function*(){try{const s=yield te.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:s.id_token,access_token:s.access_token,refresh_token:s.refresh_token,expires_in:s.expires_in,expires_at:Date.now()+s.expires_in*1e3}}catch(s){return s instanceof Z?console.error("Token refresh failed:",s.message,s.details):console.error("Token refresh failed:",s),this.clearSession(),null}})}}class Oa{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const s=JSON.parse(t);return this.isExpired(s)?(this.clearFlowState(),null):s}catch{return this.clearFlowState(),null}}saveFlowState(t,s,o){const r=Date.now(),n=this.getFlowState(),i={flowType:t,flow_id:s,state:o.state,startedAt:(n==null?void 0:n.startedAt)||r,lastUpdatedAt:r,render_spec:o.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(t){const s={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(s))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class cs{static detect(t,s=window.location){const o=s.pathname.toLowerCase();return o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}}class Aa{constructor(){this.listeners=new Map}on(t,s){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(s)}off(t,s){var o;(o=this.listeners.get(t))===null||o===void 0||o.delete(s)}emit(t,s){const o=this.listeners.get(t);o&&o.forEach(r=>{try{r(s)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${t}:`,n)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class _c{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const s=performance.navigation;if(s)switch(s.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class un{constructor(t,s,o=window.location,r,n){this.httpClient=te.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const i=ft.getConfig();if(!i.domain)throw new Z("CONFIG_ERROR","Domain is required");if(!i.clientId)throw new Z("CONFIG_ERROR","Client ID is required");if(!i.clientSecret)throw new Z("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=o,this.flowStateManager=r||new Oa,this.flowEventBus=s||new Aa,this.navigationTypeDetector=n||new _c,ct.Instance.cleanExpiredSession(),ct.Instance.scheduleTokenRefresh()}static init(t,s,o,r,n){return M(this,void 0,void 0,function*(){const i=new un(t,s,o,r,n),a=yield i.initializeFlowInternal();return{sdk:i,flowType:a.flowType,isResumed:a.isResumed,state:a.state,render_spec:a.render_spec,auth_result:a.auth_result}})}startFlow(t,s){return M(this,void 0,void 0,function*(){if(!s.client_id)throw new Z("VALIDATION_ERROR","Client ID is required");const o=`/login-flow/v1/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,s),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return M(this,void 0,void 0,function*(){const s=`/login-flow/v1/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(s),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,s){return M(this,void 0,void 0,function*(){if(!t.event)throw new Z("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?yield o():yield this.processServerEvent(t,s)})}executeFlowRequest(t,s,o,r){return M(this,void 0,void 0,function*(){try{const n=yield t();return r&&(yield r(n)),this.processAuthResult(n.auth_result),n.redirection&&this.redirect(n.redirection),n}catch(n){throw n instanceof Z?n:new Z(s,o,n instanceof Error?{originalError:n.message,stack:n.stack}:n)}})}processServerEvent(t,s){return M(this,void 0,void 0,function*(){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new Z("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const r=o.state,n=`/login-flow/v1/${o.flowType}/events`,i=yield this.executeFlowRequest(()=>this.httpClient.post(n,t),"PROCESS_EVENT_ERROR","Failed to process event",s);if(!i.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,i);const a=this.flowStateManager.getFlowState();if(a){const d=r!==i.state;this.flowEventBus.emit("flow:updated",{flowState:a,isNewStep:d})}}return i})}processAuthResult(t){if(t){const s={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};ct.Instance.setCurrentSession(s),ct.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return M(this,void 0,void 0,function*(){const t=ft.getConfig(),s=cs.detect(t,this.location);this.validateFlowType(s);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,s)?yield this.resumeExistingFlow(o,s):yield this.startNewFlow(s)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new Z("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,s){if(!t)return!1;const r=new URLSearchParams(this.location.search).get("resume")==="true",n=this.navigationTypeDetector.getNavigationType();if(n==="navigate"&&!r)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${n}), starting new flow`),!1;if(t.flowType!==s)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${s}, starting new flow, flow_id: ${this.flowId}`),!1;if(s==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const i=r?"explicit resume=true":`navigation type: ${n}`;return console.log(`Resuming existing flow (${i})`),!0}resumeExistingFlow(t,s){return M(this,void 0,void 0,function*(){try{const o=yield this.resumeFlow(s);if(!o.auth_result){this.flowStateManager.saveFlowState(s,t.flow_id,o);const r=this.flowStateManager.getFlowState();r&&this.flowEventBus.emit("flow:resumed",{flowState:r})}return{flowType:s,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),yield this.startNewFlow(s)}})}startNewFlow(t){return M(this,void 0,void 0,function*(){const s=ft.getConfig(),o={client_id:s.clientId,client_secret:s.clientSecret,origin_url:this.location.href,signin_url:s.signinUrl,signup_url:s.signupUrl,locale:s.locale||"en",flow_id:this.determineFlowId(t)},r=yield this.startFlow(t,o);if(!r.auth_result){this.flowStateManager.saveFlowState(t,o.flow_id,r);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:started",{flowState:n})}return{flowType:t,isResumed:!1,state:r.state,render_spec:r.render_spec,auth_result:r.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new Z("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return M(this,void 0,void 0,function*(){const t=ft.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return M(this,void 0,void 0,function*(){const t=ft.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class Cc{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class Sc{pushState(t,s,o){history.pushState(t,s,o)}replaceState(t,s,o){history.replaceState(t,s,o)}get state(){return history.state}}class $c{constructor(t,s,o=!1,r=window.location,n,i){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=s,this.skipHistoryTracking=o,this.debouncer=new Cc(200),this.location=r,this.flowStateManager=n||new Oa,this.historyAdapter=i||new Sc,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return M(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const s=t.state,o=this.flowStateManager.getFlowState(),r=ft.getConfig(),n=cs.detect(r,this.location);if(s&&this.restoreHistoryStateToSession(s),this.shouldRestartFlow(s,o,n)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return M(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,s=this.flowStateManager.getFlowState(),o=ft.getConfig(),r=cs.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,s,r)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,s,o){return t&&t.flowType!==o?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",o),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return M(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,s){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const o=this.createHistoryState(t);try{s==="push"?(this.historyAdapter.pushState(o,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(o,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(r){console.error("[NavigationManager] Failed to update history:",r)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const s=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,s)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let fe=new AbortController;class Ec{constructor(){this.httpClient=te.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return M(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,s){return M(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:s,flow_type:t})}catch(o){return console.error("error",o),null}})}fetchPublicKeyCredentialCreationOptions(t,s){return M(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:s,flow_type:t})}catch(o){return console.error("error",o),null}})}startRegistration(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;fe.abort(),fe=new AbortController;const o=this.toPublicKeyCredentialCreationOptions(t),r={signal:fe.signal,publicKey:o};if(s){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;r.mediation="conditional"}try{const n=yield navigator.credentials.create(r);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:a,response:d,type:u}=n;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let f;if(typeof d.getPublicKeyAlgorithm=="function")try{f=d.getPublicKeyAlgorithm()}catch(x){co("getPublicKeyAlgorithm()",x)}let y;if(typeof d.getPublicKey=="function")try{const x=d.getPublicKey();x!==null&&(y=this.bufferToBase64URLString(x))}catch(x){co("getPublicKey()",x)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(x){co("getAuthenticatorData()",x)}return{id:i,rawId:this.bufferToBase64URLString(a),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:f,publicKey:y,authenticatorData:w},type:u,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:r});return i instanceof ve?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}})}startAuthentication(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;fe.abort(),fe=new AbortController;const o=this.toPublicKeyCredentialRequestOptions(t),r={signal:fe.signal,publicKey:o};if(s){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;r.mediation="conditional",r.publicKey&&(r.publicKey.allowCredentials=[])}try{const n=yield navigator.credentials.get(r);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:r});return i instanceof ve?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}})}signalUnknownCredential(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:s})}catch(o){console.error("Failed to signal unknown credential:",o)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(s){console.error("Failed to signal current user details:",s)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:s}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(s),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const s=["cross-platform","platform"];if(t&&!(s.indexOf(t)<0))return t}bufferToBase64URLString(t){const s=new Uint8Array(t);let o="";for(const n of s)o+=String.fromCharCode(n);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const s=t.replace(/-/g,"+").replace(/_/g,"/"),o=(4-s.length%4)%4,r=s.padEnd(s.length+o,"="),n=atob(r),i=new ArrayBuffer(n.length),a=new Uint8Array(i);for(let d=0;d<n.length;d++)a[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const s=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(s.clientDataJSON),authenticatorData:this.bufferToBase64URLString(s.authenticatorData),signature:this.bufferToBase64URLString(s.signature),userHandle:s.userHandle?this.bufferToBase64URLString(s.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var s;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const o={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(r=>({alg:r.alg,type:r.type})),timeout:t.timeout};if(t.attestation&&(o.attestation=t.attestation),t.extensions!==void 0&&(o.extensions=t.extensions),t.authenticatorSelection){const r={};t.authenticatorSelection.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(r.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(r.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(r.userVerification=t.authenticatorSelection.userVerification),o.authenticatorSelection=r}return!((s=t.excludeCredentials)===null||s===void 0)&&s.length&&(o.excludeCredentials=t.excludeCredentials.map(r=>this.toPublicKeyCredentialDescriptor(r))),o}toPublicKeyCredentialRequestOptions(t){var s;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const o={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(o.rpId=t.rpId),t.timeout!==void 0&&(o.timeout=t.timeout),t.userVerification!==void 0&&(o.userVerification=t.userVerification),t.extensions!==void 0&&(o.extensions=t.extensions),!((s=t.allowCredentials)===null||s===void 0)&&s.length&&(o.allowCredentials=t.allowCredentials.map(r=>this.toPublicKeyCredentialDescriptor(r))),o}identifyAuthenticationError({error:t,options:s}){const{publicKey:o}=s;if(!o)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(s.signal instanceof AbortSignal)return new ve({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new ve({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(kc(r)){if(o.rpId!==r)return new ve({message:`The RP ID "${o.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ve({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new ve({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){fe.abort()}}function co(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2
|
-
`,t)}class ve extends Error{constructor({message:t,code:s,cause:o,name:r}){super(t),this.name=r??o.name,this.code=s}}function kc(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class Qe{constructor(){this.configured=!1,this.loginflow=null,this.navigationManager=null,this.flowEventBus=null,this.webauthnService=null}static get Instance(){return Qe.instance||(Qe.instance=new Qe),Qe.instance}ensureConfigured(){if(!this.configured)throw new Z("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new Z("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}startLoginflowInternal(t){return M(this,arguments,void 0,function*(s,o=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new Ec,this.webauthnService.detectCapabilities(),this.flowEventBus=new Aa,this.navigationManager=new $c(this.flowEventBus,()=>M(this,void 0,void 0,function*(){console.log("[AuthService] Navigation restart triggered, restarting loginflow"),yield this.startLoginflowInternal(void 0,!1)}),o);const r=yield un.init(s,this.flowEventBus),n=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function M(e,t,s,o){function r(n){return n instanceof s?n:new s(function(i){i(n)})}return new(s||(s=Promise))(function(n,i){function a(m){try{u(o.next(m))}catch(f){i(f)}}function d(m){try{u(o.throw(m))}catch(f){i(f)}}function u(m){m.done?n(m.value):r(m.value).then(a,d)}u((o=o.apply(e,t||[])).next())})}class Je{constructor(){this.data=new Map}static get Instance(){return Je.instance||(Je.instance=new Je),Je.instance}get(t){return this.data.get(t)}set(t,s){this.data.set(t,s)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const vt=Je.Instance;class Z extends Error{constructor(t,s,o){super(s),this.name="LoginflowError",this.code=t,this.details=o}}class te{constructor(){}static get Instance(){return te.instance||(te.instance=new te),te.instance}request(t){return M(this,arguments,void 0,function*(s,o={}){const r=vt.getConfig(),n=`${vt.getApiBaseUrl()}${s}`,i=5e4,a=new AbortController,d=setTimeout(()=>a.abort(),i);try{const u=yield fetch(n,Object.assign(Object.assign({},o),{signal:a.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},r.apiKey&&{Authorization:`Bearer ${r.apiKey}`}),r.headers),o.headers)}));if(clearTimeout(d),!u.ok){const m=yield u.json().catch(()=>({}));throw new Z(m.code||"API_ERROR",m.message||`HTTP ${u.status}: ${u.statusText}`,m.details)}return yield u.json()}catch(u){throw clearTimeout(d),u instanceof Z?u:u instanceof Error?u.name==="AbortError"?new Z("TIMEOUT","Request timeout"):new Z("NETWORK_ERROR",u.message):new Z("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,s){return M(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:s?JSON.stringify(s):void 0})})}get(t){return M(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class dt{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return dt.instance||(dt.instance=new dt),dt.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const s=this.decodeJWT(t.id_token);return s||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(o).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(r)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const s=Date.now(),o=t.expires_at,r=t.expires_in||3600,n=s+r*1e3*.2;return o<=n}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const s=Date.now(),o=t.expires_at,r=t.expires_in||3600,n=o-s-r*1e3*.2;n>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},n))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(s=>(s&&(this.setCurrentSession(s),this.scheduleTokenRefresh()),s)).catch(s=>(console.error("Background token refresh failed:",s),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return M(this,void 0,void 0,function*(){try{const s=yield te.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:s.id_token,access_token:s.access_token,refresh_token:s.refresh_token,expires_in:s.expires_in,expires_at:Date.now()+s.expires_in*1e3}}catch(s){return s instanceof Z?console.error("Token refresh failed:",s.message,s.details):console.error("Token refresh failed:",s),this.clearSession(),null}})}}class Oa{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const s=JSON.parse(t);return this.isExpired(s)?(this.clearFlowState(),null):s}catch{return this.clearFlowState(),null}}saveFlowState(t,s,o){const r=Date.now(),n=this.getFlowState(),i={flowType:t,flow_id:s,state:o.state,startedAt:(n==null?void 0:n.startedAt)||r,lastUpdatedAt:r,render_spec:o.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(t){const s={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(s))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class cs{static detect(t,s=window.location){const o=s.pathname.toLowerCase();return o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}}class Aa{constructor(){this.listeners=new Map}on(t,s){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(s)}off(t,s){var o;(o=this.listeners.get(t))===null||o===void 0||o.delete(s)}emit(t,s){const o=this.listeners.get(t);o&&o.forEach(r=>{try{r(s)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${t}:`,n)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class _c{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const s=performance.navigation;if(s)switch(s.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class un{constructor(t,s,o=window.location,r,n){this.httpClient=te.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const i=vt.getConfig();if(!i.domain)throw new Z("CONFIG_ERROR","Domain is required");if(!i.clientId)throw new Z("CONFIG_ERROR","Client ID is required");if(!i.clientSecret)throw new Z("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=o,this.flowStateManager=r||new Oa,this.flowEventBus=s||new Aa,this.navigationTypeDetector=n||new _c,dt.Instance.cleanExpiredSession(),dt.Instance.scheduleTokenRefresh()}static init(t,s,o,r,n){return M(this,void 0,void 0,function*(){const i=new un(t,s,o,r,n),a=yield i.initializeFlowInternal();return{sdk:i,flowType:a.flowType,isResumed:a.isResumed,state:a.state,render_spec:a.render_spec,auth_result:a.auth_result}})}startFlow(t,s){return M(this,void 0,void 0,function*(){if(!s.client_id)throw new Z("VALIDATION_ERROR","Client ID is required");const o=`/login-flow/v1/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,s),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return M(this,void 0,void 0,function*(){const s=`/login-flow/v1/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(s),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,s){return M(this,void 0,void 0,function*(){if(!t.event)throw new Z("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?yield o():yield this.processServerEvent(t,s)})}executeFlowRequest(t,s,o,r){return M(this,void 0,void 0,function*(){try{const n=yield t();return r&&(yield r(n)),this.processAuthResult(n.auth_result),n.redirection&&this.redirect(n.redirection),n}catch(n){throw n instanceof Z?n:new Z(s,o,n instanceof Error?{originalError:n.message,stack:n.stack}:n)}})}processServerEvent(t,s){return M(this,void 0,void 0,function*(){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new Z("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const r=o.state,n=`/login-flow/v1/${o.flowType}/events`,i=yield this.executeFlowRequest(()=>this.httpClient.post(n,t),"PROCESS_EVENT_ERROR","Failed to process event",s);if(!i.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,i);const a=this.flowStateManager.getFlowState();if(a){const d=r!==i.state;this.flowEventBus.emit("flow:updated",{flowState:a,isNewStep:d})}}return i})}processAuthResult(t){if(t){const s={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};dt.Instance.setCurrentSession(s),dt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return M(this,void 0,void 0,function*(){const t=vt.getConfig(),s=cs.detect(t,this.location);this.validateFlowType(s);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,s)?yield this.resumeExistingFlow(o,s):yield this.startNewFlow(s)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new Z("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,s){if(!t)return!1;const r=new URLSearchParams(this.location.search).get("resume")==="true",n=this.navigationTypeDetector.getNavigationType();if(n==="navigate"&&!r)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${n}), starting new flow`),!1;if(t.flowType!==s)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${s}, starting new flow, flow_id: ${this.flowId}`),!1;if(s==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const i=r?"explicit resume=true":`navigation type: ${n}`;return console.log(`Resuming existing flow (${i})`),!0}resumeExistingFlow(t,s){return M(this,void 0,void 0,function*(){try{const o=yield this.resumeFlow(s);if(!o.auth_result){this.flowStateManager.saveFlowState(s,t.flow_id,o);const r=this.flowStateManager.getFlowState();r&&this.flowEventBus.emit("flow:resumed",{flowState:r})}return{flowType:s,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),yield this.startNewFlow(s)}})}startNewFlow(t){return M(this,void 0,void 0,function*(){const s=vt.getConfig(),o={client_id:s.clientId,client_secret:s.clientSecret,origin_url:this.location.href,signin_url:s.signinUrl,signup_url:s.signupUrl,locale:s.locale||"en",flow_id:this.determineFlowId(t)},r=yield this.startFlow(t,o);if(!r.auth_result){this.flowStateManager.saveFlowState(t,o.flow_id,r);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:started",{flowState:n})}return{flowType:t,isResumed:!1,state:r.state,render_spec:r.render_spec,auth_result:r.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new Z("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return M(this,void 0,void 0,function*(){const t=vt.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return M(this,void 0,void 0,function*(){const t=vt.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class Cc{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class Sc{pushState(t,s,o){history.pushState(t,s,o)}replaceState(t,s,o){history.replaceState(t,s,o)}get state(){return history.state}}class $c{constructor(t,s,o=!1,r=window.location,n,i){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=s,this.skipHistoryTracking=o,this.debouncer=new Cc(200),this.location=r,this.flowStateManager=n||new Oa,this.historyAdapter=i||new Sc,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return M(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const s=t.state,o=this.flowStateManager.getFlowState(),r=vt.getConfig(),n=cs.detect(r,this.location);if(s&&this.restoreHistoryStateToSession(s),this.shouldRestartFlow(s,o,n)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return M(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,s=this.flowStateManager.getFlowState(),o=vt.getConfig(),r=cs.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,s,r)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,s,o){return t&&t.flowType!==o?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",o),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return M(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,s){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const o=this.createHistoryState(t);try{s==="push"?(this.historyAdapter.pushState(o,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(o,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(r){console.error("[NavigationManager] Failed to update history:",r)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const s=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,s)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let fe=new AbortController;class Ec{constructor(){this.httpClient=te.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return M(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,s){return M(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:s,flow_type:t})}catch(o){return console.error("error",o),null}})}fetchPublicKeyCredentialCreationOptions(t,s){return M(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:s,flow_type:t})}catch(o){return console.error("error",o),null}})}startRegistration(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;fe.abort(),fe=new AbortController;const o=this.toPublicKeyCredentialCreationOptions(t),r={signal:fe.signal,publicKey:o};if(s){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;r.mediation="conditional"}try{const n=yield navigator.credentials.create(r);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:a,response:d,type:u}=n;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let f;if(typeof d.getPublicKeyAlgorithm=="function")try{f=d.getPublicKeyAlgorithm()}catch(x){co("getPublicKeyAlgorithm()",x)}let y;if(typeof d.getPublicKey=="function")try{const x=d.getPublicKey();x!==null&&(y=this.bufferToBase64URLString(x))}catch(x){co("getPublicKey()",x)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(x){co("getAuthenticatorData()",x)}return{id:i,rawId:this.bufferToBase64URLString(a),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:f,publicKey:y,authenticatorData:w},type:u,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:r});return i instanceof ve?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}})}startAuthentication(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;fe.abort(),fe=new AbortController;const o=this.toPublicKeyCredentialRequestOptions(t),r={signal:fe.signal,publicKey:o};if(s){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;r.mediation="conditional",r.publicKey&&(r.publicKey.allowCredentials=[])}try{const n=yield navigator.credentials.get(r);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:r});return i instanceof ve?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}})}signalUnknownCredential(t,s){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:s})}catch(o){console.error("Failed to signal unknown credential:",o)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return M(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(s){console.error("Failed to signal current user details:",s)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:s}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(s),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const s=["cross-platform","platform"];if(t&&!(s.indexOf(t)<0))return t}bufferToBase64URLString(t){const s=new Uint8Array(t);let o="";for(const n of s)o+=String.fromCharCode(n);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const s=t.replace(/-/g,"+").replace(/_/g,"/"),o=(4-s.length%4)%4,r=s.padEnd(s.length+o,"="),n=atob(r),i=new ArrayBuffer(n.length),a=new Uint8Array(i);for(let d=0;d<n.length;d++)a[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const s=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(s.clientDataJSON),authenticatorData:this.bufferToBase64URLString(s.authenticatorData),signature:this.bufferToBase64URLString(s.signature),userHandle:s.userHandle?this.bufferToBase64URLString(s.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var s;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const o={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(r=>({alg:r.alg,type:r.type})),timeout:t.timeout};if(t.attestation&&(o.attestation=t.attestation),t.extensions!==void 0&&(o.extensions=t.extensions),t.authenticatorSelection){const r={};t.authenticatorSelection.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(r.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(r.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(r.userVerification=t.authenticatorSelection.userVerification),o.authenticatorSelection=r}return!((s=t.excludeCredentials)===null||s===void 0)&&s.length&&(o.excludeCredentials=t.excludeCredentials.map(r=>this.toPublicKeyCredentialDescriptor(r))),o}toPublicKeyCredentialRequestOptions(t){var s;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const o={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(o.rpId=t.rpId),t.timeout!==void 0&&(o.timeout=t.timeout),t.userVerification!==void 0&&(o.userVerification=t.userVerification),t.extensions!==void 0&&(o.extensions=t.extensions),!((s=t.allowCredentials)===null||s===void 0)&&s.length&&(o.allowCredentials=t.allowCredentials.map(r=>this.toPublicKeyCredentialDescriptor(r))),o}identifyAuthenticationError({error:t,options:s}){const{publicKey:o}=s;if(!o)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(s.signal instanceof AbortSignal)return new ve({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new ve({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(kc(r)){if(o.rpId!==r)return new ve({message:`The RP ID "${o.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ve({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new ve({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){fe.abort()}}function co(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2
|
+
`,t)}class ve extends Error{constructor({message:t,code:s,cause:o,name:r}){super(t),this.name=r??o.name,this.code=s}}function kc(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class Qe{constructor(){this.configured=!1,this.loginflow=null,this.navigationManager=null,this.flowEventBus=null,this.webauthnService=null}static get Instance(){return Qe.instance||(Qe.instance=new Qe),Qe.instance}ensureConfigured(){if(!this.configured)throw new Z("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new Z("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}startLoginflowInternal(t){return M(this,arguments,void 0,function*(s,o=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new Ec,this.webauthnService.detectCapabilities(),this.flowEventBus=new Aa,this.navigationManager=new $c(this.flowEventBus,()=>M(this,void 0,void 0,function*(){console.log("[AuthService] Navigation restart triggered, restarting loginflow"),yield this.startLoginflowInternal(void 0,!1)}),o);const r=yield un.init(s,this.flowEventBus),n=vt.getConfig();this.startPasskeyAuthentication(r.flowType,!0),this.loginflow=r.sdk;const i={flowType:r.flowType,isResumed:r.isResumed,state:r.state,render_spec:r.render_spec,auth_result:r.auth_result};return n.onFlowStateChange&&n.onFlowStateChange({eventType:r.isResumed?"flow_resumed":"flow_started",flowType:r.flowType,state:r.state,render_spec:r.render_spec,auth_result:r.auth_result,isResumed:r.isResumed}),i})}configure(t){if(!t.domain||!t.clientId||!t.clientSecret)throw new Z("CONFIG_ERROR","domain, clientId, and clientSecret are required");vt.setConfig(t),this.configured=!0}isAuthenticated(){return this.ensureConfigured(),dt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),dt.Instance.getCurrentSession()}getAuthenticatedUser(){return this.ensureConfigured(),dt.Instance.getAuthenticatedUser()}startLoginflow(t){return M(this,void 0,void 0,function*(){return this.startLoginflowInternal(t,!1)})}processLoginflowEvent(t){return M(this,void 0,void 0,function*(){var s,o;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=vt.getConfig(),n=cs.detect(r,location);if(t.event==="signin_with_passkey"&&!(!((s=t.data)===null||s===void 0)&&s.credential_request)){const a=yield this.getPasskeyCredential(n,!1);if(!a||!a.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:a.cred}}if(t.event==="register_passkey"&&!(!((o=t.data)===null||o===void 0)&&o.conditional)){console.log("attempt to register a passkey");const a=yield this.createPasskeyCredential(n,!1);if(!a)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:a,conditional:!1}}const i=yield this.loginflow.processEvent(t,a=>M(this,void 0,void 0,function*(){var d;if(!((d=a.data)===null||d===void 0)&&d.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const u=yield this.registerPasskey(n,!0);u&&(u.render_spec=void 0,a.render_spec=void 0)}}));if(console.log("render spec",i.render_spec),r.onFlowStateChange){const a=sessionStorage.getItem("saasbase_loginflow_state");let d="custom";if(a)try{d=JSON.parse(a).flowType}catch(u){console.error("Failed to parse flow state:",u)}r.onFlowStateChange({eventType:"flow_updated",flowType:d,state:i.state,render_spec:i.render_spec,auth_result:i.auth_result})}return i})}getPasskeyCredential(t,s){return M(this,void 0,void 0,function*(){var o,r;const n=yield(o=this.webauthnService)===null||o===void 0?void 0:o.fetchPublicKeyCredentialRequestOptions(t,s);if(!n)return console.error("failed to fetch public key request options"),null;try{return{cred:yield(r=this.webauthnService)===null||r===void 0?void 0:r.startAuthentication(n,s),options:n}}catch(i){return console.error("error starting authentication",i),null}})}startPasskeyAuthentication(t){return M(this,arguments,void 0,function*(s,o=!1){var r,n;const i=yield this.getPasskeyCredential(s,o);if(!i||!i.cred){console.error("no credential found");return}const{cred:a,options:d}=i;try{((r=(yield this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:a}})).data)===null||r===void 0?void 0:r.error)==="CredentialNotFound"&&(d.rpId&&a.id?(n=this.webauthnService)===null||n===void 0||n.signalUnknownCredential(d.rpId,a.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(u){console.error("failed to signin with passkey",u)}})}createPasskeyCredential(t,s){return M(this,void 0,void 0,function*(){var o,r;try{const n=yield(o=this.webauthnService)===null||o===void 0?void 0:o.fetchPublicKeyCredentialCreationOptions(t,s);if(!n){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(r=this.webauthnService)===null||r===void 0?void 0:r.startRegistration(n,s)}catch(n){console.log("error",n)}})}registerPasskey(t){return M(this,arguments,void 0,function*(s,o=!1){try{const r=yield this.createPasskeyCredential(s,o),n=yield this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:r,conditional:o}});return console.log("passkey creation res",n),n}catch(r){console.log("error",r)}})}signOut(){this.ensureConfigured(),dt.Instance.clearSession(),dt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),window.location.reload(),console.log("Refreshed the page to clear any in-memory state")}}const nt=Qe.Instance;/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
* @license
|
|
86
86
|
* Copyright 2022 Google LLC
|
|
87
87
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
|
-
*/function gt({context:e,subscribe:t}){return(s,o)=>{typeof o=="object"?o.addInitializer((function(){new wi(this,{context:e,callback:r=>{s.set.call(this,r)},subscribe:t})})):s.constructor.addInitializer((r=>{new wi(r,{context:e,callback:n=>{r[o]=n},subscribe:t})}))}}const mo=new WeakMap,od=Ls(class extends Fa{render(e){return A}update(e,[t]){var o;const s=t!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=t,this.ht=(o=e.options)==null?void 0:o.host,this.rt(this.ct=e.element)),A}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let s=mo.get(t);s===void 0&&(s=new WeakMap,mo.set(t,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=mo.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),bo="rtg-flex rtg-h-9 rtg-w-full rtg-no-autofill-bg rtg-rounded-md rtg-border rtg-border-input autofill:rtg-bg-transparent rtg-bg-transparent rtg-px-3 rtg-py-1 rtg-text-sm rtg-shadow-sm rtg-transition-colors file:rtg-border-0 file:rtg-bg-transparent file:rtg-text-sm file:rtg-font-medium placeholder:rtg-text-muted-foreground focus-visible:rtg-outline-none focus-visible:rtg-ring-[3px] focus-visible:rtg-ring-custom-outline focus-visible:rtg-border-ring disabled:rtg-opacity-50 input-base";function qa(e){var t,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(s=qa(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function Va(){for(var e,t,s=0,o="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=qa(e))&&(o&&(o+=" "),o+=t);return o}const fn="-",nd=e=>{const t=ad(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{const n=r.split(fn);return n[0]===""&&n.length!==1&&n.shift(),Ha(n,t)||id(r)},getConflictingClassGroupIds:(r,n)=>{const i=s[r]||[];return n&&o[r]?[...i,...o[r]]:i}}},Ha=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?Ha(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(fn);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},_i=/^\[(.+)\]$/,id=e=>{if(_i.test(e)){const t=_i.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},ad=e=>{const{theme:t,prefix:s}=e,o={nextPart:new Map,validators:[]};return cd(Object.entries(e.classGroups),s).forEach(([r,n])=>{So(n,o,r,t)}),o},So=(e,t,s,o)=>{e.forEach(r=>{if(typeof r=="string"){const n=r===""?t:Ci(t,r);n.classGroupId=s;return}if(typeof r=="function"){if(ld(r)){So(r(o),t,s,o);return}t.validators.push({validator:r,classGroupId:s});return}Object.entries(r).forEach(([n,i])=>{So(i,Ci(t,n),s,o)})})},Ci=(e,t)=>{let s=e;return t.split(fn).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},ld=e=>e.isThemeGetter,cd=(e,t)=>t?e.map(([s,o])=>{const r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[s,r]}):e,dd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const r=(n,i)=>{s.set(n,i),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let i=s.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return r(n,i),i},set(n,i){s.has(n)?s.set(n,i):r(n,i)}}},Ga="!",ud=e=>{const{separator:t,experimentalParseClassName:s}=e,o=t.length===1,r=t[0],n=t.length,i=a=>{const d=[];let u=0,m=0,f;for(let _=0;_<a.length;_++){let k=a[_];if(u===0){if(k===r&&(o||a.slice(_,_+n)===t)){d.push(a.slice(m,_)),m=_+n;continue}if(k==="/"){f=_;continue}}k==="["?u++:k==="]"&&u--}const y=d.length===0?a:a.substring(m),w=y.startsWith(Ga),x=w?y.substring(1):y,C=f&&f>m?f-m:void 0;return{modifiers:d,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}};return s?a=>s({className:a,parseClassName:i}):i},hd=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(o=>{o[0]==="["?(t.push(...s.sort(),o),s=[]):s.push(o)}),t.push(...s.sort()),t},pd=e=>({cache:dd(e.cacheSize),parseClassName:ud(e),...nd(e)}),gd=/\s+/,md=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],i=e.trim().split(gd);let a="";for(let d=i.length-1;d>=0;d-=1){const u=i[d],{modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:w}=s(u);let x=!!w,C=o(x?y.substring(0,w):y);if(!C){if(!x){a=u+(a.length>0?" "+a:a);continue}if(C=o(y),!C){a=u+(a.length>0?" "+a:a);continue}x=!1}const _=hd(m).join(":"),k=f?_+Ga:_,I=k+C;if(n.includes(I))continue;n.push(I);const V=r(C,x);for(let q=0;q<V.length;++q){const P=V[q];n.push(k+P)}a=u+(a.length>0?" "+a:a)}return a};function bd(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=Wa(t))&&(o&&(o+=" "),o+=s);return o}const Wa=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=Wa(e[o]))&&(s&&(s+=" "),s+=t);return s};function fd(e,...t){let s,o,r,n=i;function i(d){const u=t.reduce((m,f)=>f(m),e());return s=pd(u),o=s.cache.get,r=s.cache.set,n=a,a(d)}function a(d){const u=o(d);if(u)return u;const m=md(d,s);return r(d,m),m}return function(){return n(bd.apply(null,arguments))}}const G=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Ka=/^\[(?:([a-z-]+):)?(.+)\]$/i,vd=/^\d+\/\d+$/,yd=new Set(["px","full","screen"]),wd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xd=/\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$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zt=e=>tr(e)||yd.has(e)||vd.test(e),Yt=e=>pr(e,"length",Id),tr=e=>!!e&&!Number.isNaN(Number(e)),fo=e=>pr(e,"number",tr),Ar=e=>!!e&&Number.isInteger(Number(e)),$d=e=>e.endsWith("%")&&tr(e.slice(0,-1)),j=e=>Ka.test(e),Zt=e=>wd.test(e),Ed=new Set(["length","size","percentage"]),kd=e=>pr(e,Ed,Ya),Rd=e=>pr(e,"position",Ya),Od=new Set(["image","url"]),Ad=e=>pr(e,Od,Td),Pd=e=>pr(e,"",Ld),Pr=()=>!0,pr=(e,t,s)=>{const o=Ka.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):s(o[2]):!1},Id=e=>xd.test(e)&&!_d.test(e),Ya=()=>!1,Ld=e=>Cd.test(e),Td=e=>Sd.test(e),Dd=()=>{const e=G("colors"),t=G("spacing"),s=G("blur"),o=G("brightness"),r=G("borderColor"),n=G("borderRadius"),i=G("borderSpacing"),a=G("borderWidth"),d=G("contrast"),u=G("grayscale"),m=G("hueRotate"),f=G("invert"),y=G("gap"),w=G("gradientColorStops"),x=G("gradientColorStopPositions"),C=G("inset"),_=G("margin"),k=G("opacity"),I=G("padding"),V=G("saturate"),q=G("scale"),P=G("sepia"),tt=G("skew"),J=G("space"),At=G("translate"),at=()=>["auto","contain","none"],Nt=()=>["auto","hidden","clip","visible","scroll"],Pt=()=>["auto",j,t],O=()=>[j,t],Wt=()=>["",zt,Yt],$t=()=>["auto",tr,j],bt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],lt=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],It=()=>["start","end","center","between","around","evenly","stretch"],pt=()=>["","0",j],p=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>[tr,j];return{cacheSize:500,separator:":",theme:{colors:[Pr],spacing:[zt,Yt],blur:["none","",Zt,j],brightness:v(),borderColor:[e],borderRadius:["none","","full",Zt,j],borderSpacing:O(),borderWidth:Wt(),contrast:v(),grayscale:pt(),hueRotate:v(),invert:pt(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[$d,Yt],inset:Pt(),margin:Pt(),opacity:v(),padding:O(),saturate:v(),scale:v(),sepia:pt(),skew:v(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Zt]}],"break-after":[{"break-after":p()}],"break-before":[{"break-before":p()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...bt(),j]}],overflow:[{overflow:Nt()}],"overflow-x":[{"overflow-x":Nt()}],"overflow-y":[{"overflow-y":Nt()}],overscroll:[{overscroll:at()}],"overscroll-x":[{"overscroll-x":at()}],"overscroll-y":[{"overscroll-y":at()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ar,j]}],basis:[{basis:Pt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",Ar,j]}],"grid-cols":[{"grid-cols":[Pr]}],"col-start-end":[{col:["auto",{span:["full",Ar,j]},j]}],"col-start":[{"col-start":$t()}],"col-end":[{"col-end":$t()}],"grid-rows":[{"grid-rows":[Pr]}],"row-start-end":[{row:["auto",{span:[Ar,j]},j]}],"row-start":[{"row-start":$t()}],"row-end":[{"row-end":$t()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...It()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...It(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...It(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[Zt]},Zt]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fo]}],"font-family":[{font:[Pr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",tr,fo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zt,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...lt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zt,Yt]}],"underline-offset":[{"underline-offset":["auto",zt,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...bt(),Rd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ad]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...lt(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:lt()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...lt()]}],"outline-offset":[{"outline-offset":[zt,j]}],"outline-w":[{outline:[zt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Wt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[zt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zt,Pd]}],"shadow-color":[{shadow:[Pr]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Zt,j]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[f]}],saturate:[{saturate:[V]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:v()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:v()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Ar,j]}],"translate-x":[{"translate-x":[At]}],"translate-y":[{"translate-y":[At]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{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",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zt,Yt,fo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jd=fd(Dd);function g(...e){return jd(Va(e))}var Ud=Object.defineProperty,Za=(e,t,s,o)=>{for(var r=void 0,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(t,s,r)||r);return r&&Ud(t,s,r),r};class b extends ${constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.mutationObserver)==null||t.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(t=>{t==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),t==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(t)&&this.removeAttribute(t)})}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(s=>{this.getAttributesToExclude().includes(s.name)||(t[s.name]=s.value??"")}),t}isCustomPropertySet(t){const s=getComputedStyle(this).getPropertyValue(t).trim();return s!=="inherit"&&s.length>0}applyCustomClass(t,s,o=""){var r,n;let i="";t.some(a=>this.isCustomPropertySet(a))&&(i=o),i&&((n=(r=this.shadowRoot)==null?void 0:r.querySelector(s))==null||n.classList.add(i))}removeDuplicateContent(){var t;const s=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{var a;return i.nodeType===Node.COMMENT_NODE||i.nodeType===Node.TEXT_NODE&&!((a=i.textContent)!=null&&a.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),o=new Map,r=[];let n;for(;n=s.nextNode();){let i;if(n.nodeType===Node.TEXT_NODE){const a=(t=n.textContent)==null?void 0:t.trim();if(!a)continue;i=`text:${a}`}else if(n instanceof HTMLElement){const a=Array.from(n.attributes).map(d=>`${d.name}=${d.value}`).sort().join(":");i=`element:${n.tagName}:${a}`}else continue;if(o.has(i)){const a=o.get(i);a&&a.parentNode&&r.push(a),o.set(i,n)}else o.set(i,n)}r.forEach(i=>{i.parentNode&&(console.log("Removing duplicate:",i),i.parentNode.removeChild(i))})}moveLightDomChildrenInto(t,s){let o;if(s&&s.length>0){o=s.filter(r=>this.contains(r)&&r!==t&&!r.contains(t));for(const r of o){const n=Array.from(t.childNodes).find(i=>{var a;return(a=i.isEqualNode)==null?void 0:a.call(i,r)});n&&t.removeChild(n)}}else o=Array.from(this.childNodes).filter(r=>r!==t&&!t.contains(r)&&!r.contains(t));for(const r of o)t.appendChild(r)}observeStyleAndClassSync(t){this.mutationObserver=new MutationObserver(s=>{for(const o of s)if(o.type==="attributes"){if(o.attributeName==="style"){const r=this.getAttribute("style")||"";r&&(this.customStyle=r,this.removeAttribute("style"))}if(o.attributeName==="class"){const r=this.getAttribute("class")||"";r&&(t.className=r,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}}Za([l({type:String,reflect:!0})],b.prototype,"customClass");Za([l({type:String,reflect:!0})],b.prototype,"customStyle");function vn(){const e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const s=(e+Math.random()*16)%16|0;return(t=="x"?s:s&3|8).toString(16)})}const Si=Ue`
|
|
88
|
+
*/function mt({context:e,subscribe:t}){return(s,o)=>{typeof o=="object"?o.addInitializer((function(){new wi(this,{context:e,callback:r=>{s.set.call(this,r)},subscribe:t})})):s.constructor.addInitializer((r=>{new wi(r,{context:e,callback:n=>{r[o]=n},subscribe:t})}))}}const mo=new WeakMap,od=Ls(class extends Fa{render(e){return A}update(e,[t]){var o;const s=t!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=t,this.ht=(o=e.options)==null?void 0:o.host,this.rt(this.ct=e.element)),A}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let s=mo.get(t);s===void 0&&(s=new WeakMap,mo.set(t,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=mo.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),bo="rtg-flex rtg-h-9 rtg-w-full rtg-no-autofill-bg rtg-rounded-md rtg-border rtg-border-input autofill:rtg-bg-transparent rtg-bg-transparent rtg-px-3 rtg-py-1 rtg-text-sm rtg-shadow-sm rtg-transition-colors file:rtg-border-0 file:rtg-bg-transparent file:rtg-text-sm file:rtg-font-medium placeholder:rtg-text-muted-foreground focus-visible:rtg-outline-none focus-visible:rtg-ring-[3px] focus-visible:rtg-ring-custom-outline focus-visible:rtg-border-ring disabled:rtg-opacity-50 input-base";function qa(e){var t,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(s=qa(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function Va(){for(var e,t,s=0,o="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=qa(e))&&(o&&(o+=" "),o+=t);return o}const fn="-",nd=e=>{const t=ad(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{const n=r.split(fn);return n[0]===""&&n.length!==1&&n.shift(),Ha(n,t)||id(r)},getConflictingClassGroupIds:(r,n)=>{const i=s[r]||[];return n&&o[r]?[...i,...o[r]]:i}}},Ha=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?Ha(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(fn);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},_i=/^\[(.+)\]$/,id=e=>{if(_i.test(e)){const t=_i.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},ad=e=>{const{theme:t,prefix:s}=e,o={nextPart:new Map,validators:[]};return cd(Object.entries(e.classGroups),s).forEach(([r,n])=>{So(n,o,r,t)}),o},So=(e,t,s,o)=>{e.forEach(r=>{if(typeof r=="string"){const n=r===""?t:Ci(t,r);n.classGroupId=s;return}if(typeof r=="function"){if(ld(r)){So(r(o),t,s,o);return}t.validators.push({validator:r,classGroupId:s});return}Object.entries(r).forEach(([n,i])=>{So(i,Ci(t,n),s,o)})})},Ci=(e,t)=>{let s=e;return t.split(fn).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},ld=e=>e.isThemeGetter,cd=(e,t)=>t?e.map(([s,o])=>{const r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[s,r]}):e,dd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const r=(n,i)=>{s.set(n,i),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let i=s.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return r(n,i),i},set(n,i){s.has(n)?s.set(n,i):r(n,i)}}},Ga="!",ud=e=>{const{separator:t,experimentalParseClassName:s}=e,o=t.length===1,r=t[0],n=t.length,i=a=>{const d=[];let u=0,m=0,f;for(let _=0;_<a.length;_++){let k=a[_];if(u===0){if(k===r&&(o||a.slice(_,_+n)===t)){d.push(a.slice(m,_)),m=_+n;continue}if(k==="/"){f=_;continue}}k==="["?u++:k==="]"&&u--}const y=d.length===0?a:a.substring(m),w=y.startsWith(Ga),x=w?y.substring(1):y,C=f&&f>m?f-m:void 0;return{modifiers:d,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}};return s?a=>s({className:a,parseClassName:i}):i},hd=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(o=>{o[0]==="["?(t.push(...s.sort(),o),s=[]):s.push(o)}),t.push(...s.sort()),t},pd=e=>({cache:dd(e.cacheSize),parseClassName:ud(e),...nd(e)}),gd=/\s+/,md=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],i=e.trim().split(gd);let a="";for(let d=i.length-1;d>=0;d-=1){const u=i[d],{modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:w}=s(u);let x=!!w,C=o(x?y.substring(0,w):y);if(!C){if(!x){a=u+(a.length>0?" "+a:a);continue}if(C=o(y),!C){a=u+(a.length>0?" "+a:a);continue}x=!1}const _=hd(m).join(":"),k=f?_+Ga:_,I=k+C;if(n.includes(I))continue;n.push(I);const V=r(C,x);for(let q=0;q<V.length;++q){const P=V[q];n.push(k+P)}a=u+(a.length>0?" "+a:a)}return a};function bd(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=Wa(t))&&(o&&(o+=" "),o+=s);return o}const Wa=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=Wa(e[o]))&&(s&&(s+=" "),s+=t);return s};function fd(e,...t){let s,o,r,n=i;function i(d){const u=t.reduce((m,f)=>f(m),e());return s=pd(u),o=s.cache.get,r=s.cache.set,n=a,a(d)}function a(d){const u=o(d);if(u)return u;const m=md(d,s);return r(d,m),m}return function(){return n(bd.apply(null,arguments))}}const G=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Ka=/^\[(?:([a-z-]+):)?(.+)\]$/i,vd=/^\d+\/\d+$/,yd=new Set(["px","full","screen"]),wd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xd=/\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$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mt=e=>tr(e)||yd.has(e)||vd.test(e),Yt=e=>pr(e,"length",Id),tr=e=>!!e&&!Number.isNaN(Number(e)),fo=e=>pr(e,"number",tr),Ar=e=>!!e&&Number.isInteger(Number(e)),$d=e=>e.endsWith("%")&&tr(e.slice(0,-1)),j=e=>Ka.test(e),Zt=e=>wd.test(e),Ed=new Set(["length","size","percentage"]),kd=e=>pr(e,Ed,Ya),Rd=e=>pr(e,"position",Ya),Od=new Set(["image","url"]),Ad=e=>pr(e,Od,Td),Pd=e=>pr(e,"",Ld),Pr=()=>!0,pr=(e,t,s)=>{const o=Ka.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):s(o[2]):!1},Id=e=>xd.test(e)&&!_d.test(e),Ya=()=>!1,Ld=e=>Cd.test(e),Td=e=>Sd.test(e),Dd=()=>{const e=G("colors"),t=G("spacing"),s=G("blur"),o=G("brightness"),r=G("borderColor"),n=G("borderRadius"),i=G("borderSpacing"),a=G("borderWidth"),d=G("contrast"),u=G("grayscale"),m=G("hueRotate"),f=G("invert"),y=G("gap"),w=G("gradientColorStops"),x=G("gradientColorStopPositions"),C=G("inset"),_=G("margin"),k=G("opacity"),I=G("padding"),V=G("saturate"),q=G("scale"),P=G("sepia"),tt=G("skew"),J=G("space"),Pt=G("translate"),lt=()=>["auto","contain","none"],zt=()=>["auto","hidden","clip","visible","scroll"],It=()=>["auto",j,t],O=()=>[j,t],Wt=()=>["",Mt,Yt],Et=()=>["auto",tr,j],ft=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ct=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Lt=()=>["start","end","center","between","around","evenly","stretch"],gt=()=>["","0",j],p=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>[tr,j];return{cacheSize:500,separator:":",theme:{colors:[Pr],spacing:[Mt,Yt],blur:["none","",Zt,j],brightness:v(),borderColor:[e],borderRadius:["none","","full",Zt,j],borderSpacing:O(),borderWidth:Wt(),contrast:v(),grayscale:gt(),hueRotate:v(),invert:gt(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[$d,Yt],inset:It(),margin:It(),opacity:v(),padding:O(),saturate:v(),scale:v(),sepia:gt(),skew:v(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Zt]}],"break-after":[{"break-after":p()}],"break-before":[{"break-before":p()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ft(),j]}],overflow:[{overflow:zt()}],"overflow-x":[{"overflow-x":zt()}],"overflow-y":[{"overflow-y":zt()}],overscroll:[{overscroll:lt()}],"overscroll-x":[{"overscroll-x":lt()}],"overscroll-y":[{"overscroll-y":lt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ar,j]}],basis:[{basis:It()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:gt()}],shrink:[{shrink:gt()}],order:[{order:["first","last","none",Ar,j]}],"grid-cols":[{"grid-cols":[Pr]}],"col-start-end":[{col:["auto",{span:["full",Ar,j]},j]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Pr]}],"row-start-end":[{row:["auto",{span:[Ar,j]},j]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Lt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Lt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Lt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[Zt]},Zt]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fo]}],"font-family":[{font:[Pr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",tr,fo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mt,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mt,Yt]}],"underline-offset":[{"underline-offset":["auto",Mt,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ft(),Rd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ad]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...ct(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:ct()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ct()]}],"outline-offset":[{"outline-offset":[Mt,j]}],"outline-w":[{outline:[Mt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Wt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Mt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zt,Pd]}],"shadow-color":[{shadow:[Pr]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Zt,j]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[f]}],saturate:[{saturate:[V]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:v()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:v()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Ar,j]}],"translate-x":[{"translate-x":[Pt]}],"translate-y":[{"translate-y":[Pt]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{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",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mt,Yt,fo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jd=fd(Dd);function g(...e){return jd(Va(e))}var Ud=Object.defineProperty,Za=(e,t,s,o)=>{for(var r=void 0,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(t,s,r)||r);return r&&Ud(t,s,r),r};class b extends ${constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.mutationObserver)==null||t.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(t=>{t==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),t==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(t)&&this.removeAttribute(t)})}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(s=>{this.getAttributesToExclude().includes(s.name)||(t[s.name]=s.value??"")}),t}isCustomPropertySet(t){const s=getComputedStyle(this).getPropertyValue(t).trim();return s!=="inherit"&&s.length>0}applyCustomClass(t,s,o=""){var r,n;let i="";t.some(a=>this.isCustomPropertySet(a))&&(i=o),i&&((n=(r=this.shadowRoot)==null?void 0:r.querySelector(s))==null||n.classList.add(i))}removeDuplicateContent(){var t;const s=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{var a;return i.nodeType===Node.COMMENT_NODE||i.nodeType===Node.TEXT_NODE&&!((a=i.textContent)!=null&&a.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),o=new Map,r=[];let n;for(;n=s.nextNode();){let i;if(n.nodeType===Node.TEXT_NODE){const a=(t=n.textContent)==null?void 0:t.trim();if(!a)continue;i=`text:${a}`}else if(n instanceof HTMLElement){const a=Array.from(n.attributes).map(d=>`${d.name}=${d.value}`).sort().join(":");i=`element:${n.tagName}:${a}`}else continue;if(o.has(i)){const a=o.get(i);a&&a.parentNode&&r.push(a),o.set(i,n)}else o.set(i,n)}r.forEach(i=>{i.parentNode&&(console.log("Removing duplicate:",i),i.parentNode.removeChild(i))})}moveLightDomChildrenInto(t,s){let o;if(s&&s.length>0){o=s.filter(r=>this.contains(r)&&r!==t&&!r.contains(t));for(const r of o){const n=Array.from(t.childNodes).find(i=>{var a;return(a=i.isEqualNode)==null?void 0:a.call(i,r)});n&&t.removeChild(n)}}else o=Array.from(this.childNodes).filter(r=>r!==t&&!t.contains(r)&&!r.contains(t));for(const r of o)t.appendChild(r)}observeStyleAndClassSync(t){this.mutationObserver=new MutationObserver(s=>{for(const o of s)if(o.type==="attributes"){if(o.attributeName==="style"){const r=this.getAttribute("style")||"";r&&(this.customStyle=r,this.removeAttribute("style"))}if(o.attributeName==="class"){const r=this.getAttribute("class")||"";r&&(t.className=r,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}}Za([l({type:String,reflect:!0})],b.prototype,"customClass");Za([l({type:String,reflect:!0})],b.prototype,"customStyle");function vn(){const e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const s=(e+Math.random()*16)%16|0;return(t=="x"?s:s&3|8).toString(16)})}const Si=Ue`
|
|
89
89
|
@font-face {
|
|
90
90
|
font-family: 'GeistSans';
|
|
91
91
|
|
|
@@ -3129,7 +3129,7 @@ body {
|
|
|
3129
3129
|
stroke-linejoin="round"
|
|
3130
3130
|
/>
|
|
3131
3131
|
</svg>
|
|
3132
|
-
`}var Xd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,
|
|
3132
|
+
`}var Xd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,bt=(e,t,s,o)=>{for(var r=o>1?void 0:o?Jd(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Xd(t,s,r),r};let ht=class extends b{constructor(){super(),this.disabled=!1,this.type="text",this.placeholder="",this.defaultValue="",this.value="",this.dataKey="",this.country="US",this.countryCode="+1",this.selectedLabel="US",this.rawTelValue="",this.showPassword=!1,this.value=this.defaultValue,this.rawTelValue=this.defaultValue}togglePasswordVisibility(){this.showPassword=!this.showPassword}handleCountryChange(e){const t=e.target,s=$i.find(o=>o.value===t.value);s&&(this.country=s.value,this.countryCode=s.code,this.selectedLabel=s.value,this.emitValueChange(),this.requestUpdate()),e.stopPropagation()}firstUpdated(e){this.removeParentAttributes();const t=["--input-border-radius","--input-padding"];this.applyCustomClass(t,"input","input-base"),this.type==="tel"?this.rawTelValue=this.defaultValue:this.defaultValue&&(this.value=this.defaultValue),this.observeStyleAndClassSync(this.inputElement)}handleInputChange(e){const t=e.target;if(this.type==="file"){this.value=t.files?t.files[0].name:"",this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}}));return}this.type==="tel"?(this.rawTelValue=t.value,this.emitValueChange()):(this.value=t.value,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}})))}emitValueChange(){this.value=`${this.countryCode}-${this.rawTelValue}`,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value,code:this.countryCode}}))}handleFocus(){this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0,detail:{dataKey:this.dataKey}}))}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid","custom-class","data-key"]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return this.type==="tel"?c`
|
|
3133
3133
|
<div
|
|
3134
3134
|
class="${g("rtg-flex rtg-items-center rtg-border rtg-border-input rtg-rounded-md rtg-px-3 rtg-py-1 disabled:rtg-opacity-50","focus-within:rtg-outline-none focus-within:rtg-ring-[3px] focus-within:rtg-ring-custom-outline focus-within:rtg-border-ring",bo,this.customClass)}"
|
|
3135
3135
|
${B(e)}
|
|
@@ -3193,7 +3193,7 @@ body {
|
|
|
3193
3193
|
${B(e)}
|
|
3194
3194
|
class="${g(bo,this.customClass)}"
|
|
3195
3195
|
/>
|
|
3196
|
-
`}};
|
|
3196
|
+
`}};bt([st("input")],ht.prototype,"inputElement",2);bt([l({type:Boolean})],ht.prototype,"disabled",2);bt([l({type:String})],ht.prototype,"type",2);bt([l({type:String})],ht.prototype,"placeholder",2);bt([l({type:String})],ht.prototype,"defaultValue",2);bt([l({type:String})],ht.prototype,"value",2);bt([l({type:String,attribute:"data-key"})],ht.prototype,"dataKey",2);bt([l({type:String})],ht.prototype,"country",2);bt([l({type:String})],ht.prototype,"countryCode",2);bt([l({type:String})],ht.prototype,"selectedLabel",2);bt([E()],ht.prototype,"rawTelValue",2);bt([E()],ht.prototype,"showPassword",2);ht=bt([h("rtg-input")],ht);const Ei=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ki=Va,St=(e,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return ki(e,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:r,defaultVariants:n}=t,i=Object.keys(r).map(u=>{const m=s==null?void 0:s[u],f=n==null?void 0:n[u];if(m===null)return null;const y=Ei(m)||Ei(f);return r[u][y]}),a=s&&Object.entries(s).reduce((u,m)=>{let[f,y]=m;return y===void 0||(u[f]=y),u},{}),d=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,m)=>{let{class:f,className:y,...w}=m;return Object.entries(w).every(x=>{let[C,_]=x;return Array.isArray(_)?_.includes({...n,...a}[C]):{...n,...a}[C]===_})?[...u,f,y]:u},[]);return ki(e,i,d,s==null?void 0:s.class,s==null?void 0:s.className)},Qd=St("rtg-text-sm rtg-font-medium rtg-leading-none peer-disabled:rtg-cursor-not-allowed peer-disabled:rtg-opacity-70");var tu=Object.defineProperty,eu=Object.getOwnPropertyDescriptor,el=(e,t,s,o)=>{for(var r=o>1?void 0:o?eu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&tu(t,s,r),r};let sr=class extends b{constructor(){super(...arguments),this.for=""}firstUpdated(e){const t=["--label-text-color","--label-padding"];this.applyCustomClass(t,"label","label-base")}getAttributesToExclude(){return["for","data-testid","class"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return c`
|
|
3197
3197
|
<label
|
|
3198
3198
|
${B(e)}
|
|
3199
3199
|
part="label"
|
|
@@ -3277,7 +3277,7 @@ body {
|
|
|
3277
3277
|
${this._children}
|
|
3278
3278
|
</div>
|
|
3279
3279
|
</div>
|
|
3280
|
-
`}};ol([l({type:Number})],ko.prototype,"ratio",2);ko=ol([h("rtg-aspect-ratio")],ko);const vu=
|
|
3280
|
+
`}};ol([l({type:Number})],ko.prototype,"ratio",2);ko=ol([h("rtg-aspect-ratio")],ko);const vu=St("rtg-inline-flex rtg-items-center rtg-border rtg-px-2.5 rtg-py-0.5 rtg-text-xs rtg-font-semibold rtg-transition-colors focus:rtg-outline-none focus:rtg-ring-2 focus:rtg-ring-ring focus:rtg-ring-offset-2 rtg-border-transparent rtg-rounded-full",{variants:{variant:{default:"rtg-bg-primary rtg-text-primary-foreground rtg-shadow hover:rtg-bg-primary/90",destructive:"rtg-bg-destructive rtg-text-destructive-foreground rtg-shadow-sm hover:rtg-bg-destructive/90",outline:"rtg-border rtg-border-input rtg-bg-background rtg-shadow-sm hover:rtg-bg-accent hover:rtg-text-accent-foreground",secondary:"rtg-bg-secondary rtg-text-secondary-foreground rtg-shadow-sm hover:rtg-bg-secondary/80",ghost:"hover:rtg-bg-accent hover:rtg-text-accent-foreground",link:"rtg-text-primary rtg-underline-offset-4 hover:rtg-underline"}},defaultVariants:{variant:"default"}});var yu=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,wn=(e,t,s,o)=>{for(var r=o>1?void 0:o?wu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&yu(t,s,r),r};let or=class extends b{constructor(){super(...arguments),this.variant="default",this.id="rtg-badge-id",this._children=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._children=Array.from(this.childNodes)}render(){const e=this.getFilteredAttributes();return c`
|
|
3281
3281
|
<div
|
|
3282
3282
|
${B(e)}
|
|
3283
3283
|
id="${this.id}"
|
|
@@ -3287,7 +3287,7 @@ body {
|
|
|
3287
3287
|
>
|
|
3288
3288
|
${this._children}
|
|
3289
3289
|
</div>
|
|
3290
|
-
`}};or.badgeVariants=vu;wn([l({type:String})],or.prototype,"variant",2);wn([l({type:String})],or.prototype,"id",2);or=wn([h("rtg-badge")],or);const nl=
|
|
3290
|
+
`}};or.badgeVariants=vu;wn([l({type:String})],or.prototype,"variant",2);wn([l({type:String})],or.prototype,"id",2);or=wn([h("rtg-badge")],or);const nl=St("rtg-p-4 rtg-text-sm rtg-font-medium rtg-rounded-md rtg-border rtg-border-transparent",{variants:{variant:{success:"rtg-bg-green-100 rtg-text-green-800 rtg-border-green-200",error:"rtg-bg-red-100 rtg-text-red-800 rtg-border-red-200",warning:"rtg-bg-yellow-100 rtg-text-yellow-800 rtg-border-yellow-200",info:"rtg-bg-blue-100 rtg-text-blue-800 rtg-border-blue-200"},size:{small:"rtg-text-sm",default:"rtg-text-base",large:"rtg-text-xl"}},defaultVariants:{variant:"info",size:"default"}});var xu=Object.defineProperty,_u=Object.getOwnPropertyDescriptor,Xr=(e,t,s,o)=>{for(var r=o>1?void 0:o?_u(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&xu(t,s,r),r};let $e=class extends b{constructor(){super(...arguments),this.title="",this.message="",this.variant="info",this.size="default"}createRenderRoot(){return this}get _containerElement(){return this.querySelector("div[role=alert]")}get alertClasses(){return nl({variant:this.variant,size:this.size})}getAttributesToRemoveFromParent(){return["class","style"]}firstUpdated(e){this.removeParentAttributes(),this.observeStyleAndClassSync(this._containerElement)}render(){const e=this.customStyle||"",t=this.customClass||"";return c`
|
|
3291
3291
|
<div
|
|
3292
3292
|
class="${g(this.alertClasses,this.className,t)}"
|
|
3293
3293
|
style="${e}"
|
|
@@ -3298,17 +3298,17 @@ body {
|
|
|
3298
3298
|
</div>`:""}
|
|
3299
3299
|
${this.message?c`<div part="alert-description">${this.message}</div>`:""}
|
|
3300
3300
|
</div>
|
|
3301
|
-
`}};$e.alertVariants=nl;Xr([l({type:String})],$e.prototype,"title",2);Xr([l({type:String})],$e.prototype,"message",2);Xr([l({type:String})],$e.prototype,"variant",2);Xr([l({type:String})],$e.prototype,"size",2);$e=Xr([h("rtg-alert")],$e);const Cu=
|
|
3301
|
+
`}};$e.alertVariants=nl;Xr([l({type:String})],$e.prototype,"title",2);Xr([l({type:String})],$e.prototype,"message",2);Xr([l({type:String})],$e.prototype,"variant",2);Xr([l({type:String})],$e.prototype,"size",2);$e=Xr([h("rtg-alert")],$e);const Cu=St("rtg-inline-flex rtg-items-center rtg-justify-center rtg-whitespace-nowrap rtg-rounded-sm rtg-text-sm rtg-font-medium rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-1 focus-visible:rtg-ring-ring disabled:rtg-pointer-events-none disabled:rtg-opacity-50",{variants:{variant:{outline:"rtg-border rtg-border-input rtg-bg-transparent rtg-shadow-sm hover:rtg-bg-accent hover:rtg-text-accent-foreground"},size:{default:"rtg-h-7 rtg-w-7 rtg-p-0"}},defaultVariants:{variant:"outline",size:"default"}}),Su=St("rtg-inline-flex rtg-items-center rtg-justify-center rtg-whitespace-nowrap rtg-rounded-md rtg-text-sm rtg-font-medium rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-1 focus-visible:rtg-ring-ring disabled:rtg-pointer-events-none disabled:rtg-opacity-50",{variants:{variant:{default:"rtg-bg-primary rtg-text-primary-foreground rtg-shadow hover:rtg-bg-primary/90 focus:rtg-ring-[3px] focus:rtg-ring-custom-outline",destructive:"rtg-bg-destructive rtg-text-destructive-foreground rtg-shadow-sm hover:rtg-bg-destructive/90 focus:rtg-ring-[3px] focus:rtg-ring-custom-outline",outline:"rtg-border rtg-text-primary rtg-border-input rtg-bg-background rtg-shadow-sm hover:rtg-bg-accent hover:rtg-text-accent-foreground focus:rtg-ring-[3px] focus:rtg-ring-custom-outline",secondary:"rtg-bg-secondary rtg-text-secondary-foreground rtg-shadow-sm hover:rtg-bg-secondary/80 focus:rtg-ring-[3px] focus:rtg-ring-custom-outline",ghost:"hover:rtg-bg-accent hover:rtg-text-accent-foreground",link:"rtg-text-primary rtg-underline-offset-4 hover:rtg-underline"},size:{default:"rtg-h-9 rtg-rounded-md rtg-px-4 rtg-py-2 rtg-has-[>svg]:px-3",sm:"rtg-h-8 rtg-rounded-md rtg-px-3 rtg-text-xs rtg-has-[>svg]:px-2.5",lg:"rtg-h-10 rtg-rounded-md rtg-px-6 rtg-has-[>svg]:px-4",icon:"rtg-h-9 rtg-w-9"}},defaultVariants:{variant:"default",size:"default"}});var $u=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,Ne=(e,t,s,o)=>{for(var r=o>1?void 0:o?Eu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&$u(t,s,r),r};let Rt=class extends b{constructor(){super(...arguments),this.click=()=>{},this.disabled=!1,this.type="button",this.variant="default",this.size="default"}createRenderRoot(){return this}getAttributesToExclude(){return["click","disabled","type","variant","size","data-testid","custom-class"]}getAttributesToRemoveFromParent(){return["class","style"]}firstUpdated(){this.moveLightDomChildrenInto(this.buttonElement),this.removeParentAttributes(),this.observeStyleAndClassSync(this.buttonElement)}updated(e){this.removeParentAttributes()}render(){const e=this.getFilteredAttributes(),t=this.customStyle||"",s=this.customClass||"";return c`
|
|
3302
3302
|
<button
|
|
3303
3303
|
part="button"
|
|
3304
3304
|
type="${this.type}"
|
|
3305
3305
|
${B(e)}
|
|
3306
3306
|
?disabled="${this.disabled}"
|
|
3307
|
-
class="${g(
|
|
3307
|
+
class="${g(Rt.buttonVariants({variant:this.variant,size:this.size,className:s}))}"
|
|
3308
3308
|
style="${t}"
|
|
3309
3309
|
@click="${this.click}"
|
|
3310
3310
|
></button>
|
|
3311
|
-
`}};
|
|
3311
|
+
`}};Rt.buttonVariants=Su;Ne([l({type:Function})],Rt.prototype,"click",2);Ne([l({type:Boolean})],Rt.prototype,"disabled",2);Ne([l({type:String})],Rt.prototype,"type",2);Ne([l({type:String})],Rt.prototype,"variant",2);Ne([l({type:String})],Rt.prototype,"size",2);Ne([st("button")],Rt.prototype,"buttonElement",2);Rt=Ne([h("rtg-button")],Rt);var ku=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,ge=(e,t,s,o)=>{for(var r=o>1?void 0:o?Ru(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ku(t,s,r),r};let Ot=class extends ${constructor(){super(...arguments),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.variant="outline",this.size="default",this.styleCalendar=!1,this.mode="single"}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){const s=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);s.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=s,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=s,this.selectedEndDate=null):s>=this.selectedStartDate?this.selectedEndDate=s:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=s)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}render(){const e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),s=this.getDaysInMonth(e,t),o=new Date(e,t,1).getDay(),r=new Date(e,t,0).getDate();let n=Array.from({length:o},(i,a)=>({day:(r-(o-1)+a).toString(),isInactive:!0,isCurrentMonth:!1}));return n=n.concat(Array.from({length:s},(i,a)=>({day:(a+1).toString(),isInactive:!1,isCurrentMonth:!0}))),c`
|
|
3312
3312
|
<div
|
|
3313
3313
|
part="calendar"
|
|
3314
3314
|
style="
|
|
@@ -3420,7 +3420,7 @@ body {
|
|
|
3420
3420
|
</div>
|
|
3421
3421
|
</div>
|
|
3422
3422
|
</div>
|
|
3423
|
-
`}};
|
|
3423
|
+
`}};Ot.styles=[Ue`
|
|
3424
3424
|
:host {
|
|
3425
3425
|
display: inline-block;
|
|
3426
3426
|
|
|
@@ -3467,7 +3467,7 @@ body {
|
|
|
3467
3467
|
.text-day {
|
|
3468
3468
|
font-size: 0.8rem;
|
|
3469
3469
|
}
|
|
3470
|
-
`];
|
|
3470
|
+
`];Ot.buttonVariants=Cu;ge([l({type:Object})],Ot.prototype,"currentDate",2);ge([l({type:Object})],Ot.prototype,"selectedStartDate",2);ge([l({type:Object})],Ot.prototype,"selectedEndDate",2);ge([l({type:String})],Ot.prototype,"variant",2);ge([l({type:String})],Ot.prototype,"size",2);ge([l({type:Boolean})],Ot.prototype,"styleCalendar",2);ge([l({type:String})],Ot.prototype,"mode",2);Ot=ge([h("rtg-calendar")],Ot);const Ou=St("rtg-absolute rtg-z-50 rtg-rounded-md rtg-p-4 rtg-text-popover-foreground rtg-outline-none rtg-transition-transform rtg-transition-opacity",{variants:{state:{open:"rtg-opacity-100 rtg-scale-100 rtg-duration-500",closed:"rtg-opacity-0 rtg-scale-95 rtg-duration-500"},side:{bottom:"rtg-translate-y-0",left:"rtg-translate-x-0",right:"rtg-translate-x-0",top:"rtg-translate-y-0"},styleContent:{true:"rtg-w-72 rtg-border rtg-bg-popover rtg-shadow-md",false:""}},defaultVariants:{state:"closed",side:"bottom"}}),Au=St("absolute",{variants:{state:{open:"rtg-opacity-100 rtg-scale-100 rtg-duration-500",closed:"rtg-opacity-0 rtg-scale-95 rtg-duration-500"},side:{bottom:"rtg-translate-y-0",left:"rtg-translate-x-0",right:"rtg-translate-x-0",top:"rtg-translate-y-0"}},defaultVariants:{state:"closed",side:"bottom"}});var Pu=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,Jr=(e,t,s,o)=>{for(var r=o>1?void 0:o?Iu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Pu(t,s,r),r};let nr=class extends b{constructor(){super(...arguments),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.isOpen=!1}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof Fr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){const t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){var e;(e=this._popover)!=null&&e.isOpen?this.removeAttribute("hidden"):this.setAttribute("hidden","true");const t=this.enableDefaultStyle?Ou({state:"open",side:this.side,styleContent:this.styleContent}):Au({state:"open",side:this.side});return c`
|
|
3471
3471
|
<div
|
|
3472
3472
|
@click="${this.preventClickPropagation}"
|
|
3473
3473
|
part="popover-content"
|
|
@@ -3537,7 +3537,7 @@ body {
|
|
|
3537
3537
|
</rtg-popover-content>
|
|
3538
3538
|
</rtg-popover>
|
|
3539
3539
|
</div>
|
|
3540
|
-
`}};al([l({type:Object})],Ro.prototype,"selectedDate",2);Ro=al([h("rtg-date-picker")],Ro);var we=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(we||{}),Nu=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,xn=(e,t,s,o)=>{for(var r=o>1?void 0:o?zu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Nu(t,s,r),r};let
|
|
3540
|
+
`}};al([l({type:Object})],Ro.prototype,"selectedDate",2);Ro=al([h("rtg-date-picker")],Ro);var we=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(we||{}),Nu=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,xn=(e,t,s,o)=>{for(var r=o>1?void 0:o?zu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Nu(t,s,r),r};let Tt=class extends b{constructor(){super(...arguments),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=e=>{const t=e.target.closest("rtg-accordion-trigger");!t||!this._accordion||(e.preventDefault(),e.stopPropagation(),this._accordion.raiseEvent(this.value),t.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof ir);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Oo||e instanceof Ao)}render(){var e;const t=(e=this._accordion)==null?void 0:e.selectedItems.includes(this.value),s=this._initialChildren.length?this._initialChildren:this.filterChildren();return c`
|
|
3541
3541
|
<div
|
|
3542
3542
|
data-state=${t?"open":"closed"}
|
|
3543
3543
|
class="${g("rtg-w-full rtg-border-b",this.className)}"
|
|
@@ -3548,7 +3548,7 @@ body {
|
|
|
3548
3548
|
>
|
|
3549
3549
|
${s}
|
|
3550
3550
|
</div>
|
|
3551
|
-
`}};xn([l({type:String})],
|
|
3551
|
+
`}};xn([l({type:String})],Tt.prototype,"value",2);xn([l({type:Number})],Tt.prototype,"tabindex",2);Tt=xn([h("rtg-accordion-item")],Tt);var Mu=(e,t,s,o)=>{for(var r=t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(r)||r);return r};let Oo=class extends b{get _item(){let e=this.parentElement;for(;e&&!(e instanceof Tt);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof ir);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;const t=this.hasActiveState();return c`
|
|
3552
3552
|
<button
|
|
3553
3553
|
type="button"
|
|
3554
3554
|
part="accordion-trigger"
|
|
@@ -3564,7 +3564,7 @@ body {
|
|
|
3564
3564
|
>
|
|
3565
3565
|
${bn(this.textContent||"")}${tl()}
|
|
3566
3566
|
</button>
|
|
3567
|
-
`}};Oo=Mu([h("rtg-accordion-trigger")],Oo);var Fu=(e,t,s,o)=>{for(var r=t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(r)||r);return r};let Ao=class extends b{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof ir);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
3567
|
+
`}};Oo=Mu([h("rtg-accordion-trigger")],Oo);var Fu=(e,t,s,o)=>{for(var r=t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(r)||r);return r};let Ao=class extends b{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof ir);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof Tt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;const t=this.hasActiveState();return c`
|
|
3568
3568
|
<div
|
|
3569
3569
|
part="accordion-content"
|
|
3570
3570
|
role="region"
|
|
@@ -3583,7 +3583,7 @@ body {
|
|
|
3583
3583
|
${bn(((e=this.textContent)==null?void 0:e.trim())||"")}
|
|
3584
3584
|
</div>
|
|
3585
3585
|
</div>
|
|
3586
|
-
`}};Ao=Fu([h("rtg-accordion-content")],Ao);var Bu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,ll=(e,t,s,o)=>{for(var r=o>1?void 0:o?qu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Bu(t,s,r),r};let ir=class extends b{constructor(){super(...arguments),this.type=we.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof
|
|
3586
|
+
`}};Ao=Fu([h("rtg-accordion-content")],Ao);var Bu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,ll=(e,t,s,o)=>{for(var r=o>1?void 0:o?qu(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Bu(t,s,r),r};let ir=class extends b{constructor(){super(...arguments),this.type=we.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof Tt)}willUpdate(e){e.has("type")&&(this.type===we.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof Tt&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof Tt&&t.requestUpdate()})}setSelectedItems(e){const t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===we.SINGLE)this.selectedItems=[];else if(this.type===we.MULTIPLE)this.selectedItems.splice(t,1);else throw new Error("Invalid accordion type");else if(this.type===we.SINGLE)this.selectedItems=[e];else if(this.type===we.MULTIPLE)this.selectedItems.push(e);else throw new Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){const e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof Tt);return c`
|
|
3587
3587
|
<div
|
|
3588
3588
|
data-orientation="vertical"
|
|
3589
3589
|
${B(this.getFilteredAttributes())}
|
|
@@ -3682,7 +3682,7 @@ body {
|
|
|
3682
3682
|
</div>
|
|
3683
3683
|
</div>
|
|
3684
3684
|
</div>
|
|
3685
|
-
`}};mr([l({type:Number})],Ee.prototype,"currentIndex",2);mr([l({type:Array})],Ee.prototype,"items",2);mr([l({type:String})],Ee.prototype,"orientation",2);mr([l({type:Boolean})],Ee.prototype,"size",2);mr([st(".slides")],Ee.prototype,"slides",2);Ee=mr([h("rtg-carousel")],Ee);const lh="rtg-py-6 rtg-text-center rtg-text-sm",ch="rtg-pointer-events-none rtg-invisible rtg-absolute rtg-z-50 rtg-mt-1 rtg-max-h-72 rtg-w-full rtg-origin-top rtg-scale-y-0 rtg-transform rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-md rtg-border rtg-border-border rtg-bg-background rtg-px-1 rtg-py-1 rtg-opacity-0 rtg-shadow-md rtg-transition-opacity rtg-duration-300 rtg-ease-out [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]rtg-:bg-foreground [&::-webkit-scrollbar-track]:rtg-bg-background [&::-webkit-scrollbar]:rtg-w-2",dh="rtg-flex rtg-h-8 rtg-w-full rtg-rounded rtg-border-0 rtg-bg-transparent rtg-px-2 rtg-py-2 rtg-text-sm rtg-shadow-none placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus-visible:rtg-ring-0",uh="rtg-z-20 rtg-flex rtg-h-10 rtg-flex-row-reverse rtg-items-center rtg-justify-between rtg-rounded-md rtg-border rtg-border-input rtg-bg-background rtg-px-3 rtg-py-2 rtg-text-sm rtg-ring-offset-background placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus:rtg-ring-2 focus:rtg-ring-ring focus:rtg-ring-offset-2 disabled:rtg-cursor-not-allowed disabled:rtg-opacity-50",hh="rtg-line-clamp-1 rtg-flex rtg-w-[180px]";var ph=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,bl=(e,t,s,o)=>{for(var r=o>1?void 0:o?gh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ph(t,s,r),r};let Uo=class extends b{constructor(){super(...arguments),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(e=>{var t;e.uuid!==((t=this._comboBox)==null?void 0:t.uuid)&&(e.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
3685
|
+
`}};mr([l({type:Number})],Ee.prototype,"currentIndex",2);mr([l({type:Array})],Ee.prototype,"items",2);mr([l({type:String})],Ee.prototype,"orientation",2);mr([l({type:Boolean})],Ee.prototype,"size",2);mr([st(".slides")],Ee.prototype,"slides",2);Ee=mr([h("rtg-carousel")],Ee);const lh="rtg-py-6 rtg-text-center rtg-text-sm",ch="rtg-pointer-events-none rtg-invisible rtg-absolute rtg-z-50 rtg-mt-1 rtg-max-h-72 rtg-w-full rtg-origin-top rtg-scale-y-0 rtg-transform rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-md rtg-border rtg-border-border rtg-bg-background rtg-px-1 rtg-py-1 rtg-opacity-0 rtg-shadow-md rtg-transition-opacity rtg-duration-300 rtg-ease-out [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]rtg-:bg-foreground [&::-webkit-scrollbar-track]:rtg-bg-background [&::-webkit-scrollbar]:rtg-w-2",dh="rtg-flex rtg-h-8 rtg-w-full rtg-rounded rtg-border-0 rtg-bg-transparent rtg-px-2 rtg-py-2 rtg-text-sm rtg-shadow-none placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus-visible:rtg-ring-0",uh="rtg-z-20 rtg-flex rtg-h-10 rtg-flex-row-reverse rtg-items-center rtg-justify-between rtg-rounded-md rtg-border rtg-border-input rtg-bg-background rtg-px-3 rtg-py-2 rtg-text-sm rtg-ring-offset-background placeholder:rtg-text-muted-foreground focus:rtg-outline-none focus:rtg-ring-2 focus:rtg-ring-ring focus:rtg-ring-offset-2 disabled:rtg-cursor-not-allowed disabled:rtg-opacity-50",hh="rtg-line-clamp-1 rtg-flex rtg-w-[180px]";var ph=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,bl=(e,t,s,o)=>{for(var r=o>1?void 0:o?gh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ph(t,s,r),r};let Uo=class extends b{constructor(){super(...arguments),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(e=>{var t;e.uuid!==((t=this._comboBox)==null?void 0:t.uuid)&&(e.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof pt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return c`
|
|
3686
3686
|
<button
|
|
3687
3687
|
type="button"
|
|
3688
3688
|
part="combo-box-trigger-button"
|
|
@@ -3695,14 +3695,14 @@ body {
|
|
|
3695
3695
|
>
|
|
3696
3696
|
${Bd()}
|
|
3697
3697
|
</button>
|
|
3698
|
-
`}};bl([st("button")],Uo.prototype,"buttonElement",2);Uo=bl([h("rtg-combo-box-trigger")],Uo);var mh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,fl=(e,t,s,o)=>{for(var r=o>1?void 0:o?bh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&mh(t,s,r),r};let No=class extends ${constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(e=>{var t;e.uuid!==((t=this._comboBox)==null?void 0:t.uuid)&&(e.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
3698
|
+
`}};bl([st("button")],Uo.prototype,"buttonElement",2);Uo=bl([h("rtg-combo-box-trigger")],Uo);var mh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,fl=(e,t,s,o)=>{for(var r=o>1?void 0:o?bh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&mh(t,s,r),r};let No=class extends ${constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(e=>{var t;e.uuid!==((t=this._comboBox)==null?void 0:t.uuid)&&(e.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof pt);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return c`
|
|
3699
3699
|
<span
|
|
3700
3700
|
part="combo-box-value"
|
|
3701
3701
|
class="${g(hh,this.className)}"
|
|
3702
3702
|
@click=${this.handleClick}
|
|
3703
3703
|
>${this.renderLabel()}</span
|
|
3704
3704
|
>
|
|
3705
|
-
`}};fl([l({type:String})],No.prototype,"placeholder",2);No=fl([h("rtg-combo-box-value")],No);var fh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Qr=(e,t,s,o)=>{for(var r=o>1?void 0:o?vh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&fh(t,s,r),r};let ke=class extends b{constructor(){super(...arguments),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=e=>{var t,s;e.detail.isOpen!==((t=this._comboBox)==null?void 0:t.isOpen)&&this.requestUpdate(),e.detail.isOpen&&(s=this._comboBox)!=null&&s.selectedValue&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var r;return o.getAttribute("value")===((r=this._comboBox)==null?void 0:r.selectedValue)}),this.requestUpdate())},this.handleKeyDown=e=>{var t;if(!((t=this._comboBox)!=null&&t.isOpen))return;e.preventDefault();const s=this.filteredItems;switch(e.key){case"ArrowDown":if(s.length===0)return;this.focusedIndex=(this.focusedIndex+1)%s.length;break;case"ArrowUp":if(s.length===0)return;this.focusedIndex=(this.focusedIndex-1+s.length)%s.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<s.length){const o=s[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(e,t)=>{e.preventDefault(),this.focusedIndex=t},this.onSelectedValue=(e,t)=>{this.focusedIndex=t,this.selectedValue=e},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="rtg-combo-box-item"], rtg-combo-box-item')).filter(e=>e.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("rtg-combo-box-input")}get comboBoxEmpty(){return this.querySelector("rtg-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var e;const t=(e=this.searchKey)==null?void 0:e.toLowerCase();return this.comboBoxItems.filter(s=>{var o;return(o=s.getAttribute("value"))==null?void 0:o.toLowerCase().includes(t)})}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
3705
|
+
`}};fl([l({type:String})],No.prototype,"placeholder",2);No=fl([h("rtg-combo-box-value")],No);var fh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Qr=(e,t,s,o)=>{for(var r=o>1?void 0:o?vh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&fh(t,s,r),r};let ke=class extends b{constructor(){super(...arguments),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=e=>{var t,s;e.detail.isOpen!==((t=this._comboBox)==null?void 0:t.isOpen)&&this.requestUpdate(),e.detail.isOpen&&(s=this._comboBox)!=null&&s.selectedValue&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var r;return o.getAttribute("value")===((r=this._comboBox)==null?void 0:r.selectedValue)}),this.requestUpdate())},this.handleKeyDown=e=>{var t;if(!((t=this._comboBox)!=null&&t.isOpen))return;e.preventDefault();const s=this.filteredItems;switch(e.key){case"ArrowDown":if(s.length===0)return;this.focusedIndex=(this.focusedIndex+1)%s.length;break;case"ArrowUp":if(s.length===0)return;this.focusedIndex=(this.focusedIndex-1+s.length)%s.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<s.length){const o=s[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(e,t)=>{e.preventDefault(),this.focusedIndex=t},this.onSelectedValue=(e,t)=>{this.focusedIndex=t,this.selectedValue=e},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="rtg-combo-box-item"], rtg-combo-box-item')).filter(e=>e.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("rtg-combo-box-input")}get comboBoxEmpty(){return this.querySelector("rtg-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var e;const t=(e=this.searchKey)==null?void 0:e.toLowerCase();return this.comboBoxItems.filter(s=>{var o;return(o=s.getAttribute("value"))==null?void 0:o.toLowerCase().includes(t)})}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof pt);)e=e.parentElement;return e}handleComboBoxStateChanged(e){var t;const{isOpen:s,targetComboBoxId:o}=e.detail;if(this.isOpen=s,o!==((t=this._comboBox)==null?void 0:t.uuid))return;const r=this.renderRoot.querySelector('[part="select-group"]');r&&(s?(clearTimeout(r._hideTimeout),r.classList.remove("rtg-scale-y-0","rtg-opacity-0"),r.classList.add("rtg-scale-y-100","rtg-opacity-100"),r.classList.remove("rtg-invisible","rtg-pointer-events-none"),r.classList.add("rtg-visible","rtg-pointer-events-auto")):(r.classList.remove("rtg-opacity-100"),r.classList.add("rtg-opacity-0"),r._hideTimeout=setTimeout(()=>{r.classList.remove("rtg-visible","rtg-pointer-events-auto","rtg-scale-y-100"),r.classList.add("rtg-invisible","rtg-pointer-events-none","rtg-scale-y-0")},300)))}moveChildren(){const e=this.renderRoot.querySelector('[part="select-group"]');if(!e)return;const t={top:e.querySelector("#topSlot"),empty:e.querySelector("#emptySlot"),list:e.querySelector("#listSlot")},s={"rtg-combo-box-input":"top","rtg-combo-box-empty":"empty","rtg-combo-box-item":"list"};Array.from(this.children).forEach(o=>{var r;const n=o.tagName.toLowerCase(),i=s[n];i&&(o.setAttribute("data-managed","true"),(r=t[i])==null||r.appendChild(o))})}renderFilteredItems(){return this.comboBoxItems.forEach(e=>e.setAttribute("hidden","true")),this.filteredItems.map((e,t)=>{var s;const o=e.getAttribute("value")??"",r=t===this.focusedIndex,n=o.toLowerCase()===((s=this._comboBox)==null?void 0:s.selectedValue.toLowerCase());return c`
|
|
3706
3706
|
<rtg-combo-box-item
|
|
3707
3707
|
@mouseover="${i=>this.handleMouseOver(i,t)}"
|
|
3708
3708
|
.value=${o}
|
|
@@ -3729,7 +3729,7 @@ body {
|
|
|
3729
3729
|
${this.renderFilteredItems()}
|
|
3730
3730
|
</div>
|
|
3731
3731
|
</div>
|
|
3732
|
-
`}};Qr([E()],ke.prototype,"searchKey",2);Qr([E()],ke.prototype,"focusedIndex",2);Qr([E()],ke.prototype,"selectedValue",2);Qr([E()],ke.prototype,"isOpen",2);ke=Qr([h("rtg-combo-box-group")],ke);var yh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,
|
|
3732
|
+
`}};Qr([E()],ke.prototype,"searchKey",2);Qr([E()],ke.prototype,"focusedIndex",2);Qr([E()],ke.prototype,"selectedValue",2);Qr([E()],ke.prototype,"isOpen",2);ke=Qr([h("rtg-combo-box-group")],ke);var yh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,At=(e,t,s,o)=>{for(var r=o>1?void 0:o?wh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&yh(t,s,r),r};let xt=class extends b{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.onMouseOver=(e,t)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const t=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(t)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return c`
|
|
3733
3733
|
<div
|
|
3734
3734
|
${B(e)}
|
|
3735
3735
|
@click=${this.handleClick}
|
|
@@ -3745,7 +3745,7 @@ body {
|
|
|
3745
3745
|
${Qa()}
|
|
3746
3746
|
</span>
|
|
3747
3747
|
</div>
|
|
3748
|
-
`}};
|
|
3748
|
+
`}};At([l({type:String})],xt.prototype,"value",2);At([l({type:String})],xt.prototype,"key",2);At([l({type:Number})],xt.prototype,"tabindex",2);At([l({type:Boolean})],xt.prototype,"isSelected",2);At([l({type:Boolean})],xt.prototype,"isFocus",2);At([l({type:String})],xt.prototype,"class",2);At([l({type:Number})],xt.prototype,"selectItemIndex",2);At([l({type:Function})],xt.prototype,"onSelect",2);At([l({type:Function})],xt.prototype,"onMouseOver",2);At([st("#rtg-combo-box-item")],xt.prototype,"itemDivContainer",2);xt=At([h("rtg-combo-box-item")],xt);var xh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,_n=(e,t,s,o)=>{for(var r=o>1?void 0:o?_h(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&xh(t,s,r),r};let ms=class extends ${constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof ke);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation();const t=e.target;this.searchValue=t.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return c`
|
|
3749
3749
|
<div class="rtg-flex rtg-items-center rtg-px-2">
|
|
3750
3750
|
${qd()}
|
|
3751
3751
|
<input
|
|
@@ -3770,14 +3770,14 @@ body {
|
|
|
3770
3770
|
>
|
|
3771
3771
|
${Array.from(this.childNodes)[0].textContent}
|
|
3772
3772
|
</div>
|
|
3773
|
-
`}};Oi=Ch([h("rtg-combo-box-empty")],Oi);var Sh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,
|
|
3773
|
+
`}};Oi=Ch([h("rtg-combo-box-empty")],Oi);var Sh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,Ut=(e,t,s,o)=>{for(var r=o>1?void 0:o?$h(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Sh(t,s,r),r};let pt=class extends b{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=vn(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var t;const s=(t=this.renderRoot)==null?void 0:t.querySelector("[data-combo-box-uuid]"),o=e.target;if(!o.tagName.includes("RTG-COMBO")&&!(o.shadowRoot&&o.shadowRoot.innerHTML.includes(s==null?void 0:s.innerHTML))){if(this.isOpen&&!s||!(s!=null&&s.contains(o)))this.isOpen=!1;else if(!(o!=null&&o.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("rtg-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){const t=e.target;if(t instanceof HTMLElement){const s=t.closest("rtg-combo-box-item");s?(this.selectedValue=s.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid rtg-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return c`
|
|
3774
3774
|
<div
|
|
3775
3775
|
class="${g("rtg-relative",this.className)}"
|
|
3776
3776
|
data-hs-combo-box=""
|
|
3777
3777
|
data-combo-box-uuid=${this.uuid}
|
|
3778
3778
|
part="combo-box"
|
|
3779
3779
|
></div>
|
|
3780
|
-
`}};
|
|
3780
|
+
`}};Ut([l({type:Boolean})],pt.prototype,"isOpen",2);Ut([E()],pt.prototype,"selectedValue",2);Ut([E()],pt.prototype,"searchTerm",2);Ut([E()],pt.prototype,"focusedIndex",2);Ut([E()],pt.prototype,"filteredItems",2);Ut([E()],pt.prototype,"uuid",2);Ut([l({type:String})],pt.prototype,"label",2);Ut([l({type:Array})],pt.prototype,"items",2);Ut([st('[part="combo-box"]')],pt.prototype,"parentDiveElement",2);pt=Ut([h("rtg-combo-box")],pt);var ls=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(ls||{}),Eh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,vl=(e,t,s,o)=>{for(var r=o>1?void 0:o?kh(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Eh(t,s,r),r};let zo=class extends b{constructor(){super(...arguments),this.orientation=ls.HORIZONTAL}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return c` <div
|
|
3781
3781
|
part="separator"
|
|
3782
3782
|
${B(e)}
|
|
3783
3783
|
class=${g(this.orientation===ls.HORIZONTAL?"rtg-shrink-0 rtg-bg-border rtg-w-full rtg-h-[1px] rtg-my-4":"rtg-shrink-0 rtg-bg-border rtg-h-full rtg-w-[1px]",this.className)}
|
|
@@ -4247,22 +4247,22 @@ body {
|
|
|
4247
4247
|
class="${g(fg,this.className)}"
|
|
4248
4248
|
style="outline: none;"
|
|
4249
4249
|
></div>
|
|
4250
|
-
`}};qi=wg([h("rtg-radio-group")],qi);const xg=
|
|
4250
|
+
`}};qi=wg([h("rtg-radio-group")],qi);const xg=St("rtg-inline-flex rtg-items-center rtg-justify-center rtg-whitespace-nowrap rtg-rounded-sm rtg-text-sm rtg-font-medium rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-1 focus-visible:rtg-ring-ring disabled:rtg-pointer-events-none disabled:rtg-opacity-50",{variants:{variant:{outline:"rtg-border rtg-border-input rtg-bg-background rtg-shadow-sm hover:rtg-bg-accent hover:rtg-text-accent-foreground",ghost:"hover:rtg-bg-accent hover:rtg-text-accent-foreground"},size:{default:"rtg-h-8 rtg-px-4 rtg-py-2",sm:"rtg-h-7 rtg-rounded-sm px-3 rtg-text-xs",lg:"rtg-h-9 rtg-rounded-sm px-8",icon:"rtg-h-8 rtg-w-8"}},defaultVariants:{variant:"ghost",size:"default"}}),_g="rtg-flex rtg-flex-row rtg-items-center rtg-gap-1",Cg="rtg-flex rtg-h-9 rtg-w-9 rtg-items-center rtg-justify-center",Sg="rtg-gap-1 rtg-pl-2.5",$g="rtg-gap-1 rtg-pl-2.5",Eg="rtg-mx-auto rtg-flex rtg-w-full rtg-justify-center";var kg=(e,t,s,o)=>{for(var r=t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(r)||r);return r};let Vi=class extends b{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4251
4251
|
<ul
|
|
4252
4252
|
part="pagination-content"
|
|
4253
4253
|
class="${g(_g,this.className)}"
|
|
4254
4254
|
></ul>
|
|
4255
|
-
`}};Vi=kg([h("rtg-pagination-content")],Vi);var Rg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,wr=(e,t,s,o)=>{for(var r=o>1?void 0:o?Og(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Rg(t,s,r),r};let
|
|
4255
|
+
`}};Vi=kg([h("rtg-pagination-content")],Vi);var Rg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,wr=(e,t,s,o)=>{for(var r=o>1?void 0:o?Og(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Rg(t,s,r),r};let Dt=class extends b{constructor(){super(...arguments),this.state="close",this.isActive=!1,this.size="icon",this.variant="ghost",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return c`
|
|
4256
4256
|
<a
|
|
4257
4257
|
part="pagination-link"
|
|
4258
4258
|
data-state="${this.isActive}"
|
|
4259
4259
|
id="${this.id}"
|
|
4260
4260
|
href="${this.href}"
|
|
4261
4261
|
aria-current="${this.isActive?"page":"false"}"
|
|
4262
|
-
class="${g(
|
|
4262
|
+
class="${g(Dt.paginationVariants({variant:this.isActive?"outline":"ghost",size:this.size,className:this.className}),this.className)}"
|
|
4263
4263
|
>
|
|
4264
4264
|
</a>
|
|
4265
|
-
`}};
|
|
4265
|
+
`}};Dt.paginationVariants=xg;wr([l({attribute:"data-state",type:String})],Dt.prototype,"state",2);wr([l({type:Boolean})],Dt.prototype,"isActive",2);wr([l({type:String})],Dt.prototype,"size",2);wr([l({type:String})],Dt.prototype,"variant",2);wr([l({type:String})],Dt.prototype,"href",2);Dt=wr([h("rtg-pagination-link")],Dt);var Ag=Object.defineProperty,Pg=Object.getOwnPropertyDescriptor,Pn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Pg(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Ag(t,s,r),r};let _s=class extends b{constructor(){super(...arguments),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var e;const t=(e=this._containerElement)==null?void 0:e.children;if(t){for(let s=0;s<t.length;s++)if(t[s]instanceof Dt)return t[s]}return null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(t=>{t!==this&&(t.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var e;this.moveLightDomChildrenInto(this._containerElement);const t=(e=this._containerElement)==null?void 0:e.children,s=[];for(let o=0;o<t.length-1;o+=1){const r=t[o],n=crypto.randomUUID();s.push(n),r.dataset.pairId=n}this.uniqueIds=s,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return c`
|
|
4266
4266
|
<li
|
|
4267
4267
|
@click="${this.handleClick}"
|
|
4268
4268
|
part="pagination-item"
|
|
@@ -4490,7 +4490,7 @@ body {
|
|
|
4490
4490
|
part="select"
|
|
4491
4491
|
class="${g("rtg-relative",this.className)}"
|
|
4492
4492
|
data-select-uuid=${this.uuid}
|
|
4493
|
-
></div>`}};cr=Sm([h("rtg-select")],cr);const $m=
|
|
4493
|
+
></div>`}};cr=Sm([h("rtg-select")],cr);const $m=St("group rtg-pointer-events-auto rtg-relative rtg-flex rtg-w-full rtg-items-center rtg-justify-between rtg-space-x-2 rtg-overflow-hidden rtg-rounded-md rtg-border rtg-p-4 rtg-pr-6 rtg-shadow-lg rtg-transition-all data-[swipe=cancel]:rtg-translate-x-0 data-[swipe=end]:rtg-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:rtg-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:rtg-transition-none data-[state=open]:rtg-animate-in data-[state=closed]:rtg-animate-out data-[swipe=end]:rtg-animate-out data-[state=closed]:rtg-fade-out-80 data-[state=closed]:rtg-slide-out-to-right-full data-[state=open]:rtg-slide-in-from-top-full data-[state=open]:sm:rtg-slide-in-from-bottom-full",{variants:{variant:{default:"rtg-border rtg-bg-background rtg-text-foreground",destructive:"rtg-destructive group rtg-border-destructive rtg-bg-destructive rtg-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Em=St("rtg-inline-flex rtg-h-8 rtg-shrink-0 rtg-items-center rtg-justify-center rtg-rounded-md rtg-px-3 rtg-text-sm rtg-font-medium rtg-transition-colors focus:rtg-outline-none focus:rtg-ring-1 focus:rtg-ring-ring disabled:rtg-pointer-events-none disabled:rtg-opacity-50",{variants:{variant:{default:"rtg-border rtg-bg-transparent hover:rtg-bg-secondary",destructive:"rtg-border group-[.destructive]:rtg-border-muted/40 group-[.destructive]:rtg-hover:border-destructive/30 group-[.destructive]:rtg-hover:bg-destructive group-[.destructive]:hover:rtg-text-destructive-foreground group-[.destructive]:focus:rtg-ring-destructive"}},defaultVariants:{variant:"default"}}),km="rtg-fixed rtg-top-0 rtg-z-[100] rtg-flex rtg-max-h-screen rtg-w-full rtg-flex-col-reverse rtg-p-4 sm:rtg-bottom-0 sm:rtg-right-0 sm:rtg-top-auto sm:rtg-flex-col md:rtg-max-w-[420px]",Rm="rtg-absolute rtg-right-1 rtg-top-1 rtg-rounded-md rtg-p-1 rtg-text-foreground/50 rtg-opacity-0 rtg-transition-opacity hover:rtg-text-foreground focus:rtg-opacity-100 focus:rtg-outline-none focus:rtg-ring-1 group-hover:rtg-opacity-100 group-[.destructive]:rtg-text-red-300 group-[.destructive]:hover:rtg-text-red-50 group-[.destructive]:focus:rtg-ring-red-400 group-[.destructive]:focus:rtg-ring-offset-red-600",Om="rtg-text-sm rtg-opacity-90",Am="rtg-text-sm rtg-font-semibold [&+div]:rtg-text-xs";var Pm=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,Dn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Im(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Pm(t,s,r),r};const wo="closed";let dr=class extends b{constructor(){super(...arguments),this.variant="default",this.state=wo,this.handleCloseButtonClick=e=>{e.stopPropagation(),this.state=wo,this.dispatchEvent(new CustomEvent("close-toast",{bubbles:!0}))}}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c` <ol
|
|
4494
4494
|
part="toast-view-port"
|
|
4495
4495
|
tabindex="-1"
|
|
4496
4496
|
@click="${e=>e.stopPropagation()}"
|
|
@@ -4599,7 +4599,7 @@ body {
|
|
|
4599
4599
|
style="${e}"
|
|
4600
4600
|
tabindex=${this.tabindex}
|
|
4601
4601
|
></div>
|
|
4602
|
-
`}};Ns([l({type:String})],le.prototype,"defaultValue",2);Ns([l({type:Number})],le.prototype,"tabindex",2);Ns([l({type:String})],le.prototype,"orientation",2);le=Ns([h("rtg-tab")],le);var Ul=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Ul||{}),Nl=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Nl||{});const Xm=
|
|
4602
|
+
`}};Ns([l({type:String})],le.prototype,"defaultValue",2);Ns([l({type:Number})],le.prototype,"tabindex",2);Ns([l({type:String})],le.prototype,"orientation",2);le=Ns([h("rtg-tab")],le);var Ul=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Ul||{}),Nl=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Nl||{});const Xm=St("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-md rtg-text-sm rtg-font-medium rtg-ring-offset-background rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-2 focus-visible:rtg-ring-ring focus-visible:rtg-ring-offset-2 disabled:rtg-pointer-events-none disabled:rtg-opacity-50 data-[state=on]:rtg-bg-accent data-[state=on]:rtg-text-accent-foreground rtg-bg-transparent rtg-h-10 rtg-px-3",{variants:{variant:{default:"hover:rtg-bg-muted hover:rtg-text-muted-foreground",outline:"rtg-border rtg-border-input hover:rtg-bg-accent hover:rtg-text-accent-foreground"},size:{sm:"rtg-h-9 rtg-px-2.5",md:"rtg-h-10 rtg-px-3",lg:"rtg-h-11 rtg-px-5"}},defaultVariants:{variant:"default",size:"sm"}});var Jm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,xr=(e,t,s,o)=>{for(var r=o>1?void 0:o?Qm(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Jm(t,s,r),r};let qt=class extends b{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=Nl.DEFAULT,this.size=Ul.SMALL}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return c`
|
|
4603
4603
|
<button
|
|
4604
4604
|
type="button"
|
|
4605
4605
|
part="toggle"
|
|
@@ -4614,19 +4614,19 @@ body {
|
|
|
4614
4614
|
>
|
|
4615
4615
|
<slot></slot>
|
|
4616
4616
|
</button>
|
|
4617
|
-
`}};qt.toggleVariants=Xm;xr([l({type:Boolean})],qt.prototype,"disabled",2);xr([l({attribute:!0,type:Boolean,reflect:!0})],qt.prototype,"checked",2);xr([l({attribute:!0,type:Boolean,reflect:!0})],qt.prototype,"required",2);xr([l({attribute:!0,type:String})],qt.prototype,"variant",2);xr([l({attribute:!0,type:String})],qt.prototype,"size",2);qt=xr([h("rtg-toggle")],qt);var Rs=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(Rs||{}),Nn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Nn||{}),zn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(zn||{});const tb=
|
|
4617
|
+
`}};qt.toggleVariants=Xm;xr([l({type:Boolean})],qt.prototype,"disabled",2);xr([l({attribute:!0,type:Boolean,reflect:!0})],qt.prototype,"checked",2);xr([l({attribute:!0,type:Boolean,reflect:!0})],qt.prototype,"required",2);xr([l({attribute:!0,type:String})],qt.prototype,"variant",2);xr([l({attribute:!0,type:String})],qt.prototype,"size",2);qt=xr([h("rtg-toggle")],qt);var Rs=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(Rs||{}),Nn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Nn||{}),zn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(zn||{});const tb=St("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-md rtg-text-sm rtg-font-medium rtg-ring-offset-background rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-2 focus-visible:rtg-ring-ring focus-visible:rtg-ring-offset-2 disabled:rtg-pointer-events-none disabled:rtg-opacity-50 data-[state=on]:rtg-bg-accent data-[state=on]:rtg-text-accent-foreground rtg-bg-transparent rtg-h-10 rtg-px-3",{variants:{variant:{default:" hover:rtg-bg-muted hover:rtg-text-muted-foreground",outline:" rtg-border rtg-border-input hover:rtg-bg-accent hover:rtg-text-accent-foreground"},size:{sm:"rtg-h-9 rtg-px-2.5",md:"rtg-h-10 rtg-px-3",lg:"rtg-h-11 rtg-px-5"}},defaultVariants:{variant:"default",size:"sm"}}),eb="rtg-flex rtg-items-center rtg-justify-center rtg-gap-1";var rb=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,Be=(e,t,s,o)=>{for(var r=o>1?void 0:o?sb(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&rb(t,s,r),r};let jt=class extends b{constructor(){super(...arguments),this.checked=!1,this.id=vn(),this.variant=Nn.DEFAULT,this.size=zn.SMALL,this.disabled=!1,this.type=Rs.SINGLE}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof Vt);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.variant=this._parent.variant,this.size=this._parent.size,this.checked=this._parent.selectedItems.includes(this.id),this.type=this._parent.type,this.moveLightDomChildrenInto(this._containerElement)}updated(e){this.variant=this._parent.variant,this.size=this._parent.size,this.checked=this._parent.selectedItems.includes(this.id),this.type=this._parent.type}toggleSelection(e){try{if(this.disabled===!1){const t=this._parent.selectedItems.indexOf(e);this.type===Rs.SINGLE?(t!==-1?this._parent.selectedItems.splice(t,1):this._parent.selectedItems[0]=e,this._siblings.forEach(s=>s.requestUpdate())):t!==-1?this._parent.selectedItems.splice(t,1):this._parent.selectedItems.push(e),this.requestUpdate()}}catch(t){console.log("error",t)}}render(){return c`
|
|
4618
4618
|
<button
|
|
4619
4619
|
part="toggle-group-item"
|
|
4620
4620
|
id=${this.id}
|
|
4621
4621
|
type="button"
|
|
4622
|
-
class="${g(
|
|
4622
|
+
class="${g(jt.toggleGroupVariants({variant:this.variant,size:this.size,className:this.className}))}"
|
|
4623
4623
|
aria-label="Toggle bold"
|
|
4624
4624
|
aria-pressed=${this.checked}
|
|
4625
4625
|
data-state="${this.checked?"on":"off"}"
|
|
4626
4626
|
?disabled=${this.disabled}
|
|
4627
4627
|
@click=${()=>{this.toggleSelection(this.id)}}
|
|
4628
4628
|
></button>
|
|
4629
|
-
`}};
|
|
4629
|
+
`}};jt.toggleGroupVariants=tb;Be([l({attribute:!0,type:Boolean,reflect:!0})],jt.prototype,"checked",2);Be([l({attribute:!0,type:String,reflect:!0})],jt.prototype,"id",2);Be([l({attribute:!0,type:String})],jt.prototype,"variant",2);Be([l({attribute:!0,type:String})],jt.prototype,"size",2);Be([l({type:Boolean})],jt.prototype,"disabled",2);Be([l({type:String})],jt.prototype,"type",2);jt=Be([h("rtg-toggle-group-item")],jt);var ob=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,qe=(e,t,s,o)=>{for(var r=o>1?void 0:o?nb(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ob(t,s,r),r};let Vt=class extends b{constructor(){super(...arguments),this.disabled=!1,this.type=Rs.SINGLE,this.required=!1,this.variant=Nn.DEFAULT,this.size=zn.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("rtg-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return c`
|
|
4630
4630
|
<div
|
|
4631
4631
|
part="toggle-group"
|
|
4632
4632
|
role="group"
|
|
@@ -4900,7 +4900,7 @@ body {
|
|
|
4900
4900
|
id="${this.identifier}"
|
|
4901
4901
|
aria-hidden="${this.hidden}"
|
|
4902
4902
|
></div>
|
|
4903
|
-
`}`}};Ht._counter=0;ns([l({type:String})],Ht.prototype,"_id",2);ns([l({attribute:"aria-hidden",type:String})],Ht.prototype,"_hidden",2);ns([l({attribute:"data-value",type:String})],Ht.prototype,"value",1);ns([l({type:Boolean})],Ht.prototype,"selected",2);Ht=ns([h("rtg-menubar-item")],Ht);var rf=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,Ve=(e,t,s,o)=>{for(var r=o>1?void 0:o?sf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&rf(t,s,r),r};let
|
|
4903
|
+
`}`}};Ht._counter=0;ns([l({type:String})],Ht.prototype,"_id",2);ns([l({attribute:"aria-hidden",type:String})],Ht.prototype,"_hidden",2);ns([l({attribute:"data-value",type:String})],Ht.prototype,"value",1);ns([l({type:Boolean})],Ht.prototype,"selected",2);Ht=ns([h("rtg-menubar-item")],Ht);var rf=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,Ve=(e,t,s,o)=>{for(var r=o>1?void 0:o?sf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&rf(t,s,r),r};let _t=class extends b{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var e,t;if(this._id!=="")return this._id;const s=(t=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div[rtgcmd-group]");return s?this._id=`${s.getAttribute("id")}li${_t._counter++}`:this._id=`rtgcmdrxgxli${_t._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return c`
|
|
4904
4904
|
<div
|
|
4905
4905
|
part="menubar-radio-item"
|
|
4906
4906
|
class="${g(Gb,this.disabled?"rtg-pointer-events-none rtg-opacity-50":"",this.className)}"
|
|
@@ -4922,13 +4922,13 @@ body {
|
|
|
4922
4922
|
${this.checked?c` ${yn()} `:A}
|
|
4923
4923
|
</span>
|
|
4924
4924
|
</div>
|
|
4925
|
-
`}};
|
|
4925
|
+
`}};_t._counter=0;_t.styles=[Ue`
|
|
4926
4926
|
.icon-space {
|
|
4927
4927
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
4928
4928
|
height: 16px;
|
|
4929
4929
|
display: inline-block;
|
|
4930
4930
|
}
|
|
4931
|
-
`];Ve([l({type:String})],
|
|
4931
|
+
`];Ve([l({type:String})],_t.prototype,"_id",2);Ve([l({attribute:"aria-hidden",type:String})],_t.prototype,"_hidden",2);Ve([l({attribute:"data-value",type:String})],_t.prototype,"value",1);Ve([l({type:Boolean})],_t.prototype,"selected",2);Ve([l({type:Boolean})],_t.prototype,"checked",2);Ve([l({type:Boolean})],_t.prototype,"disabled",2);_t=Ve([h("rtg-menubar-radio-item")],_t);var of=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,He=(e,t,s,o)=>{for(var r=o>1?void 0:o?nf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&of(t,s,r),r};let Ct=class extends b{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var e,t;if(this._id!=="")return this._id;const s=(t=(e=this.parentElement)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("div[rtgcmd-group]");return s?this._id=`${s.getAttribute("id")}li${Ct._counter++}`:this._id=`rtgcmdrxgxli${Ct._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return c`
|
|
4932
4932
|
<div
|
|
4933
4933
|
part="menubar-checkbox-item"
|
|
4934
4934
|
class="${g(Bb,this.disabled?"rtg-pointer-events-none rtg-opacity-50":"",this.className)}"
|
|
@@ -4961,13 +4961,13 @@ body {
|
|
|
4961
4961
|
`:A}
|
|
4962
4962
|
</span>
|
|
4963
4963
|
</div>
|
|
4964
|
-
`}};
|
|
4964
|
+
`}};Ct._counter=0;Ct.styles=[Ue`
|
|
4965
4965
|
.icon-space {
|
|
4966
4966
|
width: 16px; /* Fixed width to reserve space for the check icon */
|
|
4967
4967
|
height: 16px;
|
|
4968
4968
|
display: inline-block;
|
|
4969
4969
|
}
|
|
4970
|
-
`];He([l({type:String})],
|
|
4970
|
+
`];He([l({type:String})],Ct.prototype,"_id",2);He([l({attribute:"aria-hidden",type:String})],Ct.prototype,"_hidden",2);He([l({attribute:"data-value",type:String})],Ct.prototype,"value",1);He([l({type:Boolean})],Ct.prototype,"selected",2);He([l({type:Boolean})],Ct.prototype,"checked",2);He([l({type:Boolean})],Ct.prototype,"disabled",2);Ct=He([h("rtg-menubar-checkbox-item")],Ct);var af=Object.defineProperty,lf=Object.getOwnPropertyDescriptor,Mn=(e,t,s,o)=>{for(var r=o>1?void 0:o?lf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&af(t,s,r),r};let je=class extends b{constructor(){super(...arguments),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var e;if(this._id!=="")return this._id;const t=(e=this.parentElement)==null?void 0:e.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}s${je._counter++}`:this._id=`rtgcmdrxlxs${je._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`${this._hidden==="true"?A:c`
|
|
4971
4971
|
<div
|
|
4972
4972
|
part="menubar-separator"
|
|
4973
4973
|
class="${g(Wb,this.className)}"
|
|
@@ -5053,10 +5053,10 @@ body {
|
|
|
5053
5053
|
part="form-description"
|
|
5054
5054
|
class="${g(ff,this.className)}"
|
|
5055
5055
|
></p>
|
|
5056
|
-
`}};Gl([
|
|
5056
|
+
`}};Gl([mt({context:Hl})],sn.prototype,"itemContext",2);sn=Gl([h("rtg-form-description")],sn);const Sf="rtg-form-field-context";var $f=Object.defineProperty,Ef=Object.getOwnPropertyDescriptor,$r=(e,t,s,o)=>{for(var r=o>1?void 0:o?Ef(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&$f(t,s,r),r};let Gt=class extends b{constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var e;if(this.registered||!this.form||!this.name||!Array.isArray(this.validators)||this.validators.length===0)return;const t=o=>{for(const r of this.validators){const n=r(o);if(n)return n}return null};this.form.registerField({name:this.name,validator:t,defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const s=(e=this._container)==null?void 0:e.querySelector("input, textarea, select");s&&(this.defaultValue!==void 0&&(s.value=this.defaultValue),s.addEventListener("input",()=>{this.form.setValue(this.name,s.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return c`<div
|
|
5057
5057
|
part="form-field"
|
|
5058
5058
|
class="${g(vf,this.className)}"
|
|
5059
|
-
></div>`}};$r([
|
|
5059
|
+
></div>`}};$r([mt({context:is})],Gt.prototype,"form",2);$r([l({type:String})],Gt.prototype,"name",2);$r([l({type:Array})],Gt.prototype,"validators",2);$r([l({type:String})],Gt.prototype,"defaultValue",2);$r([pe({context:Sf})],Gt.prototype,"fieldName",2);Gt=$r([h("rtg-form-field")],Gt);var kf=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Wl=(e,t,s,o)=>{for(var r=o>1?void 0:o?Rf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&kf(t,s,r),r};let on=class extends b{constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return c`<div
|
|
5060
5060
|
part="form-item"
|
|
5061
5061
|
class="${g(yf,this.className)}"
|
|
5062
5062
|
></div>`}};Wl([pe({context:Hl})],on.prototype,"itemContext",2);on=Wl([h("rtg-form-item")],on);var Of=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,Fn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Af(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Of(t,s,r),r};let Os=class extends b{constructor(){super(...arguments),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof Gt);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();const e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{const t=this.form.getError(e);this.hasError=!!t,this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return c`
|
|
@@ -5065,12 +5065,12 @@ body {
|
|
|
5065
5065
|
for="${this._field.name}"
|
|
5066
5066
|
class="${g(wf,this.hasError&&"rtg-text-destructive",this.className)}"
|
|
5067
5067
|
></label>
|
|
5068
|
-
`}};Fn([
|
|
5068
|
+
`}};Fn([mt({context:is})],Os.prototype,"form",2);Fn([E()],Os.prototype,"hasError",2);Os=Fn([h("rtg-form-label")],Os);var Pf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,Bn=(e,t,s,o)=>{for(var r=o>1?void 0:o?If(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Pf(t,s,r),r};let As=class extends ${constructor(){super(...arguments),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof Gt);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?c`<p
|
|
5069
5069
|
id="${this._field.name}-message"
|
|
5070
5070
|
class="${g(xf,this.className)}"
|
|
5071
5071
|
>
|
|
5072
5072
|
${this.error}
|
|
5073
|
-
</p>`:null}};Bn([
|
|
5073
|
+
</p>`:null}};Bn([mt({context:is})],As.prototype,"form",2);Bn([E()],As.prototype,"error",2);As=Bn([h("rtg-form-message")],As);var Lf=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,qn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Tf(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Lf(t,s,r),r};let Ps=class extends b{constructor(){super(...arguments),this.form=new ql,this.onSubmit=()=>{},this.handleSubmit=e=>{e.preventDefault(),this.form.validateAll()&&(alert("form submitted successfully"),this.onSubmit(this.form.getValues()))}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return c`
|
|
5074
5074
|
<form
|
|
5075
5075
|
part="form-root"
|
|
5076
5076
|
id="rtg-form"
|
|
@@ -5348,8 +5348,8 @@ body {
|
|
|
5348
5348
|
*
|
|
5349
5349
|
* This source code is licensed under the MIT license found in the
|
|
5350
5350
|
* LICENSE file in the root directory of this source tree.
|
|
5351
|
-
*/var xa;function Gf(){if(xa)return U;xa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.iterator;function y(p){return p===null||typeof p!="object"?null:(p=f&&p[f]||p["@@iterator"],typeof p=="function"?p:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function _(p,v,T){this.props=p,this.context=v,this.refs=C,this.updater=T||w}_.prototype.isReactComponent={},_.prototype.setState=function(p,v){if(typeof p!="object"&&typeof p!="function"&&p!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,v,"setState")},_.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function k(){}k.prototype=_.prototype;function I(p,v,T){this.props=p,this.context=v,this.refs=C,this.updater=T||w}var V=I.prototype=new k;V.constructor=I,x(V,_.prototype),V.isPureReactComponent=!0;var q=Array.isArray,P={H:null,A:null,T:null,S:null,V:null},tt=Object.prototype.hasOwnProperty;function J(p,v,T,D,F,K){return T=K.ref,{$$typeof:e,type:p,key:v,ref:T!==void 0?T:null,props:K}}function At(p,v){return J(p.type,v,void 0,void 0,void 0,p.props)}function at(p){return typeof p=="object"&&p!==null&&p.$$typeof===e}function Nt(p){var v={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(T){return v[T]})}var Pt=/\/+/g;function O(p,v){return typeof p=="object"&&p!==null&&p.key!=null?Nt(""+p.key):v.toString(36)}function Wt(){}function $t(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(Wt,Wt):(p.status="pending",p.then(function(v){p.status==="pending"&&(p.status="fulfilled",p.value=v)},function(v){p.status==="pending"&&(p.status="rejected",p.reason=v)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function bt(p,v,T,D,F){var K=typeof p;(K==="undefined"||K==="boolean")&&(p=null);var z=!1;if(p===null)z=!0;else switch(K){case"bigint":case"string":case"number":z=!0;break;case"object":switch(p.$$typeof){case e:case t:z=!0;break;case m:return z=p._init,bt(z(p._payload),v,T,D,F)}}if(z)return F=F(p),z=D===""?"."+O(p,0):D,q(F)?(T="",z!=null&&(T=z.replace(Pt,"$&/")+"/"),bt(F,v,T,"",function(xc){return xc})):F!=null&&(at(F)&&(F=At(F,T+(F.key==null||p&&p.key===F.key?"":(""+F.key).replace(Pt,"$&/")+"/")+z)),v.push(F)),1;z=0;var Kt=D===""?".":D+":";if(q(p))for(var Y=0;Y<p.length;Y++)D=p[Y],K=Kt+O(D,Y),z+=bt(D,v,T,K,F);else if(Y=y(p),typeof Y=="function")for(p=Y.call(p),Y=0;!(D=p.next()).done;)D=D.value,K=Kt+O(D,Y++),z+=bt(D,v,T,K,F);else if(K==="object"){if(typeof p.then=="function")return bt($t(p),v,T,D,F);throw v=String(p),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.")}return z}function lt(p,v,T){if(p==null)return p;var D=[],F=0;return bt(p,D,"","",function(K){return v.call(T,K,F++)}),D}function be(p){if(p._status===-1){var v=p._result;v=v(),v.then(function(T){(p._status===0||p._status===-1)&&(p._status=1,p._result=T)},function(T){(p._status===0||p._status===-1)&&(p._status=2,p._result=T)}),p._status===-1&&(p._status=0,p._result=v)}if(p._status===1)return p._result.default;throw p._result}var It=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var v=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(v))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)};function pt(){}return U.Children={map:lt,forEach:function(p,v,T){lt(p,function(){v.apply(this,arguments)},T)},count:function(p){var v=0;return lt(p,function(){v++}),v},toArray:function(p){return lt(p,function(v){return v})||[]},only:function(p){if(!at(p))throw Error("React.Children.only expected to receive a single React element child.");return p}},U.Component=_,U.Fragment=s,U.Profiler=r,U.PureComponent=I,U.StrictMode=o,U.Suspense=d,U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,U.__COMPILER_RUNTIME={__proto__:null,c:function(p){return P.H.useMemoCache(p)}},U.cache=function(p){return function(){return p.apply(null,arguments)}},U.cloneElement=function(p,v,T){if(p==null)throw Error("The argument must be a React element, but you passed "+p+".");var D=x({},p.props),F=p.key,K=void 0;if(v!=null)for(z in v.ref!==void 0&&(K=void 0),v.key!==void 0&&(F=""+v.key),v)!tt.call(v,z)||z==="key"||z==="__self"||z==="__source"||z==="ref"&&v.ref===void 0||(D[z]=v[z]);var z=arguments.length-2;if(z===1)D.children=T;else if(1<z){for(var Kt=Array(z),Y=0;Y<z;Y++)Kt[Y]=arguments[Y+2];D.children=Kt}return J(p.type,F,void 0,void 0,K,D)},U.createContext=function(p){return p={$$typeof:i,_currentValue:p,_currentValue2:p,_threadCount:0,Provider:null,Consumer:null},p.Provider=p,p.Consumer={$$typeof:n,_context:p},p},U.createElement=function(p,v,T){var D,F={},K=null;if(v!=null)for(D in v.key!==void 0&&(K=""+v.key),v)tt.call(v,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=v[D]);var z=arguments.length-2;if(z===1)F.children=T;else if(1<z){for(var Kt=Array(z),Y=0;Y<z;Y++)Kt[Y]=arguments[Y+2];F.children=Kt}if(p&&p.defaultProps)for(D in z=p.defaultProps,z)F[D]===void 0&&(F[D]=z[D]);return J(p,K,void 0,void 0,null,F)},U.createRef=function(){return{current:null}},U.forwardRef=function(p){return{$$typeof:a,render:p}},U.isValidElement=at,U.lazy=function(p){return{$$typeof:m,_payload:{_status:-1,_result:p},_init:be}},U.memo=function(p,v){return{$$typeof:u,type:p,compare:v===void 0?null:v}},U.startTransition=function(p){var v=P.T,T={};P.T=T;try{var D=p(),F=P.S;F!==null&&F(T,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(pt,It)}catch(K){It(K)}finally{P.T=v}},U.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},U.use=function(p){return P.H.use(p)},U.useActionState=function(p,v,T){return P.H.useActionState(p,v,T)},U.useCallback=function(p,v){return P.H.useCallback(p,v)},U.useContext=function(p){return P.H.useContext(p)},U.useDebugValue=function(){},U.useDeferredValue=function(p,v){return P.H.useDeferredValue(p,v)},U.useEffect=function(p,v,T){var D=P.H;if(typeof T=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return D.useEffect(p,v)},U.useId=function(){return P.H.useId()},U.useImperativeHandle=function(p,v,T){return P.H.useImperativeHandle(p,v,T)},U.useInsertionEffect=function(p,v){return P.H.useInsertionEffect(p,v)},U.useLayoutEffect=function(p,v){return P.H.useLayoutEffect(p,v)},U.useMemo=function(p,v){return P.H.useMemo(p,v)},U.useOptimistic=function(p,v){return P.H.useOptimistic(p,v)},U.useReducer=function(p,v,T){return P.H.useReducer(p,v,T)},U.useRef=function(p){return P.H.useRef(p)},U.useState=function(p){return P.H.useState(p)},U.useSyncExternalStore=function(p,v,T){return P.H.useSyncExternalStore(p,v,T)},U.useTransition=function(){return P.H.useTransition()},U.version="19.1.1",U}var _a;function Wf(){return _a||(_a=1,wa.exports=Gf()),wa.exports}var Kf=Wf();const Zl=Hf(Kf);Yl({tagName:"rtg-button",elementClass:kt,react:Zl});Yl({tagName:"rtg-checkbox",elementClass:se,react:Zl});const Xl="sb-text-destructive sb-text-sm sb-mt-1 sb-error-anim",Yf="sb-font-medium sb-text-sm sb-ml-2 sb-flex",Zf="sb-text-sm sb-text-gray-500 sb-mt-1",Xf="sb-flex-grow sb-border-t",Jf="sb-mx-4",Vn="",Qf="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",tv="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]",ev="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]",rv="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",sv="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",ov="sb-justify-self-center sb-rotate-0",nv="sb-border-0 sb-bg-background !sb-m-0",iv="sb-border sb-rounded-2xl sb-relative sb-py-6",av="!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",lv="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",cv="!sb-w-[160px] sb-gap-4 ";var L=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(L||{});const Q={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},dv=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,uv=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,hv=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function xo(e,t,s){const o=e.formData[t],r=[],n=d=>{if(["input","checkbox","otp"].includes(d.element_type)&&"data_key"in d&&d.data_key===t)return d;if(d.element_type==="container")for(const u of d.properties.children){const m=n(u);if(m)return m}return null},i=e.renderSpec?n(e.renderSpec.root_container):null;if(!i||!("validation"in i.properties))return;const{validation:a}=i.properties;if(!(!a||s!=="submit"&&a.on_event!==s)){if(i.hidden){delete e.errors[t];return}for(const d of a.rules){if(i.hidden)continue;let u=!0;switch(d.type){case"required":u=Jl(o,i);break;case"min_length":u=Ql(o,d.length);break;case"max_length":u=tc(o,d.length);break;case"min_value":u=ec(o,d.value);break;case"max_value":u=rc(o,d.value);break;case"regex":u=sc(o,d.regex);break;case"field_match":u=oc(o,d.field_match?e.formData[d.field_match]:void 0);break;case"email":u=nc(o);break;case"phone":u=ic(o);break;case"date":u=ac(o);break;default:u=!0}!u&&d.error_message&&r.push(d.error_message)}e.errors={...e.errors,[t]:r}}}function Jl(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function Ql(e,t){return typeof e=="string"?e.length>=(t??0):!0}function tc(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function ec(e,t){const s=typeof t=="string"?parseFloat(t):t,o=typeof e=="string"?parseFloat(e):e;return typeof o=="number"&&typeof s=="number"&&!isNaN(o)&&!isNaN(s)?o>=s:!0}function rc(e,t){const s=typeof t=="string"?parseFloat(t):t,o=typeof e=="string"?parseFloat(e):e;return typeof o=="number"&&typeof s=="number"&&!isNaN(o)&&!isNaN(s)?o<=s:!0}function sc(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function oc(e,t){return t!==void 0?e===t:!0}function nc(e){return typeof e=="string"?uv.test(e):!0}function ic(e){return typeof e=="string"?dv.test(e):!0}function ac(e){return typeof e=="string"?hv.test(e):!0}const lc="sb:env",Bs="sb:auth",qs="customizations",Hn=Symbol("renderSpecContext");var cc=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(cc||{}),an=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(an||{}),re=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(re||{}),vt=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(vt||{}),Et=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Et||{}),dt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(dt||{});function dc(e){var t,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(s=dc(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function pv(){for(var e,t,s=0,o="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=dc(e))&&(o&&(o+=" "),o+=t);return o}const Gn="-",gv=e=>{const t=bv(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const a=i.split(Gn);return a[0]===""&&a.length!==1&&a.shift(),uc(a,t)||mv(i)},getConflictingClassGroupIds:(i,a)=>{const d=s[i]||[];return a&&o[i]?[...d,...o[i]]:d}}},uc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),r=o?uc(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const n=e.join(Gn);return(i=t.validators.find(({validator:a})=>a(n)))==null?void 0:i.classGroupId},Ca=/^\[(.+)\]$/,mv=e=>{if(Ca.test(e)){const t=Ca.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},bv=e=>{const{theme:t,prefix:s}=e,o={nextPart:new Map,validators:[]};return vv(Object.entries(e.classGroups),s).forEach(([n,i])=>{ln(i,o,n,t)}),o},ln=(e,t,s,o)=>{e.forEach(r=>{if(typeof r=="string"){const n=r===""?t:Sa(t,r);n.classGroupId=s;return}if(typeof r=="function"){if(fv(r)){ln(r(o),t,s,o);return}t.validators.push({validator:r,classGroupId:s});return}Object.entries(r).forEach(([n,i])=>{ln(i,Sa(t,n),s,o)})})},Sa=(e,t)=>{let s=e;return t.split(Gn).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},fv=e=>e.isThemeGetter,vv=(e,t)=>t?e.map(([s,o])=>{const r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[s,r]}):e,yv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const r=(n,i)=>{s.set(n,i),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let i=s.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return r(n,i),i},set(n,i){s.has(n)?s.set(n,i):r(n,i)}}},hc="!",wv=e=>{const{separator:t,experimentalParseClassName:s}=e,o=t.length===1,r=t[0],n=t.length,i=a=>{const d=[];let u=0,m=0,f;for(let _=0;_<a.length;_++){let k=a[_];if(u===0){if(k===r&&(o||a.slice(_,_+n)===t)){d.push(a.slice(m,_)),m=_+n;continue}if(k==="/"){f=_;continue}}k==="["?u++:k==="]"&&u--}const y=d.length===0?a:a.substring(m),w=y.startsWith(hc),x=w?y.substring(1):y,C=f&&f>m?f-m:void 0;return{modifiers:d,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}};return s?a=>s({className:a,parseClassName:i}):i},xv=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(o=>{o[0]==="["?(t.push(...s.sort(),o),s=[]):s.push(o)}),t.push(...s.sort()),t},_v=e=>({cache:yv(e.cacheSize),parseClassName:wv(e),...gv(e)}),Cv=/\s+/,Sv=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],i=e.trim().split(Cv);let a="";for(let d=i.length-1;d>=0;d-=1){const u=i[d],{modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:w}=s(u);let x=!!w,C=o(x?y.substring(0,w):y);if(!C){if(!x){a=u+(a.length>0?" "+a:a);continue}if(C=o(y),!C){a=u+(a.length>0?" "+a:a);continue}x=!1}const _=xv(m).join(":"),k=f?_+hc:_,I=k+C;if(n.includes(I))continue;n.push(I);const V=r(C,x);for(let q=0;q<V.length;++q){const P=V[q];n.push(k+P)}a=u+(a.length>0?" "+a:a)}return a};function $v(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=pc(t))&&(o&&(o+=" "),o+=s);return o}const pc=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=pc(e[o]))&&(s&&(s+=" "),s+=t);return s};function Ev(e,...t){let s,o,r,n=i;function i(d){const u=t.reduce((m,f)=>f(m),e());return s=_v(u),o=s.cache.get,r=s.cache.set,n=a,a(d)}function a(d){const u=o(d);if(u)return u;const m=Sv(d,s);return r(d,m),m}return function(){return n($v.apply(null,arguments))}}const W=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},gc=/^\[(?:([a-z-]+):)?(.+)\]$/i,kv=/^\d+\/\d+$/,Rv=new Set(["px","full","screen"]),Ov=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Av=/\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$/,Pv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Iv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mt=e=>er(e)||Rv.has(e)||kv.test(e),Xt=e=>Er(e,"length",Fv),er=e=>!!e&&!Number.isNaN(Number(e)),_o=e=>Er(e,"number",er),Ir=e=>!!e&&Number.isInteger(Number(e)),Tv=e=>e.endsWith("%")&&er(e.slice(0,-1)),N=e=>gc.test(e),Jt=e=>Ov.test(e),Dv=new Set(["length","size","percentage"]),jv=e=>Er(e,Dv,mc),Uv=e=>Er(e,"position",mc),Nv=new Set(["image","url"]),zv=e=>Er(e,Nv,qv),Mv=e=>Er(e,"",Bv),Lr=()=>!0,Er=(e,t,s)=>{const o=gc.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):s(o[2]):!1},Fv=e=>Av.test(e)&&!Pv.test(e),mc=()=>!1,Bv=e=>Iv.test(e),qv=e=>Lv.test(e),Vv=()=>{const e=W("colors"),t=W("spacing"),s=W("blur"),o=W("brightness"),r=W("borderColor"),n=W("borderRadius"),i=W("borderSpacing"),a=W("borderWidth"),d=W("contrast"),u=W("grayscale"),m=W("hueRotate"),f=W("invert"),y=W("gap"),w=W("gradientColorStops"),x=W("gradientColorStopPositions"),C=W("inset"),_=W("margin"),k=W("opacity"),I=W("padding"),V=W("saturate"),q=W("scale"),P=W("sepia"),tt=W("skew"),J=W("space"),At=W("translate"),at=()=>["auto","contain","none"],Nt=()=>["auto","hidden","clip","visible","scroll"],Pt=()=>["auto",N,t],O=()=>[N,t],Wt=()=>["",Mt,Xt],$t=()=>["auto",er,N],bt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],lt=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],It=()=>["start","end","center","between","around","evenly","stretch"],pt=()=>["","0",N],p=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>[er,N];return{cacheSize:500,separator:":",theme:{colors:[Lr],spacing:[Mt,Xt],blur:["none","",Jt,N],brightness:v(),borderColor:[e],borderRadius:["none","","full",Jt,N],borderSpacing:O(),borderWidth:Wt(),contrast:v(),grayscale:pt(),hueRotate:v(),invert:pt(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Tv,Xt],inset:Pt(),margin:Pt(),opacity:v(),padding:O(),saturate:v(),scale:v(),sepia:pt(),skew:v(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[Jt]}],"break-after":[{"break-after":p()}],"break-before":[{"break-before":p()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...bt(),N]}],overflow:[{overflow:Nt()}],"overflow-x":[{"overflow-x":Nt()}],"overflow-y":[{"overflow-y":Nt()}],overscroll:[{overscroll:at()}],"overscroll-x":[{"overscroll-x":at()}],"overscroll-y":[{"overscroll-y":at()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ir,N]}],basis:[{basis:Pt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",Ir,N]}],"grid-cols":[{"grid-cols":[Lr]}],"col-start-end":[{col:["auto",{span:["full",Ir,N]},N]}],"col-start":[{"col-start":$t()}],"col-end":[{"col-end":$t()}],"grid-rows":[{"grid-rows":[Lr]}],"row-start-end":[{row:["auto",{span:[Ir,N]},N]}],"row-start":[{"row-start":$t()}],"row-end":[{"row-end":$t()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...It()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...It(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...It(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[Jt]},Jt]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jt,Xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_o]}],"font-family":[{font:[Lr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",er,_o]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mt,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...lt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mt,Xt]}],"underline-offset":[{"underline-offset":["auto",Mt,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...bt(),Uv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...lt(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:lt()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...lt()]}],"outline-offset":[{"outline-offset":[Mt,N]}],"outline-w":[{outline:[Mt,Xt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Wt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Mt,Xt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jt,Mv]}],"shadow-color":[{shadow:[Lr]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Jt,N]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[f]}],saturate:[{saturate:[V]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:v()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:v()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Ir,N]}],"translate-x":[{"translate-x":[At]}],"translate-y":[{"translate-y":[At]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{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",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mt,Xt,_o]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Hv=Ev(Vv);function H(...e){return Hv(pv(e))}function S(e){return Object.entries(e).filter(([t,s])=>typeof s!="object"&&s!=null).map(([t,s])=>`${t}: ${s};`).join(" ")}function Gv(e){document.documentElement.setAttribute("data-theme",e)}function Wv(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&Gv("light")}function $a(){return document.documentElement.getAttribute("data-theme")}function Vs(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function nt(e){const t={},s={};for(const o in e){const r=e[o];r!=null&&(o in Q&&typeof r=="object"?s[o]=r:t[o]=r)}return{base:t,responsive:s}}function Kv(e){return{...Q,...e??{}}}function it(e,t,s){const o=Kv(s);let r="";for(const i in t){const d=`(min-width: ${o[i]})`,u=Object.entries(t[i]).map(([m,f])=>`${m}: ${f} !important;`).join(" ");r+=`@media ${d} { #${e} { ${u} } }
|
|
5352
|
-
`}let n=document.getElementById(`responsive-style-${e}`);n||(n=document.createElement("style"),n.id=`responsive-style-${e}`,document.head.appendChild(n)),n.textContent=r}function cn(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function Yv(e,t){if(!t.length)return;await cn();const s=e.offsetWidth,o=t.length,r=60,n=8;let i=1,a=0,d=-1;for(let u=1;u<=o;u++){const m=n*(u-1),f=(s-m)/u,y=o%u;if(f<r)continue;let w=0;if(y===0&&u>i)w=d+1;else if(y>=2)w=2;else continue;(w>d||w===d&&f>a)&&(i=u,a=f,d=w)}e.style.setProperty("--sso-cols",String(i)),e.style.setProperty("--sso-gap",`${n}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function Hs(e,t){const s={...e};for(const o in t){const r=t[o],n=s[o];r&&typeof r=="object"&&!Array.isArray(r)?s[o]=Hs(n??{},r):s[o]=r}return s}function
|
|
5351
|
+
*/var xa;function Gf(){if(xa)return U;xa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.iterator;function y(p){return p===null||typeof p!="object"?null:(p=f&&p[f]||p["@@iterator"],typeof p=="function"?p:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function _(p,v,T){this.props=p,this.context=v,this.refs=C,this.updater=T||w}_.prototype.isReactComponent={},_.prototype.setState=function(p,v){if(typeof p!="object"&&typeof p!="function"&&p!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,v,"setState")},_.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function k(){}k.prototype=_.prototype;function I(p,v,T){this.props=p,this.context=v,this.refs=C,this.updater=T||w}var V=I.prototype=new k;V.constructor=I,x(V,_.prototype),V.isPureReactComponent=!0;var q=Array.isArray,P={H:null,A:null,T:null,S:null,V:null},tt=Object.prototype.hasOwnProperty;function J(p,v,T,D,F,K){return T=K.ref,{$$typeof:e,type:p,key:v,ref:T!==void 0?T:null,props:K}}function Pt(p,v){return J(p.type,v,void 0,void 0,void 0,p.props)}function lt(p){return typeof p=="object"&&p!==null&&p.$$typeof===e}function zt(p){var v={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(T){return v[T]})}var It=/\/+/g;function O(p,v){return typeof p=="object"&&p!==null&&p.key!=null?zt(""+p.key):v.toString(36)}function Wt(){}function Et(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(Wt,Wt):(p.status="pending",p.then(function(v){p.status==="pending"&&(p.status="fulfilled",p.value=v)},function(v){p.status==="pending"&&(p.status="rejected",p.reason=v)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function ft(p,v,T,D,F){var K=typeof p;(K==="undefined"||K==="boolean")&&(p=null);var z=!1;if(p===null)z=!0;else switch(K){case"bigint":case"string":case"number":z=!0;break;case"object":switch(p.$$typeof){case e:case t:z=!0;break;case m:return z=p._init,ft(z(p._payload),v,T,D,F)}}if(z)return F=F(p),z=D===""?"."+O(p,0):D,q(F)?(T="",z!=null&&(T=z.replace(It,"$&/")+"/"),ft(F,v,T,"",function(xc){return xc})):F!=null&&(lt(F)&&(F=Pt(F,T+(F.key==null||p&&p.key===F.key?"":(""+F.key).replace(It,"$&/")+"/")+z)),v.push(F)),1;z=0;var Kt=D===""?".":D+":";if(q(p))for(var Y=0;Y<p.length;Y++)D=p[Y],K=Kt+O(D,Y),z+=ft(D,v,T,K,F);else if(Y=y(p),typeof Y=="function")for(p=Y.call(p),Y=0;!(D=p.next()).done;)D=D.value,K=Kt+O(D,Y++),z+=ft(D,v,T,K,F);else if(K==="object"){if(typeof p.then=="function")return ft(Et(p),v,T,D,F);throw v=String(p),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.")}return z}function ct(p,v,T){if(p==null)return p;var D=[],F=0;return ft(p,D,"","",function(K){return v.call(T,K,F++)}),D}function be(p){if(p._status===-1){var v=p._result;v=v(),v.then(function(T){(p._status===0||p._status===-1)&&(p._status=1,p._result=T)},function(T){(p._status===0||p._status===-1)&&(p._status=2,p._result=T)}),p._status===-1&&(p._status=0,p._result=v)}if(p._status===1)return p._result.default;throw p._result}var Lt=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var v=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(v))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)};function gt(){}return U.Children={map:ct,forEach:function(p,v,T){ct(p,function(){v.apply(this,arguments)},T)},count:function(p){var v=0;return ct(p,function(){v++}),v},toArray:function(p){return ct(p,function(v){return v})||[]},only:function(p){if(!lt(p))throw Error("React.Children.only expected to receive a single React element child.");return p}},U.Component=_,U.Fragment=s,U.Profiler=r,U.PureComponent=I,U.StrictMode=o,U.Suspense=d,U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,U.__COMPILER_RUNTIME={__proto__:null,c:function(p){return P.H.useMemoCache(p)}},U.cache=function(p){return function(){return p.apply(null,arguments)}},U.cloneElement=function(p,v,T){if(p==null)throw Error("The argument must be a React element, but you passed "+p+".");var D=x({},p.props),F=p.key,K=void 0;if(v!=null)for(z in v.ref!==void 0&&(K=void 0),v.key!==void 0&&(F=""+v.key),v)!tt.call(v,z)||z==="key"||z==="__self"||z==="__source"||z==="ref"&&v.ref===void 0||(D[z]=v[z]);var z=arguments.length-2;if(z===1)D.children=T;else if(1<z){for(var Kt=Array(z),Y=0;Y<z;Y++)Kt[Y]=arguments[Y+2];D.children=Kt}return J(p.type,F,void 0,void 0,K,D)},U.createContext=function(p){return p={$$typeof:i,_currentValue:p,_currentValue2:p,_threadCount:0,Provider:null,Consumer:null},p.Provider=p,p.Consumer={$$typeof:n,_context:p},p},U.createElement=function(p,v,T){var D,F={},K=null;if(v!=null)for(D in v.key!==void 0&&(K=""+v.key),v)tt.call(v,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=v[D]);var z=arguments.length-2;if(z===1)F.children=T;else if(1<z){for(var Kt=Array(z),Y=0;Y<z;Y++)Kt[Y]=arguments[Y+2];F.children=Kt}if(p&&p.defaultProps)for(D in z=p.defaultProps,z)F[D]===void 0&&(F[D]=z[D]);return J(p,K,void 0,void 0,null,F)},U.createRef=function(){return{current:null}},U.forwardRef=function(p){return{$$typeof:a,render:p}},U.isValidElement=lt,U.lazy=function(p){return{$$typeof:m,_payload:{_status:-1,_result:p},_init:be}},U.memo=function(p,v){return{$$typeof:u,type:p,compare:v===void 0?null:v}},U.startTransition=function(p){var v=P.T,T={};P.T=T;try{var D=p(),F=P.S;F!==null&&F(T,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(gt,Lt)}catch(K){Lt(K)}finally{P.T=v}},U.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},U.use=function(p){return P.H.use(p)},U.useActionState=function(p,v,T){return P.H.useActionState(p,v,T)},U.useCallback=function(p,v){return P.H.useCallback(p,v)},U.useContext=function(p){return P.H.useContext(p)},U.useDebugValue=function(){},U.useDeferredValue=function(p,v){return P.H.useDeferredValue(p,v)},U.useEffect=function(p,v,T){var D=P.H;if(typeof T=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return D.useEffect(p,v)},U.useId=function(){return P.H.useId()},U.useImperativeHandle=function(p,v,T){return P.H.useImperativeHandle(p,v,T)},U.useInsertionEffect=function(p,v){return P.H.useInsertionEffect(p,v)},U.useLayoutEffect=function(p,v){return P.H.useLayoutEffect(p,v)},U.useMemo=function(p,v){return P.H.useMemo(p,v)},U.useOptimistic=function(p,v){return P.H.useOptimistic(p,v)},U.useReducer=function(p,v,T){return P.H.useReducer(p,v,T)},U.useRef=function(p){return P.H.useRef(p)},U.useState=function(p){return P.H.useState(p)},U.useSyncExternalStore=function(p,v,T){return P.H.useSyncExternalStore(p,v,T)},U.useTransition=function(){return P.H.useTransition()},U.version="19.1.1",U}var _a;function Wf(){return _a||(_a=1,wa.exports=Gf()),wa.exports}var Kf=Wf();const Zl=Hf(Kf);Yl({tagName:"rtg-button",elementClass:Rt,react:Zl});Yl({tagName:"rtg-checkbox",elementClass:se,react:Zl});const Xl="sb-text-destructive sb-text-sm sb-mt-1 sb-error-anim",Yf="sb-font-medium sb-text-sm sb-ml-2 sb-flex",Zf="sb-text-sm sb-text-gray-500 sb-mt-1",Xf="sb-flex-grow sb-border-t",Jf="sb-mx-4",Vn="",Qf="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",tv="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]",ev="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]",rv="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",sv="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",ov="sb-justify-self-center sb-rotate-0",nv="sb-border-0 sb-bg-background !sb-m-0",iv="sb-border sb-rounded-2xl sb-relative sb-py-6",av="!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",lv="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",cv="!sb-w-[160px] sb-gap-4 ";var L=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(L||{});const Q={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},dv=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,uv=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,hv=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function xo(e,t,s){const o=e.formData[t],r=[],n=d=>{if(["input","checkbox","otp"].includes(d.element_type)&&"data_key"in d&&d.data_key===t)return d;if(d.element_type==="container")for(const u of d.properties.children){const m=n(u);if(m)return m}return null},i=e.renderSpec?n(e.renderSpec.root_container):null;if(!i||!("validation"in i.properties))return;const{validation:a}=i.properties;if(!(!a||s!=="submit"&&a.on_event!==s)){if(i.hidden){delete e.errors[t];return}for(const d of a.rules){if(i.hidden)continue;let u=!0;switch(d.type){case"required":u=Jl(o,i);break;case"min_length":u=Ql(o,d.length);break;case"max_length":u=tc(o,d.length);break;case"min_value":u=ec(o,d.value);break;case"max_value":u=rc(o,d.value);break;case"regex":u=sc(o,d.regex);break;case"field_match":u=oc(o,d.field_match?e.formData[d.field_match]:void 0);break;case"email":u=nc(o);break;case"phone":u=ic(o);break;case"date":u=ac(o);break;default:u=!0}!u&&d.error_message&&r.push(d.error_message)}e.errors={...e.errors,[t]:r}}}function Jl(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function Ql(e,t){return typeof e=="string"?e.length>=(t??0):!0}function tc(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function ec(e,t){const s=typeof t=="string"?parseFloat(t):t,o=typeof e=="string"?parseFloat(e):e;return typeof o=="number"&&typeof s=="number"&&!isNaN(o)&&!isNaN(s)?o>=s:!0}function rc(e,t){const s=typeof t=="string"?parseFloat(t):t,o=typeof e=="string"?parseFloat(e):e;return typeof o=="number"&&typeof s=="number"&&!isNaN(o)&&!isNaN(s)?o<=s:!0}function sc(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function oc(e,t){return t!==void 0?e===t:!0}function nc(e){return typeof e=="string"?uv.test(e):!0}function ic(e){return typeof e=="string"?dv.test(e):!0}function ac(e){return typeof e=="string"?hv.test(e):!0}const lc="sb:env",Bs="sb:auth",qs="customizations",Hn=Symbol("renderSpecContext");var cc=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(cc||{}),an=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(an||{}),re=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(re||{}),yt=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(yt||{}),kt=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(kt||{}),ut=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(ut||{});function dc(e){var t,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(s=dc(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function pv(){for(var e,t,s=0,o="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=dc(e))&&(o&&(o+=" "),o+=t);return o}const Gn="-",gv=e=>{const t=bv(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const a=i.split(Gn);return a[0]===""&&a.length!==1&&a.shift(),uc(a,t)||mv(i)},getConflictingClassGroupIds:(i,a)=>{const d=s[i]||[];return a&&o[i]?[...d,...o[i]]:d}}},uc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),r=o?uc(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const n=e.join(Gn);return(i=t.validators.find(({validator:a})=>a(n)))==null?void 0:i.classGroupId},Ca=/^\[(.+)\]$/,mv=e=>{if(Ca.test(e)){const t=Ca.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},bv=e=>{const{theme:t,prefix:s}=e,o={nextPart:new Map,validators:[]};return vv(Object.entries(e.classGroups),s).forEach(([n,i])=>{ln(i,o,n,t)}),o},ln=(e,t,s,o)=>{e.forEach(r=>{if(typeof r=="string"){const n=r===""?t:Sa(t,r);n.classGroupId=s;return}if(typeof r=="function"){if(fv(r)){ln(r(o),t,s,o);return}t.validators.push({validator:r,classGroupId:s});return}Object.entries(r).forEach(([n,i])=>{ln(i,Sa(t,n),s,o)})})},Sa=(e,t)=>{let s=e;return t.split(Gn).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},fv=e=>e.isThemeGetter,vv=(e,t)=>t?e.map(([s,o])=>{const r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,a])=>[t+i,a])):n);return[s,r]}):e,yv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const r=(n,i)=>{s.set(n,i),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let i=s.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return r(n,i),i},set(n,i){s.has(n)?s.set(n,i):r(n,i)}}},hc="!",wv=e=>{const{separator:t,experimentalParseClassName:s}=e,o=t.length===1,r=t[0],n=t.length,i=a=>{const d=[];let u=0,m=0,f;for(let _=0;_<a.length;_++){let k=a[_];if(u===0){if(k===r&&(o||a.slice(_,_+n)===t)){d.push(a.slice(m,_)),m=_+n;continue}if(k==="/"){f=_;continue}}k==="["?u++:k==="]"&&u--}const y=d.length===0?a:a.substring(m),w=y.startsWith(hc),x=w?y.substring(1):y,C=f&&f>m?f-m:void 0;return{modifiers:d,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}};return s?a=>s({className:a,parseClassName:i}):i},xv=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(o=>{o[0]==="["?(t.push(...s.sort(),o),s=[]):s.push(o)}),t.push(...s.sort()),t},_v=e=>({cache:yv(e.cacheSize),parseClassName:wv(e),...gv(e)}),Cv=/\s+/,Sv=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],i=e.trim().split(Cv);let a="";for(let d=i.length-1;d>=0;d-=1){const u=i[d],{modifiers:m,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:w}=s(u);let x=!!w,C=o(x?y.substring(0,w):y);if(!C){if(!x){a=u+(a.length>0?" "+a:a);continue}if(C=o(y),!C){a=u+(a.length>0?" "+a:a);continue}x=!1}const _=xv(m).join(":"),k=f?_+hc:_,I=k+C;if(n.includes(I))continue;n.push(I);const V=r(C,x);for(let q=0;q<V.length;++q){const P=V[q];n.push(k+P)}a=u+(a.length>0?" "+a:a)}return a};function $v(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=pc(t))&&(o&&(o+=" "),o+=s);return o}const pc=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=pc(e[o]))&&(s&&(s+=" "),s+=t);return s};function Ev(e,...t){let s,o,r,n=i;function i(d){const u=t.reduce((m,f)=>f(m),e());return s=_v(u),o=s.cache.get,r=s.cache.set,n=a,a(d)}function a(d){const u=o(d);if(u)return u;const m=Sv(d,s);return r(d,m),m}return function(){return n($v.apply(null,arguments))}}const W=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},gc=/^\[(?:([a-z-]+):)?(.+)\]$/i,kv=/^\d+\/\d+$/,Rv=new Set(["px","full","screen"]),Ov=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Av=/\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$/,Pv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Iv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ft=e=>er(e)||Rv.has(e)||kv.test(e),Xt=e=>Er(e,"length",Fv),er=e=>!!e&&!Number.isNaN(Number(e)),_o=e=>Er(e,"number",er),Ir=e=>!!e&&Number.isInteger(Number(e)),Tv=e=>e.endsWith("%")&&er(e.slice(0,-1)),N=e=>gc.test(e),Jt=e=>Ov.test(e),Dv=new Set(["length","size","percentage"]),jv=e=>Er(e,Dv,mc),Uv=e=>Er(e,"position",mc),Nv=new Set(["image","url"]),zv=e=>Er(e,Nv,qv),Mv=e=>Er(e,"",Bv),Lr=()=>!0,Er=(e,t,s)=>{const o=gc.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):s(o[2]):!1},Fv=e=>Av.test(e)&&!Pv.test(e),mc=()=>!1,Bv=e=>Iv.test(e),qv=e=>Lv.test(e),Vv=()=>{const e=W("colors"),t=W("spacing"),s=W("blur"),o=W("brightness"),r=W("borderColor"),n=W("borderRadius"),i=W("borderSpacing"),a=W("borderWidth"),d=W("contrast"),u=W("grayscale"),m=W("hueRotate"),f=W("invert"),y=W("gap"),w=W("gradientColorStops"),x=W("gradientColorStopPositions"),C=W("inset"),_=W("margin"),k=W("opacity"),I=W("padding"),V=W("saturate"),q=W("scale"),P=W("sepia"),tt=W("skew"),J=W("space"),Pt=W("translate"),lt=()=>["auto","contain","none"],zt=()=>["auto","hidden","clip","visible","scroll"],It=()=>["auto",N,t],O=()=>[N,t],Wt=()=>["",Ft,Xt],Et=()=>["auto",er,N],ft=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ct=()=>["solid","dashed","dotted","double","none"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Lt=()=>["start","end","center","between","around","evenly","stretch"],gt=()=>["","0",N],p=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>[er,N];return{cacheSize:500,separator:":",theme:{colors:[Lr],spacing:[Ft,Xt],blur:["none","",Jt,N],brightness:v(),borderColor:[e],borderRadius:["none","","full",Jt,N],borderSpacing:O(),borderWidth:Wt(),contrast:v(),grayscale:gt(),hueRotate:v(),invert:gt(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Tv,Xt],inset:It(),margin:It(),opacity:v(),padding:O(),saturate:v(),scale:v(),sepia:gt(),skew:v(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[Jt]}],"break-after":[{"break-after":p()}],"break-before":[{"break-before":p()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ft(),N]}],overflow:[{overflow:zt()}],"overflow-x":[{"overflow-x":zt()}],"overflow-y":[{"overflow-y":zt()}],overscroll:[{overscroll:lt()}],"overscroll-x":[{"overscroll-x":lt()}],"overscroll-y":[{"overscroll-y":lt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ir,N]}],basis:[{basis:It()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:gt()}],shrink:[{shrink:gt()}],order:[{order:["first","last","none",Ir,N]}],"grid-cols":[{"grid-cols":[Lr]}],"col-start-end":[{col:["auto",{span:["full",Ir,N]},N]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Lr]}],"row-start-end":[{row:["auto",{span:[Ir,N]},N]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Lt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Lt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Lt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[Jt]},Jt]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jt,Xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_o]}],"font-family":[{font:[Lr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",er,_o]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ft,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ft,Xt]}],"underline-offset":[{"underline-offset":["auto",Ft,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ft(),Uv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...ct(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:ct()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ct()]}],"outline-offset":[{"outline-offset":[Ft,N]}],"outline-w":[{outline:[Ft,Xt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Wt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Ft,Xt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jt,Mv]}],"shadow-color":[{shadow:[Lr]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...be(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":be()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Jt,N]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[f]}],saturate:[{saturate:[V]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:v()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:v()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Ir,N]}],"translate-x":[{"translate-x":[Pt]}],"translate-y":[{"translate-y":[Pt]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{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",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ft,Xt,_o]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],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"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Hv=Ev(Vv);function H(...e){return Hv(pv(e))}function S(e){return Object.entries(e).filter(([t,s])=>typeof s!="object"&&s!=null).map(([t,s])=>`${t}: ${s};`).join(" ")}function Gv(e){document.documentElement.setAttribute("data-theme",e)}function Wv(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&Gv("light")}function $a(){return document.documentElement.getAttribute("data-theme")}function Vs(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function it(e){const t={},s={};for(const o in e){const r=e[o];r!=null&&(o in Q&&typeof r=="object"?s[o]=r:t[o]=r)}return{base:t,responsive:s}}function Kv(e){return{...Q,...e??{}}}function at(e,t,s){const o=Kv(s);let r="";for(const i in t){const d=`(min-width: ${o[i]})`,u=Object.entries(t[i]).map(([m,f])=>`${m}: ${f} !important;`).join(" ");r+=`@media ${d} { #${e} { ${u} } }
|
|
5352
|
+
`}let n=document.getElementById(`responsive-style-${e}`);n||(n=document.createElement("style"),n.id=`responsive-style-${e}`,document.head.appendChild(n)),n.textContent=r}function cn(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function Yv(e,t){if(!t.length)return;await cn();const s=e.offsetWidth,o=t.length,r=60,n=8;let i=1,a=0,d=-1;for(let u=1;u<=o;u++){const m=n*(u-1),f=(s-m)/u,y=o%u;if(f<r)continue;let w=0;if(y===0&&u>i)w=d+1;else if(y>=2)w=2;else continue;(w>d||w===d&&f>a)&&(i=u,a=f,d=w)}e.style.setProperty("--sso-cols",String(i)),e.style.setProperty("--sso-gap",`${n}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function Hs(e,t){const s={...e};for(const o in t){const r=t[o],n=s[o];r&&typeof r=="object"&&!Array.isArray(r)?s[o]=Hs(n??{},r):s[o]=r}return s}function wt(e,t){var s,o,r,n,i,a,d,u,m,f,y,w;return{default:(o=(s=t.byType)==null?void 0:s.buttons)==null?void 0:o.defaultButton,secondary:(n=(r=t.byType)==null?void 0:r.buttons)==null?void 0:n.secondaryButton,link:(a=(i=t.byType)==null?void 0:i.buttons)==null?void 0:a.linkButton,destructive:(u=(d=t.byType)==null?void 0:d.buttons)==null?void 0:u.destructiveButton,ghost:(f=(m=t.byType)==null?void 0:m.buttons)==null?void 0:f.ghostButton,outline:(w=(y=t.byType)==null?void 0:y.buttons)==null?void 0:w.outlineButton}[e]}function R(e,t,s,o,r,n=!1){var u,m;let i=e||"",a={...t};n&&((u=r==null?void 0:r.config)!=null&&u.font)&&(i=H(i,r.config.font));const d=f=>{if(!f)return;const{class:y,style:w,font:x,rule:C="merge"}=f;C==="override"?(i=x||y||"",a=w||{}):(i=H(i,y,x),a={...a,...w})};return d(s),o&&((m=r==null?void 0:r.byId)!=null&&m[o])&&d(r.byId[o]),{class:i,style:a}}function Wn(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function bc(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Zv(e){try{const t=e.replace(/^data:text\/html;base64,/,"");return decodeURIComponent(escape(atob(t)))}catch(t){return console.error("Failed to decode base64 html:",t),""}}function Yr(){return X`<svg
|
|
5353
5353
|
width="16"
|
|
5354
5354
|
height="16"
|
|
5355
5355
|
viewBox="0 0 16 16"
|
|
@@ -5443,7 +5443,7 @@ body {
|
|
|
5443
5443
|
>`;case"simple":return c`${o(s.slice(0,3))}${r()}${o(s.slice(3))}`;case"with_separator":return c`
|
|
5444
5444
|
${o(s.slice(0,2))}${r()}
|
|
5445
5445
|
${o(s.slice(2,4))}${r()} ${o(s.slice(4))}
|
|
5446
|
-
`;default:return o(s)}};exports.SbAccountInfo=class extends ${constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=
|
|
5446
|
+
`;default:return o(s)}};exports.SbAccountInfo=class extends ${constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=ut.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1}getButtonStyles(){const t=wt("default",this.customizations),s=wt("outline",this.customizations),o=R(Qs,{},t,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),r=R(to,{},s,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations);return{defaultMapped:o,outlineMapped:r}}getInputStyles(t=!1){var o,r,n;const s=t?Js:H(Ys);return R(s,{},(n=(r=(o=this.customizations)==null?void 0:o.byType)==null?void 0:r.inputs)==null?void 0:n.inputField,t?L.USER_PROFILE_EDITABLE_INPUT_FIELD:L.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,s,o;return R(H(Ks,"sb-hidden md:sb-inline"),{},(o=(s=(t=this.customizations)==null?void 0:t.byType)==null?void 0:s.labels)==null?void 0:o.inputLabel,L.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var s,o,r,n,i,a,d,u;return R(t?Zs:Xs,{},t?(n=(r=(o=(s=this.customizations)==null?void 0:s.byType)==null?void 0:o.userProfile)==null?void 0:r.userProfileCard)==null?void 0:n.editForm:(u=(d=(a=(i=this.customizations)==null?void 0:i.byType)==null?void 0:a.userProfile)==null?void 0:d.userProfileCard)==null?void 0:u.container,t?L.USER_PROFILE_EDIT_FORM:L.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderDisplayRow(t,s,o){const{class:r,style:n}=this.getLabelStyles(),{class:i,style:a}=this.getInputStyles(),d=this.layout===ut.COLUMN;return c`
|
|
5447
5447
|
<div
|
|
5448
5448
|
class=${H("sb-w-full",d?"sb-flex sb-flex-row-reverse md:sb-flex-col sb-gap-2":"sb-flex sb-items-center sb-justify-between sb-gap-2")}
|
|
5449
5449
|
>
|
|
@@ -5628,7 +5628,7 @@ body {
|
|
|
5628
5628
|
</div>
|
|
5629
5629
|
</rtg-card-content>
|
|
5630
5630
|
</rtg-card>
|
|
5631
|
-
`}createRenderRoot(){return this}};ot([l({type:Object})],exports.SbAccountInfo.prototype,"account",2);ot([l({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);ot([l({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);ot([l({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);ot([l({type:Object})],exports.SbAccountInfo.prototype,"content",2);ot([l({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);ot([l({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);ot([l({type:String})],exports.SbAccountInfo.prototype,"layout",2);ot([E()],exports.SbAccountInfo.prototype,"isEditingEmail",2);ot([E()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);ot([E()],exports.SbAccountInfo.prototype,"isEditingPhone",2);ot([E()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=ot([h("sb-account-info")],exports.SbAccountInfo);var iy=Object.defineProperty,ay=Object.getOwnPropertyDescriptor,Ge=(e,t,s,o)=>{for(var r=o>1?void 0:o?ay(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&iy(t,s,r),r};exports.SbPersonalInfo=class extends ${constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=
|
|
5631
|
+
`}createRenderRoot(){return this}};ot([l({type:Object})],exports.SbAccountInfo.prototype,"account",2);ot([l({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);ot([l({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);ot([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);ot([l({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);ot([l({type:Object})],exports.SbAccountInfo.prototype,"content",2);ot([l({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);ot([l({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);ot([l({type:String})],exports.SbAccountInfo.prototype,"layout",2);ot([E()],exports.SbAccountInfo.prototype,"isEditingEmail",2);ot([E()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);ot([E()],exports.SbAccountInfo.prototype,"isEditingPhone",2);ot([E()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=ot([h("sb-account-info")],exports.SbAccountInfo);var iy=Object.defineProperty,ay=Object.getOwnPropertyDescriptor,Ge=(e,t,s,o)=>{for(var r=o>1?void 0:o?ay(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&iy(t,s,r),r};exports.SbPersonalInfo=class extends ${constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=ut.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=wt("default",this.customizations),s=wt("outline",this.customizations),o=wt("ghost",this.customizations),r=R(Qs,{},t,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=R(to,{},s,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),i=R(Kn,{},o,L.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:r,outlineMapped:n,ghostMapped:i}}getInputStyles(t=!1){var o,r,n;const s=t?Js:H(Ys);return R(s,{},(n=(r=(o=this.customizations)==null?void 0:o.byType)==null?void 0:r.inputs)==null?void 0:n.inputField,t?L.USER_PROFILE_EDITABLE_INPUT_FIELD:L.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,s,o;return R(H(Ks,this.layout!==ut.ROW?"sb-basis-auto":""),{},(o=(s=(t=this.customizations)==null?void 0:t.byType)==null?void 0:s.labels)==null?void 0:o.inputLabel,L.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var s,o,r,n,i,a,d,u;return R(H(t?Zs+" sb-mb-4":Xs),{},t?(n=(r=(o=(s=this.customizations)==null?void 0:s.byType)==null?void 0:o.userProfile)==null?void 0:r.userProfileCard)==null?void 0:n.editForm:(u=(d=(a=(i=this.customizations)==null?void 0:i.byType)==null?void 0:a.userProfile)==null?void 0:d.userProfileCard)==null?void 0:u.container,t?L.USER_PROFILE_EDIT_FORM:L.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const s=this.getInputStyles(this.isEditing);return c`
|
|
5632
5632
|
<rtg-input
|
|
5633
5633
|
customClass="${s.class}"
|
|
5634
5634
|
customStyle="${S(s.style)}"
|
|
@@ -5657,7 +5657,7 @@ body {
|
|
|
5657
5657
|
Cancel
|
|
5658
5658
|
</rtg-button>
|
|
5659
5659
|
</rtg-card-footer>
|
|
5660
|
-
`}render(){var f,y,w,x,C,_,k,I,V,q,P,tt,J,
|
|
5660
|
+
`}render(){var f,y,w,x,C,_,k,I,V,q,P,tt,J,Pt;const t=[{label:"Username",value:this.personal.username},{label:"First name",value:this.personal.first},{label:"Middle name",value:this.personal.middle},{label:"Last name",value:this.personal.last},{label:"Nickname",value:this.personal.nickname},{label:"Gender",value:this.personal.gender},{label:"Bio",value:this.personal.bio}],s=this.getContainerStyles(!1),o=this.getContainerStyles(!0),{defaultMapped:r,outlineMapped:n,ghostMapped:i}=this.getButtonStyles(),a=R(Gs,{},(C=(x=(w=(y=(f=this.customizations)==null?void 0:f.byType)==null?void 0:y.userProfile)==null?void 0:w.userProfileCard)==null?void 0:x.header)==null?void 0:C.container,L.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),d=R(Ws,{},(q=(V=(I=(k=(_=this.customizations)==null?void 0:_.byType)==null?void 0:k.userProfile)==null?void 0:I.userProfileCard)==null?void 0:V.header)==null?void 0:q.title,L.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=this.getLabelStyles(),m=this.isEditing?o:s;return c`
|
|
5661
5661
|
<rtg-card
|
|
5662
5662
|
customClass=${m.class}
|
|
5663
5663
|
customStyle=${S(m.style)}
|
|
@@ -5674,7 +5674,7 @@ body {
|
|
|
5674
5674
|
${(P=this.content)!=null&&P.icon?(tt=this.content)==null?void 0:tt.icon:Jv()}
|
|
5675
5675
|
|
|
5676
5676
|
<span>
|
|
5677
|
-
${(J=this.content)!=null&&J.title?(
|
|
5677
|
+
${(J=this.content)!=null&&J.title?(Pt=this.content)==null?void 0:Pt.title:"Personal Info"}
|
|
5678
5678
|
</span>
|
|
5679
5679
|
</rtg-card-title>
|
|
5680
5680
|
${this.isEditing?null:c`
|
|
@@ -5694,15 +5694,15 @@ body {
|
|
|
5694
5694
|
<!-- Content -->
|
|
5695
5695
|
<rtg-card-content>
|
|
5696
5696
|
<div class="sb-flex sb-flex-col sb-gap-3 sb-p-4">
|
|
5697
|
-
${t.map(
|
|
5697
|
+
${t.map(lt=>c`
|
|
5698
5698
|
<div
|
|
5699
|
-
class="sb-flex ${this.layout===
|
|
5699
|
+
class="sb-flex ${this.layout===ut.ROW?"sb-flex-row sb-items-center sb-gap-2":"sb-flex-col sb-gap-1"}"
|
|
5700
5700
|
>
|
|
5701
5701
|
<div class=${u.class} style=${S(u.style)}>
|
|
5702
|
-
${
|
|
5702
|
+
${lt.label}
|
|
5703
5703
|
</div>
|
|
5704
5704
|
<div class="sb-flex-1 sb-min-w-0 sb-mr-4">
|
|
5705
|
-
${this.renderInput(
|
|
5705
|
+
${this.renderInput(lt.value)}
|
|
5706
5706
|
</div>
|
|
5707
5707
|
</div>
|
|
5708
5708
|
`)}
|
|
@@ -5713,7 +5713,7 @@ body {
|
|
|
5713
5713
|
<!-- Footer -->
|
|
5714
5714
|
${this.isEditing?this.renderFooter(r,n):null}
|
|
5715
5715
|
</rtg-card>
|
|
5716
|
-
`}};Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"personal",2);Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"customizations",2);Ge([l({type:Boolean})],exports.SbPersonalInfo.prototype,"showIcons",2);Ge([l({type:String})],exports.SbPersonalInfo.prototype,"layout",2);Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"content",2);Ge([E()],exports.SbPersonalInfo.prototype,"isEditing",2);exports.SbPersonalInfo=Ge([h("sb-personal-info")],exports.SbPersonalInfo);var ly=Object.defineProperty,cy=Object.getOwnPropertyDescriptor,We=(e,t,s,o)=>{for(var r=o>1?void 0:o?cy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ly(t,s,r),r};exports.SbLocationInfo=class extends ${constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=
|
|
5716
|
+
`}};Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"personal",2);Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"customizations",2);Ge([l({type:Boolean})],exports.SbPersonalInfo.prototype,"showIcons",2);Ge([l({type:String})],exports.SbPersonalInfo.prototype,"layout",2);Ge([l({type:Object})],exports.SbPersonalInfo.prototype,"content",2);Ge([E()],exports.SbPersonalInfo.prototype,"isEditing",2);exports.SbPersonalInfo=Ge([h("sb-personal-info")],exports.SbPersonalInfo);var ly=Object.defineProperty,cy=Object.getOwnPropertyDescriptor,We=(e,t,s,o)=>{for(var r=o>1?void 0:o?cy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ly(t,s,r),r};exports.SbLocationInfo=class extends ${constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=ut.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=wt("default",this.customizations),s=wt("outline",this.customizations),o=wt("ghost",this.customizations),r=R(Qs,{},t,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=R(to,{},s,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),i=R(Kn,{},o,L.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:r,outlineMapped:n,ghostMapped:i}}getInputStyles(t=!1){var o,r,n;const s=t?Js:H(Ys);return R(s,{},(n=(r=(o=this.customizations)==null?void 0:o.byType)==null?void 0:r.inputs)==null?void 0:n.inputField,t?L.USER_PROFILE_EDITABLE_INPUT_FIELD:L.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,s,o;return R(H(Ks,this.layout!==ut.ROW?"sb-basis-auto":""),{},(o=(s=(t=this.customizations)==null?void 0:t.byType)==null?void 0:s.labels)==null?void 0:o.inputLabel,L.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var s,o,r,n,i,a,d,u;return R(H(t?Zs+" sb-mb-4":Xs),{},t?(n=(r=(o=(s=this.customizations)==null?void 0:s.byType)==null?void 0:o.userProfile)==null?void 0:r.userProfileCard)==null?void 0:n.editForm:(u=(d=(a=(i=this.customizations)==null?void 0:i.byType)==null?void 0:a.userProfile)==null?void 0:d.userProfileCard)==null?void 0:u.container,t?L.USER_PROFILE_EDIT_FORM:L.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const s=this.getInputStyles(this.isEditing);return c`
|
|
5717
5717
|
<rtg-input
|
|
5718
5718
|
customClass="${s.class}"
|
|
5719
5719
|
customStyle="${S(s.style)}"
|
|
@@ -5780,7 +5780,7 @@ body {
|
|
|
5780
5780
|
<div class="sb-flex sb-flex-col sb-gap-3 sb-m-4">
|
|
5781
5781
|
${t.map(J=>c`
|
|
5782
5782
|
<div
|
|
5783
|
-
class="sb-flex ${this.layout===
|
|
5783
|
+
class="sb-flex ${this.layout===ut.ROW?"sb-flex-row sb-items-center sb-gap-2":"sb-flex-col sb-gap-1"}"
|
|
5784
5784
|
>
|
|
5785
5785
|
<div class=${u.class} style=${S(u.style)}>
|
|
5786
5786
|
${J.label}
|
|
@@ -5798,7 +5798,7 @@ body {
|
|
|
5798
5798
|
<!-- Footer -->
|
|
5799
5799
|
${this.isEditing?this.renderFooter(r,n):null}
|
|
5800
5800
|
</rtg-card>
|
|
5801
|
-
`}};We([l({type:Object})],exports.SbLocationInfo.prototype,"locationInfo",2);We([l({type:Object})],exports.SbLocationInfo.prototype,"customizations",2);We([l({type:Boolean})],exports.SbLocationInfo.prototype,"showIcons",2);We([l({type:String})],exports.SbLocationInfo.prototype,"layout",2);We([l({type:Object})],exports.SbLocationInfo.prototype,"content",2);We([E()],exports.SbLocationInfo.prototype,"isEditing",2);exports.SbLocationInfo=We([h("sb-location-info")],exports.SbLocationInfo);var dy=Object.defineProperty,uy=Object.getOwnPropertyDescriptor,Ke=(e,t,s,o)=>{for(var r=o>1?void 0:o?uy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&dy(t,s,r),r};exports.SbUrlsInfo=class extends ${constructor(){super(...arguments),this.showIcons=!0,this.customizations=null,this.layout=
|
|
5801
|
+
`}};We([l({type:Object})],exports.SbLocationInfo.prototype,"locationInfo",2);We([l({type:Object})],exports.SbLocationInfo.prototype,"customizations",2);We([l({type:Boolean})],exports.SbLocationInfo.prototype,"showIcons",2);We([l({type:String})],exports.SbLocationInfo.prototype,"layout",2);We([l({type:Object})],exports.SbLocationInfo.prototype,"content",2);We([E()],exports.SbLocationInfo.prototype,"isEditing",2);exports.SbLocationInfo=We([h("sb-location-info")],exports.SbLocationInfo);var dy=Object.defineProperty,uy=Object.getOwnPropertyDescriptor,Ke=(e,t,s,o)=>{for(var r=o>1?void 0:o?uy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&dy(t,s,r),r};exports.SbUrlsInfo=class extends ${constructor(){super(...arguments),this.showIcons=!0,this.customizations=null,this.layout=ut.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=wt("default",this.customizations),s=wt("outline",this.customizations),o=wt("ghost",this.customizations),r=R(Qs,{},t,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=R(to,{},s,L.USER_PROFILE_DEFAULT_BUTTON,this.customizations),i=R(Kn,{},o,L.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:r,outlineMapped:n,ghostMapped:i}}getInputStyles(t=!1){var o,r,n;const s=t?Js:H(Ys);return R(s,{},(n=(r=(o=this.customizations)==null?void 0:o.byType)==null?void 0:r.inputs)==null?void 0:n.inputField,t?L.USER_PROFILE_EDITABLE_INPUT_FIELD:L.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,s,o;return R(H(Ks,this.layout!==ut.ROW?"sb-basis-auto":""),{},(o=(s=(t=this.customizations)==null?void 0:t.byType)==null?void 0:s.labels)==null?void 0:o.inputLabel,L.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var s,o,r,n,i,a,d,u;return R(H(t?Zs:Xs,"!sb-mb-0"),{},t?(n=(r=(o=(s=this.customizations)==null?void 0:s.byType)==null?void 0:o.userProfile)==null?void 0:r.userProfileCard)==null?void 0:n.editForm:(u=(d=(a=(i=this.customizations)==null?void 0:i.byType)==null?void 0:a.userProfile)==null?void 0:d.userProfileCard)==null?void 0:u.container,t?L.USER_PROFILE_EDIT_FORM:L.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const s=this.getInputStyles(this.isEditing);return c`
|
|
5802
5802
|
<rtg-input
|
|
5803
5803
|
customClass="${s.class}"
|
|
5804
5804
|
customStyle="${S(s.style)}"
|
|
@@ -5864,7 +5864,7 @@ body {
|
|
|
5864
5864
|
<div class="sb-flex sb-flex-col sb-gap-3 sb-p-4">
|
|
5865
5865
|
${t.map(J=>c`
|
|
5866
5866
|
<div
|
|
5867
|
-
class="sb-flex ${this.layout===
|
|
5867
|
+
class="sb-flex ${this.layout===ut.ROW?"sb-flex-row sb-items-center":"sb-flex-col sb-gap-1"}"
|
|
5868
5868
|
>
|
|
5869
5869
|
<div class=${u.class} style=${S(u.style)}>
|
|
5870
5870
|
${J.label}
|
|
@@ -5882,8 +5882,8 @@ body {
|
|
|
5882
5882
|
<!-- Footer -->
|
|
5883
5883
|
${this.isEditing?this.renderFooter(r,n):null}
|
|
5884
5884
|
</rtg-card>
|
|
5885
|
-
`}};Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"URLsInfo",2);Ke([l({type:Boolean})],exports.SbUrlsInfo.prototype,"showIcons",2);Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"customizations",2);Ke([l({type:String})],exports.SbUrlsInfo.prototype,"layout",2);Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"content",2);Ke([E()],exports.SbUrlsInfo.prototype,"isEditing",2);exports.SbUrlsInfo=Ke([h("sb-urls-info")],exports.SbUrlsInfo);var hy=Object.defineProperty,py=Object.getOwnPropertyDescriptor,rt=(e,t,s,o)=>{for(var r=o>1?void 0:o?py(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&hy(t,s,r),r};exports.Profile=class extends ${constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.orientation=
|
|
5886
|
-
${this.orientation===
|
|
5885
|
+
`}};Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"URLsInfo",2);Ke([l({type:Boolean})],exports.SbUrlsInfo.prototype,"showIcons",2);Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"customizations",2);Ke([l({type:String})],exports.SbUrlsInfo.prototype,"layout",2);Ke([l({type:Object})],exports.SbUrlsInfo.prototype,"content",2);Ke([E()],exports.SbUrlsInfo.prototype,"isEditing",2);exports.SbUrlsInfo=Ke([h("sb-urls-info")],exports.SbUrlsInfo);var hy=Object.defineProperty,py=Object.getOwnPropertyDescriptor,rt=(e,t,s,o)=>{for(var r=o>1?void 0:o?py(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&hy(t,s,r),r};exports.Profile=class extends ${constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.orientation=kt.HORIZONTAL,this.sidebarDisplayType=yt.REGULAR,this.mode=re==null?void 0:re.PAGE,this.widgetsLayout=ut.ROW,this.content=null}createRenderRoot(){return this}render(){var o,r,n,i;return c`
|
|
5886
|
+
${this.orientation===kt.VERTICAL||this.sidebarDisplayType===yt.BURGER?null:c`
|
|
5887
5887
|
<div class=${"sb-flex sb-items-center sb-justify-between sb-mb-4"}>
|
|
5888
5888
|
<div class=${"sb-font-medium sb-text-[18px] sb-text-foreground"}>Profile</div>
|
|
5889
5889
|
</div>
|
|
@@ -5916,7 +5916,7 @@ body {
|
|
|
5916
5916
|
.URLsInfo=${this.urls}
|
|
5917
5917
|
.layout=${this.widgetsLayout}
|
|
5918
5918
|
></sb-urls-info>
|
|
5919
|
-
`}};rt([l({type:Object})],exports.Profile.prototype,"account",2);rt([l({type:Object})],exports.Profile.prototype,"personal",2);rt([l({type:Object})],exports.Profile.prototype,"location",2);rt([l({type:Object})],exports.Profile.prototype,"urls",2);rt([l({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);rt([l({type:Object})],exports.Profile.prototype,"customizations",2);rt([l({type:Boolean})],exports.Profile.prototype,"showIcons",2);rt([l({attribute:!1})],exports.Profile.prototype,"modalIcon",2);rt([l({type:String})],exports.Profile.prototype,"orientation",2);rt([l({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);rt([l({type:String})],exports.Profile.prototype,"mode",2);rt([l({type:String})],exports.Profile.prototype,"widgetsLayout",2);rt([l({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);rt([l({type:Function})],exports.Profile.prototype,"onAvatarChange",2);rt([l({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);rt([l({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=rt([h("sb-profile")],exports.Profile);const gy="!sb-bg-background",Ea={vertical:"sb-justify-between sb-w-full",horizontal:"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"},my="sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background",by="sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground",fy="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",vy="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";var yy=Object.defineProperty,wy=Object.getOwnPropertyDescriptor,Ye=(e,t,s,o)=>{for(var r=o>1?void 0:o?wy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&yy(t,s,r),r};const Co=[{label:"Profile",value:an.PROFILE},{label:"Security",value:an.SECURITY}];let he=class extends ${constructor(){super(...arguments),this.orientation=
|
|
5919
|
+
`}};rt([l({type:Object})],exports.Profile.prototype,"account",2);rt([l({type:Object})],exports.Profile.prototype,"personal",2);rt([l({type:Object})],exports.Profile.prototype,"location",2);rt([l({type:Object})],exports.Profile.prototype,"urls",2);rt([l({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);rt([l({type:Object})],exports.Profile.prototype,"customizations",2);rt([l({type:Boolean})],exports.Profile.prototype,"showIcons",2);rt([l({attribute:!1})],exports.Profile.prototype,"modalIcon",2);rt([l({type:String})],exports.Profile.prototype,"orientation",2);rt([l({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);rt([l({type:String})],exports.Profile.prototype,"mode",2);rt([l({type:String})],exports.Profile.prototype,"widgetsLayout",2);rt([l({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);rt([l({type:Function})],exports.Profile.prototype,"onAvatarChange",2);rt([l({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);rt([l({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=rt([h("sb-profile")],exports.Profile);const gy="!sb-bg-background",Ea={vertical:"sb-justify-between sb-w-full",horizontal:"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"},my="sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background",by="sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground",fy="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",vy="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";var yy=Object.defineProperty,wy=Object.getOwnPropertyDescriptor,Ye=(e,t,s,o)=>{for(var r=o>1?void 0:o?wy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&yy(t,s,r),r};const Co=[{label:"Profile",value:an.PROFILE},{label:"Security",value:an.SECURITY}];let he=class extends ${constructor(){super(...arguments),this.orientation=kt.HORIZONTAL,this.displayType=yt.REGULAR,this.mode=re.PAGE,this.config={showIcons:!0},this.customizations=null,this.isMenuOpen=!1}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("sb-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}handleCloseProfile(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}renderTabs(e=Co,t=!1,s){var n,i,a;const{class:o,style:r}=R("",{},(a=(i=(n=this.customizations)==null?void 0:n.byType)==null?void 0:i.userProfile)==null?void 0:a.sidebarTabs,L.USER_PROFILE_SIDEBAR_TABS,this.customizations);return c`
|
|
5920
5920
|
<rtg-tab-list
|
|
5921
5921
|
orientation=${t?"vertical":"horizontal"}
|
|
5922
5922
|
class="sb-flex sb-w-full ${t?"":"sb-mb-4"}"
|
|
@@ -5968,28 +5968,28 @@ body {
|
|
|
5968
5968
|
class="${vy} ${this.isMenuOpen?"sb-block sb-opacity-100":"sb-hidden sb-opacity-0"}"
|
|
5969
5969
|
@click=${this.toggleMenu}
|
|
5970
5970
|
></div>
|
|
5971
|
-
`}render(){var r,n,i;const e=this.orientation===
|
|
5971
|
+
`}render(){var r,n,i;const e=this.orientation===kt.VERTICAL,t=this.orientation===kt.HORIZONTAL,{class:s,style:o}=R("",{},(i=(n=(r=this.customizations)==null?void 0:r.byType)==null?void 0:n.userProfile)==null?void 0:i.sidebar,L.USER_PROFILE_SIDEBAR,this.customizations);return c`
|
|
5972
5972
|
<div
|
|
5973
5973
|
style="${S(o)}"
|
|
5974
5974
|
class="${H("sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]",e?Ea.vertical:Ea.horizontal,s)}"
|
|
5975
5975
|
>
|
|
5976
|
-
${this.displayType===
|
|
5976
|
+
${this.displayType===yt.BURGER?this.renderBurger():null}
|
|
5977
5977
|
${e?this.renderTabs():null}
|
|
5978
|
-
${t&&this.displayType!==
|
|
5978
|
+
${t&&this.displayType!==yt.BURGER?c`
|
|
5979
5979
|
<div class="sb-flex sb-flex-col sb-justify-between sb-flex-1">
|
|
5980
5980
|
${this.renderTabs(Co,!0)} ${this.renderWatermark()}
|
|
5981
5981
|
</div>
|
|
5982
5982
|
`:null}
|
|
5983
5983
|
</div>
|
|
5984
|
-
${this.displayType===
|
|
5985
|
-
`}};Ye([l({type:String})],he.prototype,"orientation",2);Ye([l({type:String})],he.prototype,"displayType",2);Ye([l({type:String})],he.prototype,"mode",2);Ye([l({type:Object})],he.prototype,"config",2);Ye([l({type:Object})],he.prototype,"customizations",2);Ye([E()],he.prototype,"isMenuOpen",2);he=Ye([h("sb-profile-sidebar")],he);var xy=Object.defineProperty,
|
|
5984
|
+
${this.displayType===yt.BURGER?this.renderMobileDrawer():null}
|
|
5985
|
+
`}};Ye([l({type:String})],he.prototype,"orientation",2);Ye([l({type:String})],he.prototype,"displayType",2);Ye([l({type:String})],he.prototype,"mode",2);Ye([l({type:Object})],he.prototype,"config",2);Ye([l({type:Object})],he.prototype,"customizations",2);Ye([E()],he.prototype,"isMenuOpen",2);he=Ye([h("sb-profile-sidebar")],he);var xy=Object.defineProperty,Nt=(e,t,s,o)=>{for(var r=void 0,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=i(t,s,r)||r);return r&&xy(t,s,r),r};const ka={xs:640,sm:768};class $t extends ${constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=kt.HORIZONTAL,this.mobileDisplay=yt.REGULAR,this.mode=re.PAGE,this.widgetsLayout=ut.ROW,this.content=null,this.customizations=null,this.providedCustomizations=null,this.isOpen=!0,this.currentBreakpoint="md",this.account={email:"J.Doe@gmail.com",phone:"+989390717800",avatar:"https://github.com/shadcn.png"},this.personal={username:"@JaneeDoe",first:"Jane",middle:"Michelle",last:"Doe",nickname:"Janee",gender:"Female",bio:"-"},this.location={location:"Iran, Tehran",zoneInfo:"GMT+3:30"},this.urls={website:"www.janeedoe.com"},this.defaultTab="Profile",this._handleResize=()=>{this._updateBreakpoint()},this._handleClose=()=>{this.mode===re.MODAL&&(this.isOpen=!1)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=s=>{var n;const o=(n=s.target.files)==null?void 0:n[0];if(!o)return;const r=new FileReader;r.onload=()=>{this.account.avatar=r.result,this.requestUpdate()},r.readAsDataURL(o)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const s=t.target,o=this.querySelector("sb-account-info"),r=this.querySelector("rtg-card");o!=null&&o.contains(s)||r!=null&&r.contains(s)||(this.showAvatarMenu=!1)}}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),this.addEventListener("close-user-profile",this._handleClose),this.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),this.removeEventListener("close-user-profile",this._handleClose),this.removeEventListener("change-avatar",this._handleAvatarChange)}firstUpdated(){this.style.width="100%"}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<ka.xs?"xs":t<ka.sm?"sm":"md"}get effectiveCustomizations(){return Hs(this.providedCustomizations??{},this.customizations??{})}get isModal(){return this.mode===re.MODAL}get sidebarDisplayType(){return this.orientation===kt.VERTICAL||this.currentBreakpoint==="md"?yt.REGULAR:yt.BURGER}get containerClasses(){return H(ov,this.isModal?iv:nv,this.isModal?ev:tv,this.sidebarDisplayType===yt.BURGER||this.orientation===kt.VERTICAL?"!sb-flex-col":"!sb-flex-row")}get contentClasses(){return H("sb-flex-grow",this.isModal?"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":"md:sb-max-h-[100%]",this.orientation===kt.VERTICAL?"md:sb-pl-6 sb-mb-16":"")}renderCloseButton(){return this.isModal?c`
|
|
5986
5986
|
<button
|
|
5987
5987
|
class="sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10"
|
|
5988
5988
|
@click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
|
|
5989
5989
|
>
|
|
5990
5990
|
${ey()}
|
|
5991
5991
|
</button>
|
|
5992
|
-
`:A}renderWatermark(){return this.orientation!==
|
|
5992
|
+
`:A}renderWatermark(){return this.orientation!==kt.VERTICAL?A:c`
|
|
5993
5993
|
<div
|
|
5994
5994
|
class="sb-fixed sb-bottom-0 sb-w-[-webkit-fill-available] sb-py-4 sb-bg-background"
|
|
5995
5995
|
>
|
|
@@ -6050,7 +6050,7 @@ body {
|
|
|
6050
6050
|
<div class=${rv}>
|
|
6051
6051
|
<div class=${sv}>${this.renderProfileContent()}</div>
|
|
6052
6052
|
</div>
|
|
6053
|
-
`:this.renderProfileContent():A}createRenderRoot(){return this}}
|
|
6053
|
+
`:this.renderProfileContent():A}createRenderRoot(){return this}}Nt([l({type:Boolean})],$t.prototype,"showAvatarMenu");Nt([l({type:String})],$t.prototype,"orientation");Nt([l({type:String})],$t.prototype,"mobileDisplay");Nt([l({type:String})],$t.prototype,"mode");Nt([l({type:String})],$t.prototype,"widgetsLayout");Nt([l({type:Object})],$t.prototype,"content");Nt([l({type:Object})],$t.prototype,"customizations");Nt([mt({context:qs,subscribe:!0})],$t.prototype,"providedCustomizations");Nt([E()],$t.prototype,"isOpen");Nt([E()],$t.prototype,"currentBreakpoint");customElements.define("sb-user-profile",$t);var _y=Object.defineProperty,Cy=Object.getOwnPropertyDescriptor,eo=(e,t,s,o)=>{for(var r=o>1?void 0:o?Cy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&_y(t,s,r),r};exports.PreviewComponent=class extends ${constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.customizations={byType:{},config:{font:"font-geist"}}}createRenderRoot(){return this}render(){return c`
|
|
6054
6054
|
${this.loading?c`<div class="sb-p-8 sb-text-center">Loading...</div>`:c`
|
|
6055
6055
|
<sb-provider>
|
|
6056
6056
|
<signed-out>
|
|
@@ -6062,7 +6062,7 @@ body {
|
|
|
6062
6062
|
</signed-out>
|
|
6063
6063
|
</sb-provider>
|
|
6064
6064
|
`}
|
|
6065
|
-
`}};eo([l({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);eo([l({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);eo([l({type:Object})],exports.PreviewComponent.prototype,"customizations",2);exports.PreviewComponent=eo([h("sb-preview")],exports.PreviewComponent);var Sy=Object.defineProperty,$y=Object.getOwnPropertyDescriptor,ro=(e,t,s,o)=>{for(var r=o>1?void 0:o?$y(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Sy(t,s,r),r};exports.SbSignIn=class extends ${constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null}get effectiveCustomizations(){const t=this.providedCustomizations??{},s=this.customizations??{};return Hs(t,s)}createRenderRoot(){return this}async connectedCallback(){super.connectedCallback();try{const
|
|
6065
|
+
`}};eo([l({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);eo([l({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);eo([l({type:Object})],exports.PreviewComponent.prototype,"customizations",2);exports.PreviewComponent=eo([h("sb-preview")],exports.PreviewComponent);var Sy=Object.defineProperty,$y=Object.getOwnPropertyDescriptor,ro=(e,t,s,o)=>{for(var r=o>1?void 0:o?$y(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Sy(t,s,r),r};exports.SbSignIn=class extends ${constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},s=this.customizations??{};return Hs(t,s)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var r;const s=nt??((r=window.__saasbaseCoreSdk)==null?void 0:r.Auth);if(!s||s.__configured)return;const o=s.__whenConfigured;o&&await Promise.race([o,new Promise(n=>setTimeout(n,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const s=await nt.startLoginflow("signin-flow-passkey");console.log(s.isResumed?"Resumed login flow":"Started new login flow")}catch(s){if(console.error("Sign-in flow init failed:",s),s&&typeof s.message=="string"&&s.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const o=nt??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),r=o==null?void 0:o.__whenConfigured;if(r){await Promise.race([r,new Promise(n=>setTimeout(n,1e4))]);try{const n=await nt.startLoginflow("signin-flow-passkey");console.log(n.isResumed?"Resumed login flow":"Started new login flow")}catch(n){console.error("Sign-in retry failed:",n)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var r,n;const t=this.effectiveCustomizations,{class:s,style:o}=R("",{},(n=(r=t==null?void 0:t.byType)==null?void 0:r.loader)==null?void 0:n.linear,"",t);return this.renderSpec?c`
|
|
6066
6066
|
<sb-layout
|
|
6067
6067
|
.renderSpec=${this.renderSpec}
|
|
6068
6068
|
.customizations=${t}
|
|
@@ -6073,7 +6073,7 @@ body {
|
|
|
6073
6073
|
customClass=${s}
|
|
6074
6074
|
.customStyle=${o}
|
|
6075
6075
|
></linear-loader>
|
|
6076
|
-
`}};ro([
|
|
6076
|
+
`}};ro([mt({context:Hn,subscribe:!0})],exports.SbSignIn.prototype,"renderSpec",2);ro([l({type:Object})],exports.SbSignIn.prototype,"customizations",2);ro([mt({context:qs,subscribe:!0})],exports.SbSignIn.prototype,"providedCustomizations",2);exports.SbSignIn=ro([h("sb-signin")],exports.SbSignIn);var Ey=Object.defineProperty,ky=Object.getOwnPropertyDescriptor,so=(e,t,s,o)=>{for(var r=o>1?void 0:o?ky(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Ey(t,s,r),r};exports.SbSignUp=class extends ${constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},s=this.customizations??{};return Hs(t,s)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var r;const s=nt??((r=window.__saasbaseCoreSdk)==null?void 0:r.Auth);if(!s||s.__configured)return;const o=s.__whenConfigured;o&&await Promise.race([o,new Promise(n=>setTimeout(n,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const s=await nt.startLoginflow("signup-flow");console.log(s.isResumed?"Resumed signup flow":"Started new signup flow")}catch(s){if(console.error("Sign-up flow init failed:",s),s&&typeof s.message=="string"&&s.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const o=nt??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),r=o==null?void 0:o.__whenConfigured;if(r){await Promise.race([r,new Promise(n=>setTimeout(n,1e4))]);try{const n=await nt.startLoginflow("signup-flow");console.log(n.isResumed?"Resumed signup flow":"Started new signup flow")}catch(n){console.error("Sign-up retry failed:",n)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var r,n;const t=this.effectiveCustomizations,{class:s,style:o}=R("",{},(n=(r=t==null?void 0:t.byType)==null?void 0:r.loader)==null?void 0:n.linear,"",t);return console.log(""),this.renderSpec?c`
|
|
6077
6077
|
<sb-layout
|
|
6078
6078
|
.renderSpec=${this.renderSpec}
|
|
6079
6079
|
.customizations=${t}
|
|
@@ -6084,7 +6084,7 @@ body {
|
|
|
6084
6084
|
customClass=${s}
|
|
6085
6085
|
.customStyle=${o}
|
|
6086
6086
|
></linear-loader>
|
|
6087
|
-
`}};so([
|
|
6087
|
+
`}};so([mt({context:Hn,subscribe:!0})],exports.SbSignUp.prototype,"renderSpec",2);so([l({type:Object})],exports.SbSignUp.prototype,"customizations",2);so([mt({context:qs,subscribe:!0})],exports.SbSignUp.prototype,"providedCustomizations",2);exports.SbSignUp=so([h("sb-signup")],exports.SbSignUp);var Ry=Object.defineProperty,Oy=Object.getOwnPropertyDescriptor,Yn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Oy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Ry(t,s,r),r};exports.SbTextRenderer=class extends ${createRenderRoot(){return this}render(){var n,i;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,{...this.element.style,textAlign:this.element.properties.text_alignment},void 0,this.element.id,void 0),{base:o,responsive:r}=it(s);return at(this.element.id,r,((i=(n=this.component.customizations)==null?void 0:n.config)==null?void 0:i.breakpoints)??Q),c`
|
|
6088
6088
|
<p id=${this.element.id} class=${t} style=${S(o)}>
|
|
6089
6089
|
${this.element.properties.content}
|
|
6090
6090
|
</p>
|
|
@@ -6103,7 +6103,7 @@ body {
|
|
|
6103
6103
|
/>
|
|
6104
6104
|
`}
|
|
6105
6105
|
</span>
|
|
6106
|
-
`}render(){var w,x;if(!this.element)return null;const{id:t,class:s,style:o,properties:r}=this.element,{type:n,text:i,event:a}=r,d=
|
|
6106
|
+
`}render(){var w,x;if(!this.element)return null;const{id:t,class:s,style:o,properties:r}=this.element,{type:n,text:i,event:a}=r,d=wt(n,this.component.customizations),{class:u,style:m}=R(s,o,d,t,this.component.customizations),{base:f,responsive:y}=it(m);return at(this.element.id,y,((x=(w=this.component.customizations)==null?void 0:w.config)==null?void 0:x.breakpoints)??Q),c`
|
|
6107
6107
|
<rtg-button
|
|
6108
6108
|
?disabled=${this.isDisabled||this.loading}
|
|
6109
6109
|
variant=${n}
|
|
@@ -6114,7 +6114,7 @@ body {
|
|
|
6114
6114
|
>
|
|
6115
6115
|
${this.renderIcon()} ${i}
|
|
6116
6116
|
</rtg-button>
|
|
6117
|
-
`}};oo([l({type:Object})],exports.SbButtonRenderer.prototype,"element",2);oo([l({attribute:!1})],exports.SbButtonRenderer.prototype,"component",2);oo([E()],exports.SbButtonRenderer.prototype,"theme",2);exports.SbButtonRenderer=oo([h("sb-button-renderer")],exports.SbButtonRenderer);var Iy=Object.defineProperty,Ly=Object.getOwnPropertyDescriptor,Xn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Ly(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Iy(t,s,r),r};exports.SbDividerRenderer=class extends ${createRenderRoot(){return this}render(){var u,m,f,y,w,x,C,_,k,I,V,q,P;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(f=(m=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:m.divider)==null?void 0:f.dividerContainer,this.element.id,this.component.customizations),{class:o,style:r}=R(Xf,{},(x=(w=(y=this.component.customizations)==null?void 0:y.byType)==null?void 0:w.divider)==null?void 0:x.dividerLine,this.element.id,this.component.customizations),{class:n,style:i}=R(Jf,{},(k=(_=(C=this.component.customizations)==null?void 0:C.byType)==null?void 0:_.divider)==null?void 0:k.dividerText,this.element.id,this.component.customizations),{base:a,responsive:d}=
|
|
6117
|
+
`}};oo([l({type:Object})],exports.SbButtonRenderer.prototype,"element",2);oo([l({attribute:!1})],exports.SbButtonRenderer.prototype,"component",2);oo([E()],exports.SbButtonRenderer.prototype,"theme",2);exports.SbButtonRenderer=oo([h("sb-button-renderer")],exports.SbButtonRenderer);var Iy=Object.defineProperty,Ly=Object.getOwnPropertyDescriptor,Xn=(e,t,s,o)=>{for(var r=o>1?void 0:o?Ly(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Iy(t,s,r),r};exports.SbDividerRenderer=class extends ${createRenderRoot(){return this}render(){var u,m,f,y,w,x,C,_,k,I,V,q,P;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(f=(m=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:m.divider)==null?void 0:f.dividerContainer,this.element.id,this.component.customizations),{class:o,style:r}=R(Xf,{},(x=(w=(y=this.component.customizations)==null?void 0:y.byType)==null?void 0:w.divider)==null?void 0:x.dividerLine,this.element.id,this.component.customizations),{class:n,style:i}=R(Jf,{},(k=(_=(C=this.component.customizations)==null?void 0:C.byType)==null?void 0:_.divider)==null?void 0:k.dividerText,this.element.id,this.component.customizations),{base:a,responsive:d}=it(s);return at(this.element.id,d,((V=(I=this.component.customizations)==null?void 0:I.config)==null?void 0:V.breakpoints)??Q),(q=this.element.properties)!=null&&q.text?c`
|
|
6118
6118
|
<div
|
|
6119
6119
|
id=${this.element.id}
|
|
6120
6120
|
class=${t}
|
|
@@ -6147,7 +6147,7 @@ body {
|
|
|
6147
6147
|
style=${S(s)}
|
|
6148
6148
|
.content=${this.errors[0]}
|
|
6149
6149
|
></sb-error>
|
|
6150
|
-
`}render(){var u,m,f,y,w,x,C,_;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,this.component.customizations),{class:o,style:r}=R(Yf,{},(f=(m=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:m.labels)==null?void 0:f.checkboxLabel,"",this.component.customizations),{class:n,style:i}=R(Xl,{},(x=(w=(y=this.component.customizations)==null?void 0:y.byType)==null?void 0:w.errors)==null?void 0:x.inputError,"",this.component.customizations),{base:a,responsive:d}=
|
|
6150
|
+
`}render(){var u,m,f,y,w,x,C,_;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,this.component.customizations),{class:o,style:r}=R(Yf,{},(f=(m=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:m.labels)==null?void 0:f.checkboxLabel,"",this.component.customizations),{class:n,style:i}=R(Xl,{},(x=(w=(y=this.component.customizations)==null?void 0:y.byType)==null?void 0:w.errors)==null?void 0:x.inputError,"",this.component.customizations),{base:a,responsive:d}=it(s);return at(this.element.id,d,((_=(C=this.component.customizations)==null?void 0:C.config)==null?void 0:_.breakpoints)??Q),c`
|
|
6151
6151
|
<div style=${S(a)} class=${t}>
|
|
6152
6152
|
<rtg-checkbox
|
|
6153
6153
|
class="sb-inline-block sb-w-fit"
|
|
@@ -6281,7 +6281,7 @@ body {
|
|
|
6281
6281
|
>
|
|
6282
6282
|
<rtg-input-otp-separator></rtg-input-otp-separator>
|
|
6283
6283
|
<rtg-input-otp-group>${o.slice(r*2)}</rtg-input-otp-group>
|
|
6284
|
-
`}default:return c`<rtg-input-otp-group>${o}</rtg-input-otp-group>`}}render(){var a,d,u,m,f;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(u=(d=(a=this.component.customizations)==null?void 0:a.byType)==null?void 0:d.inputs)==null?void 0:u.inputField,this.element.id,this.component.customizations),o=this.element.properties.variant||"digits_only",r=this.element.properties.length||6,{base:n,responsive:i}=
|
|
6284
|
+
`}default:return c`<rtg-input-otp-group>${o}</rtg-input-otp-group>`}}render(){var a,d,u,m,f;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(u=(d=(a=this.component.customizations)==null?void 0:a.byType)==null?void 0:d.inputs)==null?void 0:u.inputField,this.element.id,this.component.customizations),o=this.element.properties.variant||"digits_only",r=this.element.properties.length||6,{base:n,responsive:i}=it(s);return at(this.element.id,i,((f=(m=this.component.customizations)==null?void 0:m.config)==null?void 0:f.breakpoints)??Q),c`
|
|
6285
6285
|
<rtg-input-otp
|
|
6286
6286
|
length=${r}
|
|
6287
6287
|
timeout=${this.element.properties.timeout}
|
|
@@ -6296,28 +6296,28 @@ body {
|
|
|
6296
6296
|
>
|
|
6297
6297
|
${this.renderOtpGroups(o,r)}
|
|
6298
6298
|
</rtg-input-otp>
|
|
6299
|
-
`}};ti([l({type:Object})],exports.SbOtpRenderer.prototype,"element",2);ti([l({attribute:!1})],exports.SbOtpRenderer.prototype,"component",2);exports.SbOtpRenderer=ti([h("sb-otp-renderer")],exports.SbOtpRenderer);var Ky=Object.defineProperty,Yy=Object.getOwnPropertyDescriptor,ei=(e,t,s,o)=>{for(var r=o>1?void 0:o?Yy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Ky(t,s,r),r};exports.SbErrorRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.errors)==null?void 0:a.serviceError,this.element.id,this.component.customizations),{base:o,responsive:r}=
|
|
6299
|
+
`}};ti([l({type:Object})],exports.SbOtpRenderer.prototype,"element",2);ti([l({attribute:!1})],exports.SbOtpRenderer.prototype,"component",2);exports.SbOtpRenderer=ti([h("sb-otp-renderer")],exports.SbOtpRenderer);var Ky=Object.defineProperty,Yy=Object.getOwnPropertyDescriptor,ei=(e,t,s,o)=>{for(var r=o>1?void 0:o?Yy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Ky(t,s,r),r};exports.SbErrorRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.errors)==null?void 0:a.serviceError,this.element.id,this.component.customizations),{base:o,responsive:r}=it(s);return at(this.element.id,r,((u=(d=this.component.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q),c`
|
|
6300
6300
|
<rtg-alert
|
|
6301
6301
|
customClass=${t}
|
|
6302
6302
|
style=${S(o)}
|
|
6303
6303
|
message=${this.element.properties.message}
|
|
6304
6304
|
variant="error"
|
|
6305
6305
|
></rtg-alert>
|
|
6306
|
-
`}};ei([l({type:Object})],exports.SbErrorRenderer.prototype,"element",2);ei([l({attribute:!1})],exports.SbErrorRenderer.prototype,"component",2);exports.SbErrorRenderer=ei([h("sb-error-renderer")],exports.SbErrorRenderer);var Zy=Object.defineProperty,Xy=Object.getOwnPropertyDescriptor,ri=(e,t,s,o)=>{for(var r=o>1?void 0:o?Xy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Zy(t,s,r),r};exports.SbHtmlRenderer=class extends ${constructor(){super(...arguments),this._onClick=t=>{if(!this.component||!this.element)return;const s=t.composedPath().find(o=>{var r;return o instanceof HTMLElement&&((r=o.dataset)==null?void 0:r.event)});s!=null&&s.dataset.event&&this.component.handleEvent(s.dataset.event,this.element)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){var n,i;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),{base:o,responsive:r}=
|
|
6306
|
+
`}};ei([l({type:Object})],exports.SbErrorRenderer.prototype,"element",2);ei([l({attribute:!1})],exports.SbErrorRenderer.prototype,"component",2);exports.SbErrorRenderer=ei([h("sb-error-renderer")],exports.SbErrorRenderer);var Zy=Object.defineProperty,Xy=Object.getOwnPropertyDescriptor,ri=(e,t,s,o)=>{for(var r=o>1?void 0:o?Xy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Zy(t,s,r),r};exports.SbHtmlRenderer=class extends ${constructor(){super(...arguments),this._onClick=t=>{if(!this.component||!this.element)return;const s=t.composedPath().find(o=>{var r;return o instanceof HTMLElement&&((r=o.dataset)==null?void 0:r.event)});s!=null&&s.dataset.event&&this.component.handleEvent(s.dataset.event,this.element)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){var n,i;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),{base:o,responsive:r}=it(s);return at(this.element.id,r,((i=(n=this.component.customizations)==null?void 0:n.config)==null?void 0:i.breakpoints)??Q),c`
|
|
6307
6307
|
<div id=${this.element.id} class=${t} style=${S(o)}>
|
|
6308
6308
|
${bn(Zv(this.element.properties.content))}
|
|
6309
6309
|
</div>
|
|
6310
|
-
`}};ri([l({type:Object})],exports.SbHtmlRenderer.prototype,"element",2);ri([l({attribute:!1})],exports.SbHtmlRenderer.prototype,"component",2);exports.SbHtmlRenderer=ri([h("sb-html-renderer")],exports.SbHtmlRenderer);var Jy=Object.defineProperty,Qy=Object.getOwnPropertyDescriptor,si=(e,t,s,o)=>{for(var r=o>1?void 0:o?Qy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Jy(t,s,r),r};exports.SbGapRenderer=class extends ${createRenderRoot(){return this}render(){var a,d;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),o=this.element.style?this.element.style["flex-grow"]:"0";o!=null&&this.style.setProperty("flex-grow",String(o));let r={width:"0px",height:"0px"};this.element.properties.type==="vertical"?r={width:"1px",height:this.element.properties.size}:r={height:"1px",width:this.element.properties.size};const{base:n,responsive:i}=
|
|
6310
|
+
`}};ri([l({type:Object})],exports.SbHtmlRenderer.prototype,"element",2);ri([l({attribute:!1})],exports.SbHtmlRenderer.prototype,"component",2);exports.SbHtmlRenderer=ri([h("sb-html-renderer")],exports.SbHtmlRenderer);var Jy=Object.defineProperty,Qy=Object.getOwnPropertyDescriptor,si=(e,t,s,o)=>{for(var r=o>1?void 0:o?Qy(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Jy(t,s,r),r};exports.SbGapRenderer=class extends ${createRenderRoot(){return this}render(){var a,d;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),o=this.element.style?this.element.style["flex-grow"]:"0";o!=null&&this.style.setProperty("flex-grow",String(o));let r={width:"0px",height:"0px"};this.element.properties.type==="vertical"?r={width:"1px",height:this.element.properties.size}:r={height:"1px",width:this.element.properties.size};const{base:n,responsive:i}=it(s);return at(this.element.id,i,((d=(a=this.component.customizations)==null?void 0:a.config)==null?void 0:d.breakpoints)??Q),c`
|
|
6311
6311
|
<div
|
|
6312
6312
|
id=${this.element.id}
|
|
6313
6313
|
class=${t}
|
|
6314
6314
|
style=${S({...n,...r})}
|
|
6315
6315
|
></div>
|
|
6316
|
-
`}};si([l({type:Object})],exports.SbGapRenderer.prototype,"element",2);si([l({attribute:!1})],exports.SbGapRenderer.prototype,"component",2);exports.SbGapRenderer=si([h("sb-gap-renderer")],exports.SbGapRenderer);var tw=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,no=(e,t,s,o)=>{for(var r=o>1?void 0:o?ew(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&tw(t,s,r),r};exports.SbCountdownRenderer=class extends ${constructor(){super(...arguments),this.seconds=0,this.timerId=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){var s;const t=((s=this.element)==null?void 0:s.properties.duration)??5;this.seconds=Math.max(0,t),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer();const t=this.element.properties.redirect_url??"/";window.location.href=t}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.element.properties.content??""} ${this.seconds}s...`}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.timer)==null?void 0:a.countdowns,this.element.id,this.component.customizations),{base:o,responsive:r}=
|
|
6316
|
+
`}};si([l({type:Object})],exports.SbGapRenderer.prototype,"element",2);si([l({attribute:!1})],exports.SbGapRenderer.prototype,"component",2);exports.SbGapRenderer=si([h("sb-gap-renderer")],exports.SbGapRenderer);var tw=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,no=(e,t,s,o)=>{for(var r=o>1?void 0:o?ew(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&tw(t,s,r),r};exports.SbCountdownRenderer=class extends ${constructor(){super(...arguments),this.seconds=0,this.timerId=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){var s;const t=((s=this.element)==null?void 0:s.properties.duration)??5;this.seconds=Math.max(0,t),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer();const t=this.element.properties.redirect_url??"/";window.location.href=t}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.element.properties.content??""} ${this.seconds}s...`}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.timer)==null?void 0:a.countdowns,this.element.id,this.component.customizations),{base:o,responsive:r}=it(s);return at(this.element.id,r,((u=(d=this.component.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q),c`
|
|
6317
6317
|
<div id=${this.element.id} class=${t} style=${S(o)}>
|
|
6318
6318
|
<span>${this.renderContent()}</span>
|
|
6319
6319
|
</div>
|
|
6320
|
-
`}};no([l({type:Object})],exports.SbCountdownRenderer.prototype,"element",2);no([l({attribute:!1})],exports.SbCountdownRenderer.prototype,"component",2);no([E()],exports.SbCountdownRenderer.prototype,"seconds",2);exports.SbCountdownRenderer=no([h("sb-countdown-renderer")],exports.SbCountdownRenderer);var rw=Object.defineProperty,sw=Object.getOwnPropertyDescriptor,oi=(e,t,s,o)=>{for(var r=o>1?void 0:o?sw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&rw(t,s,r),r};exports.SbSpinnerRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.loader)==null?void 0:a.spinner,this.element.id,this.component.customizations),{base:o,responsive:r}=
|
|
6320
|
+
`}};no([l({type:Object})],exports.SbCountdownRenderer.prototype,"element",2);no([l({attribute:!1})],exports.SbCountdownRenderer.prototype,"component",2);no([E()],exports.SbCountdownRenderer.prototype,"seconds",2);exports.SbCountdownRenderer=no([h("sb-countdown-renderer")],exports.SbCountdownRenderer);var rw=Object.defineProperty,sw=Object.getOwnPropertyDescriptor,oi=(e,t,s,o)=>{for(var r=o>1?void 0:o?sw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&rw(t,s,r),r};exports.SbSpinnerRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.loader)==null?void 0:a.spinner,this.element.id,this.component.customizations),{base:o,responsive:r}=it(s);return at(this.element.id,r,((u=(d=this.component.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q),c`
|
|
6321
6321
|
<sb-spinner
|
|
6322
6322
|
size="20"
|
|
6323
6323
|
stroke-width="2"
|
|
@@ -6388,11 +6388,11 @@ body {
|
|
|
6388
6388
|
.component=${e}
|
|
6389
6389
|
.element=${t}
|
|
6390
6390
|
?hidden=${o}
|
|
6391
|
-
></sb-countdown-renderer>`;default:return c`<p>Unknown element type: ${t.element_type}</p>`}}var ow=Object.defineProperty,nw=Object.getOwnPropertyDescriptor,ii=(e,t,s,o)=>{for(var r=o>1?void 0:o?nw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ow(t,s,r),r};exports.SbContainerRenderer=class extends ${constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await cn(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await cn(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var r,n;if(!((n=(r=this.element)==null?void 0:r.class)!=null&&n.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),s=t.length,o=this.offsetWidth;s===this.prevChildCount&&o===this.prevContainerWidth||(this.prevChildCount=s,this.prevContainerWidth=o,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,Yv(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>ni(this.component,t)):A}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.containerStyles,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.divider)==null?void 0:a.dividerContainer,this.element.id,this.component.customizations,!0),{base:o,responsive:r}=
|
|
6391
|
+
></sb-countdown-renderer>`;default:return c`<p>Unknown element type: ${t.element_type}</p>`}}var ow=Object.defineProperty,nw=Object.getOwnPropertyDescriptor,ii=(e,t,s,o)=>{for(var r=o>1?void 0:o?nw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&ow(t,s,r),r};exports.SbContainerRenderer=class extends ${constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await cn(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await cn(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var r,n;if(!((n=(r=this.element)==null?void 0:r.class)!=null&&n.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),s=t.length,o=this.offsetWidth;s===this.prevChildCount&&o===this.prevContainerWidth||(this.prevChildCount=s,this.prevContainerWidth=o,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,Yv(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>ni(this.component,t)):A}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.containerStyles,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.divider)==null?void 0:a.dividerContainer,this.element.id,this.component.customizations,!0),{base:o,responsive:r}=it(s);return at(this.element.id,r,((u=(d=this.component.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q),c`
|
|
6392
6392
|
<div id=${this.element.id} class=${t} style=${S(o)}>
|
|
6393
6393
|
${this.renderChildren()}
|
|
6394
6394
|
</div>
|
|
6395
|
-
`}};ii([l({type:Object})],exports.SbContainerRenderer.prototype,"element",2);ii([l({attribute:!1})],exports.SbContainerRenderer.prototype,"component",2);exports.SbContainerRenderer=ii([h("sb-container-renderer")],exports.SbContainerRenderer);var iw=Object.defineProperty,aw=Object.getOwnPropertyDescriptor,io=(e,t,s,o)=>{for(var r=o>1?void 0:o?aw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&iw(t,s,r),r};exports.SbImage=class extends ${constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var i,a;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),o=Vs(this.element.properties.image_url,this.theme),{base:r,responsive:n}=
|
|
6395
|
+
`}};ii([l({type:Object})],exports.SbContainerRenderer.prototype,"element",2);ii([l({attribute:!1})],exports.SbContainerRenderer.prototype,"component",2);exports.SbContainerRenderer=ii([h("sb-container-renderer")],exports.SbContainerRenderer);var iw=Object.defineProperty,aw=Object.getOwnPropertyDescriptor,io=(e,t,s,o)=>{for(var r=o>1?void 0:o?aw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&iw(t,s,r),r};exports.SbImage=class extends ${constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var i,a;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,void 0,this.element.id,void 0),o=Vs(this.element.properties.image_url,this.theme),{base:r,responsive:n}=it(s);return at(this.element.id,n,((a=(i=this.component.customizations)==null?void 0:i.config)==null?void 0:a.breakpoints)??Q),c`
|
|
6396
6396
|
<img class=${t} src=${o} style=${S(r)} />
|
|
6397
6397
|
`}};io([l({type:Object})],exports.SbImage.prototype,"element",2);io([l({attribute:!1})],exports.SbImage.prototype,"component",2);io([E()],exports.SbImage.prototype,"theme",2);exports.SbImage=io([h("sb-image")],exports.SbImage);var lw=Object.defineProperty,cw=Object.getOwnPropertyDescriptor,ai=(e,t,s,o)=>{for(var r=o>1?void 0:o?cw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&lw(t,s,r),r};exports.SbWatermarkRenderer=class extends ${constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){if(!this.element)return null;const{class:t}=R(this.element.class,void 0,void 0,this.element.id,void 0),s=Vs(this.element.properties.image_url,this.theme);return c`
|
|
6398
6398
|
<sb-watermark
|
|
@@ -6401,7 +6401,7 @@ body {
|
|
|
6401
6401
|
label=${this.element.properties.label}
|
|
6402
6402
|
image_url=${s}
|
|
6403
6403
|
></sb-watermark>
|
|
6404
|
-
`}};ai([l({type:Object})],exports.SbWatermarkRenderer.prototype,"element",2);ai([E()],exports.SbWatermarkRenderer.prototype,"theme",2);exports.SbWatermarkRenderer=ai([h("sb-watermark-renderer")],exports.SbWatermarkRenderer);var dw=Object.defineProperty,uw=Object.getOwnPropertyDescriptor,ao=(e,t,s,o)=>{for(var r=o>1?void 0:o?uw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&dw(t,s,r),r};exports.SbLogoRenderer=class extends ${constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var a,d,u,m;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(d=(a=this.component.customizations)==null?void 0:a.byType)==null?void 0:d.logo,this.element.id,this.component.customizations),{base:o,responsive:r}=
|
|
6404
|
+
`}};ai([l({type:Object})],exports.SbWatermarkRenderer.prototype,"element",2);ai([E()],exports.SbWatermarkRenderer.prototype,"theme",2);exports.SbWatermarkRenderer=ai([h("sb-watermark-renderer")],exports.SbWatermarkRenderer);var dw=Object.defineProperty,uw=Object.getOwnPropertyDescriptor,ao=(e,t,s,o)=>{for(var r=o>1?void 0:o?uw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&dw(t,s,r),r};exports.SbLogoRenderer=class extends ${constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var a,d,u,m;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(d=(a=this.component.customizations)==null?void 0:a.byType)==null?void 0:d.logo,this.element.id,this.component.customizations),{base:o,responsive:r}=it(s);at(this.element.id,r,((m=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:m.breakpoints)??Q);const n=Vs(this.element.properties.image_url,this.theme),i=n?Wn(n):null;return i?c`
|
|
6405
6405
|
<div class=${t} style=${S(o)}>
|
|
6406
6406
|
${Zn(i)}
|
|
6407
6407
|
</div>
|
|
@@ -6411,7 +6411,7 @@ body {
|
|
|
6411
6411
|
style=${S(o)}
|
|
6412
6412
|
src=${bc(n)}
|
|
6413
6413
|
/>
|
|
6414
|
-
`}};ao([l({type:Object})],exports.SbLogoRenderer.prototype,"element",2);ao([l({attribute:!1})],exports.SbLogoRenderer.prototype,"component",2);ao([E()],exports.SbLogoRenderer.prototype,"theme",2);exports.SbLogoRenderer=ao([h("sb-logo-renderer")],exports.SbLogoRenderer);var hw=Object.defineProperty,pw=Object.getOwnPropertyDescriptor,li=(e,t,s,o)=>{for(var r=o>1?void 0:o?pw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&hw(t,s,r),r};const gw=400;exports.SbInputRenderer=class extends ${createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...s)=>{const o=t(...s);return this.requestUpdate(),o}}getCustomization(t,s,o){var r,n,i;return R(t,s,o?(i=(n=(r=this.component.customizations)==null?void 0:r.byType)==null?void 0:n.inputs)==null?void 0:i[o]:void 0,this.element.id,this.component.customizations)}getErrorState(){const t=this.component;return t.__rtg_errorState=t.__rtg_errorState||{visible:{},timers:{},lastText:{}},t.__rtg_errorState}manageErrorAnimation(t){const s=this.getErrorState(),o=this.element.data_key||this.element.id,r=t.length>0,n=!!s.visible[o];let i=!1,a="";r?(i=!0,a="sb-error-in",s.lastText[o]=t[0],s.timers[o]&&clearTimeout(s.timers[o]),delete s.timers[o],s.visible[o]=!0):n&&!r&&(i=!0,a="sb-error-out",s.timers[o]||(s.timers[o]=setTimeout(()=>{s.visible[o]=!1,delete s.timers[o],delete s.lastText[o],this.requestUpdate()},gw+20)));const d=s.lastText[o]||t[0]||"";return{shouldRender:i,animClass:a,errorContent:d}}setInitialValue(){this.element.data_key&&this.element.properties.initial_value&&this.component.handleInputChange(this.element.data_key,this.element.properties.initial_value)}updated(t){t.has("element")&&this.setInitialValue()}render(){var w,x;if(!this.element)return null;const t=this.element.data_key?this.component.errors[this.element.data_key]||[]:[],{class:s,style:o}=this.getCustomization(this.element.class,this.element.style,"inputField"),{class:r,style:n}=this.getCustomization(Zf,{},"inputHint"),{class:i,style:a}=this.getCustomization(Xl,{},"inputError"),{shouldRender:d,animClass:u,errorContent:m}=this.manageErrorAnimation(t),{base:f,responsive:y}=
|
|
6414
|
+
`}};ao([l({type:Object})],exports.SbLogoRenderer.prototype,"element",2);ao([l({attribute:!1})],exports.SbLogoRenderer.prototype,"component",2);ao([E()],exports.SbLogoRenderer.prototype,"theme",2);exports.SbLogoRenderer=ao([h("sb-logo-renderer")],exports.SbLogoRenderer);var hw=Object.defineProperty,pw=Object.getOwnPropertyDescriptor,li=(e,t,s,o)=>{for(var r=o>1?void 0:o?pw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&hw(t,s,r),r};const gw=400;exports.SbInputRenderer=class extends ${createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...s)=>{const o=t(...s);return this.requestUpdate(),o}}getCustomization(t,s,o){var r,n,i;return R(t,s,o?(i=(n=(r=this.component.customizations)==null?void 0:r.byType)==null?void 0:n.inputs)==null?void 0:i[o]:void 0,this.element.id,this.component.customizations)}getErrorState(){const t=this.component;return t.__rtg_errorState=t.__rtg_errorState||{visible:{},timers:{},lastText:{}},t.__rtg_errorState}manageErrorAnimation(t){const s=this.getErrorState(),o=this.element.data_key||this.element.id,r=t.length>0,n=!!s.visible[o];let i=!1,a="";r?(i=!0,a="sb-error-in",s.lastText[o]=t[0],s.timers[o]&&clearTimeout(s.timers[o]),delete s.timers[o],s.visible[o]=!0):n&&!r&&(i=!0,a="sb-error-out",s.timers[o]||(s.timers[o]=setTimeout(()=>{s.visible[o]=!1,delete s.timers[o],delete s.lastText[o],this.requestUpdate()},gw+20)));const d=s.lastText[o]||t[0]||"";return{shouldRender:i,animClass:a,errorContent:d}}setInitialValue(){this.element.data_key&&this.element.properties.initial_value&&this.component.handleInputChange(this.element.data_key,this.element.properties.initial_value)}updated(t){t.has("element")&&this.setInitialValue()}render(){var w,x;if(!this.element)return null;const t=this.element.data_key?this.component.errors[this.element.data_key]||[]:[],{class:s,style:o}=this.getCustomization(this.element.class,this.element.style,"inputField"),{class:r,style:n}=this.getCustomization(Zf,{},"inputHint"),{class:i,style:a}=this.getCustomization(Xl,{},"inputError"),{shouldRender:d,animClass:u,errorContent:m}=this.manageErrorAnimation(t),{base:f,responsive:y}=it(o);return at(this.element.id,y,((x=(w=this.component.customizations)==null?void 0:w.config)==null?void 0:x.breakpoints)??Q),c`
|
|
6415
6415
|
<rtg-input
|
|
6416
6416
|
id=${this.element.data_key}
|
|
6417
6417
|
type=${this.element.properties.type}
|
|
@@ -6442,7 +6442,7 @@ body {
|
|
|
6442
6442
|
></sb-error>
|
|
6443
6443
|
</div>
|
|
6444
6444
|
`:""}
|
|
6445
|
-
`}};li([l({type:Object})],exports.SbInputRenderer.prototype,"element",2);li([l({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=li([h("sb-input-renderer")],exports.SbInputRenderer);var mw=Object.defineProperty,bw=Object.getOwnPropertyDescriptor,ci=(e,t,s,o)=>{for(var r=o>1?void 0:o?bw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&mw(t,s,r),r};exports.SbLabelRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.labels)==null?void 0:a.inputLabel,this.element.id,this.component.customizations),{base:o,responsive:r}=
|
|
6445
|
+
`}};li([l({type:Object})],exports.SbInputRenderer.prototype,"element",2);li([l({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=li([h("sb-input-renderer")],exports.SbInputRenderer);var mw=Object.defineProperty,bw=Object.getOwnPropertyDescriptor,ci=(e,t,s,o)=>{for(var r=o>1?void 0:o?bw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&mw(t,s,r),r};exports.SbLabelRenderer=class extends ${createRenderRoot(){return this}render(){var n,i,a,d,u;if(!this.element)return null;const{class:t,style:s}=R(this.element.class,this.element.style,(a=(i=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:i.labels)==null?void 0:a.inputLabel,this.element.id,this.component.customizations),{base:o,responsive:r}=it(s);return at(this.element.id,r,((u=(d=this.component.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q),c`
|
|
6446
6446
|
<rtg-label class=${t} style=${S(o)}>
|
|
6447
6447
|
${this.element.properties.content}
|
|
6448
6448
|
</rtg-label>
|
|
@@ -6468,9 +6468,9 @@ body {
|
|
|
6468
6468
|
${this._wrapSubmitButtons(ni(this,this.renderSpec.root_container,this.theme))}
|
|
6469
6469
|
</div>
|
|
6470
6470
|
</form>
|
|
6471
|
-
`}async _onSubmit(t,s){t.preventDefault();const o=t.submitter;if(!o||!s||this.loadingButtons[s]||o.id!==s)return;const r=this._findButtonById(s);r&&await this.handleEvent(r.properties.event,r)}_findButtonById(t){const s=o=>{if(o.element_type==="button"&&o.id===t)return o;if(o.element_type==="container")for(const r of o.properties.children){const n=s(r);if(n)return n}return null};return this.renderSpec?s(this.renderSpec.root_container):null}animateHeight(){var d,u;const s=(((u=(d=this.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q).sm,o=s?parseInt(s.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=o)return;const n=this.renderRoot.querySelector("#root-container");if(!n)return;const i=n.scrollHeight;if(this.prevHeight===0){this.prevHeight=i,n.style.height="auto";return}if(i===this.prevHeight||this.isAnimating)return;const a=Math.abs(i-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const m=Math.min(600,Math.max(200,a*1));n.style.transition="none",n.style.height=this.prevHeight+"px",n.offsetHeight,n.style.transition=`height ${m}ms ease`,n.style.height=i+"px";const f=()=>{n.style.transition="",n.style.height="auto",this.prevHeight=n.scrollHeight,this.isAnimating=!1};let y=!1;const w=()=>{y||(y=!0,f())};n.addEventListener("transitionend",w,{once:!0}),setTimeout(w,m)})}collectDataKeys(t){const s={},o=r=>{if(r&&((r.element_type==="input"||r.element_type==="checkbox"||r.element_type==="otp")&&r.data_key&&!r.hidden&&(s[r.data_key]=""),r.element_type==="container"))for(const n of r.properties.children)o(n)};return o(t),s}handleInputChange(t,s){s!==void 0&&(this.formData={...this.formData,[t]:s},xo(this,t,"change"),this.requestUpdate())}handleBlur(t){xo(this,t,"blur"),this.requestUpdate()}handleFocus(t,s){var n;(n=this.errors[t])!=null&&n.length&&(this.errors={...this.errors,[t]:[]});const o=`${s}-error`,r=document.getElementById(o);r&&r.parentNode&&r.parentNode.removeChild(r)}async handleEvent(t,s){var o,r;if(s.element_type==="html")try{await
|
|
6471
|
+
`}async _onSubmit(t,s){t.preventDefault();const o=t.submitter;if(!o||!s||this.loadingButtons[s]||o.id!==s)return;const r=this._findButtonById(s);r&&await this.handleEvent(r.properties.event,r)}_findButtonById(t){const s=o=>{if(o.element_type==="button"&&o.id===t)return o;if(o.element_type==="container")for(const r of o.properties.children){const n=s(r);if(n)return n}return null};return this.renderSpec?s(this.renderSpec.root_container):null}animateHeight(){var d,u;const s=(((u=(d=this.customizations)==null?void 0:d.config)==null?void 0:u.breakpoints)??Q).sm,o=s?parseInt(s.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=o)return;const n=this.renderRoot.querySelector("#root-container");if(!n)return;const i=n.scrollHeight;if(this.prevHeight===0){this.prevHeight=i,n.style.height="auto";return}if(i===this.prevHeight||this.isAnimating)return;const a=Math.abs(i-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const m=Math.min(600,Math.max(200,a*1));n.style.transition="none",n.style.height=this.prevHeight+"px",n.offsetHeight,n.style.transition=`height ${m}ms ease`,n.style.height=i+"px";const f=()=>{n.style.transition="",n.style.height="auto",this.prevHeight=n.scrollHeight,this.isAnimating=!1};let y=!1;const w=()=>{y||(y=!0,f())};n.addEventListener("transitionend",w,{once:!0}),setTimeout(w,m)})}collectDataKeys(t){const s={},o=r=>{if(r&&((r.element_type==="input"||r.element_type==="checkbox"||r.element_type==="otp")&&r.data_key&&!r.hidden&&(s[r.data_key]=""),r.element_type==="container"))for(const n of r.properties.children)o(n)};return o(t),s}handleInputChange(t,s){s!==void 0&&(this.formData={...this.formData,[t]:s},xo(this,t,"change"),this.requestUpdate())}handleBlur(t){xo(this,t,"blur"),this.requestUpdate()}handleFocus(t,s){var n;(n=this.errors[t])!=null&&n.length&&(this.errors={...this.errors,[t]:[]});const o=`${s}-error`,r=document.getElementById(o);r&&r.parentNode&&r.parentNode.removeChild(r)}async handleEvent(t,s){var o,r;if(s.element_type==="html")try{await nt.processLoginflowEvent({event:t,data:{}})}finally{this.eventEmitting=!1}else if(s.element_type==="otp")try{await nt.processLoginflowEvent({event:t,data:this.formData})}finally{this.eventEmitting=!1}else{if(this.loadingButtons[s.id])return;if((o=s.properties.requires_valid)==null||o.forEach(i=>{xo(this,i,"submit"),this.requestUpdate()}),!(((r=s.properties.requires_valid)==null?void 0:r.some(i=>{var a,d;return((d=(a=this.errors)==null?void 0:a[i])==null?void 0:d.length)>0}))??!1)){this.loadingButtons={...this.loadingButtons,[s.id]:!0},this.eventEmitting=!0;try{await nt.processLoginflowEvent({event:t,data:this.formData})}finally{this.loadingButtons={...this.loadingButtons,[s.id]:!1},this.eventEmitting=!1}}}}findElementByKey(t){const s=o=>{if((o.element_type==="input"||o.element_type==="checkbox"||o.element_type==="otp")&&o.data_key===t)return o;if(o.element_type==="container")for(const r of o.properties.children){const n=s(r);if(n)return n}return null};return this.renderSpec?s(this.renderSpec.root_container):null}isFieldValid(t){const s=this.findElementByKey(t);if(!s||!("validation"in s.properties))return!0;const{validation:o}=s.properties,{data_key:r}=s;if(!o||!r)return!0;const n=this.formData[r];return o.rules.every(a=>this.validateRule(a,n))}validateRule(t,s){switch(t.type){case"required":return Jl(s);case"min_length":return Ql(s,t.length);case"max_length":return tc(s,t.length);case"min_value":return ec(s,t.value);case"max_value":return rc(s,t.value);case"regex":return sc(s,t.regex);case"field_match":return oc(s,t.field_match?this.formData[t.field_match]:void 0);case"email":return nc(s);case"phone":return ic(s);case"date":return ac(s);default:return!0}}};me([l({type:Object})],exports.SaasBaseLayout.prototype,"renderSpec",2);me([l({type:Object})],exports.SaasBaseLayout.prototype,"customizations",2);me([E()],exports.SaasBaseLayout.prototype,"formData",2);me([E()],exports.SaasBaseLayout.prototype,"errors",2);me([E()],exports.SaasBaseLayout.prototype,"loadingButtons",2);me([E()],exports.SaasBaseLayout.prototype,"eventEmitting",2);me([E()],exports.SaasBaseLayout.prototype,"theme",2);exports.SaasBaseLayout=me([h("sb-layout")],exports.SaasBaseLayout);var yw=Object.defineProperty,ww=Object.getOwnPropertyDescriptor,Ze=(e,t,s,o)=>{for(var r=o>1?void 0:o?ww(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&yw(t,s,r),r};exports.SbProvider=class extends ${constructor(){super(...arguments),this.customizations=null,this.providedCustomizations=this.customizations,this.env=null,this.auth={isAuthenticated:!1},this.renderSpec=null,this.autoRedirect=!0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),Wv(),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(s=>setTimeout(s,20));nt.configure({domain:this.env.domain,clientId:this.env.clientId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:s=>{s.render_spec&&(this.renderSpec=s.render_spec)}}),this.refreshAuthState()})().catch(s=>console.error("Error initializing SbProvider:",s))}updated(t){var s;super.updated(t),t.has("customizations")&&(this.providedCustomizations=this.customizations),t.has("env")&&(s=this.env)!=null&&s.domain&&nt.configure({domain:this.env.domain,clientId:this.env.clientId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:o=>{o.render_spec&&(this.renderSpec=o.render_spec)}}),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if([this.env.signinUrl,this.env.signupUrl].some(r=>t.includes(r))){const i=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";window.location.href=i}}refreshAuthState(){this.auth={isAuthenticated:nt.isAuthenticated()}}};Ze([l({type:Object})],exports.SbProvider.prototype,"customizations",2);Ze([pe({context:qs})],exports.SbProvider.prototype,"providedCustomizations",2);Ze([l({type:Object}),pe({context:lc})],exports.SbProvider.prototype,"env",2);Ze([E(),pe({context:Bs})],exports.SbProvider.prototype,"auth",2);Ze([E(),pe({context:Hn})],exports.SbProvider.prototype,"renderSpec",2);Ze([l({type:Boolean})],exports.SbProvider.prototype,"autoRedirect",2);exports.SbProvider=Ze([h("sb-provider")],exports.SbProvider);var xw=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,yc=(e,t,s,o)=>{for(var r=o>1?void 0:o?_w(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&xw(t,s,r),r};exports.SignedOut=class extends ${constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?c`
|
|
6472
6472
|
<div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
6473
|
-
`:A}};yc([
|
|
6473
|
+
`:A}};yc([mt({context:Bs,subscribe:!0}),l({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=yc([h("sb-signed-out")],exports.SignedOut);var Cw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,wc=(e,t,s,o)=>{for(var r=o>1?void 0:o?Sw(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&Cw(t,s,r),r};exports.SignedIn=class extends ${constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?c`
|
|
6474
6474
|
<div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
6475
|
-
`:A}};wc([
|
|
6475
|
+
`:A}};wc([mt({context:Bs,subscribe:!0}),l({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=wc([h("sb-signed-in")],exports.SignedIn);var $w=Object.defineProperty,Ew=Object.getOwnPropertyDescriptor,lo=(e,t,s,o)=>{for(var r=o>1?void 0:o?Ew(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(r=(o?i(t,s,r):i(r))||r);return o&&r&&$w(t,s,r),r};exports.SbAuthenticated=class extends ${constructor(){super(...arguments),this._cachedChildren=[],this.redirectUrl=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){var t;return this.auth?this.auth.isAuthenticated?c`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),A):A}};lo([l({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);lo([mt({context:lc}),l({attribute:!1})],exports.SbAuthenticated.prototype,"env",2);lo([mt({context:Bs,subscribe:!0}),l({attribute:!1})],exports.SbAuthenticated.prototype,"auth",2);exports.SbAuthenticated=lo([h("sb-authenticated")],exports.SbAuthenticated);function kw(){return nt}exports.BaseElement=Ua;exports.SbUserProfile=$t;exports.renderElement=ni;exports.useAuthProvider=kw;
|
|
6476
6476
|
//# sourceMappingURL=index.js.map
|