@maggioli-design-system/magma 2.7.0 → 2.9.0

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 (363) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +45 -0
  3. package/agents/lint.md +20 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/magma-components.cjs.js +1 -1
  6. package/dist/cjs/mds-banner_3.cjs.entry.js +7 -6
  7. package/dist/cjs/mds-book.cjs.entry.js +53 -5
  8. package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
  9. package/dist/cjs/mds-emoji.cjs.entry.js +39 -9
  10. package/dist/cjs/mds-filter.cjs.entry.js +1 -1
  11. package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
  12. package/dist/cjs/mds-modal.cjs.entry.js +1 -1
  13. package/dist/cjs/mds-push-notification-item.cjs.entry.js +17 -4
  14. package/dist/cjs/mds-toast.cjs.entry.js +2 -2
  15. package/dist/collection/components/mds-accordion/AGENTS.md +2 -1
  16. package/dist/collection/components/mds-accordion/documentation.json +4 -2
  17. package/dist/collection/components/mds-accordion-item/AGENTS.md +2 -1
  18. package/dist/collection/components/mds-accordion-item/documentation.json +4 -2
  19. package/dist/collection/components/mds-accordion-timer/AGENTS.md +2 -1
  20. package/dist/collection/components/mds-accordion-timer/documentation.json +4 -2
  21. package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +2 -1
  22. package/dist/collection/components/mds-accordion-timer-item/documentation.json +4 -2
  23. package/dist/collection/components/mds-author/AGENTS.md +2 -1
  24. package/dist/collection/components/mds-author/documentation.json +4 -2
  25. package/dist/collection/components/mds-avatar/AGENTS.md +2 -1
  26. package/dist/collection/components/mds-avatar/documentation.json +4 -2
  27. package/dist/collection/components/mds-avatar-stack/AGENTS.md +2 -1
  28. package/dist/collection/components/mds-avatar-stack/documentation.json +4 -2
  29. package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +2 -1
  30. package/dist/collection/components/mds-avatar-stack-item/documentation.json +4 -2
  31. package/dist/collection/components/mds-badge/AGENTS.md +2 -1
  32. package/dist/collection/components/mds-badge/documentation.json +4 -2
  33. package/dist/collection/components/mds-banner/AGENTS.md +7 -4
  34. package/dist/collection/components/mds-banner/antipattern.md +5 -5
  35. package/dist/collection/components/mds-banner/documentation.json +40 -6
  36. package/dist/collection/components/mds-banner/mds-banner.css +7 -10
  37. package/dist/collection/components/mds-banner/mds-banner.js +30 -7
  38. package/dist/collection/components/mds-banner/pattern.md +4 -4
  39. package/dist/collection/components/mds-benchmark-bar/AGENTS.md +2 -1
  40. package/dist/collection/components/mds-benchmark-bar/documentation.json +4 -2
  41. package/dist/collection/components/mds-bibliography/AGENTS.md +2 -1
  42. package/dist/collection/components/mds-bibliography/documentation.json +4 -2
  43. package/dist/collection/components/mds-book/AGENTS.md +9 -4
  44. package/dist/collection/components/mds-book/documentation.json +46 -6
  45. package/dist/collection/components/mds-book/mds-book.css +91 -7
  46. package/dist/collection/components/mds-book/mds-book.js +79 -7
  47. package/dist/collection/components/mds-book/pattern.md +14 -0
  48. package/dist/collection/components/mds-breadcrumb/AGENTS.md +2 -1
  49. package/dist/collection/components/mds-breadcrumb/documentation.json +4 -2
  50. package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +2 -1
  51. package/dist/collection/components/mds-breadcrumb-item/documentation.json +4 -2
  52. package/dist/collection/components/mds-button/AGENTS.md +2 -1
  53. package/dist/collection/components/mds-button/documentation.json +4 -2
  54. package/dist/collection/components/mds-button-dropdown/AGENTS.md +2 -1
  55. package/dist/collection/components/mds-button-dropdown/documentation.json +4 -2
  56. package/dist/collection/components/mds-button-group/AGENTS.md +2 -1
  57. package/dist/collection/components/mds-button-group/documentation.json +4 -2
  58. package/dist/collection/components/mds-calendar/AGENTS.md +2 -1
  59. package/dist/collection/components/mds-calendar/documentation.json +4 -2
  60. package/dist/collection/components/mds-calendar-cell/AGENTS.md +2 -1
  61. package/dist/collection/components/mds-calendar-cell/documentation.json +4 -2
  62. package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.css +4 -1
  63. package/dist/collection/components/mds-card/AGENTS.md +2 -1
  64. package/dist/collection/components/mds-card/documentation.json +4 -2
  65. package/dist/collection/components/mds-card-content/AGENTS.md +2 -1
  66. package/dist/collection/components/mds-card-content/documentation.json +4 -2
  67. package/dist/collection/components/mds-card-footer/AGENTS.md +2 -1
  68. package/dist/collection/components/mds-card-footer/documentation.json +4 -2
  69. package/dist/collection/components/mds-card-header/AGENTS.md +2 -1
  70. package/dist/collection/components/mds-card-header/documentation.json +4 -2
  71. package/dist/collection/components/mds-card-media/AGENTS.md +2 -1
  72. package/dist/collection/components/mds-card-media/documentation.json +4 -2
  73. package/dist/collection/components/mds-chip/AGENTS.md +2 -1
  74. package/dist/collection/components/mds-chip/documentation.json +4 -2
  75. package/dist/collection/components/mds-details/AGENTS.md +2 -1
  76. package/dist/collection/components/mds-details/documentation.json +4 -2
  77. package/dist/collection/components/mds-dropdown/AGENTS.md +2 -1
  78. package/dist/collection/components/mds-dropdown/documentation.json +4 -2
  79. package/dist/collection/components/mds-emoji/AGENTS.md +2 -1
  80. package/dist/collection/components/mds-emoji/asset/simi.svg +1 -1
  81. package/dist/collection/components/mds-emoji/documentation.json +4 -2
  82. package/dist/collection/components/mds-emoji/mds-emoji.js +38 -8
  83. package/dist/collection/components/mds-entity/AGENTS.md +2 -1
  84. package/dist/collection/components/mds-entity/documentation.json +4 -2
  85. package/dist/collection/components/mds-file/AGENTS.md +2 -1
  86. package/dist/collection/components/mds-file/documentation.json +4 -2
  87. package/dist/collection/components/mds-file-preview/AGENTS.md +2 -1
  88. package/dist/collection/components/mds-file-preview/documentation.json +4 -2
  89. package/dist/collection/components/mds-filter/AGENTS.md +3 -2
  90. package/dist/collection/components/mds-filter/documentation.json +10 -2
  91. package/dist/collection/components/mds-filter/mds-filter.css +5 -1
  92. package/dist/collection/components/mds-filter-item/AGENTS.md +2 -1
  93. package/dist/collection/components/mds-filter-item/documentation.json +4 -2
  94. package/dist/collection/components/mds-header/AGENTS.md +2 -1
  95. package/dist/collection/components/mds-header/documentation.json +5 -3
  96. package/dist/collection/components/mds-header/pattern.md +3 -3
  97. package/dist/collection/components/mds-header-bar/AGENTS.md +2 -1
  98. package/dist/collection/components/mds-header-bar/documentation.json +4 -2
  99. package/dist/collection/components/mds-help/AGENTS.md +2 -1
  100. package/dist/collection/components/mds-help/documentation.json +4 -2
  101. package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +2 -1
  102. package/dist/collection/components/mds-horizontal-scroll/documentation.json +4 -2
  103. package/dist/collection/components/mds-hr/AGENTS.md +2 -1
  104. package/dist/collection/components/mds-hr/documentation.json +4 -2
  105. package/dist/collection/components/mds-icon/AGENTS.md +2 -1
  106. package/dist/collection/components/mds-icon/documentation.json +4 -2
  107. package/dist/collection/components/mds-img/AGENTS.md +2 -1
  108. package/dist/collection/components/mds-img/documentation.json +4 -2
  109. package/dist/collection/components/mds-input/AGENTS.md +2 -1
  110. package/dist/collection/components/mds-input/documentation.json +4 -2
  111. package/dist/collection/components/mds-input-date/AGENTS.md +2 -1
  112. package/dist/collection/components/mds-input-date/documentation.json +4 -2
  113. package/dist/collection/components/mds-input-date-range/AGENTS.md +2 -1
  114. package/dist/collection/components/mds-input-date-range/documentation.json +4 -2
  115. package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +2 -1
  116. package/dist/collection/components/mds-input-date-range-preselection/documentation.json +4 -2
  117. package/dist/collection/components/mds-input-field/AGENTS.md +2 -1
  118. package/dist/collection/components/mds-input-field/documentation.json +4 -2
  119. package/dist/collection/components/mds-input-otp/AGENTS.md +2 -1
  120. package/dist/collection/components/mds-input-otp/documentation.json +5 -3
  121. package/dist/collection/components/mds-input-otp/pattern.md +1 -1
  122. package/dist/collection/components/mds-input-range/AGENTS.md +2 -1
  123. package/dist/collection/components/mds-input-range/documentation.json +4 -2
  124. package/dist/collection/components/mds-input-range/mds-input-range.css +7 -5
  125. package/dist/collection/components/mds-input-select/AGENTS.md +2 -1
  126. package/dist/collection/components/mds-input-select/documentation.json +4 -2
  127. package/dist/collection/components/mds-input-switch/AGENTS.md +2 -1
  128. package/dist/collection/components/mds-input-switch/documentation.json +4 -2
  129. package/dist/collection/components/mds-input-tip/AGENTS.md +2 -1
  130. package/dist/collection/components/mds-input-tip/documentation.json +4 -2
  131. package/dist/collection/components/mds-input-tip-item/AGENTS.md +2 -1
  132. package/dist/collection/components/mds-input-tip-item/documentation.json +4 -2
  133. package/dist/collection/components/mds-input-upload/AGENTS.md +2 -1
  134. package/dist/collection/components/mds-input-upload/documentation.json +4 -2
  135. package/dist/collection/components/mds-keyboard/AGENTS.md +2 -1
  136. package/dist/collection/components/mds-keyboard/documentation.json +4 -2
  137. package/dist/collection/components/mds-keyboard-key/AGENTS.md +2 -1
  138. package/dist/collection/components/mds-keyboard-key/documentation.json +4 -2
  139. package/dist/collection/components/mds-kpi/AGENTS.md +2 -1
  140. package/dist/collection/components/mds-kpi/documentation.json +4 -2
  141. package/dist/collection/components/mds-kpi-item/AGENTS.md +2 -1
  142. package/dist/collection/components/mds-kpi-item/documentation.json +4 -2
  143. package/dist/collection/components/mds-label/AGENTS.md +2 -1
  144. package/dist/collection/components/mds-label/documentation.json +4 -2
  145. package/dist/collection/components/mds-link/AGENTS.md +2 -1
  146. package/dist/collection/components/mds-link/documentation.json +4 -2
  147. package/dist/collection/components/mds-list/AGENTS.md +2 -1
  148. package/dist/collection/components/mds-list/documentation.json +4 -2
  149. package/dist/collection/components/mds-list-item/AGENTS.md +2 -1
  150. package/dist/collection/components/mds-list-item/documentation.json +4 -2
  151. package/dist/collection/components/mds-mention/AGENTS.md +2 -1
  152. package/dist/collection/components/mds-mention/documentation.json +4 -2
  153. package/dist/collection/components/mds-modal/AGENTS.md +5 -1
  154. package/dist/collection/components/mds-modal/documentation.json +5 -3
  155. package/dist/collection/components/mds-modal/mds-modal.css +136 -3
  156. package/dist/collection/components/mds-note/AGENTS.md +2 -1
  157. package/dist/collection/components/mds-note/documentation.json +4 -2
  158. package/dist/collection/components/mds-notification/AGENTS.md +2 -1
  159. package/dist/collection/components/mds-notification/documentation.json +4 -2
  160. package/dist/collection/components/mds-paginator/AGENTS.md +2 -1
  161. package/dist/collection/components/mds-paginator/documentation.json +4 -2
  162. package/dist/collection/components/mds-paginator-item/AGENTS.md +2 -1
  163. package/dist/collection/components/mds-paginator-item/documentation.json +4 -2
  164. package/dist/collection/components/mds-policy-ai/AGENTS.md +2 -1
  165. package/dist/collection/components/mds-policy-ai/documentation.json +4 -2
  166. package/dist/collection/components/mds-pref/AGENTS.md +2 -1
  167. package/dist/collection/components/mds-pref/documentation.json +4 -2
  168. package/dist/collection/components/mds-pref-animation/AGENTS.md +2 -1
  169. package/dist/collection/components/mds-pref-animation/documentation.json +4 -2
  170. package/dist/collection/components/mds-pref-consumption/AGENTS.md +2 -1
  171. package/dist/collection/components/mds-pref-consumption/documentation.json +4 -2
  172. package/dist/collection/components/mds-pref-contrast/AGENTS.md +2 -1
  173. package/dist/collection/components/mds-pref-contrast/documentation.json +4 -2
  174. package/dist/collection/components/mds-pref-language/AGENTS.md +2 -1
  175. package/dist/collection/components/mds-pref-language/documentation.json +4 -2
  176. package/dist/collection/components/mds-pref-language-item/AGENTS.md +2 -1
  177. package/dist/collection/components/mds-pref-language-item/documentation.json +4 -2
  178. package/dist/collection/components/mds-pref-mode/AGENTS.md +2 -1
  179. package/dist/collection/components/mds-pref-mode/documentation.json +4 -2
  180. package/dist/collection/components/mds-pref-theme/AGENTS.md +2 -1
  181. package/dist/collection/components/mds-pref-theme/documentation.json +4 -2
  182. package/dist/collection/components/mds-pref-theme-item/AGENTS.md +2 -1
  183. package/dist/collection/components/mds-pref-theme-item/documentation.json +4 -2
  184. package/dist/collection/components/mds-price-table/AGENTS.md +2 -1
  185. package/dist/collection/components/mds-price-table/documentation.json +4 -2
  186. package/dist/collection/components/mds-price-table-features/AGENTS.md +2 -1
  187. package/dist/collection/components/mds-price-table-features/documentation.json +4 -2
  188. package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +2 -1
  189. package/dist/collection/components/mds-price-table-features-cell/documentation.json +4 -2
  190. package/dist/collection/components/mds-price-table-features-row/AGENTS.md +2 -1
  191. package/dist/collection/components/mds-price-table-features-row/documentation.json +4 -2
  192. package/dist/collection/components/mds-price-table-header/AGENTS.md +2 -1
  193. package/dist/collection/components/mds-price-table-header/documentation.json +4 -2
  194. package/dist/collection/components/mds-price-table-list/AGENTS.md +2 -1
  195. package/dist/collection/components/mds-price-table-list/documentation.json +4 -2
  196. package/dist/collection/components/mds-price-table-list-item/AGENTS.md +2 -1
  197. package/dist/collection/components/mds-price-table-list-item/documentation.json +4 -2
  198. package/dist/collection/components/mds-progress/AGENTS.md +2 -1
  199. package/dist/collection/components/mds-progress/documentation.json +4 -2
  200. package/dist/collection/components/mds-push-notification/AGENTS.md +3 -2
  201. package/dist/collection/components/mds-push-notification/documentation.json +6 -4
  202. package/dist/collection/components/mds-push-notification/pattern.md +2 -2
  203. package/dist/collection/components/mds-push-notification-item/AGENTS.md +6 -3
  204. package/dist/collection/components/mds-push-notification-item/documentation.json +38 -5
  205. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +1 -0
  206. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +40 -5
  207. package/dist/collection/components/mds-push-notification-item/pattern.md +3 -3
  208. package/dist/collection/components/mds-quote/AGENTS.md +2 -1
  209. package/dist/collection/components/mds-quote/documentation.json +4 -2
  210. package/dist/collection/components/mds-radial-menu/AGENTS.md +2 -1
  211. package/dist/collection/components/mds-radial-menu/documentation.json +4 -2
  212. package/dist/collection/components/mds-radial-menu-item/AGENTS.md +2 -1
  213. package/dist/collection/components/mds-radial-menu-item/documentation.json +4 -2
  214. package/dist/collection/components/mds-radial-progress/AGENTS.md +2 -1
  215. package/dist/collection/components/mds-radial-progress/documentation.json +4 -2
  216. package/dist/collection/components/mds-separator/AGENTS.md +2 -1
  217. package/dist/collection/components/mds-separator/documentation.json +4 -2
  218. package/dist/collection/components/mds-spinner/AGENTS.md +2 -1
  219. package/dist/collection/components/mds-spinner/documentation.json +5 -3
  220. package/dist/collection/components/mds-spinner/pattern.md +9 -6
  221. package/dist/collection/components/mds-status-bar/AGENTS.md +2 -1
  222. package/dist/collection/components/mds-status-bar/documentation.json +4 -2
  223. package/dist/collection/components/mds-stepper-bar/AGENTS.md +2 -1
  224. package/dist/collection/components/mds-stepper-bar/documentation.json +4 -2
  225. package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +2 -1
  226. package/dist/collection/components/mds-stepper-bar-item/documentation.json +4 -2
  227. package/dist/collection/components/mds-tab/AGENTS.md +2 -1
  228. package/dist/collection/components/mds-tab/documentation.json +4 -2
  229. package/dist/collection/components/mds-tab-bar/AGENTS.md +2 -1
  230. package/dist/collection/components/mds-tab-bar/documentation.json +4 -2
  231. package/dist/collection/components/mds-tab-bar-item/AGENTS.md +2 -1
  232. package/dist/collection/components/mds-tab-bar-item/documentation.json +4 -2
  233. package/dist/collection/components/mds-tab-item/AGENTS.md +2 -1
  234. package/dist/collection/components/mds-tab-item/documentation.json +4 -2
  235. package/dist/collection/components/mds-table/AGENTS.md +2 -1
  236. package/dist/collection/components/mds-table/documentation.json +4 -2
  237. package/dist/collection/components/mds-table-body/AGENTS.md +2 -1
  238. package/dist/collection/components/mds-table-body/documentation.json +4 -2
  239. package/dist/collection/components/mds-table-cell/AGENTS.md +2 -1
  240. package/dist/collection/components/mds-table-cell/documentation.json +4 -2
  241. package/dist/collection/components/mds-table-footer/AGENTS.md +2 -1
  242. package/dist/collection/components/mds-table-footer/documentation.json +4 -2
  243. package/dist/collection/components/mds-table-header/AGENTS.md +2 -1
  244. package/dist/collection/components/mds-table-header/documentation.json +4 -2
  245. package/dist/collection/components/mds-table-header-cell/AGENTS.md +2 -1
  246. package/dist/collection/components/mds-table-header-cell/documentation.json +4 -2
  247. package/dist/collection/components/mds-table-row/AGENTS.md +7 -2
  248. package/dist/collection/components/mds-table-row/documentation.json +11 -3
  249. package/dist/collection/components/mds-table-row/mds-table-row.css +1 -0
  250. package/dist/collection/components/mds-table-row/pattern.md +14 -1
  251. package/dist/collection/components/mds-text/AGENTS.md +2 -1
  252. package/dist/collection/components/mds-text/documentation.json +4 -2
  253. package/dist/collection/components/mds-toast/AGENTS.md +8 -5
  254. package/dist/collection/components/mds-toast/antipattern.md +2 -2
  255. package/dist/collection/components/mds-toast/documentation.json +40 -6
  256. package/dist/collection/components/mds-toast/mds-toast.js +26 -4
  257. package/dist/collection/components/mds-toast/pattern.md +2 -2
  258. package/dist/collection/components/mds-toast-region/AGENTS.md +2 -1
  259. package/dist/collection/components/mds-toast-region/documentation.json +5 -3
  260. package/dist/collection/components/mds-toast-region/pattern.md +10 -2
  261. package/dist/collection/components/mds-tooltip/AGENTS.md +2 -1
  262. package/dist/collection/components/mds-tooltip/documentation.json +4 -2
  263. package/dist/collection/components/mds-tree/AGENTS.md +3 -2
  264. package/dist/collection/components/mds-tree/documentation.json +5 -3
  265. package/dist/collection/components/mds-tree/pattern.md +13 -13
  266. package/dist/collection/components/mds-tree-item/AGENTS.md +2 -1
  267. package/dist/collection/components/mds-tree-item/documentation.json +4 -2
  268. package/dist/collection/components/mds-url-view/AGENTS.md +2 -1
  269. package/dist/collection/components/mds-url-view/documentation.json +4 -2
  270. package/dist/collection/components/mds-usage/AGENTS.md +2 -1
  271. package/dist/collection/components/mds-usage/documentation.json +4 -2
  272. package/dist/collection/components/mds-video-wall/AGENTS.md +2 -1
  273. package/dist/collection/components/mds-video-wall/documentation.json +4 -2
  274. package/dist/collection/components/mds-zero/AGENTS.md +2 -1
  275. package/dist/collection/components/mds-zero/documentation.json +4 -2
  276. package/dist/components/mds-banner.js +1 -1
  277. package/dist/components/mds-book.js +1 -1
  278. package/dist/components/mds-calendar-cell.js +1 -1
  279. package/dist/components/mds-calendar.js +1 -1
  280. package/dist/components/mds-emoji.js +1 -1
  281. package/dist/components/mds-filter.js +1 -1
  282. package/dist/components/mds-header.js +1 -1
  283. package/dist/components/mds-input-date-range.js +1 -1
  284. package/dist/components/mds-input-date.js +1 -1
  285. package/dist/components/mds-input-range.js +1 -1
  286. package/dist/components/mds-modal.js +1 -1
  287. package/dist/components/mds-policy-ai.js +1 -1
  288. package/dist/components/mds-push-notification-item.js +1 -1
  289. package/dist/components/mds-status-bar.js +1 -1
  290. package/dist/components/mds-toast.js +1 -1
  291. package/dist/components/p-BeZGLnJJ.js +1 -0
  292. package/dist/components/p-Chk4rI7N.js +1 -0
  293. package/dist/components/{p-CNpL55c-.js → p-Cwg4vtOr.js} +1 -1
  294. package/dist/components/p-Dzkiu-es.js +1 -0
  295. package/dist/documentation.json +406 -143
  296. package/dist/esm/loader.js +1 -1
  297. package/dist/esm/magma-components.js +1 -1
  298. package/dist/esm/mds-banner_3.entry.js +7 -6
  299. package/dist/esm/mds-book.entry.js +53 -5
  300. package/dist/esm/mds-calendar_2.entry.js +1 -1
  301. package/dist/esm/mds-emoji.entry.js +39 -9
  302. package/dist/esm/mds-filter.entry.js +1 -1
  303. package/dist/esm/mds-input-range.entry.js +1 -1
  304. package/dist/esm/mds-modal.entry.js +1 -1
  305. package/dist/esm/mds-push-notification-item.entry.js +17 -4
  306. package/dist/esm/mds-toast.entry.js +2 -2
  307. package/dist/esm-es5/loader.js +1 -1
  308. package/dist/esm-es5/magma-components.js +1 -1
  309. package/dist/esm-es5/mds-banner_3.entry.js +2 -2
  310. package/dist/esm-es5/mds-book.entry.js +33 -26
  311. package/dist/esm-es5/mds-calendar_2.entry.js +8 -8
  312. package/dist/esm-es5/mds-emoji.entry.js +40 -31
  313. package/dist/esm-es5/mds-filter.entry.js +1 -1
  314. package/dist/esm-es5/mds-input-range.entry.js +7 -7
  315. package/dist/esm-es5/mds-modal.entry.js +15 -15
  316. package/dist/esm-es5/mds-push-notification-item.entry.js +7 -3
  317. package/dist/esm-es5/mds-toast.entry.js +2 -2
  318. package/dist/hydrate/index.js +130 -32
  319. package/dist/hydrate/index.mjs +130 -32
  320. package/dist/lint/core/checks.d.ts +5 -0
  321. package/dist/lint/core/checks.js +17 -0
  322. package/dist/lint/core/data.d.ts +4 -1
  323. package/dist/lint/core/data.js +3 -1
  324. package/dist/lint/eslint/index.js +6 -4
  325. package/dist/magma-components/magma-components.esm.js +1 -1
  326. package/dist/magma-components/{p-354a5b47.entry.js → p-02b106c2.entry.js} +1 -1
  327. package/dist/magma-components/{p-17ccfc01.system.entry.js → p-3bc65166.system.entry.js} +55 -48
  328. package/dist/magma-components/p-425ca155.entry.js +1 -0
  329. package/dist/magma-components/p-523f0c30.system.entry.js +80 -0
  330. package/dist/magma-components/{p-07d35da6.entry.js → p-5306606b.entry.js} +1 -1
  331. package/dist/magma-components/{p-1b67b149.system.entry.js → p-798f460b.system.entry.js} +1 -1
  332. package/dist/magma-components/{p-e5f893f9.system.entry.js → p-7db14777.system.entry.js} +1 -1
  333. package/dist/magma-components/{p-e8452cce.entry.js → p-8641b7b2.entry.js} +1 -1
  334. package/dist/magma-components/{p-3a7c4314.system.entry.js → p-95ccf46d.system.entry.js} +4 -4
  335. package/dist/magma-components/p-968a2237.entry.js +1 -0
  336. package/dist/magma-components/p-9dd9eadd.entry.js +1 -0
  337. package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
  338. package/dist/magma-components/{p-160cd923.entry.js → p-a25327a1.entry.js} +1 -1
  339. package/dist/magma-components/p-a67381bf.entry.js +1 -0
  340. package/dist/magma-components/{p-c2c693ed.system.entry.js → p-b27cb1ac.system.entry.js} +14 -5
  341. package/dist/magma-components/{p-6df26141.system.entry.js → p-c0286dc3.system.entry.js} +1 -1
  342. package/dist/magma-components/p-c89060ec.system.entry.js +41 -0
  343. package/dist/magma-components/p-eb12be86.system.entry.js +24 -0
  344. package/dist/magma-components/p-ebeb3fff.entry.js +1 -0
  345. package/dist/stats.json +383 -139
  346. package/dist/types/components/mds-banner/mds-banner.d.ts +9 -2
  347. package/dist/types/components/mds-book/mds-book.d.ts +19 -2
  348. package/dist/types/components/mds-emoji/mds-emoji.d.ts +1 -0
  349. package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +10 -1
  350. package/dist/types/components/mds-toast/mds-toast.d.ts +7 -1
  351. package/dist/types/components.d.ts +56 -12
  352. package/package.json +8 -8
  353. package/dist/components/p-B8hgyXdE.js +0 -1
  354. package/dist/components/p-CYK2Xr_v.js +0 -1
  355. package/dist/components/p-DbVGGhs_.js +0 -1
  356. package/dist/magma-components/p-14b13850.entry.js +0 -1
  357. package/dist/magma-components/p-386bb24e.system.entry.js +0 -41
  358. package/dist/magma-components/p-6d96d223.entry.js +0 -1
  359. package/dist/magma-components/p-79fd07e7.system.entry.js +0 -80
  360. package/dist/magma-components/p-7e7391fd.entry.js +0 -1
  361. package/dist/magma-components/p-df387755.entry.js +0 -1
  362. package/dist/magma-components/p-ee780f82.system.entry.js +0 -20
  363. package/dist/magma-components/p-f2211b1f.entry.js +0 -1
