ds-one 0.2.0-alpha.3 → 0.2.5-alpha.10

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 (271) hide show
  1. package/DS1/0-face/{2025-04-23-device.ts → device.ts} +10 -6
  2. package/DS1/{utils/language.ts → 0-face/i18n.ts} +236 -92
  3. package/DS1/0-face/preferences.ts +23 -0
  4. package/DS1/0-face/pricing.ts +57 -0
  5. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  6. package/DS1/1-root/one.css +76 -107
  7. package/DS1/2-core/ds-banner.ts +3 -0
  8. package/DS1/2-core/ds-button.ts +13 -16
  9. package/DS1/2-core/ds-cycle.ts +84 -39
  10. package/DS1/2-core/{ds-year.ts → ds-date.ts} +5 -6
  11. package/DS1/2-core/ds-icon.ts +4 -4
  12. package/DS1/2-core/ds-input.ts +1 -0
  13. package/DS1/2-core/ds-text.ts +27 -3
  14. package/DS1/2-core/ds-tooltip.ts +9 -14
  15. package/DS1/3-unit/ds-list.ts +7 -0
  16. package/DS1/3-unit/ds-row.ts +4 -5
  17. package/DS1/3-unit/ds-table.ts +5 -6
  18. package/DS1/4-page/ds-grid.ts +9 -59
  19. package/DS1/4-page/ds-layout.ts +123 -18
  20. package/DS1/index.ts +39 -37
  21. package/LICENSE +1 -1
  22. package/README.md +43 -133
  23. package/dist/0-face/{2025-04-23-device.d.ts → device.d.ts} +1 -1
  24. package/dist/0-face/device.d.ts.map +1 -0
  25. package/dist/0-face/{2025-04-23-device.js → device.js} +7 -3
  26. package/dist/{utils/language.d.ts → 0-face/i18n.d.ts} +1 -3
  27. package/dist/0-face/i18n.d.ts.map +1 -0
  28. package/dist/{utils/language.js → 0-face/i18n.js} +178 -76
  29. package/dist/0-face/preferences.d.ts +9 -0
  30. package/dist/0-face/preferences.d.ts.map +1 -0
  31. package/dist/0-face/preferences.js +14 -0
  32. package/dist/0-face/pricing.d.ts +15 -0
  33. package/dist/0-face/pricing.d.ts.map +1 -0
  34. package/dist/0-face/pricing.js +46 -0
  35. package/dist/0-face/theme.d.ts.map +1 -0
  36. package/dist/2-core/ds-banner.d.ts +1 -0
  37. package/dist/2-core/ds-banner.d.ts.map +1 -0
  38. package/dist/2-core/ds-banner.js +2 -0
  39. package/dist/2-core/ds-button.d.ts +2 -7
  40. package/dist/2-core/ds-button.d.ts.map +1 -1
  41. package/dist/2-core/ds-button.js +12 -14
  42. package/dist/2-core/ds-cycle.d.ts +2 -0
  43. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  44. package/dist/2-core/ds-cycle.js +80 -34
  45. package/dist/2-core/{ds-year.d.ts → ds-date.d.ts} +4 -4
  46. package/dist/2-core/ds-date.d.ts.map +1 -0
  47. package/dist/2-core/{ds-year.js → ds-date.js} +5 -5
  48. package/dist/2-core/ds-icon.js +4 -4
  49. package/dist/2-core/ds-input.d.ts +1 -0
  50. package/dist/2-core/ds-input.d.ts.map +1 -0
  51. package/dist/2-core/ds-input.js +1 -0
  52. package/dist/2-core/ds-text.d.ts +2 -0
  53. package/dist/2-core/ds-text.d.ts.map +1 -1
  54. package/dist/2-core/ds-text.js +26 -3
  55. package/dist/2-core/ds-tooltip.d.ts +1 -1
  56. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  57. package/dist/2-core/ds-tooltip.js +9 -13
  58. package/dist/3-unit/ds-list.d.ts.map +1 -1
  59. package/dist/3-unit/ds-list.js +3 -0
  60. package/dist/3-unit/{ds-doublenav.d.ts → ds-portfolio-doublenav.d.ts} +4 -4
  61. package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +1 -0
  62. package/dist/3-unit/{ds-doublenav.js → ds-portfolio-doublenav.js} +4 -4
  63. package/dist/3-unit/{ds-panel.d.ts → ds-portfolio-panel.d.ts} +3 -3
  64. package/dist/3-unit/ds-portfolio-panel.d.ts.map +1 -0
  65. package/dist/3-unit/{ds-panel.js → ds-portfolio-panel.js} +3 -3
  66. package/dist/3-unit/{ds-singlenav.d.ts → ds-portfolio-singlenav.d.ts} +4 -4
  67. package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +1 -0
  68. package/dist/3-unit/{ds-singlenav.js → ds-portfolio-singlenav.js} +7 -7
  69. package/dist/3-unit/ds-row.js +4 -4
  70. package/dist/3-unit/ds-table.d.ts.map +1 -1
  71. package/dist/3-unit/ds-table.js +5 -6
  72. package/dist/4-page/ds-grid.d.ts +0 -7
  73. package/dist/4-page/ds-grid.d.ts.map +1 -1
  74. package/dist/4-page/ds-grid.js +9 -54
  75. package/dist/4-page/ds-layout.d.ts +1 -1
  76. package/dist/4-page/ds-layout.d.ts.map +1 -1
  77. package/dist/4-page/ds-layout.js +126 -17
  78. package/dist/ds-one.bundle.js +2515 -4132
  79. package/dist/ds-one.bundle.js.map +4 -4
  80. package/dist/ds-one.bundle.min.js +245 -787
  81. package/dist/ds-one.bundle.min.js.map +4 -4
  82. package/dist/index.d.ts +16 -26
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +32 -34
  85. package/package.json +8 -9
  86. package/DS1/0-face/2025-04-23-language.ts +0 -4
  87. package/DS1/2-core/ds-article.ts +0 -454
  88. package/DS1/2-core/ds-attributes.ts +0 -155
  89. package/DS1/2-core/ds-downloadcv.ts +0 -146
  90. package/DS1/2-core/ds-header.ts +0 -82
  91. package/DS1/2-core/ds-home.ts +0 -168
  92. package/DS1/2-core/ds-link.ts +0 -121
  93. package/DS1/2-core/ds-markdown.ts +0 -252
  94. package/DS1/2-core/ds-price.ts +0 -108
  95. package/DS1/2-core/ds-squarecircle.ts +0 -155
  96. package/DS1/2-core/ds-title.ts +0 -139
  97. package/DS1/2-core/ds-viewtoggle.ts +0 -83
  98. package/DS1/3-unit/ds-doublenav.ts +0 -106
  99. package/DS1/3-unit/ds-panel.ts +0 -27
  100. package/DS1/3-unit/ds-singlenav.ts +0 -79
  101. package/DS1/utils/cdn-loader.ts +0 -208
  102. package/DS1/utils/keys.json +0 -41
  103. package/DS1/utils/pricing.ts +0 -24
  104. package/DS1/utils/scroll.ts +0 -184
  105. package/DS1/utils/settings.ts +0 -23
  106. package/DS1/utils/viewMode.ts +0 -55
  107. package/dist/0-face/2025-04-23-device.d.ts.map +0 -1
  108. package/dist/0-face/2025-04-23-language.d.ts +0 -1
  109. package/dist/0-face/2025-04-23-language.d.ts.map +0 -1
  110. package/dist/0-face/2025-04-23-language.js +0 -3
  111. package/dist/2-core/article-v1.d.ts +0 -129
  112. package/dist/2-core/article-v1.d.ts.map +0 -1
  113. package/dist/2-core/article-v1.js +0 -361
  114. package/dist/2-core/attributes-v1.d.ts +0 -47
  115. package/dist/2-core/attributes-v1.d.ts.map +0 -1
  116. package/dist/2-core/attributes-v1.js +0 -128
  117. package/dist/2-core/cycle-v1.d.ts +0 -66
  118. package/dist/2-core/cycle-v1.d.ts.map +0 -1
  119. package/dist/2-core/cycle-v1.js +0 -586
  120. package/dist/2-core/downloadcv-v1.d.ts +0 -58
  121. package/dist/2-core/downloadcv-v1.d.ts.map +0 -1
  122. package/dist/2-core/downloadcv-v1.js +0 -119
  123. package/dist/2-core/ds-article.d.ts +0 -129
  124. package/dist/2-core/ds-article.d.ts.map +0 -1
  125. package/dist/2-core/ds-article.js +0 -361
  126. package/dist/2-core/ds-attributes.d.ts +0 -47
  127. package/dist/2-core/ds-attributes.d.ts.map +0 -1
  128. package/dist/2-core/ds-attributes.js +0 -128
  129. package/dist/2-core/ds-button.figma.d.ts +0 -2
  130. package/dist/2-core/ds-button.figma.d.ts.map +0 -1
  131. package/dist/2-core/ds-button.figma.js +0 -6
  132. package/dist/2-core/ds-downloadcv.d.ts +0 -58
  133. package/dist/2-core/ds-downloadcv.d.ts.map +0 -1
  134. package/dist/2-core/ds-downloadcv.js +0 -119
  135. package/dist/2-core/ds-header.d.ts +0 -28
  136. package/dist/2-core/ds-header.d.ts.map +0 -1
  137. package/dist/2-core/ds-header.js +0 -66
  138. package/dist/2-core/ds-home.d.ts +0 -26
  139. package/dist/2-core/ds-home.d.ts.map +0 -1
  140. package/dist/2-core/ds-home.js +0 -148
  141. package/dist/2-core/ds-link.d.ts +0 -35
  142. package/dist/2-core/ds-link.d.ts.map +0 -1
  143. package/dist/2-core/ds-link.js +0 -85
  144. package/dist/2-core/ds-markdown.d.ts +0 -7
  145. package/dist/2-core/ds-markdown.d.ts.map +0 -1
  146. package/dist/2-core/ds-markdown.js +0 -240
  147. package/dist/2-core/ds-price.d.ts +0 -46
  148. package/dist/2-core/ds-price.d.ts.map +0 -1
  149. package/dist/2-core/ds-price.js +0 -72
  150. package/dist/2-core/ds-squarecircle.d.ts +0 -50
  151. package/dist/2-core/ds-squarecircle.d.ts.map +0 -1
  152. package/dist/2-core/ds-squarecircle.js +0 -133
  153. package/dist/2-core/ds-title.d.ts +0 -50
  154. package/dist/2-core/ds-title.d.ts.map +0 -1
  155. package/dist/2-core/ds-title.js +0 -103
  156. package/dist/2-core/ds-viewtoggle.d.ts +0 -27
  157. package/dist/2-core/ds-viewtoggle.d.ts.map +0 -1
  158. package/dist/2-core/ds-viewtoggle.js +0 -49
  159. package/dist/2-core/ds-year.d.ts.map +0 -1
  160. package/dist/2-core/header-v1.d.ts +0 -28
  161. package/dist/2-core/header-v1.d.ts.map +0 -1
  162. package/dist/2-core/header-v1.js +0 -66
  163. package/dist/2-core/home-v1.d.ts +0 -26
  164. package/dist/2-core/home-v1.d.ts.map +0 -1
  165. package/dist/2-core/home-v1.js +0 -148
  166. package/dist/2-core/icon-v1.d.ts +0 -28
  167. package/dist/2-core/icon-v1.d.ts.map +0 -1
  168. package/dist/2-core/icon-v1.js +0 -297
  169. package/dist/2-core/link-v1.d.ts +0 -35
  170. package/dist/2-core/link-v1.d.ts.map +0 -1
  171. package/dist/2-core/link-v1.js +0 -85
  172. package/dist/2-core/markdown-v1.d.ts +0 -7
  173. package/dist/2-core/markdown-v1.d.ts.map +0 -1
  174. package/dist/2-core/markdown-v1.js +0 -240
  175. package/dist/2-core/price-v1.d.ts +0 -46
  176. package/dist/2-core/price-v1.d.ts.map +0 -1
  177. package/dist/2-core/price-v1.js +0 -72
  178. package/dist/2-core/squarecircle-v1.d.ts +0 -50
  179. package/dist/2-core/squarecircle-v1.d.ts.map +0 -1
  180. package/dist/2-core/squarecircle-v1.js +0 -133
  181. package/dist/2-core/text-v1.d.ts +0 -48
  182. package/dist/2-core/text-v1.d.ts.map +0 -1
  183. package/dist/2-core/text-v1.js +0 -83
  184. package/dist/2-core/title-v1.d.ts +0 -50
  185. package/dist/2-core/title-v1.d.ts.map +0 -1
  186. package/dist/2-core/title-v1.js +0 -103
  187. package/dist/2-core/tooltip-v1.d.ts +0 -39
  188. package/dist/2-core/tooltip-v1.d.ts.map +0 -1
  189. package/dist/2-core/tooltip-v1.js +0 -145
  190. package/dist/2-core/viewtoggle-v1.d.ts +0 -27
  191. package/dist/2-core/viewtoggle-v1.d.ts.map +0 -1
  192. package/dist/2-core/viewtoggle-v1.js +0 -49
  193. package/dist/2-core/year-v1.d.ts +0 -16
  194. package/dist/2-core/year-v1.d.ts.map +0 -1
  195. package/dist/2-core/year-v1.js +0 -21
  196. package/dist/3-unit/ds-doublenav.d.ts.map +0 -1
  197. package/dist/3-unit/ds-panel.d.ts.map +0 -1
  198. package/dist/3-unit/ds-singlenav.d.ts.map +0 -1
  199. package/dist/utils/cdn-loader.d.ts +0 -19
  200. package/dist/utils/cdn-loader.d.ts.map +0 -1
  201. package/dist/utils/cdn-loader.js +0 -142
  202. package/dist/utils/keys.json +0 -41
  203. package/dist/utils/language.d.ts.map +0 -1
  204. package/dist/utils/pricing.d.ts +0 -8
  205. package/dist/utils/pricing.d.ts.map +0 -1
  206. package/dist/utils/pricing.js +0 -14
  207. package/dist/utils/scroll.d.ts +0 -34
  208. package/dist/utils/scroll.d.ts.map +0 -1
  209. package/dist/utils/scroll.js +0 -140
  210. package/dist/utils/settings.d.ts +0 -9
  211. package/dist/utils/settings.d.ts.map +0 -1
  212. package/dist/utils/settings.js +0 -14
  213. package/dist/utils/theme.d.ts.map +0 -1
  214. package/dist/utils/viewMode.d.ts +0 -14
  215. package/dist/utils/viewMode.d.ts.map +0 -1
  216. package/dist/utils/viewMode.js +0 -46
  217. /package/DS1/{utils → 0-face}/theme.ts +0 -0
  218. /package/DS1/{x Icon → x-icon}/1x.svg +0 -0
  219. /package/DS1/{x Icon → x-icon}/1xdots.svg +0 -0
  220. /package/DS1/{x Icon → x-icon}/1xgrid.svg +0 -0
  221. /package/DS1/{x Icon → x-icon}/1xlines.svg +0 -0
  222. /package/DS1/{x Icon → x-icon}/2x.svg +0 -0
  223. /package/DS1/{x Icon → x-icon}/2xdots.svg +0 -0
  224. /package/DS1/{x Icon → x-icon}/2xgrid.svg +0 -0
  225. /package/DS1/{x Icon → x-icon}/2xlines.svg +0 -0
  226. /package/DS1/{x Icon → x-icon}/big.svg +0 -0
  227. /package/DS1/{x Icon → x-icon}/blank.svg +0 -0
  228. /package/DS1/{x Icon → x-icon}/check.svg +0 -0
  229. /package/DS1/{x Icon → x-icon}/close.svg +0 -0
  230. /package/DS1/{x Icon → x-icon}/collapse.svg +0 -0
  231. /package/DS1/{x Icon → x-icon}/color.svg +0 -0
  232. /package/DS1/{x Icon → x-icon}/column.svg +0 -0
  233. /package/DS1/{x Icon → x-icon}/default.svg +0 -0
  234. /package/DS1/{x Icon → x-icon}/delete.svg +0 -0
  235. /package/DS1/{x Icon → x-icon}/do.svg +0 -0
  236. /package/DS1/{x Icon → x-icon}/down.svg +0 -0
  237. /package/DS1/{x Icon → x-icon}/duplicate.svg +0 -0
  238. /package/DS1/{x Icon → x-icon}/email.svg +0 -0
  239. /package/DS1/{x Icon → x-icon}/expand.svg +0 -0
  240. /package/DS1/{x Icon → x-icon}/gallery.svg +0 -0
  241. /package/DS1/{x Icon → x-icon}/group.svg +0 -0
  242. /package/DS1/{x Icon → x-icon}/head.svg +0 -0
  243. /package/DS1/{x Icon → x-icon}/icon.svg +0 -0
  244. /package/DS1/{x Icon → x-icon}/left.svg +0 -0
  245. /package/DS1/{x Icon → x-icon}/lock.svg +0 -0
  246. /package/DS1/{x Icon → x-icon}/mic.svg +0 -0
  247. /package/DS1/{x Icon → x-icon}/minimize.svg +0 -0
  248. /package/DS1/{x Icon → x-icon}/more.svg +0 -0
  249. /package/DS1/{x Icon → x-icon}/note.svg +0 -0
  250. /package/DS1/{x Icon → x-icon}/open.svg +0 -0
  251. /package/DS1/{x Icon → x-icon}/page.svg +0 -0
  252. /package/DS1/{x Icon → x-icon}/plus.svg +0 -0
  253. /package/DS1/{x Icon → x-icon}/rewind.svg +0 -0
  254. /package/DS1/{x Icon → x-icon}/right.svg +0 -0
  255. /package/DS1/{x Icon/row..svg → x-icon/row.svg} +0 -0
  256. /package/DS1/{x Icon → x-icon}/search.svg +0 -0
  257. /package/DS1/{x Icon → x-icon}/see.svg +0 -0
  258. /package/DS1/{x Icon → x-icon}/star.svg +0 -0
  259. /package/DS1/{x Icon → x-icon}/title.svg +0 -0
  260. /package/DS1/{x Icon → x-icon}/undo.svg +0 -0
  261. /package/DS1/{x Icon → x-icon}/ungroup.svg +0 -0
  262. /package/DS1/{x Icon → x-icon}/unhead.svg +0 -0
  263. /package/DS1/{x Icon → x-icon}/unicon.svg +0 -0
  264. /package/DS1/{x Icon → x-icon}/unlock.svg +0 -0
  265. /package/DS1/{x Icon → x-icon}/unmic.svg +0 -0
  266. /package/DS1/{x Icon → x-icon}/unsee.svg +0 -0
  267. /package/DS1/{x Icon → x-icon}/unstar.svg +0 -0
  268. /package/DS1/{x Icon → x-icon}/untitle.svg +0 -0
  269. /package/DS1/{x Icon → x-icon}/up.svg +0 -0
  270. /package/dist/{utils → 0-face}/theme.d.ts +0 -0
  271. /package/dist/{utils → 0-face}/theme.js +0 -0
