@mhmo91/schmancy 0.10.23 → 0.10.25

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 (438) hide show
  1. package/dist/agent/{overlay.confirm-body-xfOh5Q28.js → overlay.confirm-body-DozUyDYx.js} +242 -242
  2. package/dist/agent/{overlay.confirm-body-xfOh5Q28.js.map → overlay.confirm-body-DozUyDYx.js.map} +1 -1
  3. package/dist/agent/schmancy.agent.js +5670 -2939
  4. package/dist/agent/schmancy.agent.js.map +1 -1
  5. package/dist/{area-Ddk7P5wD.js → area-1EG1LrkX.js} +1 -1
  6. package/dist/{area-Ddk7P5wD.js.map → area-1EG1LrkX.js.map} +1 -1
  7. package/dist/{area-Cbkt0NX4.cjs → area-DrVE5pXW.cjs} +1 -1
  8. package/dist/{area-Cbkt0NX4.cjs.map → area-DrVE5pXW.cjs.map} +1 -1
  9. package/dist/area.cjs +1 -1
  10. package/dist/area.js +1 -1
  11. package/dist/{autocomplete-CfBFDSc3.cjs → autocomplete-6pdZxEab.cjs} +1 -1
  12. package/dist/{autocomplete-CfBFDSc3.cjs.map → autocomplete-6pdZxEab.cjs.map} +1 -1
  13. package/dist/{autocomplete-Ds3Q2cwR.js → autocomplete-nrIcCilw.js} +2 -2
  14. package/dist/{autocomplete-Ds3Q2cwR.js.map → autocomplete-nrIcCilw.js.map} +1 -1
  15. package/dist/autocomplete.cjs +1 -1
  16. package/dist/autocomplete.js +1 -1
  17. package/dist/avatar.cjs +2 -2
  18. package/dist/avatar.cjs.map +1 -1
  19. package/dist/avatar.js +3 -3
  20. package/dist/badge.cjs +1 -1
  21. package/dist/badge.js +1 -1
  22. package/dist/{boat-BF5P6p_f.js → boat--fLgbDAE.js} +3 -3
  23. package/dist/{boat-BF5P6p_f.js.map → boat--fLgbDAE.js.map} +1 -1
  24. package/dist/{boat-BPN8HLzZ.cjs → boat-BIB-gPqy.cjs} +1 -1
  25. package/dist/{boat-BPN8HLzZ.cjs.map → boat-BIB-gPqy.cjs.map} +1 -1
  26. package/dist/boat.cjs +1 -1
  27. package/dist/boat.js +1 -1
  28. package/dist/breadcrumb.cjs +1 -1
  29. package/dist/breadcrumb.js +1 -1
  30. package/dist/{busy-C7ejPa-Q.cjs → busy-DVCIxBVf.cjs} +1 -1
  31. package/dist/{busy-C7ejPa-Q.cjs.map → busy-DVCIxBVf.cjs.map} +1 -1
  32. package/dist/{busy-BuACDJy6.js → busy-DshZcVZ4.js} +1 -1
  33. package/dist/{busy-BuACDJy6.js.map → busy-DshZcVZ4.js.map} +1 -1
  34. package/dist/busy.cjs +1 -1
  35. package/dist/busy.js +1 -1
  36. package/dist/{button-C1IMGS6M.js → button-D9UJ7I6Z.js} +5 -5
  37. package/dist/{button-C1IMGS6M.js.map → button-D9UJ7I6Z.js.map} +1 -1
  38. package/dist/{button-CWNbPPq-.cjs → button-JrTMzwHY.cjs} +4 -4
  39. package/dist/{button-CWNbPPq-.cjs.map → button-JrTMzwHY.cjs.map} +1 -1
  40. package/dist/button.cjs +1 -1
  41. package/dist/button.js +1 -1
  42. package/dist/{card-CgQwXO8L.js → card-BvCFuX3J.js} +2 -2
  43. package/dist/{card-CgQwXO8L.js.map → card-BvCFuX3J.js.map} +1 -1
  44. package/dist/{card-BIzaLuEg.cjs → card-CTotavhH.cjs} +1 -1
  45. package/dist/{card-BIzaLuEg.cjs.map → card-CTotavhH.cjs.map} +1 -1
  46. package/dist/card.cjs +1 -1
  47. package/dist/card.js +1 -1
  48. package/dist/{checkbox-BAqE3sTx.cjs → checkbox-By4fFmjt.cjs} +1 -1
  49. package/dist/{checkbox-BAqE3sTx.cjs.map → checkbox-By4fFmjt.cjs.map} +1 -1
  50. package/dist/{checkbox-BNdg57Om.js → checkbox-GPsdCUbs.js} +1 -1
  51. package/dist/{checkbox-BNdg57Om.js.map → checkbox-GPsdCUbs.js.map} +1 -1
  52. package/dist/checkbox.cjs +1 -1
  53. package/dist/checkbox.js +1 -1
  54. package/dist/{chips-DnqLaOb1.js → chips-27umqnat.js} +4 -4
  55. package/dist/{chips-DnqLaOb1.js.map → chips-27umqnat.js.map} +1 -1
  56. package/dist/{chips-DS3y4Lbn.cjs → chips-BZf9sGA8.cjs} +1 -1
  57. package/dist/{chips-DS3y4Lbn.cjs.map → chips-BZf9sGA8.cjs.map} +1 -1
  58. package/dist/chips.cjs +1 -1
  59. package/dist/chips.js +2 -2
  60. package/dist/connectivity.cjs +1 -1
  61. package/dist/connectivity.js +1 -1
  62. package/dist/content-drawer.cjs +1 -1
  63. package/dist/content-drawer.js +1 -1
  64. package/dist/{cursor-glow-Cs2XLDB9.js → cursor-glow-Ah7VXSj7.js} +1 -1
  65. package/dist/{cursor-glow-Cs2XLDB9.js.map → cursor-glow-Ah7VXSj7.js.map} +1 -1
  66. package/dist/{cursor-glow-C8LgCxpI.cjs → cursor-glow-Bulq-38P.cjs} +1 -1
  67. package/dist/{cursor-glow-C8LgCxpI.cjs.map → cursor-glow-Bulq-38P.cjs.map} +1 -1
  68. package/dist/{date-range-VA1mi1N7.cjs → date-range-BJnLWCRF.cjs} +1 -1
  69. package/dist/{date-range-VA1mi1N7.cjs.map → date-range-BJnLWCRF.cjs.map} +1 -1
  70. package/dist/{date-range-inline-CAa0_4EI.cjs → date-range-inline-B6uKUliV.cjs} +1 -1
  71. package/dist/{date-range-inline-CAa0_4EI.cjs.map → date-range-inline-B6uKUliV.cjs.map} +1 -1
  72. package/dist/{date-range-inline-PeRt1iIF.js → date-range-inline-BNbbRfIA.js} +1 -1
  73. package/dist/{date-range-inline-PeRt1iIF.js.map → date-range-inline-BNbbRfIA.js.map} +1 -1
  74. package/dist/date-range-inline.cjs +1 -1
  75. package/dist/date-range-inline.js +1 -1
  76. package/dist/{date-range-CAqB-B0M.js → date-range-wDVHcr0u.js} +2 -2
  77. package/dist/{date-range-CAqB-B0M.js.map → date-range-wDVHcr0u.js.map} +1 -1
  78. package/dist/date-range.cjs +1 -1
  79. package/dist/date-range.js +1 -1
  80. package/dist/delay.cjs +1 -1
  81. package/dist/delay.js +2 -2
  82. package/dist/{details-BpFjVclg.js → details-Ckxpwacj.js} +4 -4
  83. package/dist/{details-BpFjVclg.js.map → details-Ckxpwacj.js.map} +1 -1
  84. package/dist/{details-BnXbDpt7.cjs → details-DNrWIes6.cjs} +1 -1
  85. package/dist/{details-BnXbDpt7.cjs.map → details-DNrWIes6.cjs.map} +1 -1
  86. package/dist/details.cjs +1 -1
  87. package/dist/details.js +1 -1
  88. package/dist/directives-BBMqe8x3.js +4082 -0
  89. package/dist/directives-BBMqe8x3.js.map +1 -0
  90. package/dist/directives-F15SJZUR.cjs +348 -0
  91. package/dist/directives-F15SJZUR.cjs.map +1 -0
  92. package/dist/directives.cjs +1 -99
  93. package/dist/directives.js +6 -1363
  94. package/dist/discovery.cjs +1 -1
  95. package/dist/discovery.js +2 -61
  96. package/dist/discovery.service-COmbHaoI.js +61 -0
  97. package/dist/discovery.service-COmbHaoI.js.map +1 -0
  98. package/dist/discovery.service-CVDXO9rH.cjs +1 -0
  99. package/dist/discovery.service-CVDXO9rH.cjs.map +1 -0
  100. package/dist/{divider-D8cBBkdG.js → divider-BzcZGo4S.js} +1 -1
  101. package/dist/{divider-D8cBBkdG.js.map → divider-BzcZGo4S.js.map} +1 -1
  102. package/dist/{divider-B84lt1A3.cjs → divider-Cde33ivs.cjs} +1 -1
  103. package/dist/{divider-B84lt1A3.cjs.map → divider-Cde33ivs.cjs.map} +1 -1
  104. package/dist/divider.cjs +1 -1
  105. package/dist/divider.js +1 -1
  106. package/dist/dropdown.cjs +1 -1
  107. package/dist/dropdown.js +1 -1
  108. package/dist/{expand-BJiKggfg.js → expand-DI144OzN.js} +3 -3
  109. package/dist/{expand-BJiKggfg.js.map → expand-DI144OzN.js.map} +1 -1
  110. package/dist/{expand-DK-O37-j.cjs → expand-Db4V0jj-.cjs} +1 -1
  111. package/dist/{expand-DK-O37-j.cjs.map → expand-Db4V0jj-.cjs.map} +1 -1
  112. package/dist/expand.cjs +1 -1
  113. package/dist/expand.js +1 -1
  114. package/dist/{float-RWR6Q1Hh.cjs → float--RScf9BZ.cjs} +1 -1
  115. package/dist/{float-RWR6Q1Hh.cjs.map → float--RScf9BZ.cjs.map} +1 -1
  116. package/dist/{float-B4FDN40h.js → float-DIyzy1c2.js} +1 -1
  117. package/dist/{float-B4FDN40h.js.map → float-DIyzy1c2.js.map} +1 -1
  118. package/dist/float.cjs +1 -1
  119. package/dist/float.js +1 -1
  120. package/dist/{form-ha3df3K7.cjs → form-DWNpOsIU.cjs} +1 -1
  121. package/dist/{form-ha3df3K7.cjs.map → form-DWNpOsIU.cjs.map} +1 -1
  122. package/dist/{form-B-Sm6u25.js → form-RtXH8UHQ.js} +8 -8
  123. package/dist/{form-B-Sm6u25.js.map → form-RtXH8UHQ.js.map} +1 -1
  124. package/dist/form.cjs +1 -1
  125. package/dist/form.js +6 -6
  126. package/dist/handover/agent-runtime-followups.md +1 -1
  127. package/dist/handover/agent-runtime-v1.md +3 -3
  128. package/dist/{hashContent-dJrI-9sc.js.map → hashContent-Dgmzc32o.js.map} +1 -1
  129. package/dist/{hashContent-Ck6laKlk.cjs.map → hashContent-Dh1VzIAb.cjs.map} +1 -1
  130. package/dist/icons-DXanGDZ_.js +52 -0
  131. package/dist/icons-DXanGDZ_.js.map +1 -0
  132. package/dist/icons-bNxlWLlk.cjs +24 -0
  133. package/dist/icons-bNxlWLlk.cjs.map +1 -0
  134. package/dist/icons.cjs +1 -1
  135. package/dist/icons.js +1 -1
  136. package/dist/{iframe-BXe1TPx1.cjs → iframe-B1XWRaLC.cjs} +1 -1
  137. package/dist/{iframe-BXe1TPx1.cjs.map → iframe-B1XWRaLC.cjs.map} +1 -1
  138. package/dist/{iframe-CByrVlZy.js → iframe-BlHK0cjy.js} +1 -1
  139. package/dist/{iframe-CByrVlZy.js.map → iframe-BlHK0cjy.js.map} +1 -1
  140. package/dist/iframe.cjs +1 -1
  141. package/dist/iframe.js +1 -1
  142. package/dist/index.cjs +1 -1
  143. package/dist/index.js +60 -60
  144. package/dist/{input-BY9OCQWr.cjs → input-C-_XU9AX.cjs} +1 -1
  145. package/dist/{input-BY9OCQWr.cjs.map → input-C-_XU9AX.cjs.map} +1 -1
  146. package/dist/{input-Q0fm34Co.js → input-CiGa8Dkl.js} +1 -1
  147. package/dist/{input-Q0fm34Co.js.map → input-CiGa8Dkl.js.map} +1 -1
  148. package/dist/{input-chip-BwNf3GD0.cjs → input-chip-5aYnuRZ_.cjs} +1 -1
  149. package/dist/{input-chip-BwNf3GD0.cjs.map → input-chip-5aYnuRZ_.cjs.map} +1 -1
  150. package/dist/{input-chip-CytUirVS.js → input-chip-l--zCMGR.js} +1 -1
  151. package/dist/{input-chip-CytUirVS.js.map → input-chip-l--zCMGR.js.map} +1 -1
  152. package/dist/input.cjs +1 -1
  153. package/dist/input.js +1 -1
  154. package/dist/json.cjs +2 -2
  155. package/dist/json.cjs.map +1 -1
  156. package/dist/json.js +3 -3
  157. package/dist/json.js.map +1 -1
  158. package/dist/kbd.cjs +1 -1
  159. package/dist/kbd.js +1 -1
  160. package/dist/{layout-Dq2oeOTS.js → layout-DSAjo92m.js} +1 -1
  161. package/dist/{layout-Dq2oeOTS.js.map → layout-DSAjo92m.js.map} +1 -1
  162. package/dist/{layout-BbCIfIgo.cjs → layout-eXb9wjDh.cjs} +1 -1
  163. package/dist/{layout-BbCIfIgo.cjs.map → layout-eXb9wjDh.cjs.map} +1 -1
  164. package/dist/layout.cjs +1 -1
  165. package/dist/layout.js +1 -1
  166. package/dist/{lightbox-p2E0oVR0.cjs → lightbox-CfRDkeeb.cjs} +2 -2
  167. package/dist/{lightbox-p2E0oVR0.cjs.map → lightbox-CfRDkeeb.cjs.map} +1 -1
  168. package/dist/{lightbox-Ckvn5YNF.js → lightbox-D9oiu1Nv.js} +2 -2
  169. package/dist/{lightbox-Ckvn5YNF.js.map → lightbox-D9oiu1Nv.js.map} +1 -1
  170. package/dist/lightbox.cjs +1 -1
  171. package/dist/lightbox.js +1 -1
  172. package/dist/{list-CsrPVvmm.js → list-BOlRka4v.js} +1 -1
  173. package/dist/{list-CsrPVvmm.js.map → list-BOlRka4v.js.map} +1 -1
  174. package/dist/{list-r57UFHu3.cjs → list-CDJi3_Ut.cjs} +1 -1
  175. package/dist/{list-r57UFHu3.cjs.map → list-CDJi3_Ut.cjs.map} +1 -1
  176. package/dist/list.cjs +1 -1
  177. package/dist/list.js +1 -1
  178. package/dist/{magnetic-Bgh7aHHI.cjs → magnetic-D-ph029G.cjs} +1 -1
  179. package/dist/{magnetic-Bgh7aHHI.cjs.map → magnetic-D-ph029G.cjs.map} +1 -1
  180. package/dist/{magnetic-DxvoEz8_.js → magnetic-mHXl54Z8.js} +1 -1
  181. package/dist/{magnetic-DxvoEz8_.js.map → magnetic-mHXl54Z8.js.map} +1 -1
  182. package/dist/{menu-DBuZiPyW.cjs → menu-CJaDL2cd.cjs} +1 -1
  183. package/dist/{menu-DBuZiPyW.cjs.map → menu-CJaDL2cd.cjs.map} +1 -1
  184. package/dist/{menu-Csm6Fg88.js → menu-XyrLmCi_.js} +2 -2
  185. package/dist/{menu-Csm6Fg88.js.map → menu-XyrLmCi_.js.map} +1 -1
  186. package/dist/menu.cjs +1 -1
  187. package/dist/menu.js +1 -1
  188. package/dist/mixins-CsYsIJOI.cjs +254 -0
  189. package/dist/mixins-CsYsIJOI.cjs.map +1 -0
  190. package/dist/mixins-DySzfmal.js +642 -0
  191. package/dist/mixins-DySzfmal.js.map +1 -0
  192. package/dist/mixins.cjs +1 -1
  193. package/dist/mixins.js +2 -2
  194. package/dist/nav-drawer.cjs +1 -1
  195. package/dist/nav-drawer.js +1 -1
  196. package/dist/navigation-bar.cjs +1 -1
  197. package/dist/navigation-bar.js +1 -1
  198. package/dist/navigation-rail.cjs +5 -9
  199. package/dist/navigation-rail.cjs.map +1 -1
  200. package/dist/navigation-rail.js +5 -11
  201. package/dist/navigation-rail.js.map +1 -1
  202. package/dist/{notification-CgTBiAdf.js → notification-CHrEY4u8.js} +2 -2
  203. package/dist/{notification-CgTBiAdf.js.map → notification-CHrEY4u8.js.map} +1 -1
  204. package/dist/{notification-58tkVys8.cjs → notification-DKp4tjaB.cjs} +1 -1
  205. package/dist/{notification-58tkVys8.cjs.map → notification-DKp4tjaB.cjs.map} +1 -1
  206. package/dist/notification.cjs +1 -1
  207. package/dist/notification.js +1 -1
  208. package/dist/{option-Bicf6xpI.js → option-Vpy4UQ-D.js} +1 -1
  209. package/dist/{option-Bicf6xpI.js.map → option-Vpy4UQ-D.js.map} +1 -1
  210. package/dist/{option-61YE3gub.cjs → option-nRk4MuXH.cjs} +1 -1
  211. package/dist/{option-61YE3gub.cjs.map → option-nRk4MuXH.cjs.map} +1 -1
  212. package/dist/option.cjs +1 -1
  213. package/dist/option.js +1 -1
  214. package/dist/{overlay-CpvmytrQ.cjs → overlay-HNrWZ4sB.cjs} +1 -1
  215. package/dist/{overlay-CpvmytrQ.cjs.map → overlay-HNrWZ4sB.cjs.map} +1 -1
  216. package/dist/{overlay-CAI2FAp7.js → overlay-jlkcrt8F.js} +5 -5
  217. package/dist/{overlay-CAI2FAp7.js.map → overlay-jlkcrt8F.js.map} +1 -1
  218. package/dist/{overlay-stack-Dk0xETTy.cjs.map → overlay-stack-Bdr9lOqi.cjs.map} +1 -1
  219. package/dist/{overlay-stack-BR4iYivO.js.map → overlay-stack-D2rgxQLh.js.map} +1 -1
  220. package/dist/overlay.cjs +1 -1
  221. package/dist/{overlay.confirm-body-QD-5cj3_.cjs → overlay.confirm-body-B8dFI3cj.cjs} +1 -1
  222. package/dist/{overlay.confirm-body-QD-5cj3_.cjs.map → overlay.confirm-body-B8dFI3cj.cjs.map} +1 -1
  223. package/dist/{overlay.confirm-body-Cq25CkTw.js → overlay.confirm-body-CYShkjI6.js} +1 -1
  224. package/dist/{overlay.confirm-body-Cq25CkTw.js.map → overlay.confirm-body-CYShkjI6.js.map} +1 -1
  225. package/dist/overlay.js +3 -3
  226. package/dist/{overlay.service-BG0bqPwJ.cjs → overlay.service-BTPn7Uv7.cjs} +1 -1
  227. package/dist/{overlay.service-BG0bqPwJ.cjs.map → overlay.service-BTPn7Uv7.cjs.map} +1 -1
  228. package/dist/{overlay.service-Bpjrhaxh.js → overlay.service-BqhhxVJp.js} +2 -2
  229. package/dist/{overlay.service-Bpjrhaxh.js.map → overlay.service-BqhhxVJp.js.map} +1 -1
  230. package/dist/{progress-Zqx-S9NZ.js → progress-8Bn88GK_.js} +1 -1
  231. package/dist/{progress-Zqx-S9NZ.js.map → progress-8Bn88GK_.js.map} +1 -1
  232. package/dist/{progress-D8XZJVl5.cjs → progress-CAp_4jtq.cjs} +1 -1
  233. package/dist/{progress-D8XZJVl5.cjs.map → progress-CAp_4jtq.cjs.map} +1 -1
  234. package/dist/progress.cjs +1 -1
  235. package/dist/progress.js +1 -1
  236. package/dist/{radio-group-bl8K4Gls.cjs → radio-group-CN44mAoc.cjs} +1 -1
  237. package/dist/{radio-group-bl8K4Gls.cjs.map → radio-group-CN44mAoc.cjs.map} +1 -1
  238. package/dist/{radio-group-D9MU1Mxz.js → radio-group-GNHA7qJR.js} +1 -1
  239. package/dist/{radio-group-D9MU1Mxz.js.map → radio-group-GNHA7qJR.js.map} +1 -1
  240. package/dist/radio-group.cjs +1 -1
  241. package/dist/radio-group.js +1 -1
  242. package/dist/range.cjs +1 -1
  243. package/dist/range.js +1 -1
  244. package/dist/{reduced-motion-D7LqTUMn.js.map → reduced-motion-D-L12p7G.js.map} +1 -1
  245. package/dist/{reduced-motion-Dzfp_w5x.cjs.map → reduced-motion-Ds-HjMzn.cjs.map} +1 -1
  246. package/dist/{rxjs-utils-BK8VMe3K.js.map → rxjs-utils-BXpvHN4-.js.map} +1 -1
  247. package/dist/{rxjs-utils-DhOKenkS.cjs.map → rxjs-utils-CaC-tdot.cjs.map} +1 -1
  248. package/dist/rxjs-utils.cjs +1 -1
  249. package/dist/rxjs-utils.js +1 -1
  250. package/dist/{select-CMwkl-D6.js → select-BnuXRHS4.js} +3 -3
  251. package/dist/{select-CMwkl-D6.js.map → select-BnuXRHS4.js.map} +1 -1
  252. package/dist/{select-COIfVtZl.cjs → select-DZNns5Pa.cjs} +2 -2
  253. package/dist/{select-COIfVtZl.cjs.map → select-DZNns5Pa.cjs.map} +1 -1
  254. package/dist/select.cjs +1 -1
  255. package/dist/select.js +1 -1
  256. package/dist/skeleton.cjs +1 -1
  257. package/dist/skeleton.js +1 -1
  258. package/dist/skills/INDEX.md +2 -1
  259. package/dist/skills/SKILL.md +33 -23
  260. package/dist/skills/area.md +5 -4
  261. package/dist/skills/connectivity.md +1 -3
  262. package/dist/skills/directives.md +36 -0
  263. package/dist/skills/icons.md +95 -31
  264. package/dist/skills/layout.md +36 -53
  265. package/dist/skills/mixins.md +26 -5
  266. package/dist/skills/schmancy/INDEX.md +2 -1
  267. package/dist/skills/schmancy/SKILL.md +33 -23
  268. package/dist/skills/schmancy/area.md +5 -4
  269. package/dist/skills/schmancy/connectivity.md +1 -3
  270. package/dist/skills/schmancy/directives.md +36 -0
  271. package/dist/skills/schmancy/icons.md +95 -31
  272. package/dist/skills/schmancy/layout.md +36 -53
  273. package/dist/skills/schmancy/mixins.md +26 -5
  274. package/dist/slider.cjs +1 -1
  275. package/dist/slider.js +1 -1
  276. package/dist/{splash-screen-xrMNpzkm.js → splash-screen-CUP_elaT.js} +1 -1
  277. package/dist/{splash-screen-xrMNpzkm.js.map → splash-screen-CUP_elaT.js.map} +1 -1
  278. package/dist/{splash-screen-2hxq8Sft.cjs → splash-screen-DeoPRrOu.cjs} +1 -1
  279. package/dist/{splash-screen-2hxq8Sft.cjs.map → splash-screen-DeoPRrOu.cjs.map} +1 -1
  280. package/dist/splash-screen.cjs +1 -1
  281. package/dist/splash-screen.js +1 -1
  282. package/dist/{src-B15R32Sp.js → src-B1VkLX3l.js} +159 -159
  283. package/dist/src-B1VkLX3l.js.map +1 -0
  284. package/dist/{src-BWQvtOOf.cjs → src-DQ4wr0qq.cjs} +13 -13
  285. package/dist/src-DQ4wr0qq.cjs.map +1 -0
  286. package/dist/steps.cjs +1 -1
  287. package/dist/steps.js +1 -1
  288. package/dist/{surface-BkQ44Wuo.cjs → surface-LkaZQXZn.cjs} +1 -1
  289. package/dist/{surface-BkQ44Wuo.cjs.map → surface-LkaZQXZn.cjs.map} +1 -1
  290. package/dist/{surface-3nnvlxeE.js → surface-hOvkrjGN.js} +1 -1
  291. package/dist/{surface-3nnvlxeE.js.map → surface-hOvkrjGN.js.map} +1 -1
  292. package/dist/surface.cjs +1 -1
  293. package/dist/surface.js +1 -1
  294. package/dist/switch.cjs +1 -1
  295. package/dist/switch.js +1 -1
  296. package/dist/table.cjs +2 -2
  297. package/dist/table.cjs.map +1 -1
  298. package/dist/table.js +2 -2
  299. package/dist/table.js.map +1 -1
  300. package/dist/{tabs-CnLIe8nE.js → tabs-CfwIHhHo.js} +1 -1
  301. package/dist/{tabs-CnLIe8nE.js.map → tabs-CfwIHhHo.js.map} +1 -1
  302. package/dist/{tabs-Dql0rcqZ.cjs → tabs-bplzstz6.cjs} +1 -1
  303. package/dist/{tabs-Dql0rcqZ.cjs.map → tabs-bplzstz6.cjs.map} +1 -1
  304. package/dist/tabs.cjs +1 -1
  305. package/dist/tabs.js +1 -1
  306. package/dist/teleport.cjs +1 -1
  307. package/dist/teleport.js +1 -1
  308. package/dist/{textarea-BAogS_Ff.js → textarea-C1A5xuw9.js} +1 -1
  309. package/dist/{textarea-BAogS_Ff.js.map → textarea-C1A5xuw9.js.map} +1 -1
  310. package/dist/{textarea-CGD6lAEe.cjs → textarea-hrDp5gQq.cjs} +1 -1
  311. package/dist/{textarea-CGD6lAEe.cjs.map → textarea-hrDp5gQq.cjs.map} +1 -1
  312. package/dist/textarea.cjs +1 -1
  313. package/dist/textarea.js +1 -1
  314. package/dist/{theme-CUK0HrS3.js → theme-BniFOMEo.js} +4 -4
  315. package/dist/{theme-CUK0HrS3.js.map → theme-BniFOMEo.js.map} +1 -1
  316. package/dist/{theme-DKrrQ-ic.cjs → theme-DmR6PKV8.cjs} +3 -3
  317. package/dist/{theme-DKrrQ-ic.cjs.map → theme-DmR6PKV8.cjs.map} +1 -1
  318. package/dist/{theme-button-Bb8qW2IH.js → theme-button--ruZIb0T.js} +1 -1
  319. package/dist/{theme-button-Bb8qW2IH.js.map → theme-button--ruZIb0T.js.map} +1 -1
  320. package/dist/{theme-button-CmTwFm3l.cjs → theme-button-a0LgZ7hQ.cjs} +1 -1
  321. package/dist/{theme-button-CmTwFm3l.cjs.map → theme-button-a0LgZ7hQ.cjs.map} +1 -1
  322. package/dist/theme-button.cjs +1 -1
  323. package/dist/theme-button.js +1 -1
  324. package/dist/theme.cjs +1 -1
  325. package/dist/{theme.interface-D4NeufQA.cjs.map → theme.interface-B5xjEk74.cjs.map} +1 -1
  326. package/dist/{theme.interface-C2XNgsLB.js.map → theme.interface-DVEw3s8m.js.map} +1 -1
  327. package/dist/theme.js +4 -4
  328. package/dist/{theme.service-CSzNkqBB.js.map → theme.service-Bh08uOSJ.js.map} +1 -1
  329. package/dist/{theme.service-CnFUmUpc.cjs.map → theme.service-Y-e8b331.cjs.map} +1 -1
  330. package/dist/tree.cjs +1 -1
  331. package/dist/tree.js +1 -1
  332. package/dist/typography.cjs +1 -1
  333. package/dist/typography.js +1 -1
  334. package/dist/{utils-Cxg0Kfy5.js → utils-578eFTx4.js} +1 -1
  335. package/dist/{utils-Cxg0Kfy5.js.map → utils-578eFTx4.js.map} +1 -1
  336. package/dist/{utils-aCJYAGUr.cjs → utils-CVWUrECT.cjs} +1 -1
  337. package/dist/{utils-aCJYAGUr.cjs.map → utils-CVWUrECT.cjs.map} +1 -1
  338. package/dist/utils.cjs +1 -1
  339. package/dist/utils.js +2 -2
  340. package/dist/visually-hidden.cjs +1 -1
  341. package/dist/visually-hidden.js +1 -1
  342. package/dist/{window-DuDAQa6y.js → window-BT9JecWy.js} +5 -5
  343. package/dist/{window-DuDAQa6y.js.map → window-BT9JecWy.js.map} +1 -1
  344. package/dist/{window-BbWlaPZv.cjs → window-Bp7zWZpu.cjs} +1 -1
  345. package/dist/{window-BbWlaPZv.cjs.map → window-Bp7zWZpu.cjs.map} +1 -1
  346. package/dist/window.cjs +1 -1
  347. package/dist/window.js +1 -1
  348. package/package.json +1 -1
  349. package/skills/schmancy/INDEX.md +2 -1
  350. package/skills/schmancy/SKILL.md +33 -23
  351. package/skills/schmancy/area.md +5 -4
  352. package/skills/schmancy/connectivity.md +1 -3
  353. package/skills/schmancy/directives.md +36 -0
  354. package/skills/schmancy/icons.md +95 -31
  355. package/skills/schmancy/layout.md +36 -53
  356. package/skills/schmancy/mixins.md +26 -5
  357. package/src/badge/badge.ts +7 -11
  358. package/src/button/icon-button.ts +3 -4
  359. package/src/directives/ai-badge.ts +95 -0
  360. package/src/directives/art/art.directive.ts +228 -0
  361. package/src/directives/art/effects/error.ts +192 -0
  362. package/src/directives/art/effects/funkhaus.ts +121 -0
  363. package/src/directives/art/effects/howl.ts +203 -0
  364. package/src/directives/art/effects/samwa.ts +228 -0
  365. package/src/directives/art/effects/snow.ts +207 -0
  366. package/src/directives/art/effects/starfield.ts +107 -0
  367. package/src/directives/art/index.ts +2 -0
  368. package/src/directives/art/particle-pool.ts +40 -0
  369. package/src/directives/art/types.ts +129 -0
  370. package/src/directives/art/utils.ts +35 -0
  371. package/src/directives/battery.ts +1014 -0
  372. package/src/directives/beta.ts +44 -0
  373. package/src/directives/fill.ts +32 -60
  374. package/src/directives/fyi.ts +551 -0
  375. package/src/directives/hummingbird.ts +1712 -0
  376. package/src/directives/index.ts +9 -0
  377. package/src/directives/missed-punch.ts +407 -0
  378. package/src/directives/urgent.ts +660 -0
  379. package/src/directives/working-snake.ts +294 -0
  380. package/src/icons/icon.ts +53 -30
  381. package/src/json/json.ts +1 -1
  382. package/src/navigation-rail/navigation-rail-item.ts +7 -12
  383. package/src/navigation-rail/navigation-rail.ts +0 -2
  384. package/src/table/table.ts +2 -2
  385. package/src/theme/theme-audio-player.ts +1 -1
  386. package/types/mixins/SchmancyElement.d.ts +31 -0
  387. package/types/src/badge/badge.d.ts +1 -1
  388. package/types/src/directives/ai-badge.d.ts +15 -0
  389. package/types/src/directives/art/art.directive.d.ts +19 -0
  390. package/types/src/directives/art/effects/error.d.ts +7 -0
  391. package/types/src/directives/art/effects/funkhaus.d.ts +7 -0
  392. package/types/src/directives/art/effects/howl.d.ts +7 -0
  393. package/types/src/directives/art/effects/samwa.d.ts +7 -0
  394. package/types/src/directives/art/effects/snow.d.ts +7 -0
  395. package/types/src/directives/art/effects/starfield.d.ts +10 -0
  396. package/types/src/directives/art/index.d.ts +2 -0
  397. package/types/src/directives/art/particle-pool.d.ts +16 -0
  398. package/types/src/directives/art/types.d.ts +126 -0
  399. package/types/src/directives/art/utils.d.ts +5 -0
  400. package/types/src/directives/battery.d.ts +96 -0
  401. package/types/src/directives/beta.d.ts +33 -0
  402. package/types/src/directives/fill.d.ts +4 -11
  403. package/types/src/directives/fyi.d.ts +76 -0
  404. package/types/src/directives/hummingbird.d.ts +180 -0
  405. package/types/src/directives/index.d.ts +9 -0
  406. package/types/src/directives/missed-punch.d.ts +28 -0
  407. package/types/src/directives/urgent.d.ts +88 -0
  408. package/types/src/directives/working-snake.d.ts +46 -0
  409. package/types/src/icons/icon.d.ts +22 -0
  410. package/dist/directives.cjs.map +0 -1
  411. package/dist/directives.js.map +0 -1
  412. package/dist/discovery.cjs.map +0 -1
  413. package/dist/discovery.js.map +0 -1
  414. package/dist/icons-DJuXwn8D.js +0 -48
  415. package/dist/icons-DJuXwn8D.js.map +0 -1
  416. package/dist/icons-oNRUCAEY.cjs +0 -33
  417. package/dist/icons-oNRUCAEY.cjs.map +0 -1
  418. package/dist/mixins-DTCHPEd4.cjs +0 -254
  419. package/dist/mixins-DTCHPEd4.cjs.map +0 -1
  420. package/dist/mixins-pU53qf6R.js +0 -636
  421. package/dist/mixins-pU53qf6R.js.map +0 -1
  422. package/dist/skills/page.md +0 -84
  423. package/dist/skills/schmancy/page.md +0 -84
  424. package/dist/src-B15R32Sp.js.map +0 -1
  425. package/dist/src-BWQvtOOf.cjs.map +0 -1
  426. package/skills/schmancy/page.md +0 -84
  427. /package/dist/{hashContent-dJrI-9sc.js → hashContent-Dgmzc32o.js} +0 -0
  428. /package/dist/{hashContent-Ck6laKlk.cjs → hashContent-Dh1VzIAb.cjs} +0 -0
  429. /package/dist/{overlay-stack-Dk0xETTy.cjs → overlay-stack-Bdr9lOqi.cjs} +0 -0
  430. /package/dist/{overlay-stack-BR4iYivO.js → overlay-stack-D2rgxQLh.js} +0 -0
  431. /package/dist/{reduced-motion-D7LqTUMn.js → reduced-motion-D-L12p7G.js} +0 -0
  432. /package/dist/{reduced-motion-Dzfp_w5x.cjs → reduced-motion-Ds-HjMzn.cjs} +0 -0
  433. /package/dist/{rxjs-utils-BK8VMe3K.js → rxjs-utils-BXpvHN4-.js} +0 -0
  434. /package/dist/{rxjs-utils-DhOKenkS.cjs → rxjs-utils-CaC-tdot.cjs} +0 -0
  435. /package/dist/{theme.interface-D4NeufQA.cjs → theme.interface-B5xjEk74.cjs} +0 -0
  436. /package/dist/{theme.interface-C2XNgsLB.js → theme.interface-DVEw3s8m.js} +0 -0
  437. /package/dist/{theme.service-CSzNkqBB.js → theme.service-Bh08uOSJ.js} +0 -0
  438. /package/dist/{theme.service-CnFUmUpc.cjs → theme.service-Y-e8b331.cjs} +0 -0
