@mhmo91/schmancy 0.10.24 → 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 (426) hide show
  1. package/dist/agent/{overlay.confirm-body-CvdVfCnN.js → overlay.confirm-body-DozUyDYx.js} +242 -242
  2. package/dist/agent/{overlay.confirm-body-CvdVfCnN.js.map → overlay.confirm-body-DozUyDYx.js.map} +1 -1
  3. package/dist/agent/schmancy.agent.js +5658 -2927
  4. package/dist/agent/schmancy.agent.js.map +1 -1
  5. package/dist/{area-A_oUP4P1.js → area-1EG1LrkX.js} +1 -1
  6. package/dist/{area-A_oUP4P1.js.map → area-1EG1LrkX.js.map} +1 -1
  7. package/dist/{area-BuqdaUpQ.cjs → area-DrVE5pXW.cjs} +1 -1
  8. package/dist/{area-BuqdaUpQ.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-Cy46gJxK.cjs → autocomplete-6pdZxEab.cjs} +1 -1
  12. package/dist/{autocomplete-Cy46gJxK.cjs.map → autocomplete-6pdZxEab.cjs.map} +1 -1
  13. package/dist/{autocomplete-BoCWO26L.js → autocomplete-nrIcCilw.js} +2 -2
  14. package/dist/{autocomplete-BoCWO26L.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-B0h5fuAA.js → boat--fLgbDAE.js} +3 -3
  23. package/dist/{boat-B0h5fuAA.js.map → boat--fLgbDAE.js.map} +1 -1
  24. package/dist/{boat-RRtBhD3x.cjs → boat-BIB-gPqy.cjs} +1 -1
  25. package/dist/{boat-RRtBhD3x.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-Bn6Pioo8.cjs → busy-DVCIxBVf.cjs} +1 -1
  31. package/dist/{busy-Bn6Pioo8.cjs.map → busy-DVCIxBVf.cjs.map} +1 -1
  32. package/dist/{busy-DObY7lfu.js → busy-DshZcVZ4.js} +1 -1
  33. package/dist/{busy-DObY7lfu.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-DEi3M2nV.js → button-D9UJ7I6Z.js} +2 -2
  37. package/dist/{button-DEi3M2nV.js.map → button-D9UJ7I6Z.js.map} +1 -1
  38. package/dist/{button-XfdPzfZQ.cjs → button-JrTMzwHY.cjs} +1 -1
  39. package/dist/{button-XfdPzfZQ.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-jzUQK0EQ.js → card-BvCFuX3J.js} +2 -2
  43. package/dist/{card-jzUQK0EQ.js.map → card-BvCFuX3J.js.map} +1 -1
  44. package/dist/{card-BjUgRzFh.cjs → card-CTotavhH.cjs} +1 -1
  45. package/dist/{card-BjUgRzFh.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-rskgUBxQ.cjs → checkbox-By4fFmjt.cjs} +1 -1
  49. package/dist/{checkbox-rskgUBxQ.cjs.map → checkbox-By4fFmjt.cjs.map} +1 -1
  50. package/dist/{checkbox-CfCm1vGN.js → checkbox-GPsdCUbs.js} +1 -1
  51. package/dist/{checkbox-CfCm1vGN.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-Dfim_tQv.js → chips-27umqnat.js} +4 -4
  55. package/dist/{chips-Dfim_tQv.js.map → chips-27umqnat.js.map} +1 -1
  56. package/dist/{chips-BiNZKu0J.cjs → chips-BZf9sGA8.cjs} +1 -1
  57. package/dist/{chips-BiNZKu0J.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-em7OwhlK.cjs → date-range-BJnLWCRF.cjs} +1 -1
  69. package/dist/{date-range-em7OwhlK.cjs.map → date-range-BJnLWCRF.cjs.map} +1 -1
  70. package/dist/{date-range-inline-DYeqoBIO.cjs → date-range-inline-B6uKUliV.cjs} +1 -1
  71. package/dist/{date-range-inline-DYeqoBIO.cjs.map → date-range-inline-B6uKUliV.cjs.map} +1 -1
  72. package/dist/{date-range-inline-BfUL8_vX.js → date-range-inline-BNbbRfIA.js} +1 -1
  73. package/dist/{date-range-inline-BfUL8_vX.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-B8zoj6Cj.js → date-range-wDVHcr0u.js} +2 -2
  77. package/dist/{date-range-B8zoj6Cj.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-D246xN83.js → details-Ckxpwacj.js} +4 -4
  83. package/dist/{details-D246xN83.js.map → details-Ckxpwacj.js.map} +1 -1
  84. package/dist/{details-CNM1tuma.cjs → details-DNrWIes6.cjs} +1 -1
  85. package/dist/{details-CNM1tuma.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-CbIp1je9.js → divider-BzcZGo4S.js} +1 -1
  101. package/dist/{divider-CbIp1je9.js.map → divider-BzcZGo4S.js.map} +1 -1
  102. package/dist/{divider-DaKsGNW-.cjs → divider-Cde33ivs.cjs} +1 -1
  103. package/dist/{divider-DaKsGNW-.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-DRkiO4vw.js → expand-DI144OzN.js} +3 -3
  109. package/dist/{expand-DRkiO4vw.js.map → expand-DI144OzN.js.map} +1 -1
  110. package/dist/{expand-CQDm3BF3.cjs → expand-Db4V0jj-.cjs} +1 -1
  111. package/dist/{expand-CQDm3BF3.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-5O26zNRh.cjs → float--RScf9BZ.cjs} +1 -1
  115. package/dist/{float-5O26zNRh.cjs.map → float--RScf9BZ.cjs.map} +1 -1
  116. package/dist/{float-CZtu8FnO.js → float-DIyzy1c2.js} +1 -1
  117. package/dist/{float-CZtu8FnO.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-B90CMeqs.cjs → form-DWNpOsIU.cjs} +1 -1
  121. package/dist/{form-B90CMeqs.cjs.map → form-DWNpOsIU.cjs.map} +1 -1
  122. package/dist/{form-CE6Gwz4r.js → form-RtXH8UHQ.js} +8 -8
  123. package/dist/{form-CE6Gwz4r.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-D98csbEo.cjs → iframe-B1XWRaLC.cjs} +1 -1
  137. package/dist/{iframe-D98csbEo.cjs.map → iframe-B1XWRaLC.cjs.map} +1 -1
  138. package/dist/{iframe-C3PMj1MD.js → iframe-BlHK0cjy.js} +1 -1
  139. package/dist/{iframe-C3PMj1MD.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-_y92Pzon.cjs → input-C-_XU9AX.cjs} +1 -1
  145. package/dist/{input-_y92Pzon.cjs.map → input-C-_XU9AX.cjs.map} +1 -1
  146. package/dist/{input-CCOkeeVM.js → input-CiGa8Dkl.js} +1 -1
  147. package/dist/{input-CCOkeeVM.js.map → input-CiGa8Dkl.js.map} +1 -1
  148. package/dist/{input-chip-CR66MWml.cjs → input-chip-5aYnuRZ_.cjs} +1 -1
  149. package/dist/{input-chip-CR66MWml.cjs.map → input-chip-5aYnuRZ_.cjs.map} +1 -1
  150. package/dist/{input-chip-Bzwr5-XL.js → input-chip-l--zCMGR.js} +1 -1
  151. package/dist/{input-chip-Bzwr5-XL.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 +1 -1
  155. package/dist/json.js +2 -2
  156. package/dist/kbd.cjs +1 -1
  157. package/dist/kbd.js +1 -1
  158. package/dist/{layout-Dq2oeOTS.js → layout-DSAjo92m.js} +1 -1
  159. package/dist/{layout-Dq2oeOTS.js.map → layout-DSAjo92m.js.map} +1 -1
  160. package/dist/{layout-BbCIfIgo.cjs → layout-eXb9wjDh.cjs} +1 -1
  161. package/dist/{layout-BbCIfIgo.cjs.map → layout-eXb9wjDh.cjs.map} +1 -1
  162. package/dist/layout.cjs +1 -1
  163. package/dist/layout.js +1 -1
  164. package/dist/{lightbox-Bk3ovcVu.cjs → lightbox-CfRDkeeb.cjs} +2 -2
  165. package/dist/{lightbox-Bk3ovcVu.cjs.map → lightbox-CfRDkeeb.cjs.map} +1 -1
  166. package/dist/{lightbox-Dl--fEbP.js → lightbox-D9oiu1Nv.js} +2 -2
  167. package/dist/{lightbox-Dl--fEbP.js.map → lightbox-D9oiu1Nv.js.map} +1 -1
  168. package/dist/lightbox.cjs +1 -1
  169. package/dist/lightbox.js +1 -1
  170. package/dist/{list-B3WI_Nfs.js → list-BOlRka4v.js} +1 -1
  171. package/dist/{list-B3WI_Nfs.js.map → list-BOlRka4v.js.map} +1 -1
  172. package/dist/{list-DWngbP2X.cjs → list-CDJi3_Ut.cjs} +1 -1
  173. package/dist/{list-DWngbP2X.cjs.map → list-CDJi3_Ut.cjs.map} +1 -1
  174. package/dist/list.cjs +1 -1
  175. package/dist/list.js +1 -1
  176. package/dist/{magnetic-Bgh7aHHI.cjs → magnetic-D-ph029G.cjs} +1 -1
  177. package/dist/{magnetic-Bgh7aHHI.cjs.map → magnetic-D-ph029G.cjs.map} +1 -1
  178. package/dist/{magnetic-DxvoEz8_.js → magnetic-mHXl54Z8.js} +1 -1
  179. package/dist/{magnetic-DxvoEz8_.js.map → magnetic-mHXl54Z8.js.map} +1 -1
  180. package/dist/{menu-CdYjxJqm.cjs → menu-CJaDL2cd.cjs} +1 -1
  181. package/dist/{menu-CdYjxJqm.cjs.map → menu-CJaDL2cd.cjs.map} +1 -1
  182. package/dist/{menu-IDhVp6zm.js → menu-XyrLmCi_.js} +2 -2
  183. package/dist/{menu-IDhVp6zm.js.map → menu-XyrLmCi_.js.map} +1 -1
  184. package/dist/menu.cjs +1 -1
  185. package/dist/menu.js +1 -1
  186. package/dist/mixins-CsYsIJOI.cjs +254 -0
  187. package/dist/mixins-CsYsIJOI.cjs.map +1 -0
  188. package/dist/mixins-DySzfmal.js +642 -0
  189. package/dist/mixins-DySzfmal.js.map +1 -0
  190. package/dist/mixins.cjs +1 -1
  191. package/dist/mixins.js +2 -2
  192. package/dist/nav-drawer.cjs +1 -1
  193. package/dist/nav-drawer.js +1 -1
  194. package/dist/navigation-bar.cjs +1 -1
  195. package/dist/navigation-bar.js +1 -1
  196. package/dist/navigation-rail.cjs +5 -9
  197. package/dist/navigation-rail.cjs.map +1 -1
  198. package/dist/navigation-rail.js +5 -11
  199. package/dist/navigation-rail.js.map +1 -1
  200. package/dist/{notification-CllYkvlR.js → notification-CHrEY4u8.js} +2 -2
  201. package/dist/{notification-CllYkvlR.js.map → notification-CHrEY4u8.js.map} +1 -1
  202. package/dist/{notification-B3wVUC8l.cjs → notification-DKp4tjaB.cjs} +1 -1
  203. package/dist/{notification-B3wVUC8l.cjs.map → notification-DKp4tjaB.cjs.map} +1 -1
  204. package/dist/notification.cjs +1 -1
  205. package/dist/notification.js +1 -1
  206. package/dist/{option-CPOL0nHL.js → option-Vpy4UQ-D.js} +1 -1
  207. package/dist/{option-CPOL0nHL.js.map → option-Vpy4UQ-D.js.map} +1 -1
  208. package/dist/{option-cRsdshy8.cjs → option-nRk4MuXH.cjs} +1 -1
  209. package/dist/{option-cRsdshy8.cjs.map → option-nRk4MuXH.cjs.map} +1 -1
  210. package/dist/option.cjs +1 -1
  211. package/dist/option.js +1 -1
  212. package/dist/{overlay-BnTvnNDc.cjs → overlay-HNrWZ4sB.cjs} +1 -1
  213. package/dist/{overlay-BnTvnNDc.cjs.map → overlay-HNrWZ4sB.cjs.map} +1 -1
  214. package/dist/{overlay-DJ-vlwtR.js → overlay-jlkcrt8F.js} +5 -5
  215. package/dist/{overlay-DJ-vlwtR.js.map → overlay-jlkcrt8F.js.map} +1 -1
  216. package/dist/{overlay-stack-Dk0xETTy.cjs.map → overlay-stack-Bdr9lOqi.cjs.map} +1 -1
  217. package/dist/{overlay-stack-BR4iYivO.js.map → overlay-stack-D2rgxQLh.js.map} +1 -1
  218. package/dist/overlay.cjs +1 -1
  219. package/dist/{overlay.confirm-body-CQ-FwySO.cjs → overlay.confirm-body-B8dFI3cj.cjs} +1 -1
  220. package/dist/{overlay.confirm-body-CQ-FwySO.cjs.map → overlay.confirm-body-B8dFI3cj.cjs.map} +1 -1
  221. package/dist/{overlay.confirm-body-DEb9xw5N.js → overlay.confirm-body-CYShkjI6.js} +1 -1
  222. package/dist/{overlay.confirm-body-DEb9xw5N.js.map → overlay.confirm-body-CYShkjI6.js.map} +1 -1
  223. package/dist/overlay.js +3 -3
  224. package/dist/{overlay.service-CKBCIP2f.cjs → overlay.service-BTPn7Uv7.cjs} +1 -1
  225. package/dist/{overlay.service-CKBCIP2f.cjs.map → overlay.service-BTPn7Uv7.cjs.map} +1 -1
  226. package/dist/{overlay.service-XM1YHkTk.js → overlay.service-BqhhxVJp.js} +2 -2
  227. package/dist/{overlay.service-XM1YHkTk.js.map → overlay.service-BqhhxVJp.js.map} +1 -1
  228. package/dist/{progress-CnMPp-9a.js → progress-8Bn88GK_.js} +1 -1
  229. package/dist/{progress-CnMPp-9a.js.map → progress-8Bn88GK_.js.map} +1 -1
  230. package/dist/{progress-CcfLfHOE.cjs → progress-CAp_4jtq.cjs} +1 -1
  231. package/dist/{progress-CcfLfHOE.cjs.map → progress-CAp_4jtq.cjs.map} +1 -1
  232. package/dist/progress.cjs +1 -1
  233. package/dist/progress.js +1 -1
  234. package/dist/{radio-group-D97hflrE.cjs → radio-group-CN44mAoc.cjs} +1 -1
  235. package/dist/{radio-group-D97hflrE.cjs.map → radio-group-CN44mAoc.cjs.map} +1 -1
  236. package/dist/{radio-group-BUJgfQFi.js → radio-group-GNHA7qJR.js} +1 -1
  237. package/dist/{radio-group-BUJgfQFi.js.map → radio-group-GNHA7qJR.js.map} +1 -1
  238. package/dist/radio-group.cjs +1 -1
  239. package/dist/radio-group.js +1 -1
  240. package/dist/range.cjs +1 -1
  241. package/dist/range.js +1 -1
  242. package/dist/{reduced-motion-D7LqTUMn.js.map → reduced-motion-D-L12p7G.js.map} +1 -1
  243. package/dist/{reduced-motion-Dzfp_w5x.cjs.map → reduced-motion-Ds-HjMzn.cjs.map} +1 -1
  244. package/dist/{rxjs-utils-BK8VMe3K.js.map → rxjs-utils-BXpvHN4-.js.map} +1 -1
  245. package/dist/{rxjs-utils-DhOKenkS.cjs.map → rxjs-utils-CaC-tdot.cjs.map} +1 -1
  246. package/dist/rxjs-utils.cjs +1 -1
  247. package/dist/rxjs-utils.js +1 -1
  248. package/dist/{select-BWEh5nRM.js → select-BnuXRHS4.js} +3 -3
  249. package/dist/{select-BWEh5nRM.js.map → select-BnuXRHS4.js.map} +1 -1
  250. package/dist/{select-Cv5Oev6d.cjs → select-DZNns5Pa.cjs} +2 -2
  251. package/dist/{select-Cv5Oev6d.cjs.map → select-DZNns5Pa.cjs.map} +1 -1
  252. package/dist/select.cjs +1 -1
  253. package/dist/select.js +1 -1
  254. package/dist/skeleton.cjs +1 -1
  255. package/dist/skeleton.js +1 -1
  256. package/dist/skills/INDEX.md +2 -1
  257. package/dist/skills/SKILL.md +33 -23
  258. package/dist/skills/area.md +5 -4
  259. package/dist/skills/connectivity.md +1 -3
  260. package/dist/skills/directives.md +36 -0
  261. package/dist/skills/icons.md +95 -31
  262. package/dist/skills/layout.md +36 -53
  263. package/dist/skills/mixins.md +26 -5
  264. package/dist/skills/schmancy/INDEX.md +2 -1
  265. package/dist/skills/schmancy/SKILL.md +33 -23
  266. package/dist/skills/schmancy/area.md +5 -4
  267. package/dist/skills/schmancy/connectivity.md +1 -3
  268. package/dist/skills/schmancy/directives.md +36 -0
  269. package/dist/skills/schmancy/icons.md +95 -31
  270. package/dist/skills/schmancy/layout.md +36 -53
  271. package/dist/skills/schmancy/mixins.md +26 -5
  272. package/dist/slider.cjs +1 -1
  273. package/dist/slider.js +1 -1
  274. package/dist/{splash-screen-B6w7X2z9.js → splash-screen-CUP_elaT.js} +1 -1
  275. package/dist/{splash-screen-B6w7X2z9.js.map → splash-screen-CUP_elaT.js.map} +1 -1
  276. package/dist/{splash-screen-DFtxtO2D.cjs → splash-screen-DeoPRrOu.cjs} +1 -1
  277. package/dist/{splash-screen-DFtxtO2D.cjs.map → splash-screen-DeoPRrOu.cjs.map} +1 -1
  278. package/dist/splash-screen.cjs +1 -1
  279. package/dist/splash-screen.js +1 -1
  280. package/dist/{src-D_NK-vMA.js → src-B1VkLX3l.js} +153 -153
  281. package/dist/{src-D_NK-vMA.js.map → src-B1VkLX3l.js.map} +1 -1
  282. package/dist/{src-Asw6A018.cjs → src-DQ4wr0qq.cjs} +13 -13
  283. package/dist/{src-Asw6A018.cjs.map → src-DQ4wr0qq.cjs.map} +1 -1
  284. package/dist/steps.cjs +1 -1
  285. package/dist/steps.js +1 -1
  286. package/dist/{surface-B94ka2LY.cjs → surface-LkaZQXZn.cjs} +1 -1
  287. package/dist/{surface-B94ka2LY.cjs.map → surface-LkaZQXZn.cjs.map} +1 -1
  288. package/dist/{surface-ctBcRGSZ.js → surface-hOvkrjGN.js} +1 -1
  289. package/dist/{surface-ctBcRGSZ.js.map → surface-hOvkrjGN.js.map} +1 -1
  290. package/dist/surface.cjs +1 -1
  291. package/dist/surface.js +1 -1
  292. package/dist/switch.cjs +1 -1
  293. package/dist/switch.js +1 -1
  294. package/dist/table.cjs +1 -1
  295. package/dist/table.js +1 -1
  296. package/dist/{tabs-CrMx5z_y.js → tabs-CfwIHhHo.js} +1 -1
  297. package/dist/{tabs-CrMx5z_y.js.map → tabs-CfwIHhHo.js.map} +1 -1
  298. package/dist/{tabs-B7kaZIom.cjs → tabs-bplzstz6.cjs} +1 -1
  299. package/dist/{tabs-B7kaZIom.cjs.map → tabs-bplzstz6.cjs.map} +1 -1
  300. package/dist/tabs.cjs +1 -1
  301. package/dist/tabs.js +1 -1
  302. package/dist/teleport.cjs +1 -1
  303. package/dist/teleport.js +1 -1
  304. package/dist/{textarea-DeHFl80i.js → textarea-C1A5xuw9.js} +1 -1
  305. package/dist/{textarea-DeHFl80i.js.map → textarea-C1A5xuw9.js.map} +1 -1
  306. package/dist/{textarea-D1crj8JD.cjs → textarea-hrDp5gQq.cjs} +1 -1
  307. package/dist/{textarea-D1crj8JD.cjs.map → textarea-hrDp5gQq.cjs.map} +1 -1
  308. package/dist/textarea.cjs +1 -1
  309. package/dist/textarea.js +1 -1
  310. package/dist/{theme-C7Yo33nh.js → theme-BniFOMEo.js} +3 -3
  311. package/dist/{theme-C7Yo33nh.js.map → theme-BniFOMEo.js.map} +1 -1
  312. package/dist/{theme-wE2N7Yu9.cjs → theme-DmR6PKV8.cjs} +2 -2
  313. package/dist/{theme-wE2N7Yu9.cjs.map → theme-DmR6PKV8.cjs.map} +1 -1
  314. package/dist/{theme-button-Cpc_hs2O.js → theme-button--ruZIb0T.js} +1 -1
  315. package/dist/{theme-button-Cpc_hs2O.js.map → theme-button--ruZIb0T.js.map} +1 -1
  316. package/dist/{theme-button-CXSM5We4.cjs → theme-button-a0LgZ7hQ.cjs} +1 -1
  317. package/dist/{theme-button-CXSM5We4.cjs.map → theme-button-a0LgZ7hQ.cjs.map} +1 -1
  318. package/dist/theme-button.cjs +1 -1
  319. package/dist/theme-button.js +1 -1
  320. package/dist/theme.cjs +1 -1
  321. package/dist/{theme.interface-D4NeufQA.cjs.map → theme.interface-B5xjEk74.cjs.map} +1 -1
  322. package/dist/{theme.interface-C2XNgsLB.js.map → theme.interface-DVEw3s8m.js.map} +1 -1
  323. package/dist/theme.js +4 -4
  324. package/dist/{theme.service-CSzNkqBB.js.map → theme.service-Bh08uOSJ.js.map} +1 -1
  325. package/dist/{theme.service-CnFUmUpc.cjs.map → theme.service-Y-e8b331.cjs.map} +1 -1
  326. package/dist/tree.cjs +1 -1
  327. package/dist/tree.js +1 -1
  328. package/dist/typography.cjs +1 -1
  329. package/dist/typography.js +1 -1
  330. package/dist/{utils-Cxg0Kfy5.js → utils-578eFTx4.js} +1 -1
  331. package/dist/{utils-Cxg0Kfy5.js.map → utils-578eFTx4.js.map} +1 -1
  332. package/dist/{utils-aCJYAGUr.cjs → utils-CVWUrECT.cjs} +1 -1
  333. package/dist/{utils-aCJYAGUr.cjs.map → utils-CVWUrECT.cjs.map} +1 -1
  334. package/dist/utils.cjs +1 -1
  335. package/dist/utils.js +2 -2
  336. package/dist/visually-hidden.cjs +1 -1
  337. package/dist/visually-hidden.js +1 -1
  338. package/dist/{window-JtkeHoxS.js → window-BT9JecWy.js} +5 -5
  339. package/dist/{window-JtkeHoxS.js.map → window-BT9JecWy.js.map} +1 -1
  340. package/dist/{window-Ck_zS4bb.cjs → window-Bp7zWZpu.cjs} +1 -1
  341. package/dist/{window-Ck_zS4bb.cjs.map → window-Bp7zWZpu.cjs.map} +1 -1
  342. package/dist/window.cjs +1 -1
  343. package/dist/window.js +1 -1
  344. package/package.json +1 -1
  345. package/skills/schmancy/INDEX.md +2 -1
  346. package/skills/schmancy/SKILL.md +33 -23
  347. package/skills/schmancy/area.md +5 -4
  348. package/skills/schmancy/connectivity.md +1 -3
  349. package/skills/schmancy/directives.md +36 -0
  350. package/skills/schmancy/icons.md +95 -31
  351. package/skills/schmancy/layout.md +36 -53
  352. package/skills/schmancy/mixins.md +26 -5
  353. package/src/directives/ai-badge.ts +95 -0
  354. package/src/directives/art/art.directive.ts +228 -0
  355. package/src/directives/art/effects/error.ts +192 -0
  356. package/src/directives/art/effects/funkhaus.ts +121 -0
  357. package/src/directives/art/effects/howl.ts +203 -0
  358. package/src/directives/art/effects/samwa.ts +228 -0
  359. package/src/directives/art/effects/snow.ts +207 -0
  360. package/src/directives/art/effects/starfield.ts +107 -0
  361. package/src/directives/art/index.ts +2 -0
  362. package/src/directives/art/particle-pool.ts +40 -0
  363. package/src/directives/art/types.ts +129 -0
  364. package/src/directives/art/utils.ts +35 -0
  365. package/src/directives/battery.ts +1014 -0
  366. package/src/directives/beta.ts +44 -0
  367. package/src/directives/fill.ts +32 -60
  368. package/src/directives/fyi.ts +551 -0
  369. package/src/directives/hummingbird.ts +1712 -0
  370. package/src/directives/index.ts +9 -0
  371. package/src/directives/missed-punch.ts +407 -0
  372. package/src/directives/urgent.ts +660 -0
  373. package/src/directives/working-snake.ts +294 -0
  374. package/src/icons/icon.ts +53 -30
  375. package/src/navigation-rail/navigation-rail-item.ts +7 -12
  376. package/src/navigation-rail/navigation-rail.ts +0 -2
  377. package/types/mixins/SchmancyElement.d.ts +31 -0
  378. package/types/src/directives/ai-badge.d.ts +15 -0
  379. package/types/src/directives/art/art.directive.d.ts +19 -0
  380. package/types/src/directives/art/effects/error.d.ts +7 -0
  381. package/types/src/directives/art/effects/funkhaus.d.ts +7 -0
  382. package/types/src/directives/art/effects/howl.d.ts +7 -0
  383. package/types/src/directives/art/effects/samwa.d.ts +7 -0
  384. package/types/src/directives/art/effects/snow.d.ts +7 -0
  385. package/types/src/directives/art/effects/starfield.d.ts +10 -0
  386. package/types/src/directives/art/index.d.ts +2 -0
  387. package/types/src/directives/art/particle-pool.d.ts +16 -0
  388. package/types/src/directives/art/types.d.ts +126 -0
  389. package/types/src/directives/art/utils.d.ts +5 -0
  390. package/types/src/directives/battery.d.ts +96 -0
  391. package/types/src/directives/beta.d.ts +33 -0
  392. package/types/src/directives/fill.d.ts +4 -11
  393. package/types/src/directives/fyi.d.ts +76 -0
  394. package/types/src/directives/hummingbird.d.ts +180 -0
  395. package/types/src/directives/index.d.ts +9 -0
  396. package/types/src/directives/missed-punch.d.ts +28 -0
  397. package/types/src/directives/urgent.d.ts +88 -0
  398. package/types/src/directives/working-snake.d.ts +46 -0
  399. package/types/src/icons/icon.d.ts +22 -0
  400. package/dist/directives.cjs.map +0 -1
  401. package/dist/directives.js.map +0 -1
  402. package/dist/discovery.cjs.map +0 -1
  403. package/dist/discovery.js.map +0 -1
  404. package/dist/icons-B7ppo07M.cjs +0 -33
  405. package/dist/icons-B7ppo07M.cjs.map +0 -1
  406. package/dist/icons-CGhozJ5v.js +0 -48
  407. package/dist/icons-CGhozJ5v.js.map +0 -1
  408. package/dist/mixins-BPUR4Kc4.cjs +0 -254
  409. package/dist/mixins-BPUR4Kc4.cjs.map +0 -1
  410. package/dist/mixins-C42OILRS.js +0 -636
  411. package/dist/mixins-C42OILRS.js.map +0 -1
  412. package/dist/skills/page.md +0 -84
  413. package/dist/skills/schmancy/page.md +0 -84
  414. package/skills/schmancy/page.md +0 -84
  415. /package/dist/{hashContent-dJrI-9sc.js → hashContent-Dgmzc32o.js} +0 -0
  416. /package/dist/{hashContent-Ck6laKlk.cjs → hashContent-Dh1VzIAb.cjs} +0 -0
  417. /package/dist/{overlay-stack-Dk0xETTy.cjs → overlay-stack-Bdr9lOqi.cjs} +0 -0
  418. /package/dist/{overlay-stack-BR4iYivO.js → overlay-stack-D2rgxQLh.js} +0 -0
  419. /package/dist/{reduced-motion-D7LqTUMn.js → reduced-motion-D-L12p7G.js} +0 -0
  420. /package/dist/{reduced-motion-Dzfp_w5x.cjs → reduced-motion-Ds-HjMzn.cjs} +0 -0
  421. /package/dist/{rxjs-utils-BK8VMe3K.js → rxjs-utils-BXpvHN4-.js} +0 -0
  422. /package/dist/{rxjs-utils-DhOKenkS.cjs → rxjs-utils-CaC-tdot.cjs} +0 -0
  423. /package/dist/{theme.interface-D4NeufQA.cjs → theme.interface-B5xjEk74.cjs} +0 -0
  424. /package/dist/{theme.interface-C2XNgsLB.js → theme.interface-DVEw3s8m.js} +0 -0
  425. /package/dist/{theme.service-CSzNkqBB.js → theme.service-Bh08uOSJ.js} +0 -0
  426. /package/dist/{theme.service-CnFUmUpc.cjs → theme.service-Y-e8b331.cjs} +0 -0
@@ -0,0 +1,348 @@
1
+ require(`./chunk-CncqDLb2.cjs`);const e=require(`./audio-Cvmemu84.cjs`),t=require(`./animation-CCOIW4wJ.cjs`),n=require(`./reduced-motion-Ds-HjMzn.cjs`);require(`./cursor-glow-Bulq-38P.cjs`);const r=require(`./theme.service-Y-e8b331.cjs`),i=require(`./layout-eXb9wjDh.cjs`),a=require(`./overlay-stack-Bdr9lOqi.cjs`),o=require(`./discovery.service-CVDXO9rH.cjs`);require(`./magnetic-D-ph029G.cjs`);let s=require(`rxjs`),c=require(`rxjs/operators`),l=require(`lit`),u=require(`lit/async-directive.js`),d=require(`lit/directive.js`);var f={smooth:t.d,snappy:t.f,bouncy:t.l,gentle:t.u},p=class extends u.AsyncDirective{constructor(...e){super(...e),this.element=null,this.originalContent=``,this.animations=[],this.disconnecting$=new s.Subject,this.initialized=!1}render(e){return l.noChange}update(e,[t]){return this.element=e.element,this.initialized||(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new s.Subject),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.noChange}disconnected(){this.cleanup()}reconnected(){this.element&&(this.element.style.willChange=`transform, opacity`)}initialize(e){let{animation:t,delay:n=0,duration:r,stagger:i,preset:a=`snappy`,restart:o=!1}=e,l=f[a],u=r??l.duration,d=i??(t===`cyber-glitch`?30:50),p=this.createVisibilityObservable$();(o?p.pipe((0,c.switchMap)(e=>e?(0,s.timer)(n).pipe((0,c.switchMap)(()=>this.runAnimation$(t,u,d,l))):(0,s.defer)(()=>(this.resetToInitial(t),s.EMPTY)))):p.pipe((0,c.filter)(e=>e),(0,c.take)(1),(0,c.delay)(n),(0,c.switchMap)(()=>this.runAnimation$(t,u,d,l)))).pipe((0,c.takeUntil)(this.disconnecting$)).subscribe()}cleanup(){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}cancelAnimations(){this.animations.forEach(e=>e.cancel()),this.animations=[]}resetToInitial(e){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`)}getAccumulatedOpacity(){if(!this.element)return 0;let e=1,t=this.element.parentElement,n=0;for(;t&&t!==document.body&&n<10;){let r=window.getComputedStyle(t);if(r.visibility===`hidden`||r.display===`none`)return 0;let i=parseFloat(r.opacity)||1;if(i<1&&(e*=i,e<=.5))return e;if(t.assignedSlot){let n=this.getSlotAncestorOpacity(t.assignedSlot);if(n===0)return 0;e*=n}t=t.parentElement,n++}return e}getSlotAncestorOpacity(e){let t=1,n=e.parentElement;for(;n;){let e=window.getComputedStyle(n);if(e.visibility===`hidden`||e.display===`none`)return 0;t*=parseFloat(e.opacity)||1,n=n.parentElement}return t}createVisibilityObservable$(){let e=(0,s.fromEvent)(document,`visibilitychange`).pipe((0,c.startWith)(null),(0,c.map)(()=>document.visibilityState===`visible`),(0,c.distinctUntilChanged)());return(0,s.combineLatest)([(0,s.interval)(200).pipe((0,c.startWith)(0),(0,c.map)(()=>{if(!this.element)return!1;let e=this.element.getBoundingClientRect();return e.width>0&&e.height>0&&e.top<window.innerHeight&&e.bottom>0&&this.getAccumulatedOpacity()>.5}),(0,c.distinctUntilChanged)()),e]).pipe((0,c.map)(([e,t])=>e&&t),(0,c.distinctUntilChanged)())}runAnimation$(e,t,n,r){if(!this.element)return s.EMPTY;switch(e){case`fade-up`:return this.animateFadeUp$(t,r);case`blur-reveal`:return this.animateBlurReveal$(t,n,r);case`word-reveal`:return this.animateWordReveal$(t,n,r);case`cyber-glitch`:return this.animateCyberGlitch$(t,n,r);case`typewriter`:return this.animateTypewriter$(t);default:return s.EMPTY}}animateFadeUp$(e,t){if(!this.element)return s.EMPTY;let n=this.element.animate([{opacity:0,transform:`translateY(30px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:t.easingFallback,fill:`forwards`});return this.animations.push(n),(0,s.from)(n.finished).pipe((0,c.tap)(()=>{this.element&&(this.element.style.opacity=``,this.element.style.transform=``,this.element.style.willChange=`auto`)}),(0,c.catchError)(()=>s.EMPTY))}wrapTextNodes(e){let t=[],n=document.createDocumentFragment(),r=Array.from(e.childNodes);for(let e of r)if(e.nodeType===Node.TEXT_NODE){let r=(e.textContent||``).split(/(\s+)/);for(let e of r)if(/^\s+$/.test(e))n.appendChild(document.createTextNode(e));else if(e.length>0){let r=document.createElement(`span`);r.textContent=e,n.appendChild(r),t.push(r)}}else e instanceof HTMLElement&&(n.appendChild(e),t.push(e));return e.textContent=``,e.appendChild(n),t}animateBlurReveal$(e,t,n){if(!this.element)return s.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,filter:`blur(8px)`,transform:`scale(0.9)`},{opacity:1,filter:`blur(0)`,transform:`scale(1)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,s.from)(i.finished).pipe((0,c.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,c.catchError)(()=>s.EMPTY)):s.EMPTY}animateWordReveal$(e,t,n){if(!this.element)return s.EMPTY;let r=this.wrapTextNodes(this.element);this.element.style.opacity=`1`,r.forEach((r,i)=>{r.style.opacity=`0`,r.style.display=`inline-block`;let a=r.animate([{opacity:0,transform:`translateY(20px)`},{opacity:1,transform:`translateY(0)`}],{duration:e,easing:n.easingFallback,delay:i*t,fill:`forwards`});this.animations.push(a)});let i=this.animations[this.animations.length-1];return i?(0,s.from)(i.finished).pipe((0,c.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,r.forEach(e=>{e.style.willChange=`auto`}))}),(0,c.catchError)(()=>s.EMPTY)):s.EMPTY}animateCyberGlitch$(e,t,n){if(!this.element)return s.EMPTY;let r=this.originalContent.split(``),i=document.createDocumentFragment(),a=[];for(let e of r){let t=document.createElement(`span`);t.style.display=`inline-block`,t.style.opacity=`0`,t.textContent=e===` `?`\xA0`:e,i.appendChild(t),a.push(t)}this.element.textContent=``,this.element.appendChild(i),this.element.style.opacity=`1`,a.forEach((i,a)=>{if(r[a]===` `)return void(i.style.opacity=`1`);let o=i.animate([{opacity:0,transform:`translateY(-8px) scale(1.4)`,filter:`blur(4px)`},{opacity:1,transform:`translateY(0) scale(1)`,filter:`blur(0)`}],{duration:e,easing:n.easingFallback,delay:a*t,fill:`forwards`});this.animations.push(o)});let o=this.animations[this.animations.length-1];return o?(0,s.from)(o.finished).pipe((0,c.tap)(()=>{this.element&&(this.element.style.willChange=`auto`,a.forEach(e=>{e.style.willChange=`auto`}))}),(0,c.catchError)(()=>s.EMPTY)):s.EMPTY}animateTypewriter$(e){if(!this.element)return s.EMPTY;let t=this.originalContent,n=t.length;if(n===0)return s.EMPTY;let r=e/n,i=0;return(0,s.interval)(r).pipe((0,c.tap)(()=>{i++,this.element&&(this.element.textContent=t.slice(0,i))}),(0,c.takeWhile)(()=>i<n),(0,c.finalize)(()=>{this.element&&(this.element.textContent=this.originalContent,this.element.style.willChange=`auto`)}))}},m=(0,u.directive)(p),h=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return l.noChange}update(e,[t=``]){let n=e.element;if(!t)return this.cleanup(),l.noChange;if(this.state)return l.noChange;this.state={message:t,element:n,badge:null,animation:null},getComputedStyle(n).position===`static`&&(n.style.position=`relative`);let r=document.createElement(`div`);return r.style.cssText=`
2
+ display: block;
3
+ position: absolute;
4
+ bottom: -8px;
5
+ left: 8px;
6
+ z-index: 10;
7
+ padding: 3px 10px;
8
+ border-radius: 12px;
9
+ font-size: 0.65rem;
10
+ font-weight: 600;
11
+ background: linear-gradient(
12
+ 135deg,
13
+ var(--md-sys-color-primary, #7c5cff),
14
+ var(--md-sys-color-primary-container, #6750a4)
15
+ );
16
+ color: var(--md-sys-color-on-primary, #fff);
17
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
18
+ white-space: nowrap;
19
+ `,r.textContent=`✦ ${t}`,r.title=t,n.appendChild(r),this.state.badge=r,this.state.animation=r.animate([{transform:`scale(1)`},{transform:`scale(1.03)`},{transform:`scale(1)`}],{duration:2e3,easing:`ease-in-out`,iterations:1/0}),l.noChange}cleanup(){this.state&&=(this.state.animation?.cancel(),this.state.badge?.remove(),null)}disconnected(){this.cleanup()}},g=(0,u.directive)(h);function _(e){let t=document.createElement(`div`);return t.className=`art-overlay ${e}`,t.style.cssText=`
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ width: 100%;
24
+ height: 100%;
25
+ pointer-events: none;
26
+ z-index: 1000;
27
+ overflow: hidden;
28
+ `,t}function v(){let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);return e.setAttribute(`width`,`100%`),e.setAttribute(`height`,`100%`),e.setAttribute(`viewBox`,`0 0 100 100`),e.setAttribute(`preserveAspectRatio`,`none`),e.style.cssText=`
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ width: 100%;
33
+ height: 100%;
34
+ `,e}var y=class{constructor(e,t=10){this.pool=[],this.active=new Set,this.factory=e;for(let n=0;n<t;n++)this.pool.push(e())}acquire(){let e=this.pool.pop();return e||=this.factory(),this.active.add(e),e}release(e){this.active.delete(e),e.setAttribute(`opacity`,`0`),this.pool.push(e)}clear(){this.active.forEach(e=>this.release(e))}get activeCount(){return this.active.size}};function b(e,t,n,r){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)}`}function x(e){let[t,n,r]=function(e){let t=e.replace(`#`,``),n=parseInt(t.length===3?t.split(``).map(e=>e+e).join(``):t,16);return[n>>16&255,n>>8&255,255&n]}(e);return[b(t,n,r,.92),b(t,n,r,.8),b(t,n,r,.65),b(t,n,r,.5),b(t,n,r,.35),b(t,n,r,.18),e]}var S=[`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`,`M 2,0.2 L 3.8,2 L 2,3.8 L 0.2,2 Z`,`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`,`M 2,0.3 L 3.7,3.4 L 0.3,3.4 Z`,`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`,`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`,`M 0.4,1.6 L 3.6,1.6 L 3.6,2.4 L 0.4,2.4 Z`],C=[{scale:.8,fallSpeed:.12,windSensitivity:2.2,tumbleSpeed:.6},{scale:1.2,fallSpeed:.18,windSensitivity:1.6,tumbleSpeed:.5},{scale:1.6,fallSpeed:.25,windSensitivity:1.2,tumbleSpeed:.35}],w=[{opacity:.12,blur:.8},{opacity:.2,blur:.3},{opacity:.3,blur:0}],T=[{x:0,xRange:15,vx:.3},{x:15,xRange:25,vx:.1},{x:40,xRange:20,vx:0},{x:60,xRange:25,vx:-.1},{x:85,xRange:15,vx:-.3}];function E(e){let{element:t,color:n}=e,r=_(`howl-overlay`),i=v(),a=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),o=[{cx:15,cy:20,r:8,teeth:12,speed:.5},{cx:85,cy:25,r:6,teeth:10,speed:-.7},{cx:30,cy:80,r:10,teeth:16,speed:.4},{cx:75,cy:75,r:7,teeth:12,speed:-.6}].map(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);t.style.transformOrigin=`${e.cx}% ${e.cy}%`,t.style.willChange=`transform`;let r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return r.setAttribute(`d`,function(e,t,n,r){let i=n-.2*n,a=``;for(let o=0;o<r;o++){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;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)} `}return a+`Z`}(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),{element:t,speed:e.speed}}),s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),c=[];for(let e=0;e<6;e++){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`;e.setAttribute(`d`,a),e.setAttribute(`fill`,n),e.style.mixBlendMode=`screen`,e.style.willChange=`opacity, transform`,s.appendChild(e),c.push({element:e,baseX:t,baseY:r,phase:Math.random()*Math.PI*2,speed:.5+1.5*Math.random()})}let l=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),u=[];for(let e=0;e<4;e++){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();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({element:e,baseX:t,baseY:r,phase:Math.random()*Math.PI*2,rotSpeed:.5+Math.random()})}i.appendChild(a),i.appendChild(s),i.appendChild(l),r.appendChild(i),t.appendChild(r),e.overlayElement=r,e.howl={gears:o,sparkles:c,steamPool:new y(()=>{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`);return e.setAttribute(`fill`,n),e.style.mixBlendMode=`screen`,e.style.willChange=`transform, opacity`,i.appendChild(e),e},12),steamParticles:[],wisps:[],crystals:u,lastSteamSpawn:performance.now(),startTime:performance.now()}}function D(e,t){if(!e.error)return;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);if(n.forEach(e=>e.setAttribute(`opacity`,c.toFixed(3))),r.forEach((e,t)=>{let n=(s+.125*t)%1,r=0,i=0;switch(e.edge){case 0:r=100*Math.random(),i=5*Math.random();break;case 1:r=95+5*Math.random(),i=100*Math.random();break;case 2:r=100*Math.random(),i=95+5*Math.random();break;case 3:r=5*Math.random(),i=100*Math.random()}e.element.setAttribute(`cx`,r.toString()),e.element.setAttribute(`cy`,i.toString());let a=.5*Math.sin(n*Math.PI*2)+.5;e.element.setAttribute(`opacity`,(.35*a).toFixed(3))}),t-e.error.lastLightningSpawn>1500&&i.activeCount<3){let n=i.acquire(),r=0,o=0,s=0,c=0;switch(Math.floor(4*Math.random())){case 0:r=100*Math.random(),o=0,s=100*Math.random(),c=50;break;case 1:r=100,o=100*Math.random(),s=70,c=100*Math.random();break;case 2:r=100*Math.random(),o=100,s=100*Math.random(),c=50;break;case 3:r=0,o=100*Math.random(),s=30,c=100*Math.random()}n.setAttribute(`d`,function(e,t,n,r){let i=`M ${e.toFixed(1)},${t.toFixed(1)}`,a=(n-e)/4,o=(r-t)/4,s=e,c=t;for(let e=1;e<4;e++){let e=3+5*Math.random();s+=a+-o*e*(Math.random()-.5),c+=o+a*e*(Math.random()-.5),i+=` L ${s.toFixed(1)},${c.toFixed(1)}`}return i+` L ${n.toFixed(1)},${r.toFixed(1)}`}(r,o,s,c)),a.push({element:n,x:0,y:0,vx:0,vy:0,life:1}),e.error.lastLightningSpawn=t}for(let e=a.length-1;e>=0;e--){let t=a[e];t.life-=.05;let n=t.life>.8?.7:.875*t.life;t.element.setAttribute(`opacity`,Math.max(0,n).toFixed(3)),t.life<=0&&(i.release(t.element),a.splice(e,1))}}var O=[`#FFFFFF`,`#F8FCFF`,`#E8F4FF`,`#F0F8FF`,`#FAFEFF`,`#E0F0FF`,`#D4A574`,`#C19A6B`,`#8B4513`,`#CD853F`],k=[`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`,`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`,`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`,`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`,`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`,`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`,`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`,`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`],A=[{scale:.7,fallSpeed:.03,windSensitivity:2.8,tumbleSpeed:.15},{scale:1,fallSpeed:.05,windSensitivity:2.2,tumbleSpeed:.2},{scale:1.4,fallSpeed:.07,windSensitivity:1.6,tumbleSpeed:.15}],j=[{opacity:.2,blur:.8},{opacity:.35,blur:.3},{opacity:.55,blur:0}],ee=[{x:0,xRange:20,vx:.2},{x:20,xRange:20,vx:.1},{x:40,xRange:20,vx:0},{x:60,xRange:20,vx:-.1},{x:80,xRange:20,vx:-.2}];function te(e){let{element:t}=e,n=_(`starfield-overlay`),r=document.createElement(`div`);r.style.cssText=`position:absolute;bottom:0;right:0;width:66vw;height:66vw;`,n.appendChild(r);let i=Array.from({length:6},(e,t)=>{let n=[];for(let e=0;e<7;e++){let e=96*Math.random()+2,t=94*Math.random()+3,r=.8+1.5*Math.random(),i=.3+.7*Math.random();n.push(`radial-gradient(circle ${r}px at ${e}% ${t}%, rgba(255,255,255,${i}) 0%, transparent 100%)`)}let r=.6*t;return{bg:n.join(`,`),appearDelay:r,twinkleDuration:5+.7*t,twinkleDelay:r+2.5}}),a=[];for(let e of i){let t=document.createElement(`div`);t.style.cssText=`position:absolute;inset:0;opacity:0;will-change:opacity;background:${e.bg};`,r.appendChild(t),a.push({element:t,appearDelay:e.appearDelay,twinkleDuration:e.twinkleDuration,twinkleDelay:e.twinkleDelay})}t.appendChild(n),e.overlayElement=n,e.starfield={groups:a,startTime:performance.now()}}var ne=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return l.noChange}update(e,[t]){let n=e.element,{name:r,color:i,intensity:a=1,speed:o=1}=t;if(!this.state||this.state.effect===r&&this.state.color===i&&this.state.intensity===a&&this.state.speed===o||this.cleanup(),!this.state){let e=n.style.position;this.state={effect:r,color:i,intensity:a,speed:o,element:n,isVisible:!0,initialized:!1,originalPosition:e},requestAnimationFrame(()=>{if(!this.state)return;let e=n.getBoundingClientRect();if(!(e.top<window.innerHeight&&e.bottom>0&&e.left<window.innerWidth&&e.right>0))return this.state.isVisible=!1,void this.setupVisibilityObserver();this.initializeResources(),this.startAnimation(),this.setupVisibilityObserver()})}return l.noChange}initializeResources(){if(!this.state||this.state.initialized)return;let{element:e,effect:t}=this.state;switch(getComputedStyle(e).position===`static`&&(e.style.position=`relative`),t){case`funkhaus`:(function(e){let{element:t,color:n}=e,r=_(`funkhaus-overlay`),i=v(),a=function(e,t,n,r){let i=``;for(let e=0;e<=t;e++){let t=e*r;i+=`M 0,${t} L 100,${t} `}for(let t=0;t<=e;t++){let e=t*n;i+=`M ${e},0 L ${e},100 `}return i}(5,4,20,25),o=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);o.setAttribute(`d`,a),o.setAttribute(`stroke`,n),o.setAttribute(`stroke-width`,`0.15`),o.setAttribute(`opacity`,`0.2`),o.setAttribute(`fill`,`none`);let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);s.id=`window-panes`,s.style.mixBlendMode=`screen`;let c=[];for(let e=0;e<4;e++)for(let t=0;t<5;t++){let r=document.createElementNS(`http://www.w3.org/2000/svg`,`rect`);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({element:r,diagonalIndex:e+t}),s.appendChild(r)}i.appendChild(s),i.appendChild(o),r.appendChild(i),t.appendChild(r),e.overlayElement=r,e.funkhaus={panes:c,maxDiagonal:7,startTime:performance.now()}})(this.state);break;case`samwa`:(function(e){let{element:t,color:n}=e,r=_(`samwa-overlay`),i=v();r.appendChild(i),t.appendChild(r);let a=x(n),o=0;e.overlayElement=r,e.samwa={leafPool:new y(()=>{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),t=o%S.length;return e.setAttribute(`d`,S[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},18),fallingLeaves:[],windStrength:0,windDirection:1,lastWindTime:performance.now(),lastLeafSpawn:performance.now(),startTime:performance.now()}})(this.state);break;case`howl`:E(this.state);break;case`error`:(function(e){let{element:t,color:n}=e,r=_(`error-overlay`),i=v(),a=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),o=[{x:0,y:0,width:100,height:.5},{x:0,y:99.5,width:100,height:.5},{x:0,y:0,width:.5,height:100},{x:99.5,y:0,width:.5,height:100}].map(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`rect`);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}),s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),c=[];for(let e=0;e<4;e++){let t=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`);t.setAttribute(`r`,`0.3`),t.setAttribute(`fill`,n),t.style.mixBlendMode=`screen`,t.style.willChange=`opacity`,s.appendChild(t),c.push({element:t,edge:e%4})}i.appendChild(a),i.appendChild(s),r.appendChild(i),t.appendChild(r),e.overlayElement=r,e.error={edges:o,staticParticles:c,boltPool:new y(()=>{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);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},5),lightningBolts:[],lastLightningSpawn:performance.now(),startTime:performance.now()}})(this.state);break;case`snow`:(function(e){let{element:t}=e,n=_(`snow-overlay`),r=v();n.appendChild(r),t.appendChild(n);let i=0;e.overlayElement=n,e.snow={snowflakePool:new y(()=>{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),t=i%k.length,n=Math.floor(Math.random()*O.length);return e.setAttribute(`d`,k[t]),e.setAttribute(`fill`,O[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},20),fallingSnowflakes:[],windStrength:0,windDirection:1,windPhase:Math.random()*Math.PI*2,lastWindGust:performance.now(),lastSpawn:performance.now(),startTime:performance.now()}})(this.state);break;case`starfield`:te(this.state)}this.state.initialized=!0}setupVisibilityObserver(){this.state&&typeof IntersectionObserver<`u`&&(this.state.observer=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0].isIntersecting;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))},{threshold:0}),this.state.observer.observe(this.state.element))}startAnimation(){if(!this.state||!this.state.isVisible||this.state.animationId)return;this.state.initialized||this.initializeResources();let e=t=>{if(this.state&&this.state.isVisible){switch(this.state.effect){case`funkhaus`:(function(e,t){if(!e.funkhaus)return;let{panes:n,maxDiagonal:r,startTime:i}=e.funkhaus,{intensity:a=1,speed:o=1}=e;if(a<=0){for(let e of n)e.element.getAttribute(`opacity`)!==`0`&&e.element.setAttribute(`opacity`,`0`);return}let s=7e3/o,c=(t-i)%s/s*1.555,l=.18*a;for(let e=0;e<n.length;e++){let t=n[e],i=t.diagonalIndex/r,a=Math.abs(i-c);if(a>.5){t.element.getAttribute(`opacity`)!==`0`&&t.element.setAttribute(`opacity`,`0`);continue}let o=Math.exp(-a*a*15.4320987654321);o=o<.5?4*o*o*o:1-(-2*o+2)**3/2;let s=o*l;t.element.setAttribute(`opacity`,s.toFixed(3))}})(this.state,t);break;case`samwa`:(function(e,t){if(!e.samwa)return;let{intensity:n=1,speed:r=1}=e,{leafPool:i,fallingLeaves:a}=e.samwa;if(n<=0){for(let e of a)e.element.setAttribute(`opacity`,`0`);return}if(t-e.samwa.lastWindTime>(4e3+4e3*Math.random())/r){let n=Math.random()<.3;e.samwa.windStrength=n?1.5:.8+.4*Math.random(),e.samwa.windDirection=Math.random()>.5?1:-1,e.samwa.lastWindTime=t}let o=.1*Math.sin(.001*t);e.samwa.windStrength=Math.max(0,e.samwa.windStrength-.008+.002*o);let s=(800+1200*Math.random())/r,c=Math.max(1,Math.round(12*n));if(t-e.samwa.lastLeafSpawn>s&&i.activeCount<c){let n=i.acquire(),r=[.25,.15,.2,.15,.25],o=Math.random(),s=0;for(let e=0;e<r.length;e++)if(o-=r[e],o<=0){s=e;break}let c=T[s],l=Math.floor(Math.random()*C.length),u=Math.floor(Math.random()*w.length),d=C[l],f={element:n,x:c.x+Math.random()*c.xRange,y:-5-15*Math.random(),vx:.5*c.vx+.1*(Math.random()-.5),vy:d.fallSpeed*(.85+.3*Math.random()),life:1,rotation:360*Math.random(),phase:Math.random()*Math.PI*2,sizeIndex:l,depthIndex:u,tumbleDirection:Math.random()>.5?1:-1,flutterAmplitude:.15+.25*Math.random(),flutterFrequency:.012+.008*Math.random(),spawnTime:t};a.push(f),e.samwa.lastLeafSpawn=t}let l=e.samwa.windStrength,u=e.samwa.windDirection;for(let e=a.length-1;e>=0;e--){let o=a[e],s=C[o.sizeIndex],c=w[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;o.vx+=.01*d,o.vx+=.025*(f+p+m),o.vx*=.97;let h=.03*Math.sin(3e-4*t*r+o.phase);o.vy=(s.fallSpeed+h)*r,o.x+=o.vx,o.y+=o.vy;let g=s.tumbleSpeed*o.tumbleDirection*.7,_=l*u*.8;o.rotation+=g+_+f;let v=t-o.spawnTime,y=c.opacity*n;v<600&&(y*=v/600),o.y>80&&(y*=1-(o.y-80)/30);let b=s.scale*(.8+c.opacity);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))}})(this.state,t);break;case`howl`:(function(e,t){if(!e.howl)return;let{gears:n,sparkles:r,crystals:i,steamPool:a,steamParticles:o,startTime:s}=e.howl,c=t-s,l=c%17e3/17e3;if(n.forEach(e=>{let t=c/80*e.speed;e.element.style.transform=`rotate(${t.toFixed(1)}deg)`}),r.forEach(e=>{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);e.element.setAttribute(`opacity`,t.toFixed(3)),e.element.style.transform=`translate(${n.toFixed(2)}px, ${r.toFixed(2)}px)`}),i.forEach(e=>{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);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))}),t-e.howl.lastSteamSpawn>600&&a.activeCount<12){let n=a.acquire();o.push({element:n,x:10+80*Math.random(),y:105,vx:.15*(Math.random()-.5),vy:-.25-.25*Math.random(),life:1,scale:.5+Math.random()}),e.howl.lastSteamSpawn=t}for(let e=o.length-1;e>=0;e--){let t=o[e];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))}})(this.state,t);break;case`error`:D(this.state,t);break;case`snow`:(function(e,t){if(!e.snow)return;let{intensity:n=1,speed:r=1}=e,{snowflakePool:i,fallingSnowflakes:a}=e.snow;if(n<=0){for(let e of a)e.element.setAttribute(`opacity`,`0`);return}if(t-e.snow.lastWindGust>(8e3+8e3*Math.random())/r){let n=Math.random()<.15;e.snow.windStrength=n?.8:.3+.3*Math.random(),e.snow.windDirection=Math.random()>.5?1:-1,e.snow.lastWindGust=t}let o=.08*Math.sin(5e-4*t);e.snow.windStrength=Math.max(0,e.snow.windStrength-.003+.001*o);let s=(1200+1500*Math.random())/r,c=Math.max(2,Math.round(12*n));if(t-e.snow.lastSpawn>s&&i.activeCount<c){let n=i.acquire(),r=ee[Math.floor(Math.random()*ee.length)],o=Math.floor(Math.random()*A.length),s=Math.floor(Math.random()*j.length),c=A[o],l={element:n,x:r.x+Math.random()*r.xRange,y:-5-15*Math.random(),vx:.5*r.vx+.1*(Math.random()-.5),vy:c.fallSpeed*(.85+.3*Math.random()),life:1,rotation:360*Math.random(),phase:Math.random()*Math.PI*2,sizeIndex:o,depthIndex:s,tumbleDirection:Math.random()>.5?1:-1,flutterAmplitude:.06+.1*Math.random(),flutterFrequency:.008+.005*Math.random(),spawnTime:t};a.push(l),e.snow.lastSpawn=t}let l=e.snow.windStrength,u=e.snow.windDirection;for(let e=a.length-1;e>=0;e--){let o=a[e],s=A[o.sizeIndex],c=j[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;o.vx+=.006*d,o.vx+=.015*(f+p),o.vx*=.985;let m=.015*Math.sin(2e-4*t*r+o.phase);o.vy=(s.fallSpeed+m)*r,o.x+=o.vx,o.y+=o.vy;let h=s.tumbleSpeed*o.tumbleDirection*.4,g=l*u*.3;o.rotation+=h+g+.5*f;let _=t-o.spawnTime,v=1e3,y=c.opacity*n;_<v&&(y*=_/v),o.y>75&&(y*=1-(o.y-75)/35);let b=s.scale*(.8+c.opacity);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))}})(this.state,t);break;case`starfield`:(function(e,t){if(!e.starfield)return;let{intensity:n=1,speed:r=1}=e,{groups:i,startTime:a}=e.starfield,o=(t-a)/1e3*r;for(let e of i){if(n<=0){e.element.style.opacity=`0`;continue}let t=e.appearDelay,r;if(o<t)r=0;else if(o<t+2.5)r=1-(1-(o-t)/2.5)**3;else{let t=o-e.twinkleDelay;if(t<0)r=1;else{let n=t%e.twinkleDuration/e.twinkleDuration;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}}e.element.style.opacity=(r*n).toFixed(3)}})(this.state,t)}this.state.animationId=requestAnimationFrame(e)}else this.state&&(this.state.animationId=void 0)};this.state.animationId=requestAnimationFrame(e)}cleanup(){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)}disconnected(){this.cleanup()}},re=(0,u.directive)(ne),M={cyber:{primary:`#00f0ff`,secondary:`#0099ff`,glow:`#00f0ff`,particle:`#00f0ff`,scanLine:`#00f0ff`,gridColor:`#00f0ff`},hologram:{primary:`#00ff88`,secondary:`#00cc66`,glow:`#00ff88`,particle:`#00ff88`,scanLine:`#00ff88`,gridColor:`#00ff88`},plasma:{primary:`#ff00ff`,secondary:`#cc00ff`,glow:`#ff00ff`,particle:`#ff00ff`,scanLine:`#ff00ff`,gridColor:`#ff00ff`},quantum:{primary:`#8800ff`,secondary:`#6600cc`,glow:`#8800ff`,particle:`#8800ff`,scanLine:`#8800ff`,gridColor:`#8800ff`},matrix:{primary:`#00ff00`,secondary:`#00cc00`,glow:`#00ff00`,particle:`#00ff00`,scanLine:`#00ff00`,gridColor:`#00ff00`},neon:{primary:`#ff0080`,secondary:`#cc0066`,glow:`#ff0080`,particle:`#ff0080`,scanLine:`#ff0080`,gridColor:`#ff0080`},success:{primary:`#00ff88`,secondary:`#00cc66`,glow:`#00ff88`,particle:`#00ff88`,scanLine:`#00ff88`,gridColor:`#00ff88`},warning:{primary:`#ffaa00`,secondary:`#ff8800`,glow:`#ffaa00`,particle:`#ffaa00`,scanLine:`#ffaa00`,gridColor:`#ffaa00`},danger:{primary:`#ff3366`,secondary:`#ff0044`,glow:`#ff3366`,particle:`#ff3366`,scanLine:`#ff3366`,gridColor:`#ff3366`}},ie=class extends u.AsyncDirective{constructor(...e){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=M.cyber,this.currentVariantName=`cyber`,this.particles=[],this.animationFrame=null,this.lastTime=0,this.currentPercent=0,this.originalStyles={},this.resizeObserver=null,this.animate=e=>{let t=(e-this.lastTime)/1e3;this.lastTime=e,this.updateParticles(t),this.animationFrame=requestAnimationFrame(this.animate)}}getEffectiveSpeed(){return(this.options.speed??1)*(.15+Math.min(Math.max(this.currentPercent,0),100)/100*.85)}render(e){return l.noChange}update(e,[t]){let n=e.element,r;if(this.element||(this.element=n,this.options={variant:`cyber`,autoVariant:!1,showReadout:!0,showScanLines:!0,showParticles:!0,showGrid:!0,showGlitch:!1,intensity:1,speed:1,criticalEffects:!0,glassEffect:!0,duration:600,...t},this.variant=M[this.options.variant],this.currentVariantName=this.options.variant,this.storeOriginalStyles(),this.setupElement(),this.createStructure(),this.setupResizeObserver(),this.startAnimation()),t.autoVariant){let e=t.percent;r=e>=80?`success`:e>=50?`warning`:`danger`}else r=t.variant??`cyber`;return r!==this.currentVariantName&&(this.currentVariantName=r,this.variant=M[r],this.updateColors()),this.options={...this.options,...t},this.variant=M[r],this.updateFill(),l.noChange}storeOriginalStyles(){if(!this.element)return;let e=this.element.style;this.originalStyles={position:e.position,overflow:e.overflow,border:e.border,background:e.background,boxShadow:e.boxShadow,backdropFilter:e.backdropFilter,borderRadius:e.borderRadius}}setupElement(){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,{background:`rgba(10, 10, 20, 0.9)`,backdropFilter:`blur(16px) saturate(130%)`,border:`1.5px solid ${this.variant.primary}30`,boxShadow:`
35
+ 0 2px 8px rgba(0, 0, 0, 0.4),
36
+ 0 8px 32px rgba(0, 0, 0, 0.25),
37
+ inset 0 1px 0 rgba(255, 255, 255, 0.06),
38
+ 0 0 0 1px rgba(0, 0, 0, 0.3)
39
+ `,borderRadius:`12px`}))}createStructure(){this.element&&(this.styleElement=document.createElement(`style`),this.styleElement.textContent=`
40
+ @keyframes future-fill-pulse {
41
+ 0%, 100% { opacity: 0.85; }
42
+ 50% { opacity: 1; }
43
+ }
44
+
45
+ @keyframes future-glow-pulse {
46
+ 0%, 100% {
47
+ filter: drop-shadow(0 0 4px var(--glow-color))
48
+ drop-shadow(0 0 8px var(--glow-color));
49
+ }
50
+ 50% {
51
+ filter: drop-shadow(0 0 8px var(--glow-color))
52
+ drop-shadow(0 0 16px var(--glow-color));
53
+ }
54
+ }
55
+
56
+ @keyframes scan-line-move {
57
+ 0% { transform: translateY(-100%); }
58
+ 100% { transform: translateY(200%); }
59
+ }
60
+
61
+ @keyframes energy-wave {
62
+ 0% {
63
+ transform: translateY(0) scaleX(1);
64
+ opacity: 0.6;
65
+ }
66
+ 50% {
67
+ transform: translateY(-10px) scaleX(1.1);
68
+ opacity: 1;
69
+ }
70
+ 100% {
71
+ transform: translateY(0) scaleX(1);
72
+ opacity: 0.6;
73
+ }
74
+ }
75
+
76
+ @keyframes data-stream {
77
+ 0% {
78
+ transform: translateY(100%);
79
+ opacity: 0;
80
+ }
81
+ 10% {
82
+ opacity: 1;
83
+ }
84
+ 90% {
85
+ opacity: 1;
86
+ }
87
+ 100% {
88
+ transform: translateY(-100%);
89
+ opacity: 0;
90
+ }
91
+ }
92
+
93
+ @keyframes hologram-flicker {
94
+ 0%, 100% { opacity: 1; }
95
+ 2% { opacity: 0.8; }
96
+ 4% { opacity: 1; }
97
+ 8% { opacity: 0.9; }
98
+ 10% { opacity: 1; }
99
+ 50% { opacity: 0.95; }
100
+ 51% { opacity: 1; }
101
+ }
102
+
103
+ @keyframes glitch-shift {
104
+ 0%, 100% {
105
+ transform: translate(0, 0);
106
+ filter: hue-rotate(0deg);
107
+ }
108
+ 20% {
109
+ transform: translate(-2px, 1px);
110
+ filter: hue-rotate(90deg);
111
+ }
112
+ 40% {
113
+ transform: translate(2px, -1px);
114
+ filter: hue-rotate(180deg);
115
+ }
116
+ 60% {
117
+ transform: translate(-1px, -2px);
118
+ filter: hue-rotate(270deg);
119
+ }
120
+ 80% {
121
+ transform: translate(1px, 2px);
122
+ filter: hue-rotate(360deg);
123
+ }
124
+ }
125
+
126
+ @keyframes hex-grid-pulse {
127
+ 0%, 100% { opacity: 0.15; }
128
+ 50% { opacity: 0.35; }
129
+ }
130
+
131
+ @keyframes chromatic-aberration {
132
+ 0%, 100% {
133
+ text-shadow:
134
+ -0.5px 0 0 rgba(255, 0, 0, 0.3),
135
+ 0.5px 0 0 rgba(0, 255, 255, 0.3);
136
+ }
137
+ 50% {
138
+ text-shadow:
139
+ -1px 0 0 rgba(255, 0, 0, 0.5),
140
+ 1px 0 0 rgba(0, 255, 255, 0.5);
141
+ }
142
+ }
143
+
144
+ @keyframes critical-flash {
145
+ 0%, 100% { opacity: 1; }
146
+ 50% { opacity: 0.5; }
147
+ }
148
+
149
+ @keyframes overfill-surge {
150
+ 0%, 100% {
151
+ transform: scale(1);
152
+ filter: brightness(1);
153
+ }
154
+ 50% {
155
+ transform: scale(1.01);
156
+ filter: brightness(1.15);
157
+ }
158
+ }
159
+
160
+ `,this.element.appendChild(this.styleElement),this.container=document.createElement(`div`),Object.assign(this.container.style,{position:`absolute`,inset:`0`,pointerEvents:`none`,zIndex:`0`,overflow:`hidden`,borderRadius:`inherit`,background:`rgba(0, 0, 0, 0.3)`}),this.element.insertBefore(this.container,this.element.firstChild),this.createFill(),this.createHexGrid(),this.createEnergyWave(),this.createScanLines(),this.createDataStreams(),this.createGlitchLayer(),this.createParticles(),this.createReadout())}createFill(){if(!this.container)return;let e=this.options.duration??600,t=4/this.getEffectiveSpeed();this.fillElement=document.createElement(`div`),Object.assign(this.fillElement.style,{position:`absolute`,left:`0`,right:`0`,bottom:`0`,height:`0%`,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)`,transition:`height ${e}ms cubic-bezier(0.4, 0, 0.2, 1)`,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`,overflow:`hidden`,"--glow-color":this.variant.glow,animation:`future-fill-pulse ${t}s ease-in-out infinite`}),this.container.appendChild(this.fillElement)}createEnergyWave(){if(!this.fillElement)return;let e=this.getEffectiveSpeed();this.energyWave=document.createElement(`div`),Object.assign(this.energyWave.style,{position:`absolute`,left:`-10%`,top:`-12px`,width:`120%`,height:`24px`,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)`,filter:`blur(6px) drop-shadow(0 0 6px ${this.variant.glow}80)`,animation:`energy-wave ${3/e}s ease-in-out infinite`}),this.fillElement.appendChild(this.energyWave)}createHexGrid(){if(!this.fillElement||!this.options.showGrid)return;let e=this.getEffectiveSpeed();this.hexGrid=document.createElement(`div`),Object.assign(this.hexGrid.style,{position:`absolute`,inset:`0`,background:this.createHexPattern(),opacity:`0.08`,animation:`hex-grid-pulse ${5/e}s ease-in-out infinite`,mixBlendMode:`screen`}),this.fillElement.appendChild(this.hexGrid)}createHexPattern(){let e=this.variant.gridColor;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`}createScanLines(){if(!this.fillElement||!this.options.showScanLines)return;let e=this.getEffectiveSpeed(),t=document.createElement(`div`);Object.assign(t.style,{position:`absolute`,inset:`0`,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)`,opacity:`0.15`,pointerEvents:`none`}),this.fillElement.appendChild(t),this.scanLine=document.createElement(`div`),Object.assign(this.scanLine.style,{position:`absolute`,left:`0`,right:`0`,top:`-1px`,height:`1px`,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)`,boxShadow:`0 0 8px ${this.variant.glow}60`,animation:`scan-line-move ${6/e}s linear infinite`,opacity:`0.35`}),this.fillElement.appendChild(this.scanLine)}createParticles(){this.fillElement&&this.options.showParticles&&(this.particlesCanvas=document.createElement(`canvas`),Object.assign(this.particlesCanvas.style,{position:`absolute`,left:`0`,bottom:`0`,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:`5`}),this.fillElement.appendChild(this.particlesCanvas),this.particlesCtx=this.particlesCanvas.getContext(`2d`),this.resizeCanvas(),this.initParticles())}resizeCanvas(){if(!this.particlesCanvas||!this.fillElement)return;let e=this.fillElement.getBoundingClientRect();this.particlesCanvas.width=e.width,this.particlesCanvas.height=e.height}setupResizeObserver(){this.element&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeCanvas()}),this.resizeObserver.observe(this.element))}initParticles(){let e=Math.floor(12*(this.options.intensity??1));for(let t=0;t<e;t++)this.spawnParticle()}spawnParticle(){if(!this.particlesCanvas)return;let e=this.particlesCanvas.width,t=this.particlesCanvas.height,n=this.getEffectiveSpeed();this.particles.push({x:Math.random()*e,y:t+30*Math.random(),vx:.5*(Math.random()-.5),vy:(-.4-1.2*Math.random())*n,size:.8+1.2*Math.random(),opacity:.2+.4*Math.random(),hue:60*Math.random()-30,life:0})}createDataStreams(){if(!this.fillElement)return;let e=this.getEffectiveSpeed();this.dataStreams=document.createElement(`div`),Object.assign(this.dataStreams.style,{position:`absolute`,inset:`0`,overflow:`hidden`,opacity:`0.18`,zIndex:`3`}),this.fillElement.appendChild(this.dataStreams);for(let t=0;t<3;t++){let n=document.createElement(`div`),r=15+30*t,i=4*Math.random(),a=3+2*Math.random();Object.assign(n.style,{position:`absolute`,left:`${r}%`,top:`0`,width:`1px`,height:`100%`,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)`,animation:`data-stream ${a/e}s linear infinite`,animationDelay:`${i}s`,boxShadow:`0 0 4px ${this.variant.glow}40`}),this.dataStreams.appendChild(n)}}createGlitchLayer(){this.fillElement&&this.options.showGlitch&&(this.glitchLayer=document.createElement(`div`),Object.assign(this.glitchLayer.style,{position:`absolute`,inset:`0`,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)`,opacity:`0.3`,animation:`glitch-shift 0.3s steps(1) infinite`,mixBlendMode:`overlay`}),this.fillElement.appendChild(this.glitchLayer))}createReadout(){if(!this.element||!this.options.showReadout)return;let e=this.getEffectiveSpeed();this.readout=document.createElement(`div`),Object.assign(this.readout.style,{position:`absolute`,top:`10px`,right:`10px`,fontFamily:`monospace`,fontSize:`1rem`,fontWeight:`600`,color:this.variant.primary,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`,zIndex:`10`,pointerEvents:`none`,letterSpacing:`0.08em`,animation:`hologram-flicker ${8/e}s ease-in-out infinite`}),this.element.appendChild(this.readout);let t=document.createElement(`span`);t.textContent=` PWR`,t.style.opacity=`0.6`,t.style.fontSize=`0.7em`,this.readout.appendChild(t)}updateColors(){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=>{let t=e;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`}),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`)}startAnimation(){this.lastTime=performance.now(),this.animate(this.lastTime)}updateParticles(e){if(!this.particlesCanvas||!this.particlesCtx||!this.options.showParticles)return;let t=this.particlesCtx,n=this.particlesCanvas.width,r=this.particlesCanvas.height;t.clearRect(0,0,n,r);for(let n=this.particles.length-1;n>=0;n--){let r=this.particles[n],i=this.getEffectiveSpeed();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){this.particles.splice(n,1),this.spawnParticle();continue}let a=t.createRadialGradient(r.x,r.y,0,r.x,r.y,2.5*r.size);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()}}hexToRGBA(e,t){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`}updateFill(){let e=Math.max(0,this.options.percent),t=Math.min(e,100),n=e<20,r=e>100;this.currentPercent=t;let i=this.getEffectiveSpeed();if(this.fillElement){this.fillElement.style.height=`${t}%`;let e=this.options.duration??600;this.fillElement.style.transition=`height ${e}ms cubic-bezier(0.4, 0, 0.2, 1)`}if(this.readout){let t=Math.round(e);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`)}if(this.fillElement){let e=4/i;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`}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`)}disconnected(){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}},ae=(0,u.directive)(ie),oe=()=>!1;function se(e){oe=e}function ce(){return oe()}function le(e,t=l.nothing){return ce()?e:t}var ue=class extends d.Directive{constructor(e){super(e),this.config={}}update(e,[t]){if(e.type!==d.PartType.ELEMENT)throw Error("The `classMap` directive must be used in the `class` attribute");let n=e.element;this.config=t,this.config.bgColor&&(n.style.backgroundColor=this.config.bgColor),this.config.color&&(n.style.color=this.config.color)}render(e){return this.config=e,l.nothing}},de=(0,d.directive)(ue),N=new WeakMap;function P(e,t){let n=e.match(/var\(([^,)]+)/);return n&&getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim()||t}var fe=class extends d.Directive{constructor(e){if(super(e),e.type!==d.PartType.ELEMENT)throw Error(`confirmClick directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=N.get(r);if(i){if(i.callback=t,this.optionsEqual(i.options,n))return;this.cleanup(r)}let a=new s.Subject,o=this.setupClickListener(r,n??{},a);N.set(r,{subscription:o,callback:t,options:n??{},overlayElement:null,isConfirming:!1,cancel$:a})}optionsEqual(e,t){return t?e.timeout===t.timeout&&e.icon===t.icon:Object.keys(e).length===0}setupClickListener(e,t,n){return(0,s.fromEvent)(e,`click`).pipe((0,c.tap)(r=>{let i=N.get(e);i&&!i.isConfirming&&(r.stopPropagation(),r.preventDefault(),i.isConfirming=!0,this.showOverlay(e,i,t,n))})).subscribe()}showOverlay(e,t,n,r){let i=n.timeout??3e3,a=e,o=n.icon??a.icon??a._capturedIcon??e.textContent?.trim()??`warning`,l=P(`var(--schmancy-sys-color-error-default)`,`#dc2626`),u=P(`var(--schmancy-sys-color-error-on)`,`#ffffff`),d=P(`var(--schmancy-sys-color-error-container)`,`#fecaca`),f=document.createElement(`div`);f.setAttribute(`role`,`status`),f.setAttribute(`aria-label`,`Click again to confirm`);let p=e.getBoundingClientRect(),m=p.width,h=p.height,g=window.devicePixelRatio||1,_=getComputedStyle(e);Object.assign(f.style,{position:`fixed`,top:`${p.top}px`,left:`${p.left}px`,width:`${m}px`,height:`${h}px`,zIndex:`10000`,borderRadius:_.borderRadius||`50%`,overflow:`hidden`,cursor:`pointer`,opacity:`0`,transform:`scale(0.6)`,transition:`opacity 250ms cubic-bezier(0.22, 1.25, 0.36, 1), transform 300ms cubic-bezier(0.22, 1.25, 0.36, 1)`});let v=document.createElement(`canvas`);v.width=m*g,v.height=h*g,v.style.width=`${m}px`,v.style.height=`${h}px`,v.style.position=`absolute`,v.style.top=`0`,v.style.left=`0`,f.appendChild(v);let y=Math.round(.5*Math.min(m,h)),b=document.createElement(`schmancy-icon`);b.textContent=o,b.setAttribute(`size`,`${y}px`),Object.assign(b.style,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:u,pointerEvents:`none`}),f.appendChild(b),document.body.appendChild(f),t.overlayElement=f,(0,s.of)(null).pipe((0,c.observeOn)(s.animationFrameScheduler)).subscribe(()=>{f.style.opacity=`1`,f.style.transform=`scale(1)`});let x=v.getContext(`2d`);if(!x)return;x.scale(g,g);let S=m/2,C=h/2,w=Math.min(m,h)/2-1,T=w-3,E=e=>{x.clearRect(0,0,m,h),x.beginPath(),x.arc(S,C,T,0,2*Math.PI),x.fillStyle=l,x.fill();let t=1-e;if(t>0){let e=-Math.PI/2,n=e+2*Math.PI*t;x.beginPath(),x.arc(S,C,w,e,n),x.arc(S,C,T,n,e,!0),x.closePath(),x.fillStyle=d,x.fill()}};E(0);let D=performance.now(),O=(0,s.interval)(0,s.animationFrameScheduler).pipe((0,c.map)(()=>(performance.now()-D)/i),(0,c.takeWhile)(e=>e<=1),(0,c.takeUntil)(r),(0,c.tap)(e=>E(e))).subscribe({complete:()=>{N.get(e)?.isConfirming&&this.hideOverlay(e)}});t.subscription.add(O);let k=(0,s.merge)((0,s.fromEvent)(f,`click`).pipe((0,c.take)(1),(0,c.tap)(()=>{t.callback(),this.hideOverlay(e)})),(0,s.fromEvent)(document,`click`,{capture:!0}).pipe((0,c.filter)(t=>!f.contains(t.target)&&!e.contains(t.target)),(0,c.take)(1),(0,c.tap)(()=>this.hideOverlay(e))),(0,s.fromEvent)(document,`keydown`).pipe((0,c.filter)(e=>e.key===`Escape`),(0,c.take)(1),(0,c.tap)(()=>this.hideOverlay(e)))).pipe((0,c.take)(1),(0,c.takeUntil)(r)).subscribe();t.subscription.add(k)}hideOverlay(e){let t=N.get(e);if(t&&(t.cancel$.next(),t.isConfirming=!1,t.overlayElement)){let e=t.overlayElement;e.style.opacity=`0`,e.style.transform=`scale(0.6)`,(0,s.timer)(250).pipe((0,c.tap)(()=>{document.body.contains(e)&&document.body.removeChild(e)})).subscribe(),t.overlayElement=null}}cleanup(e){let t=N.get(e);t&&(t.cancel$.next(),t.cancel$.complete(),t.subscription.unsubscribe(),t.overlayElement&&document.body.contains(t.overlayElement)&&document.body.removeChild(t.overlayElement),N.delete(e))}disconnected(e){this.cleanup(e.element)}reconnected(e){let t=e.element,n=N.get(t);if(n){let e=new s.Subject,r=this.setupClickListener(t,n.options,e);N.set(t,{subscription:r,callback:n.callback,options:n.options,overlayElement:null,isConfirming:!1,cancel$:e})}}},pe=(0,d.directive)(fe),me=class extends u.AsyncDirective{constructor(...e){super(...e),this.element=null,this.items=[],this.subscription=null,this.typewriterSub=null,this.currentAnimation=null,this.addDisplayEl=null,this.disconnecting$=new s.Subject,this.initialized=!1}render(e){return l.noChange}update(e,[t={}]){if(this.element=e.element,!this.initialized&&this.isConnected){if(this.initialized=!0,this.disconnecting$.closed&&(this.disconnecting$=new s.Subject),this.items=Array.from(this.element.children).filter(e=>e instanceof HTMLElement),this.items.length===0)return l.noChange;this.element.style.display=`inline-grid`,this.element.style.verticalAlign=`bottom`,this.items.forEach((e,t)=>{e.style.gridColumn=`1`,e.style.gridRow=`1`,e.style.visibility=t===0?``:`hidden`}),this.startCycling(t)}return l.noChange}disconnected(){this.cleanup()}reconnected(){}startCycling(e){let{mode:t=`replace`}=e;this.items.length<2||(t===`add`?this.startAddCycling(e):this.startReplaceCycling(e))}startReplaceCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0}=e,a=e=>(0,s.defer)(()=>new s.Observable(i=>{let a=this.items[e],o=(e-1+this.items.length)%this.items.length,l=this.items[o],u=parseInt(a.dataset.hold||``,10)||n,d=this.transitionItems(l,a,t,r).pipe((0,c.switchMap)(()=>(0,s.timer)(u)),(0,c.take)(1),(0,c.takeUntil)(this.disconnecting$)).subscribe({next:()=>{i.next(),i.complete()},error:e=>i.error(e)});return()=>d.unsubscribe()})),o=parseInt(this.items[0].dataset.hold||``,10)||n,l=(0,s.concat)((0,s.defer)(()=>new s.Observable(e=>{let t=(0,s.timer)(o).pipe((0,c.takeUntil)(this.disconnecting$)).subscribe({next:()=>{e.next(),e.complete()}});return()=>t.unsubscribe()})),(0,s.concat)(...[...Array.from({length:this.items.length},(e,t)=>t).slice(1),0].map(e=>a(e))).pipe((0,c.repeat)()));this.subscription=(0,s.timer)(i).pipe((0,c.switchMap)(()=>l),(0,c.takeUntil)(this.disconnecting$)).subscribe()}startAddCycling(e){let{transition:t=`fade`,hold:n=2e3,duration:r=300,delay:i=0,separator:a=`, `}=e,o=this.items.map(e=>e.textContent||``);this.items.forEach(e=>{e.style.display=`none`});let l=document.createElement(`span`);this.element.appendChild(l),this.addDisplayEl=l;let u=(0,s.defer)(()=>{l.textContent=``;let e=``,i=o.map((i,o)=>{let u=parseInt(this.items[o].dataset.hold||``,10)||n,d=(o>0?a:``)+i;return(0,s.defer)(()=>t===`typewriter`?this.typewriterAdd(l,e,d,r).pipe((0,c.tap)(()=>{e+=d}),(0,c.switchMap)(()=>(0,s.timer)(u))):(0,s.defer)(()=>(e+=d,l.textContent=e,(0,s.timer)(u))))}),u=(0,s.defer)(()=>{let t=l.animate([{opacity:1},{opacity:0}],{duration:r,fill:`forwards`});return this.currentAnimation=t,(0,s.from)(t.finished).pipe((0,c.tap)(()=>{t.cancel(),l.textContent=``,l.style.opacity=``,e=``}),(0,c.switchMap)(()=>(0,s.timer)(300)))});return(0,s.concat)(...i,u)});this.subscription=(0,s.timer)(i).pipe((0,c.switchMap)(()=>u.pipe((0,c.repeat)())),(0,c.takeUntil)(this.disconnecting$)).subscribe()}typewriterAdd(e,t,n,r){if(n.length===0)return(0,s.of)(void 0);let i=r/n.length;return new s.Observable(r=>{let a=0,o=(0,s.interval)(i).pipe((0,c.tap)(()=>{a++,e.textContent=t+n.slice(0,a)}),(0,c.takeWhile)(()=>a<n.length),(0,c.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{e.textContent=t+n,r.next(),r.complete()}});return()=>o.unsubscribe()})}transitionItems(e,t,n,r){switch(this.currentAnimation?.cancel(),this.currentAnimation=null,this.typewriterSub?.unsubscribe(),this.typewriterSub=null,n){case`slide`:return this.slideTransition(e,t,r);case`typewriter`:return this.typewriterTransition(e,t,r);default:return this.fadeTransition(e,t,r)}}fadeTransition(e,t,n){let r=e.animate([{opacity:1},{opacity:0}],{duration:n/2,fill:`forwards`});return this.currentAnimation=r,(0,s.from)(r.finished).pipe((0,c.switchMap)(()=>{r.cancel(),e.style.visibility=`hidden`,t.style.visibility=``;let i=t.animate([{opacity:0},{opacity:1}],{duration:n/2,fill:`forwards`});return this.currentAnimation=i,(0,s.from)(i.finished).pipe((0,c.tap)(()=>{i.cancel()}),(0,c.map)(()=>{}),(0,c.catchError)(()=>s.EMPTY))}),(0,c.catchError)(()=>s.EMPTY))}slideTransition(e,t,n){let r=`cubic-bezier(0.4, 0, 0.2, 1)`;t.style.visibility=``;let i=e.animate([{transform:`translateY(0)`,opacity:1},{transform:`translateY(-100%)`,opacity:0}],{duration:n,fill:`forwards`,easing:r}),a=t.animate([{transform:`translateY(100%)`,opacity:0},{transform:`translateY(0)`,opacity:1}],{duration:n,fill:`forwards`,easing:r});return this.currentAnimation=a,(0,s.from)(a.finished).pipe((0,c.tap)(()=>{i.cancel(),a.cancel(),e.style.visibility=`hidden`}),(0,c.map)(()=>{}),(0,c.catchError)(()=>s.EMPTY))}typewriterTransition(e,t,n){let r=e.textContent||``,i=t.textContent||``,a=r.length+i.length;if(a===0)return e.style.visibility=`hidden`,t.style.visibility=``,(0,s.of)(void 0);let o=n/a;return new s.Observable(n=>{let a=r.length;return this.typewriterSub=(0,s.concat)((0,s.interval)(o).pipe((0,c.tap)(()=>{a--,e.textContent=r.slice(0,a)}),(0,c.takeWhile)(()=>a>0)),(0,s.defer)(()=>(e.style.visibility=`hidden`,e.textContent=r,t.style.visibility=``,t.textContent=``,(0,s.of)(null))),(0,s.defer)(()=>{let e=0;return(0,s.interval)(o).pipe((0,c.tap)(()=>{e++,t.textContent=i.slice(0,e)}),(0,c.takeWhile)(()=>e<i.length))})).pipe((0,c.takeUntil)(this.disconnecting$)).subscribe({complete:()=>{t.textContent=i,n.next(),n.complete()}}),()=>{this.typewriterSub?.unsubscribe(),this.typewriterSub=null}})}cleanup(){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)=>{e.style.gridColumn=``,e.style.gridRow=``,e.style.visibility=t===0?``:`hidden`,e.style.opacity=``,e.style.transform=``}),this.element=null,this.items=[],this.initialized=!1}},he=(0,u.directive)(me),ge=class extends u.AsyncDirective{constructor(...e){super(...e),this.maxBlur=8,this.duration=400,this.isBlurred=!1,this.transitionSet=!1}render(e){}update(e,[t]){if(e.type!==d.PartType.ELEMENT)throw Error(`depthOfField directive must be used on an element`);this.element=e.element,this.maxBlur=t.maxBlur??8,this.duration=t.duration??400,this.transitionSet||n.t.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()}applyBlur(){this.element.style.filter=`blur(${this.maxBlur}px) saturate(60%)`,this.element.style.scale=`1.01`,this.isBlurred=!0}clearBlur(){this.element.style.filter=``,this.element.style.scale=``,this.isBlurred=!1}disconnected(){this.isBlurred&&this.clearBlur()}reconnected(){}},_e=(0,d.directive)(ge),F=new s.BehaviorSubject(null),I=new s.BehaviorSubject(null),L=new Map,R=new Map,z=[];function B(e){z.push(`[${new Date().toISOString().slice(11,23)}] ${e}`)}var V=null;I.pipe((0,c.distinctUntilChanged)((e,t)=>e?.target===t?.target&&e?.position===t?.position)).subscribe(e=>{if(!e)return void(V&&(V.style.display=`none`));if(n.t.value)return;let t=function(){if(V)return V;let e=document.createElement(`div`);e.setAttribute(`data-schmancy-drop-line`,``),Object.assign(e.style,{position:`fixed`,height:`2px`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,borderRadius:`1px`,pointerEvents:`none`,zIndex:`10000`,transition:`top 100ms ease, left 100ms ease, width 100ms ease`,boxShadow:`0 0 4px var(--schmancy-sys-color-tertiary-default, #6750A4)`,display:`none`});for(let t of[`left`,`right`]){let n=document.createElement(`div`);Object.assign(n.style,{position:`absolute`,width:`6px`,height:`6px`,borderRadius:`50%`,backgroundColor:`var(--schmancy-sys-color-tertiary-default, #6750A4)`,top:`-2px`,[t]:`-3px`}),e.appendChild(n)}return document.body.appendChild(e),V=e,e}(),r=e.target.getBoundingClientRect(),i=e.position===`before`?r.top-1:r.bottom+1;Object.assign(t.style,{top:`${i}px`,left:`${r.left}px`,width:`${r.width}px`,display:`block`})});var H=class extends d.Directive{constructor(...e){super(...e),this.destroy$=new s.Subject}update(e,[r]){if(this.id=r,!this.element){let r=e.element;this.element=r,r.draggable=!0,r.style.cursor=`grab`,(0,s.fromEvent)(r,`dragstart`).pipe((0,c.tap)(e=>{e.stopPropagation(),e.dataTransfer?.setData(`application/json`,JSON.stringify({id:this.id})),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`),r.style.cursor=`grabbing`,z.length=0,B(`DRAGSTART id=${this.id} tag=${r.tagName}`),F.next(this.id),R.clear();let t=r.parentElement;if(t)for(let[e,n]of L)n.parentElement===t&&R.set(e,n.getBoundingClientRect())}),(0,c.observeOn)(s.animationFrameScheduler),(0,c.tap)(()=>{n.t.value||(r.style.transition=`transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease`,r.style.transform=`scale(1.03)`,r.style.boxShadow=`0 8px 25px rgba(0,0,0,0.15)`,r.style.opacity=`0.6`,r.style.zIndex=`1000`,r.style.pointerEvents=`none`)}),(0,c.switchMap)(()=>(0,s.fromEvent)(r,`dragend`).pipe((0,c.take)(1),(0,c.tap)(()=>{let e=I.value;if(r.style.removeProperty(`transition`),r.style.removeProperty(`transform`),r.style.removeProperty(`box-shadow`),r.style.removeProperty(`opacity`),r.style.removeProperty(`z-index`),r.style.removeProperty(`pointer-events`),r.style.cursor=`grab`,e){let{target:r,destinationId:i,position:a}=e;B(`DROP source=${this.id} dest=${i} pos=${a}`),r.dispatchEvent(new CustomEvent(`drop`,{detail:{source:this.id,destination:i,position:a},bubbles:!0,composed:!0})),(0,s.timer)(0,s.animationFrameScheduler).pipe((0,c.skip)(1),(0,c.take)(1)).subscribe(()=>{if(!n.t.value&&R.size!==0){for(let[e,n]of R){let r=L.get(e);if(!r)continue;let i=r.getBoundingClientRect(),a=n.left-i.left,o=n.top-i.top;Math.abs(a)<1&&Math.abs(o)<1||r.animate([{transform:`translate(${a}px, ${o}px)`},{transform:`translate(0,0)`}],{duration:t.f.duration,easing:t.f.easingFallback,fill:`none`})}R.clear()}})}F.next(null),I.next(null),B(`DRAGEND id=${this.id}`),z.length!==0&&(z.length=0)}))),(0,c.takeUntil)(this.destroy$)).subscribe()}return this.registeredId&&this.registeredId!==r&&L.delete(this.registeredId),L.set(r,this.element),this.registeredId=r,l.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.registeredId&&L.delete(this.registeredId),this.element=void 0}reconnected(){this.destroy$=new s.Subject,this.element=void 0}render(e){return l.nothing}},ve=(0,d.directive)(H),U=class extends d.Directive{constructor(...e){super(...e),this.destroy$=new s.Subject}update(e,[t]){if(this.destinationId=t,!this.element){let t=e.element;this.element=t,(0,s.fromEvent)(t,`dragenter`).pipe((0,c.tap)(e=>{B(`NATIVE-DRAGENTER dest=${this.destinationId}`),e.preventDefault()}),(0,c.takeUntil)(this.destroy$)).subscribe(),(0,s.fromEvent)(t,`dragover`).pipe((0,c.tap)(e=>{B(`NATIVE-DRAGOVER dest=${this.destinationId}`),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,c.takeUntil)(this.destroy$)).subscribe(),(0,s.fromEvent)(t,`drop`).pipe((0,c.tap)(e=>{e.preventDefault(),B(`NATIVE-DROP dest=${this.destinationId}`)}),(0,c.takeUntil)(this.destroy$)).subscribe(),F.pipe((0,c.switchMap)(e=>e&&e!==this.destinationId?(B(`DROP-ACTIVE dest=${this.destinationId} src=${e}`),(0,s.fromEvent)(t,`dragover`).pipe((0,c.tap)(e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}),(0,c.tap)(n=>{let r=function(e,t,n){let r=t.getBoundingClientRect(),i=n?L.get(n):null;if(!i)return e.clientY<r.top+r.height/2?`before`:`after`;let a=i.getBoundingClientRect();if(Math.abs(a.top-r.top)<r.height/2){let t=r.left+r.width/2;return a.left>r.left?e.clientX<t?`before`:null:e.clientX>=t?`after`:null}let o=r.top+r.height/2;return a.top>r.top?e.clientY<o?`before`:null:e.clientY>=o?`after`:null}(n,t,e);I.next(r?{target:t,destinationId:this.destinationId,position:r}:null)}))):(I.next(null),s.EMPTY)),(0,c.takeUntil)(this.destroy$)).subscribe()}return l.nothing}disconnected(){this.destroy$.next(),this.destroy$.complete(),this.element=void 0}reconnected(){this.destroy$=new s.Subject,this.element=void 0}render(e){return l.nothing}},ye=(0,d.directive)(U),be=class extends u.AsyncDirective{constructor(...e){super(...e),this.element=null,this.disconnecting$=new s.Subject}subscribe(){let e=this.element;e&&(0,s.combineLatest)([(0,s.merge)((0,s.fromEvent)(window,`resize`,{passive:!0}),window.visualViewport?(0,s.merge)((0,s.fromEvent)(window.visualViewport,`resize`,{passive:!0}),(0,s.fromEvent)(window.visualViewport,`scroll`,{passive:!0})):s.EMPTY,(0,s.fromEvent)(window,`orientationchange`),(0,s.fromEvent)(document,`focusout`,{passive:!0}).pipe((0,c.switchMap)(()=>(0,s.timer)(100))),i.t(e),e.parentElement?i.t(e.parentElement):s.EMPTY).pipe((0,c.auditTime)(0,s.animationFrameScheduler),(0,c.startWith)(null)),r.n.bottomOffset$,r.n.fullscreen$]).pipe((0,c.filter)(()=>{let e=window.visualViewport;return!e||Math.abs(e.scale-1)<=.01}),(0,c.tap)(([,t,n])=>{let r=window.visualViewport,i=e.getBoundingClientRect(),a=e.style;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`}),(0,c.takeUntil)(this.disconnecting$)).subscribe()}render(){}update(e){if(e.type!==d.PartType.ELEMENT)throw Error(`fill directive can only be used on elements`);let t=e.element;this.element!==t&&(this.element=t,this.subscribe())}disconnected(){this.disconnecting$.next(),this.element=null}reconnected(){this.element&&(this.disconnecting$=new s.Subject,this.subscribe())}},xe=(0,u.directive)(be),Se=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null,this.destroy$=new s.Subject,this.subscriptions=new s.Subscription}render(e){return l.noChange}update(e,[t={}]){let n=e.element,{emoji:r=``,position:i=`auto`,showAfter:a=0,hideAfter:o,animation:c=`point`,shimmerDuration:u=3e3}=t;return!this.state||this.state.emoji===r&&this.state.position===i&&this.state.showAfter===a&&this.state.hideAfter===o&&this.state.animation===c&&this.state.shimmerDuration===u||this.cleanup(),!this.state&&this.isConnected&&(this.state={emoji:r,position:i,showAfter:a,hideAfter:o,animation:c,shimmerDuration:u,element:n,activeAnimations:new Set},this.destroy$=new s.Subject,this.subscriptions=new s.Subscription,this.scheduleShow()),l.noChange}scheduleShow(){if(!this.state||!this.isConnected)return;let e=this.state.showAfter,t=(0,s.timer)(e).pipe((0,c.takeUntil)(this.destroy$),(0,c.filter)(()=>this.isConnected&&this.state!==null),(0,c.switchMap)(()=>a.t.activeCount>0?(0,s.timer)(500).pipe((0,c.takeUntil)(this.destroy$),(0,c.switchMap)(()=>this.waitForOverlaysClear())):(0,s.timer)(0))).subscribe({next:()=>{this.isConnected&&this.state&&this.show()},error:()=>{}});this.subscriptions.add(t)}waitForOverlaysClear(){return(0,s.timer)(500).pipe((0,c.takeUntil)(this.destroy$),(0,c.switchMap)(()=>this.isConnected?a.t.activeCount>0?this.waitForOverlaysClear():(0,s.timer)(0):s.EMPTY))}show(){if(!this.state||!this.state.element||!this.isConnected)return;let e=this.state.element,t=window.getComputedStyle(e),n=t.position;this.state.originalOverflow=e.style.overflow,this.state.originalPosition=e.style.position,n===`static`&&(e.style.position=`relative`),e.style.overflow=`hidden`;let r=document.createElement(`div`);r.className=`fyi-shimmer-overlay`;let i=t.borderRadius;if(Object.assign(r.style,{position:`absolute`,inset:`0`,pointerEvents:`none`,zIndex:`9999`,borderRadius:i,background:`
161
+ linear-gradient(
162
+ 108deg,
163
+ transparent 0%,
164
+ transparent 40%,
165
+ rgba(255, 255, 255, 0.02) 44%,
166
+ rgba(255, 255, 255, 0.06) 48%,
167
+ rgba(255, 255, 255, 0.08) 50%,
168
+ rgba(255, 255, 255, 0.06) 52%,
169
+ rgba(255, 255, 255, 0.02) 56%,
170
+ transparent 60%,
171
+ transparent 100%
172
+ )
173
+ `,backgroundSize:`400% 100%`,backgroundRepeat:`no-repeat`}),e.appendChild(r),this.state.shimmerOverlay=r,this.state.elementAnimation=r.animate([{backgroundPosition:`100% 0`},{backgroundPosition:`0% 0`}],{duration:this.state.shimmerDuration,easing:`linear`,iterations:1/0}),this.state.activeAnimations.add(this.state.elementAnimation),!this.state.emoji)return void this.scheduleHide();let a=document.createElement(`div`);a.className=`fyi-indicator`,a.textContent=this.state.emoji;let o=this.getPositionTransform(this.state.position);Object.assign(a.style,{fontSize:`1.5rem`,pointerEvents:`none`,zIndex:`10001`}),a.style.transform=o;let s=this.state.element.getBoundingClientRect();switch(a.style.position=`fixed`,this.state.position){case`bottom`:a.style.top=`${s.bottom+2}px`,a.style.left=`${s.left+s.width/2}px`;break;case`top`:a.style.bottom=window.innerHeight-s.top+`px`,a.style.left=`${s.left+s.width/2}px`;break;case`left`:a.style.right=window.innerWidth-s.left+`px`,a.style.top=`${s.top+s.height/2}px`;break;case`right`:a.style.left=`${s.right+12}px`,a.style.top=`${s.top+s.height/2}px`;break;default:a.style.top=`${s.top}px`,a.style.right=window.innerWidth-s.right+`px`}document.body.appendChild(a),this.state.indicator=a;let c=a.animate([{opacity:0,transform:`${o} scale(0.5)`},{opacity:1,transform:`${o} scale(1)`}],{duration:400,easing:`cubic-bezier(0.34, 1.56, 0.64, 1)`,fill:`forwards`});this.state.activeAnimations.add(c),this.applyAnimation(c,a,o),this.scheduleHide()}applyAnimation(e,t,n){if(!this.state)return;let r=this.state.animation,i=this.state.position;switch(r){case`point`:{let r=this.getPointingKeyframes(i,n),a=(0,s.fromEvent)(e,`finish`).pipe((0,c.take)(1),(0,c.takeUntil)(this.destroy$)).subscribe(()=>{if(!this.state||!this.isConnected)return;let e=t.animate(r,{duration:1800,easing:`ease-in-out`,iterations:1/0});this.state.webAnimation=e,this.state.activeAnimations.add(e)});this.subscriptions.add(a);break}case`bounce`:{let e=t.animate([{opacity:0,transform:`${n} scale(0.3)`,offset:0},{transform:`${n} scale(1.1)`,offset:.5},{transform:`${n} scale(0.95)`,offset:.7},{opacity:1,transform:`${n} scale(1)`,offset:1}],{duration:600,easing:`cubic-bezier(0.68, -0.55, 0.265, 1.55)`,fill:`forwards`});this.state.webAnimation=e,this.state.activeAnimations.add(e);break}case`pulse`:{let r=(0,s.fromEvent)(e,`finish`).pipe((0,c.take)(1),(0,c.takeUntil)(this.destroy$)).subscribe(()=>{if(!this.state||!this.isConnected)return;let e=t.animate([{transform:`${n} scale(1)`},{transform:`${n} scale(1.15)`},{transform:`${n} scale(1)`}],{duration:1500,easing:`ease-in-out`,iterations:1/0});this.state.webAnimation=e,this.state.activeAnimations.add(e)});this.subscriptions.add(r);break}case`none`:{let e=t.animate([{opacity:0},{opacity:1}],{duration:300,easing:`ease-in`,fill:`forwards`});this.state.webAnimation=e,this.state.activeAnimations.add(e);break}}}getPointingKeyframes(e,t){switch(e){case`top`:return[{transform:`${t} scale(1) translateY(0px)`},{transform:`${t} scale(1) translateY(8px)`},{transform:`${t} scale(1) translateY(0px)`}];case`bottom`:return[{transform:`${t} scale(1) translateY(0px)`},{transform:`${t} scale(1) translateY(-8px)`},{transform:`${t} scale(1) translateY(0px)`}];case`left`:return[{transform:`${t} scale(1) translateX(0px)`},{transform:`${t} scale(1) translateX(8px)`},{transform:`${t} scale(1) translateX(0px)`}];case`right`:return[{transform:`${t} scale(1) translateX(0px)`},{transform:`${t} scale(1) translateX(-8px)`},{transform:`${t} scale(1) translateX(0px)`}];default:return[{transform:`${t} scale(1) translate(0px, 0px)`},{transform:`${t} scale(1) translate(-6px, 6px)`},{transform:`${t} scale(1) translate(0px, 0px)`}]}}scheduleHide(){if(!this.state?.hideAfter||!this.isConnected)return;let e=(0,s.timer)(this.state.hideAfter).pipe((0,c.takeUntil)(this.destroy$)).subscribe(()=>{this.isConnected&&this.hide()});this.subscriptions.add(e)}hide(){if(!this.state)return;let e=this.state,t=[];if(e.indicator){let n=e.indicator.animate([{opacity:1},{opacity:0}],{duration:600,easing:`cubic-bezier(0.4, 0, 0.2, 1)`,fill:`forwards`});e.activeAnimations.add(n);let r=()=>{e.webAnimation?.cancel(),e.indicator?.remove()};t.push(n.finished.then(r).catch(r))}if(e.shimmerOverlay){let n=e.shimmerOverlay.animate([{opacity:1},{opacity:.7,offset:.3},{opacity:.3,offset:.7},{opacity:0}],{duration:3e3,easing:`ease-out`,fill:`forwards`});e.activeAnimations.add(n);let r=()=>{e.elementAnimation?.cancel(),e.shimmerOverlay?.remove()};t.push(n.finished.then(r).catch(r))}Promise.all(t).then(()=>{this.state===e&&(this.restoreStyles(e),this.state=null)})}restoreStyles(e){e.element&&(e.originalOverflow!==void 0&&(e.element.style.overflow=e.originalOverflow),e.originalPosition!==void 0&&(e.element.style.position=e.originalPosition))}getPositionTransform(e){switch(e){case`top`:case`bottom`:return`translateX(-50%)`;case`left`:case`right`:return`translateY(-50%)`;default:return``}}cleanup(){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)}disconnected(){this.cleanup()}reconnected(){this.destroy$=new s.Subject,this.subscriptions=new s.Subscription}},Ce=(0,u.directive)(Se),we=class extends u.AsyncDirective{constructor(...e){super(...e),this.hasAnimated=!1}render(e){}update(e,[t]){if(e.type!==d.PartType.ELEMENT)throw Error(`gravity directive must be used on an element`);if(this.element=e.element,this.options=t,this.hasAnimated)return;if(n.t.value)return void(this.hasAnimated=!0);let r=Math.max(.3,Math.min(3,t?.mass??1)),i=t?.distance??30,a=(t?.delay??0)+(t?.stagger??0);this.animate(r,i,a),this.hasAnimated=!0}reconnected(){if(this.hasAnimated=!1,this.options&&!n.t.value){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);this.animate(e,t,n),this.hasAnimated=!0}}animate(e,n,r){let i=e<.7?t.l:t.d,a=i.duration*(1/Math.sqrt(e)),o=1/e*n;this.animation?.cancel(),this.element.style.willChange=`transform, opacity`,this.animation=this.element.animate([{opacity:0,transform:`translateY(-${o}px)`},{opacity:1,transform:`translateY(0)`}],{duration:a,delay:r,easing:i.easingFallback,fill:`backwards`}),(0,s.from)(this.animation.finished).pipe((0,c.take)(1),(0,c.tap)(()=>{this.element.style.willChange=``,this.animation=void 0}),(0,c.catchError)(()=>s.EMPTY)).subscribe()}disconnected(){this.animation?.cancel(),this.animation=void 0}},Te=(0,d.directive)(we),W=600,G=!1,K={hAlpha:`rgba(200, 50, 100, 0.85)`,hAlphaDim:`rgba(150, 30, 80, 0.5)`,oiii:`rgba(40, 180, 180, 0.7)`,oiiiDim:`rgba(30, 140, 150, 0.35)`,stellar:`rgba(255, 230, 240, 0.9)`,stellarDim:`rgba(255, 180, 200, 0.4)`,deepPurple:`rgba(80, 40, 120, 0.6)`,deepBlue:`rgba(20, 40, 100, 0.5)`,voidBlack:`rgba(0, 0, 0, 1)`,singularity:`rgba(10, 5, 20, 1)`},q=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>`;function Ee(e,t){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`}var De=class extends u.AsyncDirective{constructor(...e){super(...e),this.state$=new s.BehaviorSubject(`idle`),this.destroyed$=new s.BehaviorSubject(!1),this.visible$=new s.BehaviorSubject(!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}toHostRelative(e,t){if(!this.element)return{x:e,y:t};let n=this.element.getBoundingClientRect();return{x:e-n.left+this.element.scrollLeft,y:t-n.top+this.element.scrollTop}}render(e){return l.noChange}update(e,[t=!0]){let n=e.element,r=typeof t==`object`?t:{};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(){if(G)return;G=!0;let e=document.createElement(`style`);e.id=`hb-keyframes`,e.textContent=`
174
+ @keyframes hb-wing {
175
+ 0% { transform: scaleY(0.85); opacity: 0.4; }
176
+ 100% { transform: scaleY(1.15); opacity: 0.6; }
177
+ }
178
+ @keyframes hb-disk-inner {
179
+ to { transform: translate(-50%, -50%) rotateX(75deg) rotate(360deg); }
180
+ }
181
+ @keyframes hb-disk-outer {
182
+ to { transform: translate(-50%, -50%) rotateX(70deg) rotate(-360deg); }
183
+ }
184
+ @keyframes hb-disk-mid {
185
+ to { transform: translate(-50%, -50%) rotateX(72deg) rotate(180deg); }
186
+ }
187
+ @keyframes hb-bh-in {
188
+ 0% { transform: translate(-50%, -50%) scale(0); }
189
+ 60% { transform: translate(-50%, -50%) scale(1.1); }
190
+ 100% { transform: translate(-50%, -50%) scale(1); }
191
+ }
192
+ @keyframes hb-horizon-pulse {
193
+ 0%, 100% { box-shadow: 0 0 20px 6px var(--hb-color), 0 0 40px 12px var(--hb-color-dim); }
194
+ 50% { box-shadow: 0 0 30px 10px var(--hb-color), 0 0 60px 20px var(--hb-color-dim); }
195
+ }
196
+ @keyframes hb-lensing {
197
+ 0% { transform: translate(-50%, -50%) rotateX(85deg) scale(1); opacity: 0.6; }
198
+ 50% { transform: translate(-50%, -50%) rotateX(85deg) scale(1.05); opacity: 0.8; }
199
+ 100% { transform: translate(-50%, -50%) rotateX(85deg) scale(1); opacity: 0.6; }
200
+ }
201
+ @keyframes hb-particle-orbit {
202
+ 0% { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg) scale(1); opacity: 0.9; }
203
+ 100% { transform: rotate(720deg) translateX(0px) rotate(-720deg) scale(0); opacity: 0; }
204
+ }
205
+ @keyframes hb-ripple {
206
+ 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
207
+ 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
208
+ }
209
+ `,document.head.appendChild(e)}(),this.initStateMachine()),l.noChange):(this.fadeOutAndCleanup(),l.noChange)}initStateMachine(){this.state$.pipe((0,c.distinctUntilChanged)(),(0,c.filter)(()=>!this.destroyed$.value),(0,c.switchMap)(e=>this.handleStateTransition(e)),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(),(0,s.combineLatest)([new s.Observable(e=>{if(!this.element||typeof IntersectionObserver>`u`)return void e.next(!0);let t=new IntersectionObserver(t=>e.next(t[0].isIntersecting),{threshold:0});return t.observe(this.element),()=>t.disconnect()}),(0,s.fromEvent)(document,`visibilitychange`).pipe((0,c.map)(()=>document.visibilityState===`visible`),(0,c.startWith)(document.visibilityState===`visible`)),new s.Observable(e=>{if(!this.element)return void e.next(!0);let t=this.element,n=null;for(;t;){if(`playing`in t){n=t;break}t=t.parentElement}if(!n)return void e.next(!0);e.next(n.playing);let r=new MutationObserver(()=>{e.next(n.playing)});return r.observe(n,{attributes:!0,attributeFilter:[`playing`]}),()=>r.disconnect()})]).pipe((0,c.map)(([e,t,n])=>e&&t&&n),(0,c.distinctUntilChanged)(),(0,c.tap)(e=>this.visible$.next(e)),(0,c.filter)(()=>!this.destroyed$.value&&!!this.context),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(e=>{e&&!this.rafId?this.startAnimationLoop():!e&&this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=0)}),(0,s.fromEvent)(window,`resize`).pipe((0,c.debounceTime)(100),(0,c.filter)(()=>!this.destroyed$.value&&!!this.context),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(()=>this.updateDestinationPositions()),(0,s.timer)(this.options.delay??500).pipe((0,c.filter)(()=>!this.destroyed$.value&&!this.bird),(0,c.switchMap)(()=>new s.Observable(e=>{if(!this.element)return e.next(),void e.complete();let t=()=>{this.isElementVisible(this.element)?(e.next(),e.complete()):(0,s.timer)(50).pipe((0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(t)};t()})),(0,c.switchMap)(()=>this.createBird()),(0,c.tap)(()=>{this.destroyed$.value||this.state$.next(`flying`)}),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe()}handleStateTransition(e){switch(e){case`idle`:default:return s.EMPTY;case`flying`:case`hovering`:case`spiraling`:case`absorbed`:return this.startAnimationLoop(),s.EMPTY;case`done`:return this.cleanup(),this.element?.dispatchEvent(new CustomEvent(`hummingbird-complete`,{bubbles:!0,composed:!0})),s.EMPTY}}async createBird(){if(!this.element)return;let e=document.createElement(`div`);e.innerHTML=q(this.currentColor),e.className=`pointer-events-none`,e.style.cssText=`
210
+ position: absolute;
211
+ left: 0;
212
+ top: 0;
213
+ width: 24px;
214
+ height: 24px;
215
+ z-index: 99999;
216
+ will-change: transform, opacity;
217
+ transform-origin: center center;
218
+ transition: opacity 400ms ease-out;
219
+ `,this.element.appendChild(e),this.bird=e,this.discoverInitialColor();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];this.hasHome=!!i,i&&a.push(i),a.length===0&&a.push({x:n.x+t.width+60,y:n.y+.5*t.height,duration:W});let o=n.x-60,s=n.y+t.height/2;this.context={state:`flying`,cx:o,cy:s,flightStartX:o,flightStartY:s,phaseStart:performance.now(),destIdx:0,destinations:a,bx:0,by:0},this.bird.style.transform=`translate(${o-12}px, ${s-12}px)`}discoverInitialColor(){this.element&&((0,s.fromEvent)(window,r.r).pipe((0,c.take)(1),(0,c.takeUntil)((0,s.timer)(150)),(0,c.map)(e=>e.detail.theme?.color),(0,c.filter)(e=>!!e&&e!==this.currentColor),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(e=>{this.bird&&(this.currentColor=e,this.bird.innerHTML=q(e))}),this.element.dispatchEvent(new CustomEvent(r.i,{bubbles:!0,composed:!0})))}updateBirdColor(){if(!this.bird||!this.context||this.destroyed$.value)return;let e=this.context.destinations[this.context.destIdx];e?.element&&((0,s.fromEvent)(window,r.r).pipe((0,c.take)(1),(0,c.takeUntil)((0,s.timer)(100)),(0,c.map)(e=>e.detail.theme?.color),(0,c.filter)(e=>!!e&&e!==this.currentColor),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(e=>{this.bird&&(this.currentColor=e,this.bird.innerHTML=q(e))}),e.element.dispatchEvent(new CustomEvent(r.i,{bubbles:!0,composed:!0})))}discoverWaypoints(e){if(e.length===0)return Promise.resolve([]);let t=e.map(e=>typeof e==`string`||e instanceof HTMLElement?{ref:e,duration:W}:{ref:e.ref,duration:e.duration??W}),n=t.map(e=>this.discoverElement(e.ref));return new Promise(e=>{(0,s.forkJoin)(n).pipe((0,c.map)(e=>e.map((e,n)=>{if(!e)return null;let r=e.getBoundingClientRect(),i=this.toHostRelative(r.left+r.width/2,r.top+r.height/2);return{x:i.x,y:i.y,element:e,duration:t[n].duration}}).filter(e=>e!==null)),(0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe({next:t=>e(t),error:()=>e([])})})}discoverElement(e){return e instanceof HTMLElement?Promise.resolve(e):new Promise(t=>{o.r(e,300).pipe((0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe({next:e=>t(e),error:()=>t(null)})})}async getPosition(e){let t=await this.discoverElement(e);if(!t)return null;let n=t.getBoundingClientRect(),r=this.toHostRelative(n.left+n.width/2,n.top+n.height/2);return{x:r.x,y:r.y,element:t,duration:W}}updateDestinationPositions(){if(this.context){for(let e of this.context.destinations)if(e.element){let t=e.element.getBoundingClientRect(),n=this.toHostRelative(t.left+t.width/2,t.top+t.height/2);e.x=n.x,e.y=n.y}}}startAnimationLoop(){if(this.rafId)return;let e=t=>{if(this.bird&&this.context&&!this.destroyed$.value&&this.visible$.value){switch(this.state$.value){case`flying`:this.tickFlying(t);break;case`hovering`:this.tickHovering(t);break;case`spiraling`:this.tickSpiraling(t);break;case`absorbed`:this.tickAbsorbed(t);return}this.rafId=requestAnimationFrame(e)}else this.rafId=0};this.rafId=requestAnimationFrame(e)}tickFlying(e){if(!this.context||!this.bird)return;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;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`)))}tickHovering(e){if(!this.context||!this.bird)return;let t=this.context,n=e-t.phaseStart,r=t.destinations[t.destIdx];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;let i=1+.08*Math.sin(.006*n);if(this.bird.style.transform=`translate(${r.x-12}px, ${r.y-12}px) scale(${i})`,n>r.duration){let n=t.destinations[t.destIdx+1];if(!n&&!this.hasHome)return this.hideShimmer(),void this.fadeOutBird();if(n?.element&&!this.isElementVisible(n.element))return;if(n?.element&&!this.isInViewport(n.element)&&n.element.scrollIntoView({behavior:`smooth`,block:`center`,inline:`center`}),n?.element){let e=n.element.getBoundingClientRect(),t=this.toHostRelative(e.left+e.width/2,e.top+e.height/2);n.x=t.x,n.y=t.y}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`)}}isElementVisible(e){let t=window.getComputedStyle(e);return parseFloat(t.opacity)>.5&&t.visibility!==`hidden`&&t.display!==`none`}isInViewport(e){let t=e.getBoundingClientRect();return t.bottom>80&&t.top<window.innerHeight-80&&t.right>80&&t.left<window.innerWidth-80}showShimmer(e){let t=window.getComputedStyle(e);t.position===`static`&&(e.style.position=`relative`);let n=document.createElement(`div`);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`}],{duration:1e4,easing:`cubic-bezier(0.25, 0.1, 0.25, 1)`,iterations:1/0})}hideShimmer(){if(this.shimmerAnimation&&=(this.shimmerAnimation.cancel(),null),this.shimmerOverlay){let e=this.shimmerOverlay.animate([{opacity:1},{opacity:0}],{duration:300,easing:`ease-out`,fill:`forwards`}),t=this.shimmerOverlay;e.onfinish=()=>t.remove(),this.shimmerOverlay=null}}fadeOutBird(){this.bird&&(this.state$.next(`idle`),this.bird.style.opacity=`1`,this.bird.animate([{opacity:1,transform:this.bird.style.transform},{opacity:0,transform:this.bird.style.transform}],{duration:400,easing:`ease-out`,fill:`forwards`}).onfinish=()=>{this.state$.next(`done`)})}fadeOutAndCleanup(){if(!this.bird)return void this.cleanup();this.rafId&&=(cancelAnimationFrame(this.rafId),0),this.bird.style.opacity=`1`;let e=this.bird.animate([{opacity:1},{opacity:.8,offset:.3},{opacity:.5,offset:.6},{opacity:.2,offset:.85},{opacity:0}],{duration:3e3,easing:`linear`,fill:`forwards`});this.trailCanvas&&this.trailCanvas.animate([{opacity:1},{opacity:0}],{duration:3500,easing:`ease-out`,fill:`forwards`}),this.hideShimmer(),e.onfinish=()=>{this.cleanup()}}showPulseRings(e,t){let n=this.currentColor;for(let r=0;r<3;r++){let i=document.createElement(`div`);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 ${Ee(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([{transform:`translate(-50%, -50%) scale(1)`,opacity:.6},{transform:`translate(-50%, -50%) scale(4)`,opacity:0}],{duration:1200,delay:300*r,easing:`ease-out`,fill:`forwards`}).onfinish=()=>i.remove()}(0,s.timer)(1800).pipe((0,c.takeUntil)(this.destroyed$.pipe((0,c.filter)(e=>e)))).subscribe(()=>{this.pulseRings=[]})}tickSpiraling(e){if(!this.context||!this.bird)return;let t=this.context,n=e-t.phaseStart,r=t.bx-t.cx,i=t.by-t.cy,a=Math.hypot(r,i);if(a>8){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;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;let d=Math.max(.2,a/120),f=.3*n;this.bird.style.transform=`translate(${t.cx-12}px, ${t.cy-12}px) rotate(${f}deg) scale(${d})`;let p=1-a/100;p>.3&&(this.bird.style.filter=`brightness(${1+.5*p}) drop-shadow(0 0 ${8*p}px ${this.currentColor})`)}else t.phaseStart=e,this.startHostDistortion(),this.state$.next(`absorbed`)}startHostDistortion(){if(!this.context)return;let e=this.context.destinations[this.context.destinations.length-1];if(!e?.element)return;this.homeElement=e.element;let t=this.homeElement,n=this.currentColor,r=t.style.transform||``;t.animate([{transform:`${r} translate(0, 0) scale(1) rotate(0deg)`,filter:`brightness(1)`},{transform:`${r} translate(-2px, 1px) scale(0.992) rotate(-0.3deg)`,filter:`brightness(1.05)`,offset:.05},{transform:`${r} translate(3px, -1px) scale(1.005) rotate(0.4deg)`,filter:`brightness(1.1)`,offset:.1},{transform:`${r} translate(-1px, 2px) scale(0.995) rotate(-0.2deg)`,filter:`brightness(1.15) drop-shadow(0 0 5px ${n})`,offset:.15},{transform:`${r} translate(2px, 0px) scale(1.008) rotate(0.5deg)`,filter:`brightness(1.2)`,offset:.2},{transform:`${r} translate(-3px, -2px) scale(0.988) rotate(-0.6deg)`,filter:`brightness(1.25) drop-shadow(0 0 8px ${n})`,offset:.25},{transform:`${r} translate(1px, 3px) scale(1.01) rotate(0.3deg)`,filter:`brightness(1.3)`,offset:.3},{transform:`${r} translate(-2px, -1px) scale(0.985) rotate(-0.4deg)`,filter:`brightness(1.35) drop-shadow(0 0 12px ${n})`,offset:.35},{transform:`${r} translate(4px, 1px) scale(1.015) rotate(0.7deg)`,filter:`brightness(1.4)`,offset:.4},{transform:`${r} translate(-1px, 2px) scale(0.99) rotate(-0.5deg)`,filter:`brightness(1.35) drop-shadow(0 0 15px ${n})`,offset:.45},{transform:`${r} translate(2px, -2px) scale(1.012) rotate(0.4deg)`,filter:`brightness(1.3)`,offset:.5},{transform:`${r} translate(-3px, 1px) scale(0.993) rotate(-0.3deg)`,filter:`brightness(1.25) drop-shadow(0 0 10px ${n})`,offset:.55},{transform:`${r} translate(1px, -1px) scale(1.006) rotate(0.2deg)`,filter:`brightness(1.2)`,offset:.6},{transform:`${r} translate(-1px, 1px) scale(0.997) rotate(-0.15deg)`,filter:`brightness(1.15)`,offset:.7},{transform:`${r} translate(1px, 0px) scale(1.003) rotate(0.1deg)`,filter:`brightness(1.1)`,offset:.8},{transform:`${r} translate(0px, -1px) scale(0.999) rotate(-0.05deg)`,filter:`brightness(1.05)`,offset:.9},{transform:`${r} translate(0, 0) scale(1) rotate(0deg)`,filter:`brightness(1)`}],{duration:500,easing:`linear`})}tickAbsorbed(e){if(!this.context||!this.bird)return;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;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))}createBlackHole(e,t){let n=this.currentColor,r=document.createElement(`div`);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 ${K.oiiiDim};\n\t\t\tbackground: radial-gradient(circle, transparent 40%, ${K.deepPurple} 70%, transparent 100%);\n\t\t\tbox-shadow:\n\t\t\t\tinset 0 0 25px ${K.oiiiDim},\n\t\t\t\t0 0 40px ${K.deepPurple},\n\t\t\t\t0 0 60px ${Ee(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)`}],{duration:600,easing:`cubic-bezier(0.34, 1.56, 0.64, 1)`,fill:`forwards`}),this.element?.appendChild(r),this.lensingRing=r,[{size:85,speed:4,color1:K.oiii,color2:K.deepBlue,rotateX:68,reverse:!0},{size:68,speed:2.5,color1:K.hAlpha,color2:K.hAlphaDim,rotateX:72,reverse:!1},{size:52,speed:1.8,color1:K.stellar,color2:K.stellarDim,rotateX:76,reverse:!0}].forEach((n,r)=>{let i=document.createElement(`div`);i.className=`pointer-events-none`;let a=n.reverse?`-`:``;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)`}],{duration:400+100*r,easing:`cubic-bezier(0.34, 1.56, 0.64, 1)`,fill:`forwards`}).onfinish=()=>{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)`}],{duration:1e3*n.speed,easing:`linear`,iterations:1/0})},this.element?.appendChild(i),this.accretionDisks.push(i)});let i=document.createElement(`div`);i.className=`pointer-events-none`,i.style.cssText=`\n\t\t\t--hb-color: ${K.hAlpha};\n\t\t\t--hb-color-dim: ${K.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${K.singularity} 0%,\n\t\t\t\t${K.voidBlack} 40%,\n\t\t\t\t${K.deepPurple} 60%,\n\t\t\t\t${K.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 ${K.hAlpha},\n\t\t\t\t0 0 30px 8px ${K.oiiiDim},\n\t\t\t\t0 0 50px 15px ${K.deepPurple},\n\t\t\t\tinset 0 0 15px ${K.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([{transform:`translate(-50%, -50%) scale(0)`},{transform:`translate(-50%, -50%) scale(1.15)`,offset:.6},{transform:`translate(-50%, -50%) scale(1)`}],{duration:500,easing:`cubic-bezier(0.34, 1.56, 0.64, 1)`,fill:`forwards`}),this.element?.appendChild(i),this.eventHorizon=i,this.blackHole=i,this.addParticles(e,t)}addParticles(e,t){let n=[{bg:K.hAlpha,glow:K.hAlphaDim},{bg:K.oiii,glow:K.oiiiDim},{bg:K.stellar,glow:K.stellarDim},{bg:`rgba(255, 255, 255, 0.9)`,glow:K.stellarDim}];for(let r=0;r<10;r++){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];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([{transform:`rotate(${a}rad) translateX(${o}px) scale(1)`,opacity:0},{transform:`rotate(${a}rad) translateX(${o}px) scale(1)`,opacity:.9,offset:.1},{transform:`rotate(${a+Math.PI}rad) translateX(${.5*o}px) scale(0.8)`,opacity:.7,offset:.5},{transform:`rotate(${a+2*Math.PI}rad) translateX(0px) scale(0)`,opacity:0}],{duration:c,delay:l,easing:`cubic-bezier(0.4, 0, 0.2, 1)`,fill:`forwards`}).onfinish=()=>i.remove()}let r=[K.hAlpha,K.oiii,K.stellar,K.oiii];for(let n=0;n<5;n++){let i=document.createElement(`div`),a=n/5*Math.PI*2+Math.PI/10,o=65+25*Math.random(),s=r[n%r.length];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([{transform:`rotate(${a+Math.PI/2}rad) scale(0)`,opacity:0,left:`${e+Math.cos(a)*o}px`,top:`${t+Math.sin(a)*o}px`},{transform:`rotate(${a+Math.PI/2}rad) scale(1.5)`,opacity:.85,left:`${e+Math.cos(a)*o*.5}px`,top:`${t+Math.sin(a)*o*.5}px`,offset:.3},{transform:`rotate(${a+Math.PI/2}rad) scale(0.5)`,opacity:0,left:`${e}px`,top:`${t}px`}],{duration:900,delay:150+120*n,easing:`cubic-bezier(0.55, 0, 1, 0.45)`,fill:`forwards`}).onfinish=()=>i.remove()}}collapseBlackHole(){if(this.bird?.remove(),this.particles.forEach(e=>e.remove()),!this.context)return void this.state$.next(`done`);let{bx:e,by:t}=this.context,n=this.currentColor;this.accretionDisks.forEach((e,t)=>{e.animate([{transform:e.style.transform,opacity:1},{transform:`translate(-50%, -50%) rotateX(90deg) scale(0)`,opacity:0}],{duration:200+50*t,easing:`ease-in`,fill:`forwards`}).onfinish=()=>e.remove()}),this.accretionDisks=[],this.lensingRing&&(this.lensingRing.animate([{transform:`translate(-50%, -50%) rotateX(85deg) scale(1)`,opacity:.6},{transform:`translate(-50%, -50%) rotateX(85deg) scale(0)`,opacity:0}],{duration:250,easing:`ease-in`,fill:`forwards`}).onfinish=()=>this.lensingRing?.remove());let r=this.blackHole;r&&(r.animate([{transform:`translate(-50%, -50%) scale(1)`,filter:`brightness(1)`},{transform:`translate(-50%, -50%) scale(1.3)`,filter:`brightness(3)`,offset:.2},{transform:`translate(-50%, -50%) scale(0)`,filter:`brightness(5)`,opacity:0}],{duration:350,easing:`cubic-bezier(0.55, 0, 1, 0.45)`,fill:`forwards`}).onfinish=()=>r.remove());let i=[{border:K.stellar,glow:K.stellarDim},{border:K.hAlpha,glow:K.hAlphaDim},{border:K.oiii,glow:K.oiiiDim},{border:K.deepPurple,glow:K.deepBlue}];for(let n=0;n<4;n++){let r=document.createElement(`div`),a=i[n];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([{transform:`translate(-50%, -50%) scale(0.5)`,opacity:.95,borderWidth:2.5-.4*n+`px`},{transform:`translate(-50%, -50%) scale(2.5)`,opacity:.6,borderWidth:1.8-.3*n+`px`,offset:.35},{transform:`translate(-50%, -50%) scale(6)`,opacity:0,borderWidth:`0.5px`}],{duration:800+120*n,delay:60*n,easing:`cubic-bezier(0, 0.55, 0.45, 1)`,fill:`forwards`}).onfinish=()=>r.remove()}let a=document.createElement(`div`);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${K.stellar} 20%,\n\t\t\t\t${K.hAlpha} 50%,\n\t\t\t\t${K.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([{transform:`translate(-50%, -50%) scale(0)`,opacity:1},{transform:`translate(-50%, -50%) scale(5)`,opacity:1,offset:.12},{transform:`translate(-50%, -50%) scale(8)`,opacity:0}],{duration:450,easing:`ease-out`,fill:`forwards`}).onfinish=()=>a.remove();let o=document.createElement(`div`);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${K.stellarDim} 0%,\n\t\t\t\t${K.hAlphaDim} 30%,\n\t\t\t\t${K.oiiiDim} 50%,\n\t\t\t\t${K.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([{opacity:1,transform:`translate(-50%, -50%) scale(1)`},{opacity:.6,transform:`translate(-50%, -50%) scale(1.8)`,offset:.4},{opacity:0,transform:`translate(-50%, -50%) scale(2.5)`}],{duration:900,easing:`ease-out`,fill:`forwards`}).onfinish=()=>{o.remove(),this.state$.next(`done`)},this.homeElement){let e=this.homeElement,t=e.style.transform||``;e.animate([{transform:`${t} translate(0, 0) scale(1) rotate(0deg)`,filter:`brightness(1)`},{transform:`${t} translate(0, 0) scale(1.04) rotate(0deg)`,filter:`brightness(2) drop-shadow(0 0 30px ${n})`,offset:.05},{transform:`${t} translate(-4px, 2px) scale(1.025) rotate(-0.8deg)`,filter:`brightness(1.6) drop-shadow(0 0 25px ${n})`,offset:.1},{transform:`${t} translate(5px, -3px) scale(0.98) rotate(1deg)`,filter:`brightness(1.4) drop-shadow(0 0 20px ${n})`,offset:.15},{transform:`${t} translate(-3px, -2px) scale(1.02) rotate(-0.6deg)`,filter:`brightness(1.3) drop-shadow(0 0 18px ${n})`,offset:.2},{transform:`${t} translate(4px, 3px) scale(0.985) rotate(0.8deg)`,filter:`brightness(1.25) drop-shadow(0 0 15px ${n})`,offset:.25},{transform:`${t} translate(-2px, 1px) scale(1.015) rotate(-0.5deg)`,filter:`brightness(1.2) drop-shadow(0 0 12px ${n})`,offset:.3},{transform:`${t} translate(3px, -2px) scale(0.99) rotate(0.6deg)`,filter:`brightness(1.18) drop-shadow(0 0 10px ${n})`,offset:.35},{transform:`${t} translate(-2px, 2px) scale(1.01) rotate(-0.4deg)`,filter:`brightness(1.15) drop-shadow(0 0 8px ${n})`,offset:.4},{transform:`${t} translate(2px, -1px) scale(0.995) rotate(0.4deg)`,filter:`brightness(1.12)`,offset:.45},{transform:`${t} translate(-1px, 1px) scale(1.008) rotate(-0.3deg)`,filter:`brightness(1.1)`,offset:.5},{transform:`${t} translate(1px, -1px) scale(0.997) rotate(0.25deg)`,filter:`brightness(1.08)`,offset:.55},{transform:`${t} translate(-1px, 0px) scale(1.005) rotate(-0.2deg)`,filter:`brightness(1.06)`,offset:.6},{transform:`${t} translate(1px, 1px) scale(0.998) rotate(0.15deg)`,filter:`brightness(1.05)`,offset:.65},{transform:`${t} translate(0px, -1px) scale(1.003) rotate(-0.1deg)`,filter:`brightness(1.04)`,offset:.7},{transform:`${t} translate(-1px, 0px) scale(0.999) rotate(0.08deg)`,filter:`brightness(1.03)`,offset:.75},{transform:`${t} translate(0px, 1px) scale(1.002) rotate(-0.05deg)`,filter:`brightness(1.02)`,offset:.8},{transform:`${t} translate(0px, 0px) scale(1.001) rotate(0.03deg)`,filter:`brightness(1.01)`,offset:.9},{transform:`${t} translate(0, 0) scale(1) rotate(0deg)`,filter:`brightness(1)`}],{duration:800,easing:`linear`})}}ensureTrailCanvas(){if(this.trailCanvas||!this.element)return;let e=this.element.scrollWidth,t=this.element.scrollHeight,n=document.createElement(`canvas`);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)}drawTrail(e,t){if(!this.options.showConnections)return;if(this.ensureTrailCanvas(),!this.trailCtx||!this.lastTrailPos)return void(this.lastTrailPos={x:e,y:t});let n=this.trailCtx,r=this.currentColor;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={x:e,y:t}}resetTrail(){this.lastTrailPos=null}fadeTrail(){if(!this.trailCtx||!this.element)return;let e=this.element.scrollWidth,t=this.element.scrollHeight;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`}cleanup(){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}disconnected(){this.cleanup()}},Oe=(0,u.directive)(De),ke=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e,t){return l.noChange}update(e,[t,n]){let r=e.element,i,a,o,u={};if(typeof t==`function`?(i=t,u=n||{}):(a=t.onEnter,o=t.onExit,u=t.options||{},i=e=>{e&&a&&a(),!e&&o&&o()}),this.state?.element===r)return l.noChange;this.cleanup();let{once:d=!1,threshold:f=0,rootMargin:p=`0px`,delay:m=0}=u,h=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0],n=t.isIntersecting;m>0&&n?(this.state.delayTimerSub&&this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=(0,s.timer)(m).pipe((0,c.take)(1),(0,c.tap)(()=>this.triggerCallback(n,t))).subscribe()):(!n&&this.state.delayTimerSub&&(this.state.delayTimerSub.unsubscribe(),this.state.delayTimerSub=void 0),this.triggerCallback(n,t))},{threshold:f,rootMargin:p});return this.state={element:r,observer:h,callback:i,onEnter:a,onExit:o,once:d,delay:m,hasFired:!1},h.observe(r),l.noChange}triggerCallback(e,t){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))}cleanup(){this.state&&=(this.state.delayTimerSub?.unsubscribe(),this.state.delayTimerSub=void 0,this.state.observer.disconnect(),null)}pause(){this.state&&(this.state.delayTimerSub?.unsubscribe(),this.state.observer.disconnect())}disconnected(){this.pause()}reconnected(){this.state&&this.state.observer.observe(this.state.element)}},Ae=(0,u.directive)(ke),je={active:!0,intensity:`medium`},Me={light:{blur:12,sat:1.3,bright:1.05,tint:.45,border:.2,shadow:.06},medium:{blur:16,sat:1.4,bright:1.08,tint:.55,border:.28,shadow:.08},strong:{blur:24,sat:1.5,bright:1.12,tint:.65,border:.35,shadow:.1}},Ne=[`backdropFilter`,`background`,`boxShadow`,`borderTop`,`borderBottom`],Pe=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return l.noChange}update(e,[t={}]){let n=e.element,r={...je,...t};return r.active?this.activate(n,r):this.cleanup(),l.noChange}activate(e,t){if(!this.isConnected)return;let n=Me[t.intensity];if(!this.state){let t={};for(let n of Ne)t[n]=e.style[n];this.state={element:e,origStyles:t}}this.applyStyles(e,n)}applyStyles(e,t){let n=`blur(${t.blur}px) saturate(${t.sat}) brightness(${t.bright})`;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})`;let r=t.border;e.style.boxShadow=[`inset 0 1px 0 0 rgba(255,255,255, ${1.5*r})`,`inset 0 2px 6px rgba(255,255,255, ${.6*r})`,`inset 0 -1px 0 0 rgba(255,255,255, ${.25*r})`,`0 1px 3px rgba(0,0,0, ${t.shadow})`,`0 6px 20px rgba(0,0,0, ${.5*t.shadow})`].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)`}cleanup(){if(!this.state)return;let{element:e,origStyles:t}=this.state;for(let n of Ne)e.style[n]=t[n];e.style.removeProperty(`-webkit-backdrop-filter`),this.state=null}disconnected(){this.cleanup()}reconnected(){}},Fe=(0,u.directive)(Pe),J=`schmancy-lb-rotate`,Ie=!1;function Le(){if(Ie)return;let e=document.createElement(`style`);e.id=`schmancy-living-border-shared`,e.textContent=`\n\t\t@property --${J}-angle {\n\t\t\tsyntax: '<angle>';\n\t\t\tinitial-value: 0deg;\n\t\t\tinherits: false;\n\t\t}\n\t\t@keyframes ${J} {\n\t\t\tto { --${J}-angle: 360deg; }\n\t\t}\n\t`,document.head.appendChild(e),Ie=!0}var Re=class extends u.AsyncDirective{constructor(...e){super(...e),this.teardown$=new s.Subject,this.didSetPosition=!1}render(e){}update(e,[t]){if(e.type!==d.PartType.ELEMENT)throw Error(`livingBorder directive must be used on an element`);let r=JSON.stringify(t??{});this.element&&r===this.prevKey||(this.prevKey=r,this.element=e.element,this.lastOptions=t,n.t.value||(this.teardown$.next(),this.cleanup(),Le(),this.createBorderOverlay(t)))}reconnected(){this.lastOptions&&!n.t.value&&(Le(),this.createBorderOverlay(this.lastOptions))}createBorderOverlay(e){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;getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`,this.didSetPosition=!0),this.borderEl=document.createElement(`div`),this.borderEl.setAttribute(`aria-hidden`,`true`);let o=`-${t}px`;Object.assign(this.borderEl.style,{position:`absolute`,top:o,left:o,right:o,bottom:o,borderRadius:`inherit`,pointerEvents:`none`,zIndex:`0`,background:`conic-gradient(\n\t\t\t\tfrom var(--${J}-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)`,mask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,maskComposite:`exclude`,WebkitMaskComposite:`xor`,padding:`${t}px`,animation:`${J} ${i}ms linear infinite`,filter:`blur(${.3*r}px) drop-shadow(0 0 ${r}px color-mix(in srgb, ${n} 40%, transparent))`,opacity:a?`0`:`0.5`,transition:`opacity 300ms ease`}),this.element.prepend(this.borderEl),(0,s.merge)((0,s.fromEvent)(this.element,`mouseenter`).pipe((0,c.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=a?`0.7`:`0.8`)})),(0,s.fromEvent)(this.element,`mouseleave`).pipe((0,c.map)(()=>{this.borderEl&&(this.borderEl.style.opacity=a?`0`:`0.5`)}))).pipe((0,c.takeUntil)(this.teardown$)).subscribe()}cleanup(){this.borderEl?.remove(),this.borderEl=void 0}disconnected(){this.teardown$.next(),this.cleanup(),this.didSetPosition&&this.element&&(this.element.style.position=``,this.didSetPosition=!1)}},ze=(0,d.directive)(Re),Y=new WeakMap,Be=class extends d.Directive{constructor(e){if(super(e),e.type!==d.PartType.ELEMENT)throw Error(`longPress directive can only be used on elements`)}render(e,t){}update(e,[t,n={}]){let r=e.element,i=Y.get(r);if(i){if(i.callback===t&&this.optionsEqual(i.options,n))return;i.subscription.unsubscribe()}let a=this.setupLongPress(r,t,n);Y.set(r,{subscription:a,callback:t,options:n||{}})}optionsEqual(e,t){return t?e.duration===t.duration&&e.movementThreshold===t.movementThreshold:Object.keys(e).length===0}setupLongPress(e,t,n={}){let r=n.duration??500,i=n.movementThreshold??10,a=(0,s.fromEvent)(e,`pointerdown`),o=(0,s.fromEvent)(window,`pointerup`),l=(0,s.fromEvent)(window,`pointermove`),u=(0,s.fromEvent)(window,`pointercancel`);return a.pipe((0,c.switchMap)(e=>{let n=e.clientX,a=e.clientY,d=(0,s.merge)(o,u,l.pipe((0,c.filter)(e=>{let t=e.clientX-n,r=e.clientY-a;return Math.sqrt(t*t+r*r)>i}))).pipe((0,c.first)());return(0,s.timer)(r).pipe((0,c.takeUntil)(d),(0,c.tap)(()=>t()))})).subscribe()}disconnected(e){let t=e.element,n=Y.get(t);n&&(n.subscription.unsubscribe(),Y.delete(t))}reconnected(e){let t=e.element,n=Y.get(t);n&&(n.subscription=this.setupLongPress(t,n.callback,n.options))}},Ve=(0,d.directive)(Be),He=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return l.noChange}update(e,[t]){let n=e.element,{active:r,color:i=`var(--md-sys-color-error, #ef4444)`,width:a=150}=t;return!r&&this.state?(this.cleanup(),l.noChange):r?(!this.state||this.state.color===i&&this.state.width===a||this.cleanup(),this.state||(this.state={active:!0,color:i,width:a,element:n,shards:[],cracks:[],isVisible:!0,startTime:performance.now()},getComputedStyle(n).position===`static`&&(n.style.position=`relative`),this.createOverlay(),this.setupVisibilityObserver(),this.startAnimation()),l.noChange):l.noChange}createOverlay(){if(!this.state)return;let{element:e,color:t,width:n}=this.state,r=document.createElement(`div`);r.className=`missed-punch-overlay`,Object.assign(r.style,{position:`absolute`,top:`50%`,left:`0`,width:`${n}px`,height:`40px`,transform:`translateY(-50%)`,pointerEvents:`none`,overflow:`visible`,zIndex:`4`});let i=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);i.setAttribute(`width`,`100%`),i.setAttribute(`height`,`100%`),i.setAttribute(`viewBox`,`0 0 ${n} 40`),i.setAttribute(`preserveAspectRatio`,`xMinYMid meet`),Object.assign(i.style,{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`,overflow:`visible`});let a=[];for(let e of[-15,0,15,-30,30,-8,8]){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());for(let e=0;e<u;e++){let e=o/u;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)}`}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`;let d=1.2*o;n.setAttribute(`stroke-dasharray`,d.toString()),n.setAttribute(`stroke-dashoffset`,d.toString()),a.push(n),i.appendChild(n)}let o=[],s=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`);for(let e=0;e<8;e++){let n=`shard-gradient-${e}`,r=document.createElementNS(`http://www.w3.org/2000/svg`,`linearGradient`);r.setAttribute(`id`,n),r.setAttribute(`x1`,`0%`),r.setAttribute(`y1`,`0%`),r.setAttribute(`x2`,`100%`),r.setAttribute(`y2`,`100%`);let a=document.createElementNS(`http://www.w3.org/2000/svg`,`stop`);a.setAttribute(`offset`,`0%`),a.setAttribute(`stop-color`,`white`),a.setAttribute(`stop-opacity`,`0.9`);let c=document.createElementNS(`http://www.w3.org/2000/svg`,`stop`);c.setAttribute(`offset`,`40%`),c.setAttribute(`stop-color`,t),c.setAttribute(`stop-opacity`,`0.8`);let l=document.createElementNS(`http://www.w3.org/2000/svg`,`stop`);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);let u=document.createElementNS(`http://www.w3.org/2000/svg`,`polygon`),d=5+7*Math.random(),f=this.generateShardPoints(d);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))`;let p=(Math.random()-.3)*Math.PI*.6,m=1+1.5*Math.random();o.push({element:u,x:0,y:20,vx:Math.cos(p)*m,vy:Math.sin(p)*m,rotation:0,rotationSpeed:10*(Math.random()-.5),scale:.6+.6*Math.random(),opacity:0}),i.appendChild(u)}i.insertBefore(s,i.firstChild);for(let e=0;e<6;e++){let t=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`);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)}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);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`)){let e=document.createElement(`style`);e.id=`missed-punch-styles`,e.textContent=`
220
+ @keyframes missed-pulse {
221
+ 0%, 100% { opacity: 0.4; transform: scale(1); }
222
+ 50% { opacity: 0.8; transform: scale(1.1); }
223
+ }
224
+ `,document.head.appendChild(e)}r.appendChild(i),e.appendChild(r),this.state.overlayElement=r,this.state.svg=i,this.state.shards=o,this.state.cracks=a}generateShardPoints(e){let t=3+Math.floor(2*Math.random()),n=[];for(let r=0;r<t;r++){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;n.push(`${o.toFixed(1)},${s.toFixed(1)}`)}return n.join(` `)}setupVisibilityObserver(){this.state&&typeof IntersectionObserver<`u`&&(this.state.observer=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0].isIntersecting;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))},{threshold:0}),this.state.observer.observe(this.state.element))}startAnimation(){if(!this.state||!this.state.isVisible)return;let{cracks:e}=this.state;for(let t=0;t<e.length;t++){let n=e[t];n.setAttribute(`stroke-dashoffset`,`0`),n.setAttribute(`opacity`,`0.5`)}let t=n=>{if(!this.state||!this.state.isVisible)return;let r=n-this.state.startTime,{shards:i,width:a}=this.state;for(let e=0;e<i.length;e++){let t=i[e],n=2500+200*e,o=(r+300*e)%n/n;t.x=o*t.vx*a*.5,t.y=20+o*t.vy*25+o*o*20,t.rotation+=.3*t.rotationSpeed;let s=.85;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))}let o=this.state.svg?.querySelectorAll(`[data-sparkle]`);o&&o.forEach((e,t)=>{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);e.setAttribute(`cx`,o.toFixed(1)),e.setAttribute(`cy`,s.toFixed(1)),e.setAttribute(`opacity`,Math.max(0,c).toFixed(2))});let s=.15*Math.sin(r/800)+.45;for(let t of e)t.setAttribute(`opacity`,s.toFixed(2));this.state.animationId=requestAnimationFrame(t)};this.state.animationId=requestAnimationFrame(t)}cleanup(){this.state&&=(this.state.animationId&&cancelAnimationFrame(this.state.animationId),this.state.observer&&this.state.observer.disconnect(),this.state.overlayElement&&this.state.overlayElement.remove(),null)}disconnected(){this.cleanup()}},Ue=(0,u.directive)(He),We={active:!0,autoHideDuration:3e3,background:!0,intensity:1,blur:1,speed:1,fadeInDuration:1e3,fadeOutDuration:8e3,idleOpacity:.6,idleBreathe:!0,temperature:0,chromaticAberration:1,particleCount:30},X=`cubic-bezier(0.37, 0, 0.63, 1)`,Ge=`cubic-bezier(0.25, 0.1, 0.25, 1)`,Ke=!1,qe=class e{constructor(){this.elementToDirective=new WeakMap,this.instances=new Set,this.observer=null,this.visibilitySub=null,this.tabVisible=!0}static{this._instance=null}static get instance(){return e._instance||=new e,e._instance}register(e,t){let n=this.instances.size===0;this.instances.add(e),this.elementToDirective.set(t,e),n&&this.setup(),this.observer?.observe(t)}unregister(e,t){this.observer?.unobserve(t),this.elementToDirective.delete(t),this.instances.delete(e),this.instances.size===0&&this.teardown()}setup(){this.observer=new IntersectionObserver(e=>{for(let t of e){let e=this.elementToDirective.get(t.target);e&&e.onVisibilityChange(t.isIntersecting&&this.tabVisible)}},{threshold:0}),this.visibilitySub=(0,s.fromEvent)(document,`visibilitychange`).pipe((0,c.tap)(()=>{this.tabVisible=document.visibilityState===`visible`;for(let e of this.instances)e.onVisibilityChange(this.tabVisible)})).subscribe()}teardown(){this.observer&&=(this.observer.disconnect(),null),this.visibilitySub&&=(this.visibilitySub.unsubscribe(),null)}},Je=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null,this.coordinator=qe.instance}render(e){return l.noChange}update(e,[t={}]){let n=e.element,r={...We,...t};return r.active?this.show(n,r):this.hide(r),l.noChange}onVisibilityChange(e){if(!this.state?.overlay)return;let t=this.state.isVisible;this.state.isVisible=e,t!==e&&(this.state.overlay.classList.toggle(`paused`,!e),this.state.overlay.classList.toggle(`running`,e))}show(e,t){(function(){if(Ke||typeof document>`u`)return;Ke=!0;let e=document.createElement(`style`);e.id=`nebula-directive-styles`,e.textContent=`
225
+ /* =============================================================================
226
+ NEBULA v3 - SURREAL DIMENSIONAL RIFT - GPU-COMPOSITED CSS ANIMATIONS
227
+ Chromatic aberration, iridescent hue-cycling, event horizon, tendrils.
228
+ Performance: translate3d + opacity for most layers, hue-rotate for core only.
229
+ ============================================================================= */
230
+
231
+ /* Chromatic red channel - rightward aberration drift */
232
+ @keyframes nebula-chromatic-red {
233
+ 0%, 100% { transform: translate3d(var(--nebula-aberration, 3px), 0, 0); }
234
+ 25% { transform: translate3d(calc(var(--nebula-aberration, 3px) * 1.8), -1%, 0); }
235
+ 50% { transform: translate3d(var(--nebula-aberration, 3px), 1%, 0); }
236
+ 75% { transform: translate3d(calc(var(--nebula-aberration, 3px) * 0.5), 0, 0); }
237
+ }
238
+
239
+ /* Chromatic blue channel - leftward counter-drift */
240
+ @keyframes nebula-chromatic-blue {
241
+ 0%, 100% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1), 0, 0); }
242
+ 25% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -0.5), 1%, 0); }
243
+ 50% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1), -1%, 0); }
244
+ 75% { transform: translate3d(calc(var(--nebula-aberration, 3px) * -1.8), 0, 0); }
245
+ }
246
+
247
+ /* Iridescent core - continuous 360-degree hue rotation (the ONE filter animation) */
248
+ @keyframes nebula-iridescent {
249
+ 0% { filter: hue-rotate(0deg) blur(var(--nebula-blur-core, 12px)) saturate(1.6); }
250
+ 100% { filter: hue-rotate(360deg) blur(var(--nebula-blur-core, 12px)) saturate(1.6); }
251
+ }
252
+
253
+ /* Bioluminescent tendrils - organic breathing */
254
+ @keyframes nebula-tendrils-breathe {
255
+ 0%, 100% { opacity: 0.6; transform: translate3d(0, 0, 0); }
256
+ 30% { opacity: 0.9; transform: translate3d(1%, -1.5%, 0); }
257
+ 60% { opacity: 0.5; transform: translate3d(-1%, 1.5%, 0); }
258
+ }
259
+
260
+ /* Quantum particle twinkle - opacity only (cheapest) */
261
+ @keyframes nebula-particle-twinkle {
262
+ 0%, 100% { opacity: 0.7; }
263
+ 15% { opacity: 1; }
264
+ 40% { opacity: 0.5; }
265
+ 65% { opacity: 0.85; }
266
+ 85% { opacity: 0.6; }
267
+ }
268
+
269
+ /* Idle breathing - gentle pulse when dimmed */
270
+ @keyframes nebula-idle-breathe {
271
+ 0%, 100% {
272
+ opacity: var(--nebula-idle-opacity, 0.08);
273
+ filter: blur(calc(var(--nebula-blur-base, 10px) * 8));
274
+ transform: scale(1);
275
+ }
276
+ 50% {
277
+ opacity: calc(var(--nebula-idle-opacity, 0.08) * 1.4);
278
+ filter: blur(calc(var(--nebula-blur-base, 10px) * 10));
279
+ transform: scale(1.005);
280
+ }
281
+ }
282
+
283
+ /* =============================================================================
284
+ STATE CLASSES - Control via CSS class toggle (no JS animation calls)
285
+ ============================================================================= */
286
+
287
+ .nebula-overlay {
288
+ contain: strict;
289
+ pointer-events: none;
290
+ isolation: isolate;
291
+ }
292
+
293
+ .nebula-overlay.paused .nebula-layer {
294
+ animation-play-state: paused !important;
295
+ }
296
+
297
+ .nebula-overlay.running .nebula-layer {
298
+ animation-play-state: running !important;
299
+ }
300
+
301
+ /* Reduced motion - respect user preferences */
302
+ @media (prefers-reduced-motion: reduce) {
303
+ .nebula-layer {
304
+ animation: none !important;
305
+ transition: opacity 0s !important;
306
+ }
307
+ }
308
+ `,document.head.appendChild(e)})(),this.state?.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null);let r=n.t.value;if(this.state?.overlay&&this.state.isDimmed)return this.state.isDimmed=!1,this.state.options=t,this.awakenOverlay(t,r),void this.scheduleAutoHide(t);this.state?.overlay||this.createOverlay(e,t,r),this.scheduleAutoHide(t)}awakenOverlay(e,n){if(!this.state?.overlay)return;let r=this.state.overlay,i=n?0:.6*e.fadeInDuration,a=n?`linear`:t._(t.d);r.style.setProperty(`--nebula-intensity`,String(e.intensity)),r.animate([{opacity:e.idleOpacity,transform:`scale(0.98)`,filter:`blur(${4*e.blur}px)`},{opacity:.7*e.intensity,transform:`scale(1.01)`,filter:`blur(${1*e.blur}px)`},{opacity:e.intensity,transform:`scale(1)`,filter:`blur(0px)`}],{duration:i,easing:a,fill:`forwards`}),r.classList.remove(`paused`),r.classList.add(`running`)}createOverlay(e,n,r){let i=window.getComputedStyle(e).position,a=e.style.position,o=e.style.overflow,s=e.style.contain;i===`static`&&(e.style.position=`relative`),e.style.overflow=`hidden`,e.style.contain=`paint`;let c=n.temperature,l=Math.max(0,c),u=Math.max(0,-c),d=n.intensity,f=Math.round(3+5*n.chromaticAberration),p=Math.round(20+60*u),m=Math.round(80+80*u),h=Math.round(20+80*l),g=Math.round(255-55*l),_=Math.round(100+100*u),v=Math.round(100*l),y=Math.round(255-55*l),b=Math.round(100+55*u),x=Math.round(255-55*u),S=document.createElement(`div`);if(S.className=`nebula-overlay running`,Object.assign(S.style,{position:`absolute`,inset:`-20%`,zIndex:n.background?`-1`:`9999`,opacity:`0`,"--nebula-intensity":String(d),"--nebula-blur-base":10*n.blur+`px`,"--nebula-idle-opacity":String(n.idleOpacity),"--nebula-aberration":`${f}px`,"--nebula-blur-core":12*n.blur+`px`}),r){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 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*d}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,filter:`blur(${10*n.blur}px)`,opacity:String(d)}),S.appendChild(e)}else{let e=document.createElement(`div`);e.className=`nebula-layer`,Object.assign(e.style,{position:`absolute`,inset:`-5%`,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*d}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4*d}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 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*d}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32*d}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 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*d}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35*d}) 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*d}) 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*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${4*n.blur}px)`,mixBlendMode:`multiply`,transform:`translateZ(0)`}),S.appendChild(e);let t=document.createElement(`div`);t.className=`nebula-layer`,Object.assign(t.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${p},${m},${.14*d}) 0%,\n\t\t\t\t\t\trgba(255,${p},${m},${.06*d}) 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,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.03*d}) 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,p+30)},${m},${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-red ${35e3/n.speed}ms ${Ge} infinite`}),S.appendChild(t);let r=document.createElement(`div`);r.className=`nebula-layer`,Object.assign(r.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${h},100,${g},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.05*d}) 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(${v},${y},200,${.09*d}) 0%,\n\t\t\t\t\t\trgba(${v},${y},200,${.03*d}) 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(${h},100,${Math.min(255,g+20)},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-blue ${35e3/n.speed}ms ${Ge} infinite`}),S.appendChild(r);let i=document.createElement(`div`);i.className=`nebula-layer`,Object.assign(i.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.18*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.08*d}) 40%,\n\t\t\t\t\t\trgba(${h},100,${g},${.03*d}) 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*d}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1*d}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-iridescent ${28e3/n.speed}ms linear infinite`}),S.appendChild(i);let a=document.createElement(`div`);if(a.className=`nebula-layer`,Object.assign(a.style,{position:`absolute`,inset:`-12%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 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(${v},${y},200,${.08*d}) 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,${b},${x},${.07*d}) 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(${h},100,${g},${.06*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${14*n.blur}px)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-tendrils-breathe ${22e3/n.speed}ms ${X} infinite`}),S.appendChild(a),n.particleCount>0){let e=document.createElement(`div`);e.className=`nebula-layer`;let t=[];for(let e=0;e<n.particleCount;e++){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())*d;t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`)}Object.assign(e.style,{position:`absolute`,inset:`0`,background:t.join(`,`),mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-particle-twinkle ${5e3/n.speed}ms ${X} infinite`}),S.appendChild(e)}}e.appendChild(S);let C=r?0:n.fadeInDuration,w=r?`linear`:t._(t.d);S.animate([{opacity:0,transform:`scale(0.85)`,filter:`blur(${25*n.blur}px) saturate(0.5)`},{opacity:.3*n.intensity,transform:`scale(0.95)`,filter:`blur(${12*n.blur}px) saturate(0.8)`},{opacity:.6*n.intensity,transform:`scale(1.02)`,filter:`blur(${4*n.blur}px) saturate(1.1)`},{opacity:.85*n.intensity,transform:`scale(1.005)`,filter:`blur(${1*n.blur}px) saturate(1.05)`},{opacity:n.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`}],{duration:C,easing:w,fill:`forwards`}),this.state={element:e,overlay:S,originalPosition:a,originalOverflow:o,originalContain:s,isDimmed:!1,autoHideSub:null,options:n,reducedMotion:r,isVisible:document.visibilityState===`visible`},this.coordinator.register(this,e)}scheduleAutoHide(e){!this.state||e.autoHideDuration<=0||(this.state.autoHideSub=(0,s.timer)(e.autoHideDuration).pipe((0,c.take)(1),(0,c.tap)(()=>{this.state&&(this.state.autoHideSub=null,this.hide(this.state.options))})).subscribe())}hide(e){if(!this.state?.overlay||(this.state.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null),this.state.isDimmed))return;this.state.isDimmed=!0;let n=this.state.overlay,r=this.state.options,i=this.state.reducedMotion,a=i?0:e.fadeOutDuration,o=i?`linear`:t._(t.u);if(e.idleOpacity<=0)return void n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.4*r.intensity,transform:`scale(0.95)`,filter:`blur(${8*r.blur}px) saturate(0.7)`},{opacity:0,transform:`scale(0.9)`,filter:`blur(${15*r.blur}px) saturate(0.3)`}],{duration:a,easing:o,fill:`forwards`});let l=n.animate([{opacity:r.intensity,transform:`scale(1)`,filter:`blur(0px) saturate(1)`},{opacity:.5*r.intensity,transform:`scale(0.99)`,filter:`blur(${3*r.blur}px) saturate(0.75)`},{opacity:e.idleOpacity,transform:`scale(1)`,filter:`blur(${8*r.blur}px) saturate(0.4)`}],{duration:a,easing:o,fill:`forwards`});e.idleBreathe&&!i&&(0,s.from)(l.finished).pipe((0,c.take)(1),(0,c.catchError)(()=>s.EMPTY)).subscribe(()=>{this.state?.overlay&&(this.state.overlay.style.animation=`nebula-idle-breathe ${12e3/r.speed}ms ${X} infinite`)})}cleanup(){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)}disconnected(){this.cleanup()}reconnected(){this.state&&this.coordinator.register(this,this.state.element)}},Ye=(0,u.directive)(Je),Xe={smooth:t.d,snappy:t.f,bouncy:t.l,gentle:t.u},Ze=class extends u.AsyncDirective{constructor(e){if(super(e),this.initialized=!1,this.element=null,e.type!==d.PartType.ELEMENT)throw Error(`reveal() can only be used on elements`)}render(e,t){return l.noChange}update(e,[r=!1,i={}]){let a=e.element;this.element=a;let{preset:o=`smooth`,maxHeight:s=`10rem`,duration:c,easing:u}=i,d=Xe[o],f=c??d.duration,p=u??t._(d),m=n.t.value;return this.initialized||=(this.setupElement(a,f,p,m),!0),r?(a.style.maxHeight=s,a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`,a.style.pointerEvents=``,a.style.paddingTop=``,a.style.paddingBottom=``,a.style.marginTop=``,a.style.marginBottom=``,a.removeAttribute(`aria-hidden`),a.removeAttribute(`inert`)):(a.style.maxHeight=`0`,a.style.opacity=`0`,a.style.transform=`translateY(-8px) scale(0.98)`,a.style.pointerEvents=`none`,a.style.paddingTop=`0`,a.style.paddingBottom=`0`,a.style.marginTop=`0`,a.style.marginBottom=`0`,a.setAttribute(`aria-hidden`,`true`),a.setAttribute(`inert`,``)),l.noChange}setupElement(e,t,n,r){e.style.overflow=`hidden`,e.style.transition=r?`none`:[`max-height ${t}ms ${n}`,`opacity ${t}ms ${n}`,`transform ${t}ms ${n}`,`padding ${t}ms ${n}`,`margin ${t}ms ${n}`].join(`, `)}disconnected(){this.element&&(this.element.style.willChange=``)}reconnected(){}},Qe=(0,u.directive)(Ze),$e=!1,et=class extends u.AsyncDirective{constructor(...e){super(...e),this.teardown$=new s.Subject}render(){}update(e){if(e.type!==d.PartType.ELEMENT)throw Error(`ripple directive must be used on an element`);this.element=e.element,function(){if($e)return;let e=document.createElement(`style`);e.id=`schmancy-ripple-shared`,e.textContent=`
309
+ .schmancy-ripple-effect {
310
+ position: absolute;
311
+ border-radius: 50%;
312
+ background: var(--schmancy-sys-color-surface-on);
313
+ opacity: 0.12;
314
+ transform: scale(0);
315
+ animation: schmancy-ripple-expand 600ms linear forwards;
316
+ pointer-events: none;
317
+ aria-hidden: true;
318
+ }
319
+ @keyframes schmancy-ripple-expand {
320
+ to { transform: scale(4); opacity: 0; }
321
+ }
322
+ `,document.head.appendChild(e),$e=!0}(),getComputedStyle(this.element).position===`static`&&(this.element.style.position=`relative`),this.element.style.overflow=`hidden`,this.teardown$.next(),(0,s.fromEvent)(this.element,`click`).pipe((0,c.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}reconnected(){this.teardown$.next(),(0,s.fromEvent)(this.element,`click`).pipe((0,c.takeUntil)(this.teardown$)).subscribe(e=>this.addRipple(e))}addRipple(e){let t=this.element.getBoundingClientRect(),n=Math.max(t.width,t.height),r=n/2,i=document.createElement(`span`);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),(0,s.fromEvent)(i,`animationend`).pipe((0,c.take)(1)).subscribe(()=>i.remove())}disconnected(){this.teardown$.next()}},tt=(0,d.directive)(et),Z=`schmancy-overflow-within-hidden`,nt=!1,rt=class extends u.AsyncDirective{constructor(...e){super(...e),this.element=null,this.disconnecting$=new s.Subject}render(e){return l.noChange}update(e,[t={}]){if(e.type!==d.PartType.ELEMENT)throw Error(`overflowWithin directive can only be used on elements`);let n=e.element,{hide:r=!1,direction:i=`both`,name:a,debounce:o=10}=t,c=n.style;c.minHeight=`0`,c.minWidth=`0`,c.boxSizing=`border-box`,c.overflowY=i===`horizontal`?`hidden`:`auto`,c.overflowX=i===`vertical`?`hidden`:`auto`,c.scrollBehavior=`smooth`,c.overscrollBehavior=`contain`,r?(function(){if(nt)return;nt=!0;let e=new CSSStyleSheet;e.replaceSync(`.${Z} { scrollbar-width: none; -ms-overflow-style: none; }\n\t\t .${Z}::-webkit-scrollbar { display: none; }`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}(),n.classList.add(Z)):n.classList.remove(Z);let u=this.element!==n,f=this.currentName!==a;return u?(this.element=n,this.subscribe(o,a)):f&&(this.disconnecting$.next(),this.disconnecting$=new s.Subject,this.subscribe(o,a)),this.currentName=a,l.noChange}subscribe(e,t){if(!this.element)return;let n=this.element;(0,s.fromEvent)(n,`scroll`,{passive:!0}).pipe((0,s.debounceTime)(e),(0,s.takeUntil)(this.disconnecting$)).subscribe(e=>{n.dispatchEvent(new CustomEvent(`scroll`,{detail:{scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth,e},bubbles:!0,composed:!0}))}),t!==void 0&&(0,s.fromEvent)(window,`@schmancy:scrollTo`).pipe((0,s.filter)(e=>e.detail.name===t&&e.detail.action===`scrollTo`),(0,s.takeUntil)(this.disconnecting$)).subscribe(e=>{let t={behavior:`smooth`,top:e.detail.top};typeof e.detail.left==`number`&&(t.left=e.detail.left),n.scrollTo(t)})}disconnected(){this.disconnecting$.next(),this.element=null}reconnected(){this.element&&(this.disconnecting$=new s.Subject,this.subscribe(10,this.currentName))}},it=(0,u.directive)(rt),at={error:[`#ef4444`,`#dc2626`,`#b91c1c`,`#fca5a5`,`#fee2e2`],warning:[`#f59e0b`,`#d97706`,`#b45309`,`#fcd34d`,`#fef3c7`],primary:[`#3b82f6`,`#2563eb`,`#1d4ed8`,`#93c5fd`,`#dbeafe`]},ot={error:0,warning:1,primary:2},st=class t{static{this.instance=null}constructor(){this.container=null,this.stylesInjected=!1,this.shardPools=new Map([[0,[]],[1,[]],[2,[]]]),this.activeShards=[],this.animationId=null,this.instances=new Set,this.tabVisible=!0,this.visibilityObserver=null,this.elementVisibility=new WeakMap,this.observedElements=new WeakSet,this.lastSoundTime=0,this.SOUND_THROTTLE_MS=150,document.addEventListener(`visibilitychange`,()=>{this.tabVisible=document.visibilityState===`visible`,this.tabVisible?(this.resumeAllAnimations(),this.startAnimationLoop()):(this.pauseAllAnimations(),this.stopAnimationLoop(),this.clearAllShards())})}static getInstance(){return t.instance||=new t,t.instance}ensureInitialized(){this.ensureStyles(),this.ensureContainer(),this.ensureObserver()}ensureStyles(){if(this.stylesInjected)return;let e=document.createElement(`style`);e.id=`urgent-shard-styles`,e.textContent=`
323
+ .urgent-shard {
324
+ position: absolute;
325
+ transform-origin: center;
326
+ will-change: transform, opacity;
327
+ pointer-events: none;
328
+ contain: layout style;
329
+ }
330
+ .urgent-container {
331
+ position: fixed;
332
+ top: 0;
333
+ left: 0;
334
+ width: 100vw;
335
+ height: 100vh;
336
+ pointer-events: none;
337
+ overflow: visible;
338
+ z-index: 9999;
339
+ contain: strict;
340
+ }
341
+ `,document.head.appendChild(e),this.stylesInjected=!0}ensureContainer(){this.container&&this.container.isConnected||(this.container=document.createElement(`div`),this.container.className=`urgent-container`,document.body.appendChild(this.container))}ensureObserver(){this.visibilityObserver||=new IntersectionObserver(e=>{for(let t of e)this.elementVisibility.set(t.target,t.isIntersecting)},{threshold:0})}register(e){this.ensureInitialized(),this.instances.add(e),this.startAnimationLoop()}unregister(e){this.instances.delete(e),this.instances.size===0&&this.stopAnimationLoop()}observeElement(e){this.observedElements.has(e)||(this.ensureObserver(),this.visibilityObserver.observe(e),this.observedElements.add(e),this.elementVisibility.set(e,!0))}unobserveElement(e){this.visibilityObserver?.unobserve(e),this.observedElements.delete(e)}isElementVisible(e){return this.elementVisibility.get(e)??!0}isTabVisible(){return this.tabVisible}acquireShard(e,t){let n=this.shardPools.get(e).pop();n||(n=document.createElement(`div`),n.className=`urgent-shard`,this.container.appendChild(n));let r=4+12*Math.random(),i=4+12*Math.random(),a=t[Math.floor(Math.random()*t.length)];return Object.assign(n.style,{width:`${r}px`,height:`${i}px`,background:`linear-gradient(${360*Math.random()}deg,${a},transparent)`,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()}%)`,boxShadow:`0 0 ${2+4*Math.random()}px ${t[0]}88`,opacity:`1`}),n}releaseShard(e,t){Object.assign(e.style,{opacity:`0`,transform:`translate(-9999px,-9999px)`}),this.shardPools.get(t).push(e)}addShards(e){this.activeShards.push(...e)}clearAllShards(){for(let e of this.activeShards)this.releaseShard(e.element,e.colorIndex);this.activeShards=[]}startAnimationLoop(){if(this.animationId!==null||!this.tabVisible)return;let e=()=>{this.updateShards(),this.updateInstanceTimers(),this.instances.size>0&&this.tabVisible?this.animationId=requestAnimationFrame(e):this.animationId=null};this.animationId=requestAnimationFrame(e)}stopAnimationLoop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}updateShards(){let e=this.activeShards;for(let t=e.length-1;t>=0;t--){let n=e[t];n.life++,n.x+=n.vx,n.y+=n.vy,n.vy+=.15,n.vx*=.98,n.rotation+=n.rotationSpeed;let r=n.life/n.maxLife,i=Math.max(0,1-r*r),a=n.initialScale*(1-.5*r);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))}}updateInstanceTimers(){let e=performance.now();for(let t of this.instances)t.checkBurstTimer(e)}pauseAllAnimations(){for(let e of this.instances)e.pauseAnimations()}resumeAllAnimations(){for(let e of this.instances)e.resumeAnimations()}playSound(t){let n=performance.now();if(n-this.lastSoundTime<this.SOUND_THROTTLE_MS)return;this.lastSoundTime=n;let r=t===`error`?`anxious`:t===`warning`?`worried`:`curious`;e.t.play(r)}destroy(){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}},Q=new WeakMap,ct=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null,this.coordinator=st.getInstance()}render(e,t,n){return l.noChange}update(e,t){let n=e.element,r,i,a,o,s,c=t[0];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.noChange;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.noChange;if(!this.state||this.state.color===i&&this.state.shake===a&&this.state.mode===o&&this.state.interval===s||this.cleanup(),r&&!this.state){let e=n.style.position,t=n.style.overflow;this.state={active:r,color:i,shake:a,mode:o,interval:s,element:n,originalPosition:e,originalOverflow:t,shakeAnimation:null,pulseAnimation:null,isRunning:!1,lastBurstTime:performance.now()+Math.random()*s,initialized:!1},Q.set(n,this.createController()),this.coordinator.register(this),this.coordinator.observeElement(n),requestAnimationFrame(()=>{this.state&&(this.initializeElement(),o===`auto`&&this.startBurstInterval())})}return l.noChange}initializeElement(){if(!this.state||this.state.initialized)return;let{element:e,color:t,shake:n}=this.state,r=at[t];getComputedStyle(e).position===`static`&&(e.style.position=`relative`),e.style.overflow=`visible`,n&&(this.state.shakeAnimation=e.animate([{transform:`rotate(0deg) scale(1)`},{transform:`rotate(-2deg) scale(1.02)`},{transform:`rotate(2deg) scale(1.02)`},{transform:`rotate(-1deg) scale(1.01)`},{transform:`rotate(1deg) scale(1.01)`},{transform:`rotate(0deg) scale(1)`}],{duration:400,easing:`ease-in-out`,iterations:1/0})),this.state.pulseAnimation=e.animate([{boxShadow:`0 0 0 0 ${r[0]}66`},{boxShadow:`0 0 20px 5px ${r[0]}33`},{boxShadow:`0 0 0 0 ${r[0]}66`}],{duration:1500,easing:`ease-in-out`,iterations:1/0}),this.coordinator.playSound(t),this.state.initialized=!0}checkBurstTimer(e){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())}createBurst(){if(!this.state)return;let{element:e,color:t}=this.state,n=at[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=[];for(let e=0;e<s;e++){let e=this.coordinator.acquireShard(r,n),t=Math.random()*Math.PI*2,i=2+4*Math.random();c.push({element:e,colorIndex:r,x:a,y:o,vx:Math.cos(t)*i,vy:Math.sin(t)*i,rotation:360*Math.random(),rotationSpeed:30*Math.random()-15,initialScale:.5+.5*Math.random(),life:0,maxLife:40+30*Math.random()})}this.coordinator.addShards(c),this.coordinator.playSound(t)}pauseAnimations(){this.state?.shakeAnimation?.pause(),this.state?.pulseAnimation?.pause()}resumeAnimations(){this.state?.shakeAnimation?.play(),this.state?.pulseAnimation?.play()}createController(){let e=this;return{play:()=>e.playOnce(),start:t=>{e.state&&t!==void 0&&(e.state.interval=t),e.startBurstInterval()},stop:()=>e.stopBurstInterval(),get isRunning(){return e.state?.isRunning??!1}}}playOnce(){this.state&&(this.state.initialized||this.initializeElement(),this.createBurst())}startBurstInterval(){this.state&&(this.state.isRunning=!0,this.state.lastBurstTime=performance.now())}stopBurstInterval(){this.state&&(this.state.isRunning=!1)}cleanup(){this.state&&=(this.coordinator.unregister(this),this.coordinator.unobserveElement(this.state.element),this.state.shakeAnimation?.cancel(),this.state.pulseAnimation?.cancel(),Q.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)}disconnected(){this.cleanup()}},lt=(0,u.directive)(ct),ut=Object.assign((e,t,n)=>lt(e,t,n),{getController:e=>Q.get(e)}),$=10,dt=class extends u.AsyncDirective{constructor(...e){super(...e),this.state=null}render(e){return l.noChange}update(e,[t]){let n=e.element,r=n.offsetWidth||n.clientWidth,{active:i,color:a=`var(--md-sys-color-primary)`,travelWidth:o=r}=t;return!i&&this.state?(this.cleanup(),l.noChange):i?(!this.state||this.state.color===a&&this.state.travelWidth===o||this.cleanup(),this.state||(this.state={active:!0,color:a,travelWidth:o,element:n,segments:[],isVisible:!0,startTime:performance.now()},getComputedStyle(n).position===`static`&&(n.style.position=`relative`),this.createOverlay(),this.setupVisibilityObserver(),this.startAnimation()),l.noChange):l.noChange}createOverlay(){if(!this.state)return;let{element:e,color:t,travelWidth:n}=this.state,r=document.createElement(`div`);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`;let i=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);i.setAttribute(`width`,`100%`),i.setAttribute(`height`,`100%`),i.setAttribute(`viewBox`,`0 0 ${n} 20`),i.setAttribute(`preserveAspectRatio`,`none`),i.style.cssText=`
342
+ position: absolute;
343
+ top: 0;
344
+ left: 0;
345
+ width: 100%;
346
+ height: 100%;
347
+ overflow: visible;
348
+ `;let a=[];for(let e=0;e<$;e++){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`circle`),r=4-e/9*2.5;n.setAttribute(`r`,r.toString()),n.setAttribute(`fill`,t),n.setAttribute(`cy`,`10`),n.style.willChange=`transform, opacity`;let o=e/$*.5,s=e/$*Math.PI*2;a.push({element:n,progress:o,phase:s}),i.appendChild(n)}r.appendChild(i),e.appendChild(r),this.state.overlayElement=r,this.state.svg=i,this.state.segments=a}setupVisibilityObserver(){this.state&&typeof IntersectionObserver<`u`&&(this.state.observer=new IntersectionObserver(e=>{if(!this.state)return;let t=e[0].isIntersecting;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))},{threshold:0}),this.state.observer.observe(this.state.element))}startAnimation(){if(!this.state||!this.state.isVisible)return;let e=t=>{if(!this.state||!this.state.isVisible)return;let n=(t-this.state.startTime)%3e3/3e3,{segments:r,travelWidth:i}=this.state;for(let e=0;e<r.length;e++){let a=r[e],o=(n+e/$)%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/$*.55)*(1-.7*s),d=1;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`)}this.state.animationId=requestAnimationFrame(e)};this.state.animationId=requestAnimationFrame(e)}cleanup(){this.state&&=(this.state.animationId&&cancelAnimationFrame(this.state.animationId),this.state.observer&&this.state.observer.disconnect(),this.state.overlayElement&&this.state.overlayElement.remove(),null)}disconnected(){this.cleanup()}},ft=(0,u.directive)(dt);Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ye}});