@@ -1,17 +1,17 @@
1
- var __spreadArray=this&&this.__spreadArray||function(a,r,t){if(t||arguments.length===2)for(var o=0,e=r.length,i;o<e;o++){if(i||!(o in r)){if(!i)i=Array.prototype.slice.call(r,0,o);i[o]=r[o]}}return a.concat(i||Array.prototype.slice.call(r))};System.register(["./p-BZP13mns.system.js","./p-CuHZXISO.system.js","./p-mGgjNqBm.system.js"],(function(a){"use strict";var r,t,o,e,i,n,s;return{setters:[function(a){r=a.r;t=a.h;o=a.e;e=a.g;i=a.B},function(a){n=a.L},function(a){s=a.p}],execute:function(){
1
+ var __spreadArray=this&&this.__spreadArray||function(a,r,o){if(o||arguments.length===2)for(var t=0,e=r.length,i;t<e;t++){if(i||!(t in r)){if(!i)i=Array.prototype.slice.call(r,0,t);i[t]=r[t]}}return a.concat(i||Array.prototype.slice.call(r))};System.register(["./p-BZP13mns.system.js","./p-CuHZXISO.system.js","./p-mGgjNqBm.system.js"],(function(a){"use strict";var r,o,t,e,i,n,s;return{setters:[function(a){r=a.r;o=a.h;t=a.e;e=a.g;i=a.B},function(a){n=a.L},function(a){s=a.p}],execute:function(){
2
2
  /**
3
3
  * Width and height in centimetres of the named formats, always portrait: a landscape one is
4
4
  * written as `WxH` with the width first (`29.7x21`)
5
5
  */
6
- var v={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]};
6
+ var l={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]};
7
7
  /**
8
8
  * 17x24, the most common format of Maggioli Editore: the shape of the book before its image
9
9
  * loads, and without one
10
- */var p=17/24;var l=/^(\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)$/;var c=function(a){return(a!==null&&a!==void 0?a:"").trim().toLowerCase()};
10
+ */var p=17/24;var v=/^(\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)$/;var c=function(a){return(a!==null&&a!==void 0?a:"").trim().toLowerCase()};
11
11
  /**
12
12
  * The width and height of a format, in centimetres. `undefined` for `auto`, which takes the
13
13
  * proportions of the image, and for a value that is not a format, which falls back on `auto`
14
- */var d=function(a){var r=c(a);if(Object.prototype.hasOwnProperty.call(v,r))return v[r];var t=l.exec(r);if(t===null)return undefined;var o=Number(t[1]);var e=Number(t[2]);return o>0&&e>0?[o,e]:undefined};
14
+ */var d=function(a){var r=c(a);if(Object.prototype.hasOwnProperty.call(l,r))return l[r];var o=v.exec(r);if(o===null)return undefined;var t=Number(o[1]);var e=Number(o[2]);return t>0&&e>0?[t,e]:undefined};
15
15
  /**
16
16
  * The proportions (width / height) of a format. `undefined` for `auto`, which takes the
17
17
  * proportions of the image, and for a value that is not a format, which falls back on `auto`
@@ -19,7 +19,7 @@ var v={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]};
19
19
  /**
20
20
  * The width of the book, in centimetres, what its depth is measured against: the width of its
21
21
  * format, or 17 cm, the width of the most common format, for `auto`
22
- */var f=function(a){var r,t;return(t=(r=d(a))===null||r===void 0?void 0:r[0])!==null&&t!==void 0?t:17};
22
+ */var f=function(a){var r,o;return(o=(r=d(a))===null||r===void 0?void 0:r[0])!==null&&o!==void 0?o:17};
23
23
  /**
24
24
  * Whether the value is one `format` accepts: `auto` (or no value), a named format or `WxH`
25
25
  */var u=function(a){var r=c(a);return r===""||r==="auto"||b(r)!==undefined};
@@ -28,16 +28,16 @@ var v={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]};
28
28
  * value in the custom property it is written into
29
29
  */var h=function(a){return'url("'.concat(a.replace(/[\\"]/g,"\\$&").replace(/[\n\r\f]/g,""),'")')};
30
30
  /** The pages of a book when nothing says how many: a manual about 2.5 cm deep. */var g=300;
31
- /** The pages a book is drawn with: past them, a wrong value would draw a sheet or a brick. */var k={max:3e3,min:4};
32
- /** Rigid boards, in centimetres: about 2.5 mm thick, overhanging the pages by about 3 mm. */var m={square:.3,thickness:.25};
31
+ /** The pages a book is drawn with: past them, a wrong value would draw a sheet or a brick. */var m={max:3e3,min:4};
32
+ /** Rigid boards, in centimetres: about 2.5 mm thick, overhanging the pages by about 3 mm. */var k={square:.3,thickness:.25};
33
33
  /** Whether the value is a number of pages: a positive number, or no value at all. */var w=function(a){return a==null||Number.isFinite(a)&&a>0};
34
- /** The pages the book is drawn with: the value, whole and within range, or the default. */var y=function(a){return a!=null&&Number.isFinite(a)&&a>0?Math.max(k.min,Math.min(k.max,Math.round(a))):g};
34
+ /** The pages the book is drawn with: the value, whole and within range, or the default. */var y=function(a){return a!=null&&Number.isFinite(a)&&a>0?Math.max(m.min,Math.min(m.max,Math.round(a))):g};
35
35
  /**
36
36
  * The boards of a hardcover, as shares of the width of the book (`width`, in centimetres),
37
37
  * which is what the stylesheet draws them in: their thickness and how far they overhang the
38
38
  * pages. A paperback has none. The depth of the pages is the stylesheet's, from the number of
39
39
  * pages and the thickness of a page (--mds-book-page-weight-min and -max).
40
- */var q=function(a,r){return{board:r?m.thickness/a:0,square:r?m.square/a:0}};
40
+ */var q=function(a,r){return{board:r?k.thickness/a:0,square:r?k.square/a:0}};
41
41
  /** The angles of each pose, after the usual shots of a book in product photography. */var x={
42
42
  // standing, turned to show the spine
43
43
  spine:{lay:0,tilt:-6,turn:28},
@@ -59,56 +59,56 @@ lying:{lay:90,tilt:-30,turn:0},
59
59
  /**
60
60
  * The time the pose takes to cover 63% of the way to its goal, in ms: while it follows the
61
61
  * pointer, and when it settles back after a drag or moves to another pose.
62
- */var X={follow:120,settle:260};var O=function(a){var r=a[0],t=a[1],o=a[2];var e=Math.hypot(r,t,o);return[r/e,t/e,o/e]};var _=function(a,r){return a[0]*r[0]+a[1]*r[1]+a[2]*r[2]};var C=function(a){return a*Math.PI/180};
62
+ */var X={follow:120,settle:260};var O=function(a){var r=a[0],o=a[1],t=a[2];var e=Math.hypot(r,o,t);return[r/e,o/e,t/e]};var S=function(a,r){return a[0]*r[0]+a[1]*r[1]+a[2]*r[2]};var _=function(a){return a*Math.PI/180};
63
63
  /**
64
64
  * Toward the light, in the coordinates of CSS (y down, z toward the reader): the key light of a
65
65
  * product shot, in front of the book, above it and a little to the right, so the front cover in
66
66
  * the foreground takes the most of it and the sides a little less.
67
- */var Y=O([.15,-.4,.9]);var E=function(a,r){var t=a[0],o=a[1],e=a[2];var i=C(r);return[t,o*Math.cos(i)-e*Math.sin(i),o*Math.sin(i)+e*Math.cos(i)]};var S=function(a,r){var t=a[0],o=a[1],e=a[2];var i=C(r);return[t*Math.cos(i)+e*Math.sin(i),o,-t*Math.sin(i)+e*Math.cos(i)]};
67
+ */var C=O([.15,-.4,.9]);var Y=function(a,r){var o=a[0],t=a[1],e=a[2];var i=_(r);return[o,t*Math.cos(i)-e*Math.sin(i),t*Math.sin(i)+e*Math.cos(i)]};var E=function(a,r){var o=a[0],t=a[1],e=a[2];var i=_(r);return[o*Math.cos(i)+e*Math.sin(i),t,-o*Math.sin(i)+e*Math.cos(i)]};
68
68
  /**
69
69
  * Where a face points once the book is posed by `rotateX(tilt) rotateY(turn) rotateX(lay)`, as
70
70
  * the stylesheet poses it.
71
- */var Z=function(a,r){var t=r.lay,o=r.tilt,e=r.turn;return E(S(E(a,t),e),o)};
72
- /** An upright face of the book, `yaw` degrees from the front cover (90 the fore edge, -90 a flat spine). */var H=function(a){return[Math.sin(C(a)),0,Math.cos(C(a))]};var N={bottom:[0,1,0],fore:H(90),front:H(0),spine:H(-90),top:[0,-1,0]};
73
- /** How much light the front cover takes at rest in a pose: the reference the faces are lit from. */var B=function(a){return _(Z(N.front,a),Y)};
71
+ */var Z=function(a,r){var o=r.lay,t=r.tilt,e=r.turn;return Y(E(Y(a,o),e),t)};
72
+ /** An upright face of the book, `yaw` degrees from the front cover (90 the fore edge, -90 a flat spine). */var H=function(a){return[Math.sin(_(a)),0,Math.cos(_(a))]};var N={bottom:[0,1,0],fore:H(90),front:H(0),spine:H(-90),top:[0,-1,0]};
73
+ /** How much light the front cover takes at rest in a pose: the reference the faces are lit from. */var B=function(a){return S(Z(N.front,a),C)};
74
74
  /**
75
75
  * How lit a face is, from -1 (in its own shadow) to 1, measured from the front cover at rest,
76
76
  * which shows the colours of its image as they are: a face turned toward the light brightens,
77
77
  * one turned away darkens.
78
- */var F=function(a,r,t){return Math.max(-1,Math.min(1,(_(Z(a,r),Y)-t)*1.4))};
79
- /** How lit each face of the book is, at a pose, from the front cover of its resting pose. */var L=function(a,r){return{bottom:F(N.bottom,a,r),fore:F(N.fore,a,r),front:F(N.front,a,r),spine:F(N.spine,a,r),top:F(N.top,a,r)}};
80
- /** How lit each slat of a rounded spine is, from the yaw each one faces. */var T=function(a,r,t){return a.map((function(a){return F(H(a),r,t)}))};
78
+ */var F=function(a,r,o){return Math.max(-1,Math.min(1,(S(Z(a,r),C)-o)*1.4))};
79
+ /** How lit each face of the book is, at a pose, from the front cover of its resting pose. */var I=function(a,r){return{bottom:F(N.bottom,a,r),fore:F(N.fore,a,r),front:F(N.front,a,r),spine:F(N.spine,a,r),top:F(N.top,a,r)}};
80
+ /** How lit each slat of a rounded spine is, from the yaw each one faces. */var L=function(a,r,o){return a.map((function(a){return F(H(a),r,o)}))};
81
81
  /**
82
82
  * Where the reflection of the light crosses the cover, from 0 to 100: it slides across as the
83
83
  * book turns away from its resting pose, the way the gloss of a laminated cover moves in the
84
84
  * hand.
85
- */var I=function(a,r,t){return Math.max(0,Math.min(100,50+(a-r.turn)*.8+t*10))};
85
+ */var U=function(a,r,o){return Math.max(0,Math.min(100,50+(a-r.turn)*.8+o*10))};
86
86
  /**
87
87
  * One step of the pose toward its goal, whatever the frame rate: the share of the way covered
88
88
  * in `elapsed` ms. Close enough, it lands on the goal, so the animation can stop.
89
- */var P=function(a,r,t,o){var e=1-Math.exp(-t/o);var i=Object.assign({},a);for(var n=0,s=Object.keys(r);n<s.length;n++){var v=s[n];i[v]+=(r[v]-a[v])*e;
89
+ */var T=function(a,r,o,t){var e=1-Math.exp(-o/t);var i=Object.assign({},a);for(var n=0,s=Object.keys(r);n<s.length;n++){var l=s[n];i[l]+=(r[l]-a[l])*e;
90
90
  // a twentieth of a degree, or of a percent of lift and gloss, is past what anyone sees
91
- var p=v==="glare"||v==="lift"?.002:.05;if(Math.abs(r[v]-i[v])<p)i[v]=r[v]}return i};var U=function(a,r){return Object.keys(a).every((function(t){return a[t]===r[t]}))};
91
+ var p=l==="glare"||l==="lift"?.002:.05;if(Math.abs(r[l]-i[l])<p)i[l]=r[l]}return i};var P=function(a,r){return Object.keys(a).every((function(o){return a[o]===r[o]}))};
92
92
  /**
93
93
  * The arc of a rounded spine: a circle through the edges of the two boards, bowed out by
94
94
  * `bulge` (a share of the depth) in the middle, cut into `count` stretches. `angle` gives where
95
95
  * each stretch ends on the circle, counted from the front board, and `point` where that is, in
96
96
  * the units of a slat.
97
- */var $=function(a,r){var t=(.25+r*r)/(2*r);var o=t-r;var e=Math.asin(.5/t);return{angle:function(r){return e-2*e*r/a},point:function(a){return{x:o-t*Math.cos(a),z:-.5+t*Math.sin(a)}}}};
97
+ */var R=function(a,r){var o=(.25+r*r)/(2*r);var t=o-r;var e=Math.asin(.5/o);return{angle:function(r){return e-2*e*r/a},point:function(a){return{x:t-o*Math.cos(a),z:-.5+o*Math.sin(a)}}}};
98
98
  /**
99
99
  * The slats that draw a rounded spine (see spineArc). Each slat is the chord of its stretch of
100
100
  * the arc, a little wider so that no seam shows between two of them, and faces outward from the
101
101
  * centre of the circle, which is what lights each one differently.
102
- */var G=function(a,r){var t=$(a,r),o=t.angle,e=t.point;return Array.from({length:a},(function(a,r){var t=o(r);var i=o(r+1);var n=e(t);var s=e(i);var v=(t+i)/2;return{width:Math.hypot(n.x-s.x,n.z-s.z)*1.04,x:(n.x+s.x)/2,yaw:Math.atan2(-Math.cos(v),Math.sin(v))*180/Math.PI,z:(n.z+s.z)/2}}))};
102
+ */var $=function(a,r){var o=R(a,r),t=o.angle,e=o.point;return Array.from({length:a},(function(a,r){var o=t(r);var i=t(r+1);var n=e(o);var s=e(i);var l=(o+i)/2;return{width:Math.hypot(n.x-s.x,n.z-s.z)*1.04,x:(n.x+s.x)/2,yaw:Math.atan2(-Math.cos(l),Math.sin(l))*180/Math.PI,z:(n.z+s.z)/2}}))};
103
103
  /**
104
104
  * The cap over an end of a rounded spine, as the clip-path of its box: the bulge across (0% at
105
105
  * its outermost, 100% on the edges of the boards), the depth down (from the front board, or from
106
106
  * the back one: the arc reads the same both ways). Its edge runs through the ends of the slats,
107
107
  * so the cap follows the spine and never reaches past it.
108
- */var W=function(a,r){var t=$(a,r),o=t.angle,e=t.point;var i=function(a){return"".concat((a*100).toFixed(3),"%")};var n=Array.from({length:a+1},(function(a,t){var n=e(o(t)),s=n.x,v=n.z;return"".concat(i(1+s/r)," ").concat(i(-v))}));return"polygon(".concat(n.join(", "),")")};
109
- /** How far the spine of a hardcover bows out, as a share of the depth of the book. */var D=.14;
110
- /** The slats of the spine of a hardcover. */var J=G(6,D);
111
- /** The caps over the ends of the spine of a hardcover, on the same arc as its slats. */var K=W(6,D);var Q="Βιβλίο";var R="{{{name}}}, {{{author}}}";var V={book:Q,byAuthor:R};var aa="Book";var ra="{{{name}}} by {{{author}}}";var ta={book:aa,byAuthor:ra};var oa="Libro";var ea="{{{name}}} de {{{author}}}";var ia={book:oa,byAuthor:ea};var na="Libro";var sa="{{{name}}} di {{{author}}}";var va={book:na,byAuthor:sa};var pa=function(){return"@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){cursor:auto;touch-action:auto}:host([pref-consumption=low]){cursor:auto;touch-action:auto}:host([pref-consumption=low]) .gloss,:host([pref-consumption=medium]) .gloss{display:none}:host([pref-consumption=low]) .scene,:host([pref-consumption=medium]) .scene{filter:none}:host{--mds-book-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-book-paper-color:#faf8f2;--mds-book-text-color:rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-book-page-weight-max:.05;--mds-book-page-weight-min:.1;--private-book-grain:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='1.1' numOctaves='2' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E\");--private-book-glare:0;--private-book-glare-x:50;--private-book-lay:0deg;--private-book-lie:0;--private-book-lift:0;--private-book-stand:1;--private-book-tilt:-6deg;--private-book-turn:28deg;aspect-ratio:var(--private-book-ratio,17/24);cursor:ew-resize;display:block;min-width:0;touch-action:pan-y;-webkit-user-select:none;user-select:none}:host([pose=fore-edge]){--private-book-turn:-28deg}:host([pose=front]){--private-book-tilt:0deg;--private-book-turn:0deg}:host([pose=lying]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-30deg;--private-book-turn:0deg}:host([pose=lying-turned]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-34deg;--private-book-turn:32deg}.scene{contain-intrinsic-inline-size:calc(var(--spacing,.0025rem)*5000);container-type:inline-size;filter:drop-shadow(0 1.2cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.08));position:relative}.scene--dragging{-webkit-user-select:none;user-select:none}.stage{perspective:600cqi;perspective-origin:50% -80%}.book{--private-book-binding:var(--mds-book-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-book-bulge:0cqi;--private-book-height:calc(100cqi/var(--private-book-ratio));--private-book-page-weight:calc(var(--mds-book-page-weight-min,.1) + (var(--mds-book-page-weight-max,.05) - var(--mds-book-page-weight-min,.1))*(min(var(--private-book-page-count), 1000) - 1)/999);--private-book-pages-mm:calc(var(--private-book-page-count)*var(--private-book-page-weight));--private-book-pages:calc(var(--private-book-pages-mm)/var(--private-book-width-mm)*100cqi);--private-book-depth:calc(var(--private-book-pages) + var(--private-book-board)*2);--private-book-solid:linear-gradient(var(--mds-book-spine-color),var(--mds-book-spine-color));--private-book-wrap:var(--private-book-solid,var(--private-book-cover,none));aspect-ratio:var(--private-book-ratio);position:relative;transform:rotateX(var(--private-book-tilt)) rotateY(var(--private-book-turn)) rotateX(var(--private-book-lay));transform-origin:50% 50% calc(var(--private-book-depth)/-2);transform-style:preserve-3d;width:100%}:host([binding=hardcover]) .book{--private-book-bulge:calc(var(--private-book-depth)*0.14)}.body{inset:0;transform:translate3d(0,calc(var(--private-book-lift)*var(--private-book-stand)*-3cqi),calc(var(--private-book-lift)*var(--private-book-lie)*3cqi));transform-style:preserve-3d}.body,.floor{position:absolute}.floor{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.27);border-radius:1cqi;box-shadow:0 0 3cqi .6cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.34),0 0 9cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1);left:0;pointer-events:none;top:0;transform-origin:0 0}.floor--stand{height:var(--private-book-depth);opacity:calc(var(--private-book-stand)*(1 - var(--private-book-lift)*0.6));transform:translate3d(0,var(--private-book-height),calc(var(--private-book-depth)*-1)) rotateX(90deg);width:100%}.floor--lie,:host([pose=lying-turned]) .floor--stand,:host([pose=lying]) .floor--stand{display:none}:host([pose=lying-turned]) .floor--lie,:host([pose=lying]) .floor--lie{display:block}.floor--lie{height:100%;opacity:calc(var(--private-book-lie)*(1 - var(--private-book-lift)*0.6));transform:translateZ(calc(var(--private-book-depth)*-1 - .2cqi));width:100%}.book--pending{--private-book-binding:rgb(var(--magma-surface-sunken,var(--surface-neutral-sunken,232 232 232)))}.face{--private-book-light:0;backface-visibility:hidden;left:0;position:absolute;top:0;transform-origin:0 0}.lit-front{--private-book-light:var(--private-book-front-light,0)}.lit-top{--private-book-light:var(--private-book-top-light,0)}.lit-bottom{--private-book-light:var(--private-book-bottom-light,0)}.lit-fore{--private-book-light:var(--private-book-fore-light,0)}.lit-spine{--private-book-light:var(--private-book-spine-light,0)}.shade{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5)));inset:0;opacity:calc(max(0, var(--private-book-light) * -1)*.24);pointer-events:none;position:absolute}.front{background-color:var(--private-book-binding);height:100%;overflow:hidden;width:100%}.gloss{background-image:linear-gradient(105deg,#0000 34%,var(--mds-book-paper-color,#faf8f2) 44%,var(--mds-book-paper-color,#faf8f2) 50%,var(--mds-book-paper-color,#faf8f2) 56%,#0000 66%);height:100%;left:0;mix-blend-mode:screen;opacity:var(--private-book-glare);pointer-events:none;position:absolute;top:0;translate:calc(var(--private-book-glare-x)*-.6%) 0;width:250%}@supports (color:color-mix(in lab,red,red)){.gloss{background-image:linear-gradient(105deg,#0000 34%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 44%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 14%,#0000) 50%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 56%,#0000 66%)}}.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,var(--mds-book-paper-color,#faf8f2) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%);content:\"\";inset:0;pointer-events:none;position:absolute}@supports (color:color-mix(in lab,red,red)){.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 18%,#0000) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,var(--mds-book-paper-color,#faf8f2) 4cqi,#0000 5cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%)}@supports (color:color-mix(in lab,red,red)){:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 28%,#0000) 4cqi,#0000 5cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}.cover{object-fit:cover;-webkit-user-drag:none;display:block;height:100%;width:100%}.drawn-cover{color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;flex-direction:column;gap:3cqi;height:100%;padding:12cqi 9cqi 9cqi 12cqi}.drawn-author{font-size:5cqi;line-height:1.2}.drawn-name{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);-webkit-line-clamp:6;line-clamp:6;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;font-size:10cqi;line-height:1.1;overflow:hidden}.drawn-publisher{font-size:4.5cqi;margin-top:auto}.board-bottom,.board-fore,.board-top,.cap,.slat{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size)}.board-bottom,.board-top{--private-book-wrap-size:100% 4000%;height:var(--private-book-board);width:100%}.board-top{--private-book-wrap-position:center top}.board-bottom{--private-book-wrap-position:center bottom}.board-top--front{transform:translateZ(calc(var(--private-book-board)*-1)) rotateX(90deg)}.board-top--back{transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.board-bottom--front{transform:translateY(var(--private-book-height)) rotateX(-90deg)}.board-bottom--back{transform:translate3d(0,var(--private-book-height),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(-90deg)}.board-fore{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;width:var(--private-book-board)}.board-fore--front{transform:translate(100cqi)rotateY(90deg)}.board-fore--back{transform:translate3d(100cqi,0,calc(var(--private-book-board) - var(--private-book-depth))) rotateY(90deg)}.endpaper{background-color:var(--mds-book-paper-color,#faf8f2);background-image:linear-gradient(var(--private-book-endpaper-fall),#0000,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.22))}@supports (color:color-mix(in lab,red,red)){.endpaper{background-color:color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 5%)}}.endpaper--top{--private-book-endpaper-fall:to bottom;transform:translateZ(calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--bottom,.endpaper--top{height:var(--private-book-square);width:100%}.endpaper--bottom{--private-book-endpaper-fall:to top;transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--fore{--private-book-endpaper-fall:to left;height:100%;transform:translate3d(calc(100cqi - var(--private-book-square)),0,calc(var(--private-book-board) - var(--private-book-depth)));width:var(--private-book-square)}.pages-bottom,.pages-fore,.pages-top{background-color:var(--mds-book-paper-color,#faf8f2);background-repeat:no-repeat,repeat,no-repeat;background-size:100% 100%,auto,100% 100%}.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:var(--private-book-pages);width:calc(100cqi - var(--private-book-square))}@supports (color:color-mix(in lab,red,red)){.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-top{transform:translate3d(0,var(--private-book-square),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(90deg)}.pages-bottom{transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board)*-1)) rotateX(-90deg)}.pages-bottom:before,.pages-top:before{background-image:repeating-linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.55) 0 .35cqi,var(--mds-book-paper-color,#faf8f2) .35cqi .7cqi);bottom:0;content:\"\";left:0;position:absolute;top:0;width:1cqi}.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:calc(100% - var(--private-book-square)*2);transform:translate3d(calc(100cqi - var(--private-book-square)),var(--private-book-square),calc(var(--private-book-board)*-1)) rotateY(90deg);width:var(--private-book-pages)}@supports (color:color-mix(in lab,red,red)){.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-flush:after,.pages-flush:before{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size);content:\"\";position:absolute}.pages-flush--across{--private-book-wrap-size:100% 4000%;height:var(--private-book-depth);width:100%}.pages-flush--across:after,.pages-flush--across:before{height:1px;inset:0 0 auto;width:auto}.pages-flush--across:after{bottom:0;top:auto}.pages-top.pages-flush{--private-book-wrap-position:center top;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.pages-bottom.pages-flush{--private-book-wrap-position:center bottom;transform:translateY(var(--private-book-height)) rotateX(-90deg)}.pages-flush--along{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate(100cqi)rotateY(90deg);width:var(--private-book-depth)}.pages-flush--along:after,.pages-flush--along:before{bottom:0;left:0;top:0;width:1px}.pages-flush--along:after{left:auto;right:0}.spine,.spine-label{box-sizing:border-box;display:flex;font-size:min(calc(var(--private-book-depth)*.42),4.5cqi);height:100%;justify-content:center;padding-block:7cqi;width:var(--private-book-depth)}.spine{background-color:var(--private-book-binding);background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1),#0000 .6cqi,#0000 calc(100% - .6cqi),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1)),var(--private-book-wrap);background-position:0 0,0;background-repeat:no-repeat;background-size:100% 100%,4000% 100%;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.slat{--private-book-wrap-position:left center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate3d(calc(var(--private-book-slat-x)*var(--private-book-depth)),0,calc(var(--private-book-slat-z)*var(--private-book-depth))) rotateY(var(--private-book-slat-yaw)) translateX(-50%);width:calc(var(--private-book-slat-width)*var(--private-book-depth))}.spine-label{transform:translate3d(calc(var(--private-book-bulge)*-1 - .2cqi),0,calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.cap{--private-book-wrap-position:left top;--private-book-wrap-size:4000% 4000%;height:var(--private-book-depth);width:var(--private-book-bulge)}.cap--top{transform:translate3d(calc(var(--private-book-bulge)*-1),0,calc(var(--private-book-depth)*-1)) rotateX(90deg)}.cap--bottom{transform:translate3d(calc(var(--private-book-bulge)*-1),var(--private-book-height),0) rotateX(-90deg)}.spine-text{align-items:center;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;gap:.8lh;line-height:1.2;min-block-size:0;opacity:clamp(0,(var(--private-book-pages-mm) - 5) * 2,1);text-shadow:0 0 .3lh rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.4);writing-mode:vertical-rl}.spine-text>span{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spine-author{flex-shrink:4}.spine-name{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700)}.spine-publisher{flex-shrink:0;margin-inline-start:auto}@property --tw-font-weight{syntax:\"*\";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){cursor:auto;touch-action:auto}}"};var la=a("mds_book",/** @class */function(){function a(a){var o=this;r(this,a);this.imageError=false;
108
+ */var G=function(a,r){var o=R(a,r),t=o.angle,e=o.point;var i=function(a){return"".concat((a*100).toFixed(3),"%")};var n=Array.from({length:a+1},(function(a,o){var n=e(t(o)),s=n.x,l=n.z;return"".concat(i(1+s/r)," ").concat(i(-l))}));return"polygon(".concat(n.join(", "),")")};
109
+ /** How far the spine of a hardcover bows out, as a share of the depth of the book. */var W=.14;
110
+ /** The slats of the spine of a hardcover. */var D=$(6,W);
111
+ /** The caps over the ends of the spine of a hardcover, on the same arc as its slats. */var J=G(6,W);var K="Βιβλίο";var Q="{{{name}}}, {{{author}}}";var V={book:K,byAuthor:Q};var aa="Book";var ra="{{{name}}} by {{{author}}}";var oa={book:aa,byAuthor:ra};var ta="Libro";var ea="{{{name}}} de {{{author}}}";var ia={book:ta,byAuthor:ea};var na="Libro";var sa="{{{name}}} di {{{author}}}";var la={book:na,byAuthor:sa};var pa=function(){return"@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){cursor:auto;touch-action:auto}:host([pref-consumption=low]){cursor:auto;touch-action:auto}:host([pref-consumption=low]) .gloss,:host([pref-consumption=medium]) .gloss{display:none}:host([pref-consumption=low]) .scene,:host([pref-consumption=medium]) .scene{filter:none}:host{--mds-book-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-book-paper-color:#faf8f2;--mds-book-text-color:rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-book-publisher-color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-book-page-weight-max:.05;--mds-book-page-weight-min:.1;--private-book-grain:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='1.1' numOctaves='2' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E\");--private-book-glare:0;--private-book-glare-x:50;--private-book-lay:0deg;--private-book-lie:0;--private-book-lift:0;--private-book-stand:1;--private-book-tilt:-6deg;--private-book-turn:28deg;aspect-ratio:var(--private-book-ratio,17/24);cursor:ew-resize;display:block;min-width:0;touch-action:pan-y;-webkit-user-select:none;user-select:none}:host([pose=fore-edge]){--private-book-turn:-28deg}:host([pose=front]){--private-book-tilt:0deg;--private-book-turn:0deg}:host([pose=lying]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-30deg;--private-book-turn:0deg}:host([pose=lying-turned]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-34deg;--private-book-turn:32deg}.scene{contain-intrinsic-inline-size:calc(var(--spacing,.0025rem)*5000);container-type:inline-size;filter:drop-shadow(0 1.2cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.08));position:relative}.scene--dragging{-webkit-user-select:none;user-select:none}.stage{perspective:600cqi;perspective-origin:50% -80%}.book{--private-book-binding:var(--mds-book-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-book-bulge:0cqi;--private-book-height:calc(100cqi/var(--private-book-ratio));--private-book-page-weight:calc(var(--mds-book-page-weight-min,.1) + (var(--mds-book-page-weight-max,.05) - var(--mds-book-page-weight-min,.1))*(min(var(--private-book-page-count), 1000) - 1)/999);--private-book-pages-mm:calc(var(--private-book-page-count)*var(--private-book-page-weight));--private-book-pages:calc(var(--private-book-pages-mm)/var(--private-book-width-mm)*100cqi);--private-book-depth:calc(var(--private-book-pages) + var(--private-book-board)*2);--private-book-solid:linear-gradient(var(--mds-book-spine-color),var(--mds-book-spine-color));--private-book-wrap:var(--private-book-solid,var(--private-book-cover,none));aspect-ratio:var(--private-book-ratio);position:relative;transform:rotateX(var(--private-book-tilt)) rotateY(var(--private-book-turn)) rotateX(var(--private-book-lay));transform-origin:50% 50% calc(var(--private-book-depth)/-2);transform-style:preserve-3d;width:100%}:host([binding=hardcover]) .book{--private-book-bulge:calc(var(--private-book-depth)*0.14)}.body{inset:0;transform:translate3d(0,calc(var(--private-book-lift)*var(--private-book-stand)*-3cqi),calc(var(--private-book-lift)*var(--private-book-lie)*3cqi));transform-style:preserve-3d}.body,.floor{position:absolute}.floor{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.27);border-radius:1cqi;box-shadow:0 0 3cqi .6cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.34),0 0 9cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1);left:0;pointer-events:none;top:0;transform-origin:0 0}.floor--stand{height:var(--private-book-depth);opacity:calc(var(--private-book-stand)*(1 - var(--private-book-lift)*0.6));transform:translate3d(0,var(--private-book-height),calc(var(--private-book-depth)*-1)) rotateX(90deg);width:100%}.floor--lie,:host([pose=lying-turned]) .floor--stand,:host([pose=lying]) .floor--stand{display:none}:host([pose=lying-turned]) .floor--lie,:host([pose=lying]) .floor--lie{display:block}.floor--lie{height:100%;opacity:calc(var(--private-book-lie)*(1 - var(--private-book-lift)*0.6));transform:translateZ(calc(var(--private-book-depth)*-1 - .2cqi));width:100%}.book--pending{--private-book-binding:rgb(var(--magma-surface-sunken,var(--surface-neutral-sunken,232 232 232)))}.face{--private-book-light:0;backface-visibility:hidden;left:0;position:absolute;top:0;transform-origin:0 0}.lit-front{--private-book-light:var(--private-book-front-light,0)}.lit-top{--private-book-light:var(--private-book-top-light,0)}.lit-bottom{--private-book-light:var(--private-book-bottom-light,0)}.lit-fore{--private-book-light:var(--private-book-fore-light,0)}.lit-spine{--private-book-light:var(--private-book-spine-light,0)}.shade{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5)));inset:0;opacity:calc(max(0, var(--private-book-light) * -1)*.24);pointer-events:none;position:absolute}.front{background-color:var(--private-book-binding);height:100%;overflow:hidden;width:100%}.gloss{background-image:linear-gradient(105deg,#0000 34%,var(--mds-book-paper-color,#faf8f2) 44%,var(--mds-book-paper-color,#faf8f2) 50%,var(--mds-book-paper-color,#faf8f2) 56%,#0000 66%);height:100%;left:0;mix-blend-mode:screen;opacity:var(--private-book-glare);pointer-events:none;position:absolute;top:0;translate:calc(var(--private-book-glare-x)*-.6%) 0;width:250%}@supports (color:color-mix(in lab,red,red)){.gloss{background-image:linear-gradient(105deg,#0000 34%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 44%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 14%,#0000) 50%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 56%,#0000 66%)}}.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,var(--mds-book-paper-color,#faf8f2) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%);content:\"\";inset:0;pointer-events:none;position:absolute}@supports (color:color-mix(in lab,red,red)){.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 18%,#0000) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,var(--mds-book-paper-color,#faf8f2) 4cqi,#0000 5cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%)}@supports (color:color-mix(in lab,red,red)){:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 28%,#0000) 4cqi,#0000 5cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}.cover{object-fit:cover;-webkit-user-drag:none;display:block;height:100%;width:100%}.drawn-cover{box-sizing:border-box;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;flex-direction:column;gap:3cqi;height:100%;padding:12cqi 9cqi 9cqi 12cqi}.drawn-author{font-size:5cqi;line-height:1.2}.drawn-name{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif);--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-line-clamp:6;line-clamp:6;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;font-size:10cqi;line-height:1.1;overflow:hidden}.drawn-logo,.drawn-publisher{margin-top:auto}.drawn-publisher{color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));font-size:4.5cqi}.drawn-logo,.spine-logo{background-color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));flex-shrink:0;-webkit-mask-image:var(--private-book-logo);mask-image:var(--private-book-logo);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.drawn-logo{height:15cqi;-webkit-mask-position:0 100%;mask-position:0 100%;width:50cqi}.board-bottom,.board-fore,.board-top,.cap,.slat{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size)}.board-bottom,.board-top{--private-book-wrap-size:100% 4000%;height:var(--private-book-board);width:100%}.board-top{--private-book-wrap-position:center top}.board-bottom{--private-book-wrap-position:center bottom}.board-top--front{transform:translateZ(calc(var(--private-book-board)*-1)) rotateX(90deg)}.board-top--back{transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.board-bottom--front{transform:translateY(var(--private-book-height)) rotateX(-90deg)}.board-bottom--back{transform:translate3d(0,var(--private-book-height),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(-90deg)}.board-fore{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;width:var(--private-book-board)}.board-fore--front{transform:translate(100cqi)rotateY(90deg)}.board-fore--back{transform:translate3d(100cqi,0,calc(var(--private-book-board) - var(--private-book-depth))) rotateY(90deg)}.endpaper{background-color:var(--mds-book-paper-color,#faf8f2);background-image:linear-gradient(var(--private-book-endpaper-fall),#0000,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.22))}@supports (color:color-mix(in lab,red,red)){.endpaper{background-color:color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 5%)}}.endpaper--top{--private-book-endpaper-fall:to bottom;transform:translateZ(calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--bottom,.endpaper--top{height:var(--private-book-square);width:100%}.endpaper--bottom{--private-book-endpaper-fall:to top;transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--fore{--private-book-endpaper-fall:to left;height:100%;transform:translate3d(calc(100cqi - var(--private-book-square)),0,calc(var(--private-book-board) - var(--private-book-depth)));width:var(--private-book-square)}.pages-bottom,.pages-fore,.pages-top{background-color:var(--mds-book-paper-color,#faf8f2);background-repeat:no-repeat,repeat,no-repeat;background-size:100% 100%,auto,100% 100%}.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:var(--private-book-pages);width:calc(100cqi - var(--private-book-square))}@supports (color:color-mix(in lab,red,red)){.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-top{transform:translate3d(0,var(--private-book-square),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(90deg)}.pages-bottom{transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board)*-1)) rotateX(-90deg)}.pages-bottom:before,.pages-top:before{background-image:repeating-linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.55) 0 .35cqi,var(--mds-book-paper-color,#faf8f2) .35cqi .7cqi);bottom:0;content:\"\";left:0;position:absolute;top:0;width:1cqi}.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:calc(100% - var(--private-book-square)*2);transform:translate3d(calc(100cqi - var(--private-book-square)),var(--private-book-square),calc(var(--private-book-board)*-1)) rotateY(90deg);width:var(--private-book-pages)}@supports (color:color-mix(in lab,red,red)){.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-flush:after,.pages-flush:before{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size);content:\"\";position:absolute}.pages-flush--across{--private-book-wrap-size:100% 4000%;height:var(--private-book-depth);width:100%}.pages-flush--across:after,.pages-flush--across:before{height:1px;inset:0 0 auto;width:auto}.pages-flush--across:after{bottom:0;top:auto}.pages-top.pages-flush{--private-book-wrap-position:center top;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.pages-bottom.pages-flush{--private-book-wrap-position:center bottom;transform:translateY(var(--private-book-height)) rotateX(-90deg)}.pages-flush--along{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate(100cqi)rotateY(90deg);width:var(--private-book-depth)}.pages-flush--along:after,.pages-flush--along:before{bottom:0;left:0;top:0;width:1px}.pages-flush--along:after{left:auto;right:0}.spine,.spine-label{box-sizing:border-box;container-type:inline-size;display:flex;font-size:min(calc(var(--private-book-depth)*.42),4.5cqi);height:100%;justify-content:center;padding-block:7cqi;width:var(--private-book-depth)}.spine{background-color:var(--private-book-binding);background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1),#0000 .6cqi,#0000 calc(100% - .6cqi),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1)),var(--private-book-wrap);background-position:0 0,0;background-repeat:no-repeat;background-size:100% 100%,4000% 100%;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.slat{--private-book-wrap-position:left center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate3d(calc(var(--private-book-slat-x)*var(--private-book-depth)),0,calc(var(--private-book-slat-z)*var(--private-book-depth))) rotateY(var(--private-book-slat-yaw)) translateX(-50%);width:calc(var(--private-book-slat-width)*var(--private-book-depth))}.spine-label{transform:translate3d(calc(var(--private-book-bulge)*-1 - .2cqi),0,calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.cap{--private-book-wrap-position:left top;--private-book-wrap-size:4000% 4000%;height:var(--private-book-depth);width:var(--private-book-bulge)}.cap--top{transform:translate3d(calc(var(--private-book-bulge)*-1),0,calc(var(--private-book-depth)*-1)) rotateX(90deg)}.cap--bottom{transform:translate3d(calc(var(--private-book-bulge)*-1),var(--private-book-height),0) rotateX(-90deg)}.spine-text{align-items:center;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;gap:.8lh;line-height:1.2;min-block-size:0;opacity:clamp(0,(var(--private-book-pages-mm) - 5) * 2,1);text-shadow:0 0 .3lh rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.4);writing-mode:vertical-rl}.spine-text>span{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spine-author{flex-shrink:4}.spine-name{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif);--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.spine-logo,.spine-publisher{flex-shrink:0;margin-inline-start:auto}.spine-publisher{color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))))}.spine-logo{height:2lh;-webkit-mask-position:bottom;mask-position:bottom;width:1.4lh}@container (min-width:3em){.spine-text{display:grid;gap:0 .8lh;grid-template-columns:minmax(0,1fr) auto}.spine-name{grid-area:1/1}.spine-author{font-size:80%;grid-area:2/1}.spine-logo,.spine-publisher{grid-area:1/2/span 2}}@property --tw-font-weight{syntax:\"*\";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){cursor:auto;touch-action:auto}}"};var va=a("mds_book",/** @class */function(){function a(a){var t=this;r(this,a);this.imageError=false;this.logoError=false;
112
112
  // The pose is animated here, not in CSS: the light on each face and the gloss of the cover
113
113
  // follow the angle frame by frame, which a transition of the transform alone cannot do. It
114
114
  // eases toward its goal, and runs only while it moves, as the 3D card of the docs home does.
@@ -116,7 +116,7 @@ var p=v==="glare"||v==="lift"?.002:.05;if(Math.abs(r[v]-i[v])<p)i[v]=r[v]}return
116
116
  // repaint.
117
117
  this.current=M();this.dragged=false;this.goal=M();this.hovering=false;
118
118
  // where the pointer is on the book, from -1 to 1 on each axis
119
- this.pointer={x:0,y:0};this.slats=[];this.t=new n({el:V,en:ta,es:ia,it:va});
119
+ this.pointer={x:0,y:0};this.slats=[];this.t=new n({el:V,en:oa,es:ia,it:la});
120
120
  /**
121
121
  * How the book is bound: a thin flexible cover flush with the pages, or rigid boards a little
122
122
  * larger than the page block, with a rounded spine
@@ -147,50 +147,57 @@ this.pointer={x:0,y:0};this.slats=[];this.t=new n({el:V,en:ta,es:ia,it:va});
147
147
  // Out of the window, or of the frame the page is in, the pointer is no longer ours: its
148
148
  // release would never reach the book, which would go on turning when it comes back. The
149
149
  // drag ends there, and when the window loses the focus or is hidden.
150
- this.watchDrag=function(){var a;(a=o.dragWatch)===null||a===void 0?void 0:a.abort();o.dragWatch=new AbortController;var r=o.dragWatch.signal;var t=function(){o.hovering=false;o.pointer={x:0,y:0};o.endDrag(false)};var e=function(a){if(a.relatedTarget===null)t()};window.addEventListener("pointerout",e,{signal:r});window.addEventListener("mouseout",e,{signal:r});window.addEventListener("blur",t,{signal:r});document.addEventListener("visibilitychange",(function(){return document.hidden&&t()}),{signal:r})};
150
+ this.watchDrag=function(){var a;(a=t.dragWatch)===null||a===void 0?void 0:a.abort();t.dragWatch=new AbortController;var r=t.dragWatch.signal;var o=function(){t.hovering=false;t.pointer={x:0,y:0};t.endDrag(false)};var e=function(a){if(a.relatedTarget===null)o()};window.addEventListener("pointerout",e,{signal:r});window.addEventListener("mouseout",e,{signal:r});window.addEventListener("blur",o,{signal:r});document.addEventListener("visibilitychange",(function(){return document.hidden&&o()}),{signal:r})};
151
151
  // the drag is over: released over the page (`clicked`, which takes the click that follows if
152
152
  // the book turned), or lost
153
- this.endDrag=function(a){var r,t;if(o.drag===undefined)return;o.dragged=a;o.drag=undefined;(r=o.dragWatch)===null||r===void 0?void 0:r.abort();o.dragWatch=undefined;(t=o.scene)===null||t===void 0?void 0:t.classList.remove("scene--dragging");o.aim()};
153
+ this.endDrag=function(a){var r,o;if(t.drag===undefined)return;t.dragged=a;t.drag=undefined;(r=t.dragWatch)===null||r===void 0?void 0:r.abort();t.dragWatch=undefined;(o=t.scene)===null||o===void 0?void 0:o.classList.remove("scene--dragging");t.aim()};
154
154
  // reduced, the book keeps its resting pose: the preference of the page, or the system's when
155
155
  // the page has no controller or follows the system
156
- this.reducedMotion=function(){var a=o.host.getAttribute("pref-animation");if(a==="reduce")return true;if(a!==null&&a!=="system")return false;return typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches};
156
+ this.reducedMotion=function(){var a=t.host.getAttribute("pref-animation");if(a==="reduce")return true;if(a!==null&&a!=="system")return false;return typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches};
157
157
  // The consumption preference sets how much the book costs: at `low` it is drawn once, in its
158
158
  // pose, and never animated; at `medium` it moves without the gloss, whose band repaints the
159
159
  // cover; at `high`, the default on a page without the controller, it does everything.
160
- this.consumption=function(){var a;return(a=o.host.getAttribute("pref-consumption"))!==null&&a!==void 0?a:"high"};this.still=function(){return o.reducedMotion()||o.consumption()==="low"};
160
+ this.consumption=function(){var a;return(a=t.host.getAttribute("pref-consumption"))!==null&&a!==void 0?a:"high"};this.still=function(){return t.reducedMotion()||t.consumption()==="low"};
161
161
  // the goal of the pose, from what the pointer does: resting, hovered, dragged
162
- this.aim=function(){var a=M(o.pose);if(o.still()){o.current=o.goal=a;o.writePose();return}var r=o.hovering||o.drag!==undefined;var t=o.drag!==undefined?1:o.hovering?.45:0;o.goal={glare:o.consumption()==="high"?t:0,lay:a.lay,lift:r?1:0,tilt:o.hovering?a.tilt-o.pointer.y*z.tilt:a.tilt,turn:o.drag!==undefined?o.goal.turn:o.hovering?a.turn+o.pointer.x*z.turn:a.turn};o.wake()};this.wake=function(){var a;(a=o.frame)!==null&&a!==void 0?a:o.frame=requestAnimationFrame(o.tick)};this.tick=function(a){o.frame=undefined;var r=o.lastTime===undefined?1e3/60:a-o.lastTime;var t=o.drag===undefined&&!o.hovering;o.current=P(o.current,o.goal,r,t?X.settle:X.follow);o.writePose();if(U(o.current,o.goal)){o.lastTime=undefined;return}o.lastTime=a;o.wake()};
162
+ this.aim=function(){var a=M(t.pose);if(t.still()){t.current=t.goal=a;t.writePose();return}var r=t.hovering||t.drag!==undefined;var o=t.drag!==undefined?1:t.hovering?.45:0;t.goal={glare:t.consumption()==="high"?o:0,lay:a.lay,lift:r?1:0,tilt:t.hovering?a.tilt-t.pointer.y*z.tilt:a.tilt,turn:t.drag!==undefined?t.goal.turn:t.hovering?a.turn+t.pointer.x*z.turn:a.turn};t.wake()};this.wake=function(){var a;(a=t.frame)!==null&&a!==void 0?a:t.frame=requestAnimationFrame(t.tick)};this.tick=function(a){t.frame=undefined;var r=t.lastTime===undefined?1e3/60:a-t.lastTime;var o=t.drag===undefined&&!t.hovering;t.current=T(t.current,t.goal,r,o?X.settle:X.follow);t.writePose();if(P(t.current,t.goal)){t.lastTime=undefined;return}t.lastTime=a;t.wake()};
163
163
  // written on the element, not through render: the pose changes far more often than a book
164
164
  // needs to render
165
- this.writePose=function(){var a;var r=(a=o.scene)===null||a===void 0?void 0:a.style;if(!r)return;var t=M(o.pose);var e=B(t);var i=o.current,n=i.glare,s=i.lay,v=i.lift,p=i.tilt,l=i.turn;var c=L(o.current,e);r.setProperty("--private-book-lay","".concat(s.toFixed(2),"deg"));r.setProperty("--private-book-turn","".concat(l.toFixed(2),"deg"));r.setProperty("--private-book-tilt","".concat(p.toFixed(2),"deg"));r.setProperty("--private-book-lift",v.toFixed(3));
165
+ this.writePose=function(){var a;var r=(a=t.scene)===null||a===void 0?void 0:a.style;if(!r)return;var o=M(t.pose);var e=B(o);var i=t.current,n=i.glare,s=i.lay,l=i.lift,p=i.tilt,v=i.turn;var c=I(t.current,e);r.setProperty("--private-book-lay","".concat(s.toFixed(2),"deg"));r.setProperty("--private-book-turn","".concat(v.toFixed(2),"deg"));r.setProperty("--private-book-tilt","".concat(p.toFixed(2),"deg"));r.setProperty("--private-book-lift",l.toFixed(3));
166
166
  // how far the book is lying down, from 0 standing to 1 lying: which surface it rests on,
167
167
  // so where its shadow falls and which way it rises
168
- var d=Math.max(0,Math.min(1,s/90));r.setProperty("--private-book-lie",d.toFixed(3));r.setProperty("--private-book-stand",(1-d).toFixed(3));r.setProperty("--private-book-glare",n.toFixed(3));r.setProperty("--private-book-glare-x",I(l,t,o.pointer.x).toFixed(1));for(var b=0,f=Object.keys(c);b<f.length;b++){var u=f[b];r.setProperty("--private-book-".concat(u,"-light"),c[u].toFixed(3))}
168
+ var d=Math.max(0,Math.min(1,s/90));r.setProperty("--private-book-lie",d.toFixed(3));r.setProperty("--private-book-stand",(1-d).toFixed(3));r.setProperty("--private-book-glare",n.toFixed(3));r.setProperty("--private-book-glare-x",U(v,o,t.pointer.x).toFixed(1));for(var b=0,f=Object.keys(c);b<f.length;b++){var u=f[b];r.setProperty("--private-book-".concat(u,"-light"),c[u].toFixed(3))}
169
169
  // each slat of a rounded spine faces its own way, so each one takes its own light
170
- var h=T(J.map((function(a){var r=a.yaw;return r})),o.current,e);o.slats.forEach((function(a,r){return a.style.setProperty("--private-book-light",h[r].toFixed(3))}))};this.warnInvalidFormat=function(a){if(!u(a)){console.warn('mds-book: "'.concat(a,'" is not a format, the book takes the proportions of its image. Use auto, a4, a5, b5 or WxH in centimetres'))}};this.warnInvalidPages=function(a){if(!w(a)){console.warn('mds-book: "'.concat(a,'" is not a number of pages, the book is drawn with ').concat(g,". Use a positive number, up to ").concat(k.max))}};this.onLoad=function(a){var r=a.target;if(r.naturalWidth>0&&r.naturalHeight>0){o.imageRatio=r.naturalWidth/r.naturalHeight}o.coverUrl=r.currentSrc||r.src};this.onError=function(){o.coverUrl=undefined;o.imageError=true};this.hasImage=function(){var a;return((a=o.src)!==null&&a!==void 0?a:"")!==""&&!o.imageError};
170
+ var h=L(D.map((function(a){var r=a.yaw;return r})),t.current,e);t.slats.forEach((function(a,r){return a.style.setProperty("--private-book-light",h[r].toFixed(3))}))};this.warnInvalidFormat=function(a){if(!u(a)){console.warn('mds-book: "'.concat(a,'" is not a format, the book takes the proportions of its image. Use auto, a4, a5, b5 or WxH in centimetres'))}};this.warnInvalidPages=function(a){if(!w(a)){console.warn('mds-book: "'.concat(a,'" is not a number of pages, the book is drawn with ').concat(g,". Use a positive number, up to ").concat(m.max))}};this.onLoad=function(a){var r=a.target;if(r.naturalWidth>0&&r.naturalHeight>0){t.imageRatio=r.naturalWidth/r.naturalHeight}t.coverUrl=r.currentSrc||r.src};this.onError=function(){t.coverUrl=undefined;t.imageError=true};this.hasImage=function(){var a;return((a=t.src)!==null&&a!==void 0?a:"")!==""&&!t.imageError};
171
+ // The mark is fetched as a mask fetches its image, with CORS, so a mark the mask could not
172
+ // paint fails here too and leaves the name of the publisher; a new one forgets the last.
173
+ this.loadLogo=function(){var a;if(t.logoLoader){t.logoLoader.onload=null;t.logoLoader.onerror=null}t.logoLoader=undefined;t.logoError=false;t.logoUrl=undefined;var r=((a=t.publisherLogo)!==null&&a!==void 0?a:"").trim();if(r===""||!i.isBrowser)return;var o=new Image;o.crossOrigin="anonymous";o.onload=function(){t.logoUrl=o.src};o.onerror=function(){t.logoError=true};o.src=r;t.logoLoader=o};this.logoPending=function(){var a;return((a=t.publisherLogo)!==null&&a!==void 0?a:"").trim()!==""&&t.logoUrl===undefined&&!t.logoError};
171
174
  // a fixed format wins over the image; auto waits for it, and keeps 17x24 without one
172
- this.ratio=function(){var a,r;return(r=(a=b(o.format))!==null&&a!==void 0?a:o.imageRatio)!==null&&r!==void 0?r:p};this.label=function(){var a,r;if(o.alt!=null)return o.alt;var t=((a=o.name)!==null&&a!==void 0?a:"").trim();var e=((r=o.author)!==null&&r!==void 0?r:"").trim();if(e!==""){return o.t.get("byAuthor",{name:t!==""?t:o.t.get("book"),author:e})}return t!==""?t:o.t.get("book")};
175
+ this.ratio=function(){var a,r;return(r=(a=b(t.format))!==null&&a!==void 0?a:t.imageRatio)!==null&&r!==void 0?r:p};this.label=function(){var a,r;if(t.alt!=null)return t.alt;var o=((a=t.name)!==null&&a!==void 0?a:"").trim();var e=((r=t.author)!==null&&r!==void 0?r:"").trim();if(e!==""){return t.t.get("byAuthor",{name:o!==""?o:t.t.get("book"),author:e})}return o!==""?o:t.t.get("book")};
173
176
  // a book is named by its label, and a decorative one is left out of the accessibility tree
174
- this.hostRole=function(){var a=o.label();return a===""?{role:"presentation"}:{role:"img","aria-label":a}};
177
+ this.hostRole=function(){var a=t.label();return a===""?{role:"presentation"}:{role:"img","aria-label":a}};
175
178
  // What the stylesheet draws the volume from: the pages (their depth is its, from the
176
179
  // thickness of a page), the width of the format in millimetres they are measured against, and
177
180
  // the boards of a hardcover, as shares of that width.
178
- this.bookStyle=function(){var a=f(o.format);var r=q(a,o.binding==="hardcover");var t=function(a){return"".concat((a*100).toFixed(3),"cqi")};var e={"--private-book-board":t(r.board),"--private-book-page-count":String(y(o.pages)),"--private-book-square":t(r.square),"--private-book-width-mm":String(a*10)};if(o.coverUrl!==undefined&&o.hasImage()){e["--private-book-cover"]=h(o.coverUrl)}return e};
181
+ this.bookStyle=function(){var a=f(t.format);var r=q(a,t.binding==="hardcover");var o=function(a){return"".concat((a*100).toFixed(3),"cqi")};var e={"--private-book-board":o(r.board),"--private-book-page-count":String(y(t.pages)),"--private-book-square":o(r.square),"--private-book-width-mm":String(a*10)};if(t.coverUrl!==undefined&&t.hasImage()){e["--private-book-cover"]=h(t.coverUrl)}if(t.logoUrl!==undefined){e["--private-book-logo"]=h(t.logoUrl)}return e};
182
+ // The publisher at the foot of the spine and of a drawn cover: its mark once loaded, its name
183
+ // without one or when the mark fails. While the mark loads the place stays empty, so the name
184
+ // does not show for a moment and then give way to it.
185
+ this.renderPublisher=function(a){var r;if(t.logoUrl!==undefined)return o("span",{class:"".concat(a,"-logo")});if(t.logoPending()||((r=t.publisher)!==null&&r!==void 0?r:"")==="")return null;return o("span",{class:"".concat(a,"-publisher")},t.publisher)};
179
186
  // a spine too narrow for its text shows none, as a thin booklet does (see .spine-text)
180
- this.renderSpineText=function(){return t("div",{class:"spine-text"},o.author&&t("span",{class:"spine-author"},o.author),o.name&&t("span",{class:"spine-name"},o.name),o.publisher&&t("span",{class:"spine-publisher"},o.publisher))};
187
+ this.renderSpineText=function(){return o("div",{class:"spine-text"},t.name&&o("span",{class:"spine-name"},t.name),t.author&&o("span",{class:"spine-author"},t.author),t.renderPublisher("spine"))};
181
188
  // the light of a face: a dark layer whose opacity follows how much the face turns away
182
- this.shade=function(){return t("span",{class:"shade"})};
189
+ this.shade=function(){return o("span",{class:"shade"})};
183
190
  // Rigid boards are slabs with edges of their own, a little larger than the page block they
184
191
  // hold, around a rounded spine; the endpapers show in the gap above and below the pages.
185
- this.renderHardcover=function(){return __spreadArray(__spreadArray(__spreadArray(__spreadArray([],["top","bottom"].flatMap((function(a){return[t("div",{key:"board-".concat(a,"-front"),class:"face board-".concat(a," board-").concat(a,"--front lit-").concat(a)},o.shade()),t("div",{key:"board-".concat(a,"-back"),class:"face board-".concat(a," board-").concat(a,"--back lit-").concat(a)},o.shade()),t("div",{key:"endpaper-".concat(a),class:"face endpaper endpaper--".concat(a," lit-front")},o.shade()),t("div",{key:"pages-".concat(a),class:"face pages-".concat(a," lit-").concat(a)},o.shade()),t("div",{key:"cap-".concat(a),class:"face cap cap--".concat(a," lit-").concat(a),style:{clipPath:K}},o.shade())]})),true),[t("div",{key:"board-fore-front",class:"face board-fore board-fore--front lit-fore"},o.shade()),t("div",{key:"board-fore-back",class:"face board-fore board-fore--back lit-fore"},o.shade()),t("div",{key:"endpaper-fore",class:"face endpaper endpaper--fore lit-front"},o.shade()),t("div",{key:"pages-fore",class:"face pages-fore lit-fore"},o.shade())],false),J.map((function(a,r){var e=a.width,i=a.x,n=a.yaw,s=a.z;return t("div",{key:"slat-".concat(r),class:"face slat",ref:function(a){return a&&(o.slats[r]=a)},style:{"--private-book-slat-width":String(e),"--private-book-slat-x":String(i),"--private-book-slat-yaw":"".concat(n,"deg"),"--private-book-slat-z":String(s)}},o.shade())})),true),[t("div",{key:"spine-label","aria-hidden":"true",class:"face spine-label"},o.renderSpineText())],false)};
192
+ this.renderHardcover=function(){return __spreadArray(__spreadArray(__spreadArray(__spreadArray([],["top","bottom"].flatMap((function(a){return[o("div",{key:"board-".concat(a,"-front"),class:"face board-".concat(a," board-").concat(a,"--front lit-").concat(a)},t.shade()),o("div",{key:"board-".concat(a,"-back"),class:"face board-".concat(a," board-").concat(a,"--back lit-").concat(a)},t.shade()),o("div",{key:"endpaper-".concat(a),class:"face endpaper endpaper--".concat(a," lit-front")},t.shade()),o("div",{key:"pages-".concat(a),class:"face pages-".concat(a," lit-").concat(a)},t.shade()),o("div",{key:"cap-".concat(a),class:"face cap cap--".concat(a," lit-").concat(a),style:{clipPath:J}},t.shade())]})),true),[o("div",{key:"board-fore-front",class:"face board-fore board-fore--front lit-fore"},t.shade()),o("div",{key:"board-fore-back",class:"face board-fore board-fore--back lit-fore"},t.shade()),o("div",{key:"endpaper-fore",class:"face endpaper endpaper--fore lit-front"},t.shade()),o("div",{key:"pages-fore",class:"face pages-fore lit-fore"},t.shade())],false),D.map((function(a,r){var e=a.width,i=a.x,n=a.yaw,s=a.z;return o("div",{key:"slat-".concat(r),class:"face slat",ref:function(a){return a&&(t.slats[r]=a)},style:{"--private-book-slat-width":String(e),"--private-book-slat-x":String(i),"--private-book-slat-yaw":"".concat(n,"deg"),"--private-book-slat-z":String(s)}},t.shade())})),true),[o("div",{key:"spine-label","aria-hidden":"true",class:"face spine-label"},t.renderSpineText())],false)};
186
193
  // A paperback is cut flush: cover and pages end on the same edge, the cover a hairline.
187
- this.renderPaperback=function(){return[t("div",{key:"pages-top",class:"face pages-top pages-flush pages-flush--across lit-top"},o.shade()),t("div",{key:"pages-bottom",class:"face pages-bottom pages-flush pages-flush--across lit-bottom"},o.shade()),t("div",{key:"pages-fore",class:"face pages-fore pages-flush pages-flush--along lit-fore"},o.shade()),t("div",{key:"spine","aria-hidden":"true",class:"face spine lit-spine"},o.renderSpineText(),o.shade())]}}a.prototype.formatHandler=function(a){this.warnInvalidFormat(a)};a.prototype.pagesHandler=function(a){this.warnInvalidPages(a)};
194
+ this.renderPaperback=function(){return[o("div",{key:"pages-top",class:"face pages-top pages-flush pages-flush--across lit-top"},t.shade()),o("div",{key:"pages-bottom",class:"face pages-bottom pages-flush pages-flush--across lit-bottom"},t.shade()),o("div",{key:"pages-fore",class:"face pages-fore pages-flush pages-flush--along lit-fore"},t.shade()),o("div",{key:"spine","aria-hidden":"true",class:"face spine lit-spine"},t.renderSpineText(),t.shade())]}}a.prototype.formatHandler=function(a){this.warnInvalidFormat(a)};a.prototype.pagesHandler=function(a){this.warnInvalidPages(a)};
188
195
  // to another pose, the book moves there, or jumps when it keeps still
189
- a.prototype.poseHandler=function(){this.aim()};a.prototype.srcHandler=function(){this.coverUrl=undefined;this.imageError=false;this.imageRatio=undefined};a.prototype.pointerEnterHandler=function(a){if(a.pointerType==="touch"||this.still())return;this.hovering=true;this.aim()};
196
+ a.prototype.poseHandler=function(){this.aim()};a.prototype.publisherLogoHandler=function(){this.loadLogo()};a.prototype.srcHandler=function(){this.coverUrl=undefined;this.imageError=false;this.imageRatio=undefined};a.prototype.pointerEnterHandler=function(a){if(a.pointerType==="touch"||this.still())return;this.hovering=true;this.aim()};
190
197
  // the book leans toward the pointer; a finger has no hover, it only drags
191
- a.prototype.pointerMoveHandler=function(a){var r,t;if(this.still())return;var o=this.host.getBoundingClientRect(),e=o.left,i=o.top,n=o.width,s=o.height;if(n===0||s===0)return;var v=function(a){return Math.max(-1,Math.min(1,a))};if(a.pointerType!=="touch"){this.pointer={x:v((a.clientX-e)/n*2-1),y:v((a.clientY-i)/s*2-1)}}
198
+ a.prototype.pointerMoveHandler=function(a){var r,o;if(this.still())return;var t=this.host.getBoundingClientRect(),e=t.left,i=t.top,n=t.width,s=t.height;if(n===0||s===0)return;var l=function(a){return Math.max(-1,Math.min(1,a))};if(a.pointerType!=="touch"){this.pointer={x:l((a.clientX-e)/n*2-1),y:l((a.clientY-i)/s*2-1)}}
192
199
  // back over the book with no button held: the drag was released where nothing could tell
193
- if(((r=this.drag)===null||r===void 0?void 0:r.pointerId)===a.pointerId&&a.pointerType!=="touch"&&a.buttons===0){this.endDrag(false)}if(((t=this.drag)===null||t===void 0?void 0:t.pointerId)===a.pointerId){var p=a.clientX-this.drag.startX;if(Math.abs(p)>4)this.drag.moved=true;var l=A(M(this.pose)),c=l.max,d=l.min;this.goal.turn=Math.max(d,Math.min(c,this.drag.startTurn+p/n*j));this.wake();return}this.aim()};
200
+ if(((r=this.drag)===null||r===void 0?void 0:r.pointerId)===a.pointerId&&a.pointerType!=="touch"&&a.buttons===0){this.endDrag(false)}if(((o=this.drag)===null||o===void 0?void 0:o.pointerId)===a.pointerId){var p=a.clientX-this.drag.startX;if(Math.abs(p)>4)this.drag.moved=true;var v=A(M(this.pose)),c=v.max,d=v.min;this.goal.turn=Math.max(d,Math.min(c,this.drag.startTurn+p/n*j));this.wake();return}this.aim()};
194
201
  // a drag turns the book, within limits, to see a side, and lets it go back when released
195
202
  a.prototype.pointerDownHandler=function(a){var r;if(a.button!==0||this.still())return;this.dragged=false;this.drag={moved:false,pointerId:a.pointerId,startTurn:this.current.turn,startX:a.clientX};
196
203
  // the drag goes on outside the book; a pointer the browser no longer tracks cannot be captured
@@ -200,9 +207,9 @@ try{this.host.setPointerCapture(a.pointerId)}catch(a){
200
207
  // the browser took the pointer back (a scroll, a gesture), or let it go out of the frame
201
208
  a.prototype.pointerLostHandler=function(a){var r;if(((r=this.drag)===null||r===void 0?void 0:r.pointerId)===a.pointerId)this.endDrag(false)};a.prototype.pointerLeaveHandler=function(){if(this.drag!==undefined)return;this.hovering=false;this.pointer={x:0,y:0};this.aim()};
202
209
  // a drag that turned the book is not a click: inside a link, it would follow the link
203
- a.prototype.clickHandler=function(a){if(!this.dragged)return;this.dragged=false;a.preventDefault();a.stopPropagation()};a.prototype.componentWillLoad=function(){this.warnInvalidFormat(this.format);this.warnInvalidPages(this.pages);this.current=this.goal=M(this.pose)};
210
+ a.prototype.clickHandler=function(a){if(!this.dragged)return;this.dragged=false;a.preventDefault();a.stopPropagation()};a.prototype.componentWillLoad=function(){this.warnInvalidFormat(this.format);this.warnInvalidPages(this.pages);this.current=this.goal=M(this.pose);this.loadLogo()};
204
211
  // after every render, so the faces a new binding brings take the light of the pose at once,
205
212
  // and a book told to keep still (a preference that changed) goes back to its pose
206
- a.prototype.componentDidRender=function(){if(!i.isBrowser)return;if(this.still())this.current=this.goal=M(this.pose);this.writePose()};a.prototype.disconnectedCallback=function(){var a;if(this.frame!==undefined)cancelAnimationFrame(this.frame);this.frame=undefined;this.drag=undefined;(a=this.dragWatch)===null||a===void 0?void 0:a.abort();this.dragWatch=undefined;this.hovering=false};a.prototype.render=function(){var a=this;var r=this.binding==="hardcover";if(!r)this.slats=[];return t(o,Object.assign({key:"bb31d3ccdd45d59a6586d179bec741c03f424137"},this.hostRole(),{"pref-animation":s.state.animation,"pref-consumption":s.state.consumption,
213
+ a.prototype.componentDidRender=function(){if(!i.isBrowser)return;if(this.still())this.current=this.goal=M(this.pose);this.writePose()};a.prototype.disconnectedCallback=function(){var a;if(this.frame!==undefined)cancelAnimationFrame(this.frame);this.frame=undefined;this.drag=undefined;(a=this.dragWatch)===null||a===void 0?void 0:a.abort();this.dragWatch=undefined;this.hovering=false};a.prototype.render=function(){var a=this;var r=this.binding==="hardcover";if(!r)this.slats=[];return o(t,Object.assign({key:"6db72570ca99aeae50cd052ce53087f6838176d5"},this.hostRole(),{"pref-animation":s.state.animation,"pref-consumption":s.state.consumption,
207
214
  // the proportions of the book are those of the host, as an image keeps its own
208
- style:{"--private-book-ratio":String(this.ratio())}}),t("div",{key:"d9f8342b3fbb727a4e8bf7fcc0bb8ef3ea2882bb",class:"scene",ref:function(r){return a.scene=r}},t("div",{key:"49ed3560379bf7f7dfbc6a08674c87e80235b86f",class:"stage"},t("div",{key:"ab97382a831ca738280c51fed61c518fd536f597",class:{book:true,"book--pending":this.hasImage()&&this.coverUrl===undefined},style:this.bookStyle()},t("div",{key:"8c91cb0b329bcf9bf6ab643fd3a0eef0722aba07",class:"floor floor--stand"}),t("div",{key:"e31e08f16ed68c3a7b43a12974ac46bb94312525",class:"floor floor--lie"}),t("div",{key:"ddc2cf056c231994f1baa01c6ebf1af6369c1459",class:"body"},t("div",{key:"6fa239a5ebfd2ec588db478faf6961cde3689950",class:"face front lit-front"},this.hasImage()?t("img",{alt:"","aria-hidden":"true",class:"cover",draggable:false,loading:this.loading,onError:this.onError,onLoad:this.onLoad,part:"cover",src:this.src}):t("div",{"aria-hidden":"true",class:"drawn-cover"},this.author&&t("span",{class:"drawn-author"},this.author),this.name&&t("span",{class:"drawn-name"},this.name),this.publisher&&t("span",{class:"drawn-publisher"},this.publisher)),t("span",{key:"57fa73e7b9b201a245b2f0ae7ee00bb60e726556",class:"gloss"}),this.shade()),r?this.renderHardcover():this.renderPaperback())))))};Object.defineProperty(a.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],src:[{srcHandler:0}]}},enumerable:false,configurable:true});return a}());la.style=pa()}}}));
215
+ style:{"--private-book-ratio":String(this.ratio())}}),o("div",{key:"a29488e2e6b9082dfdb9eff07f02f99914226643",class:"scene",ref:function(r){return a.scene=r}},o("div",{key:"fa6308238a1093dc99028cf46719f2e2597300fb",class:"stage"},o("div",{key:"dfd216ee44d9f22a7fc01a76553871969ce8e24d",class:{book:true,"book--pending":this.hasImage()&&this.coverUrl===undefined},style:this.bookStyle()},o("div",{key:"b355dc416691ccb540ddfc66ef4878fb2a3b0f94",class:"floor floor--stand"}),o("div",{key:"6a9c1d6da5077a160c28e0ed042dae5331009f1e",class:"floor floor--lie"}),o("div",{key:"34ba5e97961fce9af6dd2f76e9dbc3cb66f1c5b9",class:"body"},o("div",{key:"17881cac62566ff36b44f5ed76e6d2355df3cb3f",class:"face front lit-front"},this.hasImage()?o("img",{alt:"","aria-hidden":"true",class:"cover",draggable:false,loading:this.loading,onError:this.onError,onLoad:this.onLoad,part:"cover",src:this.src}):o("div",{"aria-hidden":"true",class:"drawn-cover"},this.author&&o("span",{class:"drawn-author"},this.author),this.name&&o("span",{class:"drawn-name"},this.name),this.renderPublisher("drawn")),o("span",{key:"0ac0926637c0a49703e658ccd67c2f01aa185c19",class:"gloss"}),this.shade()),r?this.renderHardcover():this.renderPaperback())))))};Object.defineProperty(a.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],publisherLogo:[{publisherLogoHandler:0}],src:[{srcHandler:0}]}},enumerable:false,configurable:true});return a}());va.style=pa()}}}));
@@ -0,0 +1 @@
1
+ import{r as t,d as a,h as i,e as r,g as n}from"./p-CvLLN-QH.js";import{g as o}from"./p-B85MJLTf.js";import{m as e}from"./p-BJ8rpzfj.js";import{h as s}from"./p-AEckDMXh.js";import{c}from"./p-ChV9xqsO.js";import{L as u}from"./p-OafT80hV.js";import{s as h}from"./p-CACEYk42.js";import{p as d}from"./p-iX3kcwYg.js";var m,l,f={exports:{}},v=o((m||(m=1,f.exports=function(){var t=6e4,a=36e5,i="millisecond",r="second",n="minute",o="hour",e="day",s="week",c="month",u="quarter",h="year",d="date",m="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var a=["th","st","nd","rd"],i=t%100;return"["+t+(a[(i-20)%10]||a[i]||a[0])+"]"}},g=function(t,a,i){var r=String(t);return!r||r.length>=a?t:""+Array(a+1-r.length).join(i)+t},p={s:g,z:function(t){var a=-t.utcOffset(),i=Math.abs(a),r=Math.floor(i/60),n=i%60;return(a<=0?"+":"-")+g(r,2,"0")+":"+g(n,2,"0")},m:function t(a,i){if(a.date()<i.date())return-t(i,a);var r=12*(i.year()-a.year())+(i.month()-a.month()),n=a.clone().add(r,c),o=i-n<0,e=a.clone().add(r+(o?-1:1),c);return+(-(r+(i-n)/(o?n-e:e-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:s,d:e,D:d,h:o,m:n,s:r,ms:i,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",y={};y[b]=v;var k="$isDayjsObject",w=function(t){return t instanceof _||!(!t||!t[k])},x=function t(a,i,r){var n;if(!a)return b;if("string"==typeof a){var o=a.toLowerCase();y[o]&&(n=o),i&&(y[o]=i,n=o);var e=a.split("-");if(!n&&e.length>1)return t(e[0])}else{var s=a.name;y[s]=a,n=s}return!r&&n&&(b=n),n||!r&&b},M=function(t,a){if(w(t))return t.clone();var i="object"==typeof a?a:{};return i.date=t,i.args=arguments,new _(i)},D=p;D.l=x,D.i=w,D.w=function(t,a){return M(t,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var _=function(){function v(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var g=v.prototype;return g.parse=function(t){this.$d=function(t){var a=t.date,i=t.utc;if(null===a)return new Date(NaN);if(D.u(a))return new Date;if(a instanceof Date)return new Date(a);if("string"==typeof a&&!/Z$/i.test(a)){var r=a.match(l);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(a)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return D},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(t,a){var i=M(t);return this.startOf(a)<=i&&i<=this.endOf(a)},g.isAfter=function(t,a){return M(t)<this.startOf(a)},g.isBefore=function(t,a){return this.endOf(a)<M(t)},g.$g=function(t,a,i){return D.u(t)?this[a]:this.set(i,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,a){var i=this,u=!!D.u(a)||a,m=D.p(t),l=function(t,a){var r=D.w(i.$u?Date.UTC(i.$y,a,t):new Date(i.$y,a,t),i);return u?r:r.endOf(e)},f=function(t,a){return D.w(i.toDate()[t].apply(i.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(a)),i)},v=this.$W,g=this.$M,p=this.$D,b="set"+(this.$u?"UTC":"");switch(m){case h:return u?l(1,0):l(31,11);case c:return u?l(1,g):l(0,g+1);case s:var y=this.$locale().weekStart||0,k=(v<y?v+7:v)-y;return l(u?p-k:p+(6-k),g);case e:case d:return f(b+"Hours",0);case o:return f(b+"Minutes",1);case n:return f(b+"Seconds",2);case r:return f(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,a){var s,u=D.p(t),m="set"+(this.$u?"UTC":""),l=(s={},s[e]=m+"Date",s[d]=m+"Date",s[c]=m+"Month",s[h]=m+"FullYear",s[o]=m+"Hours",s[n]=m+"Minutes",s[r]=m+"Seconds",s[i]=m+"Milliseconds",s)[u],f=u===e?this.$D+(a-this.$W):a;if(u===c||u===h){var v=this.clone().set(d,1);v.$d[l](f),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](f);return this.init(),this},g.set=function(t,a){return this.clone().$set(t,a)},g.get=function(t){return this[D.p(t)]()},g.add=function(i,u){var d,m=this;i=Number(i);var l=D.p(u),f=function(t){var a=M(m);return D.w(a.date(a.date()+Math.round(t*i)),m)};if(l===c)return this.set(c,this.$M+i);if(l===h)return this.set(h,this.$y+i);if(l===e)return f(1);if(l===s)return f(7);var v=(d={},d[n]=t,d[o]=a,d[r]=1e3,d)[l]||1,g=this.$d.getTime()+i*v;return D.w(g,this)},g.subtract=function(t,a){return this.add(-1*t,a)},g.format=function(t){var a=this,i=this.$locale();if(!this.isValid())return i.invalidDate||m;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=D.z(this),o=this.$H,e=this.$m,s=this.$M,c=i.weekdays,u=i.months,h=function(t,i,n,o){return t&&(t[i]||t(a,r))||n[i].slice(0,o)},d=function(t){return D.s(o%12||12,t,"0")},l=i.meridiem||function(t,a,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r};return r.replace(f,(function(t,r){return r||function(t){switch(t){case"YY":return String(a.$y).slice(-2);case"YYYY":return D.s(a.$y,4,"0");case"M":return s+1;case"MM":return D.s(s+1,2,"0");case"MMM":return h(i.monthsShort,s,u,3);case"MMMM":return h(u,s);case"D":return a.$D;case"DD":return D.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return h(i.weekdaysMin,a.$W,c,2);case"ddd":return h(i.weekdaysShort,a.$W,c,3);case"dddd":return c[a.$W];case"H":return String(o);case"HH":return D.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return l(o,e,!0);case"A":return l(o,e,!1);case"m":return String(e);case"mm":return D.s(e,2,"0");case"s":return String(a.$s);case"ss":return D.s(a.$s,2,"0");case"SSS":return D.s(a.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(i,d,m){var l,f=this,v=D.p(d),g=M(i),p=(g.utcOffset()-this.utcOffset())*t,b=this-g,y=function(){return D.m(f,g)};switch(v){case h:l=y()/12;break;case c:l=y();break;case u:l=y()/3;break;case s:l=(b-p)/6048e5;break;case e:l=(b-p)/864e5;break;case o:l=b/a;break;case n:l=b/t;break;case r:l=b/1e3;break;default:l=b}return m?l:D.a(l)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return y[this.$L]},g.locale=function(t,a){if(!t)return this.$L;var i=this.clone(),r=x(t,a,!0);return r&&(i.$L=r),i},g.clone=function(){return D.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),S=_.prototype;return M.prototype=S,[["$ms",i],["$s",r],["$m",n],["$H",o],["$W",e],["$M",c],["$y",h],["$D",d]].forEach((function(t){S[t[1]]=function(a){return this.$g(a,t[0],t[1])}})),M.extend=function(t,a){return t.$i||(t(a,_,M),t.$i=!0),M},M.locale=x,M.isDayjs=w,M.unix=function(t){return M(1e3*t)},M.en=y[b],M.Ls=y,M.p={},M}()),f.exports)),g={dismiss:"Κλείσιμο",future:"σε %s",past:"πριν από %s",s:"λίγα δευτ.",m:"1 λεπτό",mm:"%d λεπτά",h:"1 ώρα",hh:"%d ώρες",d:"1 ημέρα",dd:"%d ημέρες",M:"1 μήνας",MM:"%d μήνες",y:"1 έτος",yy:"%d έτη"},p={dismiss:"Close",future:"in %s",past:"%s ago",s:"few sec",m:"1 min",mm:"%d mins",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",M:"1 month",MM:"%d months",y:"1 year",yy:"%d years"},b={dismiss:"Cerrar",future:"en %s",past:"hace %s",s:"pocos seg",m:"1 min",mm:"%d mins",h:"1 hora",hh:"%d horas",d:"1 día",dd:"%d días",M:"1 mes",MM:"%d meses",y:"1 año",yy:"%d años"},y={dismiss:"Chiudi",future:"tra %s",past:"%s fa",s:"pochi sec",m:"1 min",mm:"%d min",h:"1 ora",hh:"%d ore",d:"1 giorno",dd:"%d giorni",M:"1 mese",MM:"%d mesi",y:"1 anno",yy:"%d anni"},k={exports:{}},w=o((l||(l=1,k.exports=function(t,a,i){t=t||{};var r=a.prototype,n={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(t,a,i,n){return r.fromToBase(t,a,i,n)}i.en.relativeTime=n,r.fromToBase=function(a,r,o,e,s){for(var c,u,h,d=o.$locale().relativeTime||n,m=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=m.length,f=0;f<l;f+=1){var v=m[f];v.d&&(c=e?i(a).diff(o,v.d,!0):o.diff(a,v.d,!0));var g=(t.rounding||Math.round)(Math.abs(c));if(h=c>0,g<=v.r||!v.r){g<=1&&f>0&&(v=m[f-1]);var p=d[v.l];s&&(g=s(""+g)),u="string"==typeof p?p.replace("%d",g):p(g,r,v.l,h);break}}if(r)return u;var b=h?d.future:d.past;return"function"==typeof b?b(u):b.replace("%s",u)},r.to=function(t,a){return o(t,a,this,!0)},r.from=function(t,a){return o(t,a,this)};var e=function(t){return t.$u?i.utc():i()};r.toNow=function(t){return this.to(e(this),t)},r.fromNow=function(t){return this.from(e(this),t)}}),k.exports));const x=class{constructor(i){t(this,i),this.closedEvent=a(this,"mdsPushNotificationItemClose",7),this.t=new u({el:g,en:p,es:b,it:y}),this.dateFormat="timeago",this.deletable=!1,this.message="Nessun messaggio disponibile",this.preview="image",this.tone="weak",this.onClickClose=t=>{t.stopPropagation(),this.closedEvent.emit({id:this.host.id})},this.isDismissible=()=>!0===this.dismissible||!0===this.deletable,this.onSlotChange=()=>{this.hasActions=s(this.host,"action"),this.hasBadge=s(this.host,"badge")}}componentDidLoad(){this.handleDismissibleChange(this.dismissible),this.handleDeletableChange(this.deletable)}componentWillLoad(){var t;v.extend(w),this.onSlotChange(),void 0!==this.datetime&&""!==this.datetime&&(this.datetime=null!==(t=h(this.datetime.toString()))&&void 0!==t?t:void 0);const a={future:this.t.get("future"),past:this.t.get("past"),s:this.t.get("s"),m:this.t.get("m"),mm:this.t.get("mm"),h:this.t.get("h"),hh:this.t.get("hh"),d:this.t.get("d"),dd:this.t.get("dd"),M:this.t.get("M"),MM:this.t.get("MM"),y:this.t.get("y"),yy:this.t.get("yy")};v.locale("custom-locale",{relativeTime:a})}handleDismissibleChange(t){!1===t&&(this.dismissible=void 0)}handleDeletableChange(t){!1===t&&(this.deletable=void 0)}render(){var t;return i(r,{key:"aaf48c85945480a2a5cefe2fc114d546b40d0897","pref-animation":d.state.animation,"pref-contrast":d.state.contrast,"pref-mode":d.state.mode,"pref-theme-scheme":d.state["theme-scheme"]},(null!==(t=this.icon)&&void 0!==t?t:"avatar"===this.preview)&&i("mds-avatar",{key:"f180749e154e9f89f66a0f96f3863fb3118d137e",class:"avatar",icon:this.icon,initials:this.initials,part:"avatar",src:this.src,tone:this.tone,variant:this.variant}),this.src&&"avatar"!==this.preview&&i("mds-img",{key:"a0e4feeaac5b4f1cbce24364fbe9b2a22702881a",class:"picture",part:"picture",src:this.src}),i("div",{key:"4a3b26dfc42c9de31757b5e9106d205002962282",class:"content",part:"content"},i("div",{key:"ddada3cea2bf2d42ace0abe8a5a2de034513b3a8",class:"header"},i("div",{key:"7035d2e270443166b3e78ccc41c540acaeadf587",class:"infos"},i("div",{key:"6a403603db28998a16d0234f357fc5d4365e395a",class:c("badge",!this.hasBadge&&"badge--hidden")},i("slot",{key:"dfd6f7aaee176fa23af69056feb65d2b254d5fac",name:"badge",onSlotchange:this.onSlotChange})),this.subject&&i("mds-text",{key:"b82737efc27ae0abb6e0ffa67f4dfd94b223fedd",class:"subject",typography:"h6",variant:"title",truncate:"all"},this.subject)),this.datetime&&i("mds-text",{key:"6118eb055881ac883e845fb9c7923ac5a115bc8b",class:"time",typography:"option"},"timeago"===this.dateFormat?v(this.datetime).fromNow():v(this.datetime).format(this.dateFormat))),i("mds-text",{key:"d25beeb3d0e8342d2154fd5d3161b61d5445ba32",class:"message",truncate:"all",typography:"caption",variant:"info"},this.message),i("div",{key:"bb064523c4539d63cf094db5c7099d8d3ad8ca87",class:c("actions",!this.hasActions&&"actions--hidden"),part:"actions"},i("slot",{key:"8aed1479928b60b81a8973a8b2dd07f2f57f4450",name:"action",onSlotchange:this.onSlotChange}))),this.isDismissible()&&i("mds-button",{key:"1f669d8c40d48add6f3013fd0ff3a59d198ae727",class:"close-button",variant:"dark",tone:"text",title:this.t.get("dismiss"),icon:e,onClick:this.onClickClose}))}get host(){return n(this)}static get watchers(){return{dismissible:[{handleDismissibleChange:0}],deletable:[{handleDeletableChange:0}]}}};x.style="@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-button,mds-img,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-push-notification-item-duration:var(--duration-300,.3s);--private-push-notification-item-duration:var(--mds-push-notification-item-duration,var(--duration-300,.3s));--mds-push-notification-item-icon-background-color:#0000;--mds-push-notification-item-icon-color:rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99)));--mds-push-notification-item-message-line-clamp:2;--mds-push-notification-item-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);--mds-push-notification-item-subject-line-clamp:1;--mds-push-notification-item-timing-function:var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1));background-color:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-shadow:var(--mds-push-notification-item-shadow);color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:var(--magma-corner-shape,squircle);align-items:flex-start;display:flex;gap:calc(var(--spacing,.0025rem)*400);max-width:calc(var(--spacing,.0025rem)*8000);min-width:calc(var(--spacing,.0025rem)*7200);padding:calc(var(--spacing,.0025rem)*400);pointer-events:auto;position:relative;transition-duration:var(--private-push-notification-item-duration);transition-property:background-color,box-shadow,color,margin,transform;transition-timing-function:var(--mds-push-notification-item-timing-function)}:host([deletable]:not([deletable=false])),:host([dismissible]:not([dismissible=false])){padding-right:calc(var(--spacing,.0025rem)*800)}.content{display:grid;flex-grow:1}.actions{display:flex;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*200);min-width:1px;padding-top:calc(var(--spacing,.0025rem)*200)}.actions--hidden,.badge--hidden{display:none}.avatar,.picture{flex-shrink:0}.picture{border-radius:var(--magma-radius-3xs,var(--radius-squircle-3xs,6px));box-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);corner-shape:var(--magma-corner-shape,squircle);max-width:calc(var(--spacing,.0025rem)*1200);width:100%}.close-button{opacity:0;padding:calc(var(--spacing,.0025rem)*150);position:absolute;right:0;top:0;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,rotate,scale,transform,translate,width;transition-timing-function:var(--default-transition-timing-function)}:host(:hover) .close-button{opacity:1}.close-button:focus-visible,.close-button:hover{fill:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)));opacity:1}.header{align-items:baseline;display:flex;gap:calc(var(--spacing,.0025rem)*100);justify-content:space-between;min-width:0;overflow:hidden;text-overflow:ellipsis}.infos{display:flex;flex-direction:column}.time{flex-shrink:0;margin-right:calc(var(--spacing,.0025rem)*100);white-space:nowrap}.subject{--mds-text-line-clamp:var(--mds-push-notification-item-subject-line-clamp,1);line-height:var(--leading-sm,1.25rem)}.message,.subject{text-overflow:ellipsis}.message{--mds-text-line-clamp:var(--mds-push-notification-item-message-line-clamp,2)}.avatar{background-color:var(--mds-push-notification-item-icon-background-color,#0000);border-radius:var(--magma-radius-full,var(--radius-full,1000px));fill:var(--mds-push-notification-item-icon-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.avatar::part(svg){width:calc(var(--spacing,.0025rem)*600)}:host([src]) .avatar{background-color:#0000}:host([icon]) .avatar::part(wrapper){padding:calc(var(--spacing,.0025rem)*150)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-push-notification-item-duration:0s}:host([pref-contrast=more]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([variant=primary][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240)))}:host([variant=primary]),:host([variant=primary][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)))}:host([variant=orange][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-05,213 90 5));--mds-push-notification-item-icon-color:rgb(var(--label-orange-10,254 233 219))}:host([variant=orange]),:host([variant=orange][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-09,253 217 191));--mds-push-notification-item-icon-color:rgb(var(--label-orange-05,213 90 5))}:host([variant=amaranth][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-05,242 37 72));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-10,254 232 236))}:host([variant=amaranth]),:host([variant=amaranth][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-09,253 214 221));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-05,242 37 72))}:host([variant=orchid][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-05,233 44 137));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-10,253 231 242))}:host([variant=orchid]),:host([variant=orchid][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-09,251 213 232));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-05,233 44 137))}:host([variant=purple][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-05,168 86 247));--mds-push-notification-item-icon-color:rgb(var(--label-purple-10,244 233 254))}:host([variant=purple]),:host([variant=purple][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-09,235 216 253));--mds-push-notification-item-icon-color:rgb(var(--label-purple-05,168 86 247))}:host([variant=red][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-05,230 66 66));--mds-push-notification-item-icon-color:rgb(var(--label-red-10,252 233 233))}:host([variant=red]),:host([variant=red][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-09,250 215 215));--mds-push-notification-item-icon-color:rgb(var(--label-red-05,230 66 66))}:host([variant=violet][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-05,145 100 246));--mds-push-notification-item-icon-color:rgb(var(--label-violet-10,240 234 254))}:host([variant=violet]),:host([variant=violet][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-09,229 218 253));--mds-push-notification-item-icon-color:rgb(var(--label-violet-05,145 100 246))}:host([variant=blue][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-05,90 117 249));--mds-push-notification-item-icon-color:rgb(var(--label-blue-10,233 236 254))}:host([variant=blue]),:host([variant=blue][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-09,216 222 254));--mds-push-notification-item-icon-color:rgb(var(--label-blue-05,90 117 249))}:host([variant=sky][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-05,12 136 193));--mds-push-notification-item-icon-color:rgb(var(--label-sky-10,217 241 253))}:host([variant=sky]),:host([variant=sky][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-09,185 231 251));--mds-push-notification-item-icon-color:rgb(var(--label-sky-05,12 136 193))}:host([variant=aqua][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-05,5 141 165));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-10,199 245 253))}:host([variant=aqua]),:host([variant=aqua][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-09,151 237 252));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-05,5 141 165))}:host([variant=green][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-05,26 148 71));--mds-push-notification-item-icon-color:rgb(var(--label-green-10,206 247 221))}:host([variant=green]),:host([variant=green][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-09,165 240 193));--mds-push-notification-item-icon-color:rgb(var(--label-green-05,26 148 71))}:host([variant=lime][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-05,93 143 15));--mds-push-notification-item-icon-color:rgb(var(--label-lime-10,219 247 178))}:host([variant=lime]),:host([variant=lime][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-09,189 239 111));--mds-push-notification-item-icon-color:rgb(var(--label-lime-05,93 143 15))}:host([variant=yellow][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-05,161 124 6));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-10,253 236 186))}:host([variant=yellow]),:host([variant=yellow][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-09,251 221 131));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-05,161 124 6))}:host([variant=error][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=error]),:host([variant=error][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=warning][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=warning]),:host([variant=warning][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=success][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=success]),:host([variant=success][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=info][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=info]),:host([variant=info][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-push-notification-item-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}";export{x as mds_push_notification_item}
@@ -0,0 +1,80 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,o,i,n){function a(t){return t instanceof i?t:new i((function(o){o(t)}))}return new(i||(i=Promise))((function(i,e){function s(t){try{d(n.next(t))}catch(t){e(t)}}function r(t){try{d(n["throw"](t))}catch(t){e(t)}}function d(t){t.done?i(t.value):a(t.value).then(s,r)}d((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},n,a,e,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=r(0),s["throw"]=r(1),s["return"]=r(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(t){return function(o){return d([t,o])}}function d(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(i=0)),i)try{if(n=1,a&&(e=r[0]&2?a["return"]:r[0]?a["throw"]||((e=a["return"])&&e.call(a),0):a.next)&&!(e=e.call(a,r[1])).done)return e;if(a=0,e)r=[r[0]&2,e.value];switch(r[0]){case 0:case 1:e=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!e||r[1]>e[0]&&r[1]<e[3])){i.label=r[1];break}if(r[0]===6&&i.label<e[1]){i.label=e[1];e=r;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(r);break}if(e[2])i.ops.pop();i.trys.pop();continue}r=o.call(t,i)}catch(t){r=[6,t];a=0}finally{n=e=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-BZP13mns.system.js","./p-Qrub-hmK.system.js","./p-BeNKMPXR.system.js","./p-B-nayZ3E.system.js","./p-mGgjNqBm.system.js","./p-C61qxZLH.system.js","./p-CuHZXISO.system.js"],(function(t){"use strict";var o,i,n,a,e,s,r,d,l,c,m;return{setters:[function(t){o=t.r;i=t.d;n=t.h;a=t.e;e=t.g},function(t){s=t.c},function(t){r=t.h},function(t){d=t.c},function(t){l=t.p},function(t){c=t.m},function(t){m=t.L}],execute:function(){var h="Κλείσιμο";var p={close:h};var f="Close";var u={close:f};var w="Cerrar";var g={close:w};var v="Chiudi";var b={close:v};var y=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translateY(10%);--mds-modal-custom-window-distance:calc(var(--spacing,.0025rem)*600);--mds-modal-overlay-color:var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0));--mds-modal-overlay-opacity:var(--magma-overlay-opacity,.5);--mds-modal-transition-duration:var(--duration-500,.5s);--mds-modal-transition-timing-function:var(--mds-modal-transition-timing-funciton,var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1)));--mds-modal-window-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-modal-window-distance:0px;--mds-modal-window-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:var(--shadow-2xl,0 25px 50px -12px #00000040);--mds-modal-window-max-width:33%;--mds-modal-window-min-width:calc(var(--spacing,.0025rem)*10000);--mds-modal-z-index:var(--magma-modal-z-index,3000);--private-modal-transition-duration:var(--mds-modal-transition-duration,var(--duration-500,.5s));--private-modal-width:calc(100vw - var(--private-modal-window-close-margin));--private-modal-custom-opened-transform:translate(0);--private-modal-opened-transform:none;--private-modal-transition-window-transform:translate(0);--private-modal-window-close-margin:calc(var(--spacing,.0025rem)*2000);display:contents}.dialog{align-items:center;background-color:#0000;border:0;box-sizing:border-box;color:inherit;display:none;fill:rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));height:auto;inset:0;justify-content:center;margin:0;max-height:none;max-width:none;overflow:clip;padding:0;perspective:calc(var(--spacing,.0025rem)*15000);position:fixed;transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function);width:auto;z-index:var(--mds-modal-z-index,1000)}.dialog[open]{display:flex}.dialog::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0);transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function)}:host([hide-backdrop]) .dialog{pointer-events:none}.action-close{--mds-button-color:rgb(var(--magma-on-backdrop,252 252 252));opacity:0;pointer-events:none;position:absolute;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,bottom,color,fill,opacity,top,transform;transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}:host([position=top-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=top][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(.5) translateY(-80%)}:host([position=top-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([position=left][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotate(0) scale(.5) translate(-100%)}:host([position=center][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(.5) translateY(40%)}:host([position=right][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotate(0) scale(.5) translate(100%)}:host([position=bottom-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=bottom][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(.5) translateY(80%)}:host([position=bottom-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([animation=custom]){--private-modal-opened-transform:var(--private-modal-custom-opened-transform);--private-modal-transition-window-transform:var(--mds-modal-custom-closed-transform,rotateX(10deg) rotateY(0) scale(1.25) translate(0,10%))}:host([position=top-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,-100%)}:host([position=top][animation=slide]){--private-modal-transition-window-transform:translateY(-100%)}:host([position=top-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,-100%)}:host([position=left][animation=slide]){--private-modal-transition-window-transform:translate(-100%)}:host([position=center][animation=slide]){--private-modal-transition-window-transform:translateY(25%)}:host([position=right][animation=slide]){--private-modal-transition-window-transform:translate(100%)}:host([position=bottom-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,100%)}:host([position=bottom][animation=slide]){--private-modal-transition-window-transform:translateY(50%)}:host([position=bottom-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,100%)}.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/var(--mds-modal-overlay-opacity,var(--magma-overlay-opacity,.5)))}@starting-style{.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0)}}:host ::slotted([slot=window]){margin:var(--mds-modal-custom-window-distance,calc(var(--spacing,.0025rem)*600))}.window{background-color:var(--mds-modal-window-background,rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255))));border-radius:var(--mds-modal-window-radius,0);box-shadow:var(--mds-modal-window-shadow);box-sizing:border-box;display:grid;gap:0;grid-template-columns:repeat(1,minmax(0,100%));height:var(--mds-modal-window-height);margin:var(--mds-modal-window-distance,0);max-height:var(--mds-modal-window-max-height);max-width:var(--private-modal-width);min-width:var(--mds-modal-window-min-width,calc(var(--spacing,.0025rem)*10000));overflow:var(--mds-modal-window-overflow,auto);position:relative;width:100%}.window-content--empty{display:none}.window-content-wrapper{max-height:var(--mds-modal-window-max-height);overflow:hidden}.window-footer,.window-header{box-sizing:border-box;position:absolute}.window-header{inset:0 0 auto}.window-footer{inset:auto 0 0}.dialog .window,.dialog ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform);transition-duration:var(--private-modal-transition-duration);transition-property:transform,opacity;transition-timing-function:var(--mds-modal-transition-timing-function)}.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:1;pointer-events:auto;transform:var(--private-modal-opened-transform)}@starting-style{.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform)}.window-content-wrapper{overflow:hidden}}:host([position=top-left]) .dialog,:host([position=top-right]) .dialog,:host([position=top]) .dialog{align-items:flex-start}:host([position=center]) .dialog,:host([position=left]) .dialog,:host([position=right]) .dialog{align-items:center}:host([position=bottom-left]) .dialog,:host([position=bottom-right]) .dialog,:host([position=bottom]) .dialog{align-items:flex-end}:host([position=bottom-left]) .dialog,:host([position=left]) .dialog,:host([position=top-left]) .dialog{justify-content:flex-start}:host([position=bottom]) .dialog,:host([position=center]) .dialog,:host([position=top]) .dialog{justify-content:center}:host([position=bottom-right]) .dialog,:host([position=right]) .dialog,:host([position=top-right]) .dialog{justify-content:flex-end}:host([position=top]){--mds-modal-window-height:auto;align-items:flex-start;justify-content:center}:host([position=top]) .window{--mds-modal-window-max-width:100vw;--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--mds-modal-window-height:100%;--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2)}:host([position=top-left]){align-items:flex-start;justify-content:flex-start}:host([position=top-right]){align-items:flex-start;justify-content:flex-end}:host([position=left]){align-items:center;justify-content:flex-start}:host([position=left]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=left][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=left]:not([opened])) .action-close{transform:translate(-120%)rotate(-45deg)}:host([position=center]){align-items:center;justify-content:center}:host([position=right]){align-items:center;justify-content:flex-end}:host([position=right]) .action-close{left:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=right]:not([opened])) .action-close{transform:translate(120%)rotate(45deg)}:host([position=right][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]){align-items:flex-end;justify-content:flex-start}:host([position=bottom]){--mds-modal-window-height:auto;align-items:flex-end;justify-content:center}:host([position=bottom-right]){align-items:flex-end;justify-content:flex-end}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-modal-transition-duration:0s}:host([pref-contrast=more]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}@media (max-width:480px){:host{--mds-modal-window-min-width:0px}:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--private-modal-width:100vw}:host([position=left]),:host([position=right]){--private-modal-width:calc(100% - var(--private-modal-window-close-margin))}:host([position=bottom-left]),:host([position=bottom-right]),:host([position=center]),:host([position=top-left]),:host([position=top-right]){--mds-modal-window-height:calc(100dvh - var(--private-modal-window-close-margin) - var(--mds-modal-window-distance,0)*2);--mds-modal-window-max-height:var(--mds-modal-window-height)}:host([position=bottom-left]) .dialog,:host([position=bottom-right]) .dialog,:host([position=center]) .dialog,:host([position=top-left]) .dialog,:host([position=top-right]) .dialog{align-items:flex-end}:host([position=bottom]),:host([position=top]){--mds-modal-window-max-height:calc(100dvh - var(--private-modal-window-close-margin) - var(--mds-modal-window-distance,0)*2)}:host([position=bottom-left]) .action-close,:host([position=bottom-right]) .action-close,:host([position=bottom]) .action-close,:host([position=center]) .action-close,:host([position=top-left]) .action-close,:host([position=top-right]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=top]) .action-close{bottom:calc(var(--spacing,.0025rem)*300);right:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-left][opened]) .action-close,:host([position=bottom-right][opened]) .action-close,:host([position=bottom][opened]) .action-close,:host([position=center][opened]) .action-close,:host([position=top-left][opened]) .action-close,:host([position=top-right][opened]) .action-close,:host([position=top][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]:not([opened])) .action-close,:host([position=bottom-right]:not([opened])) .action-close,:host([position=bottom]:not([opened])) .action-close,:host([position=center]:not([opened])) .action-close,:host([position=top-left]:not([opened])) .action-close,:host([position=top-right]:not([opened])) .action-close{transform:translateY(-120%)rotate(45deg)}:host([position=top]:not([opened])) .action-close{transform:translateY(120%)rotate(-45deg)}}@media not all and (max-width:480px){:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--private-modal-width:var(--mds-modal-window-max-width,33%)}:host([position=bottom]),:host([position=center]),:host([position=top]){--private-modal-width:calc(100vw - var(--private-modal-window-close-margin)*2)}:host([position=bottom-left]) .action-close,:host([position=bottom]) .action-close,:host([position=center]) .action-close,:host([position=top-left]) .action-close,:host([position=top]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-right]) .action-close,:host([position=top-right]) .action-close{left:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-left][opened]) .action-close,:host([position=bottom-right][opened]) .action-close,:host([position=bottom][opened]) .action-close,:host([position=center][opened]) .action-close,:host([position=top-left][opened]) .action-close,:host([position=top-right][opened]) .action-close,:host([position=top][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]:not([opened])) .action-close,:host([position=bottom]:not([opened])) .action-close,:host([position=center]:not([opened])) .action-close,:host([position=top-left]:not([opened])) .action-close,:host([position=top]:not([opened])) .action-close{transform:translateY(-120%)rotate(45deg)}:host([position=bottom-right]:not([opened])) .action-close,:host([position=top-right]:not([opened])) .action-close{transform:translateY(-120%)rotate(-45deg)}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-modal-transition-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}'};var x=t("mds_modal",/** @class */function(){function t(t){var n=this;o(this,t);this.openEvent=i(this,"mdsModalOpen",7);this.showEvent=i(this,"mdsModalShow",7);this.closeEvent=i(this,"mdsModalClose",7);this.hideEvent=i(this,"mdsModalHide",7);this.t=new m({el:p,en:u,es:g,it:b});
2
+ // Initialised on purpose: both readers compare it against '' (the strict boolean
3
+ // rules forbid the truthiness check this used to be), and an undeclared field is
4
+ // `undefined`, not ''. See enableOverflow.
5
+ this.bodyOverflow="";this.cssTransitionDuration="500";
6
+ // set by the `opened` watcher, consumed by the render that follows it (#803)
7
+ this.openAfterRender=false;this.touchMargin=50;this.hasBottom=false;this.hasTop=false;this.hasWindow=false;this.windowHeaderHeight=0;this.windowFooterHeight=0;
8
+ /**
9
+ * Specifies if the modal is opened or not
10
+ */this.opened=false;
11
+ /**
12
+ * Hides the modal backdrop
13
+ */this.hideBackdrop=false;
14
+ /**
15
+ * Specifies the animation position of the modal window
16
+ */this.position="center";
17
+ /**
18
+ * Specifies the animation style of the modal window
19
+ */this.animation="slide";
20
+ /**
21
+ * Specifies if the component prevents the body from scrolling when modal window is opened
22
+ */this.overflow="auto";
23
+ /**
24
+ * Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.
25
+ * If `strict` is selected only the close button can dismiss the component via UI.
26
+ * If `relaxed` is selected the component can be dismissed also by cliccking the backdrop area.
27
+ */this.interaction="relaxed";this.updateCSSCustomProps=function(){var t;if(typeof window==="undefined")return;var o=window.getComputedStyle(n.host);n.cssTransitionDuration=(t=o.getPropertyValue("--mds-modal-transition-duration"))!==null&&t!==void 0?t:"500"};this.stopIntroAnimationWindow=function(){n.setContentOverflow("auto");n.showEvent.emit();clearTimeout(n.animationDelayTimeout)};this.stopOutroAnimationWindow=function(){n.hideEvent.emit();clearTimeout(n.animationDelayTimeout)};this.disableOverflow=function(){if(typeof document!=="undefined"){if(document.body.style.overflow!==""){n.bodyOverflow=document.body.style.overflow}document.body.style.overflow="hidden"}};this.enableOverflow=function(){if(typeof document!=="undefined"){if(n.bodyOverflow!==""){document.body.style.overflow=n.bodyOverflow}else{document.body.style.removeProperty("overflow")}}};
28
+ // Freeze the content scroll container (overflow:hidden) for the whole slide,
29
+ // re-enabling it only once the window's transform transition has finished. A
30
+ // live overflow:auto with overflowing content janks the transform. Applied
31
+ // inline on the element on purpose: toggling it via a host attribute + CSS
32
+ // selector triggers a shadow-wide style recalc at the settle frame, which is
33
+ // what caused the visible jump.
34
+ this.setContentOverflow=function(t){if(n.windowContentWrapper){n.windowContentWrapper.style.overflow=t}};this.handleWindowTransitionEnd=function(t){if(t.propertyName!=="transform"){return}if(n.opened){n.stopIntroAnimationWindow()}else{n.stopOutroAnimationWindow()}};this.animateOpenWindow=function(){n.setContentOverflow("hidden");clearTimeout(n.animationDelayTimeout);
35
+ // Fallback only: `handleWindowTransitionEnd` is the primary settle. The
36
+ // buffer keeps this from firing before the transition actually ends.
37
+ n.animationDelayTimeout=setTimeout(n.stopIntroAnimationWindow.bind(n),d(n.cssTransitionDuration)+100)};this.animateCloseWindow=function(){n.setContentOverflow("hidden");clearTimeout(n.animationDelayTimeout);n.animationDelayTimeout=setTimeout(n.stopOutroAnimationWindow.bind(n),d(n.cssTransitionDuration)+100)};this.setTouchStart=function(t){n.touchStartX=t.touches[0].clientX;n.touchStartY=t.touches[0].clientY};
38
+ // a swipe is one more way to dismiss the modal: `strict` vetoes it, as it does Esc and the
39
+ // backdrop
40
+ this.setTouchEnd=function(t){if(n.interaction==="strict")return;var o=t.changedTouches[0].clientX;var i=t.changedTouches[0].clientY;var a=n.touchStartX-o;var e=n.touchStartY-i;
41
+ // if is NOT a diagonal swipe
42
+ if(Math.abs(a)>Math.abs(e)){if(n.position==="right"&&a>0)return;if(n.position==="left"&&a<0)return;if(Math.abs(a)>Math.abs(n.touchMargin)){n.opened=undefined}}};this.addMobileEvents=function(){n.windowElement.addEventListener("touchstart",n.setTouchStart);n.windowElement.addEventListener("touchend",n.setTouchEnd)};this.updateSlots=function(){n.hasBottom=r(n.host,"bottom");n.hasTop=r(n.host,"top");n.hasWindow=r(n.host,"window");
43
+ // the slotted window is NOT given a role: the `<dialog>` below is the dialog already,
44
+ // opened with showModal(), and a second one inside it reads as a second window
45
+ };
46
+ /**
47
+ * Measures the header and the footer to pad the content: the states change
48
+ * only when a measure differs, so the update pass settles after one render.
49
+ */this.updateWindowPaddings=function(){var t,o,i,a;var e=(t=n.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".window-header");var s=(o=n.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".window-footer");var r=(i=e===null||e===void 0?void 0:e.offsetHeight)!==null&&i!==void 0?i:0;var d=(a=s===null||s===void 0?void 0:s.offsetHeight)!==null&&a!==void 0?a:0;if(r!==n.windowHeaderHeight)n.windowHeaderHeight=r;if(d!==n.windowFooterHeight)n.windowFooterHeight=d};this.showDialog=function(){if(!n.dialogEl||n.dialogEl.open){return}
50
+ // `showModal()` promotes the dialog to the top layer, traps focus and inerts
51
+ // the page. `show()` keeps it non-modal so the page behind stays interactive,
52
+ // preserving the legacy `hideBackdrop` click-through behaviour.
53
+ if(!n.hideBackdrop){n.dialogEl.showModal()}else{n.dialogEl.show()}
54
+ // Measure here, not only in the lifecycle hooks: until this call the dialog is
55
+ // `display: none`, so a header and a footer measure 0. A modal that mounts
56
+ // already open never renders again on its own, so that 0 would stay and the
57
+ // content would sit under both bars.
58
+ n.updateWindowPaddings()};this.closeDialog=function(){var t;if((t=n.dialogEl)===null||t===void 0?void 0:t.open){n.dialogEl.close()}};this.handleBackdropClick=function(t){if(n.interaction==="strict"){return}
59
+ // A click whose target is the dialog itself (not its window contents) is a
60
+ // click on the backdrop area.
61
+ if(t.target===n.dialogEl){n.opened=undefined}};this.handleCancel=function(t){
62
+ // Take over the native Esc dismissal so `strict` can veto it (and, later, so
63
+ // the outro animation can play).
64
+ t.preventDefault();if(n.interaction==="strict"){return}n.opened=undefined}}t.prototype.componentWillLoad=function(){this.updateSlots();if(this.overflow==="auto"&&this.opened){this.disableOverflow()}};t.prototype.componentDidLoad=function(){var t,o;this.windowElement=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".window");this.windowContentWrapper=(o=this.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".window-content-wrapper");this.updateWindowPaddings();if(this.windowElement!=null){this.addMobileEvents();this.windowElement.addEventListener("transitionend",this.handleWindowTransitionEnd)}this.updateCSSCustomProps();
65
+ // The `opened` watcher does not fire for the initial value, so open the
66
+ // native dialog here when the component mounts already open.
67
+ if(this.opened){this.showDialog();this.animateOpenWindow();this.openEvent.emit()}};t.prototype.componentDidUpdate=function(){if(this.openAfterRender){this.openAfterRender=false;this.showDialog();this.animateOpenWindow();this.openEvent.emit()}
68
+ // the header and the footer are hidden while their slots are empty: refresh
69
+ // the paddings of the content once a late `top` or `bottom` child shows them
70
+ this.updateWindowPaddings()};t.prototype.disconnectedCallback=function(){this.enableOverflow();clearTimeout(this.animationDelayTimeout);if(this.windowElement){this.windowElement.removeEventListener("touchstart",this.setTouchStart);this.windowElement.removeEventListener("touchend",this.setTouchEnd);this.windowElement.removeEventListener("transitionend",this.handleWindowTransitionEnd)}this.enableOverflow()};t.prototype.handleOpenProp=function(t,o){if(t){if(this.overflow==="auto"){this.disableOverflow()}
71
+ // The dialog is shown by the render that follows, in componentDidUpdate, not here. The
72
+ // entry starts from the transform the CSS keys on `:host([position])` and
73
+ // `:host([animation])`, attributes that only that render reflects: a `position` set in the
74
+ // same task as `opened`, as a framework wrapper sets its props, was still the old one
75
+ // when showModal() resolved the starting style, and the window slid in from the old
76
+ // place, already inside the page (#803).
77
+ this.openAfterRender=true;return}this.openAfterRender=false;if(!o){return}this.opened=undefined;this.closeDialog();if(this.overflow==="auto"){this.enableOverflow()}this.animateCloseWindow();this.closeEvent.emit()};t.prototype.handleHideBackdropProp=function(t){if(t===false){this.hideBackdrop=undefined}};
78
+ /**
79
+ * Closes the modal.
80
+ */t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=undefined;return[2/*return*/]}))}))};t.prototype.render=function(){var t=this;return n(a,{key:"45b3fd950185be51db62a8381caf49d24ec2fa65","pref-animation":l.state.animation,"pref-contrast":l.state.contrast,"pref-mode":l.state.mode,"pref-theme-scheme":l.state["theme-scheme"]},n("dialog",{key:"f9d53be4fc42dd300232a4a546e0be7767756d5a","aria-label":this.accessibleName,class:"dialog",part:"dialog",ref:function(o){return t.dialogEl=o},onClick:function(o){t.handleBackdropClick(o)},onCancel:function(o){t.handleCancel(o)}},n("slot",{key:"bd1c2cab3c4cf3db658a72ae8da8e6e73fa09008",name:"window",onSlotchange:this.updateSlots}),!this.hasWindow&&n("div",{key:"54b538559101fe20fdad60795517b1b5d7e0e41c",class:"window",part:"window"},n("div",{key:"1b1e2a732ce6ec50cc10f4bf75abae25b1da78fd",class:s("window-header",!this.hasTop&&"window-content--empty")},n("slot",{key:"dd0cd5c7095b9f3c87097a601370dddbadd11050",name:"top",onSlotchange:this.updateSlots})),n("div",{key:"b8409013cc7351c26a1bc62f46b06c1907d845d2",class:"window-content-wrapper"},n("div",{key:"419a03164087739c60c19f1709d4abeef8ef5832",class:"window-content",style:{paddingTop:"".concat(this.windowHeaderHeight,"px"),paddingBottom:"".concat(this.windowFooterHeight,"px")}},n("slot",{key:"765333f16f0fecfc3cfa6582131e62981055f610"}))),n("div",{key:"8ef8bed4acbe89bce2a4a2ae544e1b6e0da421c5",class:s("window-footer",!this.hasBottom&&"window-content--empty")},n("slot",{key:"7940e4282ae344c8a92301f21c4cb9b75a8f6028",name:"bottom",onSlotchange:this.updateSlots}))),!this.hasWindow&&n("mds-button",{key:"52ce6a70b25d8a07b4fc5d26fbe43914c363de6e","aria-label":this.t.get("close"),class:"action-close",icon:c,variant:"light",tone:"text",size:"xl",onClick:function(){t.opened=undefined},part:"action-close"})))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{opened:[{handleOpenProp:0}],hideBackdrop:[{handleHideBackdropProp:0}]}},enumerable:false,configurable:true});return t}());x.style=y()}}}));