@@ -0,0 +1,4082 @@
1
+ import { t as e } from "./audio-CxO5a2HL.js";
2
+ import { _ as t, d as n, f as r, l as i, u as a } from "./animation-DCznELuT.js";
3
+ import { t as o } from "./reduced-motion-D-L12p7G.js";
4
+ import "./cursor-glow-Ah7VXSj7.js";
5
+ import { i as s, n as c, r as l } from "./theme.service-Bh08uOSJ.js";
6
+ import { t as u } from "./layout-DSAjo92m.js";
7
+ import { t as d } from "./overlay-stack-D2rgxQLh.js";
8
+ import { r as f } from "./discovery.service-COmbHaoI.js";
9
+ import "./magnetic-mHXl54Z8.js";
10
+ import { BehaviorSubject as p, EMPTY as m, Observable as h, Subject as g, Subscription as _, animationFrameScheduler as v, combineLatest as y, concat as b, debounceTime as x, defer as S, filter as C, forkJoin as ee, from as w, fromEvent as T, interval as E, merge as te, of as ne, takeUntil as re, timer as D } from "rxjs";
11
+ import { auditTime as ie, catchError as O, debounceTime as ae, delay as oe, distinctUntilChanged as k, filter as A, finalize as se, first as ce, map as j, observeOn as le, repeat as ue, skip as de, startWith as fe, switchMap as M, take as N, takeUntil as P, takeWhile as F, tap as I } from "rxjs/operators";
12
+ import { noChange as L, nothing as R } from "lit";
13
+ import { AsyncDirective as z, directive as B } from "lit/async-directive.js";
14
+ import { Directive as V, PartType as H, directive as U } from "lit/directive.js";
15
+ var pe = {
16
+ smooth: n,
17
+ snappy: r,
18
+ bouncy: i,
19
+ gentle: a
20
+ }, me = B(class extends z {
21
+ constructor(...e) {
22
+ super(...e), this.element = null, this.originalContent = "", this.animations = [], this.disconnecting$ = new g(), this.initialized = !1;
23
+ }
24
+ render(e) {
25
+ return L;
26
+ }
27
+ update(e, [t]) {
28
+ return this.element = e.element, this.initialized || (this.initialized = !0, this.disconnecting$.closed && (this.disconnecting$ = new g()), t.text === void 0 ? this.originalContent = this.element.textContent || "" : (this.originalContent = t.text, this.element.textContent = t.text), this.element.style.willChange = "transform, opacity", t.animation === "typewriter" ? this.element.textContent = "" : this.element.style.opacity = "0", this.initialize(t)), L;
29
+ }
30
+ disconnected() {
31
+ this.cleanup();
32
+ }
33
+ reconnected() {
34
+ this.element && (this.element.style.willChange = "transform, opacity");
35
+ }
36
+ initialize(e) {
37
+ let { animation: t, delay: n = 0, duration: r, stagger: i, preset: a = "snappy", restart: o = !1 } = e, s = pe[a], c = r ?? s.duration, l = i ?? (t === "cyber-glitch" ? 30 : 50), u = this.createVisibilityObservable$();
38
+ (o ? u.pipe(M((e) => e ? D(n).pipe(M(() => this.runAnimation$(t, c, l, s))) : S(() => (this.resetToInitial(t), m)))) : u.pipe(A((e) => e), N(1), oe(n), M(() => this.runAnimation$(t, c, l, s)))).pipe(P(this.disconnecting$)).subscribe();
39
+ }
40
+ cleanup() {
41
+ this.disconnecting$.next(), this.disconnecting$.complete(), this.cancelAnimations(), this.element && (this.element.textContent = this.originalContent, this.element.style.opacity = "", this.element.style.willChange = "auto", this.element.style.transform = "", this.element.style.filter = ""), this.element = null, this.initialized = !1;
42
+ }
43
+ cancelAnimations() {
44
+ this.animations.forEach((e) => e.cancel()), this.animations = [];
45
+ }
46
+ resetToInitial(e) {
47
+ this.cancelAnimations(), this.element && (e === "typewriter" ? this.element.textContent = "" : (this.element.textContent = this.originalContent, this.element.style.opacity = "0"), this.element.style.transform = "", this.element.style.filter = "", this.element.style.willChange = "transform, opacity");
48
+ }
49
+ getAccumulatedOpacity() {
50
+ if (!this.element) return 0;
51
+ let e = 1, t = this.element.parentElement, n = 0;
52
+ for (; t && t !== document.body && n < 10;) {
53
+ let r = window.getComputedStyle(t);
54
+ if (r.visibility === "hidden" || r.display === "none") return 0;
55
+ let i = parseFloat(r.opacity) || 1;
56
+ if (i < 1 && (e *= i, e <= .5)) return e;
57
+ if (t.assignedSlot) {
58
+ let n = this.getSlotAncestorOpacity(t.assignedSlot);
59
+ if (n === 0) return 0;
60
+ e *= n;
61
+ }
62
+ t = t.parentElement, n++;
63
+ }
64
+ return e;
65
+ }
66
+ getSlotAncestorOpacity(e) {
67
+ let t = 1, n = e.parentElement;
68
+ for (; n;) {
69
+ let e = window.getComputedStyle(n);
70
+ if (e.visibility === "hidden" || e.display === "none") return 0;
71
+ t *= parseFloat(e.opacity) || 1, n = n.parentElement;
72
+ }
73
+ return t;
74
+ }
75
+ createVisibilityObservable$() {
76
+ let e = T(document, "visibilitychange").pipe(fe(null), j(() => document.visibilityState === "visible"), k());
77
+ return y([E(200).pipe(fe(0), j(() => {
78
+ if (!this.element) return !1;
79
+ let e = this.element.getBoundingClientRect();
80
+ return e.width > 0 && e.height > 0 && e.top < window.innerHeight && e.bottom > 0 && this.getAccumulatedOpacity() > .5;
81
+ }), k()), e]).pipe(j(([e, t]) => e && t), k());
82
+ }
83
+ runAnimation$(e, t, n, r) {
84
+ if (!this.element) return m;
85
+ switch (e) {
86
+ case "fade-up": return this.animateFadeUp$(t, r);
87
+ case "blur-reveal": return this.animateBlurReveal$(t, n, r);
88
+ case "word-reveal": return this.animateWordReveal$(t, n, r);
89
+ case "cyber-glitch": return this.animateCyberGlitch$(t, n, r);
90
+ case "typewriter": return this.animateTypewriter$(t);
91
+ default: return m;
92
+ }
93
+ }
94
+ animateFadeUp$(e, t) {
95
+ if (!this.element) return m;
96
+ let n = this.element.animate([{
97
+ opacity: 0,
98
+ transform: "translateY(30px)"
99
+ }, {
100
+ opacity: 1,
101
+ transform: "translateY(0)"
102
+ }], {
103
+ duration: e,
104
+ easing: t.easingFallback,
105
+ fill: "forwards"
106
+ });
107
+ return this.animations.push(n), w(n.finished).pipe(I(() => {
108
+ this.element && (this.element.style.opacity = "", this.element.style.transform = "", this.element.style.willChange = "auto");
109
+ }), O(() => m));
110
+ }
111
+ wrapTextNodes(e) {
112
+ let t = [], n = document.createDocumentFragment(), r = Array.from(e.childNodes);
113
+ for (let e of r) if (e.nodeType === Node.TEXT_NODE) {
114
+ let r = (e.textContent || "").split(/(\s+)/);
115
+ for (let e of r) if (/^\s+$/.test(e)) n.appendChild(document.createTextNode(e));
116
+ else if (e.length > 0) {
117
+ let r = document.createElement("span");
118
+ r.textContent = e, n.appendChild(r), t.push(r);
119
+ }
120
+ } else e instanceof HTMLElement && (n.appendChild(e), t.push(e));
121
+ return e.textContent = "", e.appendChild(n), t;
122
+ }
123
+ animateBlurReveal$(e, t, n) {
124
+ if (!this.element) return m;
125
+ let r = this.wrapTextNodes(this.element);
126
+ this.element.style.opacity = "1", r.forEach((r, i) => {
127
+ r.style.opacity = "0", r.style.display = "inline-block";
128
+ let a = r.animate([{
129
+ opacity: 0,
130
+ filter: "blur(8px)",
131
+ transform: "scale(0.9)"
132
+ }, {
133
+ opacity: 1,
134
+ filter: "blur(0)",
135
+ transform: "scale(1)"
136
+ }], {
137
+ duration: e,
138
+ easing: n.easingFallback,
139
+ delay: i * t,
140
+ fill: "forwards"
141
+ });
142
+ this.animations.push(a);
143
+ });
144
+ let i = this.animations[this.animations.length - 1];
145
+ return i ? w(i.finished).pipe(I(() => {
146
+ this.element && (this.element.style.willChange = "auto", r.forEach((e) => {
147
+ e.style.willChange = "auto";
148
+ }));
149
+ }), O(() => m)) : m;
150
+ }
151
+ animateWordReveal$(e, t, n) {
152
+ if (!this.element) return m;
153
+ let r = this.wrapTextNodes(this.element);
154
+ this.element.style.opacity = "1", r.forEach((r, i) => {
155
+ r.style.opacity = "0", r.style.display = "inline-block";
156
+ let a = r.animate([{
157
+ opacity: 0,
158
+ transform: "translateY(20px)"
159
+ }, {
160
+ opacity: 1,
161
+ transform: "translateY(0)"
162
+ }], {
163
+ duration: e,
164
+ easing: n.easingFallback,
165
+ delay: i * t,
166
+ fill: "forwards"
167
+ });
168
+ this.animations.push(a);
169
+ });
170
+ let i = this.animations[this.animations.length - 1];
171
+ return i ? w(i.finished).pipe(I(() => {
172
+ this.element && (this.element.style.willChange = "auto", r.forEach((e) => {
173
+ e.style.willChange = "auto";
174
+ }));
175
+ }), O(() => m)) : m;
176
+ }
177
+ animateCyberGlitch$(e, t, n) {
178
+ if (!this.element) return m;
179
+ let r = this.originalContent.split(""), i = document.createDocumentFragment(), a = [];
180
+ for (let e of r) {
181
+ let t = document.createElement("span");
182
+ t.style.display = "inline-block", t.style.opacity = "0", t.textContent = e === " " ? "\xA0" : e, i.appendChild(t), a.push(t);
183
+ }
184
+ this.element.textContent = "", this.element.appendChild(i), this.element.style.opacity = "1", a.forEach((i, a) => {
185
+ if (r[a] === " ") return void (i.style.opacity = "1");
186
+ let o = i.animate([{
187
+ opacity: 0,
188
+ transform: "translateY(-8px) scale(1.4)",
189
+ filter: "blur(4px)"
190
+ }, {
191
+ opacity: 1,
192
+ transform: "translateY(0) scale(1)",
193
+ filter: "blur(0)"
194
+ }], {
195
+ duration: e,
196
+ easing: n.easingFallback,
197
+ delay: a * t,
198
+ fill: "forwards"
199
+ });
200
+ this.animations.push(o);
201
+ });
202
+ let o = this.animations[this.animations.length - 1];
203
+ return o ? w(o.finished).pipe(I(() => {
204
+ this.element && (this.element.style.willChange = "auto", a.forEach((e) => {
205
+ e.style.willChange = "auto";
206
+ }));
207
+ }), O(() => m)) : m;
208
+ }
209
+ animateTypewriter$(e) {
210
+ if (!this.element) return m;
211
+ let t = this.originalContent, n = t.length;
212
+ if (n === 0) return m;
213
+ let r = 0;
214
+ return E(e / n).pipe(I(() => {
215
+ r++, this.element && (this.element.textContent = t.slice(0, r));
216
+ }), F(() => r < n), se(() => {
217
+ this.element && (this.element.textContent = this.originalContent, this.element.style.willChange = "auto");
218
+ }));
219
+ }
220
+ }), he = B(class extends z {
221
+ constructor(...e) {
222
+ super(...e), this.state = null;
223
+ }
224
+ render(e) {
225
+ return L;
226
+ }
227
+ update(e, [t = ""]) {
228
+ let n = e.element;
229
+ if (!t) return this.cleanup(), L;
230
+ if (this.state) return L;
231
+ this.state = {
232
+ message: t,
233
+ element: n,
234
+ badge: null,
235
+ animation: null
236
+ }, getComputedStyle(n).position === "static" && (n.style.position = "relative");
237
+ let r = document.createElement("div");
238
+ return r.style.cssText = "\n display: block;\n position: absolute;\n bottom: -8px;\n left: 8px;\n z-index: 10;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 0.65rem;\n font-weight: 600;\n background: linear-gradient(\n 135deg,\n var(--md-sys-color-primary, #7c5cff),\n var(--md-sys-color-primary-container, #6750a4)\n );\n color: var(--md-sys-color-on-primary, #fff);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);\n white-space: nowrap;\n ", r.textContent = `✦ ${t}`, r.title = t, n.appendChild(r), this.state.badge = r, this.state.animation = r.animate([
239
+ { transform: "scale(1)" },
240
+ { transform: "scale(1.03)" },
241
+ { transform: "scale(1)" }
242
+ ], {
243
+ duration: 2e3,
244
+ easing: "ease-in-out",
245
+ iterations: Infinity
246
+ }), L;
247
+ }
248
+ cleanup() {
249
+ this.state &&= (this.state.animation?.cancel(), this.state.badge?.remove(), null);
250
+ }
251
+ disconnected() {
252
+ this.cleanup();
253
+ }
254
+ });
255
+ function W(e) {
256
+ let t = document.createElement("div");
257
+ return t.className = `art-overlay ${e}`, t.style.cssText = "\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 1000;\n overflow: hidden;\n ", t;
258
+ }
259
+ function G() {
260
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
261
+ return e.setAttribute("width", "100%"), e.setAttribute("height", "100%"), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.style.cssText = "\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n ", e;
262
+ }
263
+ var ge = class {
264
+ constructor(e, t = 10) {
265
+ this.pool = [], this.active = /* @__PURE__ */ new Set(), this.factory = e;
266
+ for (let n = 0; n < t; n++) this.pool.push(e());
267
+ }
268
+ acquire() {
269
+ let e = this.pool.pop();
270
+ return e ||= this.factory(), this.active.add(e), e;
271
+ }
272
+ release(e) {
273
+ this.active.delete(e), e.setAttribute("opacity", "0"), this.pool.push(e);
274
+ }
275
+ clear() {
276
+ this.active.forEach((e) => this.release(e));
277
+ }
278
+ get activeCount() {
279
+ return this.active.size;
280
+ }
281
+ };
282
+ function K(e, t, n, r) {
283
+ return `#${(1 << 24 | Math.round(e + (255 - e) * r) << 16 | Math.round(t + (255 - t) * r) << 8 | Math.round(n + (255 - n) * r)).toString(16).slice(1)}`;
284
+ }
285
+ function _e(e) {
286
+ let [t, n, r] = function(e) {
287
+ let t = e.replace("#", ""), n = parseInt(t.length === 3 ? t.split("").map((e) => e + e).join("") : t, 16);
288
+ return [
289
+ n >> 16 & 255,
290
+ n >> 8 & 255,
291
+ 255 & n
292
+ ];
293
+ }(e);
294
+ return [
295
+ K(t, n, r, .92),
296
+ K(t, n, r, .8),
297
+ K(t, n, r, .65),
298
+ K(t, n, r, .5),
299
+ K(t, n, r, .35),
300
+ K(t, n, r, .18),
301
+ e
302
+ ];
303
+ }
304
+ var ve = [
305
+ "M 2,0.4 A 1.6,1.6 0 1,1 2,3.6 A 1.6,1.6 0 1,1 2,0.4 Z",
306
+ "M 2,0.2 L 3.8,2 L 2,3.8 L 0.2,2 Z",
307
+ "M 2,0.3 L 3.5,1.15 L 3.5,2.85 L 2,3.7 L 0.5,2.85 L 0.5,1.15 Z",
308
+ "M 2,0.3 L 3.7,3.4 L 0.3,3.4 Z",
309
+ "M 1.4,0.4 L 2.6,0.4 L 2.6,1.4 L 3.6,1.4 L 3.6,2.6 L 2.6,2.6 L 2.6,3.6 L 1.4,3.6 L 1.4,2.6 L 0.4,2.6 L 0.4,1.4 L 1.4,1.4 Z",
310
+ "M 2,0 A 2,2 0 1,1 2,4 A 2,2 0 1,1 2,0 Z M 2,0.8 A 1.2,1.2 0 1,0 2,3.2 A 1.2,1.2 0 1,0 2,0.8 Z",
311
+ "M 0.4,1.6 L 3.6,1.6 L 3.6,2.4 L 0.4,2.4 Z"
312
+ ], ye = [
313
+ {
314
+ scale: .8,
315
+ fallSpeed: .12,
316
+ windSensitivity: 2.2,
317
+ tumbleSpeed: .6
318
+ },
319
+ {
320
+ scale: 1.2,
321
+ fallSpeed: .18,
322
+ windSensitivity: 1.6,
323
+ tumbleSpeed: .5
324
+ },
325
+ {
326
+ scale: 1.6,
327
+ fallSpeed: .25,
328
+ windSensitivity: 1.2,
329
+ tumbleSpeed: .35
330
+ }
331
+ ], be = [
332
+ {
333
+ opacity: .12,
334
+ blur: .8
335
+ },
336
+ {
337
+ opacity: .2,
338
+ blur: .3
339
+ },
340
+ {
341
+ opacity: .3,
342
+ blur: 0
343
+ }
344
+ ], xe = [
345
+ {
346
+ x: 0,
347
+ xRange: 15,
348
+ vx: .3
349
+ },
350
+ {
351
+ x: 15,
352
+ xRange: 25,
353
+ vx: .1
354
+ },
355
+ {
356
+ x: 40,
357
+ xRange: 20,
358
+ vx: 0
359
+ },
360
+ {
361
+ x: 60,
362
+ xRange: 25,
363
+ vx: -.1
364
+ },
365
+ {
366
+ x: 85,
367
+ xRange: 15,
368
+ vx: -.3
369
+ }
370
+ ];
371
+ function Se(e) {
372
+ let { element: t, color: n } = e, r = W("howl-overlay"), i = G(), a = document.createElementNS("http://www.w3.org/2000/svg", "g"), o = [
373
+ {
374
+ cx: 15,
375
+ cy: 20,
376
+ r: 8,
377
+ teeth: 12,
378
+ speed: .5
379
+ },
380
+ {
381
+ cx: 85,
382
+ cy: 25,
383
+ r: 6,
384
+ teeth: 10,
385
+ speed: -.7
386
+ },
387
+ {
388
+ cx: 30,
389
+ cy: 80,
390
+ r: 10,
391
+ teeth: 16,
392
+ speed: .4
393
+ },
394
+ {
395
+ cx: 75,
396
+ cy: 75,
397
+ r: 7,
398
+ teeth: 12,
399
+ speed: -.6
400
+ }
401
+ ].map((e) => {
402
+ let t = document.createElementNS("http://www.w3.org/2000/svg", "g");
403
+ t.style.transformOrigin = `${e.cx}% ${e.cy}%`, t.style.willChange = "transform";
404
+ let r = document.createElementNS("http://www.w3.org/2000/svg", "path");
405
+ return r.setAttribute("d", function(e, t, n, r) {
406
+ let i = n - .2 * n, a = "";
407
+ for (let o = 0; o < r; o++) {
408
+ let s = o / r * Math.PI * 2, c = (o + .4) / r * Math.PI * 2, l = (o + .6) / r * Math.PI * 2, u = (o + 1) / r * Math.PI * 2;
409
+ o === 0 && (a += `M ${e + i * Math.cos(s)},${t + i * Math.sin(s)} `), a += `L ${e + n * Math.cos(c)},${t + n * Math.sin(c)} L ${e + n * Math.cos(l)},${t + n * Math.sin(l)} L ${e + i * Math.cos(u)},${t + i * Math.sin(u)} `;
410
+ }
411
+ return a + "Z";
412
+ }(e.cx, e.cy, e.r, e.teeth)), r.setAttribute("fill", n), r.setAttribute("opacity", "0.3"), r.style.mixBlendMode = "screen", t.appendChild(r), a.appendChild(t), {
413
+ element: t,
414
+ speed: e.speed
415
+ };
416
+ }), s = document.createElementNS("http://www.w3.org/2000/svg", "g"), c = [];
417
+ for (let e = 0; e < 6; e++) {
418
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "path"), t = 10 + 80 * Math.random(), r = 10 + 80 * Math.random(), i = .3 + .5 * Math.random(), a = `M ${t},${r - i} L ${t + .3 * i},${r} L ${t},${r + i} L ${t - .3 * i},${r} Z`;
419
+ e.setAttribute("d", a), e.setAttribute("fill", n), e.style.mixBlendMode = "screen", e.style.willChange = "opacity, transform", s.appendChild(e), c.push({
420
+ element: e,
421
+ baseX: t,
422
+ baseY: r,
423
+ phase: Math.random() * Math.PI * 2,
424
+ speed: .5 + 1.5 * Math.random()
425
+ });
426
+ }
427
+ let l = document.createElementNS("http://www.w3.org/2000/svg", "g"), u = [];
428
+ for (let e = 0; e < 4; e++) {
429
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "polygon"), t = 20 + 60 * Math.random(), r = 20 + 60 * Math.random(), i = .8 + 1.2 * Math.random();
430
+ e.setAttribute("points", `${t},${r - i} ${t + .6 * i},${r} ${t},${r + i} ${t - .6 * i},${r}`), e.setAttribute("fill", n), e.style.mixBlendMode = "screen", e.style.willChange = "transform, opacity", l.appendChild(e), u.push({
431
+ element: e,
432
+ baseX: t,
433
+ baseY: r,
434
+ phase: Math.random() * Math.PI * 2,
435
+ rotSpeed: .5 + Math.random()
436
+ });
437
+ }
438
+ i.appendChild(a), i.appendChild(s), i.appendChild(l), r.appendChild(i), t.appendChild(r), e.overlayElement = r, e.howl = {
439
+ gears: o,
440
+ sparkles: c,
441
+ steamPool: new ge(() => {
442
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "circle");
443
+ return e.setAttribute("fill", n), e.style.mixBlendMode = "screen", e.style.willChange = "transform, opacity", i.appendChild(e), e;
444
+ }, 12),
445
+ steamParticles: [],
446
+ wisps: [],
447
+ crystals: u,
448
+ lastSteamSpawn: performance.now(),
449
+ startTime: performance.now()
450
+ };
451
+ }
452
+ function Ce(e, t) {
453
+ if (!e.error) return;
454
+ let { edges: n, staticParticles: r, boltPool: i, lightningBolts: a, startTime: o } = e.error, s = (t - o) % 2500 / 2500, c = .08 + .17 * (.5 * Math.sin(s * Math.PI * 4) + .5);
455
+ if (n.forEach((e) => e.setAttribute("opacity", c.toFixed(3))), r.forEach((e, t) => {
456
+ let n = (s + .125 * t) % 1, r = 0, i = 0;
457
+ switch (e.edge) {
458
+ case 0:
459
+ r = 100 * Math.random(), i = 5 * Math.random();
460
+ break;
461
+ case 1:
462
+ r = 95 + 5 * Math.random(), i = 100 * Math.random();
463
+ break;
464
+ case 2:
465
+ r = 100 * Math.random(), i = 95 + 5 * Math.random();
466
+ break;
467
+ case 3: r = 5 * Math.random(), i = 100 * Math.random();
468
+ }
469
+ e.element.setAttribute("cx", r.toString()), e.element.setAttribute("cy", i.toString());
470
+ let a = .5 * Math.sin(n * Math.PI * 2) + .5;
471
+ e.element.setAttribute("opacity", (.35 * a).toFixed(3));
472
+ }), t - e.error.lastLightningSpawn > 1500 && i.activeCount < 3) {
473
+ let n = i.acquire(), r = 0, o = 0, s = 0, c = 0;
474
+ switch (Math.floor(4 * Math.random())) {
475
+ case 0:
476
+ r = 100 * Math.random(), o = 0, s = 100 * Math.random(), c = 50;
477
+ break;
478
+ case 1:
479
+ r = 100, o = 100 * Math.random(), s = 70, c = 100 * Math.random();
480
+ break;
481
+ case 2:
482
+ r = 100 * Math.random(), o = 100, s = 100 * Math.random(), c = 50;
483
+ break;
484
+ case 3: r = 0, o = 100 * Math.random(), s = 30, c = 100 * Math.random();
485
+ }
486
+ n.setAttribute("d", function(e, t, n, r) {
487
+ let i = `M ${e.toFixed(1)},${t.toFixed(1)}`, a = (n - e) / 4, o = (r - t) / 4, s = e, c = t;
488
+ for (let e = 1; e < 4; e++) {
489
+ let e = 3 + 5 * Math.random();
490
+ s += a + -o * e * (Math.random() - .5), c += o + a * e * (Math.random() - .5), i += ` L ${s.toFixed(1)},${c.toFixed(1)}`;
491
+ }
492
+ return i + ` L ${n.toFixed(1)},${r.toFixed(1)}`;
493
+ }(r, o, s, c)), a.push({
494
+ element: n,
495
+ x: 0,
496
+ y: 0,
497
+ vx: 0,
498
+ vy: 0,
499
+ life: 1
500
+ }), e.error.lastLightningSpawn = t;
501
+ }
502
+ for (let e = a.length - 1; e >= 0; e--) {
503
+ let t = a[e];
504
+ t.life -= .05;
505
+ let n = t.life > .8 ? .7 : .875 * t.life;
506
+ t.element.setAttribute("opacity", Math.max(0, n).toFixed(3)), t.life <= 0 && (i.release(t.element), a.splice(e, 1));
507
+ }
508
+ }
509
+ var we = [
510
+ "#FFFFFF",
511
+ "#F8FCFF",
512
+ "#E8F4FF",
513
+ "#F0F8FF",
514
+ "#FAFEFF",
515
+ "#E0F0FF",
516
+ "#D4A574",
517
+ "#C19A6B",
518
+ "#8B4513",
519
+ "#CD853F"
520
+ ], Te = [
521
+ "M 2,0 L 2.15,1.7 L 3.7,0.8 L 2.3,2 L 3.7,3.2 L 2.15,2.3 L 2,4 L 1.85,2.3 L 0.3,3.2 L 1.7,2 L 0.3,0.8 L 1.85,1.7 Z",
522
+ "M 2,0.2 L 2.2,1.6 L 3.4,0.6 L 2.4,1.8 L 3.8,2 L 2.4,2.2 L 3.4,3.4 L 2.2,2.4 L 2,3.8 L 1.8,2.4 L 0.6,3.4 L 1.6,2.2 L 0.2,2 L 1.6,1.8 L 0.6,0.6 L 1.8,1.6 Z",
523
+ "M 2,0.3 L 2.3,1.2 L 3.2,0.8 L 2.6,1.6 L 3.6,1.8 L 2.7,2.1 L 3.3,2.8 L 2.4,2.5 L 2,3.7 L 1.6,2.5 L 0.7,2.8 L 1.3,2.1 L 0.4,1.8 L 1.4,1.6 L 0.8,0.8 L 1.7,1.2 Z",
524
+ "M 2,0.4 L 2.12,1.8 L 3.6,2 L 2.12,2.2 L 2,3.6 L 1.88,2.2 L 0.4,2 L 1.88,1.8 Z",
525
+ "M 2,0.5 C 2.8,0.8 3.2,1.4 3.4,2 C 3.2,2.6 2.8,3.2 2,3.5 C 1.2,3.2 0.8,2.6 0.6,2 C 0.8,1.4 1.2,0.8 2,0.5 Z",
526
+ "M 2,0.2 L 2.1,1.5 L 2.8,0.5 L 2.25,1.6 L 3.5,1.2 L 2.35,1.85 L 3.8,2 L 2.35,2.15 L 3.5,2.8 L 2.25,2.4 L 2.8,3.5 L 2.1,2.5 L 2,3.8 L 1.9,2.5 L 1.2,3.5 L 1.75,2.4 L 0.5,2.8 L 1.65,2.15 L 0.2,2 L 1.65,1.85 L 0.5,1.2 L 1.75,1.6 L 1.2,0.5 L 1.9,1.5 Z",
527
+ "M 2,0.4 C 2.6,1 3,1.6 3.1,2.2 C 3,2.8 2.6,3.2 2,3.6 C 1.4,3.2 1,2.8 0.9,2.2 C 1,1.6 1.4,1 2,0.4 Z",
528
+ "M 2,0.8 L 2.15,1.7 L 3.2,2 L 2.15,2.3 L 2,3.2 L 1.85,2.3 L 0.8,2 L 1.85,1.7 Z"
529
+ ], Ee = [
530
+ {
531
+ scale: .7,
532
+ fallSpeed: .03,
533
+ windSensitivity: 2.8,
534
+ tumbleSpeed: .15
535
+ },
536
+ {
537
+ scale: 1,
538
+ fallSpeed: .05,
539
+ windSensitivity: 2.2,
540
+ tumbleSpeed: .2
541
+ },
542
+ {
543
+ scale: 1.4,
544
+ fallSpeed: .07,
545
+ windSensitivity: 1.6,
546
+ tumbleSpeed: .15
547
+ }
548
+ ], De = [
549
+ {
550
+ opacity: .2,
551
+ blur: .8
552
+ },
553
+ {
554
+ opacity: .35,
555
+ blur: .3
556
+ },
557
+ {
558
+ opacity: .55,
559
+ blur: 0
560
+ }
561
+ ], Oe = [
562
+ {
563
+ x: 0,
564
+ xRange: 20,
565
+ vx: .2
566
+ },
567
+ {
568
+ x: 20,
569
+ xRange: 20,
570
+ vx: .1
571
+ },
572
+ {
573
+ x: 40,
574
+ xRange: 20,
575
+ vx: 0
576
+ },
577
+ {
578
+ x: 60,
579
+ xRange: 20,
580
+ vx: -.1
581
+ },
582
+ {
583
+ x: 80,
584
+ xRange: 20,
585
+ vx: -.2
586
+ }
587
+ ];
588
+ function ke(e) {
589
+ let { element: t } = e, n = W("starfield-overlay"), r = document.createElement("div");
590
+ r.style.cssText = "position:absolute;bottom:0;right:0;width:66vw;height:66vw;", n.appendChild(r);
591
+ let i = Array.from({ length: 6 }, (e, t) => {
592
+ let n = [];
593
+ for (let e = 0; e < 7; e++) {
594
+ let e = 96 * Math.random() + 2, t = 94 * Math.random() + 3, r = .8 + 1.5 * Math.random(), i = .3 + .7 * Math.random();
595
+ n.push(`radial-gradient(circle ${r}px at ${e}% ${t}%, rgba(255,255,255,${i}) 0%, transparent 100%)`);
596
+ }
597
+ let r = .6 * t;
598
+ return {
599
+ bg: n.join(","),
600
+ appearDelay: r,
601
+ twinkleDuration: 5 + .7 * t,
602
+ twinkleDelay: r + 2.5
603
+ };
604
+ }), a = [];
605
+ for (let e of i) {
606
+ let t = document.createElement("div");
607
+ t.style.cssText = `position:absolute;inset:0;opacity:0;will-change:opacity;background:${e.bg};`, r.appendChild(t), a.push({
608
+ element: t,
609
+ appearDelay: e.appearDelay,
610
+ twinkleDuration: e.twinkleDuration,
611
+ twinkleDelay: e.twinkleDelay
612
+ });
613
+ }
614
+ t.appendChild(n), e.overlayElement = n, e.starfield = {
615
+ groups: a,
616
+ startTime: performance.now()
617
+ };
618
+ }
619
+ var Ae = B(class extends z {
620
+ constructor(...e) {
621
+ super(...e), this.state = null;
622
+ }
623
+ render(e) {
624
+ return L;
625
+ }
626
+ update(e, [t]) {
627
+ let n = e.element, { name: r, color: i, intensity: a = 1, speed: o = 1 } = t;
628
+ if (!this.state || this.state.effect === r && this.state.color === i && this.state.intensity === a && this.state.speed === o || this.cleanup(), !this.state) {
629
+ let e = n.style.position;
630
+ this.state = {
631
+ effect: r,
632
+ color: i,
633
+ intensity: a,
634
+ speed: o,
635
+ element: n,
636
+ isVisible: !0,
637
+ initialized: !1,
638
+ originalPosition: e
639
+ }, requestAnimationFrame(() => {
640
+ if (!this.state) return;
641
+ let e = n.getBoundingClientRect();
642
+ if (!(e.top < window.innerHeight && e.bottom > 0 && e.left < window.innerWidth && e.right > 0)) return this.state.isVisible = !1, void this.setupVisibilityObserver();
643
+ this.initializeResources(), this.startAnimation(), this.setupVisibilityObserver();
644
+ });
645
+ }
646
+ return L;
647
+ }
648
+ initializeResources() {
649
+ if (!this.state || this.state.initialized) return;
650
+ let { element: e, effect: t } = this.state;
651
+ switch (getComputedStyle(e).position === "static" && (e.style.position = "relative"), t) {
652
+ case "funkhaus":
653
+ (function(e) {
654
+ let { element: t, color: n } = e, r = W("funkhaus-overlay"), i = G(), a = function(e, t, n, r) {
655
+ let i = "";
656
+ for (let e = 0; e <= t; e++) {
657
+ let t = e * r;
658
+ i += `M 0,${t} L 100,${t} `;
659
+ }
660
+ for (let t = 0; t <= e; t++) {
661
+ let e = t * n;
662
+ i += `M ${e},0 L ${e},100 `;
663
+ }
664
+ return i;
665
+ }(5, 4, 20, 25), o = document.createElementNS("http://www.w3.org/2000/svg", "path");
666
+ o.setAttribute("d", a), o.setAttribute("stroke", n), o.setAttribute("stroke-width", "0.15"), o.setAttribute("opacity", "0.2"), o.setAttribute("fill", "none");
667
+ let s = document.createElementNS("http://www.w3.org/2000/svg", "g");
668
+ s.id = "window-panes", s.style.mixBlendMode = "screen";
669
+ let c = [];
670
+ for (let e = 0; e < 4; e++) for (let t = 0; t < 5; t++) {
671
+ let r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
672
+ r.setAttribute("x", (t * 20).toString()), r.setAttribute("y", (e * 25).toString()), r.setAttribute("width", "20"), r.setAttribute("height", "25"), r.setAttribute("fill", n), r.setAttribute("opacity", "0"), r.style.willChange = "opacity", c.push({
673
+ element: r,
674
+ diagonalIndex: e + t
675
+ }), s.appendChild(r);
676
+ }
677
+ i.appendChild(s), i.appendChild(o), r.appendChild(i), t.appendChild(r), e.overlayElement = r, e.funkhaus = {
678
+ panes: c,
679
+ maxDiagonal: 7,
680
+ startTime: performance.now()
681
+ };
682
+ })(this.state);
683
+ break;
684
+ case "samwa":
685
+ (function(e) {
686
+ let { element: t, color: n } = e, r = W("samwa-overlay"), i = G();
687
+ r.appendChild(i), t.appendChild(r);
688
+ let a = _e(n), o = 0;
689
+ e.overlayElement = r, e.samwa = {
690
+ leafPool: new ge(() => {
691
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "path"), t = o % ve.length;
692
+ return e.setAttribute("d", ve[t]), e.setAttribute("fill", a[t]), e.setAttribute("opacity", "0"), t === 5 && e.setAttribute("fill-rule", "evenodd"), e.style.mixBlendMode = "soft-light", e.style.willChange = "transform, opacity", e.style.transform = "translate(-100px, -100px)", i.appendChild(e), o++, e;
693
+ }, 18),
694
+ fallingLeaves: [],
695
+ windStrength: 0,
696
+ windDirection: 1,
697
+ lastWindTime: performance.now(),
698
+ lastLeafSpawn: performance.now(),
699
+ startTime: performance.now()
700
+ };
701
+ })(this.state);
702
+ break;
703
+ case "howl":
704
+ Se(this.state);
705
+ break;
706
+ case "error":
707
+ (function(e) {
708
+ let { element: t, color: n } = e, r = W("error-overlay"), i = G(), a = document.createElementNS("http://www.w3.org/2000/svg", "g"), o = [
709
+ {
710
+ x: 0,
711
+ y: 0,
712
+ width: 100,
713
+ height: .5
714
+ },
715
+ {
716
+ x: 0,
717
+ y: 99.5,
718
+ width: 100,
719
+ height: .5
720
+ },
721
+ {
722
+ x: 0,
723
+ y: 0,
724
+ width: .5,
725
+ height: 100
726
+ },
727
+ {
728
+ x: 99.5,
729
+ y: 0,
730
+ width: .5,
731
+ height: 100
732
+ }
733
+ ].map((e) => {
734
+ let t = document.createElementNS("http://www.w3.org/2000/svg", "rect");
735
+ return t.setAttribute("x", e.x.toString()), t.setAttribute("y", e.y.toString()), t.setAttribute("width", e.width.toString()), t.setAttribute("height", e.height.toString()), t.setAttribute("fill", n), t.style.mixBlendMode = "screen", t.style.willChange = "opacity", a.appendChild(t), t;
736
+ }), s = document.createElementNS("http://www.w3.org/2000/svg", "g"), c = [];
737
+ for (let e = 0; e < 4; e++) {
738
+ let t = document.createElementNS("http://www.w3.org/2000/svg", "circle");
739
+ t.setAttribute("r", "0.3"), t.setAttribute("fill", n), t.style.mixBlendMode = "screen", t.style.willChange = "opacity", s.appendChild(t), c.push({
740
+ element: t,
741
+ edge: e % 4
742
+ });
743
+ }
744
+ i.appendChild(a), i.appendChild(s), r.appendChild(i), t.appendChild(r), e.overlayElement = r, e.error = {
745
+ edges: o,
746
+ staticParticles: c,
747
+ boltPool: new ge(() => {
748
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "path");
749
+ return e.setAttribute("stroke", n), e.setAttribute("stroke-width", "0.5"), e.setAttribute("fill", "none"), e.style.mixBlendMode = "screen", e.style.willChange = "opacity", i.appendChild(e), e;
750
+ }, 5),
751
+ lightningBolts: [],
752
+ lastLightningSpawn: performance.now(),
753
+ startTime: performance.now()
754
+ };
755
+ })(this.state);
756
+ break;
757
+ case "snow":
758
+ (function(e) {
759
+ let { element: t } = e, n = W("snow-overlay"), r = G();
760
+ n.appendChild(r), t.appendChild(n);
761
+ let i = 0;
762
+ e.overlayElement = n, e.snow = {
763
+ snowflakePool: new ge(() => {
764
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "path"), t = i % Te.length, n = Math.floor(Math.random() * we.length);
765
+ return e.setAttribute("d", Te[t]), e.setAttribute("fill", we[n]), e.setAttribute("opacity", "0"), e.style.mixBlendMode = "soft-light", e.style.willChange = "transform, opacity", e.style.transform = "translate(-100px, -100px)", r.appendChild(e), i++, e;
766
+ }, 20),
767
+ fallingSnowflakes: [],
768
+ windStrength: 0,
769
+ windDirection: 1,
770
+ windPhase: Math.random() * Math.PI * 2,
771
+ lastWindGust: performance.now(),
772
+ lastSpawn: performance.now(),
773
+ startTime: performance.now()
774
+ };
775
+ })(this.state);
776
+ break;
777
+ case "starfield": ke(this.state);
778
+ }
779
+ this.state.initialized = !0;
780
+ }
781
+ setupVisibilityObserver() {
782
+ this.state && typeof IntersectionObserver < "u" && (this.state.observer = new IntersectionObserver((e) => {
783
+ if (!this.state) return;
784
+ let t = e[0].isIntersecting;
785
+ t && !this.state.isVisible ? (this.state.isVisible = !0, this.state.initialized || this.initializeResources(), this.startAnimation()) : !t && this.state.isVisible && (this.state.isVisible = !1, this.state.animationId && (cancelAnimationFrame(this.state.animationId), this.state.animationId = void 0));
786
+ }, { threshold: 0 }), this.state.observer.observe(this.state.element));
787
+ }
788
+ startAnimation() {
789
+ if (!this.state || !this.state.isVisible || this.state.animationId) return;
790
+ this.state.initialized || this.initializeResources();
791
+ let e = (t) => {
792
+ if (this.state && this.state.isVisible) {
793
+ switch (this.state.effect) {
794
+ case "funkhaus":
795
+ (function(e, t) {
796
+ if (!e.funkhaus) return;
797
+ let { panes: n, maxDiagonal: r, startTime: i } = e.funkhaus, { intensity: a = 1, speed: o = 1 } = e;
798
+ if (a <= 0) {
799
+ for (let e of n) e.element.getAttribute("opacity") !== "0" && e.element.setAttribute("opacity", "0");
800
+ return;
801
+ }
802
+ let s = 7e3 / o, c = (t - i) % s / s * 1.555, l = .18 * a;
803
+ for (let e = 0; e < n.length; e++) {
804
+ let t = n[e], i = t.diagonalIndex / r, a = Math.abs(i - c);
805
+ if (a > .5) {
806
+ t.element.getAttribute("opacity") !== "0" && t.element.setAttribute("opacity", "0");
807
+ continue;
808
+ }
809
+ let o = Math.exp(-a * a * 15.4320987654321);
810
+ o = o < .5 ? 4 * o * o * o : 1 - (-2 * o + 2) ** 3 / 2;
811
+ let s = o * l;
812
+ t.element.setAttribute("opacity", s.toFixed(3));
813
+ }
814
+ })(this.state, t);
815
+ break;
816
+ case "samwa":
817
+ (function(e, t) {
818
+ if (!e.samwa) return;
819
+ let { intensity: n = 1, speed: r = 1 } = e, { leafPool: i, fallingLeaves: a } = e.samwa;
820
+ if (n <= 0) {
821
+ for (let e of a) e.element.setAttribute("opacity", "0");
822
+ return;
823
+ }
824
+ if (t - e.samwa.lastWindTime > (4e3 + 4e3 * Math.random()) / r) {
825
+ let n = Math.random() < .3;
826
+ e.samwa.windStrength = n ? 1.5 : .8 + .4 * Math.random(), e.samwa.windDirection = Math.random() > .5 ? 1 : -1, e.samwa.lastWindTime = t;
827
+ }
828
+ let o = .1 * Math.sin(.001 * t);
829
+ e.samwa.windStrength = Math.max(0, e.samwa.windStrength - .008 + .002 * o);
830
+ let s = (800 + 1200 * Math.random()) / r, c = Math.max(1, Math.round(12 * n));
831
+ if (t - e.samwa.lastLeafSpawn > s && i.activeCount < c) {
832
+ let n = i.acquire(), r = [
833
+ .25,
834
+ .15,
835
+ .2,
836
+ .15,
837
+ .25
838
+ ], o = Math.random(), s = 0;
839
+ for (let e = 0; e < r.length; e++) if (o -= r[e], o <= 0) {
840
+ s = e;
841
+ break;
842
+ }
843
+ let c = xe[s], l = Math.floor(Math.random() * ye.length), u = Math.floor(Math.random() * be.length), d = ye[l], f = {
844
+ element: n,
845
+ x: c.x + Math.random() * c.xRange,
846
+ y: -5 - 15 * Math.random(),
847
+ vx: .5 * c.vx + .1 * (Math.random() - .5),
848
+ vy: d.fallSpeed * (.85 + .3 * Math.random()),
849
+ life: 1,
850
+ rotation: 360 * Math.random(),
851
+ phase: Math.random() * Math.PI * 2,
852
+ sizeIndex: l,
853
+ depthIndex: u,
854
+ tumbleDirection: Math.random() > .5 ? 1 : -1,
855
+ flutterAmplitude: .15 + .25 * Math.random(),
856
+ flutterFrequency: .012 + .008 * Math.random(),
857
+ spawnTime: t
858
+ };
859
+ a.push(f), e.samwa.lastLeafSpawn = t;
860
+ }
861
+ let l = e.samwa.windStrength, u = e.samwa.windDirection;
862
+ for (let e = a.length - 1; e >= 0; e--) {
863
+ let o = a[e], s = ye[o.sizeIndex], c = be[o.depthIndex], d = l * u * s.windSensitivity * .6, f = Math.sin(o.y * o.flutterFrequency + o.phase) * o.flutterAmplitude, p = Math.sin(o.y * o.flutterFrequency * .5 + 1.3 * o.phase) * o.flutterAmplitude * .4, m = Math.sin(o.y * o.flutterFrequency * .25 + .7 * o.phase) * o.flutterAmplitude * .2;
864
+ o.vx += .01 * d, o.vx += .025 * (f + p + m), o.vx *= .97;
865
+ let h = .03 * Math.sin(3e-4 * t * r + o.phase);
866
+ o.vy = (s.fallSpeed + h) * r, o.x += o.vx, o.y += o.vy;
867
+ let g = s.tumbleSpeed * o.tumbleDirection * .7, _ = l * u * .8;
868
+ o.rotation += g + _ + f;
869
+ let v = t - o.spawnTime, y = c.opacity * n;
870
+ v < 600 && (y *= v / 600), o.y > 80 && (y *= 1 - (o.y - 80) / 30);
871
+ let b = s.scale * (.8 + c.opacity);
872
+ o.element.style.transform = `translate(${o.x.toFixed(1)}px, ${o.y.toFixed(1)}px) rotate(${o.rotation.toFixed(0)}deg) scale(${b.toFixed(2)})`, o.element.style.filter = c.blur > 0 ? `blur(${c.blur}px)` : "", o.element.setAttribute("opacity", Math.max(0, y).toFixed(3)), (o.y > 110 || o.x < -10 || o.x > 110) && (i.release(o.element), a.splice(e, 1));
873
+ }
874
+ })(this.state, t);
875
+ break;
876
+ case "howl":
877
+ (function(e, t) {
878
+ if (!e.howl) return;
879
+ let { gears: n, sparkles: r, crystals: i, steamPool: a, steamParticles: o, startTime: s } = e.howl, c = t - s, l = c % 17e3 / 17e3;
880
+ if (n.forEach((e) => {
881
+ let t = c / 80 * e.speed;
882
+ e.element.style.transform = `rotate(${t.toFixed(1)}deg)`;
883
+ }), r.forEach((e) => {
884
+ let t = .15 + .25 * Math.sin((l * e.speed + e.phase) * Math.PI * 2), n = .3 * Math.sin(c / 2e3 * e.speed + e.phase), r = .2 * Math.cos(c / 2e3 * e.speed + e.phase);
885
+ e.element.setAttribute("opacity", t.toFixed(3)), e.element.style.transform = `translate(${n.toFixed(2)}px, ${r.toFixed(2)}px)`;
886
+ }), i.forEach((e) => {
887
+ let t = 1.5 * Math.sin(c / 3500 * e.rotSpeed + e.phase), n = 1.2 * Math.cos(c / 4e3 * e.rotSpeed + e.phase), r = c / 120 * e.rotSpeed, i = .12 + .18 * Math.sin((l + e.phase / (2 * Math.PI)) * Math.PI * 2);
888
+ e.element.style.transform = `translate(${t.toFixed(1)}px, ${n.toFixed(1)}px) rotate(${r.toFixed(1)}deg)`, e.element.setAttribute("opacity", i.toFixed(3));
889
+ }), t - e.howl.lastSteamSpawn > 600 && a.activeCount < 12) {
890
+ let n = a.acquire();
891
+ o.push({
892
+ element: n,
893
+ x: 10 + 80 * Math.random(),
894
+ y: 105,
895
+ vx: .15 * (Math.random() - .5),
896
+ vy: -.25 - .25 * Math.random(),
897
+ life: 1,
898
+ scale: .5 + Math.random()
899
+ }), e.howl.lastSteamSpawn = t;
900
+ }
901
+ for (let e = o.length - 1; e >= 0; e--) {
902
+ let t = o[e];
903
+ t.x += t.vx, t.y += t.vy, t.life -= .008, t.scale += .02, t.element.style.transform = `translate(${t.x.toFixed(1)}px, ${t.y.toFixed(1)}px)`, t.element.setAttribute("r", t.scale.toFixed(2)), t.element.setAttribute("opacity", (.18 * t.life).toFixed(3)), (t.life <= 0 || t.y < -10) && (a.release(t.element), o.splice(e, 1));
904
+ }
905
+ })(this.state, t);
906
+ break;
907
+ case "error":
908
+ Ce(this.state, t);
909
+ break;
910
+ case "snow":
911
+ (function(e, t) {
912
+ if (!e.snow) return;
913
+ let { intensity: n = 1, speed: r = 1 } = e, { snowflakePool: i, fallingSnowflakes: a } = e.snow;
914
+ if (n <= 0) {
915
+ for (let e of a) e.element.setAttribute("opacity", "0");
916
+ return;
917
+ }
918
+ if (t - e.snow.lastWindGust > (8e3 + 8e3 * Math.random()) / r) {
919
+ let n = Math.random() < .15;
920
+ e.snow.windStrength = n ? .8 : .3 + .3 * Math.random(), e.snow.windDirection = Math.random() > .5 ? 1 : -1, e.snow.lastWindGust = t;
921
+ }
922
+ let o = .08 * Math.sin(5e-4 * t);
923
+ e.snow.windStrength = Math.max(0, e.snow.windStrength - .003 + .001 * o);
924
+ let s = (1200 + 1500 * Math.random()) / r, c = Math.max(2, Math.round(12 * n));
925
+ if (t - e.snow.lastSpawn > s && i.activeCount < c) {
926
+ let n = i.acquire(), r = Oe[Math.floor(Math.random() * Oe.length)], o = Math.floor(Math.random() * Ee.length), s = Math.floor(Math.random() * De.length), c = Ee[o], l = {
927
+ element: n,
928
+ x: r.x + Math.random() * r.xRange,
929
+ y: -5 - 15 * Math.random(),
930
+ vx: .5 * r.vx + .1 * (Math.random() - .5),
931
+ vy: c.fallSpeed * (.85 + .3 * Math.random()),
932
+ life: 1,
933
+ rotation: 360 * Math.random(),
934
+ phase: Math.random() * Math.PI * 2,
935
+ sizeIndex: o,
936
+ depthIndex: s,
937
+ tumbleDirection: Math.random() > .5 ? 1 : -1,
938
+ flutterAmplitude: .06 + .1 * Math.random(),
939
+ flutterFrequency: .008 + .005 * Math.random(),
940
+ spawnTime: t
941
+ };
942
+ a.push(l), e.snow.lastSpawn = t;
943
+ }
944
+ let l = e.snow.windStrength, u = e.snow.windDirection;
945
+ for (let e = a.length - 1; e >= 0; e--) {
946
+ let o = a[e], s = Ee[o.sizeIndex], c = De[o.depthIndex], d = l * u * s.windSensitivity * .4, f = Math.sin(o.y * o.flutterFrequency + o.phase) * o.flutterAmplitude, p = Math.sin(o.y * o.flutterFrequency * .5 + 1.3 * o.phase) * o.flutterAmplitude * .3;
947
+ o.vx += .006 * d, o.vx += .015 * (f + p), o.vx *= .985;
948
+ let m = .015 * Math.sin(2e-4 * t * r + o.phase);
949
+ o.vy = (s.fallSpeed + m) * r, o.x += o.vx, o.y += o.vy;
950
+ let h = s.tumbleSpeed * o.tumbleDirection * .4, g = l * u * .3;
951
+ o.rotation += h + g + .5 * f;
952
+ let _ = t - o.spawnTime, v = 1e3, y = c.opacity * n;
953
+ _ < v && (y *= _ / v), o.y > 75 && (y *= 1 - (o.y - 75) / 35);
954
+ let b = s.scale * (.8 + c.opacity);
955
+ o.element.style.transform = `translate(${o.x.toFixed(1)}px, ${o.y.toFixed(1)}px) rotate(${o.rotation.toFixed(0)}deg) scale(${b.toFixed(2)})`, o.element.style.filter = c.blur > 0 ? `blur(${c.blur}px)` : "", o.element.setAttribute("opacity", Math.max(0, y).toFixed(3)), (o.y > 110 || o.x < -10 || o.x > 110) && (i.release(o.element), a.splice(e, 1));
956
+ }
957
+ })(this.state, t);
958
+ break;
959
+ case "starfield": (function(e, t) {
960
+ if (!e.starfield) return;
961
+ let { intensity: n = 1, speed: r = 1 } = e, { groups: i, startTime: a } = e.starfield, o = (t - a) / 1e3 * r;
962
+ for (let e of i) {
963
+ if (n <= 0) {
964
+ e.element.style.opacity = "0";
965
+ continue;
966
+ }
967
+ let t = e.appearDelay, r;
968
+ if (o < t) r = 0;
969
+ else if (o < t + 2.5) r = 1 - (1 - (o - t) / 2.5) ** 3;
970
+ else {
971
+ let t = o - e.twinkleDelay;
972
+ if (t < 0) r = 1;
973
+ else {
974
+ let n = t % e.twinkleDuration / e.twinkleDuration;
975
+ r = n < .25 ? 1 - n / .25 * .4 : n < .5 ? .6 + (n - .25) / .25 * .25 : n < .75 ? .85 - (n - .5) / .25 * .3 : .55 + (n - .75) / .25 * .45;
976
+ }
977
+ }
978
+ e.element.style.opacity = (r * n).toFixed(3);
979
+ }
980
+ })(this.state, t);
981
+ }
982
+ this.state.animationId = requestAnimationFrame(e);
983
+ } else this.state && (this.state.animationId = void 0);
984
+ };
985
+ this.state.animationId = requestAnimationFrame(e);
986
+ }
987
+ cleanup() {
988
+ this.state &&= (this.state.animationId && cancelAnimationFrame(this.state.animationId), this.state.observer && this.state.observer.disconnect(), this.state.samwa && this.state.samwa.leafPool.clear(), this.state.howl && this.state.howl.steamPool.clear(), this.state.error && this.state.error.boltPool.clear(), this.state.snow && this.state.snow.snowflakePool.clear(), this.state.overlayElement && this.state.overlayElement.remove(), this.state.originalPosition !== void 0 && (this.state.element.style.position = this.state.originalPosition), null);
989
+ }
990
+ disconnected() {
991
+ this.cleanup();
992
+ }
993
+ }), je = {
994
+ cyber: {
995
+ primary: "#00f0ff",
996
+ secondary: "#0099ff",
997
+ glow: "#00f0ff",
998
+ particle: "#00f0ff",
999
+ scanLine: "#00f0ff",
1000
+ gridColor: "#00f0ff"
1001
+ },
1002
+ hologram: {
1003
+ primary: "#00ff88",
1004
+ secondary: "#00cc66",
1005
+ glow: "#00ff88",
1006
+ particle: "#00ff88",
1007
+ scanLine: "#00ff88",
1008
+ gridColor: "#00ff88"
1009
+ },
1010
+ plasma: {
1011
+ primary: "#ff00ff",
1012
+ secondary: "#cc00ff",
1013
+ glow: "#ff00ff",
1014
+ particle: "#ff00ff",
1015
+ scanLine: "#ff00ff",
1016
+ gridColor: "#ff00ff"
1017
+ },
1018
+ quantum: {
1019
+ primary: "#8800ff",
1020
+ secondary: "#6600cc",
1021
+ glow: "#8800ff",
1022
+ particle: "#8800ff",
1023
+ scanLine: "#8800ff",
1024
+ gridColor: "#8800ff"
1025
+ },
1026
+ matrix: {
1027
+ primary: "#00ff00",
1028
+ secondary: "#00cc00",
1029
+ glow: "#00ff00",
1030
+ particle: "#00ff00",
1031
+ scanLine: "#00ff00",
1032
+ gridColor: "#00ff00"
1033
+ },
1034
+ neon: {
1035
+ primary: "#ff0080",
1036
+ secondary: "#cc0066",
1037
+ glow: "#ff0080",
1038
+ particle: "#ff0080",
1039
+ scanLine: "#ff0080",
1040
+ gridColor: "#ff0080"
1041
+ },
1042
+ success: {
1043
+ primary: "#00ff88",
1044
+ secondary: "#00cc66",
1045
+ glow: "#00ff88",
1046
+ particle: "#00ff88",
1047
+ scanLine: "#00ff88",
1048
+ gridColor: "#00ff88"
1049
+ },
1050
+ warning: {
1051
+ primary: "#ffaa00",
1052
+ secondary: "#ff8800",
1053
+ glow: "#ffaa00",
1054
+ particle: "#ffaa00",
1055
+ scanLine: "#ffaa00",
1056
+ gridColor: "#ffaa00"
1057
+ },
1058
+ danger: {
1059
+ primary: "#ff3366",
1060
+ secondary: "#ff0044",
1061
+ glow: "#ff3366",
1062
+ particle: "#ff3366",
1063
+ scanLine: "#ff3366",
1064
+ gridColor: "#ff3366"
1065
+ }
1066
+ }, Me = B(class extends z {
1067
+ constructor(...e) {
1068
+ super(...e), this.element = null, this.container = null, this.fillElement = null, this.energyWave = null, this.scanLine = null, this.particlesCanvas = null, this.particlesCtx = null, this.hexGrid = null, this.readout = null, this.dataStreams = null, this.glitchLayer = null, this.styleElement = null, this.options = { percent: 0 }, this.variant = je.cyber, this.currentVariantName = "cyber", this.particles = [], this.animationFrame = null, this.lastTime = 0, this.currentPercent = 0, this.originalStyles = {}, this.resizeObserver = null, this.animate = (e) => {
1069
+ let t = (e - this.lastTime) / 1e3;
1070
+ this.lastTime = e, this.updateParticles(t), this.animationFrame = requestAnimationFrame(this.animate);
1071
+ };
1072
+ }
1073
+ getEffectiveSpeed() {
1074
+ return (this.options.speed ?? 1) * (.15 + Math.min(Math.max(this.currentPercent, 0), 100) / 100 * .85);
1075
+ }
1076
+ render(e) {
1077
+ return L;
1078
+ }
1079
+ update(e, [t]) {
1080
+ let n = e.element, r;
1081
+ if (this.element || (this.element = n, this.options = {
1082
+ variant: "cyber",
1083
+ autoVariant: !1,
1084
+ showReadout: !0,
1085
+ showScanLines: !0,
1086
+ showParticles: !0,
1087
+ showGrid: !0,
1088
+ showGlitch: !1,
1089
+ intensity: 1,
1090
+ speed: 1,
1091
+ criticalEffects: !0,
1092
+ glassEffect: !0,
1093
+ duration: 600,
1094
+ ...t
1095
+ }, this.variant = je[this.options.variant], this.currentVariantName = this.options.variant, this.storeOriginalStyles(), this.setupElement(), this.createStructure(), this.setupResizeObserver(), this.startAnimation()), t.autoVariant) {
1096
+ let e = t.percent;
1097
+ r = e >= 80 ? "success" : e >= 50 ? "warning" : "danger";
1098
+ } else r = t.variant ?? "cyber";
1099
+ return r !== this.currentVariantName && (this.currentVariantName = r, this.variant = je[r], this.updateColors()), this.options = {
1100
+ ...this.options,
1101
+ ...t
1102
+ }, this.variant = je[r], this.updateFill(), L;
1103
+ }
1104
+ storeOriginalStyles() {
1105
+ if (!this.element) return;
1106
+ let e = this.element.style;
1107
+ this.originalStyles = {
1108
+ position: e.position,
1109
+ overflow: e.overflow,
1110
+ border: e.border,
1111
+ background: e.background,
1112
+ boxShadow: e.boxShadow,
1113
+ backdropFilter: e.backdropFilter,
1114
+ borderRadius: e.borderRadius
1115
+ };
1116
+ }
1117
+ setupElement() {
1118
+ this.element && (getComputedStyle(this.element).position === "static" && (this.element.style.position = "relative"), this.element.style.overflow = "hidden", !1 !== this.options.glassEffect && Object.assign(this.element.style, {
1119
+ background: "rgba(10, 10, 20, 0.9)",
1120
+ backdropFilter: "blur(16px) saturate(130%)",
1121
+ border: `1.5px solid ${this.variant.primary}30`,
1122
+ boxShadow: "\n 0 2px 8px rgba(0, 0, 0, 0.4),\n 0 8px 32px rgba(0, 0, 0, 0.25),\n inset 0 1px 0 rgba(255, 255, 255, 0.06),\n 0 0 0 1px rgba(0, 0, 0, 0.3)\n ",
1123
+ borderRadius: "12px"
1124
+ }));
1125
+ }
1126
+ createStructure() {
1127
+ this.element && (this.styleElement = document.createElement("style"), this.styleElement.textContent = "\n@keyframes future-fill-pulse {\n 0%, 100% { opacity: 0.85; }\n 50% { opacity: 1; }\n}\n\n@keyframes future-glow-pulse {\n 0%, 100% {\n filter: drop-shadow(0 0 4px var(--glow-color))\n drop-shadow(0 0 8px var(--glow-color));\n }\n 50% {\n filter: drop-shadow(0 0 8px var(--glow-color))\n drop-shadow(0 0 16px var(--glow-color));\n }\n}\n\n@keyframes scan-line-move {\n 0% { transform: translateY(-100%); }\n 100% { transform: translateY(200%); }\n}\n\n@keyframes energy-wave {\n 0% { \n transform: translateY(0) scaleX(1);\n opacity: 0.6;\n }\n 50% { \n transform: translateY(-10px) scaleX(1.1);\n opacity: 1;\n }\n 100% { \n transform: translateY(0) scaleX(1);\n opacity: 0.6;\n }\n}\n\n@keyframes data-stream {\n 0% { \n transform: translateY(100%);\n opacity: 0;\n }\n 10% {\n opacity: 1;\n }\n 90% {\n opacity: 1;\n }\n 100% { \n transform: translateY(-100%);\n opacity: 0;\n }\n}\n\n@keyframes hologram-flicker {\n 0%, 100% { opacity: 1; }\n 2% { opacity: 0.8; }\n 4% { opacity: 1; }\n 8% { opacity: 0.9; }\n 10% { opacity: 1; }\n 50% { opacity: 0.95; }\n 51% { opacity: 1; }\n}\n\n@keyframes glitch-shift {\n 0%, 100% { \n transform: translate(0, 0);\n filter: hue-rotate(0deg);\n }\n 20% { \n transform: translate(-2px, 1px);\n filter: hue-rotate(90deg);\n }\n 40% { \n transform: translate(2px, -1px);\n filter: hue-rotate(180deg);\n }\n 60% { \n transform: translate(-1px, -2px);\n filter: hue-rotate(270deg);\n }\n 80% { \n transform: translate(1px, 2px);\n filter: hue-rotate(360deg);\n }\n}\n\n@keyframes hex-grid-pulse {\n 0%, 100% { opacity: 0.15; }\n 50% { opacity: 0.35; }\n}\n\n@keyframes chromatic-aberration {\n 0%, 100% {\n text-shadow:\n -0.5px 0 0 rgba(255, 0, 0, 0.3),\n 0.5px 0 0 rgba(0, 255, 255, 0.3);\n }\n 50% {\n text-shadow:\n -1px 0 0 rgba(255, 0, 0, 0.5),\n 1px 0 0 rgba(0, 255, 255, 0.5);\n }\n}\n\n@keyframes critical-flash {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n\n@keyframes overfill-surge {\n 0%, 100% {\n transform: scale(1);\n filter: brightness(1);\n }\n 50% {\n transform: scale(1.01);\n filter: brightness(1.15);\n }\n}\n\n", this.element.appendChild(this.styleElement), this.container = document.createElement("div"), Object.assign(this.container.style, {
1128
+ position: "absolute",
1129
+ inset: "0",
1130
+ pointerEvents: "none",
1131
+ zIndex: "0",
1132
+ overflow: "hidden",
1133
+ borderRadius: "inherit",
1134
+ background: "rgba(0, 0, 0, 0.3)"
1135
+ }), this.element.insertBefore(this.container, this.element.firstChild), this.createFill(), this.createHexGrid(), this.createEnergyWave(), this.createScanLines(), this.createDataStreams(), this.createGlitchLayer(), this.createParticles(), this.createReadout());
1136
+ }
1137
+ createFill() {
1138
+ if (!this.container) return;
1139
+ let e = this.options.duration ?? 600, t = 4 / this.getEffectiveSpeed();
1140
+ this.fillElement = document.createElement("div"), Object.assign(this.fillElement.style, {
1141
+ position: "absolute",
1142
+ left: "0",
1143
+ right: "0",
1144
+ bottom: "0",
1145
+ height: "0%",
1146
+ background: `linear-gradient(180deg,\n\t\t\t\t${this.variant.primary}00 0%,\n\t\t\t\t${this.variant.primary}25 20%,\n\t\t\t\t${this.variant.primary}50 60%,\n\t\t\t\t${this.variant.secondary}cc 100%\n\t\t\t)`,
1147
+ transition: `height ${e}ms cubic-bezier(0.4, 0, 0.2, 1)`,
1148
+ boxShadow: `\n\t\t\t\tinset 0 0 30px ${this.variant.glow}30,\n\t\t\t\tinset 0 -10px 20px ${this.variant.glow}20,\n\t\t\t\t0 0 15px ${this.variant.glow}25\n\t\t\t`,
1149
+ overflow: "hidden",
1150
+ "--glow-color": this.variant.glow,
1151
+ animation: `future-fill-pulse ${t}s ease-in-out infinite`
1152
+ }), this.container.appendChild(this.fillElement);
1153
+ }
1154
+ createEnergyWave() {
1155
+ if (!this.fillElement) return;
1156
+ let e = this.getEffectiveSpeed();
1157
+ this.energyWave = document.createElement("div"), Object.assign(this.energyWave.style, {
1158
+ position: "absolute",
1159
+ left: "-10%",
1160
+ top: "-12px",
1161
+ width: "120%",
1162
+ height: "24px",
1163
+ background: `radial-gradient(ellipse at center,\n\t\t\t\t${this.variant.primary}90 0%,\n\t\t\t\t${this.variant.primary}40 30%,\n\t\t\t\ttransparent 70%\n\t\t\t)`,
1164
+ filter: `blur(6px) drop-shadow(0 0 6px ${this.variant.glow}80)`,
1165
+ animation: `energy-wave ${3 / e}s ease-in-out infinite`
1166
+ }), this.fillElement.appendChild(this.energyWave);
1167
+ }
1168
+ createHexGrid() {
1169
+ if (!this.fillElement || !this.options.showGrid) return;
1170
+ let e = this.getEffectiveSpeed();
1171
+ this.hexGrid = document.createElement("div"), Object.assign(this.hexGrid.style, {
1172
+ position: "absolute",
1173
+ inset: "0",
1174
+ background: this.createHexPattern(),
1175
+ opacity: "0.08",
1176
+ animation: `hex-grid-pulse ${5 / e}s ease-in-out infinite`,
1177
+ mixBlendMode: "screen"
1178
+ }), this.fillElement.appendChild(this.hexGrid);
1179
+ }
1180
+ createHexPattern() {
1181
+ let e = this.variant.gridColor;
1182
+ return `\n\t\t\trepeating-linear-gradient(\n\t\t\t\t0deg,\n\t\t\t\t${e}00 0px,\n\t\t\t\t${e}40 1px,\n\t\t\t\t${e}00 2px,\n\t\t\t\t${e}00 40px\n\t\t\t),\n\t\t\trepeating-linear-gradient(\n\t\t\t\t60deg,\n\t\t\t\t${e}00 0px,\n\t\t\t\t${e}40 1px,\n\t\t\t\t${e}00 2px,\n\t\t\t\t${e}00 40px\n\t\t\t),\n\t\t\trepeating-linear-gradient(\n\t\t\t\t120deg,\n\t\t\t\t${e}00 0px,\n\t\t\t\t${e}40 1px,\n\t\t\t\t${e}00 2px,\n\t\t\t\t${e}00 40px\n\t\t\t)\n\t\t`;
1183
+ }
1184
+ createScanLines() {
1185
+ if (!this.fillElement || !this.options.showScanLines) return;
1186
+ let e = this.getEffectiveSpeed(), t = document.createElement("div");
1187
+ Object.assign(t.style, {
1188
+ position: "absolute",
1189
+ inset: "0",
1190
+ background: `repeating-linear-gradient(\n\t\t\t\t0deg,\n\t\t\t\ttransparent 0px,\n\t\t\t\t${this.variant.scanLine}08 1px,\n\t\t\t\ttransparent 2px,\n\t\t\t\ttransparent 4px\n\t\t\t)`,
1191
+ opacity: "0.15",
1192
+ pointerEvents: "none"
1193
+ }), this.fillElement.appendChild(t), this.scanLine = document.createElement("div"), Object.assign(this.scanLine.style, {
1194
+ position: "absolute",
1195
+ left: "0",
1196
+ right: "0",
1197
+ top: "-1px",
1198
+ height: "1px",
1199
+ background: `linear-gradient(90deg,\n\t\t\t\ttransparent 0%,\n\t\t\t\t${this.variant.scanLine}cc 50%,\n\t\t\t\ttransparent 100%\n\t\t\t)`,
1200
+ boxShadow: `0 0 8px ${this.variant.glow}60`,
1201
+ animation: `scan-line-move ${6 / e}s linear infinite`,
1202
+ opacity: "0.35"
1203
+ }), this.fillElement.appendChild(this.scanLine);
1204
+ }
1205
+ createParticles() {
1206
+ this.fillElement && this.options.showParticles && (this.particlesCanvas = document.createElement("canvas"), Object.assign(this.particlesCanvas.style, {
1207
+ position: "absolute",
1208
+ left: "0",
1209
+ bottom: "0",
1210
+ width: "100%",
1211
+ height: "100%",
1212
+ pointerEvents: "none",
1213
+ zIndex: "5"
1214
+ }), this.fillElement.appendChild(this.particlesCanvas), this.particlesCtx = this.particlesCanvas.getContext("2d"), this.resizeCanvas(), this.initParticles());
1215
+ }
1216
+ resizeCanvas() {
1217
+ if (!this.particlesCanvas || !this.fillElement) return;
1218
+ let e = this.fillElement.getBoundingClientRect();
1219
+ this.particlesCanvas.width = e.width, this.particlesCanvas.height = e.height;
1220
+ }
1221
+ setupResizeObserver() {
1222
+ this.element && typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => {
1223
+ this.resizeCanvas();
1224
+ }), this.resizeObserver.observe(this.element));
1225
+ }
1226
+ initParticles() {
1227
+ let e = Math.floor(12 * (this.options.intensity ?? 1));
1228
+ for (let t = 0; t < e; t++) this.spawnParticle();
1229
+ }
1230
+ spawnParticle() {
1231
+ if (!this.particlesCanvas) return;
1232
+ let e = this.particlesCanvas.width, t = this.particlesCanvas.height, n = this.getEffectiveSpeed();
1233
+ this.particles.push({
1234
+ x: Math.random() * e,
1235
+ y: t + 30 * Math.random(),
1236
+ vx: .5 * (Math.random() - .5),
1237
+ vy: (-.4 - 1.2 * Math.random()) * n,
1238
+ size: .8 + 1.2 * Math.random(),
1239
+ opacity: .2 + .4 * Math.random(),
1240
+ hue: 60 * Math.random() - 30,
1241
+ life: 0
1242
+ });
1243
+ }
1244
+ createDataStreams() {
1245
+ if (!this.fillElement) return;
1246
+ let e = this.getEffectiveSpeed();
1247
+ this.dataStreams = document.createElement("div"), Object.assign(this.dataStreams.style, {
1248
+ position: "absolute",
1249
+ inset: "0",
1250
+ overflow: "hidden",
1251
+ opacity: "0.18",
1252
+ zIndex: "3"
1253
+ }), this.fillElement.appendChild(this.dataStreams);
1254
+ for (let t = 0; t < 3; t++) {
1255
+ let n = document.createElement("div"), r = 15 + 30 * t, i = 4 * Math.random(), a = 3 + 2 * Math.random();
1256
+ Object.assign(n.style, {
1257
+ position: "absolute",
1258
+ left: `${r}%`,
1259
+ top: "0",
1260
+ width: "1px",
1261
+ height: "100%",
1262
+ background: `linear-gradient(180deg,\n\t\t\t\t\ttransparent 0%,\n\t\t\t\t\t${this.variant.primary}cc 50%,\n\t\t\t\t\ttransparent 100%\n\t\t\t\t)`,
1263
+ animation: `data-stream ${a / e}s linear infinite`,
1264
+ animationDelay: `${i}s`,
1265
+ boxShadow: `0 0 4px ${this.variant.glow}40`
1266
+ }), this.dataStreams.appendChild(n);
1267
+ }
1268
+ }
1269
+ createGlitchLayer() {
1270
+ this.fillElement && this.options.showGlitch && (this.glitchLayer = document.createElement("div"), Object.assign(this.glitchLayer.style, {
1271
+ position: "absolute",
1272
+ inset: "0",
1273
+ background: `linear-gradient(90deg,\n\t\t\t\t${this.variant.primary}20 0%,\n\t\t\t\ttransparent 50%,\n\t\t\t\t${this.variant.secondary}20 100%\n\t\t\t)`,
1274
+ opacity: "0.3",
1275
+ animation: "glitch-shift 0.3s steps(1) infinite",
1276
+ mixBlendMode: "overlay"
1277
+ }), this.fillElement.appendChild(this.glitchLayer));
1278
+ }
1279
+ createReadout() {
1280
+ if (!this.element || !this.options.showReadout) return;
1281
+ let e = this.getEffectiveSpeed();
1282
+ this.readout = document.createElement("div"), Object.assign(this.readout.style, {
1283
+ position: "absolute",
1284
+ top: "10px",
1285
+ right: "10px",
1286
+ fontFamily: "monospace",
1287
+ fontSize: "1rem",
1288
+ fontWeight: "600",
1289
+ color: this.variant.primary,
1290
+ textShadow: `\n\t\t\t\t0 0 6px ${this.variant.glow}80,\n\t\t\t\t0 2px 4px rgba(0, 0, 0, 0.8)\n\t\t\t`,
1291
+ zIndex: "10",
1292
+ pointerEvents: "none",
1293
+ letterSpacing: "0.08em",
1294
+ animation: `hologram-flicker ${8 / e}s ease-in-out infinite`
1295
+ }), this.element.appendChild(this.readout);
1296
+ let t = document.createElement("span");
1297
+ t.textContent = " PWR", t.style.opacity = "0.6", t.style.fontSize = "0.7em", this.readout.appendChild(t);
1298
+ }
1299
+ updateColors() {
1300
+ this.fillElement && (this.fillElement.style.background = `linear-gradient(180deg,\n\t\t\t\t${this.variant.primary}00 0%,\n\t\t\t\t${this.variant.primary}25 20%,\n\t\t\t\t${this.variant.primary}50 60%,\n\t\t\t\t${this.variant.secondary}cc 100%\n\t\t\t)`, this.fillElement.style.boxShadow = `\n\t\t\t\tinset 0 0 30px ${this.variant.glow}30,\n\t\t\t\tinset 0 -10px 20px ${this.variant.glow}20,\n\t\t\t\t0 0 15px ${this.variant.glow}25\n\t\t\t`, this.fillElement.style.setProperty("--glow-color", this.variant.glow)), this.energyWave && (this.energyWave.style.background = `radial-gradient(ellipse at center,\n\t\t\t\t${this.variant.primary}90 0%,\n\t\t\t\t${this.variant.primary}40 30%,\n\t\t\t\ttransparent 70%\n\t\t\t)`, this.energyWave.style.filter = `blur(6px) drop-shadow(0 0 6px ${this.variant.glow}80)`), this.hexGrid && (this.hexGrid.style.background = this.createHexPattern()), this.dataStreams && this.dataStreams.querySelectorAll("div").forEach((e) => {
1301
+ let t = e;
1302
+ t.style.background = `linear-gradient(180deg,\n\t\t\t\t\ttransparent 0%,\n\t\t\t\t\t${this.variant.primary}cc 50%,\n\t\t\t\t\ttransparent 100%\n\t\t\t\t)`, t.style.boxShadow = `0 0 4px ${this.variant.glow}40`;
1303
+ }), this.glitchLayer && (this.glitchLayer.style.background = `linear-gradient(90deg,\n\t\t\t\t${this.variant.primary}20 0%,\n\t\t\t\ttransparent 50%,\n\t\t\t\t${this.variant.secondary}20 100%\n\t\t\t)`), this.readout && (this.readout.style.color = this.variant.primary, this.readout.style.textShadow = `\n\t\t\t\t0 0 6px ${this.variant.glow}80,\n\t\t\t\t0 2px 4px rgba(0, 0, 0, 0.8)\n\t\t\t`), this.element && !1 !== this.options.glassEffect && (this.element.style.border = `1.5px solid ${this.variant.primary}30`);
1304
+ }
1305
+ startAnimation() {
1306
+ this.lastTime = performance.now(), this.animate(this.lastTime);
1307
+ }
1308
+ updateParticles(e) {
1309
+ if (!this.particlesCanvas || !this.particlesCtx || !this.options.showParticles) return;
1310
+ let t = this.particlesCtx, n = this.particlesCanvas.width, r = this.particlesCanvas.height;
1311
+ t.clearRect(0, 0, n, r);
1312
+ for (let n = this.particles.length - 1; n >= 0; n--) {
1313
+ let r = this.particles[n], i = this.getEffectiveSpeed();
1314
+ if (r.x += r.vx * e * 60 * i, r.y += r.vy * e * 60 * i, r.life += e, r.life > 2 && (r.opacity *= .95), r.opacity < .01 || r.y < -50) {
1315
+ this.particles.splice(n, 1), this.spawnParticle();
1316
+ continue;
1317
+ }
1318
+ let a = t.createRadialGradient(r.x, r.y, 0, r.x, r.y, 2.5 * r.size);
1319
+ a.addColorStop(0, this.hexToRGBA(this.variant.particle, .8 * r.opacity)), a.addColorStop(.5, this.hexToRGBA(this.variant.particle, .15 * r.opacity)), a.addColorStop(1, this.hexToRGBA(this.variant.particle, 0)), t.fillStyle = a, t.beginPath(), t.arc(r.x, r.y, 2.5 * r.size, 0, 2 * Math.PI), t.fill(), t.fillStyle = this.hexToRGBA(this.variant.particle, .7 * r.opacity), t.beginPath(), t.arc(r.x, r.y, .8 * r.size, 0, 2 * Math.PI), t.fill();
1320
+ }
1321
+ }
1322
+ hexToRGBA(e, t) {
1323
+ return `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t})`;
1324
+ }
1325
+ updateFill() {
1326
+ let e = Math.max(0, this.options.percent), t = Math.min(e, 100), n = e < 20, r = e > 100;
1327
+ this.currentPercent = t;
1328
+ let i = this.getEffectiveSpeed();
1329
+ if (this.fillElement) {
1330
+ this.fillElement.style.height = `${t}%`;
1331
+ let e = this.options.duration ?? 600;
1332
+ this.fillElement.style.transition = `height ${e}ms cubic-bezier(0.4, 0, 0.2, 1)`;
1333
+ }
1334
+ if (this.readout) {
1335
+ let t = Math.round(e);
1336
+ this.readout.firstChild.textContent = t.toString().padStart(3, "0"), this.options.criticalEffects && (this.readout.style.animation = n ? "critical-flash 1s ease-in-out infinite" : r ? "overfill-surge 1.5s ease-in-out infinite" : `hologram-flicker ${8 / i}s ease-in-out infinite`);
1337
+ }
1338
+ if (this.fillElement) {
1339
+ let e = 4 / i;
1340
+ this.options.criticalEffects && n ? this.fillElement.style.animation = "future-fill-pulse 1s ease-in-out infinite, critical-flash 1.5s ease-in-out infinite" : this.options.criticalEffects && r ? this.fillElement.style.animation = "future-fill-pulse 1.2s ease-in-out infinite, overfill-surge 1.5s ease-in-out infinite" : this.fillElement.style.animation = `future-fill-pulse ${e}s ease-in-out infinite`;
1341
+ }
1342
+ this.energyWave && (this.energyWave.style.animation = `energy-wave ${3 / i}s ease-in-out infinite`), this.scanLine && (this.scanLine.style.animation = `scan-line-move ${6 / i}s linear infinite`), this.hexGrid && (this.hexGrid.style.animation = `hex-grid-pulse ${5 / i}s ease-in-out infinite`);
1343
+ }
1344
+ disconnected() {
1345
+ this.animationFrame && cancelAnimationFrame(this.animationFrame), this.resizeObserver && this.resizeObserver.disconnect(), this.styleElement?.remove(), this.container?.remove(), this.readout?.remove(), this.element && Object.assign(this.element.style, this.originalStyles), this.element = null, this.container = null, this.fillElement = null, this.energyWave = null, this.scanLine = null, this.particlesCanvas = null, this.particlesCtx = null, this.hexGrid = null, this.readout = null, this.dataStreams = null, this.glitchLayer = null, this.particles = [], this.resizeObserver = null;
1346
+ }
1347
+ }), Ne = () => !1;
1348
+ function Pe(e) {
1349
+ Ne = e;
1350
+ }
1351
+ function Fe() {
1352
+ return Ne();
1353
+ }
1354
+ function Ie(e, t = R) {
1355
+ return Fe() ? e : t;
1356
+ }
1357
+ var Le = U(class extends V {
1358
+ constructor(e) {
1359
+ super(e), this.config = {};
1360
+ }
1361
+ update(e, [t]) {
1362
+ if (e.type !== H.ELEMENT) throw Error("The `classMap` directive must be used in the `class` attribute");
1363
+ let n = e.element;
1364
+ this.config = t, this.config.bgColor && (n.style.backgroundColor = this.config.bgColor), this.config.color && (n.style.color = this.config.color);
1365
+ }
1366
+ render(e) {
1367
+ return this.config = e, R;
1368
+ }
1369
+ }), q = /* @__PURE__ */ new WeakMap();
1370
+ function Re(e, t) {
1371
+ let n = e.match(/var\(([^,)]+)/);
1372
+ return n && getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t;
1373
+ }
1374
+ var ze = U(class extends V {
1375
+ constructor(e) {
1376
+ if (super(e), e.type !== H.ELEMENT) throw Error("confirmClick directive can only be used on elements");
1377
+ }
1378
+ render(e, t) {}
1379
+ update(e, [t, n = {}]) {
1380
+ let r = e.element, i = q.get(r);
1381
+ if (i) {
1382
+ if (i.callback = t, this.optionsEqual(i.options, n)) return;
1383
+ this.cleanup(r);
1384
+ }
1385
+ let a = new g(), o = this.setupClickListener(r, n ?? {}, a);
1386
+ q.set(r, {
1387
+ subscription: o,
1388
+ callback: t,
1389
+ options: n ?? {},
1390
+ overlayElement: null,
1391
+ isConfirming: !1,
1392
+ cancel$: a
1393
+ });
1394
+ }
1395
+ optionsEqual(e, t) {
1396
+ return t ? e.timeout === t.timeout && e.icon === t.icon : Object.keys(e).length === 0;
1397
+ }
1398
+ setupClickListener(e, t, n) {
1399
+ return T(e, "click").pipe(I((r) => {
1400
+ let i = q.get(e);
1401
+ i && !i.isConfirming && (r.stopPropagation(), r.preventDefault(), i.isConfirming = !0, this.showOverlay(e, i, t, n));
1402
+ })).subscribe();
1403
+ }
1404
+ showOverlay(e, t, n, r) {
1405
+ let i = n.timeout ?? 3e3, a = e, o = n.icon ?? a.icon ?? a._capturedIcon ?? e.textContent?.trim() ?? "warning", s = Re("var(--schmancy-sys-color-error-default)", "#dc2626"), c = Re("var(--schmancy-sys-color-error-on)", "#ffffff"), l = Re("var(--schmancy-sys-color-error-container)", "#fecaca"), u = document.createElement("div");
1406
+ u.setAttribute("role", "status"), u.setAttribute("aria-label", "Click again to confirm");
1407
+ let d = e.getBoundingClientRect(), f = d.width, p = d.height, m = window.devicePixelRatio || 1, h = getComputedStyle(e);
1408
+ Object.assign(u.style, {
1409
+ position: "fixed",
1410
+ top: `${d.top}px`,
1411
+ left: `${d.left}px`,
1412
+ width: `${f}px`,
1413
+ height: `${p}px`,
1414
+ zIndex: "10000",
1415
+ borderRadius: h.borderRadius || "50%",
1416
+ overflow: "hidden",
1417
+ cursor: "pointer",
1418
+ opacity: "0",
1419
+ transform: "scale(0.6)",
1420
+ transition: "opacity 250ms cubic-bezier(0.22, 1.25, 0.36, 1), transform 300ms cubic-bezier(0.22, 1.25, 0.36, 1)"
1421
+ });
1422
+ let g = document.createElement("canvas");
1423
+ g.width = f * m, g.height = p * m, g.style.width = `${f}px`, g.style.height = `${p}px`, g.style.position = "absolute", g.style.top = "0", g.style.left = "0", u.appendChild(g);
1424
+ let _ = Math.round(.5 * Math.min(f, p)), y = document.createElement("schmancy-icon");
1425
+ y.textContent = o, y.setAttribute("size", `${_}px`), Object.assign(y.style, {
1426
+ position: "absolute",
1427
+ top: "50%",
1428
+ left: "50%",
1429
+ transform: "translate(-50%, -50%)",
1430
+ color: c,
1431
+ pointerEvents: "none"
1432
+ }), u.appendChild(y), document.body.appendChild(u), t.overlayElement = u, ne(null).pipe(le(v)).subscribe(() => {
1433
+ u.style.opacity = "1", u.style.transform = "scale(1)";
1434
+ });
1435
+ let b = g.getContext("2d");
1436
+ if (!b) return;
1437
+ b.scale(m, m);
1438
+ let x = f / 2, S = p / 2, C = Math.min(f, p) / 2 - 1, ee = C - 3, w = (e) => {
1439
+ b.clearRect(0, 0, f, p), b.beginPath(), b.arc(x, S, ee, 0, 2 * Math.PI), b.fillStyle = s, b.fill();
1440
+ let t = 1 - e;
1441
+ if (t > 0) {
1442
+ let e = -Math.PI / 2, n = e + 2 * Math.PI * t;
1443
+ b.beginPath(), b.arc(x, S, C, e, n), b.arc(x, S, ee, n, e, !0), b.closePath(), b.fillStyle = l, b.fill();
1444
+ }
1445
+ };
1446
+ w(0);
1447
+ let re = performance.now(), D = E(0, v).pipe(j(() => (performance.now() - re) / i), F((e) => e <= 1), P(r), I((e) => w(e))).subscribe({ complete: () => {
1448
+ q.get(e)?.isConfirming && this.hideOverlay(e);
1449
+ } });
1450
+ t.subscription.add(D);
1451
+ let ie = te(T(u, "click").pipe(N(1), I(() => {
1452
+ t.callback(), this.hideOverlay(e);
1453
+ })), T(document, "click", { capture: !0 }).pipe(A((t) => !u.contains(t.target) && !e.contains(t.target)), N(1), I(() => this.hideOverlay(e))), T(document, "keydown").pipe(A((e) => e.key === "Escape"), N(1), I(() => this.hideOverlay(e)))).pipe(N(1), P(r)).subscribe();
1454
+ t.subscription.add(ie);
1455
+ }
1456
+ hideOverlay(e) {
1457
+ let t = q.get(e);
1458
+ if (t && (t.cancel$.next(), t.isConfirming = !1, t.overlayElement)) {
1459
+ let e = t.overlayElement;
1460
+ e.style.opacity = "0", e.style.transform = "scale(0.6)", D(250).pipe(I(() => {
1461
+ document.body.contains(e) && document.body.removeChild(e);
1462
+ })).subscribe(), t.overlayElement = null;
1463
+ }
1464
+ }
1465
+ cleanup(e) {
1466
+ let t = q.get(e);
1467
+ t && (t.cancel$.next(), t.cancel$.complete(), t.subscription.unsubscribe(), t.overlayElement && document.body.contains(t.overlayElement) && document.body.removeChild(t.overlayElement), q.delete(e));
1468
+ }
1469
+ disconnected(e) {
1470
+ this.cleanup(e.element);
1471
+ }
1472
+ reconnected(e) {
1473
+ let t = e.element, n = q.get(t);
1474
+ if (n) {
1475
+ let e = new g(), r = this.setupClickListener(t, n.options, e);
1476
+ q.set(t, {
1477
+ subscription: r,
1478
+ callback: n.callback,
1479
+ options: n.options,
1480
+ overlayElement: null,
1481
+ isConfirming: !1,
1482
+ cancel$: e
1483
+ });
1484
+ }
1485
+ }
1486
+ }), Be = B(class extends z {
1487
+ constructor(...e) {
1488
+ super(...e), this.element = null, this.items = [], this.subscription = null, this.typewriterSub = null, this.currentAnimation = null, this.addDisplayEl = null, this.disconnecting$ = new g(), this.initialized = !1;
1489
+ }
1490
+ render(e) {
1491
+ return L;
1492
+ }
1493
+ update(e, [t = {}]) {
1494
+ if (this.element = e.element, !this.initialized && this.isConnected) {
1495
+ if (this.initialized = !0, this.disconnecting$.closed && (this.disconnecting$ = new g()), this.items = Array.from(this.element.children).filter((e) => e instanceof HTMLElement), this.items.length === 0) return L;
1496
+ this.element.style.display = "inline-grid", this.element.style.verticalAlign = "bottom", this.items.forEach((e, t) => {
1497
+ e.style.gridColumn = "1", e.style.gridRow = "1", e.style.visibility = t === 0 ? "" : "hidden";
1498
+ }), this.startCycling(t);
1499
+ }
1500
+ return L;
1501
+ }
1502
+ disconnected() {
1503
+ this.cleanup();
1504
+ }
1505
+ reconnected() {}
1506
+ startCycling(e) {
1507
+ let { mode: t = "replace" } = e;
1508
+ this.items.length < 2 || (t === "add" ? this.startAddCycling(e) : this.startReplaceCycling(e));
1509
+ }
1510
+ startReplaceCycling(e) {
1511
+ let { transition: t = "fade", hold: n = 2e3, duration: r = 300, delay: i = 0 } = e, a = (e) => S(() => new h((i) => {
1512
+ let a = this.items[e], o = (e - 1 + this.items.length) % this.items.length, s = this.items[o], c = parseInt(a.dataset.hold || "", 10) || n, l = this.transitionItems(s, a, t, r).pipe(M(() => D(c)), N(1), P(this.disconnecting$)).subscribe({
1513
+ next: () => {
1514
+ i.next(), i.complete();
1515
+ },
1516
+ error: (e) => i.error(e)
1517
+ });
1518
+ return () => l.unsubscribe();
1519
+ })), o = parseInt(this.items[0].dataset.hold || "", 10) || n, s = b(S(() => new h((e) => {
1520
+ let t = D(o).pipe(P(this.disconnecting$)).subscribe({ next: () => {
1521
+ e.next(), e.complete();
1522
+ } });
1523
+ return () => t.unsubscribe();
1524
+ })), b(...[...Array.from({ length: this.items.length }, (e, t) => t).slice(1), 0].map((e) => a(e))).pipe(ue()));
1525
+ this.subscription = D(i).pipe(M(() => s), P(this.disconnecting$)).subscribe();
1526
+ }
1527
+ startAddCycling(e) {
1528
+ let { transition: t = "fade", hold: n = 2e3, duration: r = 300, delay: i = 0, separator: a = ", " } = e, o = this.items.map((e) => e.textContent || "");
1529
+ this.items.forEach((e) => {
1530
+ e.style.display = "none";
1531
+ });
1532
+ let s = document.createElement("span");
1533
+ this.element.appendChild(s), this.addDisplayEl = s;
1534
+ let c = S(() => {
1535
+ s.textContent = "";
1536
+ let e = "", i = o.map((i, o) => {
1537
+ let c = parseInt(this.items[o].dataset.hold || "", 10) || n, l = (o > 0 ? a : "") + i;
1538
+ return S(() => t === "typewriter" ? this.typewriterAdd(s, e, l, r).pipe(I(() => {
1539
+ e += l;
1540
+ }), M(() => D(c))) : S(() => (e += l, s.textContent = e, D(c))));
1541
+ }), c = S(() => {
1542
+ let t = s.animate([{ opacity: 1 }, { opacity: 0 }], {
1543
+ duration: r,
1544
+ fill: "forwards"
1545
+ });
1546
+ return this.currentAnimation = t, w(t.finished).pipe(I(() => {
1547
+ t.cancel(), s.textContent = "", s.style.opacity = "", e = "";
1548
+ }), M(() => D(300)));
1549
+ });
1550
+ return b(...i, c);
1551
+ });
1552
+ this.subscription = D(i).pipe(M(() => c.pipe(ue())), P(this.disconnecting$)).subscribe();
1553
+ }
1554
+ typewriterAdd(e, t, n, r) {
1555
+ if (n.length === 0) return ne(void 0);
1556
+ let i = r / n.length;
1557
+ return new h((r) => {
1558
+ let a = 0, o = E(i).pipe(I(() => {
1559
+ a++, e.textContent = t + n.slice(0, a);
1560
+ }), F(() => a < n.length), P(this.disconnecting$)).subscribe({ complete: () => {
1561
+ e.textContent = t + n, r.next(), r.complete();
1562
+ } });
1563
+ return () => o.unsubscribe();
1564
+ });
1565
+ }
1566
+ transitionItems(e, t, n, r) {
1567
+ switch (this.currentAnimation?.cancel(), this.currentAnimation = null, this.typewriterSub?.unsubscribe(), this.typewriterSub = null, n) {
1568
+ case "slide": return this.slideTransition(e, t, r);
1569
+ case "typewriter": return this.typewriterTransition(e, t, r);
1570
+ default: return this.fadeTransition(e, t, r);
1571
+ }
1572
+ }
1573
+ fadeTransition(e, t, n) {
1574
+ let r = e.animate([{ opacity: 1 }, { opacity: 0 }], {
1575
+ duration: n / 2,
1576
+ fill: "forwards"
1577
+ });
1578
+ return this.currentAnimation = r, w(r.finished).pipe(M(() => {
1579
+ r.cancel(), e.style.visibility = "hidden", t.style.visibility = "";
1580
+ let i = t.animate([{ opacity: 0 }, { opacity: 1 }], {
1581
+ duration: n / 2,
1582
+ fill: "forwards"
1583
+ });
1584
+ return this.currentAnimation = i, w(i.finished).pipe(I(() => {
1585
+ i.cancel();
1586
+ }), j(() => {}), O(() => m));
1587
+ }), O(() => m));
1588
+ }
1589
+ slideTransition(e, t, n) {
1590
+ let r = "cubic-bezier(0.4, 0, 0.2, 1)";
1591
+ t.style.visibility = "";
1592
+ let i = e.animate([{
1593
+ transform: "translateY(0)",
1594
+ opacity: 1
1595
+ }, {
1596
+ transform: "translateY(-100%)",
1597
+ opacity: 0
1598
+ }], {
1599
+ duration: n,
1600
+ fill: "forwards",
1601
+ easing: r
1602
+ }), a = t.animate([{
1603
+ transform: "translateY(100%)",
1604
+ opacity: 0
1605
+ }, {
1606
+ transform: "translateY(0)",
1607
+ opacity: 1
1608
+ }], {
1609
+ duration: n,
1610
+ fill: "forwards",
1611
+ easing: r
1612
+ });
1613
+ return this.currentAnimation = a, w(a.finished).pipe(I(() => {
1614
+ i.cancel(), a.cancel(), e.style.visibility = "hidden";
1615
+ }), j(() => {}), O(() => m));
1616
+ }
1617
+ typewriterTransition(e, t, n) {
1618
+ let r = e.textContent || "", i = t.textContent || "", a = r.length + i.length;
1619
+ if (a === 0) return e.style.visibility = "hidden", t.style.visibility = "", ne(void 0);
1620
+ let o = n / a;
1621
+ return new h((n) => {
1622
+ let a = r.length;
1623
+ return this.typewriterSub = b(E(o).pipe(I(() => {
1624
+ a--, e.textContent = r.slice(0, a);
1625
+ }), F(() => a > 0)), S(() => (e.style.visibility = "hidden", e.textContent = r, t.style.visibility = "", t.textContent = "", ne(null))), S(() => {
1626
+ let e = 0;
1627
+ return E(o).pipe(I(() => {
1628
+ e++, t.textContent = i.slice(0, e);
1629
+ }), F(() => e < i.length));
1630
+ })).pipe(P(this.disconnecting$)).subscribe({ complete: () => {
1631
+ t.textContent = i, n.next(), n.complete();
1632
+ } }), () => {
1633
+ this.typewriterSub?.unsubscribe(), this.typewriterSub = null;
1634
+ };
1635
+ });
1636
+ }
1637
+ cleanup() {
1638
+ this.disconnecting$.next(), this.disconnecting$.complete(), this.currentAnimation?.cancel(), this.currentAnimation = null, this.typewriterSub?.unsubscribe(), this.typewriterSub = null, this.subscription?.unsubscribe(), this.subscription = null, this.addDisplayEl &&= (this.addDisplayEl.remove(), null), this.items.forEach((e, t) => {
1639
+ e.style.gridColumn = "", e.style.gridRow = "", e.style.visibility = t === 0 ? "" : "hidden", e.style.opacity = "", e.style.transform = "";
1640
+ }), this.element = null, this.items = [], this.initialized = !1;
1641
+ }
1642
+ }), Ve = U(class extends z {
1643
+ constructor(...e) {
1644
+ super(...e), this.maxBlur = 8, this.duration = 400, this.isBlurred = !1, this.transitionSet = !1;
1645
+ }
1646
+ render(e) {}
1647
+ update(e, [t]) {
1648
+ if (e.type !== H.ELEMENT) throw Error("depthOfField directive must be used on an element");
1649
+ this.element = e.element, this.maxBlur = t.maxBlur ?? 8, this.duration = t.duration ?? 400, this.transitionSet || o.value || (this.element.style.transition = `filter ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1), scale ${this.duration}ms cubic-bezier(0.34, 1.2, 0.64, 1)`, this.transitionSet = !0), t.active && !this.isBlurred ? this.applyBlur() : !t.active && this.isBlurred && this.clearBlur();
1650
+ }
1651
+ applyBlur() {
1652
+ this.element.style.filter = `blur(${this.maxBlur}px) saturate(60%)`, this.element.style.scale = "1.01", this.isBlurred = !0;
1653
+ }
1654
+ clearBlur() {
1655
+ this.element.style.filter = "", this.element.style.scale = "", this.isBlurred = !1;
1656
+ }
1657
+ disconnected() {
1658
+ this.isBlurred && this.clearBlur();
1659
+ }
1660
+ reconnected() {}
1661
+ }), He = new p(null), J = new p(null), Y = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Ue = [];
1662
+ function Z(e) {
1663
+ Ue.push(`[${(/* @__PURE__ */ new Date()).toISOString().slice(11, 23)}] ${e}`);
1664
+ }
1665
+ var We = null;
1666
+ J.pipe(k((e, t) => e?.target === t?.target && e?.position === t?.position)).subscribe((e) => {
1667
+ if (!e) return void (We && (We.style.display = "none"));
1668
+ if (o.value) return;
1669
+ let t = function() {
1670
+ if (We) return We;
1671
+ let e = document.createElement("div");
1672
+ e.setAttribute("data-schmancy-drop-line", ""), Object.assign(e.style, {
1673
+ position: "fixed",
1674
+ height: "2px",
1675
+ backgroundColor: "var(--schmancy-sys-color-tertiary-default, #6750A4)",
1676
+ borderRadius: "1px",
1677
+ pointerEvents: "none",
1678
+ zIndex: "10000",
1679
+ transition: "top 100ms ease, left 100ms ease, width 100ms ease",
1680
+ boxShadow: "0 0 4px var(--schmancy-sys-color-tertiary-default, #6750A4)",
1681
+ display: "none"
1682
+ });
1683
+ for (let t of ["left", "right"]) {
1684
+ let n = document.createElement("div");
1685
+ Object.assign(n.style, {
1686
+ position: "absolute",
1687
+ width: "6px",
1688
+ height: "6px",
1689
+ borderRadius: "50%",
1690
+ backgroundColor: "var(--schmancy-sys-color-tertiary-default, #6750A4)",
1691
+ top: "-2px",
1692
+ [t]: "-3px"
1693
+ }), e.appendChild(n);
1694
+ }
1695
+ return document.body.appendChild(e), We = e, e;
1696
+ }(), n = e.target.getBoundingClientRect(), r = e.position === "before" ? n.top - 1 : n.bottom + 1;
1697
+ Object.assign(t.style, {
1698
+ top: `${r}px`,
1699
+ left: `${n.left}px`,
1700
+ width: `${n.width}px`,
1701
+ display: "block"
1702
+ });
1703
+ });
1704
+ var Ge = class extends V {
1705
+ constructor(...e) {
1706
+ super(...e), this.destroy$ = new g();
1707
+ }
1708
+ update(e, [t]) {
1709
+ if (this.id = t, !this.element) {
1710
+ let t = e.element;
1711
+ this.element = t, t.draggable = !0, t.style.cursor = "grab", T(t, "dragstart").pipe(I((e) => {
1712
+ e.stopPropagation(), e.dataTransfer?.setData("application/json", JSON.stringify({ id: this.id })), e.dataTransfer && (e.dataTransfer.effectAllowed = "move"), t.style.cursor = "grabbing", Ue.length = 0, Z(`DRAGSTART id=${this.id} tag=${t.tagName}`), He.next(this.id), X.clear();
1713
+ let n = t.parentElement;
1714
+ if (n) for (let [e, t] of Y) t.parentElement === n && X.set(e, t.getBoundingClientRect());
1715
+ }), le(v), I(() => {
1716
+ o.value || (t.style.transition = "transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease", t.style.transform = "scale(1.03)", t.style.boxShadow = "0 8px 25px rgba(0,0,0,0.15)", t.style.opacity = "0.6", t.style.zIndex = "1000", t.style.pointerEvents = "none");
1717
+ }), M(() => T(t, "dragend").pipe(N(1), I(() => {
1718
+ let e = J.value;
1719
+ if (t.style.removeProperty("transition"), t.style.removeProperty("transform"), t.style.removeProperty("box-shadow"), t.style.removeProperty("opacity"), t.style.removeProperty("z-index"), t.style.removeProperty("pointer-events"), t.style.cursor = "grab", e) {
1720
+ let { target: t, destinationId: n, position: i } = e;
1721
+ Z(`DROP source=${this.id} dest=${n} pos=${i}`), t.dispatchEvent(new CustomEvent("drop", {
1722
+ detail: {
1723
+ source: this.id,
1724
+ destination: n,
1725
+ position: i
1726
+ },
1727
+ bubbles: !0,
1728
+ composed: !0
1729
+ })), D(0, v).pipe(de(1), N(1)).subscribe(() => {
1730
+ if (!o.value && X.size !== 0) {
1731
+ for (let [e, t] of X) {
1732
+ let n = Y.get(e);
1733
+ if (!n) continue;
1734
+ let i = n.getBoundingClientRect(), a = t.left - i.left, o = t.top - i.top;
1735
+ Math.abs(a) < 1 && Math.abs(o) < 1 || n.animate([{ transform: `translate(${a}px, ${o}px)` }, { transform: "translate(0,0)" }], {
1736
+ duration: r.duration,
1737
+ easing: r.easingFallback,
1738
+ fill: "none"
1739
+ });
1740
+ }
1741
+ X.clear();
1742
+ }
1743
+ });
1744
+ }
1745
+ He.next(null), J.next(null), Z(`DRAGEND id=${this.id}`), Ue.length !== 0 && (Ue.length = 0);
1746
+ }))), P(this.destroy$)).subscribe();
1747
+ }
1748
+ return this.registeredId && this.registeredId !== t && Y.delete(this.registeredId), Y.set(t, this.element), this.registeredId = t, R;
1749
+ }
1750
+ disconnected() {
1751
+ this.destroy$.next(), this.destroy$.complete(), this.registeredId && Y.delete(this.registeredId), this.element = void 0;
1752
+ }
1753
+ reconnected() {
1754
+ this.destroy$ = new g(), this.element = void 0;
1755
+ }
1756
+ render(e) {
1757
+ return R;
1758
+ }
1759
+ }, Ke = U(Ge), qe = class extends V {
1760
+ constructor(...e) {
1761
+ super(...e), this.destroy$ = new g();
1762
+ }
1763
+ update(e, [t]) {
1764
+ if (this.destinationId = t, !this.element) {
1765
+ let t = e.element;
1766
+ this.element = t, T(t, "dragenter").pipe(I((e) => {
1767
+ Z(`NATIVE-DRAGENTER dest=${this.destinationId}`), e.preventDefault();
1768
+ }), P(this.destroy$)).subscribe(), T(t, "dragover").pipe(I((e) => {
1769
+ Z(`NATIVE-DRAGOVER dest=${this.destinationId}`), e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
1770
+ }), P(this.destroy$)).subscribe(), T(t, "drop").pipe(I((e) => {
1771
+ e.preventDefault(), Z(`NATIVE-DROP dest=${this.destinationId}`);
1772
+ }), P(this.destroy$)).subscribe(), He.pipe(M((e) => e && e !== this.destinationId ? (Z(`DROP-ACTIVE dest=${this.destinationId} src=${e}`), T(t, "dragover").pipe(I((e) => {
1773
+ e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
1774
+ }), I((n) => {
1775
+ let r = function(e, t, n) {
1776
+ let r = t.getBoundingClientRect(), i = n ? Y.get(n) : null;
1777
+ if (!i) return e.clientY < r.top + r.height / 2 ? "before" : "after";
1778
+ let a = i.getBoundingClientRect();
1779
+ if (Math.abs(a.top - r.top) < r.height / 2) {
1780
+ let t = r.left + r.width / 2;
1781
+ return a.left > r.left ? e.clientX < t ? "before" : null : e.clientX >= t ? "after" : null;
1782
+ }
1783
+ let o = r.top + r.height / 2;
1784
+ return a.top > r.top ? e.clientY < o ? "before" : null : e.clientY >= o ? "after" : null;
1785
+ }(n, t, e);
1786
+ J.next(r ? {
1787
+ target: t,
1788
+ destinationId: this.destinationId,
1789
+ position: r
1790
+ } : null);
1791
+ }))) : (J.next(null), m)), P(this.destroy$)).subscribe();
1792
+ }
1793
+ return R;
1794
+ }
1795
+ disconnected() {
1796
+ this.destroy$.next(), this.destroy$.complete(), this.element = void 0;
1797
+ }
1798
+ reconnected() {
1799
+ this.destroy$ = new g(), this.element = void 0;
1800
+ }
1801
+ render(e) {
1802
+ return R;
1803
+ }
1804
+ }, Je = U(qe), Ye = B(class extends z {
1805
+ constructor(...e) {
1806
+ super(...e), this.element = null, this.disconnecting$ = new g();
1807
+ }
1808
+ subscribe() {
1809
+ let e = this.element;
1810
+ e && y([
1811
+ te(T(window, "resize", { passive: !0 }), window.visualViewport ? te(T(window.visualViewport, "resize", { passive: !0 }), T(window.visualViewport, "scroll", { passive: !0 })) : m, T(window, "orientationchange"), T(document, "focusout", { passive: !0 }).pipe(M(() => D(100))), u(e), e.parentElement ? u(e.parentElement) : m).pipe(ie(0, v), fe(null)),
1812
+ c.bottomOffset$,
1813
+ c.fullscreen$
1814
+ ]).pipe(A(() => {
1815
+ let e = window.visualViewport;
1816
+ return !e || Math.abs(e.scale - 1) <= .01;
1817
+ }), I(([, t, n]) => {
1818
+ let r = window.visualViewport, i = e.getBoundingClientRect(), a = e.style;
1819
+ a.boxSizing = "border-box", a.height = `${Math.max(0, (r?.height ?? window.innerHeight) - i.top)}px`, a.width = `${Math.max(0, (r?.width ?? window.innerWidth) - i.left)}px`, a.paddingBottom = `${n ? 0 : t}px`, a.minHeight = "0", a.minWidth = "0", a.overflow = "hidden";
1820
+ }), P(this.disconnecting$)).subscribe();
1821
+ }
1822
+ render() {}
1823
+ update(e) {
1824
+ if (e.type !== H.ELEMENT) throw Error("fill directive can only be used on elements");
1825
+ let t = e.element;
1826
+ this.element !== t && (this.element = t, this.subscribe());
1827
+ }
1828
+ disconnected() {
1829
+ this.disconnecting$.next(), this.element = null;
1830
+ }
1831
+ reconnected() {
1832
+ this.element && (this.disconnecting$ = new g(), this.subscribe());
1833
+ }
1834
+ }), Xe = B(class extends z {
1835
+ constructor(...e) {
1836
+ super(...e), this.state = null, this.destroy$ = new g(), this.subscriptions = new _();
1837
+ }
1838
+ render(e) {
1839
+ return L;
1840
+ }
1841
+ update(e, [t = {}]) {
1842
+ let n = e.element, { emoji: r = "", position: i = "auto", showAfter: a = 0, hideAfter: o, animation: s = "point", shimmerDuration: c = 3e3 } = t;
1843
+ return !this.state || this.state.emoji === r && this.state.position === i && this.state.showAfter === a && this.state.hideAfter === o && this.state.animation === s && this.state.shimmerDuration === c || this.cleanup(), !this.state && this.isConnected && (this.state = {
1844
+ emoji: r,
1845
+ position: i,
1846
+ showAfter: a,
1847
+ hideAfter: o,
1848
+ animation: s,
1849
+ shimmerDuration: c,
1850
+ element: n,
1851
+ activeAnimations: /* @__PURE__ */ new Set()
1852
+ }, this.destroy$ = new g(), this.subscriptions = new _(), this.scheduleShow()), L;
1853
+ }
1854
+ scheduleShow() {
1855
+ if (!this.state || !this.isConnected) return;
1856
+ let e = this.state.showAfter, t = D(e).pipe(P(this.destroy$), A(() => this.isConnected && this.state !== null), M(() => d.activeCount > 0 ? D(500).pipe(P(this.destroy$), M(() => this.waitForOverlaysClear())) : D(0))).subscribe({
1857
+ next: () => {
1858
+ this.isConnected && this.state && this.show();
1859
+ },
1860
+ error: () => {}
1861
+ });
1862
+ this.subscriptions.add(t);
1863
+ }
1864
+ waitForOverlaysClear() {
1865
+ return D(500).pipe(P(this.destroy$), M(() => this.isConnected ? d.activeCount > 0 ? this.waitForOverlaysClear() : D(0) : m));
1866
+ }
1867
+ show() {
1868
+ if (!this.state || !this.state.element || !this.isConnected) return;
1869
+ let e = this.state.element, t = window.getComputedStyle(e), n = t.position;
1870
+ this.state.originalOverflow = e.style.overflow, this.state.originalPosition = e.style.position, n === "static" && (e.style.position = "relative"), e.style.overflow = "hidden";
1871
+ let r = document.createElement("div");
1872
+ r.className = "fyi-shimmer-overlay";
1873
+ let i = t.borderRadius;
1874
+ if (Object.assign(r.style, {
1875
+ position: "absolute",
1876
+ inset: "0",
1877
+ pointerEvents: "none",
1878
+ zIndex: "9999",
1879
+ borderRadius: i,
1880
+ background: "\n linear-gradient(\n 108deg,\n transparent 0%,\n transparent 40%,\n rgba(255, 255, 255, 0.02) 44%,\n rgba(255, 255, 255, 0.06) 48%,\n rgba(255, 255, 255, 0.08) 50%,\n rgba(255, 255, 255, 0.06) 52%,\n rgba(255, 255, 255, 0.02) 56%,\n transparent 60%,\n transparent 100%\n )\n ",
1881
+ backgroundSize: "400% 100%",
1882
+ backgroundRepeat: "no-repeat"
1883
+ }), e.appendChild(r), this.state.shimmerOverlay = r, this.state.elementAnimation = r.animate([{ backgroundPosition: "100% 0" }, { backgroundPosition: "0% 0" }], {
1884
+ duration: this.state.shimmerDuration,
1885
+ easing: "linear",
1886
+ iterations: Infinity
1887
+ }), this.state.activeAnimations.add(this.state.elementAnimation), !this.state.emoji) return void this.scheduleHide();
1888
+ let a = document.createElement("div");
1889
+ a.className = "fyi-indicator", a.textContent = this.state.emoji;
1890
+ let o = this.getPositionTransform(this.state.position);
1891
+ Object.assign(a.style, {
1892
+ fontSize: "1.5rem",
1893
+ pointerEvents: "none",
1894
+ zIndex: "10001"
1895
+ }), a.style.transform = o;
1896
+ let s = this.state.element.getBoundingClientRect();
1897
+ switch (a.style.position = "fixed", this.state.position) {
1898
+ case "bottom":
1899
+ a.style.top = `${s.bottom + 2}px`, a.style.left = `${s.left + s.width / 2}px`;
1900
+ break;
1901
+ case "top":
1902
+ a.style.bottom = window.innerHeight - s.top + "px", a.style.left = `${s.left + s.width / 2}px`;
1903
+ break;
1904
+ case "left":
1905
+ a.style.right = window.innerWidth - s.left + "px", a.style.top = `${s.top + s.height / 2}px`;
1906
+ break;
1907
+ case "right":
1908
+ a.style.left = `${s.right + 12}px`, a.style.top = `${s.top + s.height / 2}px`;
1909
+ break;
1910
+ default: a.style.top = `${s.top}px`, a.style.right = window.innerWidth - s.right + "px";
1911
+ }
1912
+ document.body.appendChild(a), this.state.indicator = a;
1913
+ let c = a.animate([{
1914
+ opacity: 0,
1915
+ transform: `${o} scale(0.5)`
1916
+ }, {
1917
+ opacity: 1,
1918
+ transform: `${o} scale(1)`
1919
+ }], {
1920
+ duration: 400,
1921
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
1922
+ fill: "forwards"
1923
+ });
1924
+ this.state.activeAnimations.add(c), this.applyAnimation(c, a, o), this.scheduleHide();
1925
+ }
1926
+ applyAnimation(e, t, n) {
1927
+ if (!this.state) return;
1928
+ let r = this.state.animation, i = this.state.position;
1929
+ switch (r) {
1930
+ case "point": {
1931
+ let r = this.getPointingKeyframes(i, n), a = T(e, "finish").pipe(N(1), P(this.destroy$)).subscribe(() => {
1932
+ if (!this.state || !this.isConnected) return;
1933
+ let e = t.animate(r, {
1934
+ duration: 1800,
1935
+ easing: "ease-in-out",
1936
+ iterations: Infinity
1937
+ });
1938
+ this.state.webAnimation = e, this.state.activeAnimations.add(e);
1939
+ });
1940
+ this.subscriptions.add(a);
1941
+ break;
1942
+ }
1943
+ case "bounce": {
1944
+ let e = t.animate([
1945
+ {
1946
+ opacity: 0,
1947
+ transform: `${n} scale(0.3)`,
1948
+ offset: 0
1949
+ },
1950
+ {
1951
+ transform: `${n} scale(1.1)`,
1952
+ offset: .5
1953
+ },
1954
+ {
1955
+ transform: `${n} scale(0.95)`,
1956
+ offset: .7
1957
+ },
1958
+ {
1959
+ opacity: 1,
1960
+ transform: `${n} scale(1)`,
1961
+ offset: 1
1962
+ }
1963
+ ], {
1964
+ duration: 600,
1965
+ easing: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
1966
+ fill: "forwards"
1967
+ });
1968
+ this.state.webAnimation = e, this.state.activeAnimations.add(e);
1969
+ break;
1970
+ }
1971
+ case "pulse": {
1972
+ let r = T(e, "finish").pipe(N(1), P(this.destroy$)).subscribe(() => {
1973
+ if (!this.state || !this.isConnected) return;
1974
+ let e = t.animate([
1975
+ { transform: `${n} scale(1)` },
1976
+ { transform: `${n} scale(1.15)` },
1977
+ { transform: `${n} scale(1)` }
1978
+ ], {
1979
+ duration: 1500,
1980
+ easing: "ease-in-out",
1981
+ iterations: Infinity
1982
+ });
1983
+ this.state.webAnimation = e, this.state.activeAnimations.add(e);
1984
+ });
1985
+ this.subscriptions.add(r);
1986
+ break;
1987
+ }
1988
+ case "none": {
1989
+ let e = t.animate([{ opacity: 0 }, { opacity: 1 }], {
1990
+ duration: 300,
1991
+ easing: "ease-in",
1992
+ fill: "forwards"
1993
+ });
1994
+ this.state.webAnimation = e, this.state.activeAnimations.add(e);
1995
+ break;
1996
+ }
1997
+ }
1998
+ }
1999
+ getPointingKeyframes(e, t) {
2000
+ switch (e) {
2001
+ case "top": return [
2002
+ { transform: `${t} scale(1) translateY(0px)` },
2003
+ { transform: `${t} scale(1) translateY(8px)` },
2004
+ { transform: `${t} scale(1) translateY(0px)` }
2005
+ ];
2006
+ case "bottom": return [
2007
+ { transform: `${t} scale(1) translateY(0px)` },
2008
+ { transform: `${t} scale(1) translateY(-8px)` },
2009
+ { transform: `${t} scale(1) translateY(0px)` }
2010
+ ];
2011
+ case "left": return [
2012
+ { transform: `${t} scale(1) translateX(0px)` },
2013
+ { transform: `${t} scale(1) translateX(8px)` },
2014
+ { transform: `${t} scale(1) translateX(0px)` }
2015
+ ];
2016
+ case "right": return [
2017
+ { transform: `${t} scale(1) translateX(0px)` },
2018
+ { transform: `${t} scale(1) translateX(-8px)` },
2019
+ { transform: `${t} scale(1) translateX(0px)` }
2020
+ ];
2021
+ default: return [
2022
+ { transform: `${t} scale(1) translate(0px, 0px)` },
2023
+ { transform: `${t} scale(1) translate(-6px, 6px)` },
2024
+ { transform: `${t} scale(1) translate(0px, 0px)` }
2025
+ ];
2026
+ }
2027
+ }
2028
+ scheduleHide() {
2029
+ if (!this.state?.hideAfter || !this.isConnected) return;
2030
+ let e = D(this.state.hideAfter).pipe(P(this.destroy$)).subscribe(() => {
2031
+ this.isConnected && this.hide();
2032
+ });
2033
+ this.subscriptions.add(e);
2034
+ }
2035
+ hide() {
2036
+ if (!this.state) return;
2037
+ let e = this.state, t = [];
2038
+ if (e.indicator) {
2039
+ let n = e.indicator.animate([{ opacity: 1 }, { opacity: 0 }], {
2040
+ duration: 600,
2041
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
2042
+ fill: "forwards"
2043
+ });
2044
+ e.activeAnimations.add(n);
2045
+ let r = () => {
2046
+ e.webAnimation?.cancel(), e.indicator?.remove();
2047
+ };
2048
+ t.push(n.finished.then(r).catch(r));
2049
+ }
2050
+ if (e.shimmerOverlay) {
2051
+ let n = e.shimmerOverlay.animate([
2052
+ { opacity: 1 },
2053
+ {
2054
+ opacity: .7,
2055
+ offset: .3
2056
+ },
2057
+ {
2058
+ opacity: .3,
2059
+ offset: .7
2060
+ },
2061
+ { opacity: 0 }
2062
+ ], {
2063
+ duration: 3e3,
2064
+ easing: "ease-out",
2065
+ fill: "forwards"
2066
+ });
2067
+ e.activeAnimations.add(n);
2068
+ let r = () => {
2069
+ e.elementAnimation?.cancel(), e.shimmerOverlay?.remove();
2070
+ };
2071
+ t.push(n.finished.then(r).catch(r));
2072
+ }
2073
+ Promise.all(t).then(() => {
2074
+ this.state === e && (this.restoreStyles(e), this.state = null);
2075
+ });
2076
+ }
2077
+ restoreStyles(e) {
2078
+ e.element && (e.originalOverflow !== void 0 && (e.element.style.overflow = e.originalOverflow), e.originalPosition !== void 0 && (e.element.style.position = e.originalPosition));
2079
+ }
2080
+ getPositionTransform(e) {
2081
+ switch (e) {
2082
+ case "top":
2083
+ case "bottom": return "translateX(-50%)";
2084
+ case "left":
2085
+ case "right": return "translateY(-50%)";
2086
+ default: return "";
2087
+ }
2088
+ }
2089
+ cleanup() {
2090
+ this.destroy$.next(), this.destroy$.complete(), this.subscriptions.unsubscribe(), this.state &&= (this.state.activeAnimations.forEach((e) => e.cancel()), this.state.activeAnimations.clear(), this.restoreStyles(this.state), this.state.shimmerOverlay?.remove(), this.state.indicator?.remove(), null);
2091
+ }
2092
+ disconnected() {
2093
+ this.cleanup();
2094
+ }
2095
+ reconnected() {
2096
+ this.destroy$ = new g(), this.subscriptions = new _();
2097
+ }
2098
+ }), Ze = U(class extends z {
2099
+ constructor(...e) {
2100
+ super(...e), this.hasAnimated = !1;
2101
+ }
2102
+ render(e) {}
2103
+ update(e, [t]) {
2104
+ if (e.type !== H.ELEMENT) throw Error("gravity directive must be used on an element");
2105
+ if (this.element = e.element, this.options = t, this.hasAnimated) return;
2106
+ if (o.value) return void (this.hasAnimated = !0);
2107
+ let n = Math.max(.3, Math.min(3, t?.mass ?? 1)), r = t?.distance ?? 30, i = (t?.delay ?? 0) + (t?.stagger ?? 0);
2108
+ this.animate(n, r, i), this.hasAnimated = !0;
2109
+ }
2110
+ reconnected() {
2111
+ if (this.hasAnimated = !1, this.options && !o.value) {
2112
+ let e = Math.max(.3, Math.min(3, this.options.mass ?? 1)), t = this.options.distance ?? 30, n = (this.options.delay ?? 0) + (this.options.stagger ?? 0);
2113
+ this.animate(e, t, n), this.hasAnimated = !0;
2114
+ }
2115
+ }
2116
+ animate(e, t, r) {
2117
+ let a = e < .7 ? i : n, o = a.duration * (1 / Math.sqrt(e)), s = 1 / e * t;
2118
+ this.animation?.cancel(), this.element.style.willChange = "transform, opacity", this.animation = this.element.animate([{
2119
+ opacity: 0,
2120
+ transform: `translateY(-${s}px)`
2121
+ }, {
2122
+ opacity: 1,
2123
+ transform: "translateY(0)"
2124
+ }], {
2125
+ duration: o,
2126
+ delay: r,
2127
+ easing: a.easingFallback,
2128
+ fill: "backwards"
2129
+ }), w(this.animation.finished).pipe(N(1), I(() => {
2130
+ this.element.style.willChange = "", this.animation = void 0;
2131
+ }), O(() => m)).subscribe();
2132
+ }
2133
+ disconnected() {
2134
+ this.animation?.cancel(), this.animation = void 0;
2135
+ }
2136
+ }), Qe = 600, $e = !1, Q = {
2137
+ hAlpha: "rgba(200, 50, 100, 0.85)",
2138
+ hAlphaDim: "rgba(150, 30, 80, 0.5)",
2139
+ oiii: "rgba(40, 180, 180, 0.7)",
2140
+ oiiiDim: "rgba(30, 140, 150, 0.35)",
2141
+ stellar: "rgba(255, 230, 240, 0.9)",
2142
+ stellarDim: "rgba(255, 180, 200, 0.4)",
2143
+ deepPurple: "rgba(80, 40, 120, 0.6)",
2144
+ deepBlue: "rgba(20, 40, 100, 0.5)",
2145
+ voidBlack: "rgba(0, 0, 0, 1)",
2146
+ singularity: "rgba(10, 5, 20, 1)"
2147
+ }, et = (e) => `<svg viewBox="0 0 24 24" width="24" height="24" style="overflow:visible">\n\t<defs>\n\t\t<radialGradient id="glow">\n\t\t\t<stop offset="0%" stop-color="${e}" stop-opacity="1"/>\n\t\t\t<stop offset="50%" stop-color="${e}" stop-opacity="0.4"/>\n\t\t\t<stop offset="100%" stop-color="${e}" stop-opacity="0"/>\n\t\t</radialGradient>\n\t</defs>\n\n\t\x3c!-- Outer glow --\x3e\n\t<circle cx="12" cy="12" r="10" fill="url(#glow)"/>\n\n\t\x3c!-- Core --\x3e\n\t<circle cx="12" cy="12" r="4" fill="${e}"/>\n\n\t\x3c!-- Bright center --\x3e\n\t<circle cx="12" cy="12" r="2" fill="white" opacity="0.9"/>\n</svg>`;
2148
+ function tt(e, t) {
2149
+ return `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t})`;
2150
+ }
2151
+ var nt = B(class extends z {
2152
+ constructor(...e) {
2153
+ super(...e), this.state$ = new p("idle"), this.destroyed$ = new p(!1), this.visible$ = new p(!0), this.bird = null, this.blackHole = null, this.particles = [], this.trailCanvas = null, this.trailCtx = null, this.lastTrailPos = null, this.rafId = 0, this.context = null, this.element = null, this.options = {}, this.hasHome = !1, this.currentColor = "", this.shimmerOverlay = null, this.shimmerAnimation = null, this.pulseRings = [], this.homeElement = null, this.accretionDisks = [], this.lensingRing = null, this.eventHorizon = null;
2154
+ }
2155
+ toHostRelative(e, t) {
2156
+ if (!this.element) return {
2157
+ x: e,
2158
+ y: t
2159
+ };
2160
+ let n = this.element.getBoundingClientRect();
2161
+ return {
2162
+ x: e - n.left + this.element.scrollLeft,
2163
+ y: t - n.top + this.element.scrollTop
2164
+ };
2165
+ }
2166
+ render(e) {
2167
+ return L;
2168
+ }
2169
+ update(e, [t = !0]) {
2170
+ let n = e.element, r = typeof t == "object" ? t : {};
2171
+ return (typeof t == "boolean" ? t : !1 !== r.playing) ? (this.bird || (this.destroyed$.value && (this.destroyed$.next(!1), this.state$.next("idle")), this.element = n, this.options = r, window.getComputedStyle(n).position === "static" && (n.style.position = "relative"), n.style.overflow = "visible", function() {
2172
+ if ($e) return;
2173
+ $e = !0;
2174
+ let e = document.createElement("style");
2175
+ e.id = "hb-keyframes", e.textContent = "\n @keyframes hb-wing {\n 0% { transform: scaleY(0.85); opacity: 0.4; }\n 100% { transform: scaleY(1.15); opacity: 0.6; }\n }\n @keyframes hb-disk-inner {\n to { transform: translate(-50%, -50%) rotateX(75deg) rotate(360deg); }\n }\n @keyframes hb-disk-outer {\n to { transform: translate(-50%, -50%) rotateX(70deg) rotate(-360deg); }\n }\n @keyframes hb-disk-mid {\n to { transform: translate(-50%, -50%) rotateX(72deg) rotate(180deg); }\n }\n @keyframes hb-bh-in {\n 0% { transform: translate(-50%, -50%) scale(0); }\n 60% { transform: translate(-50%, -50%) scale(1.1); }\n 100% { transform: translate(-50%, -50%) scale(1); }\n }\n @keyframes hb-horizon-pulse {\n 0%, 100% { box-shadow: 0 0 20px 6px var(--hb-color), 0 0 40px 12px var(--hb-color-dim); }\n 50% { box-shadow: 0 0 30px 10px var(--hb-color), 0 0 60px 20px var(--hb-color-dim); }\n }\n @keyframes hb-lensing {\n 0% { transform: translate(-50%, -50%) rotateX(85deg) scale(1); opacity: 0.6; }\n 50% { transform: translate(-50%, -50%) rotateX(85deg) scale(1.05); opacity: 0.8; }\n 100% { transform: translate(-50%, -50%) rotateX(85deg) scale(1); opacity: 0.6; }\n }\n @keyframes hb-particle-orbit {\n 0% { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg) scale(1); opacity: 0.9; }\n 100% { transform: rotate(720deg) translateX(0px) rotate(-720deg) scale(0); opacity: 0; }\n }\n @keyframes hb-ripple {\n 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }\n 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }\n }\n ", document.head.appendChild(e);
2176
+ }(), this.initStateMachine()), L) : (this.fadeOutAndCleanup(), L);
2177
+ }
2178
+ initStateMachine() {
2179
+ this.state$.pipe(k(), A(() => !this.destroyed$.value), M((e) => this.handleStateTransition(e)), P(this.destroyed$.pipe(A((e) => e)))).subscribe(), y([
2180
+ new h((e) => {
2181
+ if (!this.element || typeof IntersectionObserver > "u") return void e.next(!0);
2182
+ let t = new IntersectionObserver((t) => e.next(t[0].isIntersecting), { threshold: 0 });
2183
+ return t.observe(this.element), () => t.disconnect();
2184
+ }),
2185
+ T(document, "visibilitychange").pipe(j(() => document.visibilityState === "visible"), fe(document.visibilityState === "visible")),
2186
+ new h((e) => {
2187
+ if (!this.element) return void e.next(!0);
2188
+ let t = this.element, n = null;
2189
+ for (; t;) {
2190
+ if ("playing" in t) {
2191
+ n = t;
2192
+ break;
2193
+ }
2194
+ t = t.parentElement;
2195
+ }
2196
+ if (!n) return void e.next(!0);
2197
+ e.next(n.playing);
2198
+ let r = new MutationObserver(() => {
2199
+ e.next(n.playing);
2200
+ });
2201
+ return r.observe(n, {
2202
+ attributes: !0,
2203
+ attributeFilter: ["playing"]
2204
+ }), () => r.disconnect();
2205
+ })
2206
+ ]).pipe(j(([e, t, n]) => e && t && n), k(), I((e) => this.visible$.next(e)), A(() => !this.destroyed$.value && !!this.context), P(this.destroyed$.pipe(A((e) => e)))).subscribe((e) => {
2207
+ e && !this.rafId ? this.startAnimationLoop() : !e && this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = 0);
2208
+ }), T(window, "resize").pipe(ae(100), A(() => !this.destroyed$.value && !!this.context), P(this.destroyed$.pipe(A((e) => e)))).subscribe(() => this.updateDestinationPositions()), D(this.options.delay ?? 500).pipe(A(() => !this.destroyed$.value && !this.bird), M(() => new h((e) => {
2209
+ if (!this.element) return e.next(), void e.complete();
2210
+ let t = () => {
2211
+ this.isElementVisible(this.element) ? (e.next(), e.complete()) : D(50).pipe(P(this.destroyed$.pipe(A((e) => e)))).subscribe(t);
2212
+ };
2213
+ t();
2214
+ })), M(() => this.createBird()), I(() => {
2215
+ this.destroyed$.value || this.state$.next("flying");
2216
+ }), P(this.destroyed$.pipe(A((e) => e)))).subscribe();
2217
+ }
2218
+ handleStateTransition(e) {
2219
+ switch (e) {
2220
+ case "idle":
2221
+ default: return m;
2222
+ case "flying":
2223
+ case "hovering":
2224
+ case "spiraling":
2225
+ case "absorbed": return this.startAnimationLoop(), m;
2226
+ case "done": return this.cleanup(), this.element?.dispatchEvent(new CustomEvent("hummingbird-complete", {
2227
+ bubbles: !0,
2228
+ composed: !0
2229
+ })), m;
2230
+ }
2231
+ }
2232
+ async createBird() {
2233
+ if (!this.element) return;
2234
+ let e = document.createElement("div");
2235
+ e.innerHTML = et(this.currentColor), e.className = "pointer-events-none", e.style.cssText = "\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n height: 24px;\n z-index: 99999;\n will-change: transform, opacity;\n transform-origin: center center;\n transition: opacity 400ms ease-out;\n ", this.element.appendChild(e), this.bird = e, this.discoverInitialColor();
2236
+ let t = this.element.getBoundingClientRect(), n = this.toHostRelative(t.left, t.top), r = await this.discoverWaypoints(this.options.waypoints || []), i = this.options.home ? await this.getPosition(this.options.home) : null, a = [...r];
2237
+ this.hasHome = !!i, i && a.push(i), a.length === 0 && a.push({
2238
+ x: n.x + t.width + 60,
2239
+ y: n.y + .5 * t.height,
2240
+ duration: Qe
2241
+ });
2242
+ let o = n.x - 60, s = n.y + t.height / 2;
2243
+ this.context = {
2244
+ state: "flying",
2245
+ cx: o,
2246
+ cy: s,
2247
+ flightStartX: o,
2248
+ flightStartY: s,
2249
+ phaseStart: performance.now(),
2250
+ destIdx: 0,
2251
+ destinations: a,
2252
+ bx: 0,
2253
+ by: 0
2254
+ }, this.bird.style.transform = `translate(${o - 12}px, ${s - 12}px)`;
2255
+ }
2256
+ discoverInitialColor() {
2257
+ this.element && (T(window, l).pipe(N(1), P(D(150)), j((e) => e.detail.theme?.color), A((e) => !!e && e !== this.currentColor), P(this.destroyed$.pipe(A((e) => e)))).subscribe((e) => {
2258
+ this.bird && (this.currentColor = e, this.bird.innerHTML = et(e));
2259
+ }), this.element.dispatchEvent(new CustomEvent(s, {
2260
+ bubbles: !0,
2261
+ composed: !0
2262
+ })));
2263
+ }
2264
+ updateBirdColor() {
2265
+ if (!this.bird || !this.context || this.destroyed$.value) return;
2266
+ let e = this.context.destinations[this.context.destIdx];
2267
+ e?.element && (T(window, l).pipe(N(1), P(D(100)), j((e) => e.detail.theme?.color), A((e) => !!e && e !== this.currentColor), P(this.destroyed$.pipe(A((e) => e)))).subscribe((e) => {
2268
+ this.bird && (this.currentColor = e, this.bird.innerHTML = et(e));
2269
+ }), e.element.dispatchEvent(new CustomEvent(s, {
2270
+ bubbles: !0,
2271
+ composed: !0
2272
+ })));
2273
+ }
2274
+ discoverWaypoints(e) {
2275
+ if (e.length === 0) return Promise.resolve([]);
2276
+ let t = e.map((e) => typeof e == "string" || e instanceof HTMLElement ? {
2277
+ ref: e,
2278
+ duration: Qe
2279
+ } : {
2280
+ ref: e.ref,
2281
+ duration: e.duration ?? Qe
2282
+ }), n = t.map((e) => this.discoverElement(e.ref));
2283
+ return new Promise((e) => {
2284
+ ee(n).pipe(j((e) => e.map((e, n) => {
2285
+ if (!e) return null;
2286
+ let r = e.getBoundingClientRect(), i = this.toHostRelative(r.left + r.width / 2, r.top + r.height / 2);
2287
+ return {
2288
+ x: i.x,
2289
+ y: i.y,
2290
+ element: e,
2291
+ duration: t[n].duration
2292
+ };
2293
+ }).filter((e) => e !== null)), P(this.destroyed$.pipe(A((e) => e)))).subscribe({
2294
+ next: (t) => e(t),
2295
+ error: () => e([])
2296
+ });
2297
+ });
2298
+ }
2299
+ discoverElement(e) {
2300
+ return e instanceof HTMLElement ? Promise.resolve(e) : new Promise((t) => {
2301
+ f(e, 300).pipe(P(this.destroyed$.pipe(A((e) => e)))).subscribe({
2302
+ next: (e) => t(e),
2303
+ error: () => t(null)
2304
+ });
2305
+ });
2306
+ }
2307
+ async getPosition(e) {
2308
+ let t = await this.discoverElement(e);
2309
+ if (!t) return null;
2310
+ let n = t.getBoundingClientRect(), r = this.toHostRelative(n.left + n.width / 2, n.top + n.height / 2);
2311
+ return {
2312
+ x: r.x,
2313
+ y: r.y,
2314
+ element: t,
2315
+ duration: Qe
2316
+ };
2317
+ }
2318
+ updateDestinationPositions() {
2319
+ if (this.context) {
2320
+ for (let e of this.context.destinations) if (e.element) {
2321
+ let t = e.element.getBoundingClientRect(), n = this.toHostRelative(t.left + t.width / 2, t.top + t.height / 2);
2322
+ e.x = n.x, e.y = n.y;
2323
+ }
2324
+ }
2325
+ }
2326
+ startAnimationLoop() {
2327
+ if (this.rafId) return;
2328
+ let e = (t) => {
2329
+ if (this.bird && this.context && !this.destroyed$.value && this.visible$.value) {
2330
+ switch (this.state$.value) {
2331
+ case "flying":
2332
+ this.tickFlying(t);
2333
+ break;
2334
+ case "hovering":
2335
+ this.tickHovering(t);
2336
+ break;
2337
+ case "spiraling":
2338
+ this.tickSpiraling(t);
2339
+ break;
2340
+ case "absorbed":
2341
+ this.tickAbsorbed(t);
2342
+ return;
2343
+ }
2344
+ this.rafId = requestAnimationFrame(e);
2345
+ } else this.rafId = 0;
2346
+ };
2347
+ this.rafId = requestAnimationFrame(e);
2348
+ }
2349
+ tickFlying(e) {
2350
+ if (!this.context || !this.bird) return;
2351
+ let t = this.context, n = e - t.phaseStart, r = t.destinations[t.destIdx], i = r.x - t.flightStartX, a = r.y - t.flightStartY, o = Math.hypot(i, a) / 200 * 1e3, s = Math.min(1, n / o), c = s < .5 ? 4 * s * s * s : 1 - (-2 * s + 2) ** 3 / 2;
2352
+ t.cx = t.flightStartX + i * c, t.cy = t.flightStartY + a * c, this.bird.style.transform = `translate(${t.cx - 12}px, ${t.cy - 12}px)`, this.options.showConnections && (this.drawTrail(t.cx, t.cy), this.fadeTrail()), Math.floor(n / 200) !== Math.floor((n - 16) / 200) && this.updateBirdColor(), s >= 1 && (t.destIdx >= t.destinations.length - 1 && this.hasHome ? (t.bx = r.x, t.by = r.y, t.phaseStart = e, this.createBlackHole(t.bx, t.by), this.state$.next("spiraling")) : (t.phaseStart = e, this.state$.next("hovering")));
2353
+ }
2354
+ tickHovering(e) {
2355
+ if (!this.context || !this.bird) return;
2356
+ let t = this.context, n = e - t.phaseStart, r = t.destinations[t.destIdx];
2357
+ n < 20 && r.element && !this.shimmerOverlay && (this.showShimmer(r.element), this.showPulseRings(r.x, r.y), this.bird.style.opacity = "0"), t.cx = r.x, t.cy = r.y;
2358
+ let i = 1 + .08 * Math.sin(.006 * n);
2359
+ if (this.bird.style.transform = `translate(${r.x - 12}px, ${r.y - 12}px) scale(${i})`, n > r.duration) {
2360
+ let n = t.destinations[t.destIdx + 1];
2361
+ if (!n && !this.hasHome) return this.hideShimmer(), void this.fadeOutBird();
2362
+ if (n?.element && !this.isElementVisible(n.element)) return;
2363
+ if (n?.element && !this.isInViewport(n.element) && n.element.scrollIntoView({
2364
+ behavior: "smooth",
2365
+ block: "center",
2366
+ inline: "center"
2367
+ }), n?.element) {
2368
+ let e = n.element.getBoundingClientRect(), t = this.toHostRelative(e.left + e.width / 2, e.top + e.height / 2);
2369
+ n.x = t.x, n.y = t.y;
2370
+ }
2371
+ this.bird.style.opacity = "1", this.hideShimmer(), this.resetTrail(), t.destIdx++, t.flightStartX = r.x, t.flightStartY = r.y, t.phaseStart = e, this.state$.next("flying");
2372
+ }
2373
+ }
2374
+ isElementVisible(e) {
2375
+ let t = window.getComputedStyle(e);
2376
+ return parseFloat(t.opacity) > .5 && t.visibility !== "hidden" && t.display !== "none";
2377
+ }
2378
+ isInViewport(e) {
2379
+ let t = e.getBoundingClientRect();
2380
+ return t.bottom > 80 && t.top < window.innerHeight - 80 && t.right > 80 && t.left < window.innerWidth - 80;
2381
+ }
2382
+ showShimmer(e) {
2383
+ let t = window.getComputedStyle(e);
2384
+ t.position === "static" && (e.style.position = "relative");
2385
+ let n = document.createElement("div");
2386
+ n.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\tinset: 0;\n\t\t\tpointer-events: none;\n\t\t\tz-index: 9999;\n\t\t\tborder-radius: ${t.borderRadius};\n\t\t\tbackground: linear-gradient(\n\t\t\t\t108deg,\n\t\t\t\ttransparent 0%,\n\t\t\t\ttransparent 30%,\n\t\t\t\trgba(255, 255, 255, 0.02) 38%,\n\t\t\t\trgba(255, 255, 255, 0.06) 45%,\n\t\t\t\trgba(255, 255, 255, 0.08) 50%,\n\t\t\t\trgba(255, 255, 255, 0.06) 55%,\n\t\t\t\trgba(255, 255, 255, 0.02) 62%,\n\t\t\t\ttransparent 70%,\n\t\t\t\ttransparent 100%\n\t\t\t);\n\t\t\tbackground-size: 300% 100%;\n\t\t`, e.appendChild(n), this.shimmerOverlay = n, this.shimmerAnimation = n.animate([{ backgroundPosition: "300% 0" }, { backgroundPosition: "-100% 0" }], {
2387
+ duration: 1e4,
2388
+ easing: "cubic-bezier(0.25, 0.1, 0.25, 1)",
2389
+ iterations: Infinity
2390
+ });
2391
+ }
2392
+ hideShimmer() {
2393
+ if (this.shimmerAnimation &&= (this.shimmerAnimation.cancel(), null), this.shimmerOverlay) {
2394
+ let e = this.shimmerOverlay.animate([{ opacity: 1 }, { opacity: 0 }], {
2395
+ duration: 300,
2396
+ easing: "ease-out",
2397
+ fill: "forwards"
2398
+ }), t = this.shimmerOverlay;
2399
+ e.onfinish = () => t.remove(), this.shimmerOverlay = null;
2400
+ }
2401
+ }
2402
+ fadeOutBird() {
2403
+ this.bird && (this.state$.next("idle"), this.bird.style.opacity = "1", this.bird.animate([{
2404
+ opacity: 1,
2405
+ transform: this.bird.style.transform
2406
+ }, {
2407
+ opacity: 0,
2408
+ transform: this.bird.style.transform
2409
+ }], {
2410
+ duration: 400,
2411
+ easing: "ease-out",
2412
+ fill: "forwards"
2413
+ }).onfinish = () => {
2414
+ this.state$.next("done");
2415
+ });
2416
+ }
2417
+ fadeOutAndCleanup() {
2418
+ if (!this.bird) return void this.cleanup();
2419
+ this.rafId &&= (cancelAnimationFrame(this.rafId), 0), this.bird.style.opacity = "1";
2420
+ let e = this.bird.animate([
2421
+ { opacity: 1 },
2422
+ {
2423
+ opacity: .8,
2424
+ offset: .3
2425
+ },
2426
+ {
2427
+ opacity: .5,
2428
+ offset: .6
2429
+ },
2430
+ {
2431
+ opacity: .2,
2432
+ offset: .85
2433
+ },
2434
+ { opacity: 0 }
2435
+ ], {
2436
+ duration: 3e3,
2437
+ easing: "linear",
2438
+ fill: "forwards"
2439
+ });
2440
+ this.trailCanvas && this.trailCanvas.animate([{ opacity: 1 }, { opacity: 0 }], {
2441
+ duration: 3500,
2442
+ easing: "ease-out",
2443
+ fill: "forwards"
2444
+ }), this.hideShimmer(), e.onfinish = () => {
2445
+ this.cleanup();
2446
+ };
2447
+ }
2448
+ showPulseRings(e, t) {
2449
+ let n = this.currentColor;
2450
+ for (let r = 0; r < 3; r++) {
2451
+ let i = document.createElement("div");
2452
+ i.className = "pointer-events-none", i.style.cssText = `\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: ${e}px;\n\t\t\t\ttop: ${t}px;\n\t\t\t\twidth: 40px;\n\t\t\t\theight: 40px;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tborder: 2px solid ${tt(n, .5)};\n\t\t\t\ttransform: translate(-50%, -50%) scale(1);\n\t\t\t\tz-index: 9998;\n\t\t\t\twill-change: transform, opacity;\n\t\t\t`, this.element?.appendChild(i), this.pulseRings.push(i), i.animate([{
2453
+ transform: "translate(-50%, -50%) scale(1)",
2454
+ opacity: .6
2455
+ }, {
2456
+ transform: "translate(-50%, -50%) scale(4)",
2457
+ opacity: 0
2458
+ }], {
2459
+ duration: 1200,
2460
+ delay: 300 * r,
2461
+ easing: "ease-out",
2462
+ fill: "forwards"
2463
+ }).onfinish = () => i.remove();
2464
+ }
2465
+ D(1800).pipe(P(this.destroyed$.pipe(A((e) => e)))).subscribe(() => {
2466
+ this.pulseRings = [];
2467
+ });
2468
+ }
2469
+ tickSpiraling(e) {
2470
+ if (!this.context || !this.bird) return;
2471
+ let t = this.context, n = e - t.phaseStart, r = t.bx - t.cx, i = t.by - t.cy, a = Math.hypot(r, i);
2472
+ if (a > 8) {
2473
+ let e = 180 * (1 - a / 150) ** 2 + 40, o = Math.min(e, .15 * a), s = Math.atan2(i, r), c = .015 * Math.min(1, a / 60), l = .012 * n, u = Math.sin(l) * a * c;
2474
+ t.cx += Math.cos(s) * o * .016 + Math.cos(s + Math.PI / 2) * u, t.cy += Math.sin(s) * o * .016 + Math.sin(s + Math.PI / 2) * u;
2475
+ let d = Math.max(.2, a / 120), f = .3 * n;
2476
+ this.bird.style.transform = `translate(${t.cx - 12}px, ${t.cy - 12}px) rotate(${f}deg) scale(${d})`;
2477
+ let p = 1 - a / 100;
2478
+ p > .3 && (this.bird.style.filter = `brightness(${1 + .5 * p}) drop-shadow(0 0 ${8 * p}px ${this.currentColor})`);
2479
+ } else t.phaseStart = e, this.startHostDistortion(), this.state$.next("absorbed");
2480
+ }
2481
+ startHostDistortion() {
2482
+ if (!this.context) return;
2483
+ let e = this.context.destinations[this.context.destinations.length - 1];
2484
+ if (!e?.element) return;
2485
+ this.homeElement = e.element;
2486
+ let t = this.homeElement, n = this.currentColor, r = t.style.transform || "";
2487
+ t.animate([
2488
+ {
2489
+ transform: `${r} translate(0, 0) scale(1) rotate(0deg)`,
2490
+ filter: "brightness(1)"
2491
+ },
2492
+ {
2493
+ transform: `${r} translate(-2px, 1px) scale(0.992) rotate(-0.3deg)`,
2494
+ filter: "brightness(1.05)",
2495
+ offset: .05
2496
+ },
2497
+ {
2498
+ transform: `${r} translate(3px, -1px) scale(1.005) rotate(0.4deg)`,
2499
+ filter: "brightness(1.1)",
2500
+ offset: .1
2501
+ },
2502
+ {
2503
+ transform: `${r} translate(-1px, 2px) scale(0.995) rotate(-0.2deg)`,
2504
+ filter: `brightness(1.15) drop-shadow(0 0 5px ${n})`,
2505
+ offset: .15
2506
+ },
2507
+ {
2508
+ transform: `${r} translate(2px, 0px) scale(1.008) rotate(0.5deg)`,
2509
+ filter: "brightness(1.2)",
2510
+ offset: .2
2511
+ },
2512
+ {
2513
+ transform: `${r} translate(-3px, -2px) scale(0.988) rotate(-0.6deg)`,
2514
+ filter: `brightness(1.25) drop-shadow(0 0 8px ${n})`,
2515
+ offset: .25
2516
+ },
2517
+ {
2518
+ transform: `${r} translate(1px, 3px) scale(1.01) rotate(0.3deg)`,
2519
+ filter: "brightness(1.3)",
2520
+ offset: .3
2521
+ },
2522
+ {
2523
+ transform: `${r} translate(-2px, -1px) scale(0.985) rotate(-0.4deg)`,
2524
+ filter: `brightness(1.35) drop-shadow(0 0 12px ${n})`,
2525
+ offset: .35
2526
+ },
2527
+ {
2528
+ transform: `${r} translate(4px, 1px) scale(1.015) rotate(0.7deg)`,
2529
+ filter: "brightness(1.4)",
2530
+ offset: .4
2531
+ },
2532
+ {
2533
+ transform: `${r} translate(-1px, 2px) scale(0.99) rotate(-0.5deg)`,
2534
+ filter: `brightness(1.35) drop-shadow(0 0 15px ${n})`,
2535
+ offset: .45
2536
+ },
2537
+ {
2538
+ transform: `${r} translate(2px, -2px) scale(1.012) rotate(0.4deg)`,
2539
+ filter: "brightness(1.3)",
2540
+ offset: .5
2541
+ },
2542
+ {
2543
+ transform: `${r} translate(-3px, 1px) scale(0.993) rotate(-0.3deg)`,
2544
+ filter: `brightness(1.25) drop-shadow(0 0 10px ${n})`,
2545
+ offset: .55
2546
+ },
2547
+ {
2548
+ transform: `${r} translate(1px, -1px) scale(1.006) rotate(0.2deg)`,
2549
+ filter: "brightness(1.2)",
2550
+ offset: .6
2551
+ },
2552
+ {
2553
+ transform: `${r} translate(-1px, 1px) scale(0.997) rotate(-0.15deg)`,
2554
+ filter: "brightness(1.15)",
2555
+ offset: .7
2556
+ },
2557
+ {
2558
+ transform: `${r} translate(1px, 0px) scale(1.003) rotate(0.1deg)`,
2559
+ filter: "brightness(1.1)",
2560
+ offset: .8
2561
+ },
2562
+ {
2563
+ transform: `${r} translate(0px, -1px) scale(0.999) rotate(-0.05deg)`,
2564
+ filter: "brightness(1.05)",
2565
+ offset: .9
2566
+ },
2567
+ {
2568
+ transform: `${r} translate(0, 0) scale(1) rotate(0deg)`,
2569
+ filter: "brightness(1)"
2570
+ }
2571
+ ], {
2572
+ duration: 500,
2573
+ easing: "linear"
2574
+ });
2575
+ }
2576
+ tickAbsorbed(e) {
2577
+ if (!this.context || !this.bird) return;
2578
+ let t = this.context, n = e - t.phaseStart, r = Math.min(1, n / 500), i = r * r * r, a = .2 * (1 - .9 * i), o = .2 * (1 - i) * (1 + 2 * i), s = r * r * 1080;
2579
+ this.bird.style.transform = `translate(${t.bx - 12}px, ${t.by - 12}px) rotate(${s}deg) scale(${a}, ${o})`, this.bird.style.opacity = String(Math.max(0, 1 - 1.2 * i)), this.bird.style.filter = `brightness(${1 + 3 * i}) blur(${2 * i}px)`, r >= 1 ? this.collapseBlackHole() : this.rafId = requestAnimationFrame((e) => this.tickAbsorbed(e));
2580
+ }
2581
+ createBlackHole(e, t) {
2582
+ let n = this.currentColor, r = document.createElement("div");
2583
+ r.className = "pointer-events-none", r.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\tleft: ${e}px;\n\t\t\ttop: ${t}px;\n\t\t\twidth: 100px;\n\t\t\theight: 100px;\n\t\t\tborder-radius: 9999px;\n\t\t\tborder: 1px solid ${Q.oiiiDim};\n\t\t\tbackground: radial-gradient(circle, transparent 40%, ${Q.deepPurple} 70%, transparent 100%);\n\t\t\tbox-shadow:\n\t\t\t\tinset 0 0 25px ${Q.oiiiDim},\n\t\t\t\t0 0 40px ${Q.deepPurple},\n\t\t\t\t0 0 60px ${tt(n, .15)};\n\t\t\ttransform: translate(-50%, -50%) rotateX(85deg) scale(0);\n\t\t\tz-index: 9994;\n\t\t\twill-change: transform, opacity;\n\t\t\tanimation: hb-lensing 2s ease-in-out infinite;\n\t\t`, r.animate([{ transform: "translate(-50%, -50%) rotateX(85deg) scale(0)" }, { transform: "translate(-50%, -50%) rotateX(85deg) scale(1)" }], {
2584
+ duration: 600,
2585
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
2586
+ fill: "forwards"
2587
+ }), this.element?.appendChild(r), this.lensingRing = r, [
2588
+ {
2589
+ size: 85,
2590
+ speed: 4,
2591
+ color1: Q.oiii,
2592
+ color2: Q.deepBlue,
2593
+ rotateX: 68,
2594
+ reverse: !0
2595
+ },
2596
+ {
2597
+ size: 68,
2598
+ speed: 2.5,
2599
+ color1: Q.hAlpha,
2600
+ color2: Q.hAlphaDim,
2601
+ rotateX: 72,
2602
+ reverse: !1
2603
+ },
2604
+ {
2605
+ size: 52,
2606
+ speed: 1.8,
2607
+ color1: Q.stellar,
2608
+ color2: Q.stellarDim,
2609
+ rotateX: 76,
2610
+ reverse: !0
2611
+ }
2612
+ ].forEach((n, r) => {
2613
+ let i = document.createElement("div");
2614
+ i.className = "pointer-events-none";
2615
+ let a = n.reverse ? "-" : "";
2616
+ i.style.cssText = `\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: ${e}px;\n\t\t\t\ttop: ${t}px;\n\t\t\t\twidth: ${n.size}px;\n\t\t\t\theight: ${n.size}px;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tbackground: conic-gradient(\n\t\t\t\t\tfrom ${45 * r}deg,\n\t\t\t\t\ttransparent 0%,\n\t\t\t\t\t${n.color1} 15%,\n\t\t\t\t\t${n.color2} 35%,\n\t\t\t\t\ttransparent 50%,\n\t\t\t\t\t${n.color1} 65%,\n\t\t\t\t\t${n.color2} 85%,\n\t\t\t\t\ttransparent 100%\n\t\t\t\t);\n\t\t\t\ttransform: translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(0);\n\t\t\t\tz-index: ${9995 + r};\n\t\t\t\twill-change: transform;\n\t\t\t\tfilter: blur(${.3 * r}px);\n\t\t\t\tmix-blend-mode: screen;\n\t\t\t`, i.animate([{ transform: `translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(0) rotate(0deg)` }, { transform: `translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(1) rotate(0deg)` }], {
2617
+ duration: 400 + 100 * r,
2618
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
2619
+ fill: "forwards"
2620
+ }).onfinish = () => {
2621
+ i.style.transform = `translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(1)`, i.animate([{ transform: `translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(1) rotate(0deg)` }, { transform: `translate(-50%, -50%) rotateX(${n.rotateX}deg) scale(1) rotate(${a}360deg)` }], {
2622
+ duration: 1e3 * n.speed,
2623
+ easing: "linear",
2624
+ iterations: Infinity
2625
+ });
2626
+ }, this.element?.appendChild(i), this.accretionDisks.push(i);
2627
+ });
2628
+ let i = document.createElement("div");
2629
+ i.className = "pointer-events-none", i.style.cssText = `\n\t\t\t--hb-color: ${Q.hAlpha};\n\t\t\t--hb-color-dim: ${Q.oiiiDim};\n\t\t\tposition: absolute;\n\t\t\tleft: ${e}px;\n\t\t\ttop: ${t}px;\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tborder-radius: 9999px;\n\t\t\tbackground: radial-gradient(circle,\n\t\t\t\t${Q.singularity} 0%,\n\t\t\t\t${Q.voidBlack} 40%,\n\t\t\t\t${Q.deepPurple} 60%,\n\t\t\t\t${Q.hAlphaDim} 75%,\n\t\t\t\ttransparent 100%\n\t\t\t);\n\t\t\tbox-shadow:\n\t\t\t\t0 0 15px 4px ${Q.hAlpha},\n\t\t\t\t0 0 30px 8px ${Q.oiiiDim},\n\t\t\t\t0 0 50px 15px ${Q.deepPurple},\n\t\t\t\tinset 0 0 15px ${Q.voidBlack};\n\t\t\ttransform: translate(-50%, -50%) scale(0);\n\t\t\tz-index: 9999;\n\t\t\twill-change: transform, box-shadow;\n\t\t\tanimation: hb-horizon-pulse 1.5s ease-in-out infinite;\n\t\t`, i.animate([
2630
+ { transform: "translate(-50%, -50%) scale(0)" },
2631
+ {
2632
+ transform: "translate(-50%, -50%) scale(1.15)",
2633
+ offset: .6
2634
+ },
2635
+ { transform: "translate(-50%, -50%) scale(1)" }
2636
+ ], {
2637
+ duration: 500,
2638
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
2639
+ fill: "forwards"
2640
+ }), this.element?.appendChild(i), this.eventHorizon = i, this.blackHole = i, this.addParticles(e, t);
2641
+ }
2642
+ addParticles(e, t) {
2643
+ let n = [
2644
+ {
2645
+ bg: Q.hAlpha,
2646
+ glow: Q.hAlphaDim
2647
+ },
2648
+ {
2649
+ bg: Q.oiii,
2650
+ glow: Q.oiiiDim
2651
+ },
2652
+ {
2653
+ bg: Q.stellar,
2654
+ glow: Q.stellarDim
2655
+ },
2656
+ {
2657
+ bg: "rgba(255, 255, 255, 0.9)",
2658
+ glow: Q.stellarDim
2659
+ }
2660
+ ];
2661
+ for (let r = 0; r < 10; r++) {
2662
+ let i = document.createElement("div"), a = r / 10 * Math.PI * 2, o = 45 + r % 3 * 18, s = 2 + r % 3, c = 1400 + r % 3 * 400, l = 70 * r, u = n[r % n.length];
2663
+ i.className = "pointer-events-none", i.style.cssText = `\n\t\t\t\t--orbit-radius: ${o}px;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: ${s}px;\n\t\t\t\theight: ${s}px;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tbackground: ${u.bg};\n\t\t\t\tbox-shadow: 0 0 ${4 * s}px ${u.bg}, 0 0 ${8 * s}px ${u.glow};\n\t\t\t\tleft: ${e}px;\n\t\t\t\ttop: ${t}px;\n\t\t\t\tz-index: 9997;\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform-origin: center center;\n\t\t\t\ttransform: rotate(${a}rad) translateX(${o}px);\n\t\t\t\topacity: 0;\n\t\t\t`, this.element?.appendChild(i), this.particles.push(i), i.animate([
2664
+ {
2665
+ transform: `rotate(${a}rad) translateX(${o}px) scale(1)`,
2666
+ opacity: 0
2667
+ },
2668
+ {
2669
+ transform: `rotate(${a}rad) translateX(${o}px) scale(1)`,
2670
+ opacity: .9,
2671
+ offset: .1
2672
+ },
2673
+ {
2674
+ transform: `rotate(${a + Math.PI}rad) translateX(${.5 * o}px) scale(0.8)`,
2675
+ opacity: .7,
2676
+ offset: .5
2677
+ },
2678
+ {
2679
+ transform: `rotate(${a + 2 * Math.PI}rad) translateX(0px) scale(0)`,
2680
+ opacity: 0
2681
+ }
2682
+ ], {
2683
+ duration: c,
2684
+ delay: l,
2685
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
2686
+ fill: "forwards"
2687
+ }).onfinish = () => i.remove();
2688
+ }
2689
+ let r = [
2690
+ Q.hAlpha,
2691
+ Q.oiii,
2692
+ Q.stellar,
2693
+ Q.oiii
2694
+ ];
2695
+ for (let n = 0; n < 5; n++) {
2696
+ let i = document.createElement("div"), a = n / 5 * Math.PI * 2 + Math.PI / 10, o = 65 + 25 * Math.random(), s = r[n % r.length];
2697
+ i.className = "pointer-events-none", i.style.cssText = `\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 2px;\n\t\t\t\theight: 14px;\n\t\t\t\tborder-radius: 1px;\n\t\t\t\tbackground: linear-gradient(to bottom, transparent, ${s}, rgba(255,255,255,0.3));\n\t\t\t\tleft: ${e + Math.cos(a) * o}px;\n\t\t\t\ttop: ${t + Math.sin(a) * o}px;\n\t\t\t\tz-index: 9996;\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: rotate(${a + Math.PI / 2}rad) scale(0);\n\t\t\t\topacity: 0;\n\t\t\t\tmix-blend-mode: screen;\n\t\t\t`, this.element?.appendChild(i), this.particles.push(i), i.animate([
2698
+ {
2699
+ transform: `rotate(${a + Math.PI / 2}rad) scale(0)`,
2700
+ opacity: 0,
2701
+ left: `${e + Math.cos(a) * o}px`,
2702
+ top: `${t + Math.sin(a) * o}px`
2703
+ },
2704
+ {
2705
+ transform: `rotate(${a + Math.PI / 2}rad) scale(1.5)`,
2706
+ opacity: .85,
2707
+ left: `${e + Math.cos(a) * o * .5}px`,
2708
+ top: `${t + Math.sin(a) * o * .5}px`,
2709
+ offset: .3
2710
+ },
2711
+ {
2712
+ transform: `rotate(${a + Math.PI / 2}rad) scale(0.5)`,
2713
+ opacity: 0,
2714
+ left: `${e}px`,
2715
+ top: `${t}px`
2716
+ }
2717
+ ], {
2718
+ duration: 900,
2719
+ delay: 150 + 120 * n,
2720
+ easing: "cubic-bezier(0.55, 0, 1, 0.45)",
2721
+ fill: "forwards"
2722
+ }).onfinish = () => i.remove();
2723
+ }
2724
+ }
2725
+ collapseBlackHole() {
2726
+ if (this.bird?.remove(), this.particles.forEach((e) => e.remove()), !this.context) return void this.state$.next("done");
2727
+ let { bx: e, by: t } = this.context, n = this.currentColor;
2728
+ this.accretionDisks.forEach((e, t) => {
2729
+ e.animate([{
2730
+ transform: e.style.transform,
2731
+ opacity: 1
2732
+ }, {
2733
+ transform: "translate(-50%, -50%) rotateX(90deg) scale(0)",
2734
+ opacity: 0
2735
+ }], {
2736
+ duration: 200 + 50 * t,
2737
+ easing: "ease-in",
2738
+ fill: "forwards"
2739
+ }).onfinish = () => e.remove();
2740
+ }), this.accretionDisks = [], this.lensingRing && (this.lensingRing.animate([{
2741
+ transform: "translate(-50%, -50%) rotateX(85deg) scale(1)",
2742
+ opacity: .6
2743
+ }, {
2744
+ transform: "translate(-50%, -50%) rotateX(85deg) scale(0)",
2745
+ opacity: 0
2746
+ }], {
2747
+ duration: 250,
2748
+ easing: "ease-in",
2749
+ fill: "forwards"
2750
+ }).onfinish = () => this.lensingRing?.remove());
2751
+ let r = this.blackHole;
2752
+ r && (r.animate([
2753
+ {
2754
+ transform: "translate(-50%, -50%) scale(1)",
2755
+ filter: "brightness(1)"
2756
+ },
2757
+ {
2758
+ transform: "translate(-50%, -50%) scale(1.3)",
2759
+ filter: "brightness(3)",
2760
+ offset: .2
2761
+ },
2762
+ {
2763
+ transform: "translate(-50%, -50%) scale(0)",
2764
+ filter: "brightness(5)",
2765
+ opacity: 0
2766
+ }
2767
+ ], {
2768
+ duration: 350,
2769
+ easing: "cubic-bezier(0.55, 0, 1, 0.45)",
2770
+ fill: "forwards"
2771
+ }).onfinish = () => r.remove());
2772
+ let i = [
2773
+ {
2774
+ border: Q.stellar,
2775
+ glow: Q.stellarDim
2776
+ },
2777
+ {
2778
+ border: Q.hAlpha,
2779
+ glow: Q.hAlphaDim
2780
+ },
2781
+ {
2782
+ border: Q.oiii,
2783
+ glow: Q.oiiiDim
2784
+ },
2785
+ {
2786
+ border: Q.deepPurple,
2787
+ glow: Q.deepBlue
2788
+ }
2789
+ ];
2790
+ for (let n = 0; n < 4; n++) {
2791
+ let r = document.createElement("div"), a = i[n];
2792
+ r.className = "pointer-events-none", r.style.cssText = `\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: ${e}px;\n\t\t\t\ttop: ${t}px;\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tborder: ${2.5 - .4 * n}px solid ${a.border};\n\t\t\t\tbox-shadow:\n\t\t\t\t\t0 0 ${18 - 3 * n}px ${a.border},\n\t\t\t\t\t0 0 ${30 - 5 * n}px ${a.glow},\n\t\t\t\t\tinset 0 0 ${12 - 2 * n}px ${a.glow};\n\t\t\t\ttransform: translate(-50%, -50%) scale(0.5);\n\t\t\t\tz-index: ${9990 - n};\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\tmix-blend-mode: screen;\n\t\t\t`, this.element?.appendChild(r), r.animate([
2793
+ {
2794
+ transform: "translate(-50%, -50%) scale(0.5)",
2795
+ opacity: .95,
2796
+ borderWidth: 2.5 - .4 * n + "px"
2797
+ },
2798
+ {
2799
+ transform: "translate(-50%, -50%) scale(2.5)",
2800
+ opacity: .6,
2801
+ borderWidth: 1.8 - .3 * n + "px",
2802
+ offset: .35
2803
+ },
2804
+ {
2805
+ transform: "translate(-50%, -50%) scale(6)",
2806
+ opacity: 0,
2807
+ borderWidth: "0.5px"
2808
+ }
2809
+ ], {
2810
+ duration: 800 + 120 * n,
2811
+ delay: 60 * n,
2812
+ easing: "cubic-bezier(0, 0.55, 0.45, 1)",
2813
+ fill: "forwards"
2814
+ }).onfinish = () => r.remove();
2815
+ }
2816
+ let a = document.createElement("div");
2817
+ a.className = "pointer-events-none", a.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\tleft: ${e}px;\n\t\t\ttop: ${t}px;\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-radius: 9999px;\n\t\t\tbackground: radial-gradient(circle,\n\t\t\t\twhite 0%,\n\t\t\t\t${Q.stellar} 20%,\n\t\t\t\t${Q.hAlpha} 50%,\n\t\t\t\t${Q.oiiiDim} 70%,\n\t\t\t\ttransparent 100%\n\t\t\t);\n\t\t\ttransform: translate(-50%, -50%) scale(0);\n\t\t\tz-index: 10000;\n\t\t\twill-change: transform, opacity;\n\t\t`, this.element?.appendChild(a), a.animate([
2818
+ {
2819
+ transform: "translate(-50%, -50%) scale(0)",
2820
+ opacity: 1
2821
+ },
2822
+ {
2823
+ transform: "translate(-50%, -50%) scale(5)",
2824
+ opacity: 1,
2825
+ offset: .12
2826
+ },
2827
+ {
2828
+ transform: "translate(-50%, -50%) scale(8)",
2829
+ opacity: 0
2830
+ }
2831
+ ], {
2832
+ duration: 450,
2833
+ easing: "ease-out",
2834
+ fill: "forwards"
2835
+ }).onfinish = () => a.remove();
2836
+ let o = document.createElement("div");
2837
+ if (o.className = "pointer-events-none", o.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\tleft: ${e}px;\n\t\t\ttop: ${t}px;\n\t\t\twidth: 50px;\n\t\t\theight: 50px;\n\t\t\tborder-radius: 9999px;\n\t\t\tbackground: radial-gradient(circle,\n\t\t\t\t${Q.stellarDim} 0%,\n\t\t\t\t${Q.hAlphaDim} 30%,\n\t\t\t\t${Q.oiiiDim} 50%,\n\t\t\t\t${Q.deepPurple} 70%,\n\t\t\t\ttransparent 100%\n\t\t\t);\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\tz-index: 9989;\n\t\t\twill-change: opacity;\n\t\t\tmix-blend-mode: screen;\n\t\t`, this.element?.appendChild(o), o.animate([
2838
+ {
2839
+ opacity: 1,
2840
+ transform: "translate(-50%, -50%) scale(1)"
2841
+ },
2842
+ {
2843
+ opacity: .6,
2844
+ transform: "translate(-50%, -50%) scale(1.8)",
2845
+ offset: .4
2846
+ },
2847
+ {
2848
+ opacity: 0,
2849
+ transform: "translate(-50%, -50%) scale(2.5)"
2850
+ }
2851
+ ], {
2852
+ duration: 900,
2853
+ easing: "ease-out",
2854
+ fill: "forwards"
2855
+ }).onfinish = () => {
2856
+ o.remove(), this.state$.next("done");
2857
+ }, this.homeElement) {
2858
+ let e = this.homeElement, t = e.style.transform || "";
2859
+ e.animate([
2860
+ {
2861
+ transform: `${t} translate(0, 0) scale(1) rotate(0deg)`,
2862
+ filter: "brightness(1)"
2863
+ },
2864
+ {
2865
+ transform: `${t} translate(0, 0) scale(1.04) rotate(0deg)`,
2866
+ filter: `brightness(2) drop-shadow(0 0 30px ${n})`,
2867
+ offset: .05
2868
+ },
2869
+ {
2870
+ transform: `${t} translate(-4px, 2px) scale(1.025) rotate(-0.8deg)`,
2871
+ filter: `brightness(1.6) drop-shadow(0 0 25px ${n})`,
2872
+ offset: .1
2873
+ },
2874
+ {
2875
+ transform: `${t} translate(5px, -3px) scale(0.98) rotate(1deg)`,
2876
+ filter: `brightness(1.4) drop-shadow(0 0 20px ${n})`,
2877
+ offset: .15
2878
+ },
2879
+ {
2880
+ transform: `${t} translate(-3px, -2px) scale(1.02) rotate(-0.6deg)`,
2881
+ filter: `brightness(1.3) drop-shadow(0 0 18px ${n})`,
2882
+ offset: .2
2883
+ },
2884
+ {
2885
+ transform: `${t} translate(4px, 3px) scale(0.985) rotate(0.8deg)`,
2886
+ filter: `brightness(1.25) drop-shadow(0 0 15px ${n})`,
2887
+ offset: .25
2888
+ },
2889
+ {
2890
+ transform: `${t} translate(-2px, 1px) scale(1.015) rotate(-0.5deg)`,
2891
+ filter: `brightness(1.2) drop-shadow(0 0 12px ${n})`,
2892
+ offset: .3
2893
+ },
2894
+ {
2895
+ transform: `${t} translate(3px, -2px) scale(0.99) rotate(0.6deg)`,
2896
+ filter: `brightness(1.18) drop-shadow(0 0 10px ${n})`,
2897
+ offset: .35
2898
+ },
2899
+ {
2900
+ transform: `${t} translate(-2px, 2px) scale(1.01) rotate(-0.4deg)`,
2901
+ filter: `brightness(1.15) drop-shadow(0 0 8px ${n})`,
2902
+ offset: .4
2903
+ },
2904
+ {
2905
+ transform: `${t} translate(2px, -1px) scale(0.995) rotate(0.4deg)`,
2906
+ filter: "brightness(1.12)",
2907
+ offset: .45
2908
+ },
2909
+ {
2910
+ transform: `${t} translate(-1px, 1px) scale(1.008) rotate(-0.3deg)`,
2911
+ filter: "brightness(1.1)",
2912
+ offset: .5
2913
+ },
2914
+ {
2915
+ transform: `${t} translate(1px, -1px) scale(0.997) rotate(0.25deg)`,
2916
+ filter: "brightness(1.08)",
2917
+ offset: .55
2918
+ },
2919
+ {
2920
+ transform: `${t} translate(-1px, 0px) scale(1.005) rotate(-0.2deg)`,
2921
+ filter: "brightness(1.06)",
2922
+ offset: .6
2923
+ },
2924
+ {
2925
+ transform: `${t} translate(1px, 1px) scale(0.998) rotate(0.15deg)`,
2926
+ filter: "brightness(1.05)",
2927
+ offset: .65
2928
+ },
2929
+ {
2930
+ transform: `${t} translate(0px, -1px) scale(1.003) rotate(-0.1deg)`,
2931
+ filter: "brightness(1.04)",
2932
+ offset: .7
2933
+ },
2934
+ {
2935
+ transform: `${t} translate(-1px, 0px) scale(0.999) rotate(0.08deg)`,
2936
+ filter: "brightness(1.03)",
2937
+ offset: .75
2938
+ },
2939
+ {
2940
+ transform: `${t} translate(0px, 1px) scale(1.002) rotate(-0.05deg)`,
2941
+ filter: "brightness(1.02)",
2942
+ offset: .8
2943
+ },
2944
+ {
2945
+ transform: `${t} translate(0px, 0px) scale(1.001) rotate(0.03deg)`,
2946
+ filter: "brightness(1.01)",
2947
+ offset: .9
2948
+ },
2949
+ {
2950
+ transform: `${t} translate(0, 0) scale(1) rotate(0deg)`,
2951
+ filter: "brightness(1)"
2952
+ }
2953
+ ], {
2954
+ duration: 800,
2955
+ easing: "linear"
2956
+ });
2957
+ }
2958
+ }
2959
+ ensureTrailCanvas() {
2960
+ if (this.trailCanvas || !this.element) return;
2961
+ let e = this.element.scrollWidth, t = this.element.scrollHeight, n = document.createElement("canvas");
2962
+ n.width = e * window.devicePixelRatio, n.height = t * window.devicePixelRatio, n.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: ${e}px;\n\t\t\theight: ${t}px;\n\t\t\tpointer-events: none;\n\t\t\tz-index: 9990;\n\t\t`, this.element.appendChild(n), this.trailCanvas = n, this.trailCtx = n.getContext("2d"), this.trailCtx && this.trailCtx.scale(window.devicePixelRatio, window.devicePixelRatio);
2963
+ }
2964
+ drawTrail(e, t) {
2965
+ if (!this.options.showConnections) return;
2966
+ if (this.ensureTrailCanvas(), !this.trailCtx || !this.lastTrailPos) return void (this.lastTrailPos = {
2967
+ x: e,
2968
+ y: t
2969
+ });
2970
+ let n = this.trailCtx, r = this.currentColor;
2971
+ n.beginPath(), n.moveTo(this.lastTrailPos.x, this.lastTrailPos.y), n.lineTo(e, t), n.strokeStyle = r, n.lineWidth = 3, n.lineCap = "round", n.globalAlpha = .6, n.shadowColor = r, n.shadowBlur = 8, n.stroke(), n.globalAlpha = 1, n.shadowBlur = 0, this.lastTrailPos = {
2972
+ x: e,
2973
+ y: t
2974
+ };
2975
+ }
2976
+ resetTrail() {
2977
+ this.lastTrailPos = null;
2978
+ }
2979
+ fadeTrail() {
2980
+ if (!this.trailCtx || !this.element) return;
2981
+ let e = this.element.scrollWidth, t = this.element.scrollHeight;
2982
+ this.trailCtx.globalCompositeOperation = "destination-out", this.trailCtx.fillStyle = "rgba(0, 0, 0, 0.02)", this.trailCtx.fillRect(0, 0, e, t), this.trailCtx.globalCompositeOperation = "source-over";
2983
+ }
2984
+ cleanup() {
2985
+ this.destroyed$.next(!0), this.rafId &&= (cancelAnimationFrame(this.rafId), 0), this.shimmerAnimation?.cancel(), this.shimmerOverlay?.remove(), this.shimmerAnimation = null, this.shimmerOverlay = null, this.pulseRings.forEach((e) => e.remove()), this.pulseRings = [], this.trailCanvas?.remove(), this.trailCanvas = null, this.trailCtx = null, this.lastTrailPos = null, this.accretionDisks.forEach((e) => e.remove()), this.accretionDisks = [], this.lensingRing?.remove(), this.lensingRing = null, this.eventHorizon?.remove(), this.eventHorizon = null, this.homeElement = null, this.bird?.remove(), this.blackHole?.remove(), this.particles.forEach((e) => e.remove()), this.bird = null, this.blackHole = null, this.particles = [], this.context = null;
2986
+ }
2987
+ disconnected() {
2988
+ this.cleanup();
2989
+ }
2990
+ }), rt = B(class extends z {
2991
+ constructor(...e) {
2992
+ super(...e), this.state = null;
2993
+ }
2994
+ render(e, t) {
2995
+ return L;
2996
+ }
2997
+ update(e, [t, n]) {
2998
+ let r = e.element, i, a, o, s = {};
2999
+ if (typeof t == "function" ? (i = t, s = n || {}) : (a = t.onEnter, o = t.onExit, s = t.options || {}, i = (e) => {
3000
+ e && a && a(), !e && o && o();
3001
+ }), this.state?.element === r) return L;
3002
+ this.cleanup();
3003
+ let { once: c = !1, threshold: l = 0, rootMargin: u = "0px", delay: d = 0 } = s, f = new IntersectionObserver((e) => {
3004
+ if (!this.state) return;
3005
+ let t = e[0], n = t.isIntersecting;
3006
+ d > 0 && n ? (this.state.delayTimerSub && this.state.delayTimerSub.unsubscribe(), this.state.delayTimerSub = D(d).pipe(N(1), I(() => this.triggerCallback(n, t))).subscribe()) : (!n && this.state.delayTimerSub && (this.state.delayTimerSub.unsubscribe(), this.state.delayTimerSub = void 0), this.triggerCallback(n, t));
3007
+ }, {
3008
+ threshold: l,
3009
+ rootMargin: u
3010
+ });
3011
+ return this.state = {
3012
+ element: r,
3013
+ observer: f,
3014
+ callback: i,
3015
+ onEnter: a,
3016
+ onExit: o,
3017
+ once: c,
3018
+ delay: d,
3019
+ hasFired: !1
3020
+ }, f.observe(r), L;
3021
+ }
3022
+ triggerCallback(e, t) {
3023
+ this.state && (this.state.once ? e && !this.state.hasFired && (this.state.hasFired = !0, this.state.callback(e, t), this.cleanup()) : this.state.callback(e, t));
3024
+ }
3025
+ cleanup() {
3026
+ this.state &&= (this.state.delayTimerSub?.unsubscribe(), this.state.delayTimerSub = void 0, this.state.observer.disconnect(), null);
3027
+ }
3028
+ pause() {
3029
+ this.state && (this.state.delayTimerSub?.unsubscribe(), this.state.observer.disconnect());
3030
+ }
3031
+ disconnected() {
3032
+ this.pause();
3033
+ }
3034
+ reconnected() {
3035
+ this.state && this.state.observer.observe(this.state.element);
3036
+ }
3037
+ }), it = {
3038
+ active: !0,
3039
+ intensity: "medium"
3040
+ }, at = {
3041
+ light: {
3042
+ blur: 12,
3043
+ sat: 1.3,
3044
+ bright: 1.05,
3045
+ tint: .45,
3046
+ border: .2,
3047
+ shadow: .06
3048
+ },
3049
+ medium: {
3050
+ blur: 16,
3051
+ sat: 1.4,
3052
+ bright: 1.08,
3053
+ tint: .55,
3054
+ border: .28,
3055
+ shadow: .08
3056
+ },
3057
+ strong: {
3058
+ blur: 24,
3059
+ sat: 1.5,
3060
+ bright: 1.12,
3061
+ tint: .65,
3062
+ border: .35,
3063
+ shadow: .1
3064
+ }
3065
+ }, ot = [
3066
+ "backdropFilter",
3067
+ "background",
3068
+ "boxShadow",
3069
+ "borderTop",
3070
+ "borderBottom"
3071
+ ], st = B(class extends z {
3072
+ constructor(...e) {
3073
+ super(...e), this.state = null;
3074
+ }
3075
+ render(e) {
3076
+ return L;
3077
+ }
3078
+ update(e, [t = {}]) {
3079
+ let n = e.element, r = {
3080
+ ...it,
3081
+ ...t
3082
+ };
3083
+ return r.active ? this.activate(n, r) : this.cleanup(), L;
3084
+ }
3085
+ activate(e, t) {
3086
+ if (!this.isConnected) return;
3087
+ let n = at[t.intensity];
3088
+ if (!this.state) {
3089
+ let t = {};
3090
+ for (let n of ot) t[n] = e.style[n];
3091
+ this.state = {
3092
+ element: e,
3093
+ origStyles: t
3094
+ };
3095
+ }
3096
+ this.applyStyles(e, n);
3097
+ }
3098
+ applyStyles(e, t) {
3099
+ let n = `blur(${t.blur}px) saturate(${t.sat}) brightness(${t.bright})`;
3100
+ e.style.backdropFilter = n, e.style.setProperty("-webkit-backdrop-filter", n), e.style.background = `rgba(var(--md-sys-color-surface-container, 255 255 255) / ${t.tint})`;
3101
+ let r = t.border;
3102
+ e.style.boxShadow = [
3103
+ `inset 0 1px 0 0 rgba(255,255,255, ${1.5 * r})`,
3104
+ `inset 0 2px 6px rgba(255,255,255, ${.6 * r})`,
3105
+ `inset 0 -1px 0 0 rgba(255,255,255, ${.25 * r})`,
3106
+ `0 1px 3px rgba(0,0,0, ${t.shadow})`,
3107
+ `0 6px 20px rgba(0,0,0, ${.5 * t.shadow})`
3108
+ ].join(", "), e.style.borderTop = `0.5px solid rgba(255,255,255, ${.9 * r})`, e.style.borderBottom = "0.5px solid rgba(0,0,0, 0.05)";
3109
+ }
3110
+ cleanup() {
3111
+ if (!this.state) return;
3112
+ let { element: e, origStyles: t } = this.state;
3113
+ for (let n of ot) e.style[n] = t[n];
3114
+ e.style.removeProperty("-webkit-backdrop-filter"), this.state = null;
3115
+ }
3116
+ disconnected() {
3117
+ this.cleanup();
3118
+ }
3119
+ reconnected() {}
3120
+ }), $ = "schmancy-lb-rotate", ct = !1;
3121
+ function lt() {
3122
+ if (ct) return;
3123
+ let e = document.createElement("style");
3124
+ e.id = "schmancy-living-border-shared", e.textContent = `\n\t\t@property --${$}-angle {\n\t\t\tsyntax: '<angle>';\n\t\t\tinitial-value: 0deg;\n\t\t\tinherits: false;\n\t\t}\n\t\t@keyframes ${$} {\n\t\t\tto { --${$}-angle: 360deg; }\n\t\t}\n\t`, document.head.appendChild(e), ct = !0;
3125
+ }
3126
+ var ut = U(class extends z {
3127
+ constructor(...e) {
3128
+ super(...e), this.teardown$ = new g(), this.didSetPosition = !1;
3129
+ }
3130
+ render(e) {}
3131
+ update(e, [t]) {
3132
+ if (e.type !== H.ELEMENT) throw Error("livingBorder directive must be used on an element");
3133
+ let n = JSON.stringify(t ?? {});
3134
+ this.element && n === this.prevKey || (this.prevKey = n, this.element = e.element, this.lastOptions = t, o.value || (this.teardown$.next(), this.cleanup(), lt(), this.createBorderOverlay(t)));
3135
+ }
3136
+ reconnected() {
3137
+ this.lastOptions && !o.value && (lt(), this.createBorderOverlay(this.lastOptions));
3138
+ }
3139
+ createBorderOverlay(e) {
3140
+ let t = e?.width ?? 1, n = e?.color ?? "var(--schmancy-sys-color-primary-default)", r = e?.spread ?? 6, i = e?.duration ?? 3e3, a = e?.onHover ?? !1;
3141
+ getComputedStyle(this.element).position === "static" && (this.element.style.position = "relative", this.didSetPosition = !0), this.borderEl = document.createElement("div"), this.borderEl.setAttribute("aria-hidden", "true");
3142
+ let o = `-${t}px`;
3143
+ Object.assign(this.borderEl.style, {
3144
+ position: "absolute",
3145
+ top: o,
3146
+ left: o,
3147
+ right: o,
3148
+ bottom: o,
3149
+ borderRadius: "inherit",
3150
+ pointerEvents: "none",
3151
+ zIndex: "0",
3152
+ background: `conic-gradient(\n\t\t\t\tfrom var(--${$}-angle),\n\t\t\t\ttransparent 0%, transparent 30%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 45%,\n\t\t\t\t${n} 50%,\n\t\t\t\tcolor-mix(in srgb, ${n} 50%, transparent) 55%,\n\t\t\t\ttransparent 70%, transparent 100%\n\t\t\t)`,
3153
+ mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
3154
+ maskComposite: "exclude",
3155
+ WebkitMaskComposite: "xor",
3156
+ padding: `${t}px`,
3157
+ animation: `${$} ${i}ms linear infinite`,
3158
+ filter: `blur(${.3 * r}px) drop-shadow(0 0 ${r}px color-mix(in srgb, ${n} 40%, transparent))`,
3159
+ opacity: a ? "0" : "0.5",
3160
+ transition: "opacity 300ms ease"
3161
+ }), this.element.prepend(this.borderEl), te(T(this.element, "mouseenter").pipe(j(() => {
3162
+ this.borderEl && (this.borderEl.style.opacity = a ? "0.7" : "0.8");
3163
+ })), T(this.element, "mouseleave").pipe(j(() => {
3164
+ this.borderEl && (this.borderEl.style.opacity = a ? "0" : "0.5");
3165
+ }))).pipe(P(this.teardown$)).subscribe();
3166
+ }
3167
+ cleanup() {
3168
+ this.borderEl?.remove(), this.borderEl = void 0;
3169
+ }
3170
+ disconnected() {
3171
+ this.teardown$.next(), this.cleanup(), this.didSetPosition && this.element && (this.element.style.position = "", this.didSetPosition = !1);
3172
+ }
3173
+ }), dt = /* @__PURE__ */ new WeakMap(), ft = U(class extends V {
3174
+ constructor(e) {
3175
+ if (super(e), e.type !== H.ELEMENT) throw Error("longPress directive can only be used on elements");
3176
+ }
3177
+ render(e, t) {}
3178
+ update(e, [t, n = {}]) {
3179
+ let r = e.element, i = dt.get(r);
3180
+ if (i) {
3181
+ if (i.callback === t && this.optionsEqual(i.options, n)) return;
3182
+ i.subscription.unsubscribe();
3183
+ }
3184
+ let a = this.setupLongPress(r, t, n);
3185
+ dt.set(r, {
3186
+ subscription: a,
3187
+ callback: t,
3188
+ options: n || {}
3189
+ });
3190
+ }
3191
+ optionsEqual(e, t) {
3192
+ return t ? e.duration === t.duration && e.movementThreshold === t.movementThreshold : Object.keys(e).length === 0;
3193
+ }
3194
+ setupLongPress(e, t, n = {}) {
3195
+ let r = n.duration ?? 500, i = n.movementThreshold ?? 10, a = T(e, "pointerdown"), o = T(window, "pointerup"), s = T(window, "pointermove"), c = T(window, "pointercancel");
3196
+ return a.pipe(M((e) => {
3197
+ let n = e.clientX, a = e.clientY, l = te(o, c, s.pipe(A((e) => {
3198
+ let t = e.clientX - n, r = e.clientY - a;
3199
+ return Math.sqrt(t * t + r * r) > i;
3200
+ }))).pipe(ce());
3201
+ return D(r).pipe(P(l), I(() => t()));
3202
+ })).subscribe();
3203
+ }
3204
+ disconnected(e) {
3205
+ let t = e.element, n = dt.get(t);
3206
+ n && (n.subscription.unsubscribe(), dt.delete(t));
3207
+ }
3208
+ reconnected(e) {
3209
+ let t = e.element, n = dt.get(t);
3210
+ n && (n.subscription = this.setupLongPress(t, n.callback, n.options));
3211
+ }
3212
+ }), pt = B(class extends z {
3213
+ constructor(...e) {
3214
+ super(...e), this.state = null;
3215
+ }
3216
+ render(e) {
3217
+ return L;
3218
+ }
3219
+ update(e, [t]) {
3220
+ let n = e.element, { active: r, color: i = "var(--md-sys-color-error, #ef4444)", width: a = 150 } = t;
3221
+ return !r && this.state ? (this.cleanup(), L) : r ? (!this.state || this.state.color === i && this.state.width === a || this.cleanup(), this.state || (this.state = {
3222
+ active: !0,
3223
+ color: i,
3224
+ width: a,
3225
+ element: n,
3226
+ shards: [],
3227
+ cracks: [],
3228
+ isVisible: !0,
3229
+ startTime: performance.now()
3230
+ }, getComputedStyle(n).position === "static" && (n.style.position = "relative"), this.createOverlay(), this.setupVisibilityObserver(), this.startAnimation()), L) : L;
3231
+ }
3232
+ createOverlay() {
3233
+ if (!this.state) return;
3234
+ let { element: e, color: t, width: n } = this.state, r = document.createElement("div");
3235
+ r.className = "missed-punch-overlay", Object.assign(r.style, {
3236
+ position: "absolute",
3237
+ top: "50%",
3238
+ left: "0",
3239
+ width: `${n}px`,
3240
+ height: "40px",
3241
+ transform: "translateY(-50%)",
3242
+ pointerEvents: "none",
3243
+ overflow: "visible",
3244
+ zIndex: "4"
3245
+ });
3246
+ let i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3247
+ i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("viewBox", `0 0 ${n} 40`), i.setAttribute("preserveAspectRatio", "xMinYMid meet"), Object.assign(i.style, {
3248
+ position: "absolute",
3249
+ top: "0",
3250
+ left: "0",
3251
+ width: "100%",
3252
+ height: "100%",
3253
+ overflow: "visible"
3254
+ });
3255
+ let a = [];
3256
+ for (let e of [
3257
+ -15,
3258
+ 0,
3259
+ 15,
3260
+ -30,
3261
+ 30,
3262
+ -8,
3263
+ 8
3264
+ ]) {
3265
+ let n = document.createElementNS("http://www.w3.org/2000/svg", "path"), r = e * Math.PI / 180, o = 30 + 40 * Math.random(), s = "M 0,20", c = 0, l = 20, u = 4 + Math.floor(3 * Math.random());
3266
+ for (let e = 0; e < u; e++) {
3267
+ let e = o / u;
3268
+ c += Math.cos(r) * e + 4 * (Math.random() - .5), l += Math.sin(r) * e + 3 * (Math.random() - .5), s += ` L ${c.toFixed(1)},${l.toFixed(1)}`;
3269
+ }
3270
+ n.setAttribute("d", s), n.setAttribute("stroke", t), n.setAttribute("stroke-width", "1.5"), n.setAttribute("fill", "none"), n.setAttribute("opacity", "0"), n.style.willChange = "opacity, stroke-dashoffset";
3271
+ let d = 1.2 * o;
3272
+ n.setAttribute("stroke-dasharray", d.toString()), n.setAttribute("stroke-dashoffset", d.toString()), a.push(n), i.appendChild(n);
3273
+ }
3274
+ let o = [], s = document.createElementNS("http://www.w3.org/2000/svg", "defs");
3275
+ for (let e = 0; e < 8; e++) {
3276
+ let n = `shard-gradient-${e}`, r = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
3277
+ r.setAttribute("id", n), r.setAttribute("x1", "0%"), r.setAttribute("y1", "0%"), r.setAttribute("x2", "100%"), r.setAttribute("y2", "100%");
3278
+ let a = document.createElementNS("http://www.w3.org/2000/svg", "stop");
3279
+ a.setAttribute("offset", "0%"), a.setAttribute("stop-color", "white"), a.setAttribute("stop-opacity", "0.9");
3280
+ let c = document.createElementNS("http://www.w3.org/2000/svg", "stop");
3281
+ c.setAttribute("offset", "40%"), c.setAttribute("stop-color", t), c.setAttribute("stop-opacity", "0.8");
3282
+ let l = document.createElementNS("http://www.w3.org/2000/svg", "stop");
3283
+ l.setAttribute("offset", "100%"), l.setAttribute("stop-color", t), l.setAttribute("stop-opacity", "0.4"), r.appendChild(a), r.appendChild(c), r.appendChild(l), s.appendChild(r);
3284
+ let u = document.createElementNS("http://www.w3.org/2000/svg", "polygon"), d = 5 + 7 * Math.random(), f = this.generateShardPoints(d);
3285
+ u.setAttribute("points", f), u.setAttribute("fill", `url(#${n})`), u.setAttribute("stroke", "white"), u.setAttribute("stroke-width", "0.5"), u.setAttribute("stroke-opacity", "0.6"), u.setAttribute("opacity", "0"), u.style.willChange = "transform, opacity", u.style.filter = "drop-shadow(0 0 2px rgba(255,255,255,0.5))";
3286
+ let p = (Math.random() - .3) * Math.PI * .6, m = 1 + 1.5 * Math.random();
3287
+ o.push({
3288
+ element: u,
3289
+ x: 0,
3290
+ y: 20,
3291
+ vx: Math.cos(p) * m,
3292
+ vy: Math.sin(p) * m,
3293
+ rotation: 0,
3294
+ rotationSpeed: 10 * (Math.random() - .5),
3295
+ scale: .6 + .6 * Math.random(),
3296
+ opacity: 0
3297
+ }), i.appendChild(u);
3298
+ }
3299
+ i.insertBefore(s, i.firstChild);
3300
+ for (let e = 0; e < 6; e++) {
3301
+ let t = document.createElementNS("http://www.w3.org/2000/svg", "circle");
3302
+ t.setAttribute("r", "1.5"), t.setAttribute("fill", "white"), t.setAttribute("opacity", "0"), t.setAttribute("data-sparkle", e.toString()), t.style.willChange = "transform, opacity", i.appendChild(t);
3303
+ }
3304
+ let c = document.createElementNS("http://www.w3.org/2000/svg", "text");
3305
+ if (c.setAttribute("x", (n - 15).toString()), c.setAttribute("y", "25"), c.setAttribute("fill", t), c.setAttribute("font-size", "16"), c.setAttribute("font-weight", "bold"), c.setAttribute("opacity", "0.6"), c.textContent = "!", c.style.animation = "missed-pulse 1.5s ease-in-out infinite", i.appendChild(c), !document.getElementById("missed-punch-styles")) {
3306
+ let e = document.createElement("style");
3307
+ e.id = "missed-punch-styles", e.textContent = "\n @keyframes missed-pulse {\n 0%, 100% { opacity: 0.4; transform: scale(1); }\n 50% { opacity: 0.8; transform: scale(1.1); }\n }\n ", document.head.appendChild(e);
3308
+ }
3309
+ r.appendChild(i), e.appendChild(r), this.state.overlayElement = r, this.state.svg = i, this.state.shards = o, this.state.cracks = a;
3310
+ }
3311
+ generateShardPoints(e) {
3312
+ let t = 3 + Math.floor(2 * Math.random()), n = [];
3313
+ for (let r = 0; r < t; r++) {
3314
+ let i = r / t * Math.PI * 2 + .5 * Math.random(), a = e * (.5 + .5 * Math.random()), o = Math.cos(i) * a, s = Math.sin(i) * a;
3315
+ n.push(`${o.toFixed(1)},${s.toFixed(1)}`);
3316
+ }
3317
+ return n.join(" ");
3318
+ }
3319
+ setupVisibilityObserver() {
3320
+ this.state && typeof IntersectionObserver < "u" && (this.state.observer = new IntersectionObserver((e) => {
3321
+ if (!this.state) return;
3322
+ let t = e[0].isIntersecting;
3323
+ t && !this.state.isVisible ? (this.state.isVisible = !0, this.startAnimation()) : !t && this.state.isVisible && (this.state.isVisible = !1, this.state.animationId && (cancelAnimationFrame(this.state.animationId), this.state.animationId = void 0));
3324
+ }, { threshold: 0 }), this.state.observer.observe(this.state.element));
3325
+ }
3326
+ startAnimation() {
3327
+ if (!this.state || !this.state.isVisible) return;
3328
+ let { cracks: e } = this.state;
3329
+ for (let t = 0; t < e.length; t++) {
3330
+ let n = e[t];
3331
+ n.setAttribute("stroke-dashoffset", "0"), n.setAttribute("opacity", "0.5");
3332
+ }
3333
+ let t = (n) => {
3334
+ if (!this.state || !this.state.isVisible) return;
3335
+ let r = n - this.state.startTime, { shards: i, width: a } = this.state;
3336
+ for (let e = 0; e < i.length; e++) {
3337
+ let t = i[e], n = 2500 + 200 * e, o = (r + 300 * e) % n / n;
3338
+ t.x = o * t.vx * a * .5, t.y = 20 + o * t.vy * 25 + o * o * 20, t.rotation += .3 * t.rotationSpeed;
3339
+ let s = .85;
3340
+ o < .1 ? s = 8.5 * o : o > .8 && (s = 4.25 * (1 - o)), t.element.style.transform = `translate(${t.x.toFixed(1)}px, ${t.y.toFixed(1)}px) rotate(${t.rotation.toFixed(0)}deg) scale(${t.scale})`, t.element.setAttribute("opacity", s.toFixed(2));
3341
+ }
3342
+ let o = this.state.svg?.querySelectorAll("[data-sparkle]");
3343
+ o && o.forEach((e, t) => {
3344
+ let n = 1500 + 150 * t, i = (r + 200 * t) % n / n, o = 5 + i * a * .6, s = 18 + 10 * Math.sin(i * Math.PI * 4), c = .8 * Math.sin(i * Math.PI);
3345
+ e.setAttribute("cx", o.toFixed(1)), e.setAttribute("cy", s.toFixed(1)), e.setAttribute("opacity", Math.max(0, c).toFixed(2));
3346
+ });
3347
+ let s = .15 * Math.sin(r / 800) + .45;
3348
+ for (let t of e) t.setAttribute("opacity", s.toFixed(2));
3349
+ this.state.animationId = requestAnimationFrame(t);
3350
+ };
3351
+ this.state.animationId = requestAnimationFrame(t);
3352
+ }
3353
+ cleanup() {
3354
+ this.state &&= (this.state.animationId && cancelAnimationFrame(this.state.animationId), this.state.observer && this.state.observer.disconnect(), this.state.overlayElement && this.state.overlayElement.remove(), null);
3355
+ }
3356
+ disconnected() {
3357
+ this.cleanup();
3358
+ }
3359
+ }), mt = {
3360
+ active: !0,
3361
+ autoHideDuration: 3e3,
3362
+ background: !0,
3363
+ intensity: 1,
3364
+ blur: 1,
3365
+ speed: 1,
3366
+ fadeInDuration: 1e3,
3367
+ fadeOutDuration: 8e3,
3368
+ idleOpacity: .6,
3369
+ idleBreathe: !0,
3370
+ temperature: 0,
3371
+ chromaticAberration: 1,
3372
+ particleCount: 30
3373
+ }, ht = "cubic-bezier(0.37, 0, 0.63, 1)", gt = "cubic-bezier(0.25, 0.1, 0.25, 1)", _t = !1, vt = class e {
3374
+ constructor() {
3375
+ this.elementToDirective = /* @__PURE__ */ new WeakMap(), this.instances = /* @__PURE__ */ new Set(), this.observer = null, this.visibilitySub = null, this.tabVisible = !0;
3376
+ }
3377
+ static {
3378
+ this._instance = null;
3379
+ }
3380
+ static get instance() {
3381
+ return e._instance ||= new e(), e._instance;
3382
+ }
3383
+ register(e, t) {
3384
+ let n = this.instances.size === 0;
3385
+ this.instances.add(e), this.elementToDirective.set(t, e), n && this.setup(), this.observer?.observe(t);
3386
+ }
3387
+ unregister(e, t) {
3388
+ this.observer?.unobserve(t), this.elementToDirective.delete(t), this.instances.delete(e), this.instances.size === 0 && this.teardown();
3389
+ }
3390
+ setup() {
3391
+ this.observer = new IntersectionObserver((e) => {
3392
+ for (let t of e) {
3393
+ let e = this.elementToDirective.get(t.target);
3394
+ e && e.onVisibilityChange(t.isIntersecting && this.tabVisible);
3395
+ }
3396
+ }, { threshold: 0 }), this.visibilitySub = T(document, "visibilitychange").pipe(I(() => {
3397
+ this.tabVisible = document.visibilityState === "visible";
3398
+ for (let e of this.instances) e.onVisibilityChange(this.tabVisible);
3399
+ })).subscribe();
3400
+ }
3401
+ teardown() {
3402
+ this.observer &&= (this.observer.disconnect(), null), this.visibilitySub &&= (this.visibilitySub.unsubscribe(), null);
3403
+ }
3404
+ }, yt = B(class extends z {
3405
+ constructor(...e) {
3406
+ super(...e), this.state = null, this.coordinator = vt.instance;
3407
+ }
3408
+ render(e) {
3409
+ return L;
3410
+ }
3411
+ update(e, [t = {}]) {
3412
+ let n = e.element, r = {
3413
+ ...mt,
3414
+ ...t
3415
+ };
3416
+ return r.active ? this.show(n, r) : this.hide(r), L;
3417
+ }
3418
+ onVisibilityChange(e) {
3419
+ if (!this.state?.overlay) return;
3420
+ let t = this.state.isVisible;
3421
+ this.state.isVisible = e, t !== e && (this.state.overlay.classList.toggle("paused", !e), this.state.overlay.classList.toggle("running", e));
3422
+ }
3423
+ show(e, t) {
3424
+ (function() {
3425
+ if (_t || typeof document > "u") return;
3426
+ _t = !0;
3427
+ let e = document.createElement("style");
3428
+ e.id = "nebula-directive-styles", e.textContent = "\n/* =============================================================================\n NEBULA v3 - SURREAL DIMENSIONAL RIFT - GPU-COMPOSITED CSS ANIMATIONS\n Chromatic aberration, iridescent hue-cycling, event horizon, tendrils.\n Performance: translate3d + opacity for most layers, hue-rotate for core only.\n ============================================================================= */\n\n/* Chromatic red channel - rightward aberration drift */\n@keyframes nebula-chromatic-red {\n 0%, 100% { transform: translate3d(var(--nebula-aberration, 3px), 0, 0); }\n 25% { transform: translate3d(calc(var(--nebula-aberration, 3px) * 1.8), -1%, 0); }\n 50% { transform: translate3d(var(--nebula-aberration, 3px), 1%, 0); }\n 75% { transform: translate3d(calc(var(--nebula-aberration, 3px) * 0.5), 0, 0); }\n}\n\n/* Chromatic blue channel - leftward counter-drift */\n@keyframes nebula-chromatic-blue {\n 0%, 100% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1), 0, 0); }\n 25% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -0.5), 1%, 0); }\n 50% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1), -1%, 0); }\n 75% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1.8), 0, 0); }\n}\n\n/* Iridescent core - continuous 360-degree hue rotation (the ONE filter animation) */\n@keyframes nebula-iridescent {\n 0% { filter: hue-rotate(0deg) blur(var(--nebula-blur-core, 12px)) saturate(1.6); }\n 100% { filter: hue-rotate(360deg) blur(var(--nebula-blur-core, 12px)) saturate(1.6); }\n}\n\n/* Bioluminescent tendrils - organic breathing */\n@keyframes nebula-tendrils-breathe {\n 0%, 100% { opacity: 0.6; transform: translate3d(0, 0, 0); }\n 30% { opacity: 0.9; transform: translate3d(1%, -1.5%, 0); }\n 60% { opacity: 0.5; transform: translate3d(-1%, 1.5%, 0); }\n}\n\n/* Quantum particle twinkle - opacity only (cheapest) */\n@keyframes nebula-particle-twinkle {\n 0%, 100% { opacity: 0.7; }\n 15% { opacity: 1; }\n 40% { opacity: 0.5; }\n 65% { opacity: 0.85; }\n 85% { opacity: 0.6; }\n}\n\n/* Idle breathing - gentle pulse when dimmed */\n@keyframes nebula-idle-breathe {\n 0%, 100% {\n opacity: var(--nebula-idle-opacity, 0.08);\n filter: blur(calc(var(--nebula-blur-base, 10px) * 8));\n transform: scale(1);\n }\n 50% {\n opacity: calc(var(--nebula-idle-opacity, 0.08) * 1.4);\n filter: blur(calc(var(--nebula-blur-base, 10px) * 10));\n transform: scale(1.005);\n }\n}\n\n/* =============================================================================\n STATE CLASSES - Control via CSS class toggle (no JS animation calls)\n ============================================================================= */\n\n.nebula-overlay {\n contain: strict;\n pointer-events: none;\n isolation: isolate;\n}\n\n.nebula-overlay.paused .nebula-layer {\n animation-play-state: paused !important;\n}\n\n.nebula-overlay.running .nebula-layer {\n animation-play-state: running !important;\n}\n\n/* Reduced motion - respect user preferences */\n@media (prefers-reduced-motion: reduce) {\n .nebula-layer {\n animation: none !important;\n transition: opacity 0s !important;\n }\n}\n", document.head.appendChild(e);
3429
+ })(), this.state?.autoHideSub && (this.state.autoHideSub.unsubscribe(), this.state.autoHideSub = null);
3430
+ let n = o.value;
3431
+ if (this.state?.overlay && this.state.isDimmed) return this.state.isDimmed = !1, this.state.options = t, this.awakenOverlay(t, n), void this.scheduleAutoHide(t);
3432
+ this.state?.overlay || this.createOverlay(e, t, n), this.scheduleAutoHide(t);
3433
+ }
3434
+ awakenOverlay(e, r) {
3435
+ if (!this.state?.overlay) return;
3436
+ let i = this.state.overlay, a = r ? 0 : .6 * e.fadeInDuration, o = r ? "linear" : t(n);
3437
+ i.style.setProperty("--nebula-intensity", String(e.intensity)), i.animate([
3438
+ {
3439
+ opacity: e.idleOpacity,
3440
+ transform: "scale(0.98)",
3441
+ filter: `blur(${4 * e.blur}px)`
3442
+ },
3443
+ {
3444
+ opacity: .7 * e.intensity,
3445
+ transform: "scale(1.01)",
3446
+ filter: `blur(${1 * e.blur}px)`
3447
+ },
3448
+ {
3449
+ opacity: e.intensity,
3450
+ transform: "scale(1)",
3451
+ filter: "blur(0px)"
3452
+ }
3453
+ ], {
3454
+ duration: a,
3455
+ easing: o,
3456
+ fill: "forwards"
3457
+ }), i.classList.remove("paused"), i.classList.add("running");
3458
+ }
3459
+ createOverlay(e, r, i) {
3460
+ let a = window.getComputedStyle(e).position, o = e.style.position, s = e.style.overflow, c = e.style.contain;
3461
+ a === "static" && (e.style.position = "relative"), e.style.overflow = "hidden", e.style.contain = "paint";
3462
+ let l = r.temperature, u = Math.max(0, l), d = Math.max(0, -l), f = r.intensity, p = Math.round(3 + 5 * r.chromaticAberration), m = Math.round(20 + 60 * d), h = Math.round(80 + 80 * d), g = Math.round(20 + 80 * u), _ = Math.round(255 - 55 * u), v = Math.round(100 + 100 * d), y = Math.round(100 * u), b = Math.round(255 - 55 * u), x = Math.round(100 + 55 * d), S = Math.round(255 - 55 * d), C = document.createElement("div");
3463
+ if (C.className = "nebula-overlay running", Object.assign(C.style, {
3464
+ position: "absolute",
3465
+ inset: "-20%",
3466
+ zIndex: r.background ? "-1" : "9999",
3467
+ opacity: "0",
3468
+ "--nebula-intensity": String(f),
3469
+ "--nebula-blur-base": 10 * r.blur + "px",
3470
+ "--nebula-idle-opacity": String(r.idleOpacity),
3471
+ "--nebula-aberration": `${p}px`,
3472
+ "--nebula-blur-core": 12 * r.blur + "px"
3473
+ }), i) {
3474
+ let e = document.createElement("div");
3475
+ Object.assign(e.style, {
3476
+ position: "absolute",
3477
+ inset: "0",
3478
+ background: `\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${x},${S},${.12 * f}) 0%,\n\t\t\t\t\t\trgba(${g},100,${_},${.06 * f}) 40%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(circle 8% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.15 * f}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,
3479
+ filter: `blur(${10 * r.blur}px)`,
3480
+ opacity: String(f)
3481
+ }), C.appendChild(e);
3482
+ } else {
3483
+ let e = document.createElement("div");
3484
+ e.className = "nebula-layer", Object.assign(e.style, {
3485
+ position: "absolute",
3486
+ inset: "-5%",
3487
+ background: `\n\t\t\t\t\tlinear-gradient(155deg,\n\t\t\t\t\t\ttransparent 0%, transparent 38%,\n\t\t\t\t\t\trgba(8,2,18,${.35 * f}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4 * f}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35 * f}) 54%,\n\t\t\t\t\t\ttransparent 60%, transparent 100%),\n\t\t\t\t\tlinear-gradient(225deg,\n\t\t\t\t\t\ttransparent 0%, transparent 42%,\n\t\t\t\t\t\trgba(5,0,12,${.28 * f}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32 * f}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28 * f}) 53%,\n\t\t\t\t\t\ttransparent 58%, transparent 100%),\n\t\t\t\t\tradial-gradient(ellipse 110% 110% at 50% 50%,\n\t\t\t\t\t\ttransparent 35%,\n\t\t\t\t\t\trgba(3,0,8,${.2 * f}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35 * f}) 85%),\n\t\t\t\t\tradial-gradient(ellipse 50% 45% at 30% 35%,\n\t\t\t\t\t\trgba(0,0,0,${.3 * f}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 40% 55% at 70% 65%,\n\t\t\t\t\t\trgba(0,0,0,${.25 * f}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,
3488
+ filter: `blur(${4 * r.blur}px)`,
3489
+ mixBlendMode: "multiply",
3490
+ transform: "translateZ(0)"
3491
+ }), C.appendChild(e);
3492
+ let t = document.createElement("div");
3493
+ t.className = "nebula-layer", Object.assign(t.style, {
3494
+ position: "absolute",
3495
+ inset: "-15%",
3496
+ background: `\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${m},${h},${.14 * f}) 0%,\n\t\t\t\t\t\trgba(255,${m},${h},${.06 * f}) 35%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 30% 35% at 30% 35%,\n\t\t\t\t\t\trgba(255,${v},200,${.1 * f}) 0%,\n\t\t\t\t\t\trgba(255,${v},200,${.03 * f}) 50%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 25% 30% at 65% 70%,\n\t\t\t\t\t\trgba(255,${Math.min(255, m + 30)},${h},${.08 * f}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,
3497
+ filter: `blur(${18 * r.blur}px) saturate(1.4)`,
3498
+ mixBlendMode: "screen",
3499
+ transform: "translateZ(0)",
3500
+ animation: `nebula-chromatic-red ${35e3 / r.speed}ms ${gt} infinite`
3501
+ }), C.appendChild(t);
3502
+ let n = document.createElement("div");
3503
+ n.className = "nebula-layer", Object.assign(n.style, {
3504
+ position: "absolute",
3505
+ inset: "-15%",
3506
+ background: `\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${g},100,${_},${.12 * f}) 0%,\n\t\t\t\t\t\trgba(${g},100,${_},${.05 * f}) 35%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 35% 30% at 68% 40%,\n\t\t\t\t\t\trgba(${y},${b},200,${.09 * f}) 0%,\n\t\t\t\t\t\trgba(${y},${b},200,${.03 * f}) 45%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 28% 25% at 35% 65%,\n\t\t\t\t\t\trgba(${g},100,${Math.min(255, _ + 20)},${.07 * f}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,
3507
+ filter: `blur(${18 * r.blur}px) saturate(1.4)`,
3508
+ mixBlendMode: "screen",
3509
+ transform: "translateZ(0)",
3510
+ animation: `nebula-chromatic-blue ${35e3 / r.speed}ms ${gt} infinite`
3511
+ }), C.appendChild(n);
3512
+ let i = document.createElement("div");
3513
+ i.className = "nebula-layer", Object.assign(i.style, {
3514
+ position: "absolute",
3515
+ inset: "0",
3516
+ background: `\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${x},${S},${.18 * f}) 0%,\n\t\t\t\t\t\trgba(255,${v},200,${.08 * f}) 40%,\n\t\t\t\t\t\trgba(${g},100,${_},${.03 * f}) 65%,\n\t\t\t\t\t\ttransparent 80%),\n\t\t\t\t\tradial-gradient(circle 6% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.25 * f}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1 * f}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,
3517
+ mixBlendMode: "screen",
3518
+ transform: "translateZ(0)",
3519
+ animation: `nebula-iridescent ${28e3 / r.speed}ms linear infinite`
3520
+ }), C.appendChild(i);
3521
+ let a = document.createElement("div");
3522
+ if (a.className = "nebula-layer", Object.assign(a.style, {
3523
+ position: "absolute",
3524
+ inset: "-12%",
3525
+ background: `\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${v},200,${.1 * f}) 0%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 12% 55% at 48% 50%,\n\t\t\t\t\t\trgba(${y},${b},200,${.08 * f}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 45% 10% at 45% 35%,\n\t\t\t\t\t\trgba(255,${x},${S},${.07 * f}) 0%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 10% 40% at 60% 60%,\n\t\t\t\t\t\trgba(${g},100,${_},${.06 * f}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,
3526
+ filter: `blur(${14 * r.blur}px)`,
3527
+ mixBlendMode: "screen",
3528
+ transform: "translateZ(0)",
3529
+ animation: `nebula-tendrils-breathe ${22e3 / r.speed}ms ${ht} infinite`
3530
+ }), C.appendChild(a), r.particleCount > 0) {
3531
+ let e = document.createElement("div");
3532
+ e.className = "nebula-layer";
3533
+ let t = [];
3534
+ for (let e = 0; e < r.particleCount; e++) {
3535
+ let e = 5 + 90 * Math.random(), n = 5 + 90 * Math.random(), r = .5 + 2 * Math.random(), i = Math.round(360 * Math.random()), a = (.3 + .5 * Math.random()) * f;
3536
+ t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`);
3537
+ }
3538
+ Object.assign(e.style, {
3539
+ position: "absolute",
3540
+ inset: "0",
3541
+ background: t.join(","),
3542
+ mixBlendMode: "screen",
3543
+ transform: "translateZ(0)",
3544
+ animation: `nebula-particle-twinkle ${5e3 / r.speed}ms ${ht} infinite`
3545
+ }), C.appendChild(e);
3546
+ }
3547
+ }
3548
+ e.appendChild(C);
3549
+ let ee = i ? 0 : r.fadeInDuration, w = i ? "linear" : t(n);
3550
+ C.animate([
3551
+ {
3552
+ opacity: 0,
3553
+ transform: "scale(0.85)",
3554
+ filter: `blur(${25 * r.blur}px) saturate(0.5)`
3555
+ },
3556
+ {
3557
+ opacity: .3 * r.intensity,
3558
+ transform: "scale(0.95)",
3559
+ filter: `blur(${12 * r.blur}px) saturate(0.8)`
3560
+ },
3561
+ {
3562
+ opacity: .6 * r.intensity,
3563
+ transform: "scale(1.02)",
3564
+ filter: `blur(${4 * r.blur}px) saturate(1.1)`
3565
+ },
3566
+ {
3567
+ opacity: .85 * r.intensity,
3568
+ transform: "scale(1.005)",
3569
+ filter: `blur(${1 * r.blur}px) saturate(1.05)`
3570
+ },
3571
+ {
3572
+ opacity: r.intensity,
3573
+ transform: "scale(1)",
3574
+ filter: "blur(0px) saturate(1)"
3575
+ }
3576
+ ], {
3577
+ duration: ee,
3578
+ easing: w,
3579
+ fill: "forwards"
3580
+ }), this.state = {
3581
+ element: e,
3582
+ overlay: C,
3583
+ originalPosition: o,
3584
+ originalOverflow: s,
3585
+ originalContain: c,
3586
+ isDimmed: !1,
3587
+ autoHideSub: null,
3588
+ options: r,
3589
+ reducedMotion: i,
3590
+ isVisible: document.visibilityState === "visible"
3591
+ }, this.coordinator.register(this, e);
3592
+ }
3593
+ scheduleAutoHide(e) {
3594
+ !this.state || e.autoHideDuration <= 0 || (this.state.autoHideSub = D(e.autoHideDuration).pipe(N(1), I(() => {
3595
+ this.state && (this.state.autoHideSub = null, this.hide(this.state.options));
3596
+ })).subscribe());
3597
+ }
3598
+ hide(e) {
3599
+ if (!this.state?.overlay || (this.state.autoHideSub && (this.state.autoHideSub.unsubscribe(), this.state.autoHideSub = null), this.state.isDimmed)) return;
3600
+ this.state.isDimmed = !0;
3601
+ let n = this.state.overlay, r = this.state.options, i = this.state.reducedMotion, o = i ? 0 : e.fadeOutDuration, s = i ? "linear" : t(a);
3602
+ if (e.idleOpacity <= 0) return void n.animate([
3603
+ {
3604
+ opacity: r.intensity,
3605
+ transform: "scale(1)",
3606
+ filter: "blur(0px) saturate(1)"
3607
+ },
3608
+ {
3609
+ opacity: .4 * r.intensity,
3610
+ transform: "scale(0.95)",
3611
+ filter: `blur(${8 * r.blur}px) saturate(0.7)`
3612
+ },
3613
+ {
3614
+ opacity: 0,
3615
+ transform: "scale(0.9)",
3616
+ filter: `blur(${15 * r.blur}px) saturate(0.3)`
3617
+ }
3618
+ ], {
3619
+ duration: o,
3620
+ easing: s,
3621
+ fill: "forwards"
3622
+ });
3623
+ let c = n.animate([
3624
+ {
3625
+ opacity: r.intensity,
3626
+ transform: "scale(1)",
3627
+ filter: "blur(0px) saturate(1)"
3628
+ },
3629
+ {
3630
+ opacity: .5 * r.intensity,
3631
+ transform: "scale(0.99)",
3632
+ filter: `blur(${3 * r.blur}px) saturate(0.75)`
3633
+ },
3634
+ {
3635
+ opacity: e.idleOpacity,
3636
+ transform: "scale(1)",
3637
+ filter: `blur(${8 * r.blur}px) saturate(0.4)`
3638
+ }
3639
+ ], {
3640
+ duration: o,
3641
+ easing: s,
3642
+ fill: "forwards"
3643
+ });
3644
+ e.idleBreathe && !i && w(c.finished).pipe(N(1), O(() => m)).subscribe(() => {
3645
+ this.state?.overlay && (this.state.overlay.style.animation = `nebula-idle-breathe ${12e3 / r.speed}ms ${ht} infinite`);
3646
+ });
3647
+ }
3648
+ cleanup() {
3649
+ this.state &&= (this.coordinator.unregister(this, this.state.element), this.state.autoHideSub?.unsubscribe(), this.state.overlay?.remove(), this.state.element.style.position = this.state.originalPosition, this.state.element.style.overflow = this.state.originalOverflow, this.state.element.style.contain = this.state.originalContain, null);
3650
+ }
3651
+ disconnected() {
3652
+ this.cleanup();
3653
+ }
3654
+ reconnected() {
3655
+ this.state && this.coordinator.register(this, this.state.element);
3656
+ }
3657
+ }), bt = {
3658
+ smooth: n,
3659
+ snappy: r,
3660
+ bouncy: i,
3661
+ gentle: a
3662
+ }, xt = B(class extends z {
3663
+ constructor(e) {
3664
+ if (super(e), this.initialized = !1, this.element = null, e.type !== H.ELEMENT) throw Error("reveal() can only be used on elements");
3665
+ }
3666
+ render(e, t) {
3667
+ return L;
3668
+ }
3669
+ update(e, [n = !1, r = {}]) {
3670
+ let i = e.element;
3671
+ this.element = i;
3672
+ let { preset: a = "smooth", maxHeight: s = "10rem", duration: c, easing: l } = r, u = bt[a], d = c ?? u.duration, f = l ?? t(u), p = o.value;
3673
+ return this.initialized ||= (this.setupElement(i, d, f, p), !0), n ? (i.style.maxHeight = s, i.style.opacity = "1", i.style.transform = "translateY(0) scale(1)", i.style.pointerEvents = "", i.style.paddingTop = "", i.style.paddingBottom = "", i.style.marginTop = "", i.style.marginBottom = "", i.removeAttribute("aria-hidden"), i.removeAttribute("inert")) : (i.style.maxHeight = "0", i.style.opacity = "0", i.style.transform = "translateY(-8px) scale(0.98)", i.style.pointerEvents = "none", i.style.paddingTop = "0", i.style.paddingBottom = "0", i.style.marginTop = "0", i.style.marginBottom = "0", i.setAttribute("aria-hidden", "true"), i.setAttribute("inert", "")), L;
3674
+ }
3675
+ setupElement(e, t, n, r) {
3676
+ e.style.overflow = "hidden", e.style.transition = r ? "none" : [
3677
+ `max-height ${t}ms ${n}`,
3678
+ `opacity ${t}ms ${n}`,
3679
+ `transform ${t}ms ${n}`,
3680
+ `padding ${t}ms ${n}`,
3681
+ `margin ${t}ms ${n}`
3682
+ ].join(", ");
3683
+ }
3684
+ disconnected() {
3685
+ this.element && (this.element.style.willChange = "");
3686
+ }
3687
+ reconnected() {}
3688
+ }), St = !1, Ct = U(class extends z {
3689
+ constructor(...e) {
3690
+ super(...e), this.teardown$ = new g();
3691
+ }
3692
+ render() {}
3693
+ update(e) {
3694
+ if (e.type !== H.ELEMENT) throw Error("ripple directive must be used on an element");
3695
+ this.element = e.element, function() {
3696
+ if (St) return;
3697
+ let e = document.createElement("style");
3698
+ e.id = "schmancy-ripple-shared", e.textContent = "\n .schmancy-ripple-effect {\n position: absolute;\n border-radius: 50%;\n background: var(--schmancy-sys-color-surface-on);\n opacity: 0.12;\n transform: scale(0);\n animation: schmancy-ripple-expand 600ms linear forwards;\n pointer-events: none;\n aria-hidden: true;\n }\n @keyframes schmancy-ripple-expand {\n to { transform: scale(4); opacity: 0; }\n }\n ", document.head.appendChild(e), St = !0;
3699
+ }(), getComputedStyle(this.element).position === "static" && (this.element.style.position = "relative"), this.element.style.overflow = "hidden", this.teardown$.next(), T(this.element, "click").pipe(P(this.teardown$)).subscribe((e) => this.addRipple(e));
3700
+ }
3701
+ reconnected() {
3702
+ this.teardown$.next(), T(this.element, "click").pipe(P(this.teardown$)).subscribe((e) => this.addRipple(e));
3703
+ }
3704
+ addRipple(e) {
3705
+ let t = this.element.getBoundingClientRect(), n = Math.max(t.width, t.height), r = n / 2, i = document.createElement("span");
3706
+ i.className = "schmancy-ripple-effect", i.setAttribute("aria-hidden", "true"), i.style.width = `${n}px`, i.style.height = `${n}px`, i.style.left = e.clientX - t.left - r + "px", i.style.top = e.clientY - t.top - r + "px", this.element.appendChild(i), T(i, "animationend").pipe(N(1)).subscribe(() => i.remove());
3707
+ }
3708
+ disconnected() {
3709
+ this.teardown$.next();
3710
+ }
3711
+ }), wt = "schmancy-overflow-within-hidden", Tt = !1, Et = B(class extends z {
3712
+ constructor(...e) {
3713
+ super(...e), this.element = null, this.disconnecting$ = new g();
3714
+ }
3715
+ render(e) {
3716
+ return L;
3717
+ }
3718
+ update(e, [t = {}]) {
3719
+ if (e.type !== H.ELEMENT) throw Error("overflowWithin directive can only be used on elements");
3720
+ let n = e.element, { hide: r = !1, direction: i = "both", name: a, debounce: o = 10 } = t, s = n.style;
3721
+ s.minHeight = "0", s.minWidth = "0", s.boxSizing = "border-box", s.overflowY = i === "horizontal" ? "hidden" : "auto", s.overflowX = i === "vertical" ? "hidden" : "auto", s.scrollBehavior = "smooth", s.overscrollBehavior = "contain", r ? (function() {
3722
+ if (Tt) return;
3723
+ Tt = !0;
3724
+ let e = new CSSStyleSheet();
3725
+ e.replaceSync(`.${wt} { scrollbar-width: none; -ms-overflow-style: none; }\n\t\t .${wt}::-webkit-scrollbar { display: none; }`), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
3726
+ }(), n.classList.add(wt)) : n.classList.remove(wt);
3727
+ let c = this.element !== n, l = this.currentName !== a;
3728
+ return c ? (this.element = n, this.subscribe(o, a)) : l && (this.disconnecting$.next(), this.disconnecting$ = new g(), this.subscribe(o, a)), this.currentName = a, L;
3729
+ }
3730
+ subscribe(e, t) {
3731
+ if (!this.element) return;
3732
+ let n = this.element;
3733
+ T(n, "scroll", { passive: !0 }).pipe(x(e), re(this.disconnecting$)).subscribe((e) => {
3734
+ n.dispatchEvent(new CustomEvent("scroll", {
3735
+ detail: {
3736
+ scrollTop: n.scrollTop,
3737
+ scrollHeight: n.scrollHeight,
3738
+ clientHeight: n.clientHeight,
3739
+ scrollLeft: n.scrollLeft,
3740
+ scrollWidth: n.scrollWidth,
3741
+ clientWidth: n.clientWidth,
3742
+ e
3743
+ },
3744
+ bubbles: !0,
3745
+ composed: !0
3746
+ }));
3747
+ }), t !== void 0 && T(window, "@schmancy:scrollTo").pipe(C((e) => e.detail.name === t && e.detail.action === "scrollTo"), re(this.disconnecting$)).subscribe((e) => {
3748
+ let t = {
3749
+ behavior: "smooth",
3750
+ top: e.detail.top
3751
+ };
3752
+ typeof e.detail.left == "number" && (t.left = e.detail.left), n.scrollTo(t);
3753
+ });
3754
+ }
3755
+ disconnected() {
3756
+ this.disconnecting$.next(), this.element = null;
3757
+ }
3758
+ reconnected() {
3759
+ this.element && (this.disconnecting$ = new g(), this.subscribe(10, this.currentName));
3760
+ }
3761
+ }), Dt = {
3762
+ error: [
3763
+ "#ef4444",
3764
+ "#dc2626",
3765
+ "#b91c1c",
3766
+ "#fca5a5",
3767
+ "#fee2e2"
3768
+ ],
3769
+ warning: [
3770
+ "#f59e0b",
3771
+ "#d97706",
3772
+ "#b45309",
3773
+ "#fcd34d",
3774
+ "#fef3c7"
3775
+ ],
3776
+ primary: [
3777
+ "#3b82f6",
3778
+ "#2563eb",
3779
+ "#1d4ed8",
3780
+ "#93c5fd",
3781
+ "#dbeafe"
3782
+ ]
3783
+ }, Ot = {
3784
+ error: 0,
3785
+ warning: 1,
3786
+ primary: 2
3787
+ }, kt = class t {
3788
+ static {
3789
+ this.instance = null;
3790
+ }
3791
+ constructor() {
3792
+ this.container = null, this.stylesInjected = !1, this.shardPools = new Map([
3793
+ [0, []],
3794
+ [1, []],
3795
+ [2, []]
3796
+ ]), this.activeShards = [], this.animationId = null, this.instances = /* @__PURE__ */ new Set(), this.tabVisible = !0, this.visibilityObserver = null, this.elementVisibility = /* @__PURE__ */ new WeakMap(), this.observedElements = /* @__PURE__ */ new WeakSet(), this.lastSoundTime = 0, this.SOUND_THROTTLE_MS = 150, document.addEventListener("visibilitychange", () => {
3797
+ this.tabVisible = document.visibilityState === "visible", this.tabVisible ? (this.resumeAllAnimations(), this.startAnimationLoop()) : (this.pauseAllAnimations(), this.stopAnimationLoop(), this.clearAllShards());
3798
+ });
3799
+ }
3800
+ static getInstance() {
3801
+ return t.instance ||= new t(), t.instance;
3802
+ }
3803
+ ensureInitialized() {
3804
+ this.ensureStyles(), this.ensureContainer(), this.ensureObserver();
3805
+ }
3806
+ ensureStyles() {
3807
+ if (this.stylesInjected) return;
3808
+ let e = document.createElement("style");
3809
+ e.id = "urgent-shard-styles", e.textContent = "\n .urgent-shard {\n position: absolute;\n transform-origin: center;\n will-change: transform, opacity;\n pointer-events: none;\n contain: layout style;\n }\n .urgent-container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n overflow: visible;\n z-index: 9999;\n contain: strict;\n }\n ", document.head.appendChild(e), this.stylesInjected = !0;
3810
+ }
3811
+ ensureContainer() {
3812
+ this.container && this.container.isConnected || (this.container = document.createElement("div"), this.container.className = "urgent-container", document.body.appendChild(this.container));
3813
+ }
3814
+ ensureObserver() {
3815
+ this.visibilityObserver ||= new IntersectionObserver((e) => {
3816
+ for (let t of e) this.elementVisibility.set(t.target, t.isIntersecting);
3817
+ }, { threshold: 0 });
3818
+ }
3819
+ register(e) {
3820
+ this.ensureInitialized(), this.instances.add(e), this.startAnimationLoop();
3821
+ }
3822
+ unregister(e) {
3823
+ this.instances.delete(e), this.instances.size === 0 && this.stopAnimationLoop();
3824
+ }
3825
+ observeElement(e) {
3826
+ this.observedElements.has(e) || (this.ensureObserver(), this.visibilityObserver.observe(e), this.observedElements.add(e), this.elementVisibility.set(e, !0));
3827
+ }
3828
+ unobserveElement(e) {
3829
+ this.visibilityObserver?.unobserve(e), this.observedElements.delete(e);
3830
+ }
3831
+ isElementVisible(e) {
3832
+ return this.elementVisibility.get(e) ?? !0;
3833
+ }
3834
+ isTabVisible() {
3835
+ return this.tabVisible;
3836
+ }
3837
+ acquireShard(e, t) {
3838
+ let n = this.shardPools.get(e).pop();
3839
+ n || (n = document.createElement("div"), n.className = "urgent-shard", this.container.appendChild(n));
3840
+ let r = 4 + 12 * Math.random(), i = 4 + 12 * Math.random(), a = t[Math.floor(Math.random() * t.length)];
3841
+ return Object.assign(n.style, {
3842
+ width: `${r}px`,
3843
+ height: `${i}px`,
3844
+ background: `linear-gradient(${360 * Math.random()}deg,${a},transparent)`,
3845
+ clipPath: `polygon(${30 * Math.random()}% ${30 * Math.random()}%,${70 + 30 * Math.random()}% ${40 * Math.random()}%,${60 + 40 * Math.random()}% ${60 + 40 * Math.random()}%,${40 * Math.random()}% ${70 + 30 * Math.random()}%)`,
3846
+ boxShadow: `0 0 ${2 + 4 * Math.random()}px ${t[0]}88`,
3847
+ opacity: "1"
3848
+ }), n;
3849
+ }
3850
+ releaseShard(e, t) {
3851
+ Object.assign(e.style, {
3852
+ opacity: "0",
3853
+ transform: "translate(-9999px,-9999px)"
3854
+ }), this.shardPools.get(t).push(e);
3855
+ }
3856
+ addShards(e) {
3857
+ this.activeShards.push(...e);
3858
+ }
3859
+ clearAllShards() {
3860
+ for (let e of this.activeShards) this.releaseShard(e.element, e.colorIndex);
3861
+ this.activeShards = [];
3862
+ }
3863
+ startAnimationLoop() {
3864
+ if (this.animationId !== null || !this.tabVisible) return;
3865
+ let e = () => {
3866
+ this.updateShards(), this.updateInstanceTimers(), this.instances.size > 0 && this.tabVisible ? this.animationId = requestAnimationFrame(e) : this.animationId = null;
3867
+ };
3868
+ this.animationId = requestAnimationFrame(e);
3869
+ }
3870
+ stopAnimationLoop() {
3871
+ this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null);
3872
+ }
3873
+ updateShards() {
3874
+ let e = this.activeShards;
3875
+ for (let t = e.length - 1; t >= 0; t--) {
3876
+ let n = e[t];
3877
+ n.life++, n.x += n.vx, n.y += n.vy, n.vy += .15, n.vx *= .98, n.rotation += n.rotationSpeed;
3878
+ let r = n.life / n.maxLife, i = Math.max(0, 1 - r * r), a = n.initialScale * (1 - .5 * r);
3879
+ n.element.style.transform = `translate3d(${n.x}px,${n.y}px,0) rotate(${n.rotation}deg) scale(${a})`, n.element.style.opacity = String(i), n.life >= n.maxLife && (this.releaseShard(n.element, n.colorIndex), e.splice(t, 1));
3880
+ }
3881
+ }
3882
+ updateInstanceTimers() {
3883
+ let e = performance.now();
3884
+ for (let t of this.instances) t.checkBurstTimer(e);
3885
+ }
3886
+ pauseAllAnimations() {
3887
+ for (let e of this.instances) e.pauseAnimations();
3888
+ }
3889
+ resumeAllAnimations() {
3890
+ for (let e of this.instances) e.resumeAnimations();
3891
+ }
3892
+ playSound(t) {
3893
+ let n = performance.now();
3894
+ if (n - this.lastSoundTime < this.SOUND_THROTTLE_MS) return;
3895
+ this.lastSoundTime = n;
3896
+ let r = t === "error" ? "anxious" : t === "warning" ? "worried" : "curious";
3897
+ e.play(r);
3898
+ }
3899
+ destroy() {
3900
+ this.stopAnimationLoop(), this.visibilityObserver?.disconnect(), this.container?.remove(), this.shardPools.forEach((e) => e.forEach((e) => e.remove())), this.shardPools.clear(), this.activeShards = [], t.instance = null;
3901
+ }
3902
+ }, At = /* @__PURE__ */ new WeakMap(), jt = B(class extends z {
3903
+ constructor(...e) {
3904
+ super(...e), this.state = null, this.coordinator = kt.getInstance();
3905
+ }
3906
+ render(e, t, n) {
3907
+ return L;
3908
+ }
3909
+ update(e, t) {
3910
+ let n = e.element, r, i, a, o, s, c = t[0];
3911
+ if (typeof c == "object" && c ? (r = c.active ?? !1, i = c.color ?? "error", a = c.shake ?? !0, o = c.mode ?? "auto", s = c.interval ?? 4e3) : (r = typeof c == "boolean" && c, i = t[1] ?? "error", a = t[2] ?? !0, o = "auto", s = 4e3), !r && this.state?.active) return this.cleanup(), L;
3912
+ if (this.state && this.state.active === r && this.state.color === i && this.state.shake === a && this.state.mode === o && this.state.interval === s) return L;
3913
+ if (!this.state || this.state.color === i && this.state.shake === a && this.state.mode === o && this.state.interval === s || this.cleanup(), r && !this.state) {
3914
+ let e = n.style.position, t = n.style.overflow;
3915
+ this.state = {
3916
+ active: r,
3917
+ color: i,
3918
+ shake: a,
3919
+ mode: o,
3920
+ interval: s,
3921
+ element: n,
3922
+ originalPosition: e,
3923
+ originalOverflow: t,
3924
+ shakeAnimation: null,
3925
+ pulseAnimation: null,
3926
+ isRunning: !1,
3927
+ lastBurstTime: performance.now() + Math.random() * s,
3928
+ initialized: !1
3929
+ }, At.set(n, this.createController()), this.coordinator.register(this), this.coordinator.observeElement(n), requestAnimationFrame(() => {
3930
+ this.state && (this.initializeElement(), o === "auto" && this.startBurstInterval());
3931
+ });
3932
+ }
3933
+ return L;
3934
+ }
3935
+ initializeElement() {
3936
+ if (!this.state || this.state.initialized) return;
3937
+ let { element: e, color: t, shake: n } = this.state, r = Dt[t];
3938
+ getComputedStyle(e).position === "static" && (e.style.position = "relative"), e.style.overflow = "visible", n && (this.state.shakeAnimation = e.animate([
3939
+ { transform: "rotate(0deg) scale(1)" },
3940
+ { transform: "rotate(-2deg) scale(1.02)" },
3941
+ { transform: "rotate(2deg) scale(1.02)" },
3942
+ { transform: "rotate(-1deg) scale(1.01)" },
3943
+ { transform: "rotate(1deg) scale(1.01)" },
3944
+ { transform: "rotate(0deg) scale(1)" }
3945
+ ], {
3946
+ duration: 400,
3947
+ easing: "ease-in-out",
3948
+ iterations: Infinity
3949
+ })), this.state.pulseAnimation = e.animate([
3950
+ { boxShadow: `0 0 0 0 ${r[0]}66` },
3951
+ { boxShadow: `0 0 20px 5px ${r[0]}33` },
3952
+ { boxShadow: `0 0 0 0 ${r[0]}66` }
3953
+ ], {
3954
+ duration: 1500,
3955
+ easing: "ease-in-out",
3956
+ iterations: Infinity
3957
+ }), this.coordinator.playSound(t), this.state.initialized = !0;
3958
+ }
3959
+ checkBurstTimer(e) {
3960
+ this.state && this.state.isRunning && this.coordinator.isTabVisible() && this.coordinator.isElementVisible(this.state.element) && e - this.state.lastBurstTime >= this.state.interval && (this.state.lastBurstTime = e, this.createBurst());
3961
+ }
3962
+ createBurst() {
3963
+ if (!this.state) return;
3964
+ let { element: e, color: t } = this.state, n = Dt[t], r = Ot[t], i = e.getBoundingClientRect(), a = i.left + i.width / 2, o = i.top + i.height / 2, s = 8 + Math.floor(5 * Math.random()), c = [];
3965
+ for (let e = 0; e < s; e++) {
3966
+ let e = this.coordinator.acquireShard(r, n), t = Math.random() * Math.PI * 2, i = 2 + 4 * Math.random();
3967
+ c.push({
3968
+ element: e,
3969
+ colorIndex: r,
3970
+ x: a,
3971
+ y: o,
3972
+ vx: Math.cos(t) * i,
3973
+ vy: Math.sin(t) * i,
3974
+ rotation: 360 * Math.random(),
3975
+ rotationSpeed: 30 * Math.random() - 15,
3976
+ initialScale: .5 + .5 * Math.random(),
3977
+ life: 0,
3978
+ maxLife: 40 + 30 * Math.random()
3979
+ });
3980
+ }
3981
+ this.coordinator.addShards(c), this.coordinator.playSound(t);
3982
+ }
3983
+ pauseAnimations() {
3984
+ this.state?.shakeAnimation?.pause(), this.state?.pulseAnimation?.pause();
3985
+ }
3986
+ resumeAnimations() {
3987
+ this.state?.shakeAnimation?.play(), this.state?.pulseAnimation?.play();
3988
+ }
3989
+ createController() {
3990
+ let e = this;
3991
+ return {
3992
+ play: () => e.playOnce(),
3993
+ start: (t) => {
3994
+ e.state && t !== void 0 && (e.state.interval = t), e.startBurstInterval();
3995
+ },
3996
+ stop: () => e.stopBurstInterval(),
3997
+ get isRunning() {
3998
+ return e.state?.isRunning ?? !1;
3999
+ }
4000
+ };
4001
+ }
4002
+ playOnce() {
4003
+ this.state && (this.state.initialized || this.initializeElement(), this.createBurst());
4004
+ }
4005
+ startBurstInterval() {
4006
+ this.state && (this.state.isRunning = !0, this.state.lastBurstTime = performance.now());
4007
+ }
4008
+ stopBurstInterval() {
4009
+ this.state && (this.state.isRunning = !1);
4010
+ }
4011
+ cleanup() {
4012
+ this.state &&= (this.coordinator.unregister(this), this.coordinator.unobserveElement(this.state.element), this.state.shakeAnimation?.cancel(), this.state.pulseAnimation?.cancel(), At.delete(this.state.element), this.state.originalPosition !== void 0 && (this.state.element.style.position = this.state.originalPosition), this.state.originalOverflow !== void 0 && (this.state.element.style.overflow = this.state.originalOverflow), null);
4013
+ }
4014
+ disconnected() {
4015
+ this.cleanup();
4016
+ }
4017
+ }), Mt = Object.assign((e, t, n) => jt(e, t, n), { getController: (e) => At.get(e) }), Nt = 10, Pt = B(class extends z {
4018
+ constructor(...e) {
4019
+ super(...e), this.state = null;
4020
+ }
4021
+ render(e) {
4022
+ return L;
4023
+ }
4024
+ update(e, [t]) {
4025
+ let n = e.element, r = n.offsetWidth || n.clientWidth, { active: i, color: a = "var(--md-sys-color-primary)", travelWidth: o = r } = t;
4026
+ return !i && this.state ? (this.cleanup(), L) : i ? (!this.state || this.state.color === a && this.state.travelWidth === o || this.cleanup(), this.state || (this.state = {
4027
+ active: !0,
4028
+ color: a,
4029
+ travelWidth: o,
4030
+ element: n,
4031
+ segments: [],
4032
+ isVisible: !0,
4033
+ startTime: performance.now()
4034
+ }, getComputedStyle(n).position === "static" && (n.style.position = "relative"), this.createOverlay(), this.setupVisibilityObserver(), this.startAnimation()), L) : L;
4035
+ }
4036
+ createOverlay() {
4037
+ if (!this.state) return;
4038
+ let { element: e, color: t, travelWidth: n } = this.state, r = document.createElement("div");
4039
+ r.className = "working-snake-overlay", r.style.cssText = `\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ${n}px;\n\t\t\theight: 20px;\n\t\t\ttransform: translateY(-50%);\n\t\t\tpointer-events: none;\n\t\t\toverflow: visible;\n\t\t\tz-index: 5;\n\t\t`;
4040
+ let i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4041
+ i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("viewBox", `0 0 ${n} 20`), i.setAttribute("preserveAspectRatio", "none"), i.style.cssText = "\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: visible;\n ";
4042
+ let a = [];
4043
+ for (let e = 0; e < Nt; e++) {
4044
+ let n = document.createElementNS("http://www.w3.org/2000/svg", "circle"), r = 4 - e / 9 * 2.5;
4045
+ n.setAttribute("r", r.toString()), n.setAttribute("fill", t), n.setAttribute("cy", "10"), n.style.willChange = "transform, opacity";
4046
+ let o = e / Nt * .5, s = e / Nt * Math.PI * 2;
4047
+ a.push({
4048
+ element: n,
4049
+ progress: o,
4050
+ phase: s
4051
+ }), i.appendChild(n);
4052
+ }
4053
+ r.appendChild(i), e.appendChild(r), this.state.overlayElement = r, this.state.svg = i, this.state.segments = a;
4054
+ }
4055
+ setupVisibilityObserver() {
4056
+ this.state && typeof IntersectionObserver < "u" && (this.state.observer = new IntersectionObserver((e) => {
4057
+ if (!this.state) return;
4058
+ let t = e[0].isIntersecting;
4059
+ t && !this.state.isVisible ? (this.state.isVisible = !0, this.startAnimation()) : !t && this.state.isVisible && (this.state.isVisible = !1, this.state.animationId && (cancelAnimationFrame(this.state.animationId), this.state.animationId = void 0));
4060
+ }, { threshold: 0 }), this.state.observer.observe(this.state.element));
4061
+ }
4062
+ startAnimation() {
4063
+ if (!this.state || !this.state.isVisible) return;
4064
+ let e = (t) => {
4065
+ if (!this.state || !this.state.isVisible) return;
4066
+ let n = (t - this.state.startTime) % 3e3 / 3e3, { segments: r, travelWidth: i } = this.state;
4067
+ for (let e = 0; e < r.length; e++) {
4068
+ let a = r[e], o = (n + e / Nt) % 1, s = 1 - (1 - o) ** 2, c = s * i, l = 10 + 3 * Math.sin(o * Math.PI * 4 + a.phase), u = (e === 0 ? .9 : .7 - e / Nt * .55) * (1 - .7 * s), d = 1;
4069
+ e === 0 && (d = .1 * Math.sin(t / 200) + 1), a.element.setAttribute("cx", c.toFixed(1)), a.element.setAttribute("cy", l.toFixed(1)), a.element.setAttribute("opacity", Math.max(.1, u).toFixed(2)), d !== 1 && (a.element.style.transform = `scale(${d.toFixed(2)})`, a.element.style.transformOrigin = `${c}px ${l}px`);
4070
+ }
4071
+ this.state.animationId = requestAnimationFrame(e);
4072
+ };
4073
+ this.state.animationId = requestAnimationFrame(e);
4074
+ }
4075
+ cleanup() {
4076
+ this.state &&= (this.state.animationId && cancelAnimationFrame(this.state.animationId), this.state.observer && this.state.observer.disconnect(), this.state.overlayElement && this.state.overlayElement.remove(), null);
4077
+ }
4078
+ disconnected() {
4079
+ this.cleanup();
4080
+ }
4081
+ });
4082
+ export { me as A, Le as C, Me as D, Pe as E, Ae as O, ze as S, Fe as T, qe as _, xt as a, Ve as b, ft as c, rt as d, nt as f, Ge as g, Ye as h, Ct as i, he as k, ut as l, Xe as m, Mt as n, yt as o, Ze as p, Et as r, pt as s, Pt as t, st as u, Ke as v, Ie as w, Be as x, Je as y };