@@ -1,6 +1,6 @@
1
- function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,i=t&&(t.userAgent||t.vendor)||e&&e.opera||"",n=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(i),s=(t&&t.maxTouchPoints||0)>1,a=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return n||s&&a}function Ni(){let t=Qe(),e=navigator,i=window,r=(e&&e.maxTouchPoints||0)>1,s=typeof document<"u"?document.documentElement.clientWidth:i?.innerWidth||0,a=typeof document<"u"?document.documentElement.clientHeight:i?.innerHeight||0,g=t&&Math.min(s,a)>=600;return{isMobile:t,isTablet:g,isDesktop:!t,isTouchCapable:r,deviceType:t?g?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:s,screenHeight:a}}function Xe(){let t=Ni();if(t.isMobile&&typeof document<"u"){let n=t.screenWidth/280;document.documentElement.style.setProperty("--scaling-factor-mobile",n.toFixed(3)),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${n.toFixed(2)}`)}else typeof document<"u"&&document.documentElement.style.setProperty("--scaling-factor-mobile","1"),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Xe()}):Xe();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Xe()},100)})}var Et=!1,Tt="./translations.json";function At(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function Ii(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let i=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(i)return i;let n=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return n||null}function Mi(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,i=Ii(),n=At(e??"");n&&t.push(n);let r=At(i??"");return r&&!t.includes(r)&&t.push(r),t.length===0&&t.push(Tt),t}function Hi(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function Oi(t){try{let e=await fetch(t);if(!e.ok)return null;let i=await e.json();return Hi(i)?Object.keys(i).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):i:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function Lt(){if(Et||(Et=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=Mi();for(let e of t){let i=await Oi(e);if(!i)continue;window.DS_ONE_TRANSLATIONS=i;let n=Object.keys(i);return console.log(`[DS one] External translations loaded from ${e}: ${n.length} language(s) \u2013 ${n.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??Tt}. Using bundled translations.`),!1}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Lt()}):Lt());var ve=globalThis,ye=ve.ShadowRoot&&(ve.ShadyCSS===void 0||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),Nt=new WeakMap,G=class{constructor(e,i,n){if(this._$cssResult$=!0,n!==et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(ye&&e===void 0){let n=i!==void 0&&i.length===1;n&&(e=Nt.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Nt.set(i,e))}return e}toString(){return this.cssText}},It=t=>new G(typeof t=="string"?t:t+"",void 0,et),c=(t,...e)=>{let i=t.length===1?t[0]:e.reduce(((n,r,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1]),t[0]);return new G(i,t,et)},Mt=(t,e)=>{if(ye)t.adoptedStyleSheets=e.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(let i of e){let n=document.createElement("style"),r=ve.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=i.cssText,t.appendChild(n)}},tt=ye?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let i="";for(let n of e.cssRules)i+=n.cssText;return It(i)})(t):t;var{is:Vi,defineProperty:Di,getOwnPropertyDescriptor:Pi,getOwnPropertyNames:Ui,getOwnPropertySymbols:Ri,getPrototypeOf:Wi}=Object,H=globalThis,Ht=H.trustedTypes,ji=Ht?Ht.emptyScript:"",zi=H.reactiveElementPolyfillSupport,Z=(t,e)=>t,it={toAttribute(t,e){switch(e){case Boolean:t=t?ji:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},Vt=(t,e)=>!Vi(t,e),Ot={attribute:!0,type:String,converter:it,reflect:!1,useDefault:!1,hasChanged:Vt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),H.litPropertyMetadata??(H.litPropertyMetadata=new WeakMap);var N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=Ot){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,i);r!==void 0&&Di(this.prototype,e,r)}}static getPropertyDescriptor(e,i,n){let{get:r,set:s}=Pi(this.prototype,e)??{get(){return this[i]},set(a){this[i]=a}};return{get:r,set(a){let g=r?.call(this);s?.call(this,a),this.requestUpdate(e,g,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ot}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let e=Wi(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let i=this.properties,n=[...Ui(i),...Ri(i)];for(let r of n)this.createProperty(r,i[r])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[n,r]of i)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[i,n]of this.elementProperties){let r=this._$Eu(i,n);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let r of n)i.unshift(tt(r))}else e!==void 0&&i.push(tt(e));return i}static _$Eu(e,i){let n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let n of i.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Mt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,i,n){this._$AK(e,n)}_$ET(e,i){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:it).toAttribute(i,n.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,i){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let s=n.getPropertyOptions(r),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:it;this._$Em=r;let g=a.fromAttribute(i,s.type);this[r]=g??this._$Ej?.get(r)??g,this._$Em=null}}requestUpdate(e,i,n){if(e!==void 0){let r=this.constructor,s=this[e];if(n??(n=r.getPropertyOptions(e)),!((n.hasChanged??Vt)(s,i)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:n,reflect:r,wrapped:s},a){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,a??i??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(i=void 0),this._$AL.set(e,i)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,s]of n){let{wrapped:a}=s,g=this[r];a!==!0||this._$AL.has(r)||g===void 0||this.C(r,void 0,s,g)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(i)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((i=>this._$ET(i,this[i])))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[Z("elementProperties")]=new Map,N[Z("finalized")]=new Map,zi?.({ReactiveElement:N}),(H.reactiveElementVersions??(H.reactiveElementVersions=[])).push("2.1.1");var Y=globalThis,we=Y.trustedTypes,Dt=we?we.createPolicy("lit-html",{createHTML:t=>t}):void 0,rt="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+I,Bi=`<${st}>`,P=document,X=()=>P.createComment(""),Q=t=>t===null||typeof t!="object"&&typeof t!="function",ot=Array.isArray,zt=t=>ot(t)||typeof t?.[Symbol.iterator]=="function",nt=`[
2
- \f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pt=/-->/g,Ut=/>/g,V=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Rt=/'/g,Wt=/"/g,Bt=/^(?:script|style|textarea|title)$/i,at=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),o=at(1),qt=at(2),Un=at(3),M=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),jt=new WeakMap,D=P.createTreeWalker(P,129);function Ft(t,e){if(!ot(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Dt!==void 0?Dt.createHTML(e):e}var Kt=(t,e)=>{let i=t.length-1,n=[],r,s=e===2?"<svg>":e===3?"<math>":"",a=J;for(let g=0;g<i;g++){let u=t[g],p,v,d=-1,A=0;for(;A<u.length&&(a.lastIndex=A,v=a.exec(u),v!==null);)A=a.lastIndex,a===J?v[1]==="!--"?a=Pt:v[1]!==void 0?a=Ut:v[2]!==void 0?(Bt.test(v[2])&&(r=RegExp("</"+v[2],"g")),a=V):v[3]!==void 0&&(a=V):a===V?v[0]===">"?(a=r??J,d=-1):v[1]===void 0?d=-2:(d=a.lastIndex-v[2].length,p=v[1],a=v[3]===void 0?V:v[3]==='"'?Wt:Rt):a===Wt||a===Rt?a=V:a===Pt||a===Ut?a=J:(a=V,r=void 0);let f=a===V&&t[g+1].startsWith("/>")?" ":"";s+=a===J?u+Bi:d>=0?(n.push(p),u.slice(0,d)+rt+u.slice(d)+I+f):u+I+(d===-2?g:f)}return[Ft(t,s+(t[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ee=class t{constructor({strings:e,_$litType$:i},n){let r;this.parts=[];let s=0,a=0,g=e.length-1,u=this.parts,[p,v]=Kt(e,i);if(this.el=t.createElement(p,n),D.currentNode=this.el.content,i===2||i===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=D.nextNode())!==null&&u.length<g;){if(r.nodeType===1){if(r.hasAttributes())for(let d of r.getAttributeNames())if(d.endsWith(rt)){let A=v[a++],f=r.getAttribute(d).split(I),C=/([.?@])?(.*)/.exec(A);u.push({type:1,index:s,name:C[2],strings:f,ctor:C[1]==="."?xe:C[1]==="?"?_e:C[1]==="@"?$e:R}),r.removeAttribute(d)}else d.startsWith(I)&&(u.push({type:6,index:s}),r.removeAttribute(d));if(Bt.test(r.tagName)){let d=r.textContent.split(I),A=d.length-1;if(A>0){r.textContent=we?we.emptyScript:"";for(let f=0;f<A;f++)r.append(d[f],X()),D.nextNode(),u.push({type:2,index:++s});r.append(d[A],X())}}}else if(r.nodeType===8)if(r.data===st)u.push({type:2,index:s});else{let d=-1;for(;(d=r.data.indexOf(I,d+1))!==-1;)u.push({type:7,index:s}),d+=I.length-1}s++}}static createElement(e,i){let n=P.createElement("template");return n.innerHTML=e,n}};function U(t,e,i=t,n){if(e===M)return e;let r=n!==void 0?i._$Co?.[n]:i._$Cl,s=Q(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,i,n)),n!==void 0?(i._$Co??(i._$Co=[]))[n]=r:i._$Cl=r),r!==void 0&&(e=U(t,r._$AS(t,e.values),r,n)),e}var be=class{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:i},parts:n}=this._$AD,r=(e?.creationScope??P).importNode(i,!0);D.currentNode=r;let s=D.nextNode(),a=0,g=0,u=n[0];for(;u!==void 0;){if(a===u.index){let p;u.type===2?p=new j(s,s.nextSibling,this,e):u.type===1?p=new u.ctor(s,u.name,u.strings,this,e):u.type===6&&(p=new Se(s,this,e)),this._$AV.push(p),u=n[++g]}a!==u?.index&&(s=D.nextNode(),a++)}return D.currentNode=P,r}p(e){let i=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,i),i+=n.strings.length-2):n._$AI(e[i])),i++}},j=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,n,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=U(this,e,i),Q(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==M&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ee.createElement(Ft(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(i);else{let s=new be(r,this),a=s.u(this.options);s.p(i),this.T(a),this._$AH=s}}_$AC(e){let i=jt.get(e.strings);return i===void 0&&jt.set(e.strings,i=new ee(e)),i}k(e){ot(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,n,r=0;for(let s of e)r===i.length?i.push(n=new t(this.O(X()),this.O(X()),this,this.options)):n=i[r],n._$AI(s),r++;r<i.length&&(this._$AR(n&&n._$AB.nextSibling,r),i.length=r)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,n,r,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=i,this._$AM=r,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=w}_$AI(e,i=this,n,r){let s=this.strings,a=!1;if(s===void 0)e=U(this,e,i,0),a=!Q(e)||e!==this._$AH&&e!==M,a&&(this._$AH=e);else{let g=e,u,p;for(e=s[0],u=0;u<s.length-1;u++)p=U(this,g[n+u],i,u),p===M&&(p=this._$AH[u]),a||(a=!Q(p)||p!==this._$AH[u]),p===w?e=w:e!==w&&(e+=(p??"")+s[u+1]),this._$AH[u]=p}a&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},xe=class extends R{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},_e=class extends R{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},$e=class extends R{constructor(e,i,n,r,s){super(e,i,n,r,s),this.type=5}_$AI(e,i=this){if((e=U(this,e,i,0)??w)===M)return;let n=this._$AH,r=e===w&&n!==w||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==w&&(n===w||r);r&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Se=class{constructor(e,i,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}},Gt={M:rt,P:I,A:st,C:1,L:Kt,R:be,D:zt,V:U,I:j,H:R,N:_e,U:$e,B:xe,F:Se},qi=Y.litHtmlPolyfillSupport;qi?.(ee,j),(Y.litHtmlVersions??(Y.litHtmlVersions=[])).push("3.3.1");var Zt=(t,e,i)=>{let n=i?.renderBefore??e,r=n._$litPart$;if(r===void 0){let s=i?.renderBefore??null;n._$litPart$=r=new j(e.insertBefore(X(),s),s,void 0,i??{})}return r._$AI(t),r};var te=globalThis,l=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var i;let e=super.createRenderRoot();return(i=this.renderOptions).renderBefore??(i.renderBefore=e.firstChild),e}update(e){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Zt(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};l._$litElement$=!0,l.finalized=!0,te.litElementHydrateSupport?.({LitElement:l});var Fi=te.litElementPolyfillSupport;Fi?.({LitElement:l});(te.litElementVersions??(te.litElementVersions=[])).push("4.2.1");var Jt={en:{language:"Language",theme:"Theme",home:"Home",about:"About",contact:"Contact",welcome:"Welcome",description:"Description",learnMore:"Learn More",copyright:"\xA9 2025",siteTitle:"Site Title",downloadCV:"Download CV"},da:{language:"Sprog",theme:"Tema",home:"Hjem",about:"Om",contact:"Kontakt",welcome:"Velkommen",description:"Beskrivelse",learnMore:"L\xE6r Mere",copyright:"\xA9 2025",siteTitle:"Site Titel",downloadCV:"Download CV"},ja:{language:"\u8A00\u8A9E",theme:"\u30C6\u30FC\u30DE",home:"\u30DB\u30FC\u30E0",about:"\u306B\u3064\u3044\u3066",contact:"\u304A\u554F\u3044\u5408\u308F\u305B",welcome:"\u3088\u3046\u3053\u305D",description:"\u8AAC\u660E",learnMore:"\u8A73\u7D30\u3092\u898B\u308B",copyright:"\xA9 2025",siteTitle:"\u30B5\u30A4\u30C8\u30BF\u30A4\u30C8\u30EB",downloadCV:"CV\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9"}};var ni=["da","nb","sv","pt","es","zh","ko","ja","en","de"],Gi=new Map(ni.map((t,e)=>[t,e])),Yt={da:"Danish","da-dk":"Danish",nb:"Norwegian","nb-no":"Norwegian",sv:"Swedish","sv-se":"Swedish",de:"German","de-de":"German",en:"English","en-us":"English",pt:"Portuguese","pt-pt":"Portuguese","pt-br":"Portuguese (Brazil)",es:"Spanish","es-es":"Spanish","es-mx":"Spanish (Mexico)",zh:"Chinese","zh-hans":"Chinese (Simplified)","zh-hant":"Chinese (Traditional)",ja:"Japanese","ja-jp":"Japanese",ko:"Korean","ko-kr":"Korean"},Xt=new Map,Qt=!1;function Ce(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:Jt}var T=Ce(),lt=new Map,k="en";function ie(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function ei(t){let e=ie(t),i=Gi.get(e);return typeof i=="number"?i:ni.length}function ri(t){return[...t].sort((e,i)=>{let n=ei(e),r=ei(i);return n!==r?n-r:e.localeCompare(i)})}function Zi(t,e){let i=t?.replace("_","-");if(i)try{let n=Xt.get(i);n||(n=new Intl.DisplayNames([i],{type:"language"}),Xt.set(i,n));let r=e.replace("_","-"),s=n.of(r);if(s&&s!==r)return s;let a=n.of(ie(r));if(a)return a}catch{Qt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),Qt=!0)}}function Ji(t){let e=t.toLowerCase().replace("_","-"),i=Yt[e];if(i)return i;let n=ie(e);return Yt[n]}function si(t,e={}){if(!t)return"";let i=[];e.locale&&i.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&i.push(...navigator.languages),navigator.language&&i.push(navigator.language)),i.push(k),i.push("en");let n=new Set;for(let a of i){if(!a||n.has(a))continue;n.add(a);let g=Zi(a,t);if(g)return g}let r=Ji(t);if(r)return r;let s=ie(t);return s?s.toUpperCase():t}var ti={da:"da","da-dk":"da",no:"nb",nb:"nb","nb-no":"nb",nn:"nn","nn-no":"nn",sv:"sv","sv-se":"sv",pt:"pt","pt-pt":"pt","pt-br":"pt",es:"es","es-es":"es","es-mx":"es",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh",ko:"ko","ko-kr":"ko",ja:"ja","ja-jp":"ja",en:"en","en-us":"en","en-gb":"en",de:"de","de-de":"de"};function ii(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),i=ti[e];if(i)return i;let n=ie(e),r=ti[n];return r||t}function Yi(){if(typeof navigator>"u")return k;let t=navigator.language;if(t){let e=ii(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let i=ii(e);if(i)return i}return k}var er=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,$={value:localStorage.getItem("language")||Yi(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&window.addEventListener("translations-ready",()=>{T=Ce(),window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=$.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=$.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function E(t){let e=$.value;return T?.[e]?.[t]?T[e][t]:e!==k&&T?.[k]?.[t]?T[k][t]:(console.warn(`[translate] No translation found for key "${t}"`),t)}function tr(t,e=$.value){if(!t)return!1;let i=T?.[e];return!!(i&&Object.prototype.hasOwnProperty.call(i,t)||e!==k&&T?.[k]&&Object.prototype.hasOwnProperty.call(T[k],t))}function x(t){return E(t)}async function oi(t,e=$.value){if(!t||!T||!T[e])return null;let i=T[e][t];return i||(e!==k&&T[k]?.[t]?T[k][t]:null)}function ir(t,e,i=$.value){if(!t)return;Xi(i).set(t,e)}function Xi(t){return lt.has(t)||lt.set(t,new Map),lt.get(t)}function nr(){let t=Ce();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(ri(e))}return Promise.resolve([k])}function ct(){let t=Ce();return t&&Object.keys(t).length>0?ri(Object.keys(t)):[k]}function rr(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function dt(t){localStorage.setItem("language",t),$.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}var ne=class extends l{constructor(){super(),this._handleLanguageChange=()=>{this._updateText()},this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.notionKey=null,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1,this._notionText=null}connectedCallback(){super.connectedCallback(),this._updateText(),window.addEventListener("language-changed",this._handleLanguageChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this._handleLanguageChange)}updated(e){super.updated(e),(e.has("key")||e.has("defaultText"))&&this._updateText()}_updateText(){this.key?this._notionText=x(this.key):this._notionText=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return o`
1
+ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,r=t&&(t.userAgent||t.vendor)||e&&e.opera||"",s=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(r),i=(t&&t.maxTouchPoints||0)>1,o=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return s||i&&o}function or(){let t=ir(),e=navigator,r=window,n=(e&&e.maxTouchPoints||0)>1,i=typeof document<"u"?document.documentElement.clientWidth:r?.innerWidth||0,o=typeof document<"u"?document.documentElement.clientHeight:r?.innerHeight||0,p=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:p,isDesktop:!t,isTouchCapable:n,deviceType:t?p?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function Ve(){let t=or();if(t.isMobile&&typeof document<"u"){let s=t.screenWidth/280;document.documentElement.style.setProperty("--sf",s.toFixed(3)),document.documentElement.style.setProperty("--sf",s.toFixed(3)),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${s.toFixed(2)}`)}else typeof document<"u"&&(document.documentElement.style.setProperty("--sf","1"),document.documentElement.style.setProperty("--sf","1")),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ve()}):Ve();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Ve()},100)})}var ar={},gt=["da","de","en","es","fr","it","ja","pt","sv","zh"],lr=new Map(gt.map((t,e)=>[t,e])),ot={da:"Danish","da-dk":"Danish",de:"German","de-de":"German",en:"English","en-us":"English",es:"Spanish","es-es":"Spanish",fr:"French","fr-fr":"French",it:"Italian","it-it":"Italian",ja:"Japanese","ja-jp":"Japanese",pt:"Portuguese","pt-pt":"Portuguese",sv:"Swedish","sv-se":"Swedish",zh:"Chinese","zh-cn":"Chinese","zh-tw":"Chinese","zh-hans":"Chinese","zh-hant":"Chinese"},at=new Map,lt=!1,mt="./translations.json",ct=!1;function dt(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function cr(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let r=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(r)return r;let s=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return s||null}function dr(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=cr(),s=dt(e??"");s&&t.push(s);let n=dt(r??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(mt),t}function ur(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function hr(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return ur(r)?Object.keys(r).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):r:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function ut(){if(ct||(ct=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=dr();for(let e of t){let r=await hr(e);if(!r)continue;window.DS_ONE_TRANSLATIONS=r;let s=Object.keys(r);return console.log(`[DS one] External translations loaded from ${e}: ${s.length} language(s) \u2013 ${s.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??mt}. Using bundled translations.`),!1}function pe(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:ar}var I=pe(),k="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function ht(t){let e=F(t),r=lr.get(e);return typeof r=="number"?r:gt.length}function vt(t){return[...t].sort((e,r)=>{let s=ht(e),n=ht(r);return s!==n?s-n:e.localeCompare(r)})}function pr(t,e){let r=t?.replace("_","-");if(r)try{let s=at.get(r);s||(s=new Intl.DisplayNames([r],{type:"language"}),at.set(r,s));let n=e.replace("_","-"),i=s.of(n);if(i&&i!==n)return i;let o=s.of(F(n));if(o)return o}catch{lt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),lt=!0)}}function fr(t){let e=t.toLowerCase().replace("_","-"),r=ot[e];if(r)return r;let s=F(e);return ot[s]}function yt(t,e={}){if(!t)return"";let r=[];e.locale&&r.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&r.push(...navigator.languages),navigator.language&&r.push(navigator.language)),r.push(k),r.push("en");let s=new Set;for(let o of r){if(!o||s.has(o))continue;s.add(o);let p=pr(o,t);if(p)return p}let n=fr(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var pt={da:"da","da-dk":"da",de:"de","de-de":"de",en:"en","en-us":"en","en-gb":"en",es:"es","es-es":"es","es-mx":"es",fr:"fr","fr-fr":"fr",it:"it","it-it":"it",ja:"ja","ja-jp":"ja",pt:"pt","pt-pt":"pt","pt-br":"pt",sv:"sv","sv-se":"sv",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh"};function ft(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=pt[e];if(r)return r;let s=F(e),n=pt[s];return n||t}function gr(){if(typeof navigator>"u")return k;let t=navigator.language;if(t){let e=ft(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=ft(e);if(r)return r}return k}var ns=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,S={value:localStorage.getItem("language")||gr(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ut()}):ut());typeof window<"u"&&window.addEventListener("translations-ready",()=>{I=pe(),window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function E(t){let e=S.value;return I?.[e]?.[t]?I[e][t]:e!==k&&I?.[k]?.[t]?I[k][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function is(t,e=S.value){if(!t)return!1;let r=I?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==k&&I?.[k]&&Object.prototype.hasOwnProperty.call(I[k],t))}function fe(t){return E(t)}function os(){let t=pe();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(vt(e))}return Promise.resolve([k])}function Me(){let t=pe();return t&&Object.keys(t).length>0?vt(Object.keys(t)):[k]}function as(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function Re(t){localStorage.setItem("language",t),S.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}function P(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:preferences"),s={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:preferences",JSON.stringify(s))}catch(e){console.warn("ds-one: unable to persist preferences",e)}}var mr={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function ds(t){let{language:e,country:r}=t;if(r){let n=r.toUpperCase();if(n==="US"||n==="USA")return"$";if(n==="GB"||n==="UK")return"\xA3";if(n==="JP"||n==="JPN"||n==="CN"||n==="CHN")return"\xA5";if(n==="KR"||n==="KOR")return"\u20A9"}let s=e.toLowerCase().split(/[-_]/)[0];return mr[s]||"$"}var vr=Object.defineProperty,yr=(t,e,r)=>e in t?vr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,De=(t,e,r)=>(yr(t,typeof e!="symbol"?e+"":e,r),r),br=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Ue=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},ge=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},bt=(t,e,r)=>(br(t,e,"access private method"),r);function wt(t,e){return Object.is(t,e)}var w=null,G=!1,me=1,ve=Symbol("SIGNAL");function U(t){let e=w;return w=t,e}function wr(){return w}function xr(){return G}var qe={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ye(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(w===null)return;w.consumerOnSignalRead(t);let e=w.nextProducerIndex++;if(W(w),e<w.producerNode.length&&w.producerNode[e]!==t&&ze(w)){let r=w.producerNode[e];be(r,w.producerIndexOfThis[e])}w.producerNode[e]!==t&&(w.producerNode[e]=t,w.producerIndexOfThis[e]=ze(w)?$t(t,w,e):0),w.producerLastReadVersion[e]=t.version}function _r(){me++}function xt(t){if(!(!t.dirty&&t.lastCleanEpoch===me)){if(!t.producerMustRecompute(t)&&!Er(t)){t.dirty=!1,t.lastCleanEpoch=me;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=me}}function _t(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let r of t.liveConsumerNode)r.dirty||Sr(r)}finally{G=e}}function $r(){return w?.consumerAllowSignalWrites!==!1}function Sr(t){var e;t.dirty=!0,_t(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function Ar(t){return t&&(t.nextProducerIndex=0),U(t)}function Cr(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(ze(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)be(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Er(t){W(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],s=t.producerLastReadVersion[e];if(s!==r.version||(xt(r),s!==r.version))return!0}return!1}function $t(t,e,r){var s;if(Fe(t),W(t),t.liveConsumerNode.length===0){(s=t.watched)==null||s.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=$t(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function be(t,e){var r;if(Fe(t),W(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(r=t.unwatched)==null||r.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)be(t.producerNode[n],t.producerIndexOfThis[n])}let s=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[s],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[s],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];W(i),i.producerIndexOfThis[n]=e}}function ze(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function W(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Fe(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function St(t){if(xt(t),ye(t),t.value===Be)throw t.error;return t.value}function kr(t){let e=Object.create(Tr);e.computation=t;let r=()=>St(e);return r[ve]=e,r}var We=Symbol("UNSET"),je=Symbol("COMPUTING"),Be=Symbol("ERRORED"),Tr={...qe,value:We,dirty:!0,error:null,equal:wt,producerMustRecompute(t){return t.value===We||t.value===je},producerRecomputeValue(t){if(t.value===je)throw new Error("Detected cycle in computations.");let e=t.value;t.value=je;let r=Ar(t),s,n=!1;try{s=t.computation.call(t.wrapper),n=e!==We&&e!==Be&&t.equal.call(t.wrapper,e,s)}catch(i){s=Be,t.error=i}finally{Cr(t,r)}if(n){t.value=e;return}t.value=s,t.version++}};function Lr(){throw new Error}var Nr=Lr;function Ir(){Nr()}function Or(t){let e=Object.create(Vr);e.value=t;let r=()=>(ye(e),e.value);return r[ve]=e,r}function Pr(){return ye(this),this.value}function Hr(t,e){$r()||Ir(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Mr(t))}var Vr={...qe,equal:wt,value:void 0};function Mr(t){t.version++,_r(),_t(t)}var x=Symbol("node"),_;(t=>{var e,r,s,n,i,o;class p{constructor(m,l={}){ge(this,r),De(this,e);let f=Or(m)[ve];if(this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Pr.call(this[x])}set(m){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(xr())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Hr(l,m)}}e=x,r=new WeakSet,s=function(){},t.isState=u=>typeof u=="object"&&Ue(r,u),t.State=p;class d{constructor(m,l){ge(this,i),De(this,n);let f=kr(m)[ve];if(f.consumerAllowSignalWrites=!0,this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return St(this[x])}}n=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&Ue(i,u),t.Computed=d,(u=>{var m,l,A,f,$;function Yt(v){let g,c=null;try{c=U(null),g=v()}finally{U(c)}return g}u.untrack=Yt;function Xt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((g=v[x].producerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSources=Xt;function Qt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called introspectSinks without a Signal argument");return((g=v[x].liveConsumerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSinks=Qt;function er(v){if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called hasSinks without a Signal argument");let g=v[x].liveConsumerNode;return g?g.length>0:!1}u.hasSinks=er;function tr(v){if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called hasSources without a Computed or Watcher argument");let g=v[x].producerNode;return g?g.length>0:!1}u.hasSources=tr;class rr{constructor(g){ge(this,l),ge(this,f),De(this,m);let c=Object.create(qe);c.wrapper=this,c.consumerMarkedDirty=g,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];c.dirty=!1;let C=U(c);for(let he of g)ye(he[x]);U(C)}unwatch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];W(c);for(let C=c.producerNode.length-1;C>=0;C--)if(g.includes(c.producerNode[C].wrapper)){be(c.producerNode[C],c.producerIndexOfThis[C]);let he=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[he],c.producerIndexOfThis[C]=c.producerIndexOfThis[he],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let nr=c.producerIndexOfThis[C],it=c.producerNode[C];Fe(it),it.liveConsumerIndexOfThis[nr]=C}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[x].producerNode.filter(c=>c.dirty).map(c=>c.wrapper)}}m=x,l=new WeakSet,A=function(){},f=new WeakSet,$=function(v){for(let g of v)if(!(0,t.isComputed)(g)&&!(0,t.isState)(g))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=v=>Ue(l,v),u.Watcher=rr;function sr(){var v;return(v=wr())==null?void 0:v.wrapper}u.currentComputed=sr,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var fs=Symbol("SignalWatcherBrand"),gs=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var we={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Z=t=>(...e)=>({_$litDirective$:t,values:e}),j=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,s){this._$Ct=e,this._$AM=r,this._$Ci=s}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var J=globalThis,xe=J.trustedTypes,At=xe?xe.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ze="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,Ke="?"+T,Rr=`<${Ke}>`,M=document,Y=()=>M.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Je=Array.isArray,Nt=t=>Je(t)||typeof t?.[Symbol.iterator]=="function",Ge=`[
2
+ \f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,Et=/>/g,H=RegExp(`>|${Ge}(?:([^\\s"'>=/]+)(${Ge}*=${Ge}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),kt=/'/g,Tt=/"/g,It=/^(?:script|style|textarea|title)$/i,Ye=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),a=Ye(1),Ot=Ye(2),ws=Ye(3),L=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Lt=new WeakMap,V=M.createTreeWalker(M,129);function Pt(t,e){if(!Je(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(e):e}var Ht=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=K;for(let p=0;p<r;p++){let d=t[p],u,m,l=-1,A=0;for(;A<d.length&&(o.lastIndex=A,m=o.exec(d),m!==null);)A=o.lastIndex,o===K?m[1]==="!--"?o=Ct:m[1]!==void 0?o=Et:m[2]!==void 0?(It.test(m[2])&&(n=RegExp("</"+m[2],"g")),o=H):m[3]!==void 0&&(o=H):o===H?m[0]===">"?(o=n??K,l=-1):m[1]===void 0?l=-2:(l=o.lastIndex-m[2].length,u=m[1],o=m[3]===void 0?H:m[3]==='"'?Tt:kt):o===Tt||o===kt?o=H:o===Ct||o===Et?o=K:(o=H,n=void 0);let f=o===H&&t[p+1].startsWith("/>")?" ":"";i+=o===K?d+Rr:l>=0?(s.push(u),d.slice(0,l)+Ze+d.slice(l)+T+f):d+T+(l===-2?p:f)}return[Pt(t,i+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},Q=class t{constructor({strings:e,_$litType$:r},s){let n;this.parts=[];let i=0,o=0,p=e.length-1,d=this.parts,[u,m]=Ht(e,r);if(this.el=t.createElement(u,s),V.currentNode=this.el.content,r===2||r===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(n=V.nextNode())!==null&&d.length<p;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Ze)){let A=m[o++],f=n.getAttribute(l).split(T),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:f,ctor:$[1]==="."?$e:$[1]==="?"?Se:$[1]==="@"?Ae:D}),n.removeAttribute(l)}else l.startsWith(T)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(It.test(n.tagName)){let l=n.textContent.split(T),A=l.length-1;if(A>0){n.textContent=xe?xe.emptyScript:"";for(let f=0;f<A;f++)n.append(l[f],Y()),V.nextNode(),d.push({type:2,index:++i});n.append(l[A],Y())}}}else if(n.nodeType===8)if(n.data===Ke)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(T,l+1))!==-1;)d.push({type:7,index:i}),l+=T.length-1}i++}}static createElement(e,r){let s=M.createElement("template");return s.innerHTML=e,s}};function R(t,e,r=t,s){if(e===L)return e;let n=s!==void 0?r._$Co?.[s]:r._$Cl,i=X(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(t),n._$AT(t,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=n:r._$Cl=n),n!==void 0&&(e=R(t,n._$AS(t,e.values),n,s)),e}var _e=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:s}=this._$AD,n=(e?.creationScope??M).importNode(r,!0);V.currentNode=n;let i=V.nextNode(),o=0,p=0,d=s[0];for(;d!==void 0;){if(o===d.index){let u;d.type===2?u=new z(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Ce(i,this,e)),this._$AV.push(u),d=s[++p]}o!==d?.index&&(i=V.nextNode(),o++)}return V.currentNode=M,n}p(e){let r=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,r),r+=s.strings.length-2):s._$AI(e[r])),r++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,n){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=R(this,e,r),X(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Nt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==b&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Q.createElement(Pt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new _e(n,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=Lt.get(e.strings);return r===void 0&&Lt.set(e.strings,r=new Q(e)),r}k(e){Je(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,s,n=0;for(let i of e)n===r.length?r.push(s=new t(this.O(Y()),this.O(Y()),this,this.options)):s=r[n],s._$AI(i),n++;n<r.length&&(this._$AR(s&&s._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,s,n,i){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=b}_$AI(e,r=this,s,n){let i=this.strings,o=!1;if(i===void 0)e=R(this,e,r,0),o=!X(e)||e!==this._$AH&&e!==L,o&&(this._$AH=e);else{let p=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=R(this,p[s+d],r,d),u===L&&(u=this._$AH[d]),o||(o=!X(u)||u!==this._$AH[d]),u===b?e=b:e!==b&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}o&&!n&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},$e=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},Se=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},Ae=class extends D{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=R(this,e,r,0)??b)===L)return;let s=this._$AH,n=e===b&&s!==b||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==b&&(s===b||n);n&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ce=class{constructor(e,r,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){R(this,e)}},Vt={M:Ze,P:T,A:Ke,C:1,L:Ht,R:_e,D:Nt,V:R,I:z,H:D,N:Se,U:Ae,B:$e,F:Ce},Dr=J.litHtmlPolyfillSupport;Dr?.(Q,z),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Mt=(t,e,r)=>{let s=r?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=r?.renderBefore??null;s._$litPart$=n=new z(e.insertBefore(Y(),i),i,void 0,r??{})}return n._$AI(t),n};var{I:$s}=Vt;var Rt=t=>t.strings===void 0;var ee=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let s of r)s._$AO?.(e,!1),ee(s,e);return!0},Ee=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},Dt=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),jr(e)}};function Ur(t){this._$AN!==void 0?(Ee(this),this._$AM=t,Dt(this)):this._$AM=t}function Wr(t,e=!1,r=0){let s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let i=r;i<s.length;i++)ee(s[i],!1),Ee(s[i]);else s!=null&&(ee(s,!1),Ee(s));else ee(this,t)}var jr=t=>{t.type==we.CHILD&&(t._$AP??(t._$AP=Wr),t._$AQ??(t._$AQ=Ur))},ke=class extends j{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,s){super._$AT(e,r,s),Dt(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ee(this,e),Ee(this))}setValue(e){if(Rt(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Te=class extends ke{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new _.Computed((()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}));let e=this._$Su=new _.subtle.Watcher((()=>{var r;(r=this._$SO)===null||r===void 0||r._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(_.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return _.subtle.untrack((()=>e.get()))}update(e,[r]){var s,n;return(s=this._$SO)!==null&&s!==void 0||(this._$SO=(n=e.options)===null||n===void 0?void 0:n.host),r!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=r,this._$Sl(),_.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},Xe=Z(Te);var Qe=t=>(e,...r)=>t(e,...r.map((s=>s instanceof _.State||s instanceof _.Computed?Xe(s):s))),zr=Qe(a),Br=Qe(Ot);var zs=_.State,Bs=_.Computed,Ut=(t,e)=>new _.State(t,e);function qr(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var B=Ut(qr());function Wt(t){if(t!==B.get()&&(B.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(r){console.warn("ds-one: unable to persist theme preference",r)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=B.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}var Le=globalThis,Ne=Le.ShadowRoot&&(Le.ShadyCSS===void 0||Le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),jt=new WeakMap,te=class{constructor(e,r,s){if(this._$cssResult$=!0,s!==et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Ne&&e===void 0){let s=r!==void 0&&r.length===1;s&&(e=jt.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&jt.set(r,e))}return e}toString(){return this.cssText}},zt=t=>new te(typeof t=="string"?t:t+"",void 0,et),y=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((s,n,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new te(r,t,et)},Bt=(t,e)=>{if(Ne)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let s=document.createElement("style"),n=Le.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=r.cssText,t.appendChild(s)}},tt=Ne?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let s of e.cssRules)r+=s.cssText;return zt(r)})(t):t;var{is:Fr,defineProperty:Gr,getOwnPropertyDescriptor:Zr,getOwnPropertyNames:Kr,getOwnPropertySymbols:Jr,getPrototypeOf:Yr}=Object,O=globalThis,qt=O.trustedTypes,Xr=qt?qt.emptyScript:"",Qr=O.reactiveElementPolyfillSupport,re=(t,e)=>t,rt={toAttribute(t,e){switch(e){case Boolean:t=t?Xr:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Gt=(t,e)=>!Fr(t,e),Ft={attribute:!0,type:String,converter:rt,reflect:!1,useDefault:!1,hasChanged:Gt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);var N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=Ft){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let s=Symbol(),n=this.getPropertyDescriptor(e,s,r);n!==void 0&&Gr(this.prototype,e,n)}}static getPropertyDescriptor(e,r,s){let{get:n,set:i}=Zr(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let p=n?.call(this);i?.call(this,o),this.requestUpdate(e,p,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ft}static _$Ei(){if(this.hasOwnProperty(re("elementProperties")))return;let e=Yr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(re("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(re("properties"))){let r=this.properties,s=[...Kr(r),...Jr(r)];for(let n of s)this.createProperty(n,r[n])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[s,n]of r)this.elementProperties.set(s,n)}this._$Eh=new Map;for(let[r,s]of this.elementProperties){let n=this._$Eu(r,s);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let n of s)r.unshift(tt(n))}else e!==void 0&&r.push(tt(e));return r}static _$Eu(e,r){let s=r.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let s of r.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,s){this._$AK(e,s)}_$ET(e,r){let s=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,s);if(n!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:rt).toAttribute(r,s.type);this._$Em=e,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,r){let s=this.constructor,n=s._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let i=s.getPropertyOptions(n),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:rt;this._$Em=n;let p=o.fromAttribute(r,i.type);this[n]=p??this._$Ej?.get(n)??p,this._$Em=null}}requestUpdate(e,r,s){if(e!==void 0){let n=this.constructor,i=this[e];if(s??(s=n.getPropertyOptions(e)),!((s.hasChanged??Gt)(i,r)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,r,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:s,reflect:n,wrapped:i},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??r??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(r=void 0),this._$AL.set(e,r)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[n,i]of s){let{wrapped:o}=i,p=this[n];o!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,i,p)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(r)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[re("elementProperties")]=new Map,N[re("finalized")]=new Map,Qr?.({ReactiveElement:N}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.1.1");var se=globalThis,h=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Mt(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};h._$litElement$=!0,h.finalized=!0,se.litElementHydrateSupport?.({LitElement:h});var es=se.litElementPolyfillSupport;es?.({LitElement:h});(se.litElementVersions??(se.litElementVersions=[])).push("4.2.1");var ne=class extends h{constructor(){super(),this._handleLanguageChange=()=>{this._updateText()},this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1,this._text=null}connectedCallback(){super.connectedCallback(),this._updateText(),window.addEventListener("language-changed",this._handleLanguageChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this._handleLanguageChange)}updated(e){super.updated(e),(e.has("key")||e.has("defaultText"))&&this._updateText()}_updateText(){this.key?this._text=fe(this.key):this._text=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return a`
4
4
  <button
5
5
  class=${this.variant}
6
6
  ?disabled=${this.disabled}
@@ -8,17 +8,17 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
8
8
  ?no-background=${this["no-background"]}
9
9
  @click=${this._handleClick}
10
10
  >
11
- ${this._notionText?this._notionText:o`<slot></slot>`}
11
+ ${this._text?this._text:a`<slot></slot>`}
12
12
  </button>
13
- `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};ne.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},notionKey:{type:String,attribute:"notion-key"},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0},_notionText:{type:String,state:!0}};ne.styles=c`
13
+ `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};ne.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0},_text:{type:String,state:!0}};ne.styles=y`
14
14
  button {
15
- max-height: calc(var(--08) * var(--scaling-factor));
15
+ max-height: calc(var(--08) * var(--sf));
16
16
  border: none;
17
17
  cursor: pointer;
18
- font-size: calc(var(--type-size-default) * var(--scaling-factor));
19
- padding: 0 calc(1px * var(--scaling-factor));
18
+ font-size: calc(var(--type-size-default) * var(--sf));
19
+ padding: 0 calc(1px * var(--sf));
20
20
  color: var(--button-text-color);
21
- font-family: var(--typeface);
21
+ font-family: var(--typeface-regular);
22
22
  }
23
23
 
24
24
  button.title {
@@ -30,13 +30,13 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
30
30
  background-color: var(--accent-color);
31
31
  color: var(--button-text-color);
32
32
  text-decoration-line: none;
33
- font-family: var(--typeface);
33
+ font-family: var(--typeface-regular);
34
34
  }
35
35
 
36
36
  button.secondary {
37
37
  background-color: var(--button-background-color-secondary);
38
38
  color: var(--button-text-color);
39
- font-family: var(--typeface);
39
+ font-family: var(--typeface-regular);
40
40
  }
41
41
 
42
42
  button[bold] {
@@ -60,15 +60,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
60
60
  .loading {
61
61
  opacity: 0.7;
62
62
  }
63
- `;customElements.define("ds-button",ne);var ke=class extends l{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._loadText()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"";return}try{let e=x(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this.requestUpdate()}render(){return o`<span>${this._text||this.defaultValue||this.key}</span>`}};ke.styles=c`
64
- :host {
65
- display: inline;
66
- }
67
-
68
- .loading {
69
- opacity: 0.6;
70
- }
71
- `;customElements.define("ds-text",ke);var Ee={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},re=t=>(...e)=>({_$litDirective$:t,values:e}),z=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,n){this._$Ct=e,this._$AM=i,this._$Ci=n}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};var se=class extends z{constructor(e){if(super(e),this.it=w,e.type!==Ee.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===M)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let i=[e];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};se.directiveName="unsafeHTML",se.resultType=1;var ai=re(se);var B=class t extends l{get type(){return this._type}set type(e){let i=this._type;this._type=e,this.requestUpdate("type",i)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),o`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return o`<div class="icon-container">${ai(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),o`
63
+ `;customElements.define("ds-button",ne);var ie=class extends j{constructor(e){if(super(e),this.it=b,e.type!==we.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this._t=void 0,this.it=e;if(e===L)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};ie.directiveName="unsafeHTML",ie.resultType=1;var Zt=Z(ie);var q=class t extends h{get type(){return this._type}set type(e){let r=this._type;this._type=e,this.requestUpdate("type",r)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),a`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return a`<div class="icon-container">${Zt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),a`
72
64
  <div class="icon-container">
73
65
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
74
66
  <path
@@ -76,7 +68,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
76
68
  />
77
69
  </svg>
78
70
  </div>
79
- `;case"page":return console.log("Rendering page icon"),o`
71
+ `;case"page":return console.log("Rendering page icon"),a`
80
72
  <div class="icon-container">
81
73
  <svg viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg">
82
74
  <rect
@@ -91,7 +83,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
91
83
  />
92
84
  </svg>
93
85
  </div>
94
- `;case"note":return console.log("Rendering note icon"),o`
86
+ `;case"note":return console.log("Rendering note icon"),a`
95
87
  <div class="icon-container">
96
88
  <svg viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg">
97
89
  <rect
@@ -110,7 +102,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
110
102
  />
111
103
  </svg>
112
104
  </div>
113
- `;case"default":return console.log("Rendering default icon"),o`
105
+ `;case"default":return console.log("Rendering default icon"),a`
114
106
  <div class="icon-container">
115
107
  <svg
116
108
  width="17"
@@ -137,7 +129,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
137
129
  />
138
130
  </svg>
139
131
  </div>
140
- `;case"big":return console.log("Rendering big icon"),o`
132
+ `;case"big":return console.log("Rendering big icon"),a`
141
133
  <div class="icon-container">
142
134
  <svg
143
135
  width="17"
@@ -176,7 +168,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
176
168
  </defs>
177
169
  </svg>
178
170
  </div>
179
- `;case"gallery":return console.log("Rendering gallery icon"),o`
171
+ `;case"gallery":return console.log("Rendering gallery icon"),a`
180
172
  <div class="icon-container">
181
173
  <svg
182
174
  width="17"
@@ -211,7 +203,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
211
203
  </defs>
212
204
  </svg>
213
205
  </div>
214
- `;case"check":return console.log("Rendering check icon"),o`
206
+ `;case"check":return console.log("Rendering check icon"),a`
215
207
  <div class="icon-container">
216
208
  <svg
217
209
  viewBox="0 0 17 17"
@@ -230,13 +222,13 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
230
222
  />
231
223
  </svg>
232
224
  </div>
233
- `;default:return console.log(`Unknown icon type: ${this._type}, rendering default slot`),o`<div class="icon-container"><slot></slot></div>`}}updated(e){console.log("Icon updated",e),this.style.setProperty("--icon-size",this.size),this.style.setProperty("--icon-color",this.color),this.style.setProperty("--icon-background",this.background)}render(){return console.log("Icon render",this._type),this.renderIcon()}};B.properties={type:{type:String,reflect:!0}};B.styles=c`
225
+ `;default:return console.log(`Unknown icon type: ${this._type}, rendering default slot`),a`<div class="icon-container"><slot></slot></div>`}}updated(e){console.log("Icon updated",e),this.style.setProperty("--icon-size",this.size),this.style.setProperty("--icon-color",this.color),this.style.setProperty("--icon-background",this.background)}render(){return console.log("Icon render",this._type),this.renderIcon()}};q.properties={type:{type:String,reflect:!0}};q.styles=y`
234
226
  :host {
235
227
  display: inline-flex;
236
228
  justify-content: center;
237
229
  align-items: center;
238
- width: calc(16px * var(--scaling-factor));
239
- height: calc(16px * var(--scaling-factor));
230
+ width: calc(16px * var(--sf));
231
+ height: calc(16px * var(--sf));
240
232
  }
241
233
 
242
234
  svg {
@@ -253,37 +245,45 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
253
245
  display: flex;
254
246
  justify-content: center;
255
247
  align-items: center;
256
- width: calc(16px * var(--scaling-factor));
257
- height: calc(16px * var(--scaling-factor));
248
+ width: calc(16px * var(--sf));
249
+ height: calc(16px * var(--sf));
258
250
  }
259
251
 
260
252
  /* Notes style color variable for future implementation */
261
253
  :host {
262
254
  --notes-style-color: #ffb6b9;
263
255
  }
264
- `;B.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[i,n]of Object.entries(t)){let s=(i.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();s&&(e[s]=n)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",B);console.log("Icon component registered with custom elements registry");var Ae=class extends l{static get properties(){return{href:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.href="",this._text="",this.boundHandlers={languageChanged:(()=>{this._loadText()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),e.has("href")&&this._loadText()}_loadText(){try{let e=x("link");this._text=e||"Link"}catch(e){console.error("Error loading text for key 'link':",e),this._text="Link"}this.requestUpdate()}render(){return this.href?o`
265
- <a href="${this.href}" target="_blank" rel="noopener noreferrer">
266
- ${this._text}
267
- <ds-icon type="open"></ds-icon>
268
- </a>
269
- `:o`<span>${this._text}</span>`}};Ae.styles=c`
256
+ `;q.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[r,s]of Object.entries(t)){let i=(r.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();i&&(e[i]=s)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",q);console.log("Icon component registered with custom elements registry");var Ie=class extends h{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this._currentLanguage=S.value,this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._currentLanguage=S.value,this._loadText(),this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._currentLanguage=S.value,this._updateLanguageAttribute(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_updateLanguageAttribute(){(this._currentLanguage||S.value)==="ja"?this.setAttribute("data-language","ja"):this.removeAttribute("data-language")}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"";return}try{let e=fe(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this._updateLanguageAttribute(),this.requestUpdate()}render(){return a`<span>${this._text||this.defaultValue||this.key}</span>`}};Ie.styles=y`
270
257
  :host {
271
258
  display: inline;
272
- font-family: var(--typeface);
273
- }
274
-
275
- a {
276
- color: inherit;
277
- text-decoration: none;
259
+ font-family: var(--typeface-regular);
260
+ font-size: calc(var(--type-size-default) * var(--sf));
261
+ font-weight: var(--type-weight-default);
262
+ line-height: calc(var(--type-lineheight-default) * var(--sf));
263
+ letter-spacing: calc(var(--type-letterspacing-default) * var(--sf));
264
+ text-align: var(--text-align-default);
265
+ text-transform: var(--text-transform-default);
266
+ text-decoration: var(--text-decoration-default);
278
267
  }
279
268
 
280
- ds-icon {
281
- display: inline-block;
282
- vertical-align: middle;
269
+ :host([data-language="ja"]) {
270
+ font-family: var(--typeface-regular-jp);
283
271
  }
284
- `;customElements.define("ds-link",Ae);var Qi=Object.defineProperty,en=(t,e,i)=>e in t?Qi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ht=(t,e,i)=>(en(t,typeof e!="symbol"?e+"":e,i),i),tn=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ut=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},Le=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},li=(t,e,i)=>(tn(t,e,"access private method"),i);function ci(t,e){return Object.is(t,e)}var b=null,oe=!1,Te=1,Ne=Symbol("SIGNAL");function q(t){let e=b;return b=t,e}function nn(){return b}function rn(){return oe}var vt={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ie(t){if(oe)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(b===null)return;b.consumerOnSignalRead(t);let e=b.nextProducerIndex++;if(F(b),e<b.producerNode.length&&b.producerNode[e]!==t&&ft(b)){let i=b.producerNode[e];Me(i,b.producerIndexOfThis[e])}b.producerNode[e]!==t&&(b.producerNode[e]=t,b.producerIndexOfThis[e]=ft(b)?ui(t,b,e):0),b.producerLastReadVersion[e]=t.version}function sn(){Te++}function di(t){if(!(!t.dirty&&t.lastCleanEpoch===Te)){if(!t.producerMustRecompute(t)&&!dn(t)){t.dirty=!1,t.lastCleanEpoch=Te;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Te}}function hi(t){if(t.liveConsumerNode===void 0)return;let e=oe;oe=!0;try{for(let i of t.liveConsumerNode)i.dirty||an(i)}finally{oe=e}}function on(){return b?.consumerAllowSignalWrites!==!1}function an(t){var e;t.dirty=!0,hi(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function ln(t){return t&&(t.nextProducerIndex=0),q(t)}function cn(t,e){if(q(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(ft(t))for(let i=t.nextProducerIndex;i<t.producerNode.length;i++)Me(t.producerNode[i],t.producerIndexOfThis[i]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function dn(t){F(t);for(let e=0;e<t.producerNode.length;e++){let i=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==i.version||(di(i),n!==i.version))return!0}return!1}function ui(t,e,i){var n;if(yt(t),F(t),t.liveConsumerNode.length===0){(n=t.watched)==null||n.call(t.wrapper);for(let r=0;r<t.producerNode.length;r++)t.producerIndexOfThis[r]=ui(t.producerNode[r],t,r)}return t.liveConsumerIndexOfThis.push(i),t.liveConsumerNode.push(e)-1}function Me(t,e){var i;if(yt(t),F(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(i=t.unwatched)==null||i.call(t.wrapper);for(let r=0;r<t.producerNode.length;r++)Me(t.producerNode[r],t.producerIndexOfThis[r])}let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let r=t.liveConsumerIndexOfThis[e],s=t.liveConsumerNode[e];F(s),s.producerIndexOfThis[r]=e}}function ft(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function F(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function yt(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function pi(t){if(di(t),Ie(t),t.value===mt)throw t.error;return t.value}function hn(t){let e=Object.create(un);e.computation=t;let i=()=>pi(e);return i[Ne]=e,i}var pt=Symbol("UNSET"),gt=Symbol("COMPUTING"),mt=Symbol("ERRORED"),un={...vt,value:pt,dirty:!0,error:null,equal:ci,producerMustRecompute(t){return t.value===pt||t.value===gt},producerRecomputeValue(t){if(t.value===gt)throw new Error("Detected cycle in computations.");let e=t.value;t.value=gt;let i=ln(t),n,r=!1;try{n=t.computation.call(t.wrapper),r=e!==pt&&e!==mt&&t.equal.call(t.wrapper,e,n)}catch(s){n=mt,t.error=s}finally{cn(t,i)}if(r){t.value=e;return}t.value=n,t.version++}};function pn(){throw new Error}var gn=pn;function fn(){gn()}function mn(t){let e=Object.create(wn);e.value=t;let i=()=>(Ie(e),e.value);return i[Ne]=e,i}function vn(){return Ie(this),this.value}function yn(t,e){on()||fn(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,bn(t))}var wn={...vt,equal:ci,value:void 0};function bn(t){t.version++,sn(),hi(t)}var _=Symbol("node"),S;(t=>{var e,i,n,r,s,a;class g{constructor(v,d={}){Le(this,i),ht(this,e);let f=mn(v)[Ne];if(this[_]=f,f.wrapper=this,d){let C=d.equals;C&&(f.equal=C),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return vn.call(this[_])}set(v){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(rn())throw new Error("Writes to signals not permitted during Watcher callback");let d=this[_];yn(d,v)}}e=_,i=new WeakSet,n=function(){},t.isState=p=>typeof p=="object"&&ut(i,p),t.State=g;class u{constructor(v,d){Le(this,s),ht(this,r);let f=hn(v)[Ne];if(f.consumerAllowSignalWrites=!0,this[_]=f,f.wrapper=this,d){let C=d.equals;C&&(f.equal=C),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return pi(this[_])}}r=_,s=new WeakSet,a=function(){},t.isComputed=p=>typeof p=="object"&&ut(s,p),t.Computed=u,(p=>{var v,d,A,f,C;function $i(y){let m,h=null;try{h=q(null),m=y()}finally{q(h)}return m}p.untrack=$i;function Si(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((m=y[_].producerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSources=Si;function Ci(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called introspectSinks without a Signal argument");return((m=y[_].liveConsumerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSinks=Ci;function ki(y){if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called hasSinks without a Signal argument");let m=y[_].liveConsumerNode;return m?m.length>0:!1}p.hasSinks=ki;function Ei(y){if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called hasSources without a Computed or Watcher argument");let m=y[_].producerNode;return m?m.length>0:!1}p.hasSources=Ei;class Ai{constructor(m){Le(this,d),Le(this,f),ht(this,v);let h=Object.create(vt);h.wrapper=this,h.consumerMarkedDirty=m,h.consumerIsAlwaysLive=!0,h.consumerAllowSignalWrites=!1,h.producerNode=[],this[_]=h}watch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");li(this,f,C).call(this,m);let h=this[_];h.dirty=!1;let L=q(h);for(let me of m)Ie(me[_]);q(L)}unwatch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");li(this,f,C).call(this,m);let h=this[_];F(h);for(let L=h.producerNode.length-1;L>=0;L--)if(m.includes(h.producerNode[L].wrapper)){Me(h.producerNode[L],h.producerIndexOfThis[L]);let me=h.producerNode.length-1;if(h.producerNode[L]=h.producerNode[me],h.producerIndexOfThis[L]=h.producerIndexOfThis[me],h.producerNode.length--,h.producerIndexOfThis.length--,h.nextProducerIndex--,L<h.producerNode.length){let Ti=h.producerIndexOfThis[L],kt=h.producerNode[L];yt(kt),kt.liveConsumerIndexOfThis[Ti]=L}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[_].producerNode.filter(h=>h.dirty).map(h=>h.wrapper)}}v=_,d=new WeakSet,A=function(){},f=new WeakSet,C=function(y){for(let m of y)if(!(0,t.isComputed)(m)&&!(0,t.isState)(m))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=y=>ut(d,y),p.Watcher=Ai;function Li(){var y;return(y=nn())==null?void 0:y.wrapper}p.currentComputed=Li,p.watched=Symbol("watched"),p.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(S||(S={}));var kr=Symbol("SignalWatcherBrand"),Er=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var{I:Ir}=Gt;var gi=t=>t.strings===void 0;var ae=(t,e)=>{let i=t._$AN;if(i===void 0)return!1;for(let n of i)n._$AO?.(e,!1),ae(n,e);return!0},He=t=>{let e,i;do{if((e=t._$AM)===void 0)break;i=e._$AN,i.delete(t),t=e}while(i?.size===0)},fi=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(i===void 0)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),$n(e)}};function xn(t){this._$AN!==void 0?(He(this),this._$AM=t,fi(this)):this._$AM=t}function _n(t,e=!1,i=0){let n=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(n))for(let s=i;s<n.length;s++)ae(n[s],!1),He(n[s]);else n!=null&&(ae(n,!1),He(n));else ae(this,t)}var $n=t=>{t.type==Ee.CHILD&&(t._$AP??(t._$AP=_n),t._$AQ??(t._$AQ=xn))},Oe=class extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,i,n){super._$AT(e,i,n),fi(this),this.isConnected=e._$AU}_$AO(e,i=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),i&&(ae(this,e),He(this))}setValue(e){if(gi(this._$Ct))this._$Ct._$AI(e,this);else{let i=[...this._$Ct._$AH];i[this._$Ci]=e,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}};var Ve=class extends Oe{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new S.Computed((()=>{var i;return(i=this._$Sj)===null||i===void 0?void 0:i.get()}));let e=this._$Su=new S.subtle.Watcher((()=>{var i;(i=this._$SO)===null||i===void 0||i._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(S.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return S.subtle.untrack((()=>e.get()))}update(e,[i]){var n,r;return(n=this._$SO)!==null&&n!==void 0||(this._$SO=(r=e.options)===null||r===void 0?void 0:r.host),i!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=i,this._$Sl(),S.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},wt=re(Ve);var bt=t=>(e,...i)=>t(e,...i.map((n=>n instanceof S.State||n instanceof S.Computed?wt(n):n))),Sn=bt(o),Cn=bt(qt);var Xr=S.State,Qr=S.Computed,mi=(t,e)=>new S.State(t,e);function kn(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var O=mi(kn());function De(t){if(t!==O.get()&&(O.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(i){console.warn("ds-one: unable to persist theme preference",i)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=O.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}function W(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:settings"),n={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:settings",JSON.stringify(n))}catch(e){console.warn("ds-one: unable to persist settings",e)}}var En=t=>{localStorage.setItem("accentColor",t)},_t=()=>localStorage.getItem("accentColor")||"--blue",xt=()=>{let t=_t();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},An=t=>{localStorage.setItem("notesStyleMedium",t)},vi=()=>localStorage.getItem("notesStyleMedium")||"note",yi=t=>{localStorage.setItem("pageStyle",t)},le=()=>localStorage.getItem("pageStyle")||"note",Pe=class extends l{static get properties(){return{type:{type:String},values:{type:Array},label:{type:String},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.label="",this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=ct();this.values=e,this.currentValue=$.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=O.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){this.values=["--light-green","--green","--light-blue","--blue","--pink","--red","--orange","--yellow"];let e=_t();this.currentValue=e,xt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=vi();this.currentValue=e;let i=le();this.disabled=i==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=le();this.currentValue=e,this.label=this.getLabel()}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0],this.label="");this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",n),document.documentElement.classList.add(`${n}-theme`)}}attributeChangedCallback(e,i,n){super.attributeChangedCallback(e,i,n),e==="type"&&i!==n&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=$.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=O.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=_t();this.currentValue=e,xt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){let e=vi();this.currentValue=e;let i=le();this.disabled=i==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=le();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=le();this.currentValue=e,this.label=""}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,document.startViewTransition?document.startViewTransition(()=>{dt(r)}):dt(r),W({language:r}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:r}}))}else if(this.type==="theme"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,De(r),W({theme:r})}else if(this.type==="accent-color"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,En(r),xt(),W({accentColor:r}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:r}}))}else if(this.type==="notes-style-medium"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,An(r),W({notesStyleMedium:r}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:r}}))}else if(this.type==="page-style"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,yi(r),W({pageStyle:r}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:r}}))}else if(this.type==="icon-only"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,yi(r),W({pageStyle:r}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:r}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return si(e,{locale:$.value});if(this.type==="theme"){if(this.translationsReady){let i=E(`themes.${e}`);if(i&&i!==`themes.${e}`)return i}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let i=E(e==="note"?"note":"page");if(i&&i!==(e==="note"?"note":"page"))return i}return e}else if(this.type==="icon-only")return e==="note"?o`<ds-icon type="note"></ds-icon>`:e==="page"?o`<ds-icon type="page"></ds-icon>`:o`<span>${e}</span>`}return e}getColorName(e){let n={"--red":"red","--orange":"orange","--yellow":"yellow","--light-green":"lightGreen","--green":"green","--light-blue":"lightBlue","--blue":"blue","--pink":"pink"}[e];if(n&&this.translationsReady){let r=E(n);if(r&&r!==n)return r}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?o`<ds-icon type="page"></ds-icon>`:e==="note"?o`<ds-icon type="note"></ds-icon>`:e==="default"?o`<ds-icon type="default"></ds-icon>`:e==="big"?o`<ds-icon type="big"></ds-icon>`:e==="gallery"?o`<ds-icon type="gallery"></ds-icon>`:o`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=E("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=E("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=E("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=E("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=E("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return o`
272
+ `;customElements.define("ds-text",Ie);var ts=t=>{localStorage.setItem("accentColor",t)},nt=()=>localStorage.getItem("accentColor")||"--sharp-blue",st=()=>{let t=nt();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},rs=t=>{localStorage.setItem("notesStyleMedium",t)},Kt=()=>localStorage.getItem("notesStyleMedium")||"note",Jt=t=>{localStorage.setItem("pageStyle",t)},oe=()=>localStorage.getItem("pageStyle")||"note",Oe=class extends h{static get properties(){return{type:{type:String},values:{type:Array},label:{type:String},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.label="",this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=Me();this.values=e,this.currentValue=S.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){this.values=["--apple-green","--every-green","--zenith-blue","--sharp-blue","--pink","--tuned-red","--orange","--yellow"];let e=nt();this.currentValue=e,st()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=Kt();this.currentValue=e;let r=oe();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=oe();this.currentValue=e,this.label=this.getLabel()}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0],this.label="");this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",s),document.documentElement.classList.add(`${s}-theme`)}}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e==="type"&&r!==s&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=S.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=nt();this.currentValue=e,st()}else if(this.type==="notes-style-medium"){let e=Kt();this.currentValue=e;let r=oe();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=oe();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=oe();this.currentValue=e,this.label=""}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,document.startViewTransition?document.startViewTransition(()=>{Re(n)}):Re(n),P({language:n}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:n}}))}else if(this.type==="theme"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,Wt(n),P({theme:n})}else if(this.type==="accent-color"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,ts(n),st(),P({accentColor:n}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:n}}))}else if(this.type==="notes-style-medium"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,rs(n),P({notesStyleMedium:n}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:n}}))}else if(this.type==="page-style"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,Jt(n),P({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}else if(this.type==="icon-only"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,Jt(n),P({pageStyle:n}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return yt(e,{locale:S.value});if(this.type==="theme"){if(this.translationsReady){let r=E(e);if(r&&r!==e)return r}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let r=E(e==="note"?"note":"page");if(r&&r!==(e==="note"?"note":"page"))return r}return e}else if(this.type==="icon-only")return e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="page"?a`<ds-icon type="page"></ds-icon>`:a`<span>${e}</span>`}return e}getColorKey(e){return{"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e]||e.replace("--","").replace("-"," ")}getColorName(e){let s={"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e];if(s&&this.translationsReady){let n=E(s);if(n&&n!==s)return n}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?a`<ds-icon type="page"></ds-icon>`:e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="default"?a`<ds-icon type="default"></ds-icon>`:e==="big"?a`<ds-icon type="big"></ds-icon>`:e==="gallery"?a`<ds-icon type="gallery"></ds-icon>`:a`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=E("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=E("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=E("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=E("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=E("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return a`
285
273
  <div class="cycle-container">
286
- ${this.type!=="icon-only"?o`<span class="cycle-label">${this.label}</span>`:""}
274
+ ${this.type!=="icon-only"?a`${this.type==="language"?a`<ds-text
275
+ key="language"
276
+ default-value="Language"
277
+ class="cycle-label"
278
+ ></ds-text>`:this.type==="theme"?a`<ds-text
279
+ key="theme"
280
+ default-value="Theme"
281
+ class="cycle-label"
282
+ ></ds-text>`:this.type==="accent-color"?a`<ds-text
283
+ key="accentColor"
284
+ default-value="Accent color"
285
+ class="cycle-label"
286
+ ></ds-text>`:a`<span class="cycle-label">${this.label}</span>`}`:""}
287
287
  <div
288
288
  style="display: flex; align-items: center; ${this.type==="icon-only"?"justify-content: center;":""}"
289
289
  >
@@ -292,12 +292,23 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
292
292
  ?disabled=${this.disabled}
293
293
  @click=${this.handleButtonClick}
294
294
  >
295
- ${this.type==="notes-style-medium"||this.type==="icon-only"?o`<span
295
+ ${this.type==="notes-style-medium"||this.type==="icon-only"?a`<span
296
296
  style="display: inline-flex; align-items: center; gap: var(--025)"
297
297
  >${this.getValueDisplay(this.currentValue)}</span
298
- >`:o`<span>${this.getValueDisplay(this.currentValue)}</span>`}
298
+ >`:this.type==="theme"?a`<ds-text
299
+ key=${this.currentValue}
300
+ default-value=${this.currentValue}
301
+ ></ds-text>`:this.type==="accent-color"?a`<ds-text
302
+ key=${this.getColorKey(this.currentValue)}
303
+ default-value=${this.getColorName(this.currentValue)}
304
+ ></ds-text>`:this.type==="page-style"?a`<ds-text
305
+ key=${this.currentValue}
306
+ default-value=${this.currentValue}
307
+ ></ds-text>`:a`<ds-text
308
+ default-value=${this.getValueDisplay(this.currentValue)}
309
+ ></ds-text>`}
299
310
  </ds-button>
300
- ${this.type==="accent-color"?o`
311
+ ${this.type==="accent-color"?a`
301
312
  <div
302
313
  class="color-preview"
303
314
  style="background-color: var(${this.currentValue})"
@@ -305,7 +316,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
305
316
  `:""}
306
317
  </div>
307
318
  </div>
308
- `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let i=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",i,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=ct();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};Pe.styles=c`
319
+ `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let r=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",r,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=Me();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};Oe.styles=y`
309
320
  .cycle-container {
310
321
  display: flex;
311
322
  justify-content: space-between;
@@ -316,10 +327,10 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
316
327
  .cycle-label {
317
328
  color: var(--text-color-primary);
318
329
  }
319
- `;customElements.define("ds-cycle",Pe);var ce=class extends l{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}async _loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=await oi(this.key);if(e){this._text=e,this.requestUpdate();return}let i=E(this.key);this._text=i&&i!==this.key?i:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return o`
330
+ `;customElements.define("ds-cycle",Oe);var ae=class extends h{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=E(this.key);this._text=e&&e!==this.key?e:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return a`
320
331
  <span class="slot-wrapper"><slot></slot></span>
321
- ${this._text?o`<div class="${e}">${this._text}</div>`:null}
322
- `}};ce.properties={key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{state:!0},_visible:{state:!0}};ce.styles=c`
332
+ ${this._text?a`<div class="${e}">${this._text}</div>`:null}
333
+ `}};ae.properties={key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{state:!0},_visible:{state:!0}};ae.styles=y`
323
334
  :host {
324
335
  position: relative;
325
336
  display: inline-block;
@@ -337,19 +348,21 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
337
348
  position: absolute;
338
349
  left: 50%;
339
350
  bottom: 100%;
340
- transform: translate(-50%, calc(-2px * var(--scaling-factor)));
351
+ transform: translate(-50%, calc(-2px * var(--sf)));
341
352
  z-index: 1000;
342
353
  pointer-events: none;
343
- height: calc(var(--08) * var(--scaling-factor));
354
+ height: calc(var(--08) * var(--sf));
344
355
  opacity: 0;
345
- transition: opacity 120ms ease, transform 120ms ease;
356
+ transition:
357
+ opacity 120ms ease,
358
+ transform 120ms ease;
346
359
  background-color: light-dark(var(--black), var(--white));
347
360
  color: light-dark(var(--white), var(--black));
348
361
  border-radius: 0;
349
362
  font-size: var(--type-size-default);
350
- padding: 0px calc(1px * var(--scaling-factor));
363
+ padding: 0px calc(1px * var(--sf));
351
364
  font-family: var(
352
- --typeface,
365
+ --typeface-regular,
353
366
  -apple-system,
354
367
  BlinkMacSystemFont,
355
368
  "Segoe UI",
@@ -364,706 +377,57 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
364
377
  .bubble.visible {
365
378
  opacity: 1;
366
379
  }
367
- `;customElements.define("ds-tooltip",ce);var wi={en:"$42",de:"42 \u20AC",fr:"42 \u20AC",es:"42 \u20AC"};function bi({language:t,country:e}){let i=t.toLowerCase(),n=wi[i]??wi.en;return e?`${n} (${e.toUpperCase()})`:n}var Ue=class extends l{static get properties(){return{country:{type:String,reflect:!0},region:{type:String,reflect:!0},_label:{type:String,state:!0},_loading:{type:Boolean,state:!0}}}constructor(){super(),this.country="",this.region="",this._label="",this._loading=!0,this.boundHandlers={languageChanged:(()=>{this._loadPrice()})}}connectedCallback(){super.connectedCallback(),this._loadPrice(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("country")||e.has("region"))&&this._loadPrice()}_loadPrice(){this._loading=!0;let e=$.value,i=this.region||this.country,n=bi({language:e,country:i});this._label=n,this._loading=!1,this.requestUpdate()}render(){return o`<span class="${this._loading?"loading":""}"
368
- >${this._label}</span
369
- >`}};Ue.styles=c`
370
- :host {
371
- display: inline;
372
- }
373
- .loading {
374
- opacity: 0.6;
375
- }
376
- `;customElements.define("ds-price",Ue);var Re;customElements.define("ds-markdown",(Re=class extends l{constructor(){super(...arguments),this.content="",this.title="",this.language="",this.guideId=""}render(){return this.content?o`
377
- <div class="markdown-container">
378
- ${this.title?o`
379
- <div class="markdown-header">
380
- <h1 class="markdown-title">${this.title}</h1>
381
- <div class="markdown-meta">
382
- ${this.language?o`
383
- <span class="markdown-category"
384
- >${this.language}</span
385
- >
386
- `:""}
387
- ${this.guideId?o`
388
- <span class="markdown-tag"
389
- >Guide ID: ${this.guideId}</span
390
- >
391
- `:""}
392
- </div>
393
- </div>
394
- `:""}
395
- <div class="markdown-content">
396
- ${this.renderMarkdown(this.content)}
397
- </div>
398
- </div>
399
- `:o`<div class="markdown-container">
400
- <p>No content available</p>
401
- </div>`}renderMarkdown(e){let i=e.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/```([\s\S]*?)```/g,"<pre><code>$1</code></pre>").replace(/`(.*?)`/g,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>').replace(/\n/g,"<br>");return o`${i}`}},Re.properties={content:{type:String},title:{type:String},language:{type:String},guideId:{type:String}},Re.styles=c`
402
- :host {
403
- display: block;
404
- font-family:
405
- -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
406
- Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
407
- line-height: 1.6;
408
- color: #333;
409
- }
410
-
411
- .markdown-container {
412
- max-width: 800px;
413
- margin: 0 auto;
414
- }
415
-
416
- .markdown-header {
417
- padding-bottom: 1rem;
418
- }
419
-
420
- .markdown-title {
421
- font-weight: 700;
422
- margin: 0 0 0.5rem 0;
423
- color: #2c3e50;
424
- }
425
-
426
- .markdown-meta {
427
- display: flex;
428
- gap: 1rem;
429
- font-size: 0.9rem;
430
- color: #666;
431
- flex-wrap: wrap;
432
- }
433
-
434
- .markdown-category {
435
- background: #e3f2fd;
436
- color: #1976d2;
437
- padding: 0.25rem 0.5rem;
438
- border-radius: 4px;
439
- font-weight: 500;
440
- }
441
-
442
- .markdown-tags {
443
- display: flex;
444
- gap: 0.5rem;
445
- flex-wrap: wrap;
446
- }
447
-
448
- .markdown-tag {
449
- background: #f5f5f5;
450
- color: #666;
451
- padding: 0.25rem 0.5rem;
452
- border-radius: 4px;
453
- font-size: 0.8rem;
454
- }
455
-
456
- .markdown-content {
457
- font-size: 1rem;
458
- }
459
-
460
- .markdown-content h1,
461
- .markdown-content h2,
462
- .markdown-content h3,
463
- .markdown-content h4,
464
- .markdown-content h5,
465
- .markdown-content h6 {
466
- margin-bottom: 1rem;
467
- font-weight: 600;
468
- line-height: 1.3;
469
- }
470
-
471
- .markdown-content h1 {
472
- font-size: 1.8rem;
473
- color: #2c3e50;
474
- }
475
-
476
- .markdown-content h2 {
477
- font-size: 1.5rem;
478
- color: #34495e;
479
- }
480
-
481
- .markdown-content h3 {
482
- font-size: 1.3rem;
483
- color: #2c3e50;
484
- }
485
-
486
- .markdown-content h4 {
487
- font-size: 1.1rem;
488
- color: #34495e;
489
- }
490
-
491
- .markdown-content p {
492
- margin-bottom: 1rem;
493
- line-height: 1.7;
494
- }
495
-
496
- .markdown-content ul,
497
- .markdown-content ol {
498
- }
499
-
500
- .markdown-content li {
501
- margin-bottom: 0.5rem;
502
- }
503
-
504
- .markdown-content blockquote {
505
- border-left: 4px solid #3498db;
506
- padding-left: 1rem;
507
- margin: 1.5rem 0;
508
- font-style: italic;
509
- color: #555;
510
- }
511
-
512
- .markdown-content code {
513
- background: #f8f9fa;
514
- padding: 0.2rem 0.4rem;
515
- border-radius: 3px;
516
- font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
517
- font-size: 0.9em;
518
- }
519
-
520
- .markdown-content pre {
521
- background: #f8f9fa;
522
- padding: 1rem;
523
- border-radius: 5px;
524
- overflow-x: auto;
525
- margin: 1.5rem 0;
526
- }
527
-
528
- .markdown-content pre code {
529
- background: none;
530
- padding: 0;
531
- }
532
-
533
- .markdown-content table {
534
- width: 100%;
535
- border-collapse: collapse;
536
- margin: 1.5rem 0;
537
- }
538
-
539
- .markdown-content th,
540
- .markdown-content td {
541
- padding: 0.75rem;
542
- text-align: left;
543
- }
544
-
545
- .markdown-content th {
546
- background: #f8f9fa;
547
- font-weight: 600;
548
- }
549
-
550
- .markdown-content a {
551
- color: #3498db;
552
- text-decoration: none;
553
- }
554
-
555
- .markdown-content a:hover {
556
- text-decoration: underline;
557
- }
558
-
559
- .markdown-content img {
560
- max-width: 100%;
561
- height: auto;
562
- margin: 1rem 0;
563
- }
564
- `,Re));var de=class extends l{constructor(){super(...arguments),this.state="active"}connectedCallback(){super.connectedCallback(),this._isMobileDevice()&&(this.state="disabled")}_isMobileDevice(){let e=globalThis.navigator,i=globalThis.window,n=e&&(e.userAgent||e.vendor)||i&&i.opera||"",r=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(n),a=(e&&e.maxTouchPoints||0)>1,g=i?Math.min(i.innerWidth||0,i.innerHeight||0)<=820:!1;return r||a&&g}updated(){this._isMobileDevice()&&this.state!=="disabled"&&(this.state="disabled")}_navigateHome(){this.state!=="disabled"&&(window.location.href="./home.html")}_onKeyDown(e){this.state!=="disabled"&&(e?.key==="Enter"||e?.key===" ")&&(e.preventDefault(),this._navigateHome())}render(){let e=this.state==="disabled";return o`
565
- <div class="hover-fill"></div>
566
- <div
567
- class="home ${e?"is-disabled":"is-active"}"
568
- role="button"
569
- aria-disabled="${String(e)}"
570
- tabindex="${e?-1:0}"
571
- @click="${this._navigateHome}"
572
- @keydown="${this._onKeyDown}"
573
- >
574
- <ds-text key="home"></ds-text>
575
- </div>
576
- `}};de.properties={state:{type:String,reflect:!0}};de.styles=c`
577
- :host {
578
- /* local sizing vars, derived from one.css */
579
- --home-visible: calc(var(--1) * 0.1); /* 2px */
580
-
581
- position: relative;
582
- display: flex; /* expand hover zone horizontally */
583
- width: 100%; /* take the whole row width of the app container */
584
- height: calc(
585
- var(--1) * var(--scaling-factor)
586
- ); /* provide hover zone under the tab */
587
- font-family: var(--typeface);
588
- overflow: hidden; /* hide the part above the host */
589
- }
590
-
591
- /* Disabled: preserve full hover area space but keep inactive */
592
- :host([state="disabled"]) {
593
- height: var(--1); /* keep same layout height as active */
594
- overflow: hidden;
595
- }
596
-
597
- .home {
598
- position: absolute;
599
- left: 0;
600
- width: calc(var(--4) * var(--scaling-factor));
601
- height: calc(var(--1) * var(--scaling-factor));
602
- margin: 0 calc(var(--1) * var(--scaling-factor));
603
- display: flex;
604
- align-items: center;
605
- background: var(--accent-color);
606
- color: light-dark(var(--black), var(--black));
607
- user-select: none;
608
- transition: top 120ms ease;
609
- }
610
-
611
- /* Inner text spacing without affecting the 80px outer width */
612
- .home > ds-text {
613
- padding: 0 calc(var(--1) * 0.15 * var(--scaling-factor));
614
- box-sizing: border-box;
615
- height: 100%;
616
- display: inline-flex;
617
- align-items: center;
618
- }
619
-
620
- /* invisible flex filler to extend hover area to the right */
621
- .hover-fill {
622
- flex: 1 1 auto;
623
- }
624
-
625
- /* Active: hidden until hover */
626
- .home.is-active {
627
- cursor: pointer;
628
- /* Hide above, leave a 2px strip visible */
629
- top: calc(var(--home-visible) - var(--1));
630
- }
631
-
632
- /* Reveal the tab when hovering anywhere in the host area
633
- (the host is 80x20, while the tab starts hidden above) */
634
- :host(:hover) .home.is-active {
635
- top: 0;
636
- }
637
-
638
- /* Disabled: stays hidden and not interactive */
639
- .home.is-disabled {
640
- top: calc(var(--home-visible) - var(--1));
641
- cursor: default;
642
- pointer-events: none;
643
- color: var(--accent-color);
644
- }
645
-
646
- .label {
647
- font-size: var(--type-size-default);
648
- }
649
- `;customElements.define("ds-home",de);var We=class extends l{render(){let e=new Date().getFullYear();return o`<span>${e}</span>`}};We.styles=c`
380
+ `;customElements.define("ds-tooltip",ae);var Pe=class extends h{render(){let e=new Date().getFullYear();return a`<span>${e}</span>`}};Pe.styles=y`
650
381
  :host {
651
382
  display: inline;
652
- font-family: var(--typeface, var(--typeface-regular));
383
+ font-family: var(--typeface-regular, var(--typeface-regular-regular));
653
384
  font-size: inherit;
654
385
  color: inherit;
655
386
  }
656
- `;customElements.define("ds-year",We);var je=class extends l{static get properties(){return{gridarea:{type:String,reflect:!0},key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{type:String,state:!0}}}set gridarea(e){let i=this._gridArea;this._gridArea=e,this.style.gridArea=e,this.requestUpdate("gridarea",i)}get gridarea(){return this._gridArea}constructor(){super(),this._gridArea="",this.key="",this.defaultValue="",this._text="",this.boundHandlers={languageChanged:(()=>{this._loadText()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||"";return}try{let e=x(this.key);this._text=e||this.defaultValue||this.key}catch(e){console.error(`[ds-title] Error loading text for key "${this.key}":`,e),this._text=this.defaultValue||this.key}}firstUpdated(){this.hasAttribute("gridarea")&&(this.style.gridArea=this.getAttribute("gridarea")||"")}render(){let e=this.key&&this._text;return o` <h1>${e?this._text:o`<slot></slot>`}</h1> `}};je.styles=c`
657
- :host {
658
- display: flex;
659
- padding: calc(2px * var(--scaling-factor));
660
- align-items: flex-start;
661
- }
662
-
663
- h1 {
664
- display: block;
665
- place-content: center;
666
- font-family: var(--typeface);
667
- color: light-dark(var(--black), var(--white));
668
- font-size: calc(36px * var(--scaling-factor));
669
- font-weight: 500;
670
- align-items: center;
671
- letter-spacing: -0.72px;
672
- margin: 0;
673
- height: 45px;
674
- }
675
-
676
- ::slotted(*) {
677
- margin: 0;
678
- width: 100%;
679
- }
680
- `;customElements.define("ds-title",je);var ze=class extends l{static get properties(){return{gridarea:{type:String,reflect:!0}}}set gridarea(e){let i=this._gridArea;this._gridArea=e,this.style.gridArea=e,this.requestUpdate("gridarea",i)}get gridarea(){return this._gridArea}constructor(){super(),this._gridArea=""}firstUpdated(){this.hasAttribute("gridarea")&&(this.style.gridArea=this.getAttribute("gridarea")||"")}render(){return o`
681
- <h2
682
- style="display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; width: 100%;"
683
- >
684
- <slot></slot>
685
- </h2>
686
- `}};ze.styles=c`
687
- :host {
688
- display: flex;
689
- padding: calc(2px * var(--scaling-factor));
690
- align-items: flex-start;
691
- width: 100%;
692
- }
693
-
694
- h2 {
695
- display: flex;
696
- place-content: center;
697
- font-family: var(--typeface);
698
- color: light-dark(var(--black), var(--white));
699
- align-items: center;
700
- font-weight: 500;
701
- font-size: calc(14px * var(--scaling-factor));
702
- margin: 0;
703
- width: 100%;
704
- }
705
-
706
- ::slotted(*) {
707
- margin: 0;
708
- }
709
- `;customElements.define("ds-header",ze);var Be=class extends l{static get properties(){return{year:{type:String,reflect:!0},category:{type:String,reflect:!0},status:{type:String,reflect:!0},type:{type:String,reflect:!0}}}constructor(){super(),this.year="",this.category="",this.status="",this.type="project",this.boundHandlers={languageChanged:(()=>{this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),window.addEventListener("language-changed",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged)}_getStatusClass(e){return e.includes("Done")?"done":e.includes("Ongoing")?"ongoing":e.includes("Pending")?"pending":e.includes("NotStarted")?"not-started":"pending"}render(){return o`
710
- ${this.year?o`
711
- <div class="attribute-row">${x(this.year)||this.year}</div>
712
- `:""}
713
- ${this.category?o`
714
- <div class="attribute-row">
715
- ${this.type==="work"?o`<span
716
- class="status-indicator ${this._getStatusClass(this.status)}"
717
- ></span>`:""}
718
- ${x(this.category)||this.category}
719
- </div>
720
- `:""}
721
- ${this.status&&this.type==="project"?o`
722
- <div class="attribute-row">
723
- <span
724
- class="status-indicator ${this._getStatusClass(this.status)}"
725
- ></span>
726
- ${x(this.status)||this.status}
727
- </div>
728
- `:""}
729
- `}};Be.styles=c`
730
- :host {
731
- display: flex;
732
- flex-direction: row;
733
- gap: calc(16px * var(--scaling-factor));
734
- align-items: flex-start;
735
- }
736
-
737
- .attribute-row {
738
- display: inline-flex;
739
- height: calc(20px * var(--scaling-factor));
740
- padding: 0px calc(2px * var(--scaling-factor));
741
- align-items: flex-start;
742
- gap: calc(5px * var(--scaling-factor));
743
- font-family: var(--typeface);
744
- font-size: calc(14px * var(--scaling-factor));
745
- color: light-dark(var(--slate), var(--slate-dark));
746
- }
747
-
748
- .status-indicator {
749
- width: calc(8px * var(--scaling-factor));
750
- height: calc(8px * var(--scaling-factor));
751
- display: inline-block;
752
- transition:
753
- background 0.2s,
754
- border-radius 0.2s;
755
- }
756
-
757
- .status-indicator.done {
758
- background-color: green;
759
- }
760
-
761
- .status-indicator.ongoing {
762
- background-color: #30adec;
763
- }
764
-
765
- .status-indicator.pending {
766
- background-color: #f6c71c;
767
- }
768
-
769
- .status-indicator.not-started {
770
- background-color: #b1b4b9;
771
- }
772
- `;customElements.define("ds-attributes",Be);var he=class extends l{constructor(){super(),this._handleLanguageChange=()=>{this._resolveUrl()},this.urlEn="",this.urlDa="",this.urlJa="",this.filename="cv",this._activeUrl=""}connectedCallback(){super.connectedCallback(),this._resolveUrl(),window.addEventListener("language-changed",this._handleLanguageChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this._handleLanguageChange)}updated(e){(e.has("urlEn")||e.has("urlDa")||e.has("urlJa"))&&this._resolveUrl()}_resolveUrl(){let i=(($.value||"en-US").split("-")[0]||"en").toLowerCase(),n="";i==="da"?n=this.urlDa||this.urlEn||this.urlJa:i==="ja"?n=this.urlJa||this.urlEn||this.urlDa:n=this.urlEn||this.urlDa||this.urlJa,this._activeUrl=n||""}async _download(){if(!this._activeUrl){console.warn("[ds-downloadcv] No URL available");return}console.log("[ds-downloadcv] Attempting download from:",this._activeUrl);try{let e=await fetch(this._activeUrl,{mode:"cors"});if(console.log("[ds-downloadcv] Fetch response:",e.status,e.statusText),!e.ok)throw new Error(`HTTP ${e.status}`);let i=await e.blob(),n=($.value||"en-US").split("-")[0].toLowerCase(),r=this._inferExtFromUrl(this._activeUrl)||"pdf",s=`${this.filename||"cv"}-${n}.${r}`,a=URL.createObjectURL(i),g=document.createElement("a");g.href=a,g.download=s,document.body.appendChild(g),g.click(),g.remove(),URL.revokeObjectURL(a),console.log("[ds-downloadcv] Download triggered successfully")}catch(e){console.error("[ds-downloadcv] Fetch failed, using fallback:",e),window.open(this._activeUrl,"_blank","noopener,noreferrer")}}_inferExtFromUrl(e){let i=e.indexOf("?"),n=i>=0?e.slice(0,i):e,r=n.lastIndexOf(".");if(r===-1)return null;let s=n.slice(r+1).toLowerCase();return s.length>5?null:s}render(){let e=!this._activeUrl;return o`
773
- <ds-button
774
- variant="primary"
775
- .disabled=${e}
776
- default-text=${E("downloadCV")}
777
- @click=${()=>this._download()}
778
- ></ds-button>
779
- `}};he.properties={urlEn:{type:String,attribute:"url-en",reflect:!0},urlDa:{type:String,attribute:"url-da",reflect:!0},urlJa:{type:String,attribute:"url-ja",reflect:!0},filename:{type:String,reflect:!0},_activeUrl:{type:String,state:!0}};he.styles=c`
780
- :host {
781
- display: inline-flex;
782
- }
783
- `;customElements.define("ds-downloadcv",he);var xi="ds-view-mode",$t="text";function K(){if(typeof window>"u")return $t;try{let t=localStorage.getItem(xi);return t==="image"||t==="text"?t:$t}catch{return $t}}function St(t){if(!(typeof window>"u"))try{localStorage.setItem(xi,t),window.dispatchEvent(new CustomEvent("view-mode-changed",{detail:t}))}catch(e){console.warn("Failed to save view mode:",e)}}function Rs(){let e=K()==="text"?"image":"text";return St(e),e}var qe=class extends l{static get properties(){return{imgLightDesktop:{type:String,reflect:!0,attribute:"img-light-desktop"},imgDarkDesktop:{type:String,reflect:!0,attribute:"img-dark-desktop"},imgLightMobile:{type:String,reflect:!0,attribute:"img-light-mobile"},imgDarkMobile:{type:String,reflect:!0,attribute:"img-dark-mobile"},src:{type:String,reflect:!0},alt:{type:String,reflect:!0},imageToggle:{type:Boolean,reflect:!0,attribute:"image-toggle"},imageOnlyWidth:{type:Number,reflect:!0,attribute:"image-only-width"},priority:{type:Boolean,reflect:!0},externalToggle:{type:Boolean,reflect:!0,attribute:"external-toggle"},mobileKey:{type:String,reflect:!0,attribute:"mobile-key"},desktopKey:{type:String,reflect:!0,attribute:"desktop-key"},textKey:{type:String,reflect:!0,attribute:"text-key"},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{type:String,state:!0},_currentImage:{type:String,state:!0},_imageVisible:{type:Boolean,state:!0},_shouldAnimate:{type:Boolean,state:!0}}}constructor(){super(),this._toggleImage=()=>{this._shouldAnimate=!0,this._imageVisible=!this._imageVisible,this.requestUpdate()},this._handleImageLoad=e=>{e.target.classList.add("loaded")},this.imgLightDesktop="",this.imgDarkDesktop="",this.imgLightMobile="",this.imgDarkMobile="",this.src="",this.alt="",this.imageToggle=!1,this.imageOnlyWidth=480,this.priority=!1,this.externalToggle=!1,this.mobileKey="",this.desktopKey="",this.textKey="",this.defaultValue="",this._text="",this._currentImage="",this._imageVisible=!0,this._shouldAnimate=!1,this._mql=null,this.boundHandlers={languageChanged:(()=>{this._loadText()}),themeChanged:(()=>{this._resolveImage()}),viewportChanged:e=>{this._resolveImage(),this._loadText()},viewModeChanged:(e=>{if(this.imageToggle&&this.externalToggle){let n=e.detail==="image";this._imageVisible!==n&&(this._shouldAnimate=!0,this._imageVisible=n,this.requestUpdate())}})}}updated(e){if(e.has("imageOnlyWidth")){let i=Number(this.imageOnlyWidth)||480;this.style.setProperty("--image-only-width",`${i}px`)}if((e.has("imgLightDesktop")||e.has("imgDarkDesktop")||e.has("imgLightMobile")||e.has("imgDarkMobile")||e.has("src"))&&this._resolveImage(),(e.has("textKey")||e.has("defaultValue")||e.has("mobileKey")||e.has("desktopKey"))&&this._loadText(),e.has("imageToggle")&&!(this.imageToggle&&this.externalToggle)){let n=!this.imageToggle;this._imageVisible!==n&&(this._shouldAnimate=!0,this._imageVisible=n)}}connectedCallback(){if(super.connectedCallback(),this._loadText(),this._resolveImage(),this.imageToggle&&this.externalToggle){let e=K();this._imageVisible=e==="image"}else this._imageVisible=!this.imageToggle;this.style.setProperty("--image-only-width",`${this.imageOnlyWidth}px`);try{this._mql=window.matchMedia("(max-width: 720px)"),this._mql&&this.boundHandlers.viewportChanged&&this._mql.addEventListener("change",this.boundHandlers.viewportChanged)}catch{}window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.themeChanged),this.imageToggle&&this.externalToggle?(window.addEventListener("view-mode-changed",this.boundHandlers.viewModeChanged),setTimeout(()=>{let i=K()==="image";this._imageVisible!==i&&(this._shouldAnimate=!0,this._imageVisible=i,this.requestUpdate())},100)):this.imageToggle&&window.addEventListener("article-toggle",this._toggleImage)}disconnectedCallback(){if(super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.themeChanged),window.removeEventListener("article-toggle",this._toggleImage),window.removeEventListener("view-mode-changed",this.boundHandlers.viewModeChanged),this._mql&&this.boundHandlers.viewportChanged)try{this._mql.removeEventListener("change",this.boundHandlers.viewportChanged)}catch{}}_loadText(){let e=(()=>{try{return window.matchMedia&&window.matchMedia("(max-width: 720px)").matches}catch{return!1}})(),i=(()=>{let n=(this.mobileKey||"").trim(),r=(this.desktopKey||"").trim(),s=(this.textKey||"").trim();return n||r?e?n||s:r||s:s})();if(!i){this._text=this.defaultValue||"";return}try{let n=x(i);this._text=n||this.defaultValue||i}catch(n){console.error(`[ds-article] Error loading text for key "${i}":`,n),this._text=this.defaultValue||i}}_resolveImage(){if(this.src&&typeof this.src=="string"){let r=this.src.startsWith("@")?this.src.slice(1):this.src;this._currentImage=r;return}let e=document.documentElement.getAttribute("data-theme")||"light",i=(()=>{try{return window.matchMedia&&window.matchMedia("(max-width: 720px)").matches}catch{return!1}})(),n="";i?e==="dark"?n=this.imgDarkMobile||this.imgLightMobile:n=this.imgLightMobile||this.imgDarkMobile:e==="dark"?n=this.imgDarkDesktop||this.imgLightDesktop:n=this.imgLightDesktop||this.imgDarkDesktop,typeof n=="string"&&n.startsWith("@")&&(n=n.slice(1)),this._currentImage=n||""}render(){let e=(this.imageToggle?this._imageVisible:!0)&&!!this._currentImage,i=this._shouldAnimate?"fade-in":"";this._shouldAnimate&&(this._shouldAnimate=!1);let n=this._imageVisible?x("hideImage"):x("viewImage");return o`
784
- <div class="container">
785
- ${this.imageToggle&&!this.externalToggle?o`<button @click="${this._toggleImage}" class="toggle-button">
786
- ${n}
787
- </button>`:""}
788
- ${e?o`<figure class="media ${i}">
789
- <img
790
- src="${this._currentImage}"
791
- alt="${this.alt||""}"
792
- loading="${this.priority?"eager":"lazy"}"
793
- fetchpriority="${this.priority?"high":"auto"}"
794
- decoding="async"
795
- @load="${this._handleImageLoad}"
796
- />
797
- </figure>`:o`<p class="copy ${i}">${this._text}</p>`}
798
- </div>
799
- `}};qe.styles=c`
800
- :host {
801
- display: block;
802
- font-family: var(--typeface);
803
- overflow-wrap: break-word;
804
- word-wrap: break-word;
805
- word-break: break-word;
806
- hyphens: auto;
807
- color: light-dark(var(--black), var(--white));
808
- line-height: calc(20px * var(--scaling-factor));
809
- padding: calc(2px * var(--scaling-factor));
810
- }
811
-
812
- .container {
813
- position: relative;
814
- width: min(100%, var(--image-only-width));
815
- }
816
-
817
- figure.media,
818
- .copy {
819
- margin: 0;
820
- width: 100%;
821
- overflow: hidden;
822
- display: block;
823
- margin-bottom: calc(8px * var(--scaling-factor));
824
- }
825
-
826
- .fade-in {
827
- animation: fade-in 0.25s ease;
828
- }
829
-
830
- @keyframes fade-in {
831
- from {
832
- opacity: 0;
833
- }
834
- to {
835
- opacity: 1;
836
- }
837
- }
838
-
839
- img {
840
- display: block;
841
- width: 100%;
842
- height: auto;
843
- opacity: 0;
844
- transition: opacity 0.2s ease-in-out;
845
- }
846
-
847
- img.loaded {
848
- opacity: 1;
849
- }
850
-
851
- .toggle-button {
852
- background: none;
853
- border: none;
854
- color: inherit;
855
- cursor: pointer;
856
- font-family: var(--typeface);
857
- font-size: calc(14px * var(--scaling-factor));
858
- margin-bottom: calc(8px * var(--scaling-factor));
859
- padding: 0;
860
- text-decoration: underline;
861
- }
862
-
863
- .toggle-button:hover {
864
- opacity: 0.7;
865
- }
866
- `;customElements.define("ds-article",qe);var Fe=class extends l{constructor(){super(),this._toggle=()=>{let e=this._mode==="image"?"text":"image";St(e)},this._mode=K(),this.boundHandlers={viewModeChanged:(e=>{let i=e.detail==="image"?"image":"text";this._mode!==i&&(this._mode=i)}),languageChanged:(()=>{this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),window.addEventListener("view-mode-changed",this.boundHandlers.viewModeChanged),window.addEventListener("language-changed",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("view-mode-changed",this.boundHandlers.viewModeChanged),window.removeEventListener("language-changed",this.boundHandlers.languageChanged)}render(){let e=this._mode==="image"?x("hideImage"):x("viewImage");return o`
867
- <ds-button variant="primary" @click=${this._toggle}>${e}</ds-button>
868
- `}};Fe.properties={_mode:{type:String,state:!0}};customElements.define("ds-viewtoggle",Fe);var Ke=class extends l{static get properties(){return{type:{type:String,reflect:!0},shape:{type:String,reflect:!0},href:{type:String},project:{type:String,reflect:!0},loading:{type:Boolean,reflect:!0}}}constructor(){super(),this.type="theme-toggle",this.shape="circle",this.href="",this.project="",this.loading=!1}_handleClick(e){if(this.type==="theme-toggle"){e.preventDefault();let i=O.get()==="light"?"dark":"light";De(i)}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",e=>{this._handleClick(e)})}render(){let e=o`<div
869
- class="container"
870
- @click="${i=>{this._handleClick(i)}}"
871
- ></div>`;return this.type==="link"&&this.href?o`
872
- <a href="${this.href}" @click="${this._handleClick}">${e}</a>
873
- `:o`
874
- <div
875
- class="wrapper"
876
- @click="${i=>{this._handleClick(i)}}"
877
- >
878
- ${e}
879
- </div>
880
- `}};Ke.styles=c`
881
- :host {
882
- background-color: light-dark(var(--black), var(--white));
883
- display: block;
884
- width: calc(120px * var(--scaling-factor));
885
- height: calc(120px * var(--scaling-factor));
886
- cursor: pointer;
887
- pointer-events: auto;
888
- position: relative;
889
- z-index: 1;
890
- }
891
-
892
- :host([shape="circle"]) {
893
- border-radius: 9999px;
894
- }
895
-
896
- :host([shape="circle"]) .wrapper,
897
- :host([shape="circle"]) .container {
898
- border-radius: 9999px;
899
- }
900
-
901
- .wrapper {
902
- width: 100%;
903
- height: 100%;
904
- cursor: pointer;
905
- pointer-events: auto;
906
- }
907
-
908
- .container {
909
- width: 100%;
910
- height: 100%;
911
- background-color: inherit;
912
- cursor: pointer;
913
- pointer-events: auto;
914
- }
915
-
916
- .container:hover {
917
- opacity: 0.8;
918
- }
919
-
920
- a {
921
- display: block;
922
- width: 100%;
923
- height: 100%;
924
- text-decoration: none;
925
- cursor: pointer;
926
- pointer-events: auto;
927
- }
928
-
929
- :host([loading]) {
930
- animation: gentle-pulse 2s ease-in-out infinite;
931
- }
932
-
933
- @keyframes gentle-pulse {
934
- 0% {
935
- opacity: 1;
936
- }
937
- 50% {
938
- opacity: 0.7;
939
- }
940
- 100% {
941
- opacity: 1;
942
- }
943
- }
944
- `;customElements.define("ds-squarecircle",Ke);var Ge=class extends l{render(){return o`<slot></slot>`}};Ge.styles=c`
387
+ `;customElements.define("ds-date",Pe);var He=class extends h{render(){return a`<slot></slot>`}};He.styles=y`
945
388
  :host {
946
389
  display: flex;
947
390
  flex-direction: column;
948
391
  gap: 0;
949
392
  width: 100%;
950
393
  }
951
- `;customElements.define("ds-list",Ge);var Ze=class extends l{render(){return o`<slot></slot>`}};Ze.styles=c`
952
- :host {
953
- display: flex;
954
- flex-direction: row;
955
- height: var(--08);
956
- align-items: end;
957
- gap: var(--025);
958
- }
959
- `;customElements.define("ds-panel",Ze);var ue=class extends l{constructor(){super(),this.type="fill"}render(){return o`<slot></slot>`}};ue.properties={type:{type:String,reflect:!0}};ue.styles=c`
394
+ `;customElements.define("ds-list",He);var le=class extends h{constructor(){super(),this.type="fill"}render(){return a`<slot></slot>`}};le.properties={type:{type:String,reflect:!0}};le.styles=y`
960
395
  :host {
961
396
  display: flex;
962
397
  align-items: end;
963
- width: calc(240px * var(--scaling-factor));
398
+ width: calc(240px * var(--sf));
964
399
  }
965
400
 
966
401
  :host([type="fill"]) {
967
402
  justify-content: space-between;
968
- height: calc(var(--1) * var(--scaling-factor));
403
+ height: calc(var(--1) * var(--sf));
969
404
  }
970
405
 
971
406
  :host([type="centered"]) {
972
407
  justify-content: center;
973
- height: calc(var(--1) * var(--scaling-factor));
974
- gap: calc(var(--025) * var(--scaling-factor));
975
- }
976
- `;customElements.define("ds-row",ue);var Je=class extends l{static get properties(){return{type:{type:String,reflect:!0},to:{type:String,reflect:!0}}}constructor(){super(),this.type="work"}render(){let e=this.getNavConfig(),i=this.to||e.href;return o`
977
- <a href="${i}">
978
- <ds-text key="${e.key}"></ds-text>
979
- <ds-icon type="right"></ds-icon>
980
- </a>
981
- `}getNavConfig(){switch(this.type){case"projects":return{href:"/projects",key:"projects"};case"work":return{href:"/",key:"workExperience"}}}};Je.styles=c`
982
- :host {
983
- display: flex;
984
- justify-content: end;
985
- gap: calc(5px * var(--scaling-factor));
986
- padding: calc(2px * var(--scaling-factor));
987
- align-items: center;
988
- }
989
-
990
- a {
991
- display: inline-flex;
992
- align-items: center;
993
- gap: calc(5px * var(--scaling-factor));
994
- text-decoration: none;
995
- color: inherit;
996
- }
997
- `;customElements.define("ds-singlenav",Je);var Ye=class extends l{static get properties(){return{previous:{type:String,reflect:!0},next:{type:String,reflect:!0},previousText:{type:String,reflect:!0,attribute:"previous-text"},nextText:{type:String,reflect:!0,attribute:"next-text"},overlay:{type:String,reflect:!0}}}constructor(){super(),this.previous="",this.next="",this.previousText="",this.nextText="",this.overlay=""}render(){return o`
998
- ${this.previous?o`
999
- <a href="${this.previous}" class="nav-previous">
1000
- <ds-icon type="left"></ds-icon>
1001
- <ds-text>${this.previousText||"Previous"}</ds-text>
1002
- </a>
1003
- `:o`<div></div>`}
1004
- ${this.next?o`
1005
- <a href="${this.next}" class="nav-next">
1006
- <ds-text>${this.nextText||"Next"}</ds-text>
1007
- <ds-icon type="right"></ds-icon>
1008
- </a>
1009
- `:o`<div></div>`}
1010
- `}};Ye.styles=c`
1011
- :host {
1012
- display: flex;
1013
- justify-content: space-between;
1014
- gap: calc(5px * var(--scaling-factor));
1015
- padding: calc(2px * var(--scaling-factor));
1016
- align-items: center;
1017
- }
1018
-
1019
- a {
1020
- display: inline-flex;
1021
- align-items: center;
1022
- gap: calc(5px * var(--scaling-factor));
1023
- text-decoration: none;
1024
- color: inherit;
1025
- }
1026
-
1027
- .nav-previous {
1028
- justify-self: start;
1029
- }
1030
-
1031
- .nav-next {
1032
- justify-self: end;
1033
- }
1034
-
1035
- .nav-previous ds-icon {
1036
- order: -1;
1037
- }
1038
-
1039
- .nav-next ds-icon {
1040
- padding-top: 3px;
1041
- }
1042
-
1043
- .nav-previous ds-icon {
1044
- padding-top: 3px;
408
+ height: calc(var(--1) * var(--sf));
409
+ gap: calc(var(--025) * var(--sf));
1045
410
  }
1046
- `;customElements.define("ds-doublenav",Ye);var pe=class extends l{constructor(){super(),this.data=[],this.columns=["Product","Users","Retention"],this.showStatus=!0}render(){return o`
411
+ `;customElements.define("ds-row",le);var ce=class extends h{constructor(){super(),this.data=[],this.columns=["Product","Users","Retention"],this.showStatus=!0}render(){return a`
1047
412
  <div class="table-container">
1048
413
  <div class="table-header">
1049
-
1050
414
  <div class="header-cell product-cell">Product</div>
1051
415
  <div class="header-cell users-cell">Users</div>
1052
416
  <div class="header-cell retention-cell">Retention</div>
1053
- ${this.showStatus?o`<div class="header-cell">Status</div>`:""}
417
+ ${this.showStatus?a`<div class="header-cell">Status</div>`:""}
1054
418
  </div>
1055
419
  <div class="table-body">
1056
- ${this.data.map((e,i)=>o`
420
+ ${this.data.map((e,r)=>a`
1057
421
  <div class="data-cell product-cell">${e.product}</div>
1058
422
  <div class="data-cell users-cell">${e.users}</div>
1059
423
  <div class="data-cell retention-cell">${e.retention}</div>
1060
- ${this.showStatus?o`<div class="data-cell status-cell">
424
+ ${this.showStatus?a`<div class="data-cell status-cell">
1061
425
  ${e.status||"Pending"}
1062
426
  </div>`:""}
1063
427
  `)}
1064
428
  </div>
1065
429
  </div>
1066
- `}};pe.properties={data:{type:Array},columns:{type:Array},showStatus:{type:Boolean,attribute:"show-status"}};pe.styles=c`
430
+ `}};ce.properties={data:{type:Array},columns:{type:Array},showStatus:{type:Boolean,attribute:"show-status"}};ce.styles=y`
1067
431
  :host {
1068
432
  display: block;
1069
433
  width: 100%;
@@ -1094,8 +458,8 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1094
458
  display: flex;
1095
459
  align-items: center;
1096
460
  justify-content: left;
1097
- padding: 0 2px;
1098
- font-family: var(--typeface);
461
+ padding: 0 2px;
462
+ font-family: var(--typeface-regular);
1099
463
  font-size: var(--type-size-default);
1100
464
  font-weight: var(--type-weight-default);
1101
465
  line-height: var(--type-lineheight-default);
@@ -1109,10 +473,10 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1109
473
  display: flex;
1110
474
  align-items: center;
1111
475
  justify-content: left;
1112
-
476
+
1113
477
  outline: 1px solid var(--black);
1114
478
 
1115
- font-family: var(--typeface);
479
+ font-family: var(--typeface-regular);
1116
480
  font-size: var(--type-size-default);
1117
481
  font-weight: var(--type-weight-default);
1118
482
  line-height: var(--type-lineheight-default);
@@ -1121,7 +485,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1121
485
  }
1122
486
 
1123
487
  .status-cell {
1124
- background-color: var(--light-green);
488
+ background-color: var(--apple-green);
1125
489
  }
1126
490
 
1127
491
  .product-cell {
@@ -1146,23 +510,19 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1146
510
  grid-template-columns: 1fr 60px 60px 60px;
1147
511
  }
1148
512
  }
1149
- `;customElements.define("ds-table",pe);var ge=class extends l{constructor(){super(...arguments),this._isMobile=!1}connectedCallback(){if(super.connectedCallback(),this._isMobile=Qe(),console.log(`[ds-grid] Mobile device: ${this._isMobile}`),this._isMobile&&(this.classList.add("mobile"),console.log("[ds-grid] Mobile class added")),this._isMobile&&typeof window<"u"){let e=window.innerWidth,i=14,n=.5,r=(i-1)*n,s=(e-r)/i;console.log(`[ds-grid] Mobile grid: ${i} columns \xD7 ${s.toFixed(2)}px + ${r}px gaps = ${e}px`),this.style.setProperty("--mobile-column-size",`${s}px`),this.style.setProperty("--mobile-gap",`${n}px`)}}updated(){this._isMobile?this.classList.add("mobile"):this.classList.remove("mobile")}render(){return o``}};ge.properties={align:{type:String},_isMobile:{type:Boolean,state:!0}};ge.styles=c`
513
+ `;customElements.define("ds-table",ce);var de=class extends h{render(){return a``}};de.properties={align:{type:String}};de.styles=y`
1150
514
  :host {
1151
515
  margin-top: 0.5px !important;
1152
516
  margin-left: 0.5px !important;
1153
517
  display: grid;
1154
518
  width: 1440px;
1155
- height: 100%;
519
+ height: 360px;
1156
520
  grid-template-columns: repeat(auto-fill, 19px);
1157
521
  grid-template-rows: repeat(auto-fill, 19px);
1158
522
  gap: 1px;
1159
- row-rule: calc(1px * var(--scaling-factor)) solid
1160
- light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
1161
- column-rule: calc(1px * var(--scaling-factor)) solid
1162
- light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
1163
- outline:
1164
- 1px solid light-dark(rgb(147, 147, 147)),
1165
- rgb(147, 147, 147);
523
+ row-rule: calc(1px * var(--sf)) solid var(--grid-color);
524
+ column-rule: calc(1px * var(--sf)) solid var(--grid-color);
525
+ outline: 1px solid black;
1166
526
  position: fixed;
1167
527
  top: 0;
1168
528
  left: 50%;
@@ -1173,21 +533,20 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1173
533
 
1174
534
  /* DO NOT CHANGE THIS GRID CODE FOR MOBILE. ITS PERFECT FOR MOBILE. */
1175
535
  :host(.mobile) {
1176
- outline: calc(2px * var(--scaling-factor)) solid rgba(251, 255, 0, 0.9);
1177
- width: calc(100% - calc(1px * var(--scaling-factor)));
536
+ width: calc(100% - calc(1px * var(--sf)));
1178
537
  max-width: 100vw;
1179
538
  margin-left: 0 !important;
1180
539
  margin-top: 0 !important;
1181
540
  box-sizing: border-box;
1182
541
  position: fixed;
1183
- top: calc(0.5px * var(--scaling-factor));
542
+ top: calc(0.5px * var(--sf));
1184
543
  left: 50%;
1185
544
  transform: translateX(-50%);
1186
545
  pointer-events: none;
1187
546
  z-index: 300;
1188
- gap: calc(1px * var(--scaling-factor));
1189
- grid-template-columns: repeat(14, calc(19px * var(--scaling-factor)));
1190
- grid-template-rows: repeat(auto-fill, calc(19px * var(--scaling-factor)));
547
+ gap: calc(1px * var(--sf));
548
+ grid-template-columns: repeat(14, calc(19px * var(--sf)));
549
+ grid-template-rows: repeat(auto-fill, calc(19px * var(--sf)));
1191
550
  }
1192
551
 
1193
552
  :host([align="left"]) {
@@ -1205,28 +564,67 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1205
564
  right: 0;
1206
565
  transform: none;
1207
566
  }
1208
- `;customElements.define("ds-grid",ge);var fe=class extends l{render(){let e=this.debug||this.mode==="debug",i=this.mode==="company";return o`
567
+ `;customElements.define("ds-grid",de);var ue=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.debug||this.mode==="debug",r=this.mode==="portfolio",s=this.mode==="company",n=this.mode==="app";return a`
1209
568
  <slot></slot>
1210
- ${e?o`
569
+ ${e?a`
1211
570
  <div class="debug-overlay">
1212
- ${i?o`
1213
- <div class="debug-area debug-header">header</div>
1214
- <div class="debug-area debug-content">content</div>
1215
- <div class="debug-area debug-footer">footer</div>
1216
- `:o`
1217
- <div class="debug-area debug-square">square</div>
1218
- <div class="debug-area debug-title">title</div>
1219
- <div class="debug-area debug-header">header</div>
1220
- <div class="debug-area debug-projects">projects</div>
1221
- <div class="debug-area debug-bio">bio</div>
1222
- <div class="debug-area debug-nav">nav</div>
1223
- <div class="debug-area debug-footer">footer</div>
1224
- `}
571
+ ${n?a`
572
+ <div class="debug-area debug-banner">
573
+ <ds-text key="banner">banner</ds-text>
574
+ </div>
575
+ <div class="debug-area debug-header">
576
+ <ds-text key="header">header</ds-text>
577
+ </div>
578
+
579
+ <div class="debug-area debug-main">
580
+ <ds-text key="main">main</ds-text>
581
+ </div>
582
+ <div class="debug-area debug-footer-app">
583
+ <ds-text key="footer">footer</ds-text>
584
+ </div>
585
+ `:s?a`
586
+ <div class="debug-area debug-header">
587
+ <ds-text key="header">header</ds-text>
588
+ </div>
589
+ <div class="debug-area debug-content">
590
+ <ds-text key="content">content</ds-text>
591
+ </div>
592
+ <div class="debug-area debug-footer">
593
+ <ds-text key="footer">footer</ds-text>
594
+ </div>
595
+ `:r?a`
596
+ <div class="debug-area debug-square">
597
+ <ds-text key="square">square</ds-text>
598
+ </div>
599
+ <div class="debug-area debug-title">
600
+ <ds-text key="title">title</ds-text>
601
+ </div>
602
+ <div class="debug-area debug-header">
603
+ <ds-text key="header">header</ds-text>
604
+ </div>
605
+ <div class="debug-area debug-projects">
606
+ <ds-text key="projects">projects</ds-text>
607
+ </div>
608
+ <div class="debug-area debug-bio">
609
+ <ds-text key="bio">bio</ds-text>
610
+ </div>
611
+ <div class="debug-area debug-nav">
612
+ <ds-text key="nav">nav</ds-text>
613
+ </div>
614
+ <div class="debug-area debug-footer">
615
+ <ds-text key="footer">footer</ds-text>
616
+ </div>
617
+ `:""}
1225
618
  </div>
1226
619
  `:""}
1227
- `}};fe.properties={mode:{type:String},align:{type:String},debug:{type:Boolean}};fe.styles=c`
620
+ `}};ue.properties={mode:{type:String},align:{type:String},debug:{type:Boolean}};ue.styles=y`
1228
621
  :host {
1229
622
  display: grid;
623
+ position: relative;
624
+ width: 100%;
625
+ }
626
+
627
+ :host([mode="portfolio"]) {
1230
628
  grid-template-columns: 120px 480px 40px;
1231
629
  grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
1232
630
  grid-template-areas:
@@ -1243,8 +641,6 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1243
641
  ". . .";
1244
642
  min-height: 600px;
1245
643
  background-color: rgba(165, 165, 165, 0.03);
1246
- position: relative;
1247
- width: 100%;
1248
644
  max-width: 640px;
1249
645
  margin: 0 auto;
1250
646
  }
@@ -1278,6 +674,29 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1278
674
  justify-self: end;
1279
675
  }
1280
676
 
677
+ /* App mode - Base */
678
+ :host([mode="app"]) {
679
+ grid-template-columns: 1fr;
680
+ grid-template-rows: calc(var(--1) * var(--sf)) 20px 1fr auto;
681
+ grid-template-areas:
682
+ "banner"
683
+ "main"
684
+ "footer";
685
+ min-height: 100vh;
686
+ background-color: transparent;
687
+ width: 100%;
688
+ margin: 0 auto;
689
+ gap: 0;
690
+ }
691
+
692
+ /* App mode - with scaling factor */
693
+ :host([mode="app"]) {
694
+ max-width: calc(400px * var(--sf, 1));
695
+ padding: calc(60px * var(--sf, 1)) calc(28px * var(--sf, 1))
696
+ calc(9.751px * var(--sf, 1));
697
+ gap: calc(28px * var(--sf, 1));
698
+ }
699
+
1281
700
  .debug-overlay {
1282
701
  position: absolute;
1283
702
  margin-left: -1px;
@@ -1290,6 +709,9 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1290
709
  display: grid;
1291
710
  font-size: 18px;
1292
711
  font-weight: bold;
712
+ }
713
+
714
+ :host([mode="portfolio"]) .debug-overlay {
1293
715
  grid-template-columns: 120px 480px;
1294
716
  grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
1295
717
  grid-template-areas:
@@ -1325,7 +747,7 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1325
747
  justify-content: center;
1326
748
  font-size: 10px;
1327
749
  font-weight: var(--type-weight-default);
1328
- font-family: var(--typeface);
750
+ font-family: var(--typeface-regular);
1329
751
  color: var(--black);
1330
752
  border: 1px solid red;
1331
753
  opacity: 1;
@@ -1361,41 +783,51 @@ function Qe(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1361
783
 
1362
784
  .debug-footer {
1363
785
  grid-area: footer;
1364
- border-color: #ffa500;
786
+ border-color: rgb(24, 147, 73);
787
+ background-color: rgba(127, 123, 11, 0.1);
1365
788
  }
1366
789
 
1367
790
  .debug-content {
1368
791
  grid-area: content;
1369
792
  border-color: rgba(71, 231, 71, 0.63);
1370
793
  }
1371
- `;customElements.define("ds-layout",fe);var Ct="ds-scroll-position";function _i(){if(!(typeof window>"u"))try{let t={x:window.scrollX,y:window.scrollY};sessionStorage.setItem(Ct,JSON.stringify(t))}catch(t){console.warn("[DS one] Failed to save scroll position:",t)}}function Ln(){if(typeof window>"u")return null;try{let t=sessionStorage.getItem(Ct);if(!t)return null;let e=JSON.parse(t);return typeof e.x=="number"&&typeof e.y=="number"&&!isNaN(e.x)&&!isNaN(e.y)?e:null}catch(t){return console.warn("[DS one] Failed to retrieve scroll position:",t),null}}function Tn(t={}){if(typeof window>"u")return!1;let e=Ln();if(!e)return!1;try{return requestAnimationFrame(()=>{window.scrollTo({left:e.x,top:e.y,behavior:t.smooth?"smooth":"instant"}),t.clear&&Nn(),window.dispatchEvent(new CustomEvent("scroll-restored",{detail:e}))}),!0}catch(i){return console.warn("[DS one] Failed to restore scroll position:",i),!1}}function Nn(){if(!(typeof window>"u"))try{sessionStorage.removeItem(Ct)}catch(t){console.warn("[DS one] Failed to clear scroll position:",t)}}function In(t={}){if(typeof window>"u")return;let{autoSave:e=!0,autoRestore:i=!0,smooth:n=!1,clearOnRestore:r=!1}=t;if(e&&(window.addEventListener("beforeunload",()=>{_i()}),window.addEventListener("pagehide",()=>{_i()})),i){let s=()=>{Tn({smooth:n,clear:r})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s()}}typeof window<"u"&&In({autoSave:!0,autoRestore:!0,smooth:!1,clearOnRestore:!1});export{qe as Article,Be as Attributes,ne as Button,Pe as Cycle,Ye as DoubleNav,he as DownloadCV,pe as DsTable,ge as Grid,ze as Header,de as Home,B as Icon,fe as Layout,Ae as Link,Ge as List,Ze as Panel,Ue as Price,ue as Row,Je as SingleNav,Ke as SquareCircle,ke as Text,je as Title,ce as Tooltip,Fe as ViewToggle,We as Year,Nn as clearScrollPosition,$ as currentLanguage,O as currentTheme,Qe as detectMobileDevice,nr as getAvailableLanguages,ct as getAvailableLanguagesSync,Yi as getBrowserLanguage,Ni as getDeviceInfo,si as getLanguageDisplayName,oi as getNotionText,bi as getPriceLabel,Ln as getScrollPosition,x as getText,K as getViewMode,tr as hasTranslation,Xe as initDeviceDetection,In as initScrollManagement,rr as loadTranslations,Tn as restoreScrollPosition,_i as saveScrollPosition,W as saveSettings,dt as setLanguage,ir as setNotionText,De as setTheme,St as setViewMode,Rs as toggleViewMode,E as translate};
1372
- /*! Bundled license information:
1373
794
 
1374
- @lit/reactive-element/css-tag.js:
1375
- (**
1376
- * @license
1377
- * Copyright 2019 Google LLC
1378
- * SPDX-License-Identifier: BSD-3-Clause
1379
- *)
795
+ :host([mode="app"]) .debug-overlay {
796
+ grid-template-columns: 1fr;
797
+ grid-template-rows:
798
+ calc(var(--1) * var(--sf))
799
+ calc(var(--2) * var(--sf))
800
+ calc(var(--4) * var(--sf))
801
+ calc(var(--1) * var(--sf));
802
+ grid-template-areas:
803
+ "banner"
804
+ "header"
805
+ "main"
806
+ "footer";
807
+ }
1380
808
 
1381
- @lit/reactive-element/reactive-element.js:
1382
- lit-html/lit-html.js:
1383
- lit-element/lit-element.js:
1384
- lit-html/directive.js:
1385
- lit-html/directives/unsafe-html.js:
1386
- lit-html/async-directive.js:
1387
- (**
1388
- * @license
1389
- * Copyright 2017 Google LLC
1390
- * SPDX-License-Identifier: BSD-3-Clause
1391
- *)
809
+ .debug-banner {
810
+ grid-area: banner;
811
+ border-color: #daed09;
812
+ }
1392
813
 
1393
- lit-html/is-server.js:
1394
- (**
1395
- * @license
1396
- * Copyright 2022 Google LLC
1397
- * SPDX-License-Identifier: BSD-3-Clause
1398
- *)
814
+ .debug-header {
815
+ grid-area: header;
816
+ border-color: #0000ff;
817
+ background-color: rgba(127, 123, 11, 0.5);
818
+ }
819
+
820
+ .debug-main {
821
+ grid-area: main;
822
+ border-color: #0000ff;
823
+ }
824
+
825
+ .debug-footer-app {
826
+ grid-area: footer;
827
+ border-color: #ffa500;
828
+ }
829
+ `;customElements.define("ds-layout",ue);export{ne as Button,Oe as Cycle,Pe as DateComponent,ce as DsTable,de as Grid,q as Icon,ue as Layout,He as List,le as Row,Ie as Text,ae as Tooltip,S as currentLanguage,B as currentTheme,ir as detectMobileDevice,os as getAvailableLanguages,Me as getAvailableLanguagesSync,gr as getBrowserLanguage,or as getDeviceInfo,yt as getLanguageDisplayName,ds as getPriceLabel,fe as getText,is as hasTranslation,Ve as initDeviceDetection,as as loadTranslations,P as savePreferences,Re as setLanguage,Wt as setTheme,E as translate};
830
+ /*! Bundled license information:
1399
831
 
1400
832
  signal-polyfill/dist/index.js:
1401
833
  (**
@@ -1432,11 +864,37 @@ signal-polyfill/dist/index.js:
1432
864
  * SPDX-License-Identifier: BSD-3-Clause
1433
865
  *)
1434
866
 
867
+ lit-html/directive.js:
868
+ lit-html/lit-html.js:
869
+ lit-html/async-directive.js:
870
+ @lit/reactive-element/reactive-element.js:
871
+ lit-element/lit-element.js:
872
+ lit-html/directives/unsafe-html.js:
873
+ (**
874
+ * @license
875
+ * Copyright 2017 Google LLC
876
+ * SPDX-License-Identifier: BSD-3-Clause
877
+ *)
878
+
1435
879
  lit-html/directive-helpers.js:
1436
880
  (**
1437
881
  * @license
1438
882
  * Copyright 2020 Google LLC
1439
883
  * SPDX-License-Identifier: BSD-3-Clause
1440
884
  *)
885
+
886
+ @lit/reactive-element/css-tag.js:
887
+ (**
888
+ * @license
889
+ * Copyright 2019 Google LLC
890
+ * SPDX-License-Identifier: BSD-3-Clause
891
+ *)
892
+
893
+ lit-html/is-server.js:
894
+ (**
895
+ * @license
896
+ * Copyright 2022 Google LLC
897
+ * SPDX-License-Identifier: BSD-3-Clause
898
+ *)
1441
899
  */
1442
900
  //# sourceMappingURL=ds-one.bundle.min.js.map