@donotdev/ui 0.0.13 → 0.0.14

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.
Files changed (147) hide show
  1. package/dist/components/auth/AuthMenu.d.ts.map +1 -1
  2. package/dist/components/auth/AuthMenu.js +19 -20
  3. package/dist/components/common/FeatureCard.d.ts +3 -1
  4. package/dist/components/common/FeatureCard.d.ts.map +1 -1
  5. package/dist/components/common/FeatureCard.js +2 -2
  6. package/dist/components/common/ProgressBar.js +2 -2
  7. package/dist/components/common/TechBento.d.ts +14 -2
  8. package/dist/components/common/TechBento.d.ts.map +1 -1
  9. package/dist/components/common/TechBento.js +8 -9
  10. package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
  11. package/dist/components/cookie-consent/CookieConsent.js +3 -4
  12. package/dist/components/layout/components/DropdownNavigation.d.ts.map +1 -1
  13. package/dist/components/layout/components/DropdownNavigation.js +3 -12
  14. package/dist/components/layout/components/FloatingLanguageSwitcher.js +1 -1
  15. package/dist/components/layout/components/Notifications.d.ts +1 -3
  16. package/dist/components/layout/components/Notifications.d.ts.map +1 -1
  17. package/dist/components/layout/components/Notifications.js +4 -2
  18. package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
  19. package/dist/components/layout/components/header/AppBranding.js +2 -1
  20. package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
  21. package/dist/components/layout/components/header/AppIcon.js +5 -2
  22. package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
  23. package/dist/components/layout/components/header/CacheSettings.js +3 -1
  24. package/dist/components/layout/components/header/HeaderNavigation.d.ts +6 -0
  25. package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
  26. package/dist/components/layout/components/header/HeaderNavigation.js +12 -2
  27. package/dist/components/license/LicenseWatermark.d.ts.map +1 -1
  28. package/dist/components/license/LicenseWatermark.js +3 -1
  29. package/dist/crud/components/CrudCardLink.d.ts +17 -0
  30. package/dist/crud/components/CrudCardLink.d.ts.map +1 -0
  31. package/dist/crud/components/CrudCardLink.js +17 -0
  32. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  33. package/dist/crud/components/EntityCardList.js +24 -79
  34. package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
  35. package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
  36. package/dist/crud/components/EntityDisplayRenderer.js +6 -2
  37. package/dist/crud/components/EntityFormRenderer.d.ts +1 -1
  38. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  39. package/dist/crud/components/EntityFormRenderer.js +29 -18
  40. package/dist/crud/components/EntityList.d.ts +1 -1
  41. package/dist/crud/components/EntityList.d.ts.map +1 -1
  42. package/dist/crud/components/EntityList.js +1 -1
  43. package/dist/crud/components/EntityRecommendations.d.ts +28 -0
  44. package/dist/crud/components/EntityRecommendations.d.ts.map +1 -0
  45. package/dist/crud/components/EntityRecommendations.js +31 -0
  46. package/dist/crud/components/index.d.ts +2 -1
  47. package/dist/crud/components/index.d.ts.map +1 -1
  48. package/dist/crud/components/index.js +1 -0
  49. package/dist/index.js +4 -4
  50. package/dist/internal/common/RouteErrorFallback.d.ts.map +1 -1
  51. package/dist/internal/devtools/components/AuthDebugButton.js +1 -1
  52. package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
  53. package/dist/internal/devtools/components/DesignTab.js +3 -2
  54. package/dist/internal/devtools/components/LayoutReset.d.ts.map +1 -1
  55. package/dist/internal/devtools/components/LayoutReset.js +2 -0
  56. package/dist/internal/devtools/components/StoresTab.d.ts.map +1 -1
  57. package/dist/internal/devtools/components/StoresTab.js +3 -0
  58. package/dist/internal/devtools/utils/envVarDiscovery.d.ts +1 -0
  59. package/dist/internal/devtools/utils/envVarDiscovery.d.ts.map +1 -1
  60. package/dist/internal/devtools/utils/envVarDiscovery.js +5 -0
  61. package/dist/internal/devtools/utils/virtualModuleInspector.d.ts.map +1 -1
  62. package/dist/internal/devtools/utils/virtualModuleInspector.js +27 -21
  63. package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
  64. package/dist/internal/initializers/BaseStoresInitializer.js +30 -6
  65. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  66. package/dist/internal/layout/components/AutoMetaTags.js +10 -8
  67. package/dist/internal/layout/components/FontPreloadLinks.d.ts +16 -0
  68. package/dist/internal/layout/components/FontPreloadLinks.d.ts.map +1 -0
  69. package/dist/internal/layout/components/FontPreloadLinks.js +32 -0
  70. package/dist/internal/layout/components/PerformanceHints.d.ts +7 -12
  71. package/dist/internal/layout/components/PerformanceHints.d.ts.map +1 -1
  72. package/dist/internal/layout/components/PerformanceHints.js +8 -12
  73. package/dist/internal/layout/components/footer/useLegalLinks.d.ts +6 -5
  74. package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
  75. package/dist/internal/layout/components/footer/useLegalLinks.js +6 -2
  76. package/dist/internal/layout/zones/DnDevFooter.d.ts +6 -0
  77. package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
  78. package/dist/internal/layout/zones/DnDevFooter.js +10 -4
  79. package/dist/internal/layout/zones/DnDevHeader.d.ts +7 -0
  80. package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
  81. package/dist/internal/layout/zones/DnDevHeader.js +7 -0
  82. package/dist/internal/layout/zones/DnDevMergedBar.d.ts +7 -0
  83. package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
  84. package/dist/internal/layout/zones/DnDevMergedBar.js +9 -0
  85. package/dist/internal/layout/zones/DnDevSidebar.d.ts +4 -0
  86. package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
  87. package/dist/internal/layout/zones/DnDevSidebar.js +13 -1
  88. package/dist/next.d.ts +1 -0
  89. package/dist/next.d.ts.map +1 -1
  90. package/dist/next.js +1 -0
  91. package/dist/routing/AuthGuard.d.ts +1 -1
  92. package/dist/routing/AuthGuard.d.ts.map +1 -1
  93. package/dist/routing/AuthGuard.js +3 -1
  94. package/dist/routing/GoTo.d.ts.map +1 -1
  95. package/dist/routing/GoTo.js +3 -1
  96. package/dist/routing/GoToDialog.d.ts.map +1 -1
  97. package/dist/routing/GoToDialog.js +2 -7
  98. package/dist/routing/GoToInput.d.ts +0 -3
  99. package/dist/routing/GoToInput.d.ts.map +1 -1
  100. package/dist/routing/GoToInput.js +4 -2
  101. package/dist/routing/Link.js +1 -1
  102. package/dist/routing/NavigationItem.d.ts +29 -7
  103. package/dist/routing/NavigationItem.d.ts.map +1 -1
  104. package/dist/routing/NavigationItem.js +22 -6
  105. package/dist/routing/hooks/hooks.next.js +1 -1
  106. package/dist/routing/hooks/hooks.vite.js +1 -1
  107. package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
  108. package/dist/routing/hooks/useRedirectGuard.next.js +9 -8
  109. package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
  110. package/dist/routing/hooks/useRedirectGuard.vite.js +9 -8
  111. package/dist/routing/hooks/useSearchParams.next.d.ts +18 -1
  112. package/dist/routing/hooks/useSearchParams.next.d.ts.map +1 -1
  113. package/dist/routing/hooks/useSearchParams.next.js +16 -0
  114. package/dist/routing/hooks/useSearchParams.vite.d.ts +16 -0
  115. package/dist/routing/hooks/useSearchParams.vite.d.ts.map +1 -1
  116. package/dist/routing/hooks/useSearchParams.vite.js +17 -1
  117. package/dist/routing/index.d.ts.map +1 -1
  118. package/dist/routing/index.js +2 -0
  119. package/dist/routing/useNavigation.d.ts +30 -0
  120. package/dist/routing/useNavigation.d.ts.map +1 -1
  121. package/dist/routing/useNavigation.js +40 -3
  122. package/dist/routing/useRouteDiscovery.d.ts +2 -2
  123. package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
  124. package/dist/routing/useRouteDiscovery.js +10 -4
  125. package/dist/styles/index.css +268 -82
  126. package/dist/utils/index.d.ts +1 -0
  127. package/dist/utils/index.d.ts.map +1 -1
  128. package/dist/utils/index.js +1 -0
  129. package/dist/utils/sanitizeSvg.d.ts +13 -0
  130. package/dist/utils/sanitizeSvg.d.ts.map +1 -0
  131. package/dist/utils/sanitizeSvg.js +47 -0
  132. package/dist/utils/useBillingVisibility.d.ts.map +1 -1
  133. package/dist/utils/useBillingVisibility.js +0 -7
  134. package/dist/utils/useCrudSafe.d.ts +0 -2
  135. package/dist/utils/useCrudSafe.d.ts.map +1 -1
  136. package/dist/utils/useFormStoreSafe.d.ts +3 -1
  137. package/dist/utils/useFormStoreSafe.d.ts.map +1 -1
  138. package/dist/utils/useFormStoreSafe.js +4 -5
  139. package/dist/vite-routing/AppRoutes.d.ts +19 -8
  140. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  141. package/dist/vite-routing/AppRoutes.js +0 -3
  142. package/package.json +15 -11
  143. package/assets/fonts/fonts.css +0 -206
  144. package/dist/dndev.css +0 -10733
  145. package/dist/routing/Navigate.d.ts +0 -10
  146. package/dist/routing/Navigate.d.ts.map +0 -1
  147. package/dist/routing/Navigate.js +0 -10
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use client";var zo=Object.defineProperty;var Fr=(e,t,o)=>t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Vo=(e,t)=>{for(var o in t)zo(e,o,{get:t[o],enumerable:!0})};var st=(e,t,o)=>Fr(e,typeof t!="symbol"?t+"":t,o);import*as lt from"lucide-react";import{isValidElement as Br}from"react";import{cn as Vt}from"@donotdev/components";import{jsx as _e}from"react/jsx-runtime";function Mr(e){if(!e)return lt.Palette;let t=e.replace(/['"]/g,"");return lt[t]||lt.Palette}var $,Or,ye=Ae(()=>{"use strict";$=({icon:e,fallback:t,className:o,ariaHidden:n=!1})=>{let r=e||t;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return _e(r,{className:Vt(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return _e("span",{className:Vt(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let l=Mr(r);return _e(l,{className:Vt(a,o),style:{flexShrink:0},"aria-hidden":n})}return Br(r)?_e("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):_e("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},Or=$});import*as Wr from"@donotdev/auth";import{DEGRADED_AUTH_API as Kr}from"@donotdev/core";function Yr(e){return Kr[e]}function F(e){return Ut?Ut(e):Yr(e)}var Ut,Fp,He=Ae(()=>{"use strict";Ut=Wr?.useAuth;Fp=typeof Ut=="function"});var Ht={};Vo(Ht,{default:()=>sa});import{Cookie as Gt,Settings as qr,Shield as jr,BarChart3 as Zr,Target as Jr}from"lucide-react";import{useState as _t,useEffect as dt,useRef as Qr}from"react";import{Accordion as Xr,Button as $e,BUTTON_VARIANT as ut,Card as Ho,Switch as ea,Text as We,cn as ta,Stack as de}from"@donotdev/components";import{handleError as oa,useConsent as be,getCookieExamples as pt,hasOptionalCookies as na}from"@donotdev/core";import{CONSENT_CATEGORY as Ce}from"@donotdev/core";import{useTranslation as ra}from"@donotdev/core";import{isClient as aa}from"@donotdev/core";import{Fragment as la,jsx as O,jsxs as ue}from"react/jsx-runtime";function ia({position:e="bottom",showBranding:t=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=be("hasConsented"),a=be("categories"),s=be("acceptAll"),d=be("declineAll"),l=be("updateCategory"),u=be("showBanner"),c=be("showCookieBanner"),{t:i}=ra("cookies"),[g,p]=_t(!1),[m,h]=_t(!r||u),[v,S]=_t(a),b=Qr(null);dt(()=>{u&&h(!0)},[u]);let C=Object.keys(a),x=[{id:Ce.NECESSARY,icon:jr,title:i("essentialCookies"),description:i("essentialDescription"),examples:pt("necessary")||i("essentialExamples"),locked:!0},{id:Ce.FUNCTIONAL,icon:Gt,title:i("functionalCookies"),description:i("functionalDescription"),examples:pt("functional")||i("functionalExamples"),legalNotice:i("functionalLegalNotice"),locked:!1},{id:Ce.ANALYTICS,icon:Zr,title:i("analyticsCookies"),description:i("analyticsDescription"),examples:pt("analytics")||i("analyticsExamples"),locked:!1},{id:Ce.MARKETING,icon:Jr,title:i("marketingCookies"),description:i("marketingDescription"),examples:pt("marketing")||i("marketingExamples"),locked:!1}].filter(f=>C.includes(f.id)),k=na();if(dt(()=>{!r&&!k&&s()},[r,k,s]),dt(()=>{let f={...a};if(g){let T=f;Object.keys(T).forEach(N=>{N!==Ce.NECESSARY&&T[N]===!1&&(T[N]=!0)})}S(f)},[a,g]),dt(()=>{if(!aa()||r||!m)return;let f=N=>{b.current&&!b.current.contains(N.target)&&h(!1)},T=setTimeout(()=>{document.addEventListener("mousedown",f)},100);return()=>{clearTimeout(T),document.removeEventListener("mousedown",f)}},[r,m]),r&&!u)return null;let w=()=>{try{Object.entries(v).forEach(([f,T])=>{if(f!==Ce.NECESSARY&&T!==void 0){let N=f;Object.values(Ce).includes(N)&&l(N,!!T)}}),p(!1),h(!1)}catch(f){oa(f,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},P=()=>{s(),h(!1)},D=()=>{d(),h(!1)},I=ue(de,{children:[O(We,{as:"p",variant:"muted",level:"small",children:i("cookieBannerDescription")}),k&&O(Xr,{type:"single",collapsible:!0,value:g?"preferences":"",onValueChange:f=>p(f==="preferences"),items:[{value:"preferences",trigger:ue(de,{direction:"row",align:"center",gap:"tight",children:[O(qr,{className:"dndev-size-md"}),i("customize")]}),content:O(de,{children:x.map(f=>{let T=f.icon,N=v[f.id]??!1;return O(Ho,{content:ue(de,{direction:"row",align:"center",justify:"between",children:[ue(de,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[O(T,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),ue(de,{gap:"tight",children:[O(We,{as:"span",level:"body",style:{fontWeight:600},children:f.title}),O(We,{as:"span",variant:"muted",level:"small",children:f.description}),f.examples&&O(We,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:f.examples})]})]}),f.locked?O(We,{as:"span",variant:"muted",level:"small",children:i("alwaysOn")}):O(ea,{checked:N,onCheckedChange:R=>S(W=>({...W,[f.id]:R}))})]})},f.id)})})}]})]}),y=g?ue(de,{direction:"row",gap:"tight",style:{width:"100%"},children:[O($e,{onClick:w,variant:ut.DEFAULT,style:{flex:1},children:i("savePreferences","Save Preferences")}),O($e,{onClick:()=>p(!1),variant:ut.OUTLINE,style:{flex:1},children:i("form.cancel","Cancel")})]}):ue(de,{direction:"row",gap:"tight",style:{width:"100%"},children:[O($e,{onClick:P,variant:ut.DEFAULT,style:{flex:1},children:i("acceptAll")}),k&&O($e,{onClick:D,variant:ut.OUTLINE,style:{flex:1},children:i("declineOptional")})]});return ue(la,{children:[m&&O(Ho,{ref:b,className:ta("dndev-fixed dndev-z-modal",n),icon:Gt,title:i("cookiePreferences"),content:I,footer:y,style:{[e==="top"?"top":"bottom"]:"var(--gap-md)",left:"var(--gap-md)",right:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!m&&!r&&O($e,{onClick:()=>h(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",left:"var(--gap-md)"},icon:Gt,title:i("cookiePreferences")})]})}var sa,$t=Ae(()=>{"use strict";sa=ia});import{useMemo as ni}from"react";import{useNavigationStore as ri}from"@donotdev/core";import{USER_ROLES as ai}from"@donotdev/core";import{useLocation as ii}from"@donotdev/ui/routing/hooks";function te(){let e=ii(),t=F("user"),o=!!t,n=t?.role||ai.GUEST,r=ri(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return ni(()=>Array.isArray(r)?r.map(a=>({...a,isActive:si(a.path,e.pathname),hasChildren:!1,children:void 0})).sort((a,s)=>a.label.localeCompare(s.label)):[],[r,e.pathname])}function si(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}var Re=Ae(()=>{"use strict";He()});import{useCallback as vt,useMemo as Qo}from"react";import{useNavigationStore as qe}from"@donotdev/core";import{useNavigate as li}from"@donotdev/ui/routing/hooks";var Xo,qt=Ae(()=>{"use strict";Re();Xo=()=>{let e=li(),t=te()??[],o=qe(p=>p.favorites),n=qe(p=>p.recent),r=qe(p=>p.toggleFavorite),a=qe(p=>p.isFavorite),s=qe(p=>p.addRecent),d=Qo(()=>t.length?t.filter(p=>o.includes(p.path)):[],[o,t]),l=Qo(()=>t.length?t.filter(m=>n.includes(m.path)).slice(0,5):[],[n,t]),u=vt(p=>{r(p)},[r]),c=vt(p=>a(p),[a]),i=vt(p=>{s(p)},[s]),g=vt(p=>{i(p),e(p)},[e,i]);return{navigationItems:t,favoriteItems:d,recentItems:l,toggleFavorite:u,isFavorite:c,navigateToItem:g}}});var tn={};Vo(tn,{default:()=>Ci});import{Clock as ci,Link as di,Star as ui}from"lucide-react";import{useCallback as en,useEffect as pi,useRef as mi}from"react";import{Badge as gi,Command as fi,CommandDialog as hi}from"@donotdev/components";import{useOverlayStore as jt,useTranslation as vi}from"@donotdev/core";import{jsx as z,jsxs as Fe}from"react/jsx-runtime";var yi,bi,Ci,on=Ae(()=>{"use strict";qt();ye();yi=()=>{let{t:e}=vi("dndev"),t=mi(null),o=jt(m=>m.isCommandDialogOpen),n=jt(m=>m.closeCommandDialog),{navigationItems:r,favoriteItems:a,recentItems:s,toggleFavorite:d,isFavorite:l,navigateToItem:u}=Xo();pi(()=>{o&&requestAnimationFrame(()=>{t.current?.focus()})},[o]);let c=en(m=>{u(m),n()},[u,n]),i=en((m,h=!0)=>m.map(v=>({label:v.label,value:v.path,description:v.path!==v.label?v.path:void 0,icon:z($,{icon:v.icon,fallback:di}),badge:v.badge?z(gi,{children:v.badge}):void 0,onSelect:()=>c(v.path),rightSlot:h?z("button",{type:"button",onClick:S=>{S.stopPropagation(),d(v.path)},className:"dndev-command-favorite-button","data-favorited":l(v.path),"aria-label":l(v.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:z($,{icon:ui,className:"dndev-size-sm"})}):void 0})),[c,d,l,e]),g=[];if(a.length>0&&g.push({heading:e("globalGoTo.favorites","Favorites"),items:i(a,!1)}),s.length>0){let m=s.flatMap(h=>i([h],!0)).map(h=>({...h,icon:z($,{icon:ci,className:"dndev-size-sm"})}));m.length>0&&g.push({heading:e("globalGoTo.recent","Recent"),separator:a.length>0,items:m})}g.push({heading:e("globalGoTo.allPages","All Pages"),separator:a.length>0||s.length>0,items:i(r)});let p=r.length>0;return Fe(hi,{open:o,onOpenChange:m=>m?null:n(),children:[z(fi,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:p?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:g}),z("div",{className:"dndev-command-footer",children:Fe("div",{className:"dndev-command-footer-shortcuts",children:[Fe("div",{className:"dndev-command-footer-shortcut",children:[z("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),z("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),Fe("div",{className:"dndev-command-footer-shortcut",children:[z("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),z("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),z("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),Fe("div",{className:"dndev-command-footer-shortcut",children:[z("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),z("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),Fe("div",{className:"dndev-command-footer-shortcut",children:[z("kbd",{className:"dndev-command-footer-key",children:"Esc"}),z("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},bi=()=>jt(t=>t.isCommandDialogOpen)?z(yi,{}):null,Ci=bi});import{User as Ms}from"lucide-react";import{Suspense as so,lazy as Cn,useState as Os}from"react";import{Button as zs,BUTTON_VARIANT as Vs,DropdownMenu as Us,Dialog as Gs,DISPLAY as _s}from"@donotdev/components";import{useTranslation as Hs}from"@donotdev/core";import{useAuthConfig as $s}from"@donotdev/core";import{getEnabledAuthPartners as Ws}from"@donotdev/core";import{User as ps,LogOut as ms,Settings as Ze,UserCheck as gs,Trash2 as fs}from"lucide-react";import*as hs from"lucide-react";import xt,{useMemo as vs,lazy as vn,Suspense as hn}from"react";import{Avatar as ys,Button as bs,BUTTON_VARIANT as Cs,DropdownMenu as Ss,Text as xs,DISPLAY as Ts}from"@donotdev/components";import{useTranslation as ks}from"@donotdev/core";import{getEnabledAuthPartners as ws,useAuthConfig as Is,isClient as Ns}from"@donotdev/core";import{useBreakpoint as As}from"@donotdev/core";import{useNavigate as Ps}from"@donotdev/ui/routing/hooks";ye();import{Link as Uo}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as zr}from"@donotdev/core";import{useNavigate as Vr}from"@donotdev/ui/routing/hooks";import{Fragment as Ur,jsx as Pe,jsxs as Go}from"react/jsx-runtime";var A=({path:e,replace:t,prefetch:o=!0,children:n,icon:r,label:a,onClick:s,className:d,"aria-label":l,"aria-describedby":u,target:c,rel:i,...g})=>{let p=Vr();if(e==="#cookie-settings"){let b=zr("showCookieBanner");return Go("a",{href:"#cookie-settings",onClick:x=>{x.preventDefault(),x.stopPropagation();try{b()}catch{}s&&s(x)},className:d,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":l||a||"Cookie Settings","aria-describedby":u,...g,children:[r&&Pe($,{icon:r,fallback:Uo}),a&&Pe("span",{children:a}),n]})}let m=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),h=b=>{if(m){s&&s(b);return}b.preventDefault(),s&&s(b);let C=e.startsWith("/")?e:`/${e}`;p(C,{replace:t})},v={"aria-label":l||a,"aria-describedby":u},S=Go(Ur,{children:[r&&Pe($,{icon:r,fallback:Uo}),a&&Pe("span",{children:a}),n]});return m?Pe("a",{href:e,onClick:h,target:c||"_blank",rel:i||"noopener noreferrer",className:d,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...v,...g,children:S}):Pe("a",{href:e,onClick:h,className:d,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...v,...g,children:S})};import{useEffect as $o,useState as ca,lazy as da,Suspense as ua}from"react";import{Stack as Wo}from"@donotdev/components";import{FEATURE_STATUS as Wt,USER_ROLES as mt,SUBSCRIPTION_TIERS as Kt}from"@donotdev/core";import{useRedirectGuard as pa,useNavigate as ma}from"@donotdev/ui/routing/hooks";import{RefreshCw as _o}from"lucide-react";import"react";import{cn as Gr}from"@donotdev/components";import{jsx as Le}from"react/jsx-runtime";var _r=({variant:e="fullPage",className:t})=>e==="inline"?Le("div",{className:t,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:Le(_o,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):Le("div",{className:Gr("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:Le(_o,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Hr=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Le(_r,{variant:e,className:t}),$r=e=>Le(Hr,{...e}),ct=$r;He();import{Fragment as Ko,jsx as G,jsxs as Yo}from"react/jsx-runtime";var ga=da(()=>Promise.resolve().then(()=>($t(),Ht)));function fa({auth:e,children:t,fallback:o=ct}){let n=ma(),r=F("user"),a=F("can"),s=F("status"),[d,l]=ca(!1),{shouldRedirect:u,redirectTo:c,isChecking:i}=pa({auth:e});return $o(()=>{let g=setTimeout(()=>{s===Wt.INITIALIZING&&l(!0)},5e3);return()=>clearTimeout(g)},[s]),$o(()=>{u&&c&&n(c,{replace:!0})},[u,c,n]),e===!1?G(Ko,{children:t}):u||i?G(ct,{}):s===Wt.INITIALIZING&&d?G(Wo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Yo("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[G("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),G("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),G("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):s===Wt.INITIALIZING?G(o,{}):e&&typeof e=="object"&&e.required&&!r&&a&&!a.navigate(e)?G(Wo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Yo("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[G("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),G("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),G(ua,{fallback:G("div",{children:"Loading consent..."}),children:G(ga,{})})]})}):G(Ko,{children:t})}function ha(e){return F("can")?.navigate(e)??!1}var Jp=ha;function Qp(){return F("user")?.role||mt.GUEST}function Xp(e){return F("user")?.role===e}function em(){let e=F("user"),t=F("userSubscription"),o=F("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function tm(e,t){return n=>G(fa,{auth:t,children:G(e,{...n})})}var om={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:mt.USER}),admin:()=>({required:!0,role:mt.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:Kt.PRO}),premium:()=>({required:!0,tier:Kt.PREMIUM}),adminPro:()=>({required:!0,role:mt.ADMIN,tier:Kt.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as Ma,Lock as Oa}from"lucide-react";import{Suspense as za,lazy as Va}from"react";import{Card as Ua,Button as Ga,Separator as _a,Stack as De,cn as Ha}from"@donotdev/components";import{useTranslation as $a}from"@donotdev/core";import"@donotdev/core";import{useLocation as Wa,useBack as Ka}from"@donotdev/ui/routing/hooks";import{Suspense as Fa}from"react";import{cn as Ba}from"@donotdev/components";import{Component as va}from"react";import{handleError as ya}from"@donotdev/core";var Yt=class extends va{constructor(o){super(o);st(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){ya(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},qo=Yt;import{AlertTriangle as ba,Home as Ca,ArrowLeft as Sa,RotateCw as xa,Copy as Ta,Check as ka}from"lucide-react";import{useEffect as wa,useState as Ia}from"react";import{Button as gt,BUTTON_VARIANT as ft,Card as jo,CARD_VARIANT as Zo,Alert as Na,ALERT_VARIANT as Aa,Stack as Ee}from"@donotdev/components";import{handleError as Pa,useTranslation as La}from"@donotdev/core";import{useLocation as Ea,useBack as Da}from"@donotdev/ui/routing/hooks";import{jsx as _,jsxs as Se}from"react/jsx-runtime";var Ra=({error:e,resetError:t,componentStack:o,eventId:n})=>{let{t:r}=La("dndev"),[a,s]=Ia(!1),d=Da(),u=Ea()?.pathname||(typeof window<"u"?window.location.pathname:"/"),c=e instanceof Error?e.message:"Unknown error",i=e instanceof Error?e.stack:void 0,g=!1;wa(()=>{try{Pa(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:u}})}catch{}},[e,u]);let p=async()=>{if(!i)return;let v=[`Error: ${c}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${u}`,"","Stack Trace:",i,o?`
1
+ "use client";var Uo=Object.defineProperty;var Gr=(e,t,o)=>t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var _o=(e,t)=>{for(var o in t)Uo(e,o,{get:t[o],enumerable:!0})};var rt=(e,t,o)=>Gr(e,typeof t!="symbol"?t+"":t,o);import*as at from"lucide-react";import{isValidElement as Hr}from"react";import{cn as Ot}from"@donotdev/components";import{jsx as _e}from"react/jsx-runtime";function $r(e){if(!e)return at.Palette;let t=e.replace(/['"]/g,"");return at[t]||at.Palette}var z,Wr,le=Ie(()=>{"use strict";z=({icon:e,fallback:t,className:o,ariaHidden:n=!1})=>{let r=e||t;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return _e(r,{className:Ot(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return _e("span",{className:Ot(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let l=$r(r);return _e(l,{className:Ot(a,o),style:{flexShrink:0},"aria-hidden":n})}return Hr(r)?_e("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):_e("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},Wr=z});import*as Xr from"@donotdev/auth";import{DEGRADED_AUTH_API as ea}from"@donotdev/core";function ta(e){return ea[e]}function P(e){return zt?zt(e):ta(e)}var zt,Zu,ve=Ie(()=>{"use strict";zt=Xr?.useAuth;Zu=typeof zt=="function"});var _t={};_o(_t,{default:()=>fa});import{Cookie as Vt,Settings as oa,Shield as na,BarChart3 as ra,Target as aa}from"lucide-react";import{useState as Ut,useEffect as st,useRef as ia}from"react";import{Accordion as sa,Button as Ge,BUTTON_VARIANT as lt,Card as Wo,Switch as la,Text as He,cn as ca,Stack as ce}from"@donotdev/components";import{handleError as da,useConsent as Pe,getCookieExamples as ct,hasOptionalCookies as pa}from"@donotdev/core";import{CONSENT_CATEGORY as he}from"@donotdev/core";import{useTranslation as ua}from"@donotdev/core";import{isClient as ma}from"@donotdev/core";import{Fragment as va,jsx as M,jsxs as de}from"react/jsx-runtime";function ga({position:e="bottom",showBranding:t=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=Pe("hasConsented"),a=Pe("categories"),i=Pe("acceptAll"),p=Pe("declineAll"),l=Pe("updateCategory"),d=Pe("showBanner"),{t:s}=ua("cookies"),[c,g]=Ut(!1),[u,m]=Ut(!r||d),[h,v]=Ut(a),y=ia(null);st(()=>{d&&m(!0)},[d]);let b=Object.keys(a),x=[{id:he.NECESSARY,icon:na,title:s("essentialCookies"),description:s("essentialDescription"),examples:ct("necessary")||s("essentialExamples"),locked:!0},{id:he.FUNCTIONAL,icon:Vt,title:s("functionalCookies"),description:s("functionalDescription"),examples:ct("functional")||s("functionalExamples"),legalNotice:s("functionalLegalNotice"),locked:!1},{id:he.ANALYTICS,icon:ra,title:s("analyticsCookies"),description:s("analyticsDescription"),examples:ct("analytics")||s("analyticsExamples"),locked:!1},{id:he.MARKETING,icon:aa,title:s("marketingCookies"),description:s("marketingDescription"),examples:ct("marketing")||s("marketingExamples"),locked:!1}].filter(f=>b.includes(f.id)),w=pa();if(st(()=>{!r&&!w&&i()},[r,w,i]),st(()=>{let f={...a};if(c){let T=f;Object.keys(T).forEach(C=>{C!==he.NECESSARY&&T[C]===!1&&(T[C]=!0)})}v(f)},[a,c]),st(()=>{if(!ma()||r||!u)return;let f=C=>{y.current&&!y.current.contains(C.target)&&m(!1)},T=setTimeout(()=>{document.addEventListener("mousedown",f)},100);return()=>{clearTimeout(T),document.removeEventListener("mousedown",f)}},[r,u]),r&&!d)return null;let N=()=>{try{Object.entries(h).forEach(([f,T])=>{if(f!==he.NECESSARY&&T!==void 0){let C=f;Object.values(he).includes(C)&&l(C,!!T)}}),g(!1),m(!1)}catch(f){da(f,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},E=()=>{i(),m(!1)},D=()=>{p(),m(!1)},k=de(ce,{children:[M(He,{as:"p",variant:"muted",level:"small",children:s("cookieBannerDescription")}),w&&M(sa,{type:"single",collapsible:!0,value:c?"preferences":"",onValueChange:f=>g(f==="preferences"),items:[{value:"preferences",trigger:de(ce,{direction:"row",align:"center",gap:"tight",children:[M(oa,{className:"dndev-size-md"}),s("customize")]}),content:M(ce,{children:x.map(f=>{let T=f.icon,C=h[f.id]??!1;return M(Wo,{content:de(ce,{direction:"row",align:"center",justify:"between",children:[de(ce,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[M(T,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),de(ce,{gap:"tight",children:[M(He,{as:"span",level:"body",style:{fontWeight:600},children:f.title}),M(He,{as:"span",variant:"muted",level:"small",children:f.description}),f.examples&&M(He,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:f.examples})]})]}),f.locked?M(He,{as:"span",variant:"muted",level:"small",children:s("alwaysOn")}):M(la,{checked:C,onCheckedChange:L=>v(j=>({...j,[f.id]:L}))})]})},f.id)})})}]})]}),S=c?de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[M(Ge,{onClick:N,variant:lt.DEFAULT,style:{flex:1},children:s("savePreferences","Save Preferences")}),M(Ge,{onClick:()=>g(!1),variant:lt.OUTLINE,style:{flex:1},children:s("form.cancel","Cancel")})]}):de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[M(Ge,{onClick:E,variant:lt.DEFAULT,style:{flex:1},children:s("acceptAll")}),w&&M(Ge,{onClick:D,variant:lt.OUTLINE,style:{flex:1},children:s("declineOptional")})]});return de(va,{children:[u&&M(Wo,{ref:y,className:ca("dndev-fixed dndev-z-modal",n),icon:Vt,title:s("cookiePreferences"),content:k,footer:S,style:{[e==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!u&&!r&&M(Ge,{onClick:()=>m(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",insetInlineStart:"var(--gap-md)"},icon:Vt,title:s("cookiePreferences")})]})}var fa,Gt=Ie(()=>{"use strict";fa=ga});import{useMemo as en}from"react";import{useNavigationStore as pi}from"@donotdev/core";import{USER_ROLES as ui}from"@donotdev/core";import{useLocation as mi}from"@donotdev/ui/routing/hooks";function W(){let e=mi(),t=P("user"),o=!!t,n=t?.role||ui.GUEST,r=pi(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return en(()=>Array.isArray(r)?r.map(a=>({...a,isActive:gi(a.path,e.pathname),hasChildren:!1,children:void 0})).sort((a,i)=>a.label.localeCompare(i.label,void 0,{sensitivity:"base"})):[],[r,e.pathname])}function tn(e){let t=W();return en(()=>t.find(o=>o.path===e),[t,e])}function gi(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}var be=Ie(()=>{"use strict";ve()});import{useCallback as gt,useMemo as on}from"react";import{useNavigationStore as Ke}from"@donotdev/core";import{useNavigate as fi}from"@donotdev/ui/routing/hooks";var nn,Kt=Ie(()=>{"use strict";be();nn=()=>{let e=fi(),t=W()??[],o=Ke(u=>u.favorites),n=Ke(u=>u.recent),r=Ke(u=>u.toggleFavorite),a=Ke(u=>u.isFavorite),i=Ke(u=>u.addRecent),p=on(()=>t.length?t.filter(u=>o.includes(u.path)):[],[o,t]),l=on(()=>t.length?t.filter(m=>n.includes(m.path)).slice(0,5):[],[n,t]),d=gt(u=>{r(u)},[r]),s=gt(u=>a(u),[a]),c=gt(u=>{i(u)},[i]),g=gt(u=>{c(u),e(u)},[e,c]);return{navigationItems:t,favoriteItems:p,recentItems:l,toggleFavorite:d,isFavorite:s,navigateToItem:g}}});var an={};_o(an,{default:()=>Ni});import{Link as vi,Star as hi}from"lucide-react";import{useCallback as rn,useEffect as yi,useRef as bi}from"react";import{Badge as Si,Command as Ci,CommandDialog as xi}from"@donotdev/components";import{useOverlayStore as Yt,useTranslation as Ti}from"@donotdev/core";import{jsx as _,jsxs as De}from"react/jsx-runtime";var wi,ki,Ni,sn=Ie(()=>{"use strict";Kt();le();wi=()=>{let{t:e}=Ti("dndev"),t=bi(null),o=Yt(m=>m.isCommandDialogOpen),n=Yt(m=>m.closeCommandDialog),{navigationItems:r,favoriteItems:a,recentItems:i,toggleFavorite:p,isFavorite:l,navigateToItem:d}=nn();yi(()=>{o&&requestAnimationFrame(()=>{t.current?.focus()})},[o]);let s=rn(m=>{d(m),n()},[d,n]),c=rn((m,h=!0)=>m.map(v=>({label:v.label,value:v.path,description:v.path!==v.label?v.path:void 0,icon:_(z,{icon:v.icon,fallback:vi}),badge:v.badge?_(Si,{children:v.badge}):void 0,onSelect:()=>s(v.path),rightSlot:h?_("button",{type:"button",onClick:y=>{y.stopPropagation(),p(v.path)},className:"dndev-command-favorite-button","data-favorited":l(v.path),"aria-label":l(v.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:_(z,{icon:hi,className:"dndev-size-sm"})}):void 0})),[s,p,l,e]),g=[];if(a.length>0&&g.push({heading:e("globalGoTo.favorites","Favorites"),items:c(a,!1)}),i.length>0){let m=i.flatMap(h=>c([h],!0));m.length>0&&g.push({heading:e("globalGoTo.recent","Recent"),separator:a.length>0,items:m})}g.push({heading:e("globalGoTo.allPages","All Pages"),separator:a.length>0||i.length>0,items:c(r)});let u=r.length>0;return De(xi,{open:o,onOpenChange:m=>m?null:n(),children:[_(Ci,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:u?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:g}),_("div",{className:"dndev-command-footer",children:De("div",{className:"dndev-command-footer-shortcuts",children:[De("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),_("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),De("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),_("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),_("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),De("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),_("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),De("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"Esc"}),_("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},ki=()=>Yt(t=>t.isCommandDialogOpen)?_(wi,{}):null,Ni=ki});import{User as Ks}from"lucide-react";import{Suspense as ro,lazy as kn,useState as Ys}from"react";import{Button as qs,BUTTON_VARIANT as Zs,DropdownMenu as js,Dialog as Js,DISPLAY as Qs}from"@donotdev/components";import{useTranslation as Xs}from"@donotdev/core";import{useAuthConfig as el}from"@donotdev/core";import{getEnabledAuthPartners as tl}from"@donotdev/core";import{User as ws,LogOut as ks,Settings as qe,UserCheck as Ns,Trash2 as Is}from"lucide-react";import*as As from"lucide-react";import bt,{useMemo as Es,lazy as Cn,Suspense as Sn}from"react";import{Avatar as Ps,Button as Ls,BUTTON_VARIANT as Rs,DropdownMenu as Ds,Text as Fs,DISPLAY as Bs}from"@donotdev/components";import{useTranslation as Ms}from"@donotdev/core";import{getEnabledAuthPartners as Os,useAuthConfig as zs,isClient as Vs}from"@donotdev/core";import{useBreakpoint as Us}from"@donotdev/core";import{useNavigate as _s}from"@donotdev/ui/routing/hooks";le();import{Link as Go}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as Kr}from"@donotdev/core";import{useNavigate as Yr}from"@donotdev/ui/routing/hooks";import{Fragment as qr,jsx as Ae,jsxs as Ho}from"react/jsx-runtime";var I=({path:e,replace:t,prefetch:o=!0,children:n,icon:r,label:a,onClick:i,className:p,"aria-label":l,"aria-describedby":d,target:s,rel:c,...g})=>{let u=Yr(),m=Kr("showCookieBanner");if(e==="#cookie-settings")return Ho("a",{href:"#cookie-settings",onClick:w=>{w.preventDefault(),w.stopPropagation();try{m()}catch{}i&&i(w)},className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":l||a||"Cookie Settings","aria-describedby":d,...g,children:[r&&Ae(z,{icon:r,fallback:Go}),a&&Ae("span",{children:a}),n]});let h=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),v=x=>{if(h){i&&i(x);return}x.preventDefault(),i&&i(x);let w=e.startsWith("/")?e:`/${e}`;u(w,{replace:t})},y={"aria-label":l||a,"aria-describedby":d},b=Ho(qr,{children:[r&&Ae(z,{icon:r,fallback:Go}),a&&Ae("span",{children:a}),n]});return h?Ae("a",{href:e,onClick:v,target:s||"_blank",rel:c||"noopener noreferrer",className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...y,...g,children:b}):Ae("a",{href:e,onClick:v,className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...y,...g,children:b})};import{useEffect as Ko,useState as ha,lazy as ya,Suspense as ba}from"react";import{Stack as Yo}from"@donotdev/components";import{FEATURE_STATUS as Ht,USER_ROLES as dt,SUBSCRIPTION_TIERS as $t}from"@donotdev/core";import{useRedirectGuard as Sa,useNavigate as Ca}from"@donotdev/ui/routing/hooks";import{RefreshCw as $o}from"lucide-react";import"react";import{cn as Zr}from"@donotdev/components";import{jsx as Ee}from"react/jsx-runtime";var jr=({variant:e="fullPage",className:t})=>e==="inline"?Ee("div",{className:t,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:Ee($o,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):Ee("div",{className:Zr("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:Ee($o,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Jr=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Ee(jr,{variant:e,className:t}),Qr=e=>Ee(Jr,{...e}),it=Qr;ve();import{Fragment as qo,jsx as V,jsxs as Zo}from"react/jsx-runtime";var xa=ya(()=>Promise.resolve().then(()=>(Gt(),_t)));function Ta({auth:e,children:t,fallback:o=it}){let n=Ca(),r=P("user"),a=P("can"),i=P("status"),[p,l]=ha(!1),{shouldRedirect:d,redirectTo:s,isChecking:c}=Sa({auth:e});return Ko(()=>{let g=setTimeout(()=>{i===Ht.INITIALIZING&&l(!0)},5e3);return()=>clearTimeout(g)},[i]),Ko(()=>{d&&s&&n(s,{replace:!0})},[d,s,n]),e===!1?V(qo,{children:t}):d||c?V(it,{}):i===Ht.INITIALIZING&&p?V(Yo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Zo("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),V("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),V("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):i===Ht.INITIALIZING?V(o,{}):e&&typeof e=="object"&&e.required&&!r&&a&&!a.navigate(e)?V(Yo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Zo("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),V("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),V(ba,{fallback:V("div",{children:"Loading consent..."}),children:V(xa,{})})]})}):V(qo,{children:t})}function wa(e){return P("can")?.navigate(e)??!1}var um=wa;function mm(){return P("user")?.role||dt.GUEST}function gm(e){return P("user")?.role===e}function fm(){let e=P("user"),t=P("userSubscription"),o=P("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function vm(e,t){return n=>V(Ta,{auth:t,children:V(e,{...n})})}var hm={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:dt.USER}),admin:()=>({required:!0,role:dt.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:$t.PRO}),premium:()=>({required:!0,tier:$t.PREMIUM}),adminPro:()=>({required:!0,role:dt.ADMIN,tier:$t.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as $a,Lock as Wa}from"lucide-react";import{Suspense as Ka,lazy as Ya}from"react";import{Card as qa,Button as Za,Separator as ja,Stack as Re,cn as Ja}from"@donotdev/components";import{useTranslation as Qa}from"@donotdev/core";import"@donotdev/core";import{useLocation as Xa,useBack as ei}from"@donotdev/ui/routing/hooks";import{Suspense as Ga}from"react";import{cn as Ha}from"@donotdev/components";import{Component as ka}from"react";import{handleError as Na}from"@donotdev/core";var Wt=class extends ka{constructor(o){super(o);rt(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){Na(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},jo=Wt;import{AlertTriangle as Ia,Home as Aa,ArrowLeft as Ea,RotateCw as Pa,Copy as La,Check as Ra}from"lucide-react";import{useEffect as Da,useState as Fa}from"react";import{Button as pt,BUTTON_VARIANT as ut,Card as Jo,CARD_VARIANT as Qo,Alert as Ba,ALERT_VARIANT as Ma,Stack as Le}from"@donotdev/components";import{handleError as Oa,useTranslation as za}from"@donotdev/core";import{useLocation as Va,useBack as Ua}from"@donotdev/ui/routing/hooks";import{jsx as U,jsxs as ye}from"react/jsx-runtime";var _a=({error:e,resetError:t,componentStack:o,eventId:n})=>{let{t:r}=za("dndev"),[a,i]=Fa(!1),p=Ua(),d=Va()?.pathname||(typeof window<"u"?window.location.pathname:"/"),s=e instanceof Error?e.message:"Unknown error",c=e instanceof Error?e.stack:void 0,g=!1;Da(()=>{try{Oa(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:d}})}catch{}},[e,d]);let u=async()=>{if(!c)return;let v=[`Error: ${s}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${d}`,"","Stack Trace:",c,o?`
2
2
  Component Stack:`:null,o||null].filter(Boolean).join(`
3
- `);try{await navigator.clipboard.writeText(v),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},m=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},h=()=>{try{d()}catch{typeof window<"u"&&window.history.back()}};return _("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:_(jo,{variant:Zo.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:Se(Ee,{gap:"large",align:"center",className:"dndev-text-center",children:[_(Ee,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:_(ba,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),Se(Ee,{children:[_("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),_("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),_(Na,{variant:Aa.SUCCESS,hideIcon:!0,children:_("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&Se("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&c&&Se(jo,{variant:Zo.MUTED,className:"dndev-w-full",children:[Se(Ee,{direction:"row",align:"center",justify:"between",children:[_("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),_(gt,{variant:ft.GHOST,icon:a?ka:Ta,onClick:p,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),_("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:c})]}),Se(Ee,{className:"dndev-w-full",children:[_(gt,{variant:ft.DESTRUCTIVE,icon:xa,onClick:m,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),Se(Ee,{direction:"row",justify:"center",children:[_(A,{path:"/",children:_(gt,{variant:ft.DEFAULT,icon:Ca,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),_(gt,{variant:ft.OUTLINE,icon:Sa,onClick:h,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),_("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Jo=Ra;import{jsx as Ke}from"react/jsx-runtime";var ht=({variant:e="standard",density:t,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>Ke(qo,{level:"route",fallback:s=>Ke(Fa,{fallback:Ke("div",{children:"Loading error fallback..."}),children:Ke(Jo,{...s})}),children:Ke("div",{className:Ba("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as qa,jsx as B,jsxs as Ye}from"react/jsx-runtime";var Ya=Va(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function Fm({title:e,description:t,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=$a(["auth","common"]),s=Wa(),d=Ka(),l=()=>{n?n():d()};return B(ht,{variant:"docs",children:B(De,{align:"center",justify:"center",className:Ha("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:B(Ua,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:Ye(De,{children:[B(De,{justify:"center",children:B("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:B(Oa,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),B("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),B("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:Ye(De,{children:[Ye(De,{gap:"large",children:[B("div",{children:B("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),B(za,{fallback:B("div",{children:"Loading providers..."}),children:B(Ya,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&Ye(qa,{children:[B(_a,{}),B("div",{children:B(Ga,{onClick:l,className:"dndev-gap-sm",icon:Ma,children:a("common.back")})})]}),Ye(De,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[B("p",{children:a("auth.fallback.secure")}),B("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ja}from"lucide-react";import{Button as Za,BUTTON_VARIANT as Ja,DISPLAY as Qa}from"@donotdev/components";import{useOverlayStore as Xa,useTranslation as ei}from"@donotdev/core";import{jsx as ti,jsxs as oi}from"react/jsx-runtime";var Um=({display:e=Qa.AUTO,className:t,onOpen:o})=>{let{t:n}=ei("dndev"),r=Xa(l=>l.openCommandDialog),s=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)?"\u2318K":"Ctrl+K",d=()=>{r(),o?.()};return oi(Za,{variant:Ja.OUTLINE,display:e,icon:ja,onClick:d,className:t,"aria-label":n("goTo.ariaLabel","Go to page"),children:[n("goTo.label","Go to"),ti("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:s})]})};import{Suspense as Si,lazy as xi}from"react";import{useEventListener as Ti,useOverlayStore as ki}from"@donotdev/core";import{jsx as nn}from"react/jsx-runtime";var wi=xi(()=>Promise.resolve().then(()=>(on(),tn))),Ii=()=>{let e=ki(t=>t.openCommandDialog);return Ti("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),e())},{target:document,options:{passive:!1,capture:!1}}),nn(Si,{fallback:null,children:nn(wi,{})})},Ni=Ii;import{Search as Ai}from"lucide-react";import{useCallback as rn,useEffect as Pi,useState as Li,useRef as Ei}from"react";import{Stack as Di}from"@donotdev/components";import{useOverlayStore as an}from"@donotdev/core";import{useTranslation as Ri}from"@donotdev/core";import{jsx as yt,jsxs as Mi}from"react/jsx-runtime";var Fi=()=>{let{t:e}=Ri("dndev"),[t,o]=Li(""),n=Ei(null),r=an(l=>l.openCommandDialog),a=an(l=>l.isCommandDialogOpen);Pi(()=>{a||o("")},[a]);let s=rn(()=>{r(t)},[r,t]),d=rn(l=>{l.key==="Enter"&&(l.preventDefault(),r(t))},[r,t]);return Mi(Di,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[yt(Ai,{className:"dndev-absolute dndev-size-md",style:{left:"0.75rem",opacity:.5},"aria-hidden":"true"}),yt("input",{ref:n,type:"text",value:t,onChange:l=>o(l.target.value),onFocus:s,onKeyDown:d,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingLeft:"2.5rem",paddingRight:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),yt("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{right:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:yt("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:"\u2318K"})})]})},Bi=Fi;import{MoreHorizontal as Oi,Link as sn}from"lucide-react";import{useState as zi,useEffect as ln,useRef as Vi,useMemo as Ui}from"react";import{NavigationMenu as cn,NavigationMenuListPrimitive as Gi,NavigationMenuItemPrimitive as dn,Button as _i,DropdownMenu as Hi,cn as bt,DISPLAY as $i}from"@donotdev/components";import{useTranslation as Wi}from"@donotdev/core";Re();ye();import{jsx as Q,jsxs as Zt}from"react/jsx-runtime";var un=({routes:e,vertical:t=!1,display:o=$i.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:s})=>{let{t:d}=Wi("dndev"),l=te(),u=e??l,c=Vi(null),[i,g]=zi(u.length),p=Ui(()=>u.map(m=>({label:m.label,path:m.path,icon:Q($,{icon:m.icon,fallback:sn}),children:m.children?m.children.map(h=>({label:h.label,path:h.path,icon:Q($,{icon:h.icon,fallback:sn})})):void 0})),[u]);if(ln(()=>{if(!n||u.length===0||t)return;let m=()=>{let v=c.current;if(!v)return;let S=v.getBoundingClientRect(),b=v.querySelectorAll("[data-nav-item]"),C=v.querySelector("[data-more-button]"),x=0,k=C?.offsetWidth||0;for(let w=0;w<b.length;w++){let P=b[w];if(!P)break;if(P.getBoundingClientRect().right-S.left+(w===b.length-1&&C?k:0)<=S.width)x=w+1;else break}g(Math.max(0,x))},h=new ResizeObserver(m);return c.current&&h.observe(c.current),setTimeout(m,0),()=>h.disconnect()},[n,u.length,t]),ln(()=>{n&&!t&&g(u.length)},[u.length,n,t]),u.length===0)return null;if(n&&!t){let m=p.slice(0,i),h=p.slice(i);return Q(cn,{className:bt(a),style:s||{flex:1},children:Zt(Gi,{ref:c,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[m.filter(v=>v.path).map((v,S)=>Q(dn,{"data-nav-item":!0,children:Zt(A,{path:v.path,className:bt("dndev-interactive"),"data-role":"nav-trigger",children:[r&&v.icon,Q("span",{className:"dndev-interactive-label",children:v.label})]})},v.path||S)),h.length>0&&Q(dn,{"data-more-button":!0,children:Q(Hi,{trigger:Q(_i,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":d("navigation.more","More"),children:Q(Oi,{className:"dndev-size-md"})}),items:h.filter(v=>v.path).map(v=>({label:v.label,children:Zt(A,{path:v.path,className:bt("dndev-interactive"),"data-role":"menu-item",children:[r&&v.icon,Q("span",{className:"dndev-interactive-label",children:v.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return Q(cn,{items:p,vertical:t,display:o,className:bt(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:A})};import{Home as Ki,ArrowLeft as Yi,Link as qi}from"lucide-react";import{useMemo as ji}from"react";import{Button as Jt,BUTTON_VARIANT as Qt,Stack as je,Text as Xt}from"@donotdev/components";import{useTranslation as Zi}from"@donotdev/core";import{useLocation as Ji,useNavigate as Qi}from"@donotdev/ui/routing/hooks";Re();ye();import{jsx as q,jsxs as Ct}from"react/jsx-runtime";function pn(){let{t:e}=Zi("dndev"),t=Ji(),o=Qi(),n=te(),r=ji(()=>n.filter(s=>!s.path.includes(":")&&s.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return q(ht,{variant:"docs",centered:!0,children:Ct(je,{gap:"large",align:"center",justify:"center",children:[Ct(je,{align:"center",children:[q(Xt,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),q(Xt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),q(Xt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&q("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:t.pathname})]}),r.length>0&&Ct(je,{align:"center",children:[q("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),q(je,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(s=>q(A,{path:s.path,replace:!0,children:q(Jt,{variant:Qt.OUTLINE,icon:q($,{icon:s.icon,fallback:qi}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${s.label}`,{label:s.label}),children:s.label})},s.path))})]}),Ct(je,{direction:"row",wrap:"wrap",justify:"center",children:[q(A,{path:"/",replace:!0,children:q(Jt,{variant:Qt.DEFAULT,icon:Ki,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),q(Jt,{variant:Qt.OUTLINE,icon:Yi,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}Re();qt();import{useNavigate as Be,useBack as q1,useRefresh as j1,usePrefetch as Z1,useLocation as J1,useParams as Q1,useRouteParam as X1,useSearchParams as eg,useMatch as tg,useQueryParams as og,useRedirectGuard as ng}from"@donotdev/ui/routing/hooks";import{getDndevConfig as eo,isClient as xe,isDev as mn}from"@donotdev/core";var K=class{static getBrowserSupport(){if(!xe())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let n of t)o.push(...this.extractStringValues(n));else if(typeof t=="object")for(let n of Object.values(t))o.push(...this.extractStringValues(n));return o}static assetExists(t){if(!xe())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return xe()&&eo()?.assets?.mapping||null}static getLogoSvgContent(){return eo()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(t){if(!xe())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,s=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",d={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||s,png32:a.png32||s,apple180:a.apple180||s,android192:a.android192||s,android512:a.android512||s};return this.cache.set(t,d),d}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(t,r),r}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),mn()&&xe()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:xe()?eo()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};st(K,"cache",new Map);function sg(e){return K.resolveLogo(e)}function lg(){return K.resolveFaviconSet()}mn()&&(K.clearCache(),xe()&&window.addEventListener("DOMContentLoaded",()=>{K.clearCache()}));import*as Xi from"@donotdev/crud";var Me=Xi?.useFormStore,gn={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:()=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},ug=typeof Me=="function";function to(e){return Me?Me(e):e(gn)}to.getState=()=>Me&&typeof Me.getState=="function"?Me.getState():gn;function pg(){return to(t=>t.hasDirtyForms())()}async function mg(e="You have unsaved changes. Discard them?"){return to.getState().hasDirtyForms()&&typeof window<"u"&&window.confirm?window.confirm(e):!0}He();import{useMemo as es}from"react";function St(){let e=F("status"),t=F("isAvailable"),o=F("user");return es(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ts from"@donotdev/billing";import{DEGRADED_BILLING_API as os}from"@donotdev/core";var oo=ts?.useStripeBilling;function ns(e){return os[e]}function no(e,t){return oo?oo(e,t):ns(e)}var bg=typeof oo=="function";He();function Tg(){let e=F("user"),t=F("status"),o={user:e,status:t},n=no("status",o),r=no("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_OAUTH_API as rs}from"@donotdev/core";import*as as from"@donotdev/oauth";var ro=as?.useOAuth;function is(e){return rs[e]}function Ig(e){return ro?ro(e):is(e)}var Ng=typeof ro=="function";import{CheckCircle as ss}from"lucide-react";import{List as ls}from"@donotdev/components";import{translateArray as cs}from"@donotdev/core";import{jsx as fn}from"react/jsx-runtime";var ds=ss,us=16;function Dg(e,t,o,n=ds,r=us){let a=n;return fn(ls,{icon:a?fn(a,{size:r}):void 0,items:cs(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}import{Fragment as Fs,jsx as pe,jsxs as Bs}from"react/jsx-runtime";var yn=()=>null,Ls=vn(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:yn}}}),Es=vn(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:yn}}}),ao=null;Ns()&&import("@donotdev/auth").then(e=>{ao=e.useDeleteAccount}).catch(()=>{});function Ds(){let[e]=xt.useState(!1),[t]=xt.useState(!1),[o]=xt.useState(!1),[n]=xt.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}}function Rs(){return ao?ao():Ds()}var Tt=e=>{if(!e)return Ze;if(typeof e=="function")return e;let t=e.replace(/['"]/g,"");return hs[t]||Ze},io=({loginPath:e,display:t=Ts.AUTO,"no-tooltip":o=!1,customItems:n=[],className:r,style:a})=>{let{t:s}=ks("dndev"),{shouldHide:d,isReady:l,isAuthenticated:u}=St(),c=Is(),i=F("user"),g=F("signOut"),p=As("isLaptop"),m=te(),h=Ps(),v=c.profilePath,S=c.authMenuItems||[],b=Rs(),C=()=>i&&(i.displayName||i.email?.split("@")[0])||"User",x=()=>C().split(" ").map(y=>y.charAt(0)).slice(0,2).join("").toUpperCase(),k=()=>{if(!i)return s("auth.userMenu",{defaultValue:"User menu"});let I=[C()];return i.email&&I.push(i.email),D&&D!=="guest"&&I.push(`Role: ${D}`),I.join(`
4
- `)},w=vs(()=>{let I=[];return!p&&i&&I.push({children:pe(xs,{variant:"muted",as:"span",children:`${C()}${i.email?`
5
- ${i.email}`:""}`}),disabled:!0}),v&&I.push({label:s("auth.profile",{defaultValue:"Profile"}),icon:ps,onClick:()=>h(v)}),S.forEach(y=>{let f=m.find(R=>R.path===y.path),T=y.label||f?.label||y.path.split("/").pop()||"Menu",N=y.icon?Tt(y.icon):f?.icon&&(typeof f.icon=="string"||typeof f.icon=="function")?Tt(f.icon):Ze;I.push({label:T,icon:N,onClick:()=>h(y.path)})}),n.forEach(y=>{if(y.path){let f=m.find(R=>R.path===y.path),T=y.label||f?.label||y.path.split("/").pop()||"Menu",N=y.icon?Tt(y.icon):Ze;I.push({label:T,icon:N,onClick:()=>h(y.path),disabled:y.disabled,style:y.style})}else if(y.onClick){let f=y.icon?Tt(y.icon):Ze;I.push({label:y.label,icon:f,onClick:y.onClick,disabled:y.disabled,style:y.style})}}),I.push({label:s("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:fs,onClick:b.startDeleteFlow,variant:"destructive"}),I.push({label:s("auth.signOut",{defaultValue:"Sign Out"}),icon:ms,onClick:()=>g(),variant:"destructive"}),I},[v,S,n,g,b,s,m,p,i,C,h]);if(ws().length===0||d||!l)return null;let D=i?.role;return u?Bs(Fs,{children:[pe(hn,{fallback:null,children:pe(Ls,{open:b.showPasswordDialog,isLoading:b.isDeleting,error:b.error,onReauth:I=>b.confirmDelete(I),onCancel:b.cancel})}),pe(hn,{fallback:null,children:pe(Es,{open:b.showConfirmDialog,isLoading:b.isDeleting,error:b.error,onConfirm:()=>b.confirmDelete(),onCancel:b.cancel})}),pe(Ss,{trigger:pe(bs,{variant:Cs.OUTLINE,icon:i?pe(ys,{src:i.photoURL??void 0,fallback:x(),alt:C(),style:{margin:"-4px 0"}}):gs,display:t,"aria-label":s("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&p&&i?k():o?void 0:s("auth.userMenu",{defaultValue:"User menu"}),className:r,style:a,children:C()}),items:w,contentAlign:"end"})]}):null};import{jsx as V}from"react/jsx-runtime";var Sn=()=>null,Ks=Cn(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Sn}}}),bn=Cn(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Sn}}}),lo=({display:e=_s.AUTO,className:t,style:o})=>{let{t:n}=Hs("dndev"),{shouldHide:r,isLoading:a,isReady:s,isAuthenticated:d}=St(),l=$s(),u=Ws(),[c,i]=Os(!1),g=l.loginPath,p=n("auth.signIn",{defaultValue:"Sign In"}),m=n("auth.loading",{defaultValue:"Loading..."}),h=u.includes("password")||u.includes("emailLink");if(r||!s)return null;let v=({children:S,...b})=>V(zs,{variant:Vs.OUTLINE,icon:Ms,display:e,tooltip:p,className:t,style:o,...b,children:S??p});if(!d){if(g!==void 0)return V(A,{path:g,prefetch:!0,children:V(v,{})});let S=u[0];return h?V(Gs,{trigger:V(v,{}),title:p,open:c,onOpenChange:i,"data-content-size":"form",children:V(so,{fallback:V("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:V(bn,{spacing:"medium",onSuccess:()=>i(!1)})})}):u.length>1?V(Us,{trigger:V(v,{}),children:V(so,{fallback:V("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:V(bn,{spacing:"tight"})})}):V(so,{fallback:V(v,{disabled:a,tooltip:a?m:p,children:a?m:p}),children:V(Ks,{partnerId:S,display:e,className:t,style:o})})}return V(io,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as Ys}from"lucide-react";import{cn as qs}from"@donotdev/components";import{jsx as xn,jsxs as Js}from"react/jsx-runtime";var js=({className:e})=>Js("div",{className:qs("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[xn(Ys,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),xn("span",{className:"dndev-sr-only",children:"Loading..."})]}),Zs=js;import{AlertCircle as Qs,RefreshCw as Xs,Mail as el,Cookie as tl}from"lucide-react";import{Card as ol,Button as co,BUTTON_VARIANT as uo,Stack as Tn}from"@donotdev/components";import{useTranslation as nl}from"@donotdev/core";import{jsx as Je,jsxs as kt}from"react/jsx-runtime";function rl({featureName:e,title:t,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:s="support@example.com",onRetry:d,onReviewCookies:l,customActions:u,className:c=""}){let{t:i}=nl("ui"),g=o||i("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),p=()=>{if(l)l();else{let h=new CustomEvent("openCookieConsent");window.dispatchEvent(h)}},m=()=>{window.location.href=`mailto:${s}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return kt(ol,{className:c,title:kt(Tn,{direction:"row",align:"center",gap:"tight",children:[Je(Qs,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",kt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||u)&&kt(Tn,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&Je(co,{variant:uo.OUTLINE,onClick:p,icon:tl,children:i("featureDisabled.reviewCookies","Review Cookies")}),r&&Je(co,{variant:uo.OUTLINE,onClick:m,icon:el,children:i("featureDisabled.contactSupport","Contact Support")}),a&&Je(co,{variant:uo.OUTLINE,onClick:d,icon:Xs,children:i("featureDisabled.retry","Retry")}),u]}),Je("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var al=rl;ye();import{cn as il}from"@donotdev/components";import{jsx as oe,jsxs as fl}from"react/jsx-runtime";var ae=({state:e="loading",message:t,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let d=t||(u=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[u]||"Loading...")(e),l={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return fl("div",{className:il(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":d,children:[r&&oe("div",{style:{...l[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),oe("span",{style:{fontWeight:500},children:d})]})},sl=({message:e="Loading...",...t})=>oe(ae,{state:"loading",message:e,...t}),ll=({message:e="Processing your request...",...t})=>oe(ae,{state:"processing",message:e,...t}),cl=({message:e="Almost there...",...t})=>oe(ae,{state:"almost-done",message:e,...t}),dl=({message:e="Complete!",...t})=>oe(ae,{state:"complete",message:e,...t}),ul=({showSpinner:e=!0,...t})=>oe(ae,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),pl=({showSpinner:e=!0,fileName:t,...o})=>oe(ae,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),ml=({showSpinner:e=!0,query:t,...o})=>oe(ae,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),gl=({showSpinner:e=!0,...t})=>oe(ae,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),wt=ae;import{cn as hl}from"@donotdev/components";import{Fragment as kn,jsx as me,jsxs as wn}from"react/jsx-runtime";var vl=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:s=!0,spinnerSize:d="lg",preventClicks:l=!0,zIndex:u="var(--z-modal)"})=>{if(!e)return null;let c=u==="var(--z-modal)"||!u?"dndev-z-modal":u==="var(--z-toast)"?"dndev-z-toast":u==="var(--z-tooltip)"?"dndev-z-tooltip":u==="var(--z-overlay)"?"dndev-z-overlay":null;return me("div",{className:hl("dndev-loading-overlay",c,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:l?"auto":"none",...c?{}:{zIndex:u}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:me("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||wn(kn,{children:[s&&me("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:d==="sm"?"2rem":d==="md"?"3rem":"4rem",height:d==="sm"?"2rem":d==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&me(wt,{...a})]})})})};var yl=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:n,...r})=>me("div",{className:n,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:me("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||wn(kn,{children:[me("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&me(wt,{...r.message})]})})}),bl=vl;import{cn as Cl}from"@donotdev/components";import{jsx as In}from"react/jsx-runtime";var Sl=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:In("div",{className:Cl(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:In("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),xl=Sl;import{Lock as It,Shield as Nn}from"lucide-react";import{useEffect as po,useRef as An,useCallback as Tl}from"react";import{Portal as kl,Spinner as wl,Stack as Il,Text as Qe,Button as Nl}from"@donotdev/components";import{useTranslation as Al,useOverlay as ie}from"@donotdev/core";import{jsx as ne,jsxs as Ln}from"react/jsx-runtime";var Pn={connecting:0,preparing:2e3,redirecting:5e3},Pl=1e4;function Ll(e,t){return t==="none"?null:t==="shield"?Nn:t==="lock"?It:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?It:e.startsWith("oauth-")||e.startsWith("auth-")?Nn:It:It}function El(e){return e||"default"}function Dl(){let{t:e}=Al("dndev"),t=ie("isRedirectOverlayOpen"),o=ie("redirectOperation"),n=ie("redirectPhase"),r=ie("showCancelButton"),a=ie("redirectConfig"),s=ie("redirectStartTime"),d=ie("setRedirectPhase"),l=ie("setShowCancelButton"),u=ie("hideRedirectOverlay"),c=An([]),i=An(null),g=Tl(()=>{u()},[u]);if(po(()=>{if(!t||!s)return;let x=a?.cancelTimeout??Pl,k=Date.now()-s;c.current.forEach(clearTimeout),c.current=[],i.current&&(clearTimeout(i.current),i.current=null);let w=(D,I)=>{let y=Math.max(0,I-k);if(y>0){let f=setTimeout(()=>{d(D)},y);c.current.push(f)}else d(D)};w("preparing",Pn.preparing),w("redirecting",Pn.redirecting);let P=Math.max(0,x-k);return i.current=setTimeout(()=>{l(!0),d("timeout")},P),()=>{c.current.forEach(clearTimeout),c.current=[],i.current&&(clearTimeout(i.current),i.current=null)}},[t,s,a?.cancelTimeout,d,l]),po(()=>{if(!t)return;let x=()=>{u()};return window.addEventListener("popstate",x),()=>window.removeEventListener("popstate",x)},[t,u]),po(()=>{if(!t)return;let x=()=>{};return document.addEventListener("visibilitychange",x),()=>document.removeEventListener("visibilitychange",x)},[t]),!t)return null;let p=El(o),m=a?.title??e(`redirectOverlay.${p}.title`,{defaultValue:e("redirectOverlay.default.title")}),h=a?.message??e(`redirectOverlay.${p}.message`,{defaultValue:e("redirectOverlay.default.message")}),v=a?.subtitle??e(`redirectOverlay.${p}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),S=e(`redirectOverlay.${p}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),b=e(`redirectOverlay.phases.${n}`),C=Ll(o,a?.icon);return ne(kl,{children:ne("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":S,style:{zIndex:"var(--z-overlay, 9999)"},children:Ln("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[Ln(Il,{direction:"row",align:"center",children:[C&&ne(C,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),ne(wl,{variant:"primary"})]}),ne(Qe,{as:"h3",style:{color:"var(--foreground)",margin:0},children:m}),ne(Qe,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:b}),ne(Qe,{variant:"muted",level:"small",style:{opacity:.8},children:h}),ne(Qe,{variant:"muted",level:"small",style:{opacity:.6},children:v}),ne(Qe,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),r&&ne(Nl,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as mo,useState as En}from"react";import{cn as Rl}from"@donotdev/components";import{jsx as Dn}from"react/jsx-runtime";var Fl=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[s,d]=En(0),[l,u]=En(!1);mo(()=>{if(!e||!o||t!==void 0)return;u(!0),d(0);let i=Date.now(),g=setInterval(()=>{let p=Date.now()-i,m=Math.min(p/n*90,90);d(m)},16);return()=>{clearInterval(g)}},[e,o,t,n]),mo(()=>{t!==void 0&&u(t>0&&t<100)},[t]),mo(()=>{if(!e){let i=setTimeout(()=>{u(!1),d(0)},300);return()=>clearTimeout(i)}},[e]);let c=t??s;return!a||!l?null:Dn("div",{className:Rl(r),style:{position:"fixed",left:0,right:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(c),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:Dn("div",{style:{height:"100%",width:`${c}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},Bl=Fl;import{cn as Nt,Stack as Ml}from"@donotdev/components";import{jsx as Xe,jsxs as Uf}from"react/jsx-runtime";var Ol=({variant:e="text",width:t,height:o,lines:n=1,show:r=!0,className:a,animation:s="pulse",style:d})=>{if(!r)return null;let l={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:s==="pulse"||s==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...s==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},u=()=>{let c={};return t&&(c.width=typeof t=="number"?`${t}px`:t),o&&(c.height=typeof o=="number"?`${o}px`:o),c};return e==="text"?Xe(Ml,{gap:"tight",children:Array.from({length:n}).map((c,i)=>Xe("div",{className:Nt("dndev-skeleton",a),style:{...l,height:"var(--gap-md)",width:i===n-1?"75%":"100%",...u(),...d}},i))}):e==="circular"?Xe("div",{className:Nt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...u(),...d}}):e==="rectangular"?Xe("div",{className:Nt("dndev-skeleton",a),style:{...l,width:t||"100%",height:o||"200px",...u(),...d}}):Xe("div",{className:Nt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...u(),...d}})};var zl=Ol;import{Card as Vl,IconBox as Ul,Stack as Gl,Text as go,renderCardContent as _l}from"@donotdev/components";import{jsx as re,jsxs as Rn}from"react/jsx-runtime";var Hl=({icon:e,title:t,subtitle:o,content:n,href:r,variant:a,elevated:s,onClick:d,className:l,footer:u,style:c,...i})=>{let g=_l(n),h=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${u?" auto":""}`,v={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},S={...v,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},b={...v,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},C=e?Rn(Gl,{direction:"row",align:"center",style:{width:"100%"},children:[re(Ul,{icon:e}),re(go,{as:"div",level:"h3",style:S,children:t})]}):re(go,{as:"div",level:"h3",style:S,children:t}),x=re(Vl,{variant:a,elevated:s,onClick:d,className:l,"data-clickable":r||d?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...c},...i,children:Rn("div",{style:{display:"grid",gridTemplateRows:h,gap:"var(--gap-md)",width:"100%"},children:[re("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:C}),re("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:re(go,{as:"div",level:"body",style:b,children:o})}),re("div",{children:g}),u&&re("div",{children:u})]})});return r&&!d?re(A,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:x}):x},$l=Hl;import{useState as tc}from"react";import{Bento as oc,Card as nc,Section as rc,Stack as ac,Text as ic,cn as sc}from"@donotdev/components";var Wl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',Kl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',Yl='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',ql='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',jl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',Zl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',Jl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',Ql='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',Xl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',ec='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',fo={bun:{svg:`data:image/svg+xml,${encodeURIComponent(ec)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(Wl)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(Kl)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(Yl)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(ql)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(jl)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(Zl)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Jl)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Ql)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(Xl)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as ge,jsxs as uc}from"react/jsx-runtime";function lc({techKey:e,variant:t}){let o=fo[e],[n,r]=tc(!1);if(!o)return null;let a=o.svg.replace("data:image/svg+xml,",""),s=decodeURIComponent(a);return ge(nc,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:uc(ac,{direction:"column",align:"center",gap:"tight",children:[ge("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:s}}),ge(ic,{as:"span",level:"small",children:o.name})]})})}function cc({title:e,techs:t,cols:o=3,columns:n,gap:r="medium",separator:a=!1,className:s}){let d=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),l=i=>{if(i==="long")return{cols:2,rows:1};if(i==="high")return{cols:1,rows:2};if(i==="huge")return{cols:2,rows:2}},u=t.filter(i=>fo[i.name]).map(i=>({id:i.name,content:ge(lc,{techKey:i.name,variant:i.variant}),span:l(i.size)})),c=ge(oc,{items:u,columns:d,gap:r,className:s,ariaLabel:"Technology stack"});return e?ge(rc,{title:e,separator:a,className:"dndev-tech-bento",children:ge("div",{className:"dndev-tech-bento-grid",children:c})}):ge("div",{className:sc("dndev-tech-bento",s),children:c})}var dc=cc;import{Suspense as pc,lazy as mc}from"react";import{useConsent as Fn}from"@donotdev/core";import{jsx as Bn}from"react/jsx-runtime";var gc=mc(()=>Promise.resolve().then(()=>($t(),Ht)));function m2(){let e=Fn("hasConsented"),t=Fn("showBanner");return e&&!t?null:Bn(pc,{fallback:null,children:Bn(gc,{})})}import{Button as Mn,ScrollArea as fc}from"@donotdev/components";import{cn as On}from"@donotdev/components";import{jsx as se,jsxs as hc}from"react/jsx-runtime";function y2({content:e,cta:t,align:o="center",justify:n="center",disableScrollArea:r=!1,contentVariant:a="narrow",contentClassName:s,ctaClassName:d}){let u=a==="narrow"?a==="narrow"&&se("div",{className:"dndev-game-container__content-narrow",children:e}):e,c=r?se("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:u}):se(fc,{className:"dndev-game-container__scroll",children:u});return hc("div",{className:"dndev-game-container",children:[se("div",{className:On("dndev-game-container__content",s),"data-align":o,"data-justify":n,"data-content-variant":a,children:se("div",{className:"dndev-game-container__scroll-wrapper",children:c})}),t&&se("div",{className:On("dndev-game-container__cta",d),children:Array.isArray(t)?se("div",{className:"dndev-game-container__cta-buttons",children:t.map((i,g)=>se(Mn,{onClick:i.onClick,disabled:i.disabled??!1,variant:i.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:i.label},g))}):se(Mn,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as vc,Suspense as yc,lazy as bc}from"react";import{jsx as ho}from"react/jsx-runtime";var zn=new Set,Vn=new Map;function Cc(e,t){let o=Vn.get(e);if(o)return o;let n=t[e];if(!n)return null;let r=bc(n);return Vn.set(e,r),r}function x2({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:n=null}){vc(()=>{if(o&&!zn.has(o)){zn.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let r=t?Cc(t,e):null;return!t||!r?null:ho("div",{style:{height:"100%"},children:ho(yc,{fallback:n,children:ho(r,{})})})}import{cn as Sc,DISPLAY as vo}from"@donotdev/components";import{useAppConfig as Un}from"@donotdev/core";import{jsx as At,jsxs as kc}from"react/jsx-runtime";var xc=({display:e=vo.AUTO,linkToHome:t=!0,className:o})=>{let n=Un("name"),a=Un("shortName")||n||"App",s=K.getLogoSvgContent(),d=K.resolveLogo(),l=e===vo.FULL||e===vo.AUTO,u=s?At("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:s}}):K.assetExists(d)?At("img",{src:d,alt:a,className:"app-branding-logo"}):null,c=l&&At("span",{className:"app-branding-title","data-display":e,children:a}),i=kc("div",{className:Sc("app-branding",o),"data-display":e,children:[u,c]});return t?At(A,{path:"/",className:"app-branding-link",children:i}):i},Tc=xc;import{cn as Gn}from"@donotdev/components";import{useAppConfig as _n}from"@donotdev/core";import{jsx as $n}from"react/jsx-runtime";var Hn={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},wc=({alt:e,size:t="header",className:o})=>{let n=e||_n("name")||_n("shortName")||"App",r=K.getLogoSvgContent(),a=K.resolveLogo(),s=typeof t=="string"&&t in Hn?Hn[t]:typeof t=="string"?{}:{width:t,height:t};return r?$n("div",{className:Gn("app-icon-header",o),style:{display:"inline-flex",...s},role:"img","aria-label":n,dangerouslySetInnerHTML:{__html:r}}):$n("img",{src:a,alt:n,className:Gn(o),style:{objectFit:"contain",...s}})},Ic=wc;import{cn as Wn}from"@donotdev/components";import{useAppConfig as Kn,useBreakpoint as Nc}from"@donotdev/core";import{jsx as Yn}from"react/jsx-runtime";var Ac=({title:e,className:t,linkToHome:o=!0})=>{let n=Nc("isMobileOrTablet"),r=Kn("name"),a=Kn("shortName"),s=e||n&&a||r||"App",d=Yn("div",{className:Wn("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:s});return o?Yn(A,{path:"/",className:Wn("dndev-inline-block",t),children:d}):d},Pc=Ac;import{ChevronRight as Bc}from"lucide-react";import{useMemo as Mc}from"react";import{cn as Oc}from"@donotdev/components";import{useTranslation as zc}from"@donotdev/core";import{useLocation as Vc}from"@donotdev/ui/routing/hooks";import{useMemo as qn}from"react";import{useNavigationStore as H2,getRoutes as Lc,getRouteManifest as $2}from"@donotdev/core";function Ec(){return qn(()=>{try{let e=Lc();return!e||e.length===0?[]:Dc(e)}catch{return[]}},[])}function jn(){let e=Ec();return qn(()=>e.flatMap(t=>t.routes),[e])}function Dc(e){let t=new Map;return e.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||Rc(n)||"other",a={path:n,label:o.meta?.title||Fc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(r)||t.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),t.get(r)?.routes.push(a)}),Array.from(t.values())}function Rc(e){return e.split("/").filter(Boolean)[0]||null}function Fc(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as et,jsxs as _c}from"react/jsx-runtime";var Uc=({items:e,separator:t=Bc,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:s}=zc("dndev"),d=Vc(),l=jn(),u=Mc(()=>new Set(l.map(g=>g.path)),[l]),c=e||(()=>{let g=d.pathname.split("/").filter(Boolean),p=[],m="";return g.forEach(h=>{m+=`/${h}`;let v=h.split("-").map(b=>b.charAt(0).toUpperCase()+b.slice(1)).join(" "),S=u.has(m)?m:void 0;p.push({label:v,href:S})}),p})(),i=o?[{label:s("navigation.home","Home"),href:n},...c]:c;return r==="smart"&&d.pathname.split("/").filter(Boolean).length<2?null:et("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Oc("breadcrumbs",a),children:i.map((g,p)=>{let h=p===i.length-1||!g.href;return _c("span",{className:"breadcrumb-item",children:[p>0&&et(t,{className:"dndev-size-md separator"}),g.icon&&et(g.icon,{className:"dndev-size-md icon"}),g.href&&!h?et(A,{path:g.href,className:"breadcrumb-link",children:g.label}):et("span",{className:"breadcrumb-label",children:g.label})]},p)})})},Gc=Uc;import{useTranslation as Hc,maybeTranslate as Zn,useLayout as yo,useAppConfig as $c}from"@donotdev/core";import{jsx as Oe,jsxs as Kc}from"react/jsx-runtime";var Wc=({asLink:e=!1,className:t})=>{let o=$c("app"),n=yo("gameTitle"),r=yo("gameSubtitle"),a=yo("gameNamespace"),{t:s}=Hc(a||"dndev"),d=Zn(s,n??void 0),l=Zn(s,r??void 0),u=o?.name||"Game";if(d)return Oe("div",{className:t,children:Kc("div",{style:{textAlign:"center"},children:[Oe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d}),l&&Oe("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l})]})});let c=Oe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u});return e?Oe(A,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:i=>i.currentTarget.style.color="var(--primary)",onMouseLeave:i=>i.currentTarget.style.color="var(--foreground)",children:u}):Oe("div",{className:t,children:c})};import{Trash2 as Yc}from"lucide-react";import{useState as Jn}from"react";import{Button as qc,BUTTON_VARIANT as jc,Checkbox as Zc,Stack as bo,useToast as Jc}from"@donotdev/components";import{useTranslation as Qc}from"@donotdev/core";import{useRefresh as Xc}from"@donotdev/ui/routing/hooks";import{jsx as Pt,jsxs as Qn}from"react/jsx-runtime";function ed(){let{t:e}=Qc("dndev"),{toast:t}=Jc(),[o,n]=Jn(!1),r=Xc(),[a,s]=Jn({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),d=async()=>{try{n(!0);let l=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),l.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),l.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let c=await indexedDB.databases();await Promise.all(c.map(async i=>{if(i.name){let g=indexedDB.deleteDatabase(i.name);await new Promise((p,m)=>{g.onsuccess=()=>p(void 0),g.onerror=()=>m(g.error)})}}))}l.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let c=globalThis.openDatabase("","","","");c&&c.transaction&&c.transaction(i=>{i.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,p)=>{for(let m=0;m<p.rows.length;m++){let h=p.rows.item(m).name;g.executeSql(`DROP TABLE IF EXISTS ${h}`)}})}),l.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let c=await caches.keys();await Promise.all(c.map(async i=>{try{await caches.delete(i)}catch{}})),l.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let c=await navigator.serviceWorker.getRegistrations();await Promise.all(c.map(async i=>{try{await i.unregister()}catch{}})),l.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(c=>{let i=c.indexOf("="),g=i>-1?c.substr(0,i):c;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),l.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),l.push("Memory Cache")}catch{}let u=l.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:l.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",u),l.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return Qn(bo,{children:[Pt(bo,{children:Object.entries(a).map(([l,u])=>Qn(bo,{direction:"row",align:"center",gap:"tight",children:[Pt(Zc,{id:l,checked:u,onCheckedChange:c=>s(i=>({...i,[l]:!!c}))}),Pt("label",{htmlFor:l,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${l}`,l.charAt(0).toUpperCase()+l.slice(1))})]},l))}),Pt(qc,{variant:jc.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:d,icon:Yc,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var Co=ed;import{DropdownMenu as rd,Button as So,Stack as er}from"@donotdev/components";import{Link as td}from"lucide-react";import{navigationMenuTriggerStylePrimitive as od}from"@donotdev/components";ye();import{jsx as Xn,jsxs as nd}from"react/jsx-runtime";var ze=({route:e,showIcons:t=!0})=>{let o=t&&!!e.icon,n=!!e.label;return nd(A,{path:e.path,className:od(),...o&&!n&&{"data-display":"compact"},children:[t&&Xn($,{icon:e.icon,fallback:td}),Xn("span",{children:e.label})]})};import{jsx as Z}from"react/jsx-runtime";var ad=({navigation:e,className:t})=>Z(er,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,n)=>o.routes&&o.routes.length>0?Z(rd,{trigger:Z(So,{icon:o.icon,children:o.label}),items:o.routes.map(r=>{let a=r.path?r.external?Z("a",{href:r.path,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:Z(ze,{route:r})}):Z(A,{path:r.path,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:Z(ze,{route:r})}):Z(er,{direction:"row",align:"center",style:{gap:"var(--gap-sm)",width:"100%"},children:Z(ze,{route:r})});return{label:r.label,children:a,asChild:!!r.path}}),contentAlign:"start"},o.label+n):o.path?Z(So,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>Z(A,{path:o.path,...a,children:r}),children:o.label},o.label+n):Z(So,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),id=ad;import{Card as sd,cn as ld}from"@donotdev/components";import{jsx as xo}from"react/jsx-runtime";var cd=({languages:e,currentLanguage:t,onLanguageChange:o,className:n})=>xo(sd,{className:ld("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",right:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:xo("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:e.map(r=>xo("option",{value:r,children:r},r))})}),dd=cd;import{MoreHorizontal as ud}from"lucide-react";import{Button as pd,BUTTON_VARIANT as md,DropdownMenu as gd}from"@donotdev/components";import{jsx as tr}from"react/jsx-runtime";var fd=({children:e,className:t})=>tr(gd,{trigger:tr(pd,{variant:md.GHOST,icon:ud,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),hd=fd;import{MoreHorizontal as vd}from"lucide-react";import{DISPLAY as tt,DropdownMenu as yd,Button as bd}from"@donotdev/components";import{cn as Cd}from"@donotdev/components";import{useBreakpoint as or,useTranslation as Sd}from"@donotdev/core";Re();import{jsx as Lt}from"react/jsx-runtime";var xd=({className:e="",showIcons:t=!0,display:o=tt.AUTO})=>{let{t:n}=Sd("dndev"),r=or("isMobile"),a=or("isTablet"),s=te();return(o===tt.AUTO?r||a?tt.COMPACT:tt.FULL:o)===tt.COMPACT?Lt(yd,{trigger:Lt(bd,{variant:"ghost",icon:vd,"aria-label":n("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:s.map(l=>({label:l.label,children:Lt(ze,{route:l,showIcons:t}),asChild:!0}))}):Lt(un,{overflowDetection:!0,showIcons:t,className:Cd(e),style:{flex:1}})},Td=xd;import{Bell as kd}from"lucide-react";import{useMemo as wd,useEffect as Id,useRef as Nd}from"react";import{Button as Ad,cn as Pd,toast as Ld,Stack as Ed}from"@donotdev/components";import{jsx as To}from"react/jsx-runtime";var Dd={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},Rd=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:n,onMarkAllRead:r,onDropdownOpen:a,className:s,maxVisible:d=10,alwaysShow:l=!1,size:u="md",disabled:c=!1})=>{let i=Dd[u],g=Nd(new Set),p=wd(()=>t===0?null:t>99?"99+":t.toString(),[t]),m=t>0||l;return Id(()=>{e.forEach(h=>{if(!g.current.has(h.id)){g.current.add(h.id);let v=h.type==="error"?"error":h.type==="warning"?"warning":h.type==="success"?"success":"info";Ld({title:h.title,description:h.message,toastType:v,duration:0,onDismiss:()=>{g.current.delete(h.id),n&&n(h)}})}})},[e,n]),m?To("div",{className:Pd(s),style:{position:"relative"},children:To(Ad,{disabled:c,style:{...i.button,position:"relative"},onFocus:h=>{h.currentTarget.style.outline="2px solid var(--ring)",h.currentTarget.style.outlineOffset="2px"},onBlur:h=>{h.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:kd,children:p&&To(Ed,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",right:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...i.badge},"aria-hidden":"true",children:p})})}):null},Fd=Rd;import{Settings as Bd,Check as Md}from"lucide-react";import*as Et from"lucide-react";import{Button as Od,BUTTON_VARIANT as zd,DropdownMenu as Vd,Stack as Ud,DISPLAY as Gd}from"@donotdev/components";import{useTranslation as _d}from"@donotdev/core";import{useLanguageSelector as Hd,useTheme as ko,Flag as $d}from"@donotdev/core";import{jsx as fe,jsxs as Yd}from"react/jsx-runtime";function Wd({variant:e=zd.OUTLINE}={}){let{t}=_d("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=Hd(),s=ko("availableThemes"),d=ko("currentTheme"),l=ko("setTheme"),u=p=>{if(!p)return Et.Palette;let m=p.replace(/['"]/g,"");return Et[m]||Et.Palette},c=s.map(p=>{let m=u(p.meta?.icon),h=p.name===d;return{label:p.displayName||p.name,icon:m,onClick:()=>l(p.name),checked:h}}),i=o.map(p=>{let m=p.id===n;return{label:p.name,onClick:()=>r(p.id),disabled:a,checked:m,className:m?"bg-accent":void 0,iconEnd:m&&!a?Md:void 0,children:Yd(Ud,{direction:"row",align:"center",gap:"tight",children:[fe($d,{code:p.flagCode||p.id,title:`${p.name} flag`}),fe("span",{children:p.name}),a&&m&&fe("div",{style:{marginInlineStart:"auto"},children:fe("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:fe(lo,{display:Gd.COMPACT})},{label:t("settings.theme","Theme"),subItems:c},{label:t("settings.language","Language"),subItems:i},{label:t("settings.clearCache.title","Clear Cache"),subContent:fe(Co,{})}];return fe(Vd,{trigger:fe(Od,{variant:e,"aria-label":t("settings.title","Settings"),icon:Bd}),items:g,contentWidth:"14rem",contentAlign:"end"})}var Kd=Wd;import*as Dt from"lucide-react";import{Button as nr,BUTTON_VARIANT as qd,DropdownMenu as jd,DISPLAY as Zd}from"@donotdev/components";import{useTranslation as Jd}from"@donotdev/core";import{useTheme as wo}from"@donotdev/core";import{jsx as No}from"react/jsx-runtime";var Io=e=>{if(!e)return Dt.Palette;let t=e.replace(/['"]/g,"");return Dt[t]||Dt.Palette},Qd=({display:e=Zd.AUTO,"no-tooltip":t=!1})=>{let{t:o}=Jd("dndev"),n=wo("availableThemes"),r=wo("currentTheme"),a=wo("setTheme");if(n.length<=1)return null;let s=n.find(S=>S.name===r)||n[0],d=n.length===2?n.find(S=>S.name!==s?.name)||n[0]:null,l=s?Io(s.meta?.icon):null,u=d?Io(d.meta?.icon):null,c=s?.displayName||s?.name||"Theme",i=d?.displayName||d?.name||"Theme",g=n.length===2&&d&&u,p=g?u:l,m=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:d?.displayName||d?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),h={variant:qd.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:m,icon:p,display:e};if(g&&d)return No(nr,{...h,onClick:()=>a(d.name),children:i});if(!s||!l)return null;let v=n.map(S=>{let b=Io(S.meta?.icon),C=S.name===r;return{label:S.displayName||S.name,icon:b,onClick:()=>a(S.name),checked:C}});return No(jd,{trigger:No(nr,{...h,children:c}),items:v,contentWidth:"10rem"})},Xd=Qd;import{useEffect as tu}from"react";import{checkLicense as ou}from"@donotdev/core";var eu='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',rr=`data:image/svg+xml,${encodeURIComponent(eu)}`;import{jsx as Ao,jsxs as ar}from"react/jsx-runtime";function Th(){let e=ou();return tu(()=>{e.isValid},[e.isValid]),e.isValid?null:ar("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",right:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[Ao("img",{src:rr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),ar("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[Ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),Ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}import{useEffect as nu,useState as Po,useMemo as ru}from"react";import{Stack as Lo,Spinner as au}from"@donotdev/components";import{useTranslation as ir,isFieldVisible as iu}from"@donotdev/core";import{useCrud as su,DisplayFieldRenderer as lu}from"@donotdev/crud";import{jsx as Te,jsxs as du}from"react/jsx-runtime";function cu({entity:e,id:t,t:o,className:n="",backend:r="functions",loadingMessage:a,notFoundMessage:s,viewerRole:d="guest"}){let{get:l,loading:u,data:c,error:i,isAvailable:g}=su(e,{backend:r}),[p,m]=Po(!1),[h,v]=Po(null),[S,b]=Po(null),{t:C}=ir([e.namespace,"crud"]),{t:x}=ir("crud"),k=o||C;nu(()=>{if(!t){b(null),v(null),m(!1);return}if(!g||!l)return;let y=!1;return m(!0),v(null),l(t).then(f=>{y||(m(!1),f?(b(f),v(null)):(b(null),v(new Error("Entity not found"))))}).catch(f=>{y||(m(!1),v(f instanceof Error?f:new Error(String(f))),b(null))}),()=>{y=!0}},[t,l,g]);let w=c||S,P=i||h,D=u||p||!t,I=ru(()=>w?Object.entries(e.fields).filter(([y,f])=>{if(!iu(f.visibility,d)||f.visibility==="hidden")return!1;let T=w[y];return!(T==null||typeof T=="string"&&T.trim()===""||Array.isArray(T)&&T.length===0||typeof T=="object"&&!Array.isArray(T)&&T!==null&&Object.keys(T).length===0)}):[],[e.fields,d,w]);return D?Te("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:n,children:Te(au,{overlay:!0,"aria-label":a||x("form.loading",{defaultValue:"Loading..."})})}):P||!w?Te(Lo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:n,children:du(Lo,{direction:"column",gap:"tight",children:[Te("h3",{style:{color:"var(--muted-foreground)"},children:s||x("errors.notFound",{defaultValue:`${e.name} not found`})}),P&&Te("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:P instanceof Error?P.message:String(P)})]})}):Te(Lo,{direction:"column",className:n,children:I.map(([y,f])=>Te(lu,{name:y,config:f,value:w[y],t:k},y))})}import{RefreshCw as uu,Plus as pu,Trash2 as mu,Edit as gu,Search as fu}from"lucide-react";import{useMemo as sr,useCallback as ot,useState as Eo}from"react";import{DataTable as hu,Button as Do,Stack as Ro,ActionButton as vu,Section as lr,Input as yu}from"@donotdev/components";import{useTranslation as cr}from"@donotdev/core";import{translateFieldLabel as bu,useCrud as Cu,useCrudList as Su,EntityFilters as xu,matchesFilter as Tu,formatValue as ku,useCrudFilters as wu}from"@donotdev/crud";import{Fragment as Nu,jsx as le,jsxs as Rt}from"react/jsx-runtime";function Iu({entity:e,userRole:t="guest",basePath:o,onClick:n,hideFilters:r=!1,pagination:a="client",pageSize:s,queryOptions:d,exportable:l=!0}){let u=Be(),c=o??`/${e.collection}`,[i,g]=Eo(1),[p,m]=Eo(s),{data:h,loading:v,mutate:S}=Su(e,{pagination:a,...d&&{queryOptions:d},...a==="server"&&{page:i,pageSize:p}}),{delete:b}=Cu(e),{t:C}=cr("crud"),x=h?.items||[],{t:k}=cr([e.namespace,"crud"]),{filters:w}=wu({collection:e.collection}),[P,D]=Eo(""),I=ot(async()=>{await S()},[S]),y=ot(L=>{u(`${c}/${L}`)},[c,u]),f=ot(L=>{n?n(L):u(`${c}/${L}`)},[c,u,n]),T=ot(()=>{u(`${c}/new`)},[c,u]),N=ot(async L=>{await b(L)},[b]),R=sr(()=>{let L=x;if(P){let ee=P.toLowerCase();L=L.filter(j=>Object.values(j).some(M=>M==null?!1:String(M).toLowerCase().includes(ee)))}return Object.keys(w).length>0&&(L=L.filter(ee=>Object.entries(w).every(([j,M])=>{let ve=ee[j],at=e.fields[j]?.type||"text";return Tu(ve,M,at)}))),L},[x,P,w,e.fields]),W=sr(()=>{let ee=(e.listFields||Object.keys(e.fields)).map(j=>{let M=e.fields[j];if(!M)return null;let ve=bu(j,M,k),Ue=M.type||"text";return{key:j,title:ve,dataIndex:j,sortable:!0,filterable:!0,align:Ue==="number"||Ue==="range"?"end":"start",render:(ke,we)=>ku(ke,M,k,{compact:!0})}}).filter(Boolean);return ee.unshift({key:"_actions",title:C("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(j,M)=>Rt(Ro,{direction:"row",gap:"tight",align:"center",justify:"center",children:[le(Do,{variant:"outline",icon:gu,onClick:ve=>{ve.stopPropagation(),y(M.id)},"aria-label":C("edit",{defaultValue:"Edit"})}),le(vu,{action:async()=>{await N(M.id)},confirmText:C("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:C("delete.title",{defaultValue:"Delete Item"}),loadingText:C("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:mu,"aria-label":C("delete",{defaultValue:"Delete"}),children:C("delete",{defaultValue:"Delete"})})]})}),ee},[e,k,C,y,N]),X=k("name",{defaultValue:e.name}),Y=R.length;return Rt(Nu,{children:[le(lr,{title:C("filters.title",{entity:X,defaultValue:`Browse ${X} - Filters`}),collapsible:!0,defaultOpen:!0,children:Rt(Ro,{children:[Rt(Ro,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[le(yu,{placeholder:C("search.placeholder",{defaultValue:"Search..."}),value:P,onChange:L=>D(L.target.value),icon:fu,className:"dndev-w-full"}),le(Do,{icon:uu,variant:"outline",onClick:I,disabled:v,display:"compact","aria-label":C("refresh",{defaultValue:"Refresh"})}),le(Do,{icon:pu,onClick:T,display:"compact",children:C("addNew",{defaultValue:"Add New"})})]}),!r&&le(xu,{entity:e,data:x,fieldsToFilter:e.listFields})]})}),le(lr,{title:v?C("results.title.fetching",{defaultValue:"Fetching..."}):C("results.title.count",{count:Y,defaultValue:Y===1?"Found 1 occurrence":`Found ${Y} occurrences`}),collapsible:!0,defaultOpen:!0,children:le(hu,{data:R,columns:W,sortable:!0,searchable:!1,pagination:!0,loading:v,onRowClick:L=>f(L.id),showingLabel:C("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:C("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:C("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:C("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...s&&{pageSize:s},...a==="server"&&{currentPage:i,pageSize:p,total:h?.total,onPageChange:g,onPageSizeChange:m},exportable:l,exportFilename:`${e.collection}-export`,exportLabel:C("export",{defaultValue:"Export"})})})]})}import{useMemo as Ft,useCallback as dr}from"react";import{Heart as ur}from"lucide-react";import{Grid as Au,Card as Pu,Stack as nt,Text as Bt,Spinner as Lu,Section as pr,Button as Eu}from"@donotdev/components";import{useTranslation as mr}from"@donotdev/core";import{translateFieldLabel as Du,useCrudCardList as Ru,EntityFilters as Fu,useEntityFavorites as Bu,matchesFilter as Mu,formatValue as Ou,useCrudFilters as gr}from"@donotdev/crud";import{Fragment as Vu,jsx as H,jsxs as Ve}from"react/jsx-runtime";function zu({entity:e,basePath:t,onClick:o,cols:n=[1,2,3,4],staleTime:r=1e3*60*30,filter:a,hideFilters:s=!1}){let d=Be(),l=t??`/${e.collection}`,{data:u,loading:c}=Ru(e,{staleTime:r}),i=u?.items||[],{isFavorite:g,toggleFavorite:p,favoritesFilter:m}=Bu({collection:e.collection}),{showFavoritesOnly:h,setShowFavoritesOnly:v}=gr({collection:e.collection}),{filters:S}=gr({collection:e.collection}),b=dr(f=>Object.keys(S).length===0?!0:Object.entries(S).every(([T,N])=>{let R=f[T],X=e.fields[T]?.type||"text";return Mu(R,N,X)}),[S,e.fields]),C=Ft(()=>{let f=i;return f=f.filter(b),h&&(f=f.filter(m)),a&&(f=f.filter(a)),f},[i,b,h,m,a]),{t:x}=mr([e.namespace,"crud"]),{t:k}=mr("crud"),w=dr(f=>{o?o(f):d(`${l}/${f}`)},[l,d,o]),P=Ft(()=>{let f=e.listCardFields??e.listFields;return f&&f.length>0?f:Object.keys(e.fields).slice(0,4)},[e.listCardFields,e.listFields,e.fields]),D=Ft(()=>{let f=P.filter(N=>{let R=e.fields[N];return R?.type==="image"||R?.type==="images"});return f.length>0?f[0]:Object.keys(e.fields).filter(N=>{let R=e.fields[N];return R?.type==="image"||R?.type==="images"})[0]||null},[P,e.fields]),I=Ft(()=>P.filter(f=>f!==D),[P,D]),y=x("name",{defaultValue:e.name});return Ve(Vu,{children:[!s&&H(pr,{title:k("filters.title",{entity:y,defaultValue:`Browse ${y} - Filters`}),collapsible:!0,defaultOpen:!0,children:Ve(nt,{direction:"column",children:[H(Eu,{variant:h?"primary":"outline",icon:H(ur,{size:18}),onClick:()=>v(!h),children:h?k("favorites.showAll",{defaultValue:"Show All"}):k("favorites.showFavorites",{defaultValue:"Show Favorites"})}),H(Fu,{entity:e,data:i,fieldsToFilter:e.listCardFields})]})}),H(pr,{title:c?k("results.title.fetching",{defaultValue:"Fetching..."}):k("results.title.count",{count:C.length,defaultValue:C.length===1?"Found 1 occurrence":`Found ${C.length} occurrences`}),collapsible:!0,defaultOpen:!0,children:c?H(nt,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:H(Lu,{})}):C.length===0?Ve(nt,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[H(Bt,{level:"h3",style:{color:"var(--muted-foreground)"},children:k("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),H(Bt,{style:{color:"var(--muted-foreground)"},children:k("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):H(Au,{cols:n,children:C.map(f=>{let T=D?f[D]:null,N=typeof T=="string"?T:null,R=I[0],W=R?f[R]:f.id,X=g(f.id);return Ve(Pu,{title:String(W||""),clickable:!0,onClick:()=>w(f.id),elevated:!0,children:[H(ur,{fill:X?"#ef4444":"#ffffff",stroke:X?"#ef4444":"var(--muted-foreground)",onClick:Y=>{Y.stopPropagation(),p(f.id)},style:{position:"absolute",top:"var(--gap-sm)",right:"var(--gap-sm)",zIndex:10,cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":X?k("favorites.remove",{defaultValue:"Remove from favorites"}):k("favorites.add",{defaultValue:"Add to favorites"})}),Ve(nt,{direction:"column",children:[N&&H("div",{style:{width:"100%",aspectRatio:"16/9",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--muted)",position:"relative"},children:H("img",{src:N,alt:String(W||""),style:{width:"100%",height:"100%",objectFit:"cover"}})}),H(nt,{direction:"column",gap:"tight",children:I.slice(1,4).map(Y=>{let L=e.fields[Y];return L?Ve("div",{children:[H(Bt,{level:"small",variant:"muted",children:Du(Y,L,x)}),H(Bt,{children:Ou(f[Y],L,x,{compact:!0})})]},Y):null})})]})]},f.id)})})})]})}import{useEffect as fr,useId as Uu,useMemo as rt,useState as Gu}from"react";import{FormProvider as _u}from"react-hook-form";import{Badge as Hu,Button as Mt,DropdownMenu as $u,Grid as Wu,Stack as Ku,Spinner as Yu}from"@donotdev/components";import{hasRoleAccess as qu,useTranslation as hr}from"@donotdev/core";import{DisplayFieldRenderer as ju,FormFieldRenderer as Zu,UploadProvider as Ju,useEntityForm as Qu,useUnsavedChangesWarning as Xu,useConfirmNavigation as ep,useFormStore as tp}from"@donotdev/crud";import{jsx as J,jsxs as Ot}from"react/jsx-runtime";function op({entity:e,onSubmit:t,t:o,className:n="",submitText:r,loading:a=!1,defaultValues:s,submitVariant:d="primary",secondaryButtonText:l,secondaryButtonVariant:u="outline",onSecondarySubmit:c,viewerRole:i,operation:g=s?"edit":"create",autoSave:p=g==="create",formId:m,cancelText:h,cancelPath:v,successPath:S,onCancel:b,warnOnUnsavedChanges:C=!0,unsavedChangesMessage:x,hideVisibilityInfo:k=!1}){let w=Be(),P=Uu(),D=m??`entity-form-${e.name}-${P}`,{t:I}=hr([e.namespace,"crud"]),{t:y}=hr("crud"),f=o||I,N=!k&&(i==="admin"||i==="super"),R=i==="user"||i==="admin"||i==="super",[W,X]=Gu(i==="admin"||i==="super"||i==="user"?i:"guest"),Y={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},L=["guest","user","admin","super"],ee={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},j=rt(()=>L.filter(E=>qu(i,E)).map(E=>({label:ee[E],checked:W===E,onClick:()=>X(E)})),[W,i]),M=Qu(e,{formId:D,operation:g,defaultValues:s,viewerRole:i,t:f,autoSave:p}),{control:ve,handleSubmit:Ue,formState:{errors:at},fields:it,formStatus:ke,uploadProgress:we,cleanup:Fo,isDirty:Sr,hasUserInteracted:xr,resetForm:Tr}=M,Ge=Sr&&xr,kr=rt(()=>{if(!R)return it;let E=L.indexOf(W);return it.filter(({config:U})=>{let Ie=U.visibility;return Ie==="hidden"?!1:Ie==="technical"?!0:L.indexOf(Ie)<=E})},[it,R,W]);fr(()=>{D&&tp.getState().setIsDirty(D,Ge)},[D,Ge]),fr(()=>Fo,[Fo]);let wr=rt(()=>x||y("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[x,y]),Ir=rt(()=>x||y("messages.unsavedChangesDiscard",{defaultValue:"You have unsaved changes. Discard them?"}),[x,y]);Xu({isDirty:Ge,enabled:C,message:wr});let Nr=ep(Ge,Ir),Ar=async()=>{Ge&&!await Nr()||(Tr(),b?b():w(v||"back"))},Pr=E=>{t(E),w(S||"back")},Lr=h!==null,Bo=h??y("form.cancel",{defaultValue:"Cancel"}),Mo={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},Er=a||g==="edit"&&!s,ce=rt(()=>ke==="uploading"?{loading:!0,loadingText:we<100?y("form.uploading",{progress:Math.round(we),defaultValue:`Uploading ${Math.round(we)}%...`}):y("form.processing",{defaultValue:"Processing..."}),progress:we}:ke==="validating"?{loading:!0,loadingText:y("form.validating",{defaultValue:"Validating..."})}:ke==="submitting"?{loading:!0,loadingText:y("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[ke,we,y]);return J(_u,{...M,children:J(Ju,{formId:D,children:Ot("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Er&&J(Yu,{overlay:!0}),Ot("form",{onSubmit:Ue(Pr),noValidate:!0,className:n,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[kr.map(({name:E,config:U,editable:Ie})=>{let Ne=N&&U.visibility!=="guest",Dr=U.visibility!=="hidden"?Y[U.visibility]:void 0,Rr=ee[U.visibility]??U.visibility,Oo=Ie?J(Zu,{name:E,config:U,control:ve,errors:at,t:f},E):J(ju,{name:E,config:U,value:s?.[E],t:f},E);return Ne?Ot("div",{style:{position:"relative"},children:[J(Hu,{as:"span",variant:Dr,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:Rr}),Oo]},E):Oo}),(()=>{let E=[];if(Lr&&Bo&&E.push(J(Mt,{type:"button",onClick:Ar,disabled:ce.loading,variant:"outline",className:"dndev-w-full",children:Bo},"cancel")),R){let Ne=Y[W]||"muted";E.push(J($u,{trigger:Ot(Mt,{type:"button",variant:Ne,disabled:ce.loading,className:"dndev-w-full",children:[y("visibility.preview",{defaultValue:"Preview"}),": ",ee[W]]}),items:j},"preview"))}l&&E.push(J(Mt,{type:"button",onClick:()=>{if(c){let Ne=M.getValues();c(Ne)}},loading:ce.loading,loadingText:ce.loadingText,progress:ce.progress,variant:u,className:"dndev-w-full",children:l},"secondary")),E.push(J(Mt,{type:"submit",loading:ce.loading,loadingText:ce.loadingText,progress:ce.progress,variant:d,className:"dndev-w-full",children:r||y("form.submit",{defaultValue:"Submit"})},"submit"));let U=E.length;return U===1?J(Ku,{direction:"column",gap:"tight",style:Mo,children:E[0]}):J(Wu,{cols:[1,U,U,U],templateColumns:U===2?"1fr 2fr":U===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr",gap:"tight",style:Mo,children:E})})()]})]})})})}import{createContext as yr,useId as np,use as vr}from"react";import{Controller as rp,FormProvider as ap,useFormContext as ip}from"react-hook-form";import{Label as sp,Slot as lp,cn as cp,Stack as dp}from"@donotdev/components";import{jsx as he}from"react/jsx-runtime";var av=ap,br=yr({}),iv=({...e})=>he(br.Provider,{value:{name:e.name},children:he(rp,{...e})}),Cr=yr({}),sv=({className:e,...t})=>{let o=np();return he(Cr.Provider,{value:{id:o},children:he(dp,{className:e,...t})})},zt=()=>{let e=vr(br);if(!e||!e.name)return null;let t=vr(Cr);if(!t)return null;let{getFieldState:o,formState:n}=ip(),r=o(e.name,n),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},lv=({className:e,...t})=>{let o=zt();if(!o)return null;let{error:n,formItemId:r}=o;return he(sp,{className:cp(n&&"text-destructive",e),htmlFor:r,...t})},cv=({...e})=>{let t=zt();if(!t)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=t;return he(lp,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...e})},dv=({className:e,...t})=>{let o=zt();if(!o)return null;let{formDescriptionId:n}=o;return he("p",{id:n,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},uv=({className:e,children:t,...o})=>{let n=zt();if(!n)return null;let{error:r,formMessageId:a}=n,s=r?String(r?.message):t;return s?he("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:s}):null};var up={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},pp={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},Cv={...up,...pp},Sv={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},xv={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{Tc as AppBranding,Ic as AppIcon,Zs as AppLoading,Pc as AppTitle,K as AssetResolver,fa as AuthGuard,Fm as AuthGuardFallback,lo as AuthHeader,io as AuthMenu,Gc as Breadcrumbs,Co as CacheSettings,m2 as ConsentBanner,un as DnDevNavigationMenu,id as DropdownNavigation,zu as EntityCardList,cu as EntityDisplayRenderer,op as EntityFormRenderer,Iu as EntityList,$l as FeatureCard,al as FeatureDisabled,dd as FloatingLanguageSwitcher,av as Form,cv as FormControl,dv as FormDescription,iv as FormField,sv as FormItem,lv as FormLabel,uv as FormMessage,y2 as GameContainer,x2 as GameFlow,Wc as GameTitle,Um as GoTo,Bi as GoToInput,Ni as GoToWrapper,hd as HeaderMenu,Td as HeaderNavigation,Or as Icon,Th as LicenseWatermark,A as Link,ct as Loader,yl as LoadingContainerOverlay,wt as LoadingMessage,cl as LoadingMessageAlmostDone,dl as LoadingMessageComplete,gl as LoadingMessageConnecting,ll as LoadingMessageProcessing,ul as LoadingMessageSaving,ml as LoadingMessageSearching,sl as LoadingMessageSimple,pl as LoadingMessageUploading,bl as LoadingOverlay,xl as LoadingScreen,pn as NotFoundPage,Fd as Notifications,ht as PageContainer,Bl as ProgressBar,Dl as RedirectOverlay,Kd as SettingsMenu,zl as Skeleton,dc as TechBento,Xd as ThemeToggle,Cv as allLayoutClasses,mg as checkFormNavigationSafe,om as createAuthConfig,xv as cssVariables,Fp as isAuthAvailable,bg as isBillingAvailable,ug as isFormStoreAvailable,Ng as isOAuthAvailable,up as layoutClasses,pp as layoutUtilities,Sv as layoutVariables,lg as resolveFaviconSet,sg as resolveLogo,Dg as tList,fo as techLogos,F as useAuthSafe,em as useAuthState,St as useAuthVisibility,q1 as useBack,Tg as useBillingVisibility,Jp as useCanAccess,ha as useCanNavigate,zt as useFormField,to as useFormStoreSafe,Xo as useGoTo,pg as useHasDirtyFormsSafe,Xp as useHasRole,J1 as useLocation,tg as useMatch,Be as useNavigate,te as useNavigationItems,Ig as useOAuthSafe,Q1 as useParams,Z1 as usePrefetch,og as useQueryParams,ng as useRedirectGuard,j1 as useRefresh,X1 as useRouteParam,eg as useSearchParams,no as useStripeBillingSafe,Qp as useUserRole,tm as withAuth};
3
+ `);try{await navigator.clipboard.writeText(v),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},m=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},h=()=>{try{p()}catch{typeof window<"u"&&window.history.back()}};return U("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:U(Jo,{variant:Qo.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:ye(Le,{gap:"large",align:"center",className:"dndev-text-center",children:[U(Le,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:U(Ia,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),ye(Le,{children:[U("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),U(Ba,{variant:Ma.SUCCESS,hideIcon:!0,children:U("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&ye("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&s&&ye(Jo,{variant:Qo.MUTED,className:"dndev-w-full",children:[ye(Le,{direction:"row",align:"center",justify:"between",children:[U("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),U(pt,{variant:ut.GHOST,icon:a?Ra:La,onClick:u,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),U("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:s})]}),ye(Le,{className:"dndev-w-full",children:[U(pt,{variant:ut.DESTRUCTIVE,icon:Pa,onClick:m,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),ye(Le,{direction:"row",justify:"center",children:[U(I,{path:"/",children:U(pt,{variant:ut.DEFAULT,icon:Aa,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),U(pt,{variant:ut.OUTLINE,icon:Ea,onClick:h,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Xo=_a;import{jsx as $e}from"react/jsx-runtime";var mt=({variant:e="standard",density:t,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>$e(jo,{level:"route",fallback:i=>$e(Ga,{fallback:$e("div",{children:"Loading error fallback..."}),children:$e(Xo,{...i})}),children:$e("div",{className:Ha("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as oi,jsx as F,jsxs as We}from"react/jsx-runtime";var ti=Ya(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function Zm({title:e,description:t,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=Qa(["auth","common"]),i=Xa(),p=ei(),l=()=>{n?n():p()};return F(mt,{variant:"docs",children:F(Re,{align:"center",justify:"center",className:Ja("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:F(qa,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:We(Re,{children:[F(Re,{justify:"center",children:F("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:F(Wa,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),F("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),F("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:We(Re,{children:[We(Re,{gap:"large",children:[F("div",{children:F("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),F(Ka,{fallback:F("div",{children:"Loading providers..."}),children:F(ti,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&We(oi,{children:[F(ja,{}),F("div",{children:F(Za,{onClick:l,className:"dndev-gap-sm",icon:$a,children:a("common.back")})})]}),We(Re,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[F("p",{children:a("auth.fallback.secure")}),F("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ni}from"lucide-react";import{Button as ri,BUTTON_VARIANT as ai,DISPLAY as ii}from"@donotdev/components";import{useOverlayStore as si,useTranslation as li}from"@donotdev/core";import{jsx as ci,jsxs as di}from"react/jsx-runtime";var t1=({display:e=ii.AUTO,className:t,onOpen:o})=>{let{t:n}=li("dndev"),r=si(l=>l.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",p=()=>{r(),o?.()};return di(ri,{variant:ai.OUTLINE,display:e,icon:ni,onClick:p,className:t,"aria-label":n("goTo.ariaLabel","Go to page"),children:[n("goTo.label","Go to"),ci("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:i})]})};import{Suspense as Ii,lazy as Ai}from"react";import{useEventListener as Ei,useOverlayStore as Pi}from"@donotdev/core";import{jsx as ln}from"react/jsx-runtime";var Li=Ai(()=>Promise.resolve().then(()=>(sn(),an))),Ri=()=>{let e=Pi(t=>t.openCommandDialog);return Ei("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),e())},{target:document,options:{passive:!1,capture:!1}}),ln(Ii,{fallback:null,children:ln(Li,{})})},Di=Ri;import{Search as Fi}from"lucide-react";import{useCallback as cn,useEffect as Bi,useState as Mi,useRef as Oi}from"react";import{Stack as zi}from"@donotdev/components";import{useOverlayStore as dn}from"@donotdev/core";import{useTranslation as Vi}from"@donotdev/core";import{jsx as ft,jsxs as Hi}from"react/jsx-runtime";var Ui=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),_i=()=>{let{t:e}=Vi("dndev"),[t,o]=Mi(""),n=Oi(null),r=dn(l=>l.openCommandDialog),a=dn(l=>l.isCommandDialogOpen);Bi(()=>{a||o("")},[a]);let i=cn(()=>{r(t)},[r,t]),p=cn(l=>{l.key==="Enter"&&(l.preventDefault(),r(t))},[r,t]);return Hi(zi,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[ft(Fi,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),ft("input",{ref:n,type:"text",value:t,onChange:l=>o(l.target.value),onFocus:i,onKeyDown:p,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingInlineStart:"2.5rem",paddingInlineEnd:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),ft("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{insetInlineEnd:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:ft("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Ui?"\u2318K":"Ctrl+K"})})]})},Gi=_i;import{MoreHorizontal as $i,Link as pn}from"lucide-react";import{useState as Wi,useEffect as un,useRef as Ki,useMemo as Yi}from"react";import{NavigationMenu as mn,NavigationMenuListPrimitive as qi,NavigationMenuItemPrimitive as gn,Button as Zi,DropdownMenu as ji,cn as vt,DISPLAY as Ji}from"@donotdev/components";import{useTranslation as Qi}from"@donotdev/core";be();le();import{jsx as Z,jsxs as qt}from"react/jsx-runtime";var fn=({routes:e,vertical:t=!1,display:o=Ji.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:i})=>{let{t:p}=Qi("dndev"),l=W(),d=e??l,s=Ki(null),[c,g]=Wi(d.length),u=Yi(()=>d.map(m=>({label:m.label,path:m.path,icon:Z(z,{icon:m.icon,fallback:pn}),children:m.children?m.children.map(h=>({label:h.label,path:h.path,icon:Z(z,{icon:h.icon,fallback:pn})})):void 0})),[d]);if(un(()=>{if(!n||d.length===0||t)return;let m=()=>{let v=s.current;if(!v)return;let y=v.getBoundingClientRect(),b=v.querySelectorAll("[data-nav-item]"),x=v.querySelector("[data-more-button]"),w=0,N=x?.offsetWidth||0;for(let E=0;E<b.length;E++){let D=b[E];if(!D)break;if(D.getBoundingClientRect().right-y.left+(E===b.length-1&&x?N:0)<=y.width)w=E+1;else break}g(Math.max(0,w))},h=new ResizeObserver(m);return s.current&&h.observe(s.current),setTimeout(m,0),()=>h.disconnect()},[n,d.length,t]),un(()=>{n&&!t&&g(d.length)},[d.length,n,t]),d.length===0)return null;if(n&&!t){let m=u.slice(0,c),h=u.slice(c);return Z(mn,{className:vt(a),style:i||{flex:1},children:qt(qi,{ref:s,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[m.filter(v=>v.path).map((v,y)=>Z(gn,{"data-nav-item":!0,children:qt(I,{path:v.path,className:vt("dndev-interactive"),"data-role":"nav-trigger",children:[r&&v.icon,Z("span",{className:"dndev-interactive-label",children:v.label})]})},v.path||y)),h.length>0&&Z(gn,{"data-more-button":!0,children:Z(ji,{trigger:Z(Zi,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":p("navigation.more","More"),children:Z($i,{className:"dndev-size-md"})}),items:h.filter(v=>v.path).map(v=>({label:v.label,children:qt(I,{path:v.path,className:vt("dndev-interactive"),"data-role":"menu-item",children:[r&&v.icon,Z("span",{className:"dndev-interactive-label",children:v.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return Z(mn,{items:u,vertical:t,display:o,className:vt(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:I})};import{Home as Xi,ArrowLeft as es,Link as ts}from"lucide-react";import{useMemo as os}from"react";import{Button as Zt,BUTTON_VARIANT as jt,Stack as Ye,Text as Jt}from"@donotdev/components";import{useTranslation as ns}from"@donotdev/core";import{useLocation as rs,useNavigate as as}from"@donotdev/ui/routing/hooks";be();le();import{jsx as K,jsxs as ht}from"react/jsx-runtime";function vn(){let{t:e}=ns("dndev"),t=rs(),o=as(),n=W(),r=os(()=>n.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return K(mt,{variant:"docs",centered:!0,children:ht(Ye,{gap:"large",align:"center",justify:"center",children:[ht(Ye,{align:"center",children:[K(Jt,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),K(Jt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),K(Jt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&K("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:t.pathname})]}),r.length>0&&ht(Ye,{align:"center",children:[K("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),K(Ye,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(i=>K(I,{path:i.path,replace:!0,children:K(Zt,{variant:jt.OUTLINE,icon:K(z,{icon:i.icon,fallback:ts}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),ht(Ye,{direction:"row",wrap:"wrap",justify:"center",children:[K(I,{path:"/",replace:!0,children:K(Zt,{variant:jt.DEFAULT,icon:Xi,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),K(Zt,{variant:jt.OUTLINE,icon:es,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}be();Kt();import{useNavigate as Fe,useBack as cg,useRefresh as dg,usePrefetch as pg,useLocation as ug,useParams as mg,useRouteParam as gg,useSearchParams as fg,useMatch as vg,useQueryParams as hg,useRedirectGuard as yg}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Qt,isClient as Se,isDev as hn}from"@donotdev/core";var G=class{static getBrowserSupport(){if(!Se())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let n of t)o.push(...this.extractStringValues(n));else if(typeof t=="object")for(let n of Object.values(t))o.push(...this.extractStringValues(n));return o}static assetExists(t){if(!Se())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return Se()&&Qt()?.assets?.mapping||null}static getLogoSvgContent(){return Qt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(t){if(!Se())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,i=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",p={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||i,png32:a.png32||i,apple180:a.apple180||i,android192:a.android192||i,android512:a.android512||i};return this.cache.set(t,p),p}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(t,r),r}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),hn()&&Se()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:Se()?Qt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};rt(G,"cache",new Map);function xg(e){return G.resolveLogo(e)}function Tg(){return G.resolveFaviconSet()}hn()&&(G.clearCache(),Se()&&window.addEventListener("DOMContentLoaded",()=>{G.clearCache()}));import*as is from"@donotdev/crud";var yn={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:()=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},Be=is?.useFormStore,Ng=typeof Be=="function";function Xt(e){return Be?Be(e):e(yn)}Xt.getState=()=>Be&&typeof Be.getState=="function"?Be.getState():yn;function Ig(){return Xt(e=>e.hasDirtyForms())}async function Ag(e="You have unsaved changes. Discard them?"){return Xt.getState().hasDirtyForms()&&typeof window<"u"&&window.confirm?window.confirm(e):!0}ve();import{useMemo as ss}from"react";function yt(){let e=P("status"),t=P("isAvailable"),o=P("user");return ss(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ls from"@donotdev/billing";import{DEGRADED_BILLING_API as cs}from"@donotdev/core";var eo=ls?.useStripeBilling;function ds(e){return cs[e]}function to(e,t){return eo?eo(e,t):ds(e)}var Fg=typeof eo=="function";ve();function zg(){let e=P("user"),t=P("status"),o={user:e,status:t},n=to("status",o),r=to("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_OAUTH_API as ps}from"@donotdev/core";import*as us from"@donotdev/oauth";var oo=us?.useOAuth;function ms(e){return ps[e]}function _g(e){return oo?oo(e):ms(e)}var Gg=typeof oo=="function";import{CheckCircle as gs}from"lucide-react";import{List as fs}from"@donotdev/components";import{translateArray as vs}from"@donotdev/core";import{jsx as bn}from"react/jsx-runtime";var hs=gs,ys=16;function Yg(e,t,o,n=hs,r=ys){let a=n;return bn(fs,{icon:a?bn(a,{size:r}):void 0,items:vs(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var bs=/<script[\s\S]*?<\/script>/gi,Ss=/<foreignObject[\s\S]*?<\/foreignObject>/gi,Cs=/\s+on\w+\s*=\s*["'][^"']*["']/gi,xs=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,Ts=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function Me(e){return e.replace(bs,"").replace(Ss,"").replace(Cs,"").replace(xs,"").replace(Ts,"")}import{Fragment as $s,jsx as pe,jsxs as Ws}from"react/jsx-runtime";var xn=()=>null,Gs=Cn(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:xn}}}),Hs=Cn(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:xn}}}),Tn=()=>{let[e]=bt.useState(!1),[t]=bt.useState(!1),[o]=bt.useState(!1),[n]=bt.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Vs()&&import("@donotdev/auth").then(e=>{Tn=e.useDeleteAccount}).catch(e=>{});var St=e=>{if(!e)return qe;if(typeof e=="function")return e;let t=e.replace(/['"]/g,"");return As[t]||qe},no=({loginPath:e,display:t=Bs.AUTO,"no-tooltip":o=!1,customItems:n=[],className:r,style:a})=>{let{t:i}=Ms("dndev"),{shouldHide:p,isReady:l,isAuthenticated:d}=yt(),s=zs(),c=P("user"),g=P("signOut"),u=Us("isLaptop"),m=W(),h=_s(),v=s.profilePath,y=s.authMenuItems||[],b=Tn(),x=()=>c&&(c.displayName||c.email?.split("@")[0])||"User",w=()=>x().split(" ").map(f=>f.charAt(0)).slice(0,2).join("").toUpperCase(),N=()=>{if(!c)return i("auth.userMenu",{defaultValue:"User menu"});let S=[x()];return c.email&&S.push(c.email),k&&k!=="guest"&&S.push(`Role: ${k}`),S.join(`
4
+ `)},E=Es(()=>{let S=[];return!u&&c&&S.push({children:pe(Fs,{variant:"muted",as:"span",children:`${x()}${c.email?`
5
+ ${c.email}`:""}`}),disabled:!0}),v&&S.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:ws,onClick:()=>h(v)}),y.forEach(f=>{let T=m.find(j=>j.path===f.path),C=f.label||T?.label||f.path.split("/").pop()||"Menu",L=f.icon?St(f.icon):T?.icon&&(typeof T.icon=="string"||typeof T.icon=="function")?St(T.icon):qe;S.push({label:C,icon:L,onClick:()=>h(f.path)})}),n.forEach(f=>{if(f.path){let T=m.find(j=>j.path===f.path),C=f.label||T?.label||f.path.split("/").pop()||"Menu",L=f.icon?St(f.icon):qe;S.push({label:C,icon:L,onClick:()=>h(f.path),disabled:f.disabled,style:f.style})}else if(f.onClick){let T=f.icon?St(f.icon):qe;S.push({label:f.label,icon:T,onClick:f.onClick,disabled:f.disabled,style:f.style})}}),S.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Is,onClick:b.startDeleteFlow,variant:"destructive"}),S.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:ks,onClick:()=>g(),variant:"destructive"}),S},[v,y,n,g,b,i,m,u,c,x,h]);if(Os().length===0||p||!l)return null;let k=c?.role;return d?Ws($s,{children:[pe(Sn,{fallback:null,children:pe(Gs,{open:b.showPasswordDialog,isLoading:b.isDeleting,error:b.error,onReauth:S=>b.confirmDelete(S),onCancel:b.cancel})}),pe(Sn,{fallback:null,children:pe(Hs,{open:b.showConfirmDialog,isLoading:b.isDeleting,error:b.error,onConfirm:()=>b.confirmDelete(),onCancel:b.cancel})}),pe(Ds,{trigger:pe(Ls,{variant:Rs.OUTLINE,icon:c?pe(Ps,{src:c.photoURL??void 0,fallback:w(),alt:x(),style:{margin:"-4px 0"}}):Ns,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&u&&c?N():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:r,style:a,children:x()}),items:E,contentAlign:"end"})]}):null};import{jsx as O}from"react/jsx-runtime";var Nn=()=>null,ol=kn(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Nn}}}),wn=kn(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Nn}}}),ao=({display:e=Qs.AUTO,className:t,style:o})=>{let{t:n}=Xs("dndev"),{shouldHide:r,isLoading:a,isReady:i,isAuthenticated:p}=yt(),l=el(),d=tl(),[s,c]=Ys(!1),g=l.loginPath,u=n("auth.signIn",{defaultValue:"Sign In"}),m=n("auth.loading",{defaultValue:"Loading..."}),h=d.includes("password")||d.includes("emailLink");if(r||!i)return null;let v=({children:y,...b})=>O(qs,{variant:Zs.OUTLINE,icon:Ks,display:e,tooltip:u,className:t,style:o,...b,children:y??u});if(!p){if(g!==void 0)return O(I,{path:g,prefetch:!0,children:O(v,{})});let y=d[0];return h?O(Js,{trigger:O(v,{}),title:u,open:s,onOpenChange:c,"data-content-size":"form",children:O(ro,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:O(wn,{spacing:"medium",onSuccess:()=>c(!1)})})}):d.length>1?O(js,{trigger:O(v,{}),children:O(ro,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:O(wn,{spacing:"tight"})})}):O(ro,{fallback:O(v,{disabled:a,tooltip:a?m:u,children:a?m:u}),children:O(ol,{partnerId:y,display:e,className:t,style:o})})}return O(no,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as nl}from"lucide-react";import{cn as rl}from"@donotdev/components";import{jsx as In,jsxs as sl}from"react/jsx-runtime";var al=({className:e})=>sl("div",{className:rl("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[In(nl,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),In("span",{className:"dndev-sr-only",children:"Loading..."})]}),il=al;import{AlertCircle as ll,RefreshCw as cl,Mail as dl,Cookie as pl}from"lucide-react";import{Card as ul,Button as io,BUTTON_VARIANT as so,Stack as An}from"@donotdev/components";import{useTranslation as ml}from"@donotdev/core";import{jsx as Ze,jsxs as Ct}from"react/jsx-runtime";function gl({featureName:e,title:t,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:p,onReviewCookies:l,customActions:d,className:s=""}){let{t:c}=ml("ui"),g=o||c("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),u=()=>{if(l)l();else{let h=new CustomEvent("openCookieConsent");window.dispatchEvent(h)}},m=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return Ct(ul,{className:s,title:Ct(An,{direction:"row",align:"center",gap:"tight",children:[Ze(ll,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",Ct("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||d)&&Ct(An,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&Ze(io,{variant:so.OUTLINE,onClick:u,icon:pl,children:c("featureDisabled.reviewCookies","Review Cookies")}),r&&Ze(io,{variant:so.OUTLINE,onClick:m,icon:dl,children:c("featureDisabled.contactSupport","Contact Support")}),a&&Ze(io,{variant:so.OUTLINE,onClick:p,icon:cl,children:c("featureDisabled.retry","Retry")}),d]}),Ze("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:c("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var fl=gl;le();import{cn as vl}from"@donotdev/components";import{jsx as J,jsxs as kl}from"react/jsx-runtime";var oe=({state:e="loading",message:t,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let p=t||(d=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[d]||"Loading...")(e),l={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return kl("div",{className:vl(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":p,children:[r&&J("div",{style:{...l[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),J("span",{style:{fontWeight:500},children:p})]})},hl=({message:e="Loading...",...t})=>J(oe,{state:"loading",message:e,...t}),yl=({message:e="Processing your request...",...t})=>J(oe,{state:"processing",message:e,...t}),bl=({message:e="Almost there...",...t})=>J(oe,{state:"almost-done",message:e,...t}),Sl=({message:e="Complete!",...t})=>J(oe,{state:"complete",message:e,...t}),Cl=({showSpinner:e=!0,...t})=>J(oe,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),xl=({showSpinner:e=!0,fileName:t,...o})=>J(oe,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),Tl=({showSpinner:e=!0,query:t,...o})=>J(oe,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),wl=({showSpinner:e=!0,...t})=>J(oe,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),xt=oe;import{cn as Nl}from"@donotdev/components";import{Fragment as En,jsx as ue,jsxs as Pn}from"react/jsx-runtime";var Il=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:i=!0,spinnerSize:p="lg",preventClicks:l=!0,zIndex:d="var(--z-modal)"})=>{if(!e)return null;let s=d==="var(--z-modal)"||!d?"dndev-z-modal":d==="var(--z-toast)"?"dndev-z-toast":d==="var(--z-tooltip)"?"dndev-z-tooltip":d==="var(--z-overlay)"?"dndev-z-overlay":null;return ue("div",{className:Nl("dndev-loading-overlay",s,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:l?"auto":"none",...s?{}:{zIndex:d}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:ue("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||Pn(En,{children:[i&&ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:p==="sm"?"2rem":p==="md"?"3rem":"4rem",height:p==="sm"?"2rem":p==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&ue(xt,{...a})]})})})};var Al=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:n,...r})=>ue("div",{className:n,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:ue("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||Pn(En,{children:[ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&ue(xt,{...r.message})]})})}),El=Il;import{cn as Pl}from"@donotdev/components";import{jsx as Ln}from"react/jsx-runtime";var Ll=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Ln("div",{className:Pl(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:Ln("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),Rl=Ll;import{Lock as Tt,Shield as Rn}from"lucide-react";import{useEffect as lo,useRef as Dn,useCallback as Dl}from"react";import{Portal as Fl,Spinner as Bl,Stack as Ml,Text as je,Button as Ol}from"@donotdev/components";import{useTranslation as zl,useOverlay as ne}from"@donotdev/core";import{jsx as Q,jsxs as Bn}from"react/jsx-runtime";var Fn={connecting:0,preparing:2e3,redirecting:5e3},Vl=1e4;function Ul(e,t){return t==="none"?null:t==="shield"?Rn:t==="lock"?Tt:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?Tt:e.startsWith("oauth-")||e.startsWith("auth-")?Rn:Tt:Tt}function _l(e){return e||"default"}function Gl(){let{t:e}=zl("dndev"),t=ne("isRedirectOverlayOpen"),o=ne("redirectOperation"),n=ne("redirectPhase"),r=ne("showCancelButton"),a=ne("redirectConfig"),i=ne("redirectStartTime"),p=ne("setRedirectPhase"),l=ne("setShowCancelButton"),d=ne("hideRedirectOverlay"),s=Dn([]),c=Dn(null),g=Dl(()=>{d()},[d]);if(lo(()=>{if(!t||!i)return;let w=a?.cancelTimeout??Vl,N=Date.now()-i;s.current.forEach(clearTimeout),s.current=[],c.current&&(clearTimeout(c.current),c.current=null);let E=(k,S)=>{let f=Math.max(0,S-N);if(f>0){let T=setTimeout(()=>{p(k)},f);s.current.push(T)}else p(k)};E("preparing",Fn.preparing),E("redirecting",Fn.redirecting);let D=Math.max(0,w-N);return c.current=setTimeout(()=>{l(!0),p("timeout")},D),()=>{s.current.forEach(clearTimeout),s.current=[],c.current&&(clearTimeout(c.current),c.current=null)}},[t,i,a?.cancelTimeout,p,l]),lo(()=>{if(!t)return;let w=()=>{d()};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[t,d]),lo(()=>{if(!t)return;let w=()=>{};return document.addEventListener("visibilitychange",w),()=>document.removeEventListener("visibilitychange",w)},[t]),!t)return null;let u=_l(o),m=a?.title??e(`redirectOverlay.${u}.title`,{defaultValue:e("redirectOverlay.default.title")}),h=a?.message??e(`redirectOverlay.${u}.message`,{defaultValue:e("redirectOverlay.default.message")}),v=a?.subtitle??e(`redirectOverlay.${u}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),y=e(`redirectOverlay.${u}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),b=e(`redirectOverlay.phases.${n}`),x=Ul(o,a?.icon);return Q(Fl,{children:Q("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":y,style:{zIndex:"var(--z-overlay, 9999)"},children:Bn("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[Bn(Ml,{direction:"row",align:"center",children:[x&&Q(x,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),Q(Bl,{variant:"primary"})]}),Q(je,{as:"h3",style:{color:"var(--foreground)",margin:0},children:m}),Q(je,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:b}),Q(je,{variant:"muted",level:"small",style:{opacity:.8},children:h}),Q(je,{variant:"muted",level:"small",style:{opacity:.6},children:v}),Q(je,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),r&&Q(Ol,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as co,useState as Mn}from"react";import{cn as Hl}from"@donotdev/components";import{jsx as On}from"react/jsx-runtime";var $l=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[i,p]=Mn(0),[l,d]=Mn(!1);co(()=>{if(!e||!o||t!==void 0)return;d(!0),p(0);let c=Date.now(),g=setInterval(()=>{let u=Date.now()-c,m=Math.min(u/n*90,90);p(m)},16);return()=>{clearInterval(g)}},[e,o,t,n]),co(()=>{t!==void 0&&d(t>0&&t<100)},[t]),co(()=>{if(!e){let c=setTimeout(()=>{d(!1),p(0)},300);return()=>clearTimeout(c)}},[e]);let s=t??i;return!a||!l?null:On("div",{className:Hl(r),style:{position:"fixed",insetInlineStart:0,insetInlineEnd:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(s),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:On("div",{style:{height:"100%",width:`${s}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},Wl=$l;import{cn as wt,Stack as Kl}from"@donotdev/components";import{jsx as Je,jsxs as o2}from"react/jsx-runtime";var Yl=({variant:e="text",width:t,height:o,lines:n=1,show:r=!0,className:a,animation:i="pulse",style:p})=>{if(!r)return null;let l={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:i==="pulse"||i==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...i==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},d=()=>{let s={};return t&&(s.width=typeof t=="number"?`${t}px`:t),o&&(s.height=typeof o=="number"?`${o}px`:o),s};return e==="text"?Je(Kl,{gap:"tight",children:Array.from({length:n}).map((s,c)=>Je("div",{className:wt("dndev-skeleton",a),style:{...l,height:"var(--gap-md)",width:c===n-1?"75%":"100%",...d(),...p}},c))}):e==="circular"?Je("div",{className:wt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...d(),...p}}):e==="rectangular"?Je("div",{className:wt("dndev-skeleton",a),style:{...l,width:t||"100%",height:o||"200px",...d(),...p}}):Je("div",{className:wt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...d(),...p}})};var ql=Yl;import{Card as Zl,IconBox as jl,Stack as Jl,Text as po,renderCardContent as Ql}from"@donotdev/components";import{jsx as X,jsxs as zn}from"react/jsx-runtime";var Xl=({icon:e,title:t,subtitle:o,content:n,href:r,variant:a,elevated:i,onClick:p,className:l,footer:d,style:s,clickable:c,...g})=>{let u=Ql(n),v=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${d?" auto":""}`,y={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},b={...y,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},x={...y,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},w=e?zn(Jl,{direction:"row",align:"center",style:{width:"100%"},children:[X(jl,{icon:e}),X(po,{as:"div",level:"h3",style:b,children:t})]}):X(po,{as:"div",level:"h3",style:b,children:t}),N=X(Zl,{variant:a,elevated:i,onClick:p,className:l,"data-clickable":r||p||c?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...s},...g,children:zn("div",{style:{display:"grid",gridTemplateRows:v,gap:"var(--gap-md)",width:"100%"},children:[X("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:w}),X("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:X(po,{as:"div",level:"body",style:x,children:o})}),X("div",{children:u}),d&&X("div",{children:d})]})});return r&&!p?X(I,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:N}):N},ec=Xl;import{useState as pc}from"react";import{Bento as uc,Card as mc,Section as gc,Stack as fc,Text as vc,TONE as hc,cn as yc}from"@donotdev/components";var tc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',oc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',nc='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',rc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',ac='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',ic='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',sc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',lc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',cc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',dc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',uo={bun:{svg:`data:image/svg+xml,${encodeURIComponent(dc)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(tc)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(oc)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(nc)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(rc)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(ac)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(ic)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(sc)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(lc)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(cc)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as Ce,jsxs as xc}from"react/jsx-runtime";function bc({techKey:e,variant:t}){let o=uo[e],[n,r]=pc(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=Me(a);return Ce(mc,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:xc(fc,{direction:"column",align:"center",gap:"tight",children:[Ce("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),Ce(vc,{as:"span",level:"small",children:o.name})]})})}function Sc({title:e,techs:t,cols:o=3,columns:n,gap:r="medium",separator:a=!1,tone:i=hc.GHOST,align:p,collapsible:l,open:d,onOpenChange:s,defaultOpen:c,className:g}){let u=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),m=y=>{if(y==="long")return{cols:2,rows:1};if(y==="high")return{cols:1,rows:2};if(y==="huge")return{cols:2,rows:2}},h=t.filter(y=>uo[y.name]).map(y=>({id:y.name,content:Ce(bc,{techKey:y.name,variant:y.variant}),span:m(y.size)})),v=Ce(uc,{items:h,columns:u,gap:r,ariaLabel:"Technology stack"});return Ce(gc,{title:e,separator:a,tone:i,align:p,collapsible:l,open:d,onOpenChange:s,defaultOpen:c,className:yc("dndev-tech-bento",g),children:Ce("div",{className:"dndev-tech-bento-grid",children:v})})}var Cc=Sc;import{Suspense as Tc,lazy as wc}from"react";import{useConsent as Vn}from"@donotdev/core";import{jsx as Un}from"react/jsx-runtime";var kc=wc(()=>Promise.resolve().then(()=>(Gt(),_t)));function P2(){let e=Vn("hasConsented"),t=Vn("showBanner");return e&&!t?null:Un(Tc,{fallback:null,children:Un(kc,{})})}import{Button as _n,ScrollArea as Nc}from"@donotdev/components";import{cn as Gn}from"@donotdev/components";import{jsx as re,jsxs as Ic}from"react/jsx-runtime";function B2({content:e,cta:t,align:o="center",justify:n="center",disableScrollArea:r=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:p}){let d=a==="narrow"?a==="narrow"&&re("div",{className:"dndev-game-container__content-narrow",children:e}):e,s=r?re("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:d}):re(Nc,{className:"dndev-game-container__scroll",children:d});return Ic("div",{className:"dndev-game-container",children:[re("div",{className:Gn("dndev-game-container__content",i),"data-align":o,"data-justify":n,"data-content-variant":a,children:re("div",{className:"dndev-game-container__scroll-wrapper",children:s})}),t&&re("div",{className:Gn("dndev-game-container__cta",p),children:Array.isArray(t)?re("div",{className:"dndev-game-container__cta-buttons",children:t.map((c,g)=>re(_n,{onClick:c.onClick,disabled:c.disabled??!1,variant:c.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:c.label},g))}):re(_n,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as Ac,Suspense as Ec,lazy as Pc}from"react";import{jsx as mo}from"react/jsx-runtime";var Hn=new Set,$n=new Map;function Lc(e,t){let o=$n.get(e);if(o)return o;let n=t[e];if(!n)return null;let r=Pc(n);return $n.set(e,r),r}function V2({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:n=null}){Ac(()=>{if(o&&!Hn.has(o)){Hn.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let r=t?Lc(t,e):null;return!t||!r?null:mo("div",{style:{height:"100%"},children:mo(Ec,{fallback:n,children:mo(r,{})})})}import{cn as Rc,DISPLAY as go}from"@donotdev/components";import{useAppConfig as Wn}from"@donotdev/core";import{jsx as kt,jsxs as Bc}from"react/jsx-runtime";var Dc=({display:e=go.AUTO,linkToHome:t=!0,className:o})=>{let n=Wn("name"),a=Wn("shortName")||n||"App",i=G.getLogoSvgContent(),p=G.resolveLogo(),l=e===go.FULL||e===go.AUTO,d=i?kt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Me(i)}}):G.assetExists(p)?kt("img",{src:p,alt:a,className:"app-branding-logo"}):null,s=l&&kt("span",{className:"app-branding-title","data-display":e,children:a}),c=Bc("div",{className:Rc("app-branding",o),"data-display":e,children:[d,s]});return t?kt(I,{path:"/",className:"app-branding-link",children:c}):c},Fc=Dc;import{cn as Kn}from"@donotdev/components";import{useAppConfig as Yn}from"@donotdev/core";import{jsx as Zn}from"react/jsx-runtime";var qn={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},Mc=({alt:e,size:t="header",className:o})=>{let n=Yn("name"),r=Yn("shortName"),a=e||n||r||"App",i=G.getLogoSvgContent(),p=G.resolveLogo(),l=typeof t=="string"&&t in qn?qn[t]:typeof t=="string"?{}:{width:t,height:t};return i?Zn("div",{className:Kn("app-icon-header",o),style:{display:"inline-flex",...l},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Me(i)}}):Zn("img",{src:p,alt:a,className:Kn(o),style:{objectFit:"contain",...l}})},Oc=Mc;import{cn as jn}from"@donotdev/components";import{useAppConfig as Jn,useBreakpoint as zc}from"@donotdev/core";import{jsx as Qn}from"react/jsx-runtime";var Vc=({title:e,className:t,linkToHome:o=!0})=>{let n=zc("isMobileOrTablet"),r=Jn("name"),a=Jn("shortName"),i=e||n&&a||r||"App",p=Qn("div",{className:jn("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?Qn(I,{path:"/",className:jn("dndev-inline-block",t),children:p}):p},Uc=Vc;import{ChevronRight as Kc}from"lucide-react";import{useMemo as Yc}from"react";import{cn as qc}from"@donotdev/components";import{useTranslation as Zc}from"@donotdev/core";import{useLocation as jc}from"@donotdev/ui/routing/hooks";import{useMemo as Xn}from"react";import{useNavigationStore as l0,getRoutes as _c,getRouteManifest as c0}from"@donotdev/core";function Gc(){return Xn(()=>{try{let e=_c();return!e||e.length===0?[]:Hc(e)}catch{return[]}},[])}function er(){let e=Gc();return Xn(()=>e.flatMap(t=>t.routes),[e])}function Hc(e){let t=new Map;return e.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||$c(n)||"other",a={path:n,label:o.meta?.title||Wc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(r)||t.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),t.get(r)?.routes.push(a)}),Array.from(t.values())}function $c(e){return e.split("/").filter(Boolean)[0]||null}function Wc(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as Qe,jsxs as Xc}from"react/jsx-runtime";var Jc=({items:e,separator:t=Kc,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:i}=Zc("dndev"),p=jc(),l=er(),d=Yc(()=>new Set(l.map(g=>g.path)),[l]),s=e||(()=>{let g=p.pathname.split("/").filter(Boolean),u=[],m="";return g.forEach(h=>{m+=`/${h}`;let v=h.split("-").map(b=>b.charAt(0).toUpperCase()+b.slice(1)).join(" "),y=d.has(m)?m:void 0;u.push({label:v,href:y})}),u})(),c=o?[{label:i("navigation.home","Home"),href:n},...s]:s;return r==="smart"&&p.pathname.split("/").filter(Boolean).length<2?null:Qe("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:qc("breadcrumbs",a),children:c.map((g,u)=>{let h=u===c.length-1||!g.href;return Xc("span",{className:"breadcrumb-item",children:[u>0&&Qe(t,{className:"dndev-size-md separator"}),g.icon&&Qe(g.icon,{className:"dndev-size-md icon"}),g.href&&!h?Qe(I,{path:g.href,className:"breadcrumb-link",children:g.label}):Qe("span",{className:"breadcrumb-label",children:g.label})]},u)})})},Qc=Jc;import{useTranslation as ed,maybeTranslate as tr,useLayout as fo,useAppConfig as td}from"@donotdev/core";import{jsx as Oe,jsxs as nd}from"react/jsx-runtime";var od=({asLink:e=!1,className:t})=>{let o=td("app"),n=fo("gameTitle"),r=fo("gameSubtitle"),a=fo("gameNamespace"),{t:i}=ed(a||"dndev"),p=tr(i,n??void 0),l=tr(i,r??void 0),d=o?.name||"Game";if(p)return Oe("div",{className:t,children:nd("div",{style:{textAlign:"center"},children:[Oe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),l&&Oe("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l})]})});let s=Oe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return e?Oe(I,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:c=>c.currentTarget.style.color="var(--primary)",onMouseLeave:c=>c.currentTarget.style.color="var(--foreground)",children:d}):Oe("div",{className:t,children:s})};import{Trash2 as rd}from"lucide-react";import{useState as or}from"react";import{Button as ad,BUTTON_VARIANT as id,Checkbox as sd,Stack as vo,useToast as ld}from"@donotdev/components";import{useTranslation as cd}from"@donotdev/core";import{useRefresh as dd}from"@donotdev/ui/routing/hooks";import{jsx as Nt,jsxs as nr}from"react/jsx-runtime";function pd(){let{t:e}=cd("dndev"),{toast:t}=ld(),[o,n]=or(!1),r=dd(),[a,i]=or({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),p=async()=>{try{n(!0);let l=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),l.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),l.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let s=await indexedDB.databases();await Promise.all(s.map(async c=>{if(c.name){let g=indexedDB.deleteDatabase(c.name);await new Promise((u,m)=>{g.onsuccess=()=>u(void 0),g.onerror=()=>m(g.error)})}}))}l.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let s=globalThis.openDatabase("","","","");s&&s.transaction&&s.transaction(c=>{c.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,u)=>{for(let m=0;m<u.rows.length;m++){let h=u.rows.item(m).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(h)&&g.executeSql(`DROP TABLE IF EXISTS ${h}`)}})}),l.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let s=await caches.keys();await Promise.all(s.map(async c=>{try{await caches.delete(c)}catch{}})),l.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let s=await navigator.serviceWorker.getRegistrations();await Promise.all(s.map(async c=>{try{await c.unregister()}catch{}})),l.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(s=>{let c=s.indexOf("="),g=c>-1?s.substr(0,c):s;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),l.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),l.push("Memory Cache")}catch{}let d=l.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:l.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",d),l.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return nr(vo,{children:[Nt(vo,{children:Object.entries(a).map(([l,d])=>nr(vo,{direction:"row",align:"center",gap:"tight",children:[Nt(sd,{id:l,checked:d,onCheckedChange:s=>i(c=>({...c,[l]:!!s}))}),Nt("label",{htmlFor:l,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${l}`,l.charAt(0).toUpperCase()+l.slice(1))})]},l))}),Nt(ad,{variant:id.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:p,icon:rd,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var ho=pd;import{DropdownMenu as fd,Button as yo,Stack as vd}from"@donotdev/components";import{Link as ud}from"lucide-react";import{navigationMenuTriggerStylePrimitive as md}from"@donotdev/components";le();be();import{jsx as rr,jsxs as gd}from"react/jsx-runtime";var It=({path:e,route:t,showIcons:o=!0})=>{let n=W(),r=t??n.find(p=>p.path===e);if(!r)return null;let a=o&&!!r.icon,i=!!r.label;return gd(I,{path:r.path,className:md(),...a&&!i&&{"data-display":"compact"},children:[o&&rr(z,{icon:r.icon,fallback:ud}),rr("span",{children:r.label})]})};import{jsx as xe}from"react/jsx-runtime";var hd=({navigation:e,className:t})=>xe(vd,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,n)=>o.routes&&o.routes.length>0?xe(fd,{trigger:xe(yo,{icon:o.icon,children:o.label}),items:o.routes.map(r=>({label:r.label,children:xe(It,{route:r}),asChild:!!r.path})),contentAlign:"start"},o.label+n):o.path?xe(yo,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>xe(I,{path:o.path,...a,children:r}),children:o.label},o.label+n):xe(yo,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),yd=hd;import{Card as bd,cn as Sd}from"@donotdev/components";import{jsx as bo}from"react/jsx-runtime";var Cd=({languages:e,currentLanguage:t,onLanguageChange:o,className:n})=>bo(bd,{className:Sd("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:bo("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:e.map(r=>bo("option",{value:r,children:r},r))})}),xd=Cd;import{MoreHorizontal as Td}from"lucide-react";import{Button as wd,BUTTON_VARIANT as kd,DropdownMenu as Nd}from"@donotdev/components";import{jsx as ar}from"react/jsx-runtime";var Id=({children:e,className:t})=>ar(Nd,{trigger:ar(wd,{variant:kd.GHOST,icon:Td,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),Ad=Id;import{MoreHorizontal as Ed}from"lucide-react";import{Link as Pd}from"lucide-react";import{DISPLAY as Xe,DropdownMenu as Ld,Button as ir}from"@donotdev/components";import{cn as Rd}from"@donotdev/components";import{useBreakpoint as sr,useTranslation as Dd}from"@donotdev/core";le();be();import{jsx as Te}from"react/jsx-runtime";var Fd=({className:e="",showIcons:t=!0,display:o=Xe.AUTO,path:n})=>{let{t:r}=Dd("dndev"),a=sr("isMobile"),i=sr("isTablet"),p=W(),l=tn(n??"");return n?l?Te(ir,{variant:"ghost",display:o,icon:t?Te(z,{icon:l.icon,fallback:Pd}):void 0,className:e,render:({children:s,...c})=>Te(I,{path:l.path,...c,children:s}),children:l.label}):null:(o===Xe.AUTO?a||i?Xe.COMPACT:Xe.FULL:o)===Xe.COMPACT?Te(Ld,{trigger:Te(ir,{variant:"ghost",icon:Ed,"aria-label":r("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:p.map(s=>({label:s.label,children:Te(It,{route:s,showIcons:t}),asChild:!0}))}):Te(fn,{overflowDetection:!0,showIcons:t,className:Rd(e),style:{flex:1}})},Bd=Fd;import{Bell as Md}from"lucide-react";import{useMemo as Od,useEffect as zd,useRef as Vd}from"react";import{Button as Ud,cn as _d,toast as Gd,Stack as Hd}from"@donotdev/components";import{jsx as So}from"react/jsx-runtime";var $d={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},Wd=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:n,onDropdownOpen:r,className:a,maxVisible:i=10,alwaysShow:p=!1,size:l="md",disabled:d=!1})=>{let s=$d[l],c=Vd(new Set),g=Od(()=>t===0?null:t>99?"99+":t.toString(),[t]),u=t>0||p;return zd(()=>{e.forEach(m=>{if(!c.current.has(m.id)){c.current.add(m.id);let h=m.type==="error"?"error":m.type==="warning"?"warning":m.type==="success"?"success":"info";Gd({title:m.title,description:m.message,toastType:h,duration:0,onDismiss:()=>{c.current.delete(m.id),n&&n(m)}})}})},[e,n]),u?So("div",{className:_d(a),style:{position:"relative"},children:So(Ud,{disabled:d,style:{...s.button,position:"relative"},onClick:()=>{r?.()},onFocus:m=>{m.currentTarget.style.outline="2px solid var(--ring)",m.currentTarget.style.outlineOffset="2px"},onBlur:m=>{m.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:Md,children:g&&So(Hd,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",insetInlineEnd:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...s.badge},"aria-hidden":"true",children:g})})}):null},Kd=Wd;import{Settings as Yd,Check as qd}from"lucide-react";import*as At from"lucide-react";import{Button as Zd,BUTTON_VARIANT as jd,DropdownMenu as Jd,Stack as Qd,DISPLAY as Xd}from"@donotdev/components";import{useTranslation as ep}from"@donotdev/core";import{useLanguageSelector as tp,useTheme as Co,Flag as op}from"@donotdev/core";import{jsx as me,jsxs as ap}from"react/jsx-runtime";function np({variant:e=jd.OUTLINE}={}){let{t}=ep("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=tp(),i=Co("availableThemes"),p=Co("currentTheme"),l=Co("setTheme"),d=u=>{if(!u)return At.Palette;let m=u.replace(/['"]/g,"");return At[m]||At.Palette},s=i.map(u=>{let m=d(u.meta?.icon),h=u.name===p;return{label:u.displayName||u.name,icon:m,onClick:()=>l(u.name),checked:h}}),c=o.map(u=>{let m=u.id===n;return{label:u.name,onClick:()=>r(u.id),disabled:a,checked:m,className:m?"bg-accent":void 0,iconEnd:m&&!a?qd:void 0,children:ap(Qd,{direction:"row",align:"center",gap:"tight",children:[me(op,{code:u.flagCode||u.id,title:`${u.name} flag`}),me("span",{children:u.name}),a&&m&&me("div",{style:{marginInlineStart:"auto"},children:me("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:me(ao,{display:Xd.COMPACT})},{label:t("settings.theme","Theme"),subItems:s},{label:t("settings.language","Language"),subItems:c},{label:t("settings.clearCache.title","Clear Cache"),subContent:me(ho,{})}];return me(Jd,{trigger:me(Zd,{variant:e,"aria-label":t("settings.title","Settings"),icon:Yd}),items:g,contentWidth:"14rem",contentAlign:"end"})}var rp=np;import*as Et from"lucide-react";import{Button as lr,BUTTON_VARIANT as ip,DropdownMenu as sp,DISPLAY as lp}from"@donotdev/components";import{useTranslation as cp}from"@donotdev/core";import{useTheme as xo}from"@donotdev/core";import{jsx as wo}from"react/jsx-runtime";var To=e=>{if(!e)return Et.Palette;let t=e.replace(/['"]/g,"");return Et[t]||Et.Palette},dp=({display:e=lp.AUTO,"no-tooltip":t=!1})=>{let{t:o}=cp("dndev"),n=xo("availableThemes"),r=xo("currentTheme"),a=xo("setTheme");if(n.length<=1)return null;let i=n.find(y=>y.name===r)||n[0],p=n.length===2?n.find(y=>y.name!==i?.name)||n[0]:null,l=i?To(i.meta?.icon):null,d=p?To(p.meta?.icon):null,s=i?.displayName||i?.name||"Theme",c=p?.displayName||p?.name||"Theme",g=n.length===2&&p&&d,u=g?d:l,m=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:p?.displayName||p?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),h={variant:ip.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:m,icon:u,display:e};if(g&&p)return wo(lr,{...h,onClick:()=>a(p.name),children:c});if(!i||!l)return null;let v=n.map(y=>{let b=To(y.meta?.icon),x=y.name===r;return{label:y.displayName||y.name,icon:b,onClick:()=>a(y.name),checked:x}});return wo(sp,{trigger:wo(lr,{...h,children:s}),items:v,contentWidth:"10rem"})},pp=dp;import{useEffect as mp}from"react";import{checkLicense as gp}from"@donotdev/core";var up='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',cr=`data:image/svg+xml,${encodeURIComponent(up)}`;import{jsx as ko,jsxs as dr}from"react/jsx-runtime";function Kv(){let e=gp();return mp(()=>{e.isValid},[e.isValid]),e.isValid?null:dr("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",insetInlineEnd:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[ko("img",{src:cr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),dr("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[ko("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),ko("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}ve();import{useEffect as fp,useState as No,useMemo as vp}from"react";import{Stack as Io,Spinner as hp}from"@donotdev/components";import{useTranslation as pr,isFieldVisible as yp}from"@donotdev/core";import{useCrud as bp,DisplayFieldRenderer as Sp}from"@donotdev/crud";import{jsx as we,jsxs as xp}from"react/jsx-runtime";function Cp({entity:e,id:t,t:o,className:n="",loadingMessage:r,notFoundMessage:a,viewerRole:i}){let p=P("userRole"),l=i??p,{get:d,loading:s,data:c,error:g,isAvailable:u}=bp(e),[m,h]=No(!1),[v,y]=No(null),[b,x]=No(null),{t:w}=pr([e.namespace,"crud"]),{t:N}=pr("crud"),E=o||w;fp(()=>{if(!t){x(null),y(null),h(!1);return}if(!u||!d)return;let T=!1;return h(!0),y(null),d(t).then(C=>{T||(h(!1),C?(x(C),y(null)):(x(null),y(new Error("Entity not found"))))}).catch(C=>{T||(h(!1),y(C instanceof Error?C:new Error(String(C))),x(null))}),()=>{T=!0}},[t,d,u]);let D=c||b,k=g||v,S=s||m||!t,f=vp(()=>D?Object.entries(e.fields).filter(([T,C])=>{if(!yp(C.visibility,l)||C.visibility==="hidden")return!1;let L=D[T];return!(L==null||typeof L=="string"&&L.trim()===""||Array.isArray(L)&&L.length===0||typeof L=="object"&&!Array.isArray(L)&&L!==null&&Object.keys(L).length===0)}):[],[e.fields,l,D]);return S?we("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:n,children:we(hp,{overlay:!0,"aria-label":r||N("form.loading",{defaultValue:"Loading..."})})}):k||!D?we(Io,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:n,children:xp(Io,{direction:"column",gap:"tight",children:[we("h3",{style:{color:"var(--muted-foreground)"},children:a||N("errors.notFound",{defaultValue:`${e.name} not found`})}),k&&we("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:k instanceof Error?k.message:String(k)})]})}):we(Io,{direction:"column",className:n,children:f.map(([T,C])=>we(Sp,{name:T,config:C,value:D[T],t:E},T))})}import{RefreshCw as Tp,Plus as wp,Trash2 as kp,Edit as Np,Search as Ip}from"lucide-react";import{useMemo as ur,useCallback as et,useState as Ao}from"react";import{DataTable as Ap,Button as Eo,Stack as Po,ActionButton as Ep,Section as mr,Input as Pp}from"@donotdev/components";import{useTranslation as gr}from"@donotdev/core";import{translateFieldLabel as Lp,useCrud as Rp,useCrudList as Dp,EntityFilters as Fp,matchesFilter as Bp,formatValue as Mp,useCrudFilters as Op}from"@donotdev/crud";import{Fragment as Vp,jsx as ae,jsxs as Pt}from"react/jsx-runtime";function zp({entity:e,basePath:t,onClick:o,hideFilters:n=!1,pagination:r="client",pageSize:a,queryOptions:i,exportable:p=!0}){let l=Fe(),d=t??`/${e.collection}`,[s,c]=Ao(1),[g,u]=Ao(a),{data:m,loading:h,mutate:v}=Dp(e,{pagination:r,...i&&{queryOptions:i},...r==="server"&&{page:s,pageSize:g}}),{delete:y}=Rp(e),{t:b}=gr("crud"),x=m?.items||[],{t:w}=gr([e.namespace,"crud"]),{filters:N}=Op({collection:e.collection}),[E,D]=Ao(""),k=et(async()=>{await v()},[v]),S=et(R=>{l(`${d}/${R}`)},[d,l]),f=et(R=>{o?o(R):l(`${d}/${R}`)},[d,l,o]),T=et(()=>{l(`${d}/new`)},[d,l]),C=et(async R=>{await y(R)},[y]),L=ur(()=>{let R=x;if(E){let ie=E.toLowerCase();R=R.filter(H=>Object.values(H).some(B=>B==null?!1:String(B).toLowerCase().includes(ie)))}return Object.keys(N).length>0&&(R=R.filter(ie=>Object.entries(N).every(([H,B])=>{let ee=ie[H],ke=e.fields[H]?.type||"text";return Bp(ee,B,ke)}))),R},[x,E,N,e.fields]),j=ur(()=>{let ie=(e.listFields||Object.keys(e.fields)).map(H=>{let B=e.fields[H];if(!B)return null;let ee=Lp(H,B,w),ze=B.type||"text";return{key:H,title:ee,dataIndex:H,sortable:!0,filterable:!0,align:ze==="number"||ze==="range"?"end":"start",render:(Bt,Fo)=>Mp(Bt,B,w,{compact:!0})}}).filter(Boolean);return ie.unshift({key:"_actions",title:b("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(H,B)=>Pt(Po,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ae(Eo,{variant:"outline",icon:Np,onClick:ee=>{ee.stopPropagation(),S(B.id)},"aria-label":b("edit",{defaultValue:"Edit"})}),ae(Ep,{action:async()=>{await C(B.id)},confirmText:b("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:b("delete.title",{defaultValue:"Delete Item"}),loadingText:b("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:kp,"aria-label":b("delete",{defaultValue:"Delete"}),children:b("delete",{defaultValue:"Delete"})})]})}),ie},[e,w,b,S,C]),ot=w("name",{defaultValue:e.name}),fe=L.length;return Pt(Vp,{children:[ae(mr,{title:b("filters.title",{entity:ot,defaultValue:`Browse ${ot} - Filters`}),collapsible:!0,defaultOpen:!0,children:Pt(Po,{children:[Pt(Po,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ae(Pp,{placeholder:b("search.placeholder",{defaultValue:"Search..."}),value:E,onChange:R=>D(R.target.value),icon:Ip,className:"dndev-w-full"}),ae(Eo,{icon:Tp,variant:"outline",onClick:k,disabled:h,display:"compact","aria-label":b("refresh",{defaultValue:"Refresh"})}),ae(Eo,{icon:wp,onClick:T,display:"compact",children:b("addNew",{defaultValue:"Add New"})})]}),!n&&ae(Fp,{entity:e,data:x,fieldsToFilter:e.listFields})]})}),ae(mr,{title:h?b("results.title.fetching",{defaultValue:"Fetching..."}):b("results.title.count",{count:fe,defaultValue:fe===1?"Found 1 occurrence":`Found ${fe} occurrences`}),collapsible:!0,defaultOpen:!0,children:ae(Ap,{data:L,columns:j,sortable:!0,searchable:!1,pagination:!0,loading:h,onRowClick:R=>f(R.id),showingLabel:b("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:b("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:b("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:b("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...a&&{pageSize:a},...r==="server"&&{currentPage:s,pageSize:g,total:m?.total,onPageChange:c,onPageSizeChange:u},exportable:p,exportFilename:`${e.collection}-export`,exportLabel:b("export",{defaultValue:"Export"})})})]})}import{useMemo as vr,useCallback as hr}from"react";import{Heart as yr}from"lucide-react";import{Grid as _p,Stack as Lo,Text as br,Spinner as Gp,Section as Sr,Button as Hp}from"@donotdev/components";import{useTranslation as Cr,getListCardFieldNames as $p}from"@donotdev/core";import{useCrudCardList as Wp,EntityFilters as Kp,useEntityFavorites as Yp,matchesFilter as qp,useCrudFilters as Zp}from"@donotdev/crud";import{CrudCard as Up}from"@donotdev/crud";import{jsx as fr}from"react/jsx-runtime";function Lt({detailHref:e,onClick:t,...o}){let n=fr(Up,{...o,onClick:e?void 0:t});return e?fr(I,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:n}):n}import{Fragment as Jp,jsx as Y,jsxs as Ro}from"react/jsx-runtime";function jp({entity:e,basePath:t,onClick:o,cols:n=[1,2,3,4],staleTime:r=1e3*60*30,filter:a,hideFilters:i=!1}){let p=Fe(),l=t??`/${e.collection}`,{data:d,loading:s}=Wp(e,{staleTime:r}),c=d?.items||[],{isFavorite:g,toggleFavorite:u,favoritesFilter:m}=Yp({collection:e.collection}),{showFavoritesOnly:h,setShowFavoritesOnly:v,filters:y}=Zp({collection:e.collection}),b=hr(S=>Object.keys(y).length===0?!0:Object.entries(y).every(([f,T])=>{let C=S[f],j=e.fields[f]?.type||"text";return qp(C,T,j)}),[y,e.fields]),x=vr(()=>{let S=c;return S=S.filter(b),h&&(S=S.filter(m)),a&&(S=S.filter(a)),S},[c,b,h,m,a]),{t:w}=Cr([e.namespace,"crud"]),{t:N}=Cr("crud"),E=hr(S=>{o?o(S):p(`${l}/${S}`)},[l,p,o]),D=vr(()=>$p(e),[e]),k=w("name",{defaultValue:e.name});return Ro(Jp,{children:[!i&&Y(Sr,{title:N("filters.title",{entity:k,defaultValue:`Browse ${k} - Filters`}),collapsible:!0,defaultOpen:!0,children:Ro(Lo,{direction:"column",children:[Y(Hp,{variant:h?"primary":"outline",icon:Y(yr,{size:18}),onClick:()=>v(!h),children:h?N("favorites.showAll",{defaultValue:"Show All"}):N("favorites.showFavorites",{defaultValue:"Show Favorites"})}),Y(Kp,{entity:e,data:c,fieldsToFilter:D})]})}),Y(Sr,{title:s?N("results.title.fetching",{defaultValue:"Fetching..."}):N("results.title.count",{count:x.length,defaultValue:x.length===1?"Found 1 occurrence":`Found ${x.length} occurrences`}),collapsible:!0,defaultOpen:!0,children:s?Y(Lo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:Y(Gp,{})}):x.length===0?Ro(Lo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[Y(br,{level:"h3",style:{color:"var(--muted-foreground)"},children:N("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),Y(br,{style:{color:"var(--muted-foreground)"},children:N("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):Y(_p,{cols:n,children:x.map(S=>{let f=g(S.id),T=o?void 0:`${l}/${S.id}`;return Y(Lt,{item:S,entity:e,detailHref:T,onClick:o?()=>E(S.id):void 0,renderActions:Y(yr,{fill:f?"#ef4444":"#ffffff",stroke:f?"#ef4444":"var(--muted-foreground)",onClick:C=>{C.stopPropagation(),u(S.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":f?N("favorites.remove",{defaultValue:"Remove from favorites"}):N("favorites.add",{defaultValue:"Add to favorites"})})},S.id)})})})]})}import{useEffect as xr,useId as Qp,useMemo as tt,useState as Xp}from"react";import{FormProvider as eu}from"react-hook-form";import{Badge as tu,Button as Rt,DropdownMenu as ou,Grid as nu,Stack as ru,Spinner as au}from"@donotdev/components";import{hasRoleAccess as iu,useTranslation as Tr}from"@donotdev/core";ve();import{DisplayFieldRenderer as su,FormFieldRenderer as lu,UploadProvider as cu,useEntityForm as du,useUnsavedChangesWarning as pu,useConfirmNavigation as uu,useFormStore as mu}from"@donotdev/crud";import{jsx as q,jsxs as Dt}from"react/jsx-runtime";function gu({entity:e,onSubmit:t,t:o,className:n="",submitText:r,loading:a=!1,defaultValues:i,submitVariant:p="primary",secondaryButtonText:l,secondaryButtonVariant:d="outline",onSecondarySubmit:s,viewerRole:c,operation:g=i?"edit":"create",autoSave:u=g==="create",formId:m,cancelText:h,cancelPath:v,successPath:y,onCancel:b,warnOnUnsavedChanges:x=!0,unsavedChangesMessage:w,hideVisibilityInfo:N=!1}){let E=Fe(),D=P("userRole"),k=c??D,S=Qp(),f=m??`entity-form-${e.name}-${S}`,{t:T}=Tr([e.namespace,"crud"]),{t:C}=Tr("crud"),L=o||T,ot=!N&&(k==="admin"||k==="super"),fe=k==="user"||k==="admin"||k==="super",[R,ie]=Xp(k==="admin"||k==="super"||k==="user"?k:"guest"),H={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},B=["guest","user","admin","super"],ee={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},ze=tt(()=>B.filter(A=>iu(k,A)).map(A=>({label:ee[A],checked:R===A,onClick:()=>ie(A)})),[R,k]),ke=du(e,{formId:f,operation:g,defaultValues:i,viewerRole:k,t:L,autoSave:u}),{control:Do,handleSubmit:Bt,formState:{errors:Fo},fields:Mt,formStatus:nt,uploadProgress:Ve,cleanup:Bo,isDirty:Er,hasUserInteracted:Pr,resetForm:Lr}=ke,Ue=Er&&Pr,Rr=tt(()=>{if(!fe)return Mt;let A=B.indexOf(R);return Mt.filter(({config:$})=>{let te=$.visibility;return te==="hidden"?!1:te==="technical"?!0:B.indexOf(te)<=A})},[Mt,fe,R]),Mo=mu(A=>A.setIsDirty);xr(()=>{f&&Mo(f,Ue)},[f,Ue,Mo]),xr(()=>Bo,[Bo]);let Dr=tt(()=>w||C("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[w,C]),Fr=tt(()=>w||C("messages.unsavedChangesDiscard",{defaultValue:"You have unsaved changes. Discard them?"}),[w,C]);pu({isDirty:Ue,enabled:x,message:Dr});let Br=uu(Ue,Fr),Mr=async()=>{Ue&&!await Br()||(Lr(),b?b():E(v||"back"))},Or=async A=>{try{await t(A),E(y||"back")}catch{}},zr=h!==null,Oo=h??C("form.cancel",{defaultValue:"Cancel"}),zo={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},Vr=a||g==="edit"&&!i,se=tt(()=>nt==="uploading"?{loading:!0,loadingText:Ve<100?C("form.uploading",{progress:Math.round(Ve),defaultValue:`Uploading ${Math.round(Ve)}%...`}):C("form.processing",{defaultValue:"Processing..."}),progress:Ve}:nt==="validating"?{loading:!0,loadingText:C("form.validating",{defaultValue:"Validating..."})}:nt==="submitting"?{loading:!0,loadingText:C("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[nt,Ve,C]);return q(eu,{...ke,children:q(cu,{formId:f,children:Dt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Vr&&q(au,{overlay:!0}),Dt("form",{onSubmit:Bt(Or),noValidate:!0,className:n,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Rr.map(({name:A,config:$,editable:te})=>{let Ne=ot&&$.visibility!=="guest",Ur=$.visibility!=="hidden"?H[$.visibility]:void 0,_r=ee[$.visibility]??$.visibility,Vo=te?q(lu,{name:A,config:$,control:Do,errors:Fo,t:L},A):q(su,{name:A,config:$,value:i?.[A],t:L},A);return Ne?Dt("div",{style:{position:"relative"},children:[q(tu,{as:"span",variant:Ur,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:_r}),Vo]},A):Vo}),(()=>{let A=[];if(zr&&Oo&&A.push(q(Rt,{type:"button",onClick:Mr,disabled:se.loading,variant:"outline",className:"dndev-w-full",children:Oo},"cancel")),fe){let Ne=H[R]||"muted";A.push(q(ou,{trigger:Dt(Rt,{type:"button",variant:Ne,disabled:se.loading,className:"dndev-w-full",children:[C("visibility.preview",{defaultValue:"Preview"}),": ",ee[R]]}),items:ze},"preview"))}l&&A.push(q(Rt,{type:"button",onClick:()=>{if(s){let Ne=ke.getValues();s(Ne)}},loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:d,className:"dndev-w-full",children:l},"secondary")),A.push(q(Rt,{type:"submit",loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:p,className:"dndev-w-full",children:r||C("form.submit",{defaultValue:"Submit"})},"submit"));let $=A.length;if($===1)return q(ru,{direction:"column",gap:"tight",style:zo,children:A[0]});let te=$===2?"1fr 2fr":$===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return q(nu,{cols:["1fr",te,te,te],gap:"tight",style:zo,children:A})})()]})]})})})}import{Section as fu}from"@donotdev/components";import{useCrudList as vu}from"@donotdev/crud";import{jsx as wr}from"react/jsx-runtime";function hu({entity:e,queryOptions:t,title:o,basePath:n,cols:r=3,className:a}){let{items:i,loading:p}=vu(e,{queryOptions:t});if(!p&&i.length===0)return null;let l=n??`/${e.collection}`;return wr(fu,{title:o,gridCols:r,className:a,children:i.map(d=>wr(Lt,{item:d,entity:e,detailHref:`${l}/${d.id}`},d.id))})}import{createContext as Nr,useId as yu,use as kr}from"react";import{Controller as bu,FormProvider as Su,useFormContext as Cu}from"react-hook-form";import{Label as xu,Slot as Tu,cn as wu,Stack as ku}from"@donotdev/components";import{jsx as ge}from"react/jsx-runtime";var Uh=Su,Ir=Nr({}),_h=({...e})=>ge(Ir.Provider,{value:{name:e.name},children:ge(bu,{...e})}),Ar=Nr({}),Gh=({className:e,...t})=>{let o=yu();return ge(Ar.Provider,{value:{id:o},children:ge(ku,{className:e,...t})})},Ft=()=>{let e=kr(Ir);if(!e||!e.name)return null;let t=kr(Ar);if(!t)return null;let{getFieldState:o,formState:n}=Cu(),r=o(e.name,n),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},Hh=({className:e,...t})=>{let o=Ft();if(!o)return null;let{error:n,formItemId:r}=o;return ge(xu,{className:wu(n&&"text-destructive",e),htmlFor:r,...t})},$h=({...e})=>{let t=Ft();if(!t)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=t;return ge(Tu,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...e})},Wh=({className:e,...t})=>{let o=Ft();if(!o)return null;let{formDescriptionId:n}=o;return ge("p",{id:n,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},Kh=({className:e,children:t,...o})=>{let n=Ft();if(!n)return null;let{error:r,formMessageId:a}=n,i=r?String(r?.message):t;return i?ge("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var Nu={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},Iu={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},o3={...Nu,...Iu},n3={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},r3={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{Fc as AppBranding,Oc as AppIcon,il as AppLoading,Uc as AppTitle,G as AssetResolver,Ta as AuthGuard,Zm as AuthGuardFallback,ao as AuthHeader,no as AuthMenu,Qc as Breadcrumbs,ho as CacheSettings,P2 as ConsentBanner,fn as DnDevNavigationMenu,yd as DropdownNavigation,jp as EntityCardList,Cp as EntityDisplayRenderer,gu as EntityFormRenderer,zp as EntityList,hu as EntityRecommendations,ec as FeatureCard,fl as FeatureDisabled,xd as FloatingLanguageSwitcher,Uh as Form,$h as FormControl,Wh as FormDescription,_h as FormField,Gh as FormItem,Hh as FormLabel,Kh as FormMessage,B2 as GameContainer,V2 as GameFlow,od as GameTitle,t1 as GoTo,Gi as GoToInput,Di as GoToWrapper,Ad as HeaderMenu,Bd as HeaderNavigation,Wr as Icon,Kv as LicenseWatermark,I as Link,it as Loader,Al as LoadingContainerOverlay,xt as LoadingMessage,bl as LoadingMessageAlmostDone,Sl as LoadingMessageComplete,wl as LoadingMessageConnecting,yl as LoadingMessageProcessing,Cl as LoadingMessageSaving,Tl as LoadingMessageSearching,hl as LoadingMessageSimple,xl as LoadingMessageUploading,El as LoadingOverlay,Rl as LoadingScreen,vn as NotFoundPage,Kd as Notifications,mt as PageContainer,Wl as ProgressBar,Gl as RedirectOverlay,rp as SettingsMenu,ql as Skeleton,Cc as TechBento,pp as ThemeToggle,o3 as allLayoutClasses,Ag as checkFormNavigationSafe,hm as createAuthConfig,r3 as cssVariables,Zu as isAuthAvailable,Fg as isBillingAvailable,Ng as isFormStoreAvailable,Gg as isOAuthAvailable,Nu as layoutClasses,Iu as layoutUtilities,n3 as layoutVariables,Tg as resolveFaviconSet,xg as resolveLogo,Me as sanitizeSvg,Yg as tList,uo as techLogos,P as useAuthSafe,fm as useAuthState,yt as useAuthVisibility,cg as useBack,zg as useBillingVisibility,um as useCanAccess,wa as useCanNavigate,Ft as useFormField,Xt as useFormStoreSafe,nn as useGoTo,Ig as useHasDirtyFormsSafe,gm as useHasRole,ug as useLocation,vg as useMatch,Fe as useNavigate,W as useNavigationItems,tn as useNavigationRoute,_g as useOAuthSafe,mg as useParams,pg as usePrefetch,hg as useQueryParams,yg as useRedirectGuard,dg as useRefresh,gg as useRouteParam,fg as useSearchParams,to as useStripeBillingSafe,mm as useUserRole,vm as withAuth};