sourcery-nightly 1.27.1b1__py2.py3-none-manylinux1_x86_64.whl → 1.27.1b4__py2.py3-none-manylinux1_x86_64.whl

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 (269) hide show
  1. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.js +1 -1
  2. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sourcery +0 -0
  3. {sourcery_nightly-1.27.1b1.dist-info → sourcery_nightly-1.27.1b4.dist-info}/METADATA +2 -2
  4. {sourcery_nightly-1.27.1b1.dist-info → sourcery_nightly-1.27.1b4.dist-info}/RECORD +269 -269
  5. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_asyncio.so +0 -0
  6. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_blake2.so +0 -0
  7. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_bz2.so +0 -0
  8. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_cffi_backend.so +0 -0
  9. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_cn.so +0 -0
  10. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_hk.so +0 -0
  11. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_iso2022.so +0 -0
  12. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_jp.so +0 -0
  13. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_kr.so +0 -0
  14. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_codecs_tw.so +0 -0
  15. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_contextvars.so +0 -0
  16. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_csv.so +0 -0
  17. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_ctypes.so +0 -0
  18. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_curses.so +0 -0
  19. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_datetime.so +0 -0
  20. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_decimal.so +0 -0
  21. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_elementtree.so +0 -0
  22. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_hashlib.so +0 -0
  23. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_heapq.so +0 -0
  24. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_lzma.so +0 -0
  25. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_md5.so +0 -0
  26. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_multibytecodec.so +0 -0
  27. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_multiprocessing.so +0 -0
  28. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_opcode.so +0 -0
  29. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_pickle.so +0 -0
  30. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_posixshmem.so +0 -0
  31. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_posixsubprocess.so +0 -0
  32. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_queue.so +0 -0
  33. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_random.so +0 -0
  34. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_ruamel_yaml.so +0 -0
  35. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_sha1.so +0 -0
  36. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_sha256.so +0 -0
  37. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_sha3.so +0 -0
  38. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_sha512.so +0 -0
  39. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_socket.so +0 -0
  40. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_sqlite3.so +0 -0
  41. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_ssl.so +0 -0
  42. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_statistics.so +0 -0
  43. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_struct.so +0 -0
  44. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_typing.so +0 -0
  45. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_uuid.so +0 -0
  46. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/_zoneinfo.so +0 -0
  47. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/aiohttp/_helpers.so +0 -0
  48. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/aiohttp/_http_parser.so +0 -0
  49. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/aiohttp/_http_writer.so +0 -0
  50. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/aiohttp/_websocket.so +0 -0
  51. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/array.so +0 -0
  52. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/binascii.so +0 -0
  53. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/_width_table.so +0 -0
  54. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/brackets.so +0 -0
  55. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/cache.so +0 -0
  56. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/comments.so +0 -0
  57. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/const.so +0 -0
  58. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/handle_ipynb_magics.so +0 -0
  59. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/linegen.so +0 -0
  60. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/lines.so +0 -0
  61. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/mode.so +0 -0
  62. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/nodes.so +0 -0
  63. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/numerics.so +0 -0
  64. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/parsing.so +0 -0
  65. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/ranges.so +0 -0
  66. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/resources/black.schema.json +0 -0
  67. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/rusty.so +0 -0
  68. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/strings.so +0 -0
  69. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/black/trans.so +0 -0
  70. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/Grammar.txt +0 -0
  71. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/LICENSE +0 -0
  72. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/PatternGrammar.txt +0 -0
  73. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/README +0 -0
  74. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/driver.so +0 -0
  75. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/grammar.so +0 -0
  76. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/parse.so +0 -0
  77. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/pgen.so +0 -0
  78. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/token.so +0 -0
  79. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pgen2/tokenize.so +0 -0
  80. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pygram.so +0 -0
  81. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/blib2to3/pytree.so +0 -0
  82. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/certifi/cacert.pem +0 -0
  83. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/charset_normalizer/md.so +0 -0
  84. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/charset_normalizer/md__mypyc.so +0 -0
  85. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.css +0 -0
  86. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/coding-assistant-app/dist/assets/sourcery-logo.svg +0 -0
  87. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/cryptography/hazmat/bindings/_openssl.so +0 -0
  88. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/cryptography/hazmat/bindings/_rust.so +0 -0
  89. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/fcntl.so +0 -0
  90. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/frozenlist/_frozenlist.so +0 -0
  91. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/grp.so +0 -0
  92. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/grpc/_cython/_credentials/roots.pem +0 -0
  93. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/grpc/_cython/cygrpc.so +0 -0
  94. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/MessinaSansMonoWeb-Bold.woff +0 -0
  95. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/MessinaSansMonoWeb-Regular.woff +0 -0
  96. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/MessinaSansWeb-Bold.woff +0 -0
  97. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/MessinaSansWeb-Regular.woff +0 -0
  98. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/asset-manifest.json +0 -0
  99. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/favicon.png +0 -0
  100. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/index.html +0 -0
  101. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/input.css +0 -0
  102. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/manifest.json +0 -0
  103. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/output.css +0 -0
  104. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/robots.txt +0 -0
  105. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/css/main.9e584365.css +0 -0
  106. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/css/main.9e584365.css.map +0 -0
  107. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js +0 -0
  108. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js.LICENSE.txt +0 -0
  109. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js.map +0 -0
  110. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/icons.07ed0b60c13965581675.woff +0 -0
  111. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/icons.33055a2699783178df55.svg +0 -0
  112. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/icons.e3d35e8153c5ffaa069f.eot +0 -0
  113. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/icons.f39232cd335dc12e7d4f.woff2 +0 -0
  114. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/icons.fdecd2d880938cae502a.ttf +0 -0
  115. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/javascript-original.c02fa242f9adac6e8c19870162a2ad9a.svg +0 -0
  116. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/lower-bg.312ebfbac07089329e13.svg +0 -0
  117. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/python-original.849d0b2b5f1ec20f077dd267498bd536.svg +0 -0
  118. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/simple-bg.3f2e16f66d799c5d8fec.svg +0 -0
  119. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/sourcery-logo.4e35db02109ca9de8958eb231adec7ad.svg +0 -0
  120. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/hub/static/static/media/typescript-original.6f6ff3a7becc7dc75db25af287f0e596.svg +0 -0
  121. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/jiter/jiter.so +0 -0
  122. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/languages.so +0 -0
  123. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/lib2to3/Grammar3.11.4.final.0.pickle +0 -0
  124. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/lib2to3/PatternGrammar3.11.4.final.0.pickle +0 -0
  125. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libbz2.so.1.0 +0 -0
  126. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libcrypto.so.1.1 +0 -0
  127. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libexpat.so.1 +0 -0
  128. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libffi.so.6 +0 -0
  129. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/liblzma.so.5 +0 -0
  130. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libncursesw.so.6 +0 -0
  131. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libpython3.11.so.1.0 +0 -0
  132. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libreadline.so.7 +0 -0
  133. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libsqlite3.so.0 +0 -0
  134. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libssl.so.1.1 +0 -0
  135. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libtinfo.so.6 +0 -0
  136. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/libuuid.so.1 +0 -0
  137. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/linguist-languages.yml +0 -0
  138. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/markupsafe/_speedups.so +0 -0
  139. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/math.so +0 -0
  140. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mmap.so +0 -0
  141. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/multidict/_multidict.so +0 -0
  142. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/errorcodes.so +0 -0
  143. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/expandtype.so +0 -0
  144. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/nodes.so +0 -0
  145. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/options.so +0 -0
  146. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/plugin.so +0 -0
  147. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/plugins/common.so +0 -0
  148. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/plugins/dataclasses.so +0 -0
  149. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/semanal.so +0 -0
  150. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/server/trigger.so +0 -0
  151. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/state.so +0 -0
  152. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/typeops.so +0 -0
  153. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/types.so +0 -0
  154. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/typevars.so +0 -0
  155. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/mypy/util.so +0 -0
  156. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/orjson/orjson.so +0 -0
  157. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/private_rules/refactorings/identity-comprehension.yaml +0 -0
  158. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/private_rules/refactorings/list-literal.yaml +0 -0
  159. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/psutil/_psutil_linux.so +0 -0
  160. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/psutil/_psutil_posix.so +0 -0
  161. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/public_rules/LICENSE +0 -0
  162. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/public_rules/README.md +0 -0
  163. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/public_rules/google-python-style-guide.yaml +0 -0
  164. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/public_rules/remove-debugging-statements.yaml +0 -0
  165. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/public_rules/use-fstring.yaml +0 -0
  166. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso15924.json +0 -0
  167. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso3166-1.json +0 -0
  168. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso3166-2.json +0 -0
  169. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso3166-3.json +0 -0
  170. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso4217.json +0 -0
  171. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso639-3.json +0 -0
  172. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pycountry/databases/iso639-5.json +0 -0
  173. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pydantic_core/_pydantic_core.so +0 -0
  174. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pyexpat.so +0 -0
  175. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/pysolvers.so +0 -0
  176. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/readline.so +0 -0
  177. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/regex/_regex.so +0 -0
  178. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/resource.so +0 -0
  179. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/java/java-rules.yaml +0 -0
  180. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/assignment-operator.yaml +0 -0
  181. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/avoid-function-declarations-in-blocks.yaml +0 -0
  182. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/avoid-infinite-loops.yaml +0 -0
  183. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/avoid-jumping-in-finally.yaml +0 -0
  184. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/avoid-using-var.yaml +0 -0
  185. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/binary-operator-identity.yaml +0 -0
  186. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/combine-object-destructuring.yaml +0 -0
  187. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/de-morgan.yaml +0 -0
  188. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-concatenate-string-literals.yaml +0 -0
  189. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-negate-is-instanceof-operands.yaml +0 -0
  190. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-reassign-caught-exceptions.yaml +0 -0
  191. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-reassign-foreach-variables.yaml +0 -0
  192. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-reassign-parameters.yaml +0 -0
  193. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-self-assign-variables.yaml +0 -0
  194. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-shadow-arguments.yaml +0 -0
  195. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-use-with.yaml +0 -0
  196. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/dont-use-wrappers-for-builtins.yaml +0 -0
  197. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/flatten-nested-try.yaml +0 -0
  198. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/flip-comparison.yaml +0 -0
  199. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/generators-should-yield.yaml +0 -0
  200. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/inline-immediately-returned-variable.yaml +0 -0
  201. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/invert-ternary.yaml +0 -0
  202. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/max-min.yaml +0 -0
  203. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/merge-assign-operators.yaml +0 -0
  204. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/merge-else-if.yaml +0 -0
  205. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/merge_nested_ifs.yaml +0 -0
  206. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/misplaced-break-or-continue.yaml +0 -0
  207. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/no-eval.yaml +0 -0
  208. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/no-new-function.yaml +0 -0
  209. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/no-new-symbol.yaml +0 -0
  210. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/only-delete-object-properties.yaml +0 -0
  211. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/possible-incorrect-bitwise-operator.yaml +0 -0
  212. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/prefer-arrow-callback.yaml +0 -0
  213. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/remove-redundant-boolean.yaml +0 -0
  214. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/remove-redundant-if-statement.yaml +0 -0
  215. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/remove-redundant-slice-index.yaml +0 -0
  216. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/remove-unreachable-code.yaml +0 -0
  217. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/return-outside-function.yaml +0 -0
  218. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/simplify-ternary.yaml +0 -0
  219. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/throw-new-errors.yaml +0 -0
  220. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/use-array-literal.yaml +0 -0
  221. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/use-braces.yaml +0 -0
  222. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/use-object-destructuring.yaml +0 -0
  223. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/use-ternary-operator.yaml +0 -0
  224. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/while-guard-to-condition.yaml +0 -0
  225. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/wrap-immediately-invoked-function-expressions.yaml +0 -0
  226. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/javascript/yield-outside-generator.yaml +0 -0
  227. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/break-or-continue-outside-loop.yaml +0 -0
  228. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/dict-literal.yaml +0 -0
  229. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/merge-nested-ifs.yaml +0 -0
  230. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/no-complex-code-in-tests.yaml +0 -0
  231. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/or-if-exp-identity.yaml +0 -0
  232. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/pandas-chain-methods.yaml +0 -0
  233. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/raise-specific-error.yaml +0 -0
  234. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/remove-none-from-default-get.yaml +0 -0
  235. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/remove-redundant-path-exists.yaml +0 -0
  236. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/remove-unit-step-from-range.yaml +0 -0
  237. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/remove-zero-from-range.yaml +0 -0
  238. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/simplify-constant-sum.yaml +0 -0
  239. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/swap-if-expression.yaml +0 -0
  240. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/tuple-literal.yaml +0 -0
  241. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/use-iloc-for-indexing.yaml +0 -0
  242. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/use-isna.yaml +0 -0
  243. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/use-or-for-fallback.yaml +0 -0
  244. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/useless-else-on-loop.yaml +0 -0
  245. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/rules/python/while-guard-to-condition.yaml +0 -0
  246. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/select.so +0 -0
  247. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sqlalchemy/cyextension/collections.so +0 -0
  248. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sqlalchemy/cyextension/immutabledict.so +0 -0
  249. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sqlalchemy/cyextension/processors.so +0 -0
  250. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sqlalchemy/cyextension/resultproxy.so +0 -0
  251. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/sqlalchemy/cyextension/util.so +0 -0
  252. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/termios.so +0 -0
  253. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/tiktoken/_tiktoken.so +0 -0
  254. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/tomli/_parser.so +0 -0
  255. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/tree_sitter/_binding.so +0 -0
  256. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/ujson.so +0 -0
  257. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/unicodedata.so +0 -0
  258. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/wrapper.py +0 -0
  259. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/yaml/_yaml.so +0 -0
  260. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/yapf_third_party/_ylib2to3/Grammar.txt +0 -0
  261. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/yapf_third_party/_ylib2to3/PatternGrammar.txt +0 -0
  262. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/yarl/_helpers_c.so +0 -0
  263. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/yarl/_quoting_c.so +0 -0
  264. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/zlib.so +0 -0
  265. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/zstandard/_cffi.so +0 -0
  266. {sourcery_nightly-1.27.1b1.data → sourcery_nightly-1.27.1b4.data}/purelib/sourcery/zstandard/backend_c.so +0 -0
  267. {sourcery_nightly-1.27.1b1.dist-info → sourcery_nightly-1.27.1b4.dist-info}/WHEEL +0 -0
  268. {sourcery_nightly-1.27.1b1.dist-info → sourcery_nightly-1.27.1b4.dist-info}/entry_points.txt +0 -0
  269. {sourcery_nightly-1.27.1b1.dist-info → sourcery_nightly-1.27.1b4.dist-info}/top_level.txt +0 -0
@@ -849,4 +849,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
849
849
  ]`,h={scope:"string",variants:[c,l,u,f]},p={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},g=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],y={keyword:v,literal:(Q=>{const X=[];return Q.forEach(q=>{X.push(q),q.toLowerCase()===q?X.push(q.toUpperCase()):X.push(q.toLowerCase())}),X})(g),built_in:E},S=Q=>Q.map(X=>X.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,t.concat(d,"+"),t.concat("(?!",S(E).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),N={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[R,a,N,e.C_BLOCK_COMMENT_MODE,h,p,w]},O={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(v).join("\\b|"),"|",S(E).join("\\b|"),"\\b)"),r,t.concat(d,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push(O);const B=[R,N,e.C_BLOCK_COMMENT_MODE,h,p,w],z={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:y,contains:[z,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},a,O,N,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:y,contains:["self",a,N,e.C_BLOCK_COMMENT_MODE,h,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,p]}}function ID(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function RD(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function MD(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},u={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",h=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,p=`\\b|${r.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${h}))[eE][+-]?(${d})[jJ]?(?=${p})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${d})[jJ](?=${p})`}]},v={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,g,f,e.HASH_COMMENT_MODE]}]};return c.contains=[f,g,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,g,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},f,v,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,E,f]}]}}function LD(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function PD(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function DD(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:s},f={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},d="[1-9](_?[0-9])*|0",h="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${d})(\\.(${h}))?([eE][+-]?(${h})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},A=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=A,g.contains=A;const N="[>?]>",R="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",D="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",O=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+N+"|"+R+"|"+D+")(?=[ ])",starts:{end:"$",keywords:s,contains:A}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(c).concat(A)}}function FD(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],s=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:i,literal:a,built_in:s},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:s,type:o}},{className:"punctuation",begin:"->"},n]}}const BD=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),UD=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],HD=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],zD=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],jD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],$D=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function GD(e){const t=BD(e),n=jD,r=zD,i="@[a-z-]+",a="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+UD.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+$D.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:HD.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function VD(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function KD(e){const t=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},i={begin:/"/,end:/"/,contains:[{begin:/""/}]},a=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=u,p=[...c,...l].filter(y=>!u.includes(y)),g={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},v={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={begin:t.concat(/\b/,t.either(...h),/\s*\(/),relevance:0,keywords:{built_in:h}};function T(y,{exceptions:S,when:w}={}){const A=w;return S=S||[],y.map(N=>N.match(/\|\d+$/)||S.includes(N)?N:A(N)?`${N}|0`:N)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:y=>y.length<3}),literal:a,type:o,built_in:f},contains:[{begin:t.either(...d),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(d),literal:a,type:o}},{className:"type",begin:t.either(...s)},E,g,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,v]}}function Q8(e){return e?typeof e=="string"?e:e.source:null}function j1(e){return Ie("(?=",e,")")}function Ie(...e){return e.map(n=>Q8(n)).join("")}function WD(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ft(...e){return"("+(WD(e).capture?"":"?:")+e.map(r=>Q8(r)).join("|")+")"}const d0=e=>Ie(/\b/,e,/\w$/.test(e)?/\b/:/\B/),YD=["Protocol","Type"].map(d0),qE=["init","self"].map(d0),qD=["Any","Self"],Pd=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],QE=["false","nil","true"],QD=["assignment","associativity","higherThan","left","lowerThan","none","right"],XD=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],XE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],X8=Ft(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Z8=Ft(X8,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Dd=Ie(X8,Z8,"*"),J8=Ft(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),au=Ft(J8,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),yr=Ie(J8,au,"*"),Fd=Ie(/[A-Z]/,au,"*"),ZD=["autoclosure",Ie(/convention\(/,Ft("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ie(/objc\(/,yr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],JD=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function eF(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Ft(...YD,...qE)],className:{2:"keyword"}},a={match:Ie(/\./,Ft(...Pd)),relevance:0},s=Pd.filter(fe=>typeof fe=="string").concat(["_|0"]),o=Pd.filter(fe=>typeof fe!="string").concat(qD).map(d0),l={variants:[{className:"keyword",match:Ft(...o,...qE)}]},c={$pattern:Ft(/\b\w+/,/#\w+/),keyword:s.concat(XD),literal:QE},u=[i,a,l],f={match:Ie(/\./,Ft(...XE)),relevance:0},d={className:"built_in",match:Ie(/\b/,Ft(...XE),/(?=\()/)},h=[f,d],p={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:Dd},{match:`\\.(\\.|${Z8})+`}]},v=[p,g],E="([0-9]_*)+",T="([0-9a-fA-F]_*)+",y={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},S=(fe="")=>({className:"subst",variants:[{match:Ie(/\\/,fe,/[0\\tnr"']/)},{match:Ie(/\\/,fe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),w=(fe="")=>({className:"subst",match:Ie(/\\/,fe,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(fe="")=>({className:"subst",label:"interpol",begin:Ie(/\\/,fe,/\(/),end:/\)/}),N=(fe="")=>({begin:Ie(fe,/"""/),end:Ie(/"""/,fe),contains:[S(fe),w(fe),A(fe)]}),R=(fe="")=>({begin:Ie(fe,/"/),end:Ie(/"/,fe),contains:[S(fe),A(fe)]}),D={className:"string",variants:[N(),N("#"),N("##"),N("###"),R(),R("#"),R("##"),R("###")]},O={match:Ie(/`/,yr,/`/)},B={className:"variable",match:/\$\d+/},z={className:"variable",match:`\\$${au}+`},Q=[O,B,z],X={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:JD,contains:[...v,y,D]}]}},q={className:"keyword",match:Ie(/@/,Ft(...ZD))},ae={className:"meta",match:Ie(/@/,yr)},F=[X,q,ae],M={match:j1(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ie(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,au,"+")},{className:"type",match:Fd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ie(/\s+&\s+/,j1(Fd)),relevance:0}]},H={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...F,p,M]};M.contains.push(H);const b={match:Ie(yr,/\s*:/),keywords:"_|0",relevance:0},j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",b,...r,...u,...h,...v,y,D,...Q,...F,M]},te={begin:/</,end:/>/,contains:[...r,M]},x={begin:Ft(j1(Ie(yr,/\s*:/)),j1(Ie(yr,/\s+/,yr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:yr}]},pe={begin:/\(/,end:/\)/,keywords:c,contains:[x,...r,...u,...v,y,D,...F,M,j],endsParent:!0,illegal:/["']/},me={match:[/func/,/\s+/,Ft(O.match,yr,Dd)],className:{1:"keyword",3:"title.function"},contains:[te,pe,t],illegal:[/\[/,/%/]},oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[te,pe,t],illegal:/\[|%/},ze={match:[/operator/,/\s+/,Dd],className:{1:"keyword",3:"title"}},Ge={begin:[/precedencegroup/,/\s+/,Fd],className:{1:"keyword",3:"title"},contains:[M],keywords:[...QD,...QE],end:/}/};for(const fe of D.variants){const ut=fe.contains.find(xn=>xn.label==="interpol");ut.keywords=c;const nt=[...u,...h,...v,y,D,...Q];ut.contains=[...nt,{begin:/\(/,end:/\)/,contains:["self",...nt]}]}return{name:"Swift",keywords:c,contains:[...r,me,oe,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:c,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...u]},ze,Ge,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...u,...h,...v,y,D,...Q,...F,M,j]}}const su="[A-Za-z$_][0-9A-Za-z$_]*",eb=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],tb=["true","false","null","undefined","NaN","Infinity"],nb=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],rb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ib=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ab=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],sb=[].concat(ib,nb,rb);function tF(e){const t=e.regex,n=(M,{after:H})=>{const b="</"+M[0].slice(1);return M.input.indexOf(b,H)!==-1},r=su,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,H)=>{const b=M[0].length+M.index,j=M.input[b];if(j==="<"||j===","){H.ignoreMatch();return}j===">"&&(n(M,{after:b})||H.ignoreMatch());let te;const x=M.input.substring(b);if(te=x.match(/^\s*=/)){H.ignoreMatch();return}if((te=x.match(/^\s+extends\s+/))&&te.index===0){H.ignoreMatch();return}}},o={$pattern:su,keyword:eb,literal:tb,built_in:sb,"variable.language":ab},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},p={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},g={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,v,{match:/\$\d+/},f];d.contains=y.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(y)});const S=[].concat(T,d.contains),w=S.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(S)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:w},N={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...nb,...rb]}},D={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(M){return t.concat("(?!",M.join("|"),")")}const Q={match:t.concat(/\b/,z([...ib,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ae="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ae)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:w,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),D,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,v,T,{match:/\$\d+/},f,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:ae,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:w}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},Q,B,N,q,{match:/\$[(.]/}]}}function nF(e){const t=tF(e),n=su,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},o=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:su,keyword:eb.concat(o),literal:tb,built_in:sb.concat(r),"variable.language":ab},c={className:"meta",begin:"@"+n},u=(d,h,p)=>{const g=d.contains.findIndex(v=>v.label===h);if(g===-1)throw new Error("can not find mode to replace");d.contains.splice(g,1,p)};Object.assign(t.keywords,l),t.exports.PARAMS_CONTAINS.push(c),t.contains=t.contains.concat([c,i,a]),u(t,"shebang",e.SHEBANG()),u(t,"use_strict",s);const f=t.contains.find(d=>d.label==="func.def");return f.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function rF(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(s,o),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},f=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),d=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,f,d,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[d]}]}}function iF(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,s,i,e.QUOTE_STRING_MODE,l,c,o]}}function aF(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(a,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,o,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,s,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function sF(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o="[0-9]{4}(-[0-9][0-9]){0,2}",l="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",u="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",f={className:"number",begin:"\\b"+o+l+c+u+"\\b"},d={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[d],illegal:"\\n",relevance:0},p={begin:"\\[",end:"\\]",contains:[d],illegal:"\\n",relevance:0},g=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,p,a],v=[...g];return v.pop(),v.push(s),d.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}function ob(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&ob(n)}),e}class ZE{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function lb(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function fi(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const oF="</span>",JE=e=>!!e.scope,lF=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class cF{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=lb(t)}openNode(t){if(!JE(t))return;const n=lF(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){JE(t)&&(this.buffer+=oF)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const e2=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class h0{constructor(){this.rootNode=e2(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=e2({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{h0._collapse(n)}))}}class uF extends h0{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new cF(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Tl(e){return e?typeof e=="string"?e:e.source:null}function cb(e){return Aa("(?=",e,")")}function fF(e){return Aa("(?:",e,")*")}function dF(e){return Aa("(?:",e,")?")}function Aa(...e){return e.map(n=>Tl(n)).join("")}function hF(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function m0(...e){return"("+(hF(e).capture?"":"?:")+e.map(r=>Tl(r)).join("|")+")"}function ub(e){return new RegExp(e.toString()+"|").exec("").length-1}function mF(e,t){const n=e&&e.exec(t);return n&&n.index===0}const pF=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function p0(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=Tl(r),s="";for(;a.length>0;){const o=pF.exec(a);if(!o){s+=a;break}s+=a.substring(0,o.index),a=a.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+i):(s+=o[0],o[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const gF=/\b\B/,fb="[a-zA-Z]\\w*",g0="[a-zA-Z_]\\w*",db="\\b\\d+(\\.\\d+)?",hb="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",mb="\\b(0b[01]+)",EF="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",TF=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Aa(t,/.*\b/,e.binary,/\b.*/)),fi({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},yl={begin:"\\\\[\\s\\S]",relevance:0},yF={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[yl]},_F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[yl]},vF={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},hf=function(e,t,n={}){const r=fi({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=m0("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Aa(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},bF=hf("//","$"),SF=hf("/\\*","\\*/"),AF=hf("#","$"),NF={scope:"number",begin:db,relevance:0},CF={scope:"number",begin:hb,relevance:0},xF={scope:"number",begin:mb,relevance:0},wF={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[yl,{begin:/\[/,end:/\]/,relevance:0,contains:[yl]}]}]},kF={scope:"title",begin:fb,relevance:0},OF={scope:"title",begin:g0,relevance:0},IF={begin:"\\.\\s*"+g0,relevance:0},RF=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var $1=Object.freeze({__proto__:null,MATCH_NOTHING_RE:gF,IDENT_RE:fb,UNDERSCORE_IDENT_RE:g0,NUMBER_RE:db,C_NUMBER_RE:hb,BINARY_NUMBER_RE:mb,RE_STARTERS_RE:EF,SHEBANG:TF,BACKSLASH_ESCAPE:yl,APOS_STRING_MODE:yF,QUOTE_STRING_MODE:_F,PHRASAL_WORDS_MODE:vF,COMMENT:hf,C_LINE_COMMENT_MODE:bF,C_BLOCK_COMMENT_MODE:SF,HASH_COMMENT_MODE:AF,NUMBER_MODE:NF,C_NUMBER_MODE:CF,BINARY_NUMBER_MODE:xF,REGEXP_MODE:wF,TITLE_MODE:kF,UNDERSCORE_TITLE_MODE:OF,METHOD_GUARD:IF,END_SAME_AS_BEGIN:RF});function MF(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function LF(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function PF(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=MF,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function DF(e,t){Array.isArray(e.illegal)&&(e.illegal=m0(...e.illegal))}function FF(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function BF(e,t){e.relevance===void 0&&(e.relevance=1)}const UF=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Aa(n.beforeMatch,cb(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},HF=["of","and","for","in","not","or","if","then","parent","list","value"],zF="keyword";function pb(e,t,n=zF){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(a){Object.assign(r,pb(e[a],t,a))}),r;function i(a,s){t&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){const l=o.split("|");r[l[0]]=[a,jF(l[0],l[1])]})}}function jF(e,t){return t?Number(t):$F(e)?0:1}function $F(e){return HF.includes(e.toLowerCase())}const t2={},sa=e=>{console.error(e)},n2=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Ma=(e,t)=>{t2[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),t2[`${e}/${t}`]=!0)},ou=new Error;function gb(e,t,{key:n}){let r=0;const i=e[n],a={},s={};for(let o=1;o<=t.length;o++)s[o+r]=i[o],a[o+r]=!0,r+=ub(t[o-1]);e[n]=s,e[n]._emit=a,e[n]._multi=!0}function GF(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw sa("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ou;if(typeof e.beginScope!="object"||e.beginScope===null)throw sa("beginScope must be object"),ou;gb(e,e.begin,{key:"beginScope"}),e.begin=p0(e.begin,{joinWith:""})}}function VF(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw sa("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ou;if(typeof e.endScope!="object"||e.endScope===null)throw sa("endScope must be object"),ou;gb(e,e.end,{key:"endScope"}),e.end=p0(e.end,{joinWith:""})}}function KF(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function WF(e){KF(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),GF(e),VF(e)}function YF(e){function t(s,o){return new RegExp(Tl(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=ub(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(p0(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const c=l.findIndex((f,d)=>d>0&&f!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new n;return this.rules.slice(o).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(o);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(o)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(s){const o=new r;return s.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&o.addRule(s.illegal,{type:"illegal"}),o}function a(s,o){const l=s;if(s.isCompiled)return l;[LF,FF,WF,UF].forEach(u=>u(s,o)),e.compilerExtensions.forEach(u=>u(s,o)),s.__beforeBegin=null,[PF,DF,BF].forEach(u=>u(s,o)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=pb(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),o&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=Tl(l.end)||"",s.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(u){return qF(u==="self"?s:u)})),s.contains.forEach(function(u){a(u,l)}),s.starts&&a(s.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=fi(e.classNameAliases||{}),a(e)}function Eb(e){return e?e.endsWithParent||Eb(e.starts):!1}function qF(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return fi(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Eb(e)?fi(e,{starts:e.starts?fi(e.starts):null}):Object.isFrozen(e)?fi(e):e}var QF="11.8.0";class XF extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Bd=lb,r2=fi,i2=Symbol("nomatch"),ZF=7,Tb=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:uF};function l(F){return o.noHighlightRe.test(F)}function c(F){let M=F.className+" ";M+=F.parentNode?F.parentNode.className:"";const H=o.languageDetectRe.exec(M);if(H){const b=D(H[1]);return b||(n2(a.replace("{}",H[1])),n2("Falling back to no-highlight mode for this block.",F)),b?H[1]:"no-highlight"}return M.split(/\s+/).find(b=>l(b)||D(b))}function u(F,M,H){let b="",j="";typeof M=="object"?(b=F,H=M.ignoreIllegals,j=M.language):(Ma("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ma("10.7.0",`Please use highlight(code, options) instead.
850
850
  https://github.com/highlightjs/highlight.js/issues/2277`),j=F,b=M),H===void 0&&(H=!0);const te={code:b,language:j};q("before:highlight",te);const x=te.result?te.result:f(te.language,te.code,H);return x.code=te.code,q("after:highlight",x),x}function f(F,M,H,b){const j=Object.create(null);function te(I,P){return I.keywords[P]}function x(){if(!ce.keywords){Me.addText(Ae);return}let I=0;ce.keywordPatternRe.lastIndex=0;let P=ce.keywordPatternRe.exec(Ae),K="";for(;P;){K+=Ae.substring(I,P.index);const re=_t.case_insensitive?P[0].toLowerCase():P[0],ue=te(ce,re);if(ue){const[Je,Wn]=ue;if(Me.addText(K),K="",j[re]=(j[re]||0)+1,j[re]<=ZF&&(fr+=Wn),Je.startsWith("_"))K+=P[0];else{const wn=_t.classNameAliases[Je]||Je;oe(P[0],wn)}}else K+=P[0];I=ce.keywordPatternRe.lastIndex,P=ce.keywordPatternRe.exec(Ae)}K+=Ae.substring(I),Me.addText(K)}function pe(){if(Ae==="")return;let I=null;if(typeof ce.subLanguage=="string"){if(!t[ce.subLanguage]){Me.addText(Ae);return}I=f(ce.subLanguage,Ae,!0,Wt[ce.subLanguage]),Wt[ce.subLanguage]=I._top}else I=h(Ae,ce.subLanguage.length?ce.subLanguage:null);ce.relevance>0&&(fr+=I.relevance),Me.__addSublanguage(I._emitter,I.language)}function me(){ce.subLanguage!=null?pe():x(),Ae=""}function oe(I,P){I!==""&&(Me.startScope(P),Me.addText(I),Me.endScope())}function ze(I,P){let K=1;const re=P.length-1;for(;K<=re;){if(!I._emit[K]){K++;continue}const ue=_t.classNameAliases[I[K]]||I[K],Je=P[K];ue?oe(Je,ue):(Ae=Je,x(),Ae=""),K++}}function Ge(I,P){return I.scope&&typeof I.scope=="string"&&Me.openNode(_t.classNameAliases[I.scope]||I.scope),I.beginScope&&(I.beginScope._wrap?(oe(Ae,_t.classNameAliases[I.beginScope._wrap]||I.beginScope._wrap),Ae=""):I.beginScope._multi&&(ze(I.beginScope,P),Ae="")),ce=Object.create(I,{parent:{value:ce}}),ce}function fe(I,P,K){let re=mF(I.endRe,K);if(re){if(I["on:end"]){const ue=new ZE(I);I["on:end"](P,ue),ue.isMatchIgnored&&(re=!1)}if(re){for(;I.endsParent&&I.parent;)I=I.parent;return I}}if(I.endsWithParent)return fe(I.parent,P,K)}function ut(I){return ce.matcher.regexIndex===0?(Ae+=I[0],1):(Vr=!0,0)}function nt(I){const P=I[0],K=I.rule,re=new ZE(K),ue=[K.__beforeBegin,K["on:begin"]];for(const Je of ue)if(Je&&(Je(I,re),re.isMatchIgnored))return ut(P);return K.skip?Ae+=P:(K.excludeBegin&&(Ae+=P),me(),!K.returnBegin&&!K.excludeBegin&&(Ae=P)),Ge(K,I),K.returnBegin?0:P.length}function xn(I){const P=I[0],K=M.substring(I.index),re=fe(ce,I,K);if(!re)return i2;const ue=ce;ce.endScope&&ce.endScope._wrap?(me(),oe(P,ce.endScope._wrap)):ce.endScope&&ce.endScope._multi?(me(),ze(ce.endScope,I)):ue.skip?Ae+=P:(ue.returnEnd||ue.excludeEnd||(Ae+=P),me(),ue.excludeEnd&&(Ae=P));do ce.scope&&Me.closeNode(),!ce.skip&&!ce.subLanguage&&(fr+=ce.relevance),ce=ce.parent;while(ce!==re.parent);return re.starts&&Ge(re.starts,I),ue.returnEnd?0:P.length}function ur(){const I=[];for(let P=ce;P!==_t;P=P.parent)P.scope&&I.unshift(P.scope);I.forEach(P=>Me.openNode(P))}let jr={};function wa(I,P){const K=P&&P[0];if(Ae+=I,K==null)return me(),0;if(jr.type==="begin"&&P.type==="end"&&jr.index===P.index&&K===""){if(Ae+=M.slice(P.index,P.index+1),!i){const re=new Error(`0 width match regex (${F})`);throw re.languageName=F,re.badRule=jr.rule,re}return 1}if(jr=P,P.type==="begin")return nt(P);if(P.type==="illegal"&&!H){const re=new Error('Illegal lexeme "'+K+'" for mode "'+(ce.scope||"<unnamed>")+'"');throw re.mode=ce,re}else if(P.type==="end"){const re=xn(P);if(re!==i2)return re}if(P.type==="illegal"&&K==="")return 1;if(Gr>1e5&&Gr>P.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ae+=K,K.length}const _t=D(F);if(!_t)throw sa(a.replace("{}",F)),new Error('Unknown language: "'+F+'"');const Di=YF(_t);let $r="",ce=b||Di;const Wt={},Me=new o.__emitter(o);ur();let Ae="",fr=0,Yt=0,Gr=0,Vr=!1;try{if(_t.__emitTokens)_t.__emitTokens(M,Me);else{for(ce.matcher.considerAll();;){Gr++,Vr?Vr=!1:ce.matcher.considerAll(),ce.matcher.lastIndex=Yt;const I=ce.matcher.exec(M);if(!I)break;const P=M.substring(Yt,I.index),K=wa(P,I);Yt=I.index+K}wa(M.substring(Yt))}return Me.finalize(),$r=Me.toHTML(),{language:F,value:$r,relevance:fr,illegal:!1,_emitter:Me,_top:ce}}catch(I){if(I.message&&I.message.includes("Illegal"))return{language:F,value:Bd(M),illegal:!0,relevance:0,_illegalBy:{message:I.message,index:Yt,context:M.slice(Yt-100,Yt+100),mode:I.mode,resultSoFar:$r},_emitter:Me};if(i)return{language:F,value:Bd(M),illegal:!1,relevance:0,errorRaised:I,_emitter:Me,_top:ce};throw I}}function d(F){const M={value:Bd(F),illegal:!1,relevance:0,_top:s,_emitter:new o.__emitter(o)};return M._emitter.addText(F),M}function h(F,M){M=M||o.languages||Object.keys(t);const H=d(F),b=M.filter(D).filter(B).map(me=>f(me,F,!1));b.unshift(H);const j=b.sort((me,oe)=>{if(me.relevance!==oe.relevance)return oe.relevance-me.relevance;if(me.language&&oe.language){if(D(me.language).supersetOf===oe.language)return 1;if(D(oe.language).supersetOf===me.language)return-1}return 0}),[te,x]=j,pe=te;return pe.secondBest=x,pe}function p(F,M,H){const b=M&&n[M]||H;F.classList.add("hljs"),F.classList.add(`language-${b}`)}function g(F){let M=null;const H=c(F);if(l(H))return;if(q("before:highlightElement",{el:F,language:H}),F.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(F)),o.throwUnescapedHTML))throw new XF("One of your code blocks includes unescaped HTML.",F.innerHTML);M=F;const b=M.textContent,j=H?u(b,{language:H,ignoreIllegals:!0}):h(b);F.innerHTML=j.value,p(F,H,j.language),F.result={language:j.language,re:j.relevance,relevance:j.relevance},j.secondBest&&(F.secondBest={language:j.secondBest.language,relevance:j.secondBest.relevance}),q("after:highlightElement",{el:F,result:j,text:b})}function v(F){o=r2(o,F)}const E=()=>{S(),Ma("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){S(),Ma("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function S(){if(document.readyState==="loading"){y=!0;return}document.querySelectorAll(o.cssSelector).forEach(g)}function w(){y&&S()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",w,!1);function A(F,M){let H=null;try{H=M(e)}catch(b){if(sa("Language definition for '{}' could not be registered.".replace("{}",F)),i)sa(b);else throw b;H=s}H.name||(H.name=F),t[F]=H,H.rawDefinition=M.bind(null,e),H.aliases&&O(H.aliases,{languageName:F})}function N(F){delete t[F];for(const M of Object.keys(n))n[M]===F&&delete n[M]}function R(){return Object.keys(t)}function D(F){return F=(F||"").toLowerCase(),t[F]||t[n[F]]}function O(F,{languageName:M}){typeof F=="string"&&(F=[F]),F.forEach(H=>{n[H.toLowerCase()]=M})}function B(F){const M=D(F);return M&&!M.disableAutodetect}function z(F){F["before:highlightBlock"]&&!F["before:highlightElement"]&&(F["before:highlightElement"]=M=>{F["before:highlightBlock"](Object.assign({block:M.el},M))}),F["after:highlightBlock"]&&!F["after:highlightElement"]&&(F["after:highlightElement"]=M=>{F["after:highlightBlock"](Object.assign({block:M.el},M))})}function Q(F){z(F),r.push(F)}function X(F){const M=r.indexOf(F);M!==-1&&r.splice(M,1)}function q(F,M){const H=F;r.forEach(function(b){b[H]&&b[H](M)})}function ae(F){return Ma("10.7.0","highlightBlock will be removed entirely in v12.0"),Ma("10.7.0","Please use highlightElement now."),g(F)}Object.assign(e,{highlight:u,highlightAuto:h,highlightAll:S,highlightElement:g,highlightBlock:ae,configure:v,initHighlighting:E,initHighlightingOnLoad:T,registerLanguage:A,unregisterLanguage:N,listLanguages:R,getLanguage:D,registerAliases:O,autoDetection:B,inherit:r2,addPlugin:Q,removePlugin:X}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=QF,e.regex={concat:Aa,lookahead:cb,either:m0,optional:dF,anyNumberOfTimes:fF};for(const F in $1)typeof $1[F]=="object"&&ob($1[F]);return Object.assign(e,$1),e},ws=Tb({});ws.newInstance=()=>Tb({});var JF=ws;ws.HighlightJS=ws;ws.default=ws;const Bn=Gn(JF);var yb={exports:{}};(function(e){(function(){var t;t=e.exports=i,t.format=i,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(i.apply(null,arguments))}function r(a,s){return i.apply(null,[a].concat(s))}function i(a){for(var s=1,o=[].slice.call(arguments),l=0,c=a.length,u="",f,d=!1,h,p,g=!1,v,E=function(){return o[s++]},T=function(){for(var y="";/\d/.test(a[l]);)y+=a[l++],f=a[l];return y.length>0?parseInt(y):null};l<c;++l)if(f=a[l],d)switch(d=!1,f=="."?(g=!1,f=a[++l]):f=="0"&&a[l+1]=="."?(g=!0,l+=2,f=a[l]):g=!0,v=T(),f){case"b":u+=parseInt(E(),10).toString(2);break;case"c":h=E(),typeof h=="string"||h instanceof String?u+=h:u+=String.fromCharCode(parseInt(h,10));break;case"d":u+=parseInt(E(),10);break;case"f":p=String(parseFloat(E()).toFixed(v||6)),u+=g?p:p.replace(/^0/,"");break;case"j":u+=JSON.stringify(E());break;case"o":u+="0"+parseInt(E(),10).toString(8);break;case"s":u+=E();break;case"x":u+="0x"+parseInt(E(),10).toString(16);break;case"X":u+="0x"+parseInt(E(),10).toString(16).toUpperCase();break;default:u+=f;break}else f==="%"?d=!0:u+=f;return u}})()})(yb);var eB=yb.exports;const tB=Gn(eB),gc=Object.assign(zi(Error),{eval:zi(EvalError),range:zi(RangeError),reference:zi(ReferenceError),syntax:zi(SyntaxError),type:zi(TypeError),uri:zi(URIError)});function zi(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const i=n&&tB(n,...r);return new e(i)}}const nB={}.hasOwnProperty,rB="hljs-";function _b(e,t,n={}){let r=n.prefix;if(typeof e!="string")throw gc("Expected `string` for name, got `%s`",e);if(!Bn.getLanguage(e))throw gc("Unknown language: `%s` is not registered",e);if(typeof t!="string")throw gc("Expected `string` for value, got `%s`",t);r==null&&(r=rB),Bn.configure({__emitter:cB,classPrefix:r});const i=Bn.highlight(t,{language:e,ignoreIllegals:!0});if(Bn.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}function iB(e,t={}){const n=t.subset||Bn.listLanguages();t.prefix;let r=-1,i={type:"root",data:{language:null,relevance:0},children:[]};if(typeof e!="string")throw gc("Expected `string` for value, got `%s`",e);for(;++r<n.length;){const a=n[r];if(!Bn.getLanguage(a))continue;const s=_b(a,e,t);s.data.relevance>i.data.relevance&&(i=s)}return i}function aB(e,t){Bn.registerLanguage(e,t)}const sB=function(e,t){if(typeof e=="string")Bn.registerAliases(t,{languageName:e});else{let n;for(n in e)nB.call(e,n)&&Bn.registerAliases(e[n],{languageName:n})}};function oB(e){return!!Bn.getLanguage(e)}function lB(){return Bn.listLanguages()}class cB{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=t.split(".").map((a,s)=>s?a+"_".repeat(s):this.options.classPrefix+a),r=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const de={highlight:_b,highlightAuto:iB,registerLanguage:aB,registered:oB,listLanguages:lB,registerAlias:sB};de.registerLanguage("arduino",YP);de.registerLanguage("bash",qP);de.registerLanguage("c",QP);de.registerLanguage("cpp",XP);de.registerLanguage("csharp",ZP);de.registerLanguage("css",aD);de.registerLanguage("diff",sD);de.registerLanguage("go",oD);de.registerLanguage("graphql",lD);de.registerLanguage("ini",cD);de.registerLanguage("java",uD);de.registerLanguage("javascript",pD);de.registerLanguage("json",gD);de.registerLanguage("kotlin",TD);de.registerLanguage("less",AD);de.registerLanguage("lua",ND);de.registerLanguage("makefile",CD);de.registerLanguage("markdown",xD);de.registerLanguage("objectivec",wD);de.registerLanguage("perl",kD);de.registerLanguage("php",OD);de.registerLanguage("php-template",ID);de.registerLanguage("plaintext",RD);de.registerLanguage("python",MD);de.registerLanguage("python-repl",LD);de.registerLanguage("r",PD);de.registerLanguage("ruby",DD);de.registerLanguage("rust",FD);de.registerLanguage("scss",GD);de.registerLanguage("shell",VD);de.registerLanguage("sql",KD);de.registerLanguage("swift",eF);de.registerLanguage("typescript",nF);de.registerLanguage("vbnet",rF);de.registerLanguage("wasm",iF);de.registerLanguage("xml",aF);de.registerLanguage("yaml",sF);const Na=function(e){if(e==null)return E0;if(typeof e=="string")return fB(e);if(typeof e=="object")return uB(e);if(typeof e=="function")return vb(e);throw new Error("Expected function, string, or array as test")};function uB(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Na(e[n]);return vb(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].call(this,...i))return!0;return!1}}function fB(e){return t;function t(n){return E0(n)&&n.tagName===e}}function vb(e){return t;function t(n,...r){return E0(n)&&!!e.call(this,n,...r)}}function E0(e){return!!(e&&typeof e=="object"&&e.type==="element"&&typeof e.tagName=="string")}const a2=function(e,t,n){const r=Vu(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t];return null},s2=/\n/g,o2=/[\t ]+/g,_m=Na("br"),dB=Na("p"),l2=Na(["th","td"]),c2=Na("tr"),hB=Na(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",EB,TB]),bb=Na(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function u2(e,t={}){const n="children"in e?e.children:[],r=bb(e),i=Nb(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1}),a=[];(e.type==="text"||e.type==="comment")&&a.push(...Ab(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)a.push(...Sb(n[s],e,{whitespace:i,breakBefore:s?void 0:r,breakAfter:s<n.length-1?_m(n[s+1]):r}));const o=[];let l;for(s=-1;++s<a.length;){const c=a[s];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&o.push(`
851
851
  `.repeat(l)||" "),l=-1,o.push(c))}return o.join("")}function Sb(e,t,n){return e.type==="element"?mB(e,t,n):e.type==="text"?n.whitespace==="normal"?Ab(e,n):pB(e):[]}function mB(e,t,n){const r=Nb(e,n),i=e.children||[];let a=-1,s=[];if(hB(e))return s;let o,l;for(_m(e)||c2(e)&&a2(t,e,c2)?l=`
852
- `:dB(e)?(o=2,l=2):bb(e)&&(o=1,l=1);++a<i.length;)s=s.concat(Sb(i[a],e,{whitespace:r,breakBefore:a?void 0:o,breakAfter:a<i.length-1?_m(i[a+1]):l}));return l2(e)&&a2(t,e,l2)&&s.push(" "),o&&s.unshift(o),l&&s.push(l),s}function Ab(e,t){const n=String(e.value),r=[],i=[];let a=0;for(;a<=n.length;){s2.lastIndex=a;const l=s2.exec(n),c=l&&"index"in l?l.index:n.length;r.push(gB(n.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),a=c+1}let s=-1,o;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(i.push(r[s]),o=void 0):r[s]?(typeof o=="number"&&i.push(o),i.push(r[s]),o=0):(s===0||s===r.length-1)&&i.push(0);return i}function pB(e){return[String(e.value)]}function gB(e,t,n){const r=[];let i=0,a;for(;i<e.length;){o2.lastIndex=i;const s=o2.exec(e);a=s?s.index:e.length,!i&&!a&&s&&!t&&r.push(""),i!==a&&r.push(e.slice(i,a)),i=s?a+s[0].length:a}return i!==a&&!n&&r.push(""),r.join(" ")}function Nb(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function EB(e){return!!(e.properties||{}).hidden}function TB(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const yB={}.hasOwnProperty;function _B(e={}){const{aliases:t,languages:n,prefix:r,plainText:i,ignoreMissing:a,subset:s,detect:o}=e;let l="hljs";if(t&&de.registerAlias(t),n){let c;for(c in n)yB.call(n,c)&&de.registerLanguage(c,n[c])}if(r){const c=r.indexOf("-");l=c>-1?r.slice(0,c):r}return(c,u)=>{Fl(c,"element",(f,d,h)=>{const p=h;if(!p||!("tagName"in p)||p.tagName!=="pre"||f.tagName!=="code"||!f.properties)return;const g=vB(f);if(g===!1||!g&&!o||g&&i&&i.includes(g))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);let v;try{v=g?de.highlight(g,u2(p),{prefix:r}):de.highlightAuto(u2(p),{prefix:r,subset:s})}catch(E){const T=E;(!a||!/Unknown language/.test(T.message))&&u.fail(T,f,"rehype-highlight:missing-language");return}!g&&v.data.language&&f.properties.className.push("language-"+v.data.language),Array.isArray(v.children)&&v.children.length>0&&(f.children=v.children)})}}function vB(e){const t=e.properties&&e.properties.className;let n=-1;if(Array.isArray(t))for(;++n<t.length;){const r=String(t[n]);if(r==="no-highlight"||r==="nohighlight")return!1;if(r.slice(0,5)==="lang-")return r.slice(5);if(r.slice(0,9)==="language-")return r.slice(9)}}const bB=e=>L.isValidElement(e)&&!!e.props.children,lu=bB,SB=e=>L.isValidElement(e)&&lu(e)&&L.Children.toArray(e.props.children).reduce((t,n)=>t||L.isValidElement(n),!1),zl=SB,Cb=(e,t)=>L.Children.toArray(e).filter(t).map(n=>L.isValidElement(n)&&zl(n)?L.cloneElement(n,{...n.props,children:Cb(n.props.children,t)}):n),xb=Cb,wb=(e,t)=>{let n;return L.Children.toArray(e).find((r,i,a)=>t(r,i,a)?(n=r,!0):L.isValidElement(r)&&zl(r)?(n=wb(r.props.children,t),typeof n<"u"):!1),n},AB=wb,kb=(e,t)=>{L.Children.forEach(e,(n,r)=>{L.isValidElement(n)&&zl(n)&&kb(n.props.children,t),t(n,r)})},NB=kb,Ob=(e,t)=>L.Children.toArray(e).map((n,r,i)=>L.isValidElement(n)&&zl(n)?t(L.cloneElement(n,{...n.props,children:Ob(n.props.children,t)})):t(n,r,i)),CB=Ob,xB=(e,t)=>L.Children.toArray(e).filter(t),wB=xB,kB=e=>L.isValidElement(e)?typeof e.type=="string"?e.type:e.type.name:null,Ib=kB,OB=(e,t=[],n="rest")=>{const r=t.map(i=>typeof i=="string"?i:i.name);return L.Children.toArray(e).reduce((i,a)=>{const s=Ib(a),o=s!==null&&r.includes(s)?s:n;return typeof i[o]>"u"&&(i[o]=[]),i[o]=[...i[o],a],i},{})},IB=OB,f2=e=>typeof e>"u"||e===null||typeof e=="boolean"||JSON.stringify(e)==="{}"?"":e.toString(),Rb=e=>!(e instanceof Array)&&!L.isValidElement(e)?f2(e):L.Children.toArray(e).reduce((t,n)=>{let r="";return L.isValidElement(n)&&lu(n)?r=Rb(n.props.children):L.isValidElement(n)&&!lu(n)?r="":r=f2(n),t.concat(r)},""),Mb=Rb,RB=e=>xb(e,t=>L.isValidElement(t)),MB=RB;({...L.Children});const Lb={target:"languageServer",view:"app",request:"context"},LB={target:"languageServer",view:"app",request:"optIn"},PB={target:"extension",request:"openLink",linkType:"url",link:"https://app.sourcery.ai/dashboard?utm_source=ide_chat&utm_medium=upgrade_button&utm_campaign=private_repo_access"},DB={target:"languageServer",view:"app",request:"authenticate"},FB={target:"languageServer",view:"app",request:"logIn"},BB={target:"languageServer",view:"app",request:"accessDetailsOpened"},UB={target:"languageServer",view:"app",request:"uiState/save",updates:{}},HB={target:"languageServer",view:"chat",request:"initialise"},zB={target:"languageServer",view:"chat",request:"clear"},jB={target:"languageServer",view:"chat",request:"cancel"},$B={target:"languageServer",view:"recipes",request:"initialise"},Pb={target:"languageServer",view:"review",request:"clear"},GB={target:"languageServer",view:"review",request:"cancel"},VB={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!0,configurationTarget:1},KB={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!1,configurationTarget:1},WB={target:"extension",request:"openLink",linkType:"url",link:"https://docs.sourcery.ai",documentRange:null},YB={target:"extension",request:"openLink",linkType:"url",link:"mailto:support@sourcery.ai?subject=Sourcery Assistant Feedback",documentRange:null},na=({message:e})=>{window.sourceryLS.postMessage({message:e})},qB=["className","hljs-addition","hljs-attr","hljs-attribute","hljs-built_in","hljs-bullet","hljs-char","hljs-code","hljs-comment","hljs-deletion","hljs-doctag","hljs-emphasis","hljs-formula","hljs-keyword","hljs-link","hljs-literal","hljs-meta","hljs-name","hljs-number","hljs-operator","hljs-params","hljs-property","hljs-punctuation","hljs-quote","hljs-regexp","hljs-section","hljs-selector-attr","hljs-selector-class","hljs-selector-id","hljs-selector-pseudo","hljs-selector-tag","hljs-string","hljs-strong","hljs-subst","hljs-symbol","hljs-tag","hljs-template-tag","hljs-template-variable","hljs-title","hljs-type","hljs-variable"],QB=({copyValue:e})=>{const[t,n]=L.useState(!1);return _.jsx("button",{title:"Copy to clipboard",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{na({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(_e.Check,{}):_.jsx(_e.Copy,{})})},XB=({copyValue:e})=>_.jsx("button",{title:"Insert at cursor",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>na({message:{target:"extension",request:"insertAtCursor",content:e}}),children:_.jsx(_e.FileExport,{})}),ZB=({onApplyFix:e})=>_.jsx("button",{title:"Apply fix",className:"flex h-7 flex-row items-center justify-center gap-1 bg-ide-editor-bg px-2 py-1 hover:bg-ide-chat-input-bg",onClick:()=>e(),children:_.jsx(_e.FileExport,{})}),JB=({inline:e=!1,className:t,children:n,hideCodeButtons:r,onApplyFix:i})=>{const a=Mb(n);return e?_.jsx("code",{className:t,children:n}):_.jsxs("div",{className:"group relative",children:[_.jsx("pre",{className:$e(t,"border-ide-border bg-ide-editor-bg my-4 overflow-x-auto rounded border px-4 py-3"),children:_.jsx("code",{className:t,children:n})}),(i||!r)&&_.jsx("div",{className:"invisible absolute right-3 top-3 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:i?_.jsx(ZB,{onApplyFix:i}):_.jsxs(_.Fragment,{children:[_.jsx(QB,{copyValue:a}),_.jsx(XB,{copyValue:a})]})})]})},is=({markdown:e,hideCodeButtons:t,onApplyFix:n})=>{var r,i;return _.jsx(Kv,{remarkPlugins:[tR],rehypePlugins:[PP,[_B,{ignoreMissing:!0}],[KP,{protocols:{...rs.protocols,href:[...((r=rs.protocols)==null?void 0:r.src)||[],"file"]},attributes:{...rs.attributes,span:[...((i=rs.attributes)==null?void 0:i.span)||[],qB]}}]],transformLinkUri:a=>a.startsWith("https")||a.startsWith("file")||a==="VALID_FILE"||a==="VALID_FILE_WITH_LINE_NUMBER"||a==="VALID_DIRECTORY"?a:"",components:{h1({children:a}){return _.jsx("h1",{className:"mb-2 mt-6 text-lg font-bold first:mt-0 last:mb-0",children:a})},h2({children:a}){return _.jsx("h2",{className:"mt-2 font-bold first:mt-0",children:a})},h3({children:a}){return _.jsx("h3",{className:"mt-2 font-bold first:mt-0",children:a})},h4({children:a}){return _.jsx("h4",{className:"mt-2 font-bold first:mt-0",children:a})},h5({children:a}){return _.jsx("h5",{className:"mt-2 font-bold first:mt-0",children:a})},h6({children:a}){return _.jsx("h6",{className:"mt-2 font-bold first:mt-0",children:a})},ul({children:a}){return _.jsx("ul",{className:"list-disc pl-5",children:a})},ol({children:a}){return _.jsx("ol",{className:"list-disc pl-5",children:a})},p({children:a}){return _.jsx("p",{className:"mt-2 first:mt-0",children:a})},code(a){return _.jsx(JB,{...a,hideCodeButtons:t,onApplyFix:n})},a({href:a,children:s}){if(!a)return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Missing link]"});if(a.startsWith("https"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>na({message:{target:"extension",request:"openLink",link:a,linkType:"url",documentRange:null}}),children:s});if(a.startsWith("file"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>na({message:{target:"extension",request:"openLink",linkType:"file",link:a.slice(7),documentRange:null}}),children:s});if(a==="VALID_FILE"||a==="VALID_FILE_WITH_LINE_NUMBER"){const o=String(s).replace(/\n$/,""),[l,c]=o.split(":"),u=parseInt(c,10)-1,f=isNaN(u)?null:{start:{line:u,character:0},end:{line:u,character:0}};return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:d=>{d.preventDefault(),na({message:{target:"extension",request:"openLink",link:l,linkType:"file",documentRange:f}})},children:s})}if(a==="VALID_DIRECTORY"){const o=String(s).replace(/\n$/,"");return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:l=>{l.preventDefault(),na({message:{target:"extension",request:"openLink",link:o,linkType:"directory",documentRange:null}})},children:s})}return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Invalid link]"})}},children:e})},Db=()=>_.jsxs("div",{className:"flex h-[1.5rem] flex-row items-center gap-1",children:[_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.2s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.4s"}})]}),Fb=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mf=L.createContext({}),T0=L.createContext(null),pf=typeof document<"u",eU=pf?L.useLayoutEffect:L.useEffect,Bb=L.createContext({strict:!1});function tU(e,t,n,r){const{visualElement:i}=L.useContext(mf),a=L.useContext(Bb),s=L.useContext(T0),o=L.useContext(Fb).reducedMotion,l=L.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:o}));const c=l.current;L.useInsertionEffect(()=>{c&&c.update(n,s)});const u=L.useRef(!!window.HandoffAppearAnimations);return eU(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),L.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,u.current=!1)}),c}function as(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nU(e,t,n){return L.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):as(n)&&(n.current=r))},[t])}function _l(e){return typeof e=="string"||Array.isArray(e)}function gf(e){return typeof e=="object"&&typeof e.start=="function"}const y0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_0=["initial",...y0];function Ef(e){return gf(e.animate)||_0.some(t=>_l(e[t]))}function Ub(e){return!!(Ef(e)||e.variants)}function rU(e,t){if(Ef(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_l(n)?n:void 0,animate:_l(r)?r:void 0}}return e.inherit!==!1?t:{}}function iU(e){const{initial:t,animate:n}=rU(e,L.useContext(mf));return L.useMemo(()=>({initial:t,animate:n}),[d2(t),d2(n)])}function d2(e){return Array.isArray(e)?e.join(" "):e}const h2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vl={};for(const e in h2)vl[e]={isEnabled:t=>h2[e].some(n=>!!t[n])};function aU(e){for(const t in e)vl[t]={...vl[t],...e[t]}}const Hb=L.createContext({}),zb=L.createContext({}),sU=Symbol.for("motionComponentSymbol");function oU({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&aU(e);function a(o,l){let c;const u={...L.useContext(Fb),...o,layoutId:lU(o)},{isStatic:f}=u,d=iU(o),h=r(o,f);if(!f&&pf){d.visualElement=tU(i,h,u,t);const p=L.useContext(zb),g=L.useContext(Bb).strict;d.visualElement&&(c=d.visualElement.loadFeatures(u,g,e,p))}return L.createElement(mf.Provider,{value:d},c&&d.visualElement?L.createElement(c,{visualElement:d.visualElement,...u}):null,n(i,o,nU(h,d.visualElement,l),h,f,d.visualElement))}const s=L.forwardRef(a);return s[sU]=i,s}function lU({layoutId:e}){const t=L.useContext(Hb).id;return t&&e!==void 0?t+"-"+e:e}function cU(e){function t(r,i={}){return oU(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const uU=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function v0(e){return typeof e!="string"||e.includes("-")?!1:!!(uU.indexOf(e)>-1||/[A-Z]/.test(e))}const cu={};function fU(e){Object.assign(cu,e)}const jl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ca=new Set(jl);function jb(e,{layout:t,layoutId:n}){return Ca.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!cu[e]||e==="opacity")}const Vt=e=>!!(e&&e.getVelocity),dU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hU=jl.length;function mU(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let s=0;s<hU;s++){const o=jl[s];if(e[o]!==void 0){const l=dU[o]||o;a+=`${l}(${e[o]}) `}}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}const $b=e=>t=>typeof t=="string"&&t.startsWith(e),Gb=$b("--"),vm=$b("var(--"),pU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,gU=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xi=(e,t,n)=>Math.min(Math.max(n,e),t),xa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ho={...xa,transform:e=>xi(0,1,e)},G1={...xa,default:1},zo=e=>Math.round(e*1e5)/1e5,Tf=/(-)?([\d]*\.?[\d])+/g,Vb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,EU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $l(e){return typeof e=="string"}const Gl=e=>({test:t=>$l(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ti=Gl("deg"),sr=Gl("%"),le=Gl("px"),TU=Gl("vh"),yU=Gl("vw"),m2={...sr,parse:e=>sr.parse(e)/100,transform:e=>sr.transform(e*100)},p2={...xa,transform:Math.round},Kb={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,size:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,rotate:ti,rotateX:ti,rotateY:ti,rotateZ:ti,scale:G1,scaleX:G1,scaleY:G1,scaleZ:G1,skew:ti,skewX:ti,skewY:ti,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Ho,originX:m2,originY:m2,originZ:le,zIndex:p2,fillOpacity:Ho,strokeOpacity:Ho,numOctaves:p2};function b0(e,t,n,r){const{style:i,vars:a,transform:s,transformOrigin:o}=e;let l=!1,c=!1,u=!0;for(const f in t){const d=t[f];if(Gb(f)){a[f]=d;continue}const h=Kb[f],p=gU(d,h);if(Ca.has(f)){if(l=!0,s[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,o[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=mU(e.transform,n,u,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:h=0}=o;i.transformOrigin=`${f} ${d} ${h}`}}const S0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wb(e,t,n){for(const r in t)!Vt(t[r])&&!jb(r,n)&&(e[r]=t[r])}function _U({transformTemplate:e},t,n){return L.useMemo(()=>{const r=S0();return b0(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function vU(e,t,n){const r=e.style||{},i={};return Wb(i,r,e),Object.assign(i,_U(e,t,n)),e.transformValues?e.transformValues(i):i}function bU(e,t,n){const r={},i=vU(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const SU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||SU.has(e)}let Yb=e=>!uu(e);function AU(e){e&&(Yb=t=>t.startsWith("on")?!uu(t):e(t))}try{AU(require("@emotion/is-prop-valid").default)}catch{}function NU(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Yb(i)||n===!0&&uu(i)||!t&&!uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function g2(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function CU(e,t,n){const r=g2(t,e.x,e.width),i=g2(n,e.y,e.height);return`${r} ${i}`}const xU={offset:"stroke-dashoffset",array:"stroke-dasharray"},wU={offset:"strokeDashoffset",array:"strokeDasharray"};function kU(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?xU:wU;e[a.offset]=le.transform(-r);const s=le.transform(t),o=le.transform(n);e[a.array]=`${s} ${o}`}function A0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},u,f,d){if(b0(e,c,u,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=CU(g,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&kU(h,s,o,l,!1)}const qb=()=>({...S0(),attrs:{}}),N0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function OU(e,t,n,r){const i=L.useMemo(()=>{const a=qb();return A0(a,t,{enableHardwareAcceleration:!1},N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Wb(a,e.style,e),i.style={...a,...i.style}}return i}function IU(e=!1){return(n,r,i,{latestValues:a},s)=>{const l=(v0(n)?OU:bU)(r,a,s,n),u={...NU(r,typeof n=="string",e),...l,ref:i},{children:f}=r,d=L.useMemo(()=>Vt(f)?f.get():f,[f]);return L.createElement(n,{...u,children:d})}}const C0=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Qb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Xb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Zb(e,t,n,r){Qb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xb.has(i)?i:C0(i),t.attrs[i])}function x0(e,t){const{style:n}=e,r={};for(const i in n)(Vt(n[i])||t.style&&Vt(t.style[i])||jb(i,e))&&(r[i]=n[i]);return r}function Jb(e,t){const n=x0(e,t);for(const r in e)if(Vt(e[r])||Vt(t[r])){const i=jl.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function w0(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function RU(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const fu=e=>Array.isArray(e),MU=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),LU=e=>fu(e)?e[e.length-1]||0:e;function Ec(e){const t=Vt(e)?e.get():e;return MU(t)?t.toValue():t}function PU({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const s={latestValues:DU(r,i,a,e),renderState:t()};return n&&(s.mount=o=>n(r,o,s)),s}const e3=e=>(t,n)=>{const r=L.useContext(mf),i=L.useContext(T0),a=()=>PU(e,t,r,i);return n?a():RU(a)};function DU(e,t,n,r){const i={},a=r(e,{});for(const d in a)i[d]=Ec(a[d]);let{initial:s,animate:o}=e;const l=Ef(e),c=Ub(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?o:s;return f&&typeof f!="boolean"&&!gf(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=w0(e,h);if(!p)return;const{transitionEnd:g,transition:v,...E}=p;for(const T in E){let y=E[T];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(i[T]=y)}for(const T in g)i[T]=g[T]}),i}const Ze=e=>e;function FU(e){let t=[],n=[],r=0,i=!1,a=!1;const s=new WeakSet,o={schedule:(l,c=!1,u=!1)=>{const f=u&&i,d=f?t:n;return c&&s.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),s.delete(l)},process:l=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const u=t[c];u(l),s.has(u)&&(o.schedule(u),e())}i=!1,a&&(a=!1,o.process(l))}};return o}const V1=["prepare","read","update","preRender","render","postRender"],BU=40;function UU(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=V1.reduce((f,d)=>(f[d]=FU(()=>n=!0),f),{}),s=f=>a[f].process(i),o=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,BU),1),i.timestamp=f,i.isProcessing=!0,V1.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(o))},l=()=>{n=!0,r=!0,i.isProcessing||e(o)};return{schedule:V1.reduce((f,d)=>{const h=a[d];return f[d]=(p,g=!1,v=!1)=>(n||l(),h.schedule(p,g,v)),f},{}),cancel:f=>V1.forEach(d=>a[d].cancel(f)),state:i,steps:a}}const{schedule:He,cancel:Dr,state:St,steps:Ud}=UU(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),HU={useVisualState:e3({scrapeMotionValuesFromProps:Jb,createRenderState:qb,onMount:(e,t,{renderState:n,latestValues:r})=>{He.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),He.render(()=>{A0(n,r,{enableHardwareAcceleration:!1},N0(t.tagName),e.transformTemplate),Zb(t,n)})}})},zU={useVisualState:e3({scrapeMotionValuesFromProps:x0,createRenderState:S0})};function jU(e,{forwardMotionProps:t=!1},n,r){return{...v0(e)?HU:zU,preloadedFeatures:n,useRender:IU(t),createVisualElement:r,Component:e}}function Ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const t3=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function yf(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const $U=e=>t=>t3(t)&&e(t,yf(t));function Cr(e,t,n,r){return Ar(e,t,$U(n),r)}const GU=(e,t)=>n=>t(e(n)),_i=(...e)=>e.reduce(GU);function n3(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const E2=n3("dragHorizontal"),T2=n3("dragVertical");function r3(e){let t=!1;if(e==="y")t=T2();else if(e==="x")t=E2();else{const n=E2(),r=T2();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function i3(){const e=r3(!0);return e?(e(),!1):!0}class Li{constructor(t){this.isMounted=!1,this.node=t}update(){}}function y2(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,s)=>{if(a.type==="touch"||i3())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t),o[r]&&He.update(()=>o[r](a,s))};return Cr(e.current,n,i,{passive:!e.getProps()[r]})}class VU extends Li{mount(){this.unmount=_i(y2(this.node,!0),y2(this.node,!1))}unmount(){}}class KU extends Li{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_i(Ar(this.node.current,"focus",()=>this.onFocus()),Ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const a3=(e,t)=>t?e===t?!0:a3(e,t.parentElement):!1;function Hd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,yf(n))}class WU extends Li{constructor(){super(...arguments),this.removeStartListeners=Ze,this.removeEndListeners=Ze,this.removeAccessibleListeners=Ze,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=Cr(window,"pointerup",(o,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u}=this.node.getProps();He.update(()=>{a3(this.node.current,o.target)?c&&c(o,l):u&&u(o,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Cr(window,"pointercancel",(o,l)=>this.cancelPress(o,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_i(a,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const s=o=>{o.key!=="Enter"||!this.checkPressEnd()||Hd("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&He.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Ar(this.node.current,"keyup",s),Hd("down",(o,l)=>{this.startPress(o,l)})},n=Ar(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hd("cancel",(a,s)=>this.cancelPress(a,s))},i=Ar(this.node.current,"blur",r);this.removeAccessibleListeners=_i(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&He.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!i3()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&He.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Cr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ar(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_i(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const bm=new WeakMap,zd=new WeakMap,YU=e=>{const t=bm.get(e.target);t&&t(e)},qU=e=>{e.forEach(YU)};function QU({root:e,...t}){const n=e||document;zd.has(n)||zd.set(n,{});const r=zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(qU,{root:e,...t})),r[i]}function XU(e,t,n){const r=QU(t);return bm.set(e,n),r.observe(e),()=>{bm.delete(e),r.unobserve(e)}}const ZU={some:0,all:1};class JU extends Li{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZU[i]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return XU(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(eH(t,n))&&this.startObserver()}unmount(){}}function eH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tH={inView:{Feature:JU},tap:{Feature:WU},focus:{Feature:KU},hover:{Feature:VU}};function s3(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function nH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function rH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function _f(e,t,n){const r=e.getProps();return w0(r,t,n!==void 0?n:r.custom,nH(e),rH(e))}const iH="framerAppearId",aH="data-"+C0(iH);let sH=Ze,k0=Ze;const vi=e=>e*1e3,xr=e=>e/1e3,oH={current:!1},o3=e=>Array.isArray(e)&&typeof e[0]=="number";function l3(e){return!!(!e||typeof e=="string"&&c3[e]||o3(e)||Array.isArray(e)&&e.every(l3))}const _o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function u3(e){if(e)return o3(e)?_o(e):Array.isArray(e)?e.map(u3):c3[e]}function lH(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:s="loop",ease:o,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=u3(o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"})}function cH(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const f3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uH=1e-7,fH=12;function dH(e,t,n,r,i){let a,s,o=0;do s=t+(n-t)/2,a=f3(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>uH&&++o<fH);return s}function Vl(e,t,n,r){if(e===t&&n===r)return Ze;const i=a=>dH(a,0,1,e,n);return a=>a===0||a===1?a:f3(i(a),t,r)}const hH=Vl(.42,0,1,1),mH=Vl(0,0,.58,1),d3=Vl(.42,0,.58,1),pH=e=>Array.isArray(e)&&typeof e[0]!="number",h3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,m3=e=>t=>1-e(1-t),p3=e=>1-Math.sin(Math.acos(e)),O0=m3(p3),gH=h3(O0),g3=Vl(.33,1.53,.69,.99),I0=m3(g3),EH=h3(I0),TH=e=>(e*=2)<1?.5*I0(e):.5*(2-Math.pow(2,-10*(e-1))),yH={linear:Ze,easeIn:hH,easeInOut:d3,easeOut:mH,circIn:p3,circInOut:gH,circOut:O0,backIn:I0,backInOut:EH,backOut:g3,anticipate:TH},_2=e=>{if(Array.isArray(e)){k0(e.length===4);const[t,n,r,i]=e;return Vl(t,n,r,i)}else if(typeof e=="string")return yH[e];return e},R0=(e,t)=>n=>!!($l(n)&&EU.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),E3=(e,t,n)=>r=>{if(!$l(r))return r;const[i,a,s,o]=r.match(Tf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},_H=e=>xi(0,255,e),jd={...xa,transform:e=>Math.round(_H(e))},ra={test:R0("rgb","red"),parse:E3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jd.transform(e)+", "+jd.transform(t)+", "+jd.transform(n)+", "+zo(Ho.transform(r))+")"};function vH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Sm={test:R0("#"),parse:vH,transform:ra.transform},ss={test:R0("hsl","hue"),parse:E3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sr.transform(zo(t))+", "+sr.transform(zo(n))+", "+zo(Ho.transform(r))+")"},wt={test:e=>ra.test(e)||Sm.test(e)||ss.test(e),parse:e=>ra.test(e)?ra.parse(e):ss.test(e)?ss.parse(e):Sm.parse(e),transform:e=>$l(e)?e:e.hasOwnProperty("red")?ra.transform(e):ss.transform(e)},Ke=(e,t,n)=>-n*e+n*t+e;function $d(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;i=$d(l,o,e+1/3),a=$d(l,o,e),s=$d(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}const Gd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},SH=[Sm,ra,ss],AH=e=>SH.find(t=>t.test(e));function v2(e){const t=AH(e);let n=t.parse(e);return t===ss&&(n=bH(n)),n}const T3=(e,t)=>{const n=v2(e),r=v2(t),i={...n};return a=>(i.red=Gd(n.red,r.red,a),i.green=Gd(n.green,r.green,a),i.blue=Gd(n.blue,r.blue,a),i.alpha=Ke(n.alpha,r.alpha,a),ra.transform(i))};function NH(e){var t,n;return isNaN(e)&&$l(e)&&(((t=e.match(Tf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Vb))===null||n===void 0?void 0:n.length)||0)>0}const y3={regex:pU,countKey:"Vars",token:"${v}",parse:Ze},_3={regex:Vb,countKey:"Colors",token:"${c}",parse:wt.parse},v3={regex:Tf,countKey:"Numbers",token:"${n}",parse:xa.parse};function Vd(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function du(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Vd(n,y3),Vd(n,_3),Vd(n,v3),n}function b3(e){return du(e).values}function S3(e){const{values:t,numColors:n,numVars:r,tokenised:i}=du(e),a=t.length;return s=>{let o=i;for(let l=0;l<a;l++)l<r?o=o.replace(y3.token,s[l]):l<r+n?o=o.replace(_3.token,wt.transform(s[l])):o=o.replace(v3.token,zo(s[l]));return o}}const CH=e=>typeof e=="number"?0:e;function xH(e){const t=b3(e);return S3(e)(t.map(CH))}const wi={test:NH,parse:b3,createTransformer:S3,getAnimatableNone:xH},A3=(e,t)=>n=>`${n>0?t:e}`;function N3(e,t){return typeof e=="number"?n=>Ke(e,t,n):wt.test(e)?T3(e,t):e.startsWith("var(")?A3(e,t):x3(e,t)}const C3=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,s)=>N3(a,t[s]));return a=>{for(let s=0;s<r;s++)n[s]=i[s](a);return n}},wH=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=N3(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},x3=(e,t)=>{const n=wi.createTransformer(t),r=du(e),i=du(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_i(C3(r.values,i.values),n):A3(e,t)},bl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},b2=(e,t)=>n=>Ke(e,t,n);function kH(e){return typeof e=="number"?b2:typeof e=="string"?wt.test(e)?T3:x3:Array.isArray(e)?C3:typeof e=="object"?wH:b2}function OH(e,t,n){const r=[],i=n||kH(e[0]),a=e.length-1;for(let s=0;s<a;s++){let o=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Ze:t;o=_i(l,o)}r.push(o)}return r}function w3(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(k0(a===t.length),a===1)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=OH(t,r,i),o=s.length,l=c=>{let u=0;if(o>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=bl(e[u],e[u+1],c);return s[u](f)};return n?c=>l(xi(e[0],e[a-1],c)):l}function IH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=bl(0,t,r);e.push(Ke(n,1,i))}}function RH(e){const t=[0];return IH(t,e.length-1),t}function MH(e,t){return e.map(n=>n*t)}function LH(e,t){return e.map(()=>t||d3).splice(0,e.length-1)}function hu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=pH(r)?r.map(_2):_2(r),a={done:!1,value:t[0]},s=MH(n&&n.length===t.length?n:RH(t),e),o=w3(s,t,{ease:Array.isArray(i)?i:LH(t,i)});return{calculatedDuration:e,next:l=>(a.value=o(l),a.done=l>=e,a)}}function k3(e,t){return t?e*(1e3/t):0}const PH=5;function O3(e,t,n){const r=Math.max(t-PH,0);return k3(n-e(r),t-r)}const Kd=.001,DH=.01,S2=10,FH=.05,BH=1;function UH({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;sH(e<=vi(S2));let s=1-t;s=xi(FH,BH,s),e=xi(DH,S2,xr(e)),s<1?(i=c=>{const u=c*s,f=u*e,d=u-n,h=Am(c,s),p=Math.exp(-f);return Kd-d/h*p},a=c=>{const f=c*s*e,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-f),g=Am(Math.pow(c,2),s);return(-i(c)+Kd>0?-1:1)*((d-h)*p)/g}):(i=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Kd+u*f},a=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const o=5/e,l=zH(i,a,o);if(e=vi(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const HH=12;function zH(e,t,n){let r=n;for(let i=1;i<HH;i++)r=r-e(r)/t(r);return r}function Am(e,t){return e*Math.sqrt(1-t*t)}const jH=["duration","bounce"],$H=["stiffness","damping","mass"];function A2(e,t){return t.some(n=>e[n]!==void 0)}function GH(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!A2(e,$H)&&A2(e,jH)){const n=UH(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function I3({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],s={done:!1,value:i},{stiffness:o,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=GH(r),h=u?-xr(u):0,p=l/(2*Math.sqrt(o*c)),g=a-i,v=xr(Math.sqrt(o/c)),E=Math.abs(g)<5;n||(n=E?.01:2),t||(t=E?.005:.5);let T;if(p<1){const y=Am(v,p);T=S=>{const w=Math.exp(-p*v*S);return a-w*((h+p*v*g)/y*Math.sin(y*S)+g*Math.cos(y*S))}}else if(p===1)T=y=>a-Math.exp(-v*y)*(g+(h+v*g)*y);else{const y=v*Math.sqrt(p*p-1);T=S=>{const w=Math.exp(-p*v*S),A=Math.min(y*S,300);return a-w*((h+p*v*g)*Math.sinh(A)+y*g*Math.cosh(A))/y}}return{calculatedDuration:d&&f||null,next:y=>{const S=T(y);if(d)s.done=y>=f;else{let w=h;y!==0&&(p<1?w=O3(T,y,S):w=0);const A=Math.abs(w)<=n,N=Math.abs(a-S)<=t;s.done=A&&N}return s.value=s.done?a:S,s}}}function N2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=R=>o!==void 0&&R<o||l!==void 0&&R>l,p=R=>o===void 0?l:l===void 0||Math.abs(o-R)<Math.abs(l-R)?o:l;let g=n*t;const v=f+g,E=s===void 0?v:s(v);E!==v&&(g=E-f);const T=R=>-g*Math.exp(-R/r),y=R=>E+T(R),S=R=>{const D=T(R),O=y(R);d.done=Math.abs(D)<=c,d.value=d.done?E:O};let w,A;const N=R=>{h(d.value)&&(w=R,A=I3({keyframes:[d.value,p(d.value)],velocity:O3(y,R,d.value),damping:i,stiffness:a,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:R=>{let D=!1;return!A&&w===void 0&&(D=!0,S(R),N(R)),w!==void 0&&R>w?A.next(R-w):(!D&&S(R),d)}}}const VH=e=>{const t=({timestamp:n})=>e(n);return{start:()=>He.update(t,!0),stop:()=>Dr(t),now:()=>St.isProcessing?St.timestamp:performance.now()}},C2=2e4;function x2(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<C2;)t+=n,r=e.next(t);return t>=C2?1/0:t}const KH={decay:N2,inertia:N2,tween:hu,keyframes:hu,spring:I3};function mu({autoplay:e=!0,delay:t=0,driver:n=VH,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:o="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:f,...d}){let h=1,p=!1,g,v;const E=()=>{v=new Promise(j=>{g=j})};E();let T;const y=KH[i]||hu;let S;y!==hu&&typeof r[0]!="number"&&(S=w3([0,100],r,{clamp:!1}),r=[0,100]);const w=y({...d,keyframes:r});let A;o==="mirror"&&(A=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let N="idle",R=null,D=null,O=null;w.calculatedDuration===null&&a&&(w.calculatedDuration=x2(w));const{calculatedDuration:B}=w;let z=1/0,Q=1/0;B!==null&&(z=B+s,Q=z*(a+1)-s);let X=0;const q=j=>{if(D===null)return;h>0&&(D=Math.min(D,j)),h<0&&(D=Math.min(j-Q/h,D)),R!==null?X=R:X=Math.round(j-D)*h;const te=X-t*(h>=0?1:-1),x=h>=0?te<0:te>Q;X=Math.max(te,0),N==="finished"&&R===null&&(X=Q);let pe=X,me=w;if(a){const fe=X/z;let ut=Math.floor(fe),nt=fe%1;!nt&&fe>=1&&(nt=1),nt===1&&ut--,ut=Math.min(ut,a+1);const xn=!!(ut%2);xn&&(o==="reverse"?(nt=1-nt,s&&(nt-=s/z)):o==="mirror"&&(me=A));let ur=xi(0,1,nt);X>Q&&(ur=o==="reverse"&&xn?1:0),pe=ur*z}const oe=x?{done:!1,value:r[0]}:me.next(pe);S&&(oe.value=S(oe.value));let{done:ze}=oe;!x&&B!==null&&(ze=h>=0?X>=Q:X<=0);const Ge=R===null&&(N==="finished"||N==="running"&&ze);return f&&f(oe.value),Ge&&M(),oe},ae=()=>{T&&T.stop(),T=void 0},F=()=>{N="idle",ae(),g(),E(),D=O=null},M=()=>{N="finished",u&&u(),ae(),g()},H=()=>{if(p)return;T||(T=n(q));const j=T.now();l&&l(),R!==null?D=j-R:(!D||N==="finished")&&(D=j),N==="finished"&&E(),O=D,R=null,N="running",T.start()};e&&H();const b={then(j,te){return v.then(j,te)},get time(){return xr(X)},set time(j){j=vi(j),X=j,R!==null||!T||h===0?R=j:D=T.now()-j/h},get duration(){const j=w.calculatedDuration===null?x2(w):w.calculatedDuration;return xr(j)},get speed(){return h},set speed(j){j===h||!T||(h=j,b.time=xr(X))},get state(){return N},play:H,pause:()=>{N="paused",R=X},stop:()=>{p=!0,N!=="idle"&&(N="idle",c&&c(),F())},cancel:()=>{O!==null&&q(O),F()},complete:()=>{N="finished"},sample:j=>(D=0,q(j))};return b}function WH(e){let t;return()=>(t===void 0&&(t=e()),t)}const YH=WH(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qH=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),K1=10,QH=2e4,XH=(e,t)=>t.type==="spring"||e==="backgroundColor"||!l3(t.ease);function ZH(e,t,{onUpdate:n,onComplete:r,...i}){if(!(YH()&&qH.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,o,l;const c=()=>{l=new Promise(T=>{o=T})};c();let{keyframes:u,duration:f=300,ease:d,times:h}=i;if(XH(t,i)){const T=mu({...i,repeat:0,delay:0});let y={done:!1,value:u[0]};const S=[];let w=0;for(;!y.done&&w<QH;)y=T.sample(w),S.push(y.value),w+=K1;h=void 0,u=S,f=w-K1,d="linear"}const p=lH(e.owner.current,t,u,{...i,duration:f,ease:d,times:h}),g=()=>p.cancel(),v=()=>{He.update(g),o(),c()};return p.onfinish=()=>{e.set(cH(u,i)),r&&r(),v()},{then(T,y){return l.then(T,y)},attachTimeline(T){return p.timeline=T,p.onfinish=null,Ze},get time(){return xr(p.currentTime||0)},set time(T){p.currentTime=vi(T)},get speed(){return p.playbackRate},set speed(T){p.playbackRate=T},get duration(){return xr(f)},play:()=>{s||(p.play(),Dr(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:T}=p;if(T){const y=mu({...i,autoplay:!1});e.setWithVelocity(y.sample(T-K1).value,y.sample(T).value,K1)}v()},complete:()=>p.finish(),cancel:v}}function JH({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ze,pause:Ze,stop:Ze,then:a=>(a(),Promise.resolve()),cancel:Ze,complete:Ze});return t?mu({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const ez={type:"spring",stiffness:500,damping:25,restSpeed:10},tz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nz={type:"keyframes",duration:.8},rz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iz=(e,{keyframes:t})=>t.length>2?nz:Ca.has(e)?e.startsWith("scale")?tz(t[1]):ez:rz,Nm=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wi.test(t)||t==="0")&&!t.startsWith("url(")),az=new Set(["brightness","contrast","saturate","opacity"]);function sz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tf)||[];if(!r)return e;const i=n.replace(r,"");let a=az.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const oz=/([a-z-]*)\(.*?\)/g,Cm={...wi,getAnimatableNone:e=>{const t=e.match(oz);return t?t.map(sz).join(" "):e}},lz={...Kb,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Cm,WebkitFilter:Cm},M0=e=>lz[e];function R3(e,t){let n=M0(e);return n!==Cm&&(n=wi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const M3=e=>/^0[^.\s]+$/.test(e);function cz(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||M3(e)}function uz(e,t,n,r){const i=Nm(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const s=r.from!==void 0?r.from:e.get();let o;const l=[];for(let c=0;c<a.length;c++)a[c]===null&&(a[c]=c===0?s:a[c-1]),cz(a[c])&&l.push(c),typeof a[c]=="string"&&a[c]!=="none"&&a[c]!=="0"&&(o=a[c]);if(i&&l.length&&o)for(let c=0;c<l.length;c++){const u=l[c];a[u]=R3(t,o)}return a}function fz({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function L3(e,t){return e[t]||e.default||e}const L0=(e,t,n,r={})=>i=>{const a=L3(r,e)||{},s=a.delay||r.delay||0;let{elapsed:o=0}=r;o=o-vi(s);const l=uz(t,e,n,a),c=l[0],u=l[l.length-1],f=Nm(e,c),d=Nm(e,u);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-o,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(fz(a)||(h={...h,...iz(e,h)}),h.duration&&(h.duration=vi(h.duration)),h.repeatDelay&&(h.repeatDelay=vi(h.repeatDelay)),!f||!d||oH.current||a.type===!1)return JH(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=ZH(t,e,h);if(p)return p}return mu(h)};function pu(e){return!!(Vt(e)&&e.add)}const P3=e=>/^\-?\d*\.?\d+$/.test(e);function P0(e,t){e.indexOf(t)===-1&&e.push(t)}function D0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class F0{constructor(){this.subscriptions=[]}add(t){return P0(this.subscriptions,t),()=>D0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const dz=e=>!isNaN(parseFloat(e));class hz{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:s}=St;this.lastUpdated!==s&&(this.timeDelta=a,this.lastUpdated=s,He.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>He.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=dz(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new F0);const r=this.events[t].add(n);return t==="change"?()=>{r(),He.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?k3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ks(e,t){return new hz(e,t)}const D3=e=>t=>t.test(e),mz={test:e=>e==="auto",parse:e=>e},F3=[xa,le,sr,ti,yU,TU,mz],co=e=>F3.find(D3(e)),pz=[...F3,wt,wi],gz=e=>pz.find(D3(e));function Ez(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ks(n))}function Tz(e,t){const n=_f(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const s in a){const o=LU(a[s]);Ez(e,s,o)}}function yz(e,t,n){var r,i;const a=Object.keys(t).filter(o=>!e.hasValue(o)),s=a.length;if(s)for(let o=0;o<s;o++){const l=a[o],c=t[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),u!=null&&(typeof u=="string"&&(P3(u)||M3(u))?u=parseFloat(u):!gz(u)&&wi.test(c)&&(u=R3(l,c)),e.addValue(l,ks(u,{owner:e})),n[l]===void 0&&(n[l]=u),u!==null&&e.setBaseTarget(l,u))}}function _z(e,t){return t?(t[e]||t.default||t).from:void 0}function vz(e,t,n){const r={};for(const i in e){const a=_z(i,t);if(a!==void 0)r[i]=a;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function bz({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function B3(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(a=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const d=e.getValue(f),h=o[f];if(!d||h===void 0||u&&bz(u,f))continue;const p={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!d.hasAnimated){const v=e.getProps()[aH];v&&(p.elapsed=window.HandoffAppearAnimations(v,f,d,He))}d.start(L0(f,d,h,e.shouldReduceMotion&&Ca.has(f)?{type:!1}:p));const g=d.animation;pu(l)&&(l.add(f),g.then(()=>l.remove(f))),c.push(g)}return s&&Promise.all(c).then(()=>{s&&Tz(e,s)}),c}function xm(e,t,n={}){const r=_f(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(B3(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Sz(e,t,c+l,u,f,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[l,c]=o==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function Sz(e,t,n=0,r=0,i=1,a){const s=[],o=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(Az).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(xm(c,t,{...a,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function Az(e,t){return e.sortNodePosition(t)}function Nz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>xm(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=xm(e,t,n);else{const i=typeof t=="function"?_f(e,t,n.custom):t;r=Promise.all(B3(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Cz=[...y0].reverse(),xz=y0.length;function wz(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nz(e,n,r)))}function kz(e){let t=wz(e);const n=Iz();let r=!0;const i=(l,c)=>{const u=_f(e,c);if(u){const{transition:f,transitionEnd:d,...h}=u;l={...l,...h,...d}}return l};function a(l){t=l(e)}function s(l,c){const u=e.getProps(),f=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},g=1/0;for(let E=0;E<xz;E++){const T=Cz[E],y=n[T],S=u[T]!==void 0?u[T]:f[T],w=_l(S),A=T===c?y.isActive:null;A===!1&&(g=E);let N=S===f[T]&&S!==u[T]&&w;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),y.protectedKeys={...p},!y.isActive&&A===null||!S&&!y.prevProp||gf(S)||typeof S=="boolean")continue;const R=Oz(y.prevProp,S);let D=R||T===c&&y.isActive&&!N&&w||E>g&&w;const O=Array.isArray(S)?S:[S];let B=O.reduce(i,{});A===!1&&(B={});const{prevResolvedValues:z={}}=y,Q={...z,...B},X=q=>{D=!0,h.delete(q),y.needsAnimating[q]=!0};for(const q in Q){const ae=B[q],F=z[q];p.hasOwnProperty(q)||(ae!==F?fu(ae)&&fu(F)?!s3(ae,F)||R?X(q):y.protectedKeys[q]=!0:ae!==void 0?X(q):h.add(q):ae!==void 0&&h.has(q)?X(q):y.protectedKeys[q]=!0)}y.prevProp=S,y.prevResolvedValues=B,y.isActive&&(p={...p,...B}),r&&e.blockInitialAnimation&&(D=!1),D&&!N&&d.push(...O.map(q=>({animation:q,options:{type:T,...l}})))}if(h.size){const E={};h.forEach(T=>{const y=e.getBaseTarget(T);y!==void 0&&(E[T]=y)}),d.push({animation:E})}let v=!!d.length;return r&&u.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(l,c,u){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(u,l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:a,getState:()=>n}}function Oz(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!s3(t,e):!1}function ji(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Iz(){return{animate:ji(!0),whileInView:ji(),whileHover:ji(),whileTap:ji(),whileDrag:ji(),whileFocus:ji(),exit:ji()}}class Rz extends Li{constructor(t){super(t),t.animationState||(t.animationState=kz(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),gf(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Mz=0;class Lz extends Li{constructor(){super(...arguments),this.id=Mz++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Pz={animation:{Feature:Rz},exit:{Feature:Lz}},w2=(e,t)=>Math.abs(e-t);function Dz(e,t){const n=w2(e.x,t.x),r=w2(e.y,t.y);return Math.sqrt(n**2+r**2)}class U3{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Yd(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=Dz(c.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=c,{timestamp:h}=St;this.history.push({...d,timestamp:h});const{onStart:p,onMove:g}=this.handlers;u||(p&&p(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,u)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Wd(u,this.transformPagePoint),He.update(this.updatePoint,!0)},this.handlePointerUp=(c,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=Yd(c.type==="pointercancel"?this.lastMoveEventInfo:Wd(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(c,h),d&&d(c,h)},!t3(t))return;this.handlers=n,this.transformPagePoint=r;const i=yf(t),a=Wd(i,this.transformPagePoint),{point:s}=a,{timestamp:o}=St;this.history=[{...s,timestamp:o}];const{onSessionStart:l}=n;l&&l(t,Yd(a,this.history)),this.removeListeners=_i(Cr(window,"pointermove",this.handlePointerMove),Cr(window,"pointerup",this.handlePointerUp),Cr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dr(this.updatePoint)}}function Wd(e,t){return t?{point:t(e.point)}:e}function k2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yd({point:e},t){return{point:e,delta:k2(e,H3(t)),offset:k2(e,Fz(t)),velocity:Bz(t,.1)}}function Fz(e){return e[0]}function H3(e){return e[e.length-1]}function Bz(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=H3(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>vi(t)));)n--;if(!r)return{x:0,y:0};const a=xr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function rn(e){return e.max-e.min}function wm(e,t=0,n=.01){return Math.abs(e-t)<=n}function O2(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=rn(n)/rn(t),(wm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(wm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){O2(e.x,t.x,n.x,r?r.originX:void 0),O2(e.y,t.y,n.y,r?r.originY:void 0)}function I2(e,t,n){e.min=n.min+t.min,e.max=e.min+rn(t)}function Uz(e,t,n){I2(e.x,t.x,n.x),I2(e.y,t.y,n.y)}function R2(e,t,n){e.min=t.min-n.min,e.max=e.min+rn(t)}function $o(e,t,n){R2(e.x,t.x,n.x),R2(e.y,t.y,n.y)}function Hz(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function M2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zz(e,{top:t,left:n,bottom:r,right:i}){return{x:M2(e.x,n,i),y:M2(e.y,t,r)}}function L2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function jz(e,t){return{x:L2(e.x,t.x),y:L2(e.y,t.y)}}function $z(e,t){let n=.5;const r=rn(e),i=rn(t);return i>r?n=bl(t.min,t.max-r,e.min):r>i&&(n=bl(e.min,e.max-i,t.min)),xi(0,1,n)}function Gz(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const km=.35;function Vz(e=km){return e===!1?e=0:e===!0&&(e=km),{x:P2(e,"left","right"),y:P2(e,"top","bottom")}}function P2(e,t,n){return{min:D2(e,t),max:D2(e,n)}}function D2(e,t){return typeof e=="number"?e:e[t]||0}const F2=()=>({translate:0,scale:1,origin:0,originPoint:0}),os=()=>({x:F2(),y:F2()}),B2=()=>({min:0,max:0}),rt=()=>({x:B2(),y:B2()});function Zn(e){return[e("x"),e("y")]}function z3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Kz({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wz(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qd(e){return e===void 0||e===1}function Om({scale:e,scaleX:t,scaleY:n}){return!qd(e)||!qd(t)||!qd(n)}function Wi(e){return Om(e)||j3(e)||e.z||e.rotate||e.rotateX||e.rotateY}function j3(e){return U2(e.x)||U2(e.y)}function U2(e){return e&&e!=="0%"}function gu(e,t,n){const r=e-n,i=t*r;return n+i}function H2(e,t,n,r,i){return i!==void 0&&(e=gu(e,i,r)),gu(e,n,r)+t}function Im(e,t=0,n=1,r,i){e.min=H2(e.min,t,n,r,i),e.max=H2(e.max,t,n,r,i)}function $3(e,{x:t,y:n}){Im(e.x,t.translate,t.scale,t.originPoint),Im(e.y,n.translate,n.scale,n.originPoint)}function Yz(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let o=0;o<i;o++){a=n[o],s=a.projectionDelta;const l=a.instance;l&&l.style&&l.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ls(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,$3(e,s)),r&&Wi(a.latestValues)&&ls(e,a.latestValues))}t.x=z2(t.x),t.y=z2(t.y)}function z2(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function j2(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,s=Ke(e.min,e.max,a);Im(e,t[n],t[r],s,t.scale)}const qz=["x","scaleX","originX"],Qz=["y","scaleY","originY"];function ls(e,t){j2(e.x,t,qz),j2(e.y,t,Qz)}function G3(e,t){return z3(Wz(e.getBoundingClientRect(),t))}function Xz(e,t,n){const r=G3(e,n),{scroll:i}=t;return i&&(ai(r.x,i.offset.x),ai(r.y,i.offset.y)),r}const Zz=new WeakMap;class Jz{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(yf(l,"page").point)},a=(l,c)=>{const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=r3(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zn(p=>{let g=this.getAxisMotionValue(p).get()||0;if(sr.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[p];E&&(g=rn(E)*(parseFloat(g)/100))}}this.originPoint[p]=g}),d&&He.update(()=>d(l,c),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(l,c)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(f&&this.currentDirection===null){this.currentDirection=ej(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),h&&h(l,c)},o=(l,c)=>this.stop(l,c);this.panSession=new U3(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&He.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!W1(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Hz(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zz(r.layoutBox,t):this.constraints=!1,this.elastic=Vz(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Zn(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Gz(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Xz(r,i.root,this.visualElement.getTransformPagePoint());let s=jz(i.layout.layoutBox,a);if(n){const o=n(Kz(s));this.hasMutatedConstraints=!!o,o&&(s=z3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=Zn(u=>{if(!W1(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(L0(t,r,0,n))}stopAnimation(){Zn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Zn(n=>{const{drag:r}=this.getProps();if(!W1(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n];a.set(t[n]-Ke(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zn(s=>{const o=this.getAxisMotionValue(s);if(o){const l=o.get();i[s]=$z({min:l,max:l},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zn(s=>{if(!W1(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(Ke(l,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;Zz.set(this.visualElement,this);const t=this.visualElement.current,n=Cr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();as(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Ar(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),a(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=km,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function W1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ej(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class tj extends Li{constructor(t){super(t),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new Jz(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const $2=e=>(t,n)=>{e&&He.update(()=>e(t,n))};class nj extends Li{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(t){this.session=new U3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:$2(t),onStart:$2(n),onMove:r,onEnd:(a,s)=>{delete this.session,i&&He.update(()=>i(a,s))}}}mount(){this.removePointerDownListener=Cr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function rj(){const e=L.useContext(T0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=L.useId();return L.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Tc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function G2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=G2(e,t.target.x),r=G2(e,t.target.y);return`${n}% ${r}%`}},ij={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=wi.parse(e);if(i.length>5)return r;const a=wi.createTransformer(e),s=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=l;const c=Ke(o,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),a(i)}};class aj extends Un.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;fU(sj),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Tc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,s=r.projection;return s&&(s.isPresent=a,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||He.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function V3(e){const[t,n]=rj(),r=L.useContext(Hb);return Un.createElement(aj,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(zb),isPresent:t,safeToRemove:n})}const sj={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:ij},K3=["TopLeft","TopRight","BottomLeft","BottomRight"],oj=K3.length,V2=e=>typeof e=="string"?parseFloat(e):e,K2=e=>typeof e=="number"||le.test(e);function lj(e,t,n,r,i,a){i?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,cj(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,uj(r))):a&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<oj;s++){const o=`border${K3[s]}Radius`;let l=W2(t,o),c=W2(n,o);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||K2(l)===K2(c)?(e[o]=Math.max(Ke(V2(l),V2(c),r),0),(sr.test(c)||sr.test(l))&&(e[o]+="%")):e[o]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function W2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cj=W3(0,.5,O0),uj=W3(.5,.95,Ze);function W3(e,t,n){return r=>r<e?0:r>t?1:n(bl(e,t,r))}function Y2(e,t){e.min=t.min,e.max=t.max}function un(e,t){Y2(e.x,t.x),Y2(e.y,t.y)}function q2(e,t,n,r,i){return e-=t,e=gu(e,1/n,r),i!==void 0&&(e=gu(e,1/i,r)),e}function fj(e,t=0,n=1,r=.5,i,a=e,s=e){if(sr.test(t)&&(t=parseFloat(t),t=Ke(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=Ke(a.min,a.max,r);e===a&&(o-=t),e.min=q2(e.min,t,n,o,i),e.max=q2(e.max,t,n,o,i)}function Q2(e,t,[n,r,i],a,s){fj(e,t[n],t[r],t[i],t.scale,a,s)}const dj=["x","scaleX","originX"],hj=["y","scaleY","originY"];function X2(e,t,n,r){Q2(e.x,t,dj,n?n.x:void 0,r?r.x:void 0),Q2(e.y,t,hj,n?n.y:void 0,r?r.y:void 0)}function Z2(e){return e.translate===0&&e.scale===1}function Y3(e){return Z2(e.x)&&Z2(e.y)}function mj(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function q3(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function J2(e){return rn(e.x)/rn(e.y)}class pj{constructor(){this.members=[]}add(t){P0(this.members,t),t.scheduleRender()}remove(t){if(D0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function e4(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),u&&(r+=`rotateY(${u}deg) `)}const s=e.x.scale*t.x,o=e.y.scale*t.y;return(s!==1||o!==1)&&(r+=`scale(${s}, ${o})`),r||"none"}const gj=(e,t)=>e.depth-t.depth;class Ej{constructor(){this.children=[],this.isDirty=!1}add(t){P0(this.children,t),this.isDirty=!0}remove(t){D0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gj),this.isDirty=!1,this.children.forEach(t)}}function Tj(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Dr(r),e(a-t))};return He.read(r,!0),()=>Dr(r)}function yj(e){window.MotionDebug&&window.MotionDebug.record(e)}function _j(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vj(e,t,n){const r=Vt(e)?e:ks(e);return r.start(L0("",r,t,n)),r.animation}const t4=["","X","Y","Z"],n4=1e3;let bj=0;const Yi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Q3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=bj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Yi.totalNodes=Yi.resolvedTargetDeltas=Yi.recalculatedProjection=0,this.nodes.forEach(Nj),this.nodes.forEach(Oj),this.nodes.forEach(Ij),this.nodes.forEach(Cj),yj(Yi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ej)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new F0),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const l=this.eventHandlers.get(s);l&&l.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_j(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Tj(d,250),Tc.hasAnimatedSinceResize&&(Tc.hasAnimatedSinceResize=!1,this.nodes.forEach(i4))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||Dj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:E}=u.getProps(),T=!this.targetLayout||!q3(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...L3(g,"layout"),onPlay:v,onComplete:E};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||i4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Rj),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r4);return}this.isUpdating||this.nodes.forEach(wj),this.isUpdating=!1,this.nodes.forEach(kj),this.nodes.forEach(Sj),this.nodes.forEach(Aj),this.clearAllSnapshots();const o=performance.now();St.delta=xi(0,1e3/60,o-St.timestamp),St.timestamp=o,St.isProcessing=!0,Ud.update.process(St),Ud.preRender.process(St),Ud.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(xj),this.sharedNodes.forEach(Mj)}scheduleUpdateProjection(){He.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){He.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=rt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,o=this.projectionDelta&&!Y3(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(o||Wi(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return s&&(l=this.removeTransform(l)),Fj(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return rt();const o=s.measureViewportBox(),{scroll:l}=this.root;return l&&(ai(o.x,l.offset.x),ai(o.y,l.offset.y)),o}removeElementScroll(s){const o=rt();un(o,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){un(o,s);const{scroll:d}=this.root;d&&(ai(o.x,-d.offset.x),ai(o.y,-d.offset.y))}ai(o.x,u.offset.x),ai(o.y,u.offset.y)}}return o}applyTransform(s,o=!1){const l=rt();un(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ls(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Wi(u.latestValues)&&ls(l,u.latestValues)}return Wi(this.latestValues)&&ls(l,this.latestValues),l}removeTransform(s){const o=rt();un(o,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Wi(c.latestValues))continue;Om(c.latestValues)&&c.updateSnapshot();const u=rt(),f=c.measurePageBox();un(u,f),X2(o,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Wi(this.latestValues)&&X2(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=St.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),$o(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=rt(),this.targetWithTransforms=rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Uz(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):un(this.target,this.layout.layoutBox),$3(this.target,this.targetDelta)):un(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),$o(this.relativeTargetOrigin,this.target,h.target),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Yi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Om(this.parent.latestValues)||j3(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===St.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;un(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Yz(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox);const{target:p}=o;if(!p){this.projectionTransform&&(this.projectionDelta=os(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=os(),this.projectionDeltaWithTransform=os());const g=this.projectionTransform;jo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=e4(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Yi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,o=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=os();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const d=rt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,v=this.getStack(),E=!v||v.members.length<=1,T=!!(g&&!E&&this.options.crossfade===!0&&!this.path.some(Pj));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const w=S/1e3;a4(f.x,s.x,w),a4(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lj(this.relativeTarget,this.relativeTargetOrigin,d,w),y&&mj(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=rt()),un(y,this.relativeTarget)),g&&(this.animationValues=u,lj(u,c,this.latestValues,w,T,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=He.update(()=>{Tc.hasAnimatedSinceResize=!0,this.currentAnimation=vj(0,n4,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(n4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:u}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&X3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||rt();const f=rn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=rn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}un(o,l),ls(o,u),jo(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new pj),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(o=!0),!o)return;const c={};for(let u=0;u<t4.length;u++){const f="rotate"+t4[u];l[f]&&(c[f]=l[f],s.setStaticValue(f,0))}s.render();for(const u in c)s.setStaticValue(u,c[u]);s.scheduleRender()}getProjectionStyles(s={}){var o,l;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ec(s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ec(s.pointerEvents)||""),this.hasProjected&&!Wi(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=e4(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(o=d.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in cu){if(d[g]===void 0)continue;const{correct:v,applyTo:E}=cu[g],T=c.transform==="none"?d[g]:v(d[g],f);if(E){const y=E.length;for(let S=0;S<y;S++)c[E[S]]=T}else c[g]=T}return this.options.layoutId&&(c.pointerEvents=f===this?Ec(s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(r4),this.root.sharedNodes.clear()}}}function Sj(e){e.updateLayout()}function Aj(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,s=n.source!==e.layout.source;a==="size"?Zn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=rn(d);d.min=r[f].min,d.max=d.min+h}):X3(a,n.layoutBox,r)&&Zn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=rn(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const o=os();jo(o,r,n.layoutBox);const l=os();s?jo(l,e.applyTransform(i,!0),n.measuredBox):jo(l,r,n.layoutBox);const c=!Y3(o);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=rt();$o(p,n.layoutBox,d.layoutBox);const g=rt();$o(g,r,h.layoutBox),q3(p,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Nj(e){Yi.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xj(e){e.clearSnapshot()}function r4(e){e.clearMeasurements()}function wj(e){e.isLayoutDirty=!1}function kj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function i4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Oj(e){e.resolveTargetDelta()}function Ij(e){e.calcProjection()}function Rj(e){e.resetRotation()}function Mj(e){e.removeLeadSnapshot()}function a4(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function s4(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function Lj(e,t,n,r){s4(e.x,t.x,n.x,r),s4(e.y,t.y,n.y,r)}function Pj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Dj={duration:.45,ease:[.4,0,.1,1]},o4=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),l4=o4("applewebkit/")&&!o4("chrome/")?Math.round:Ze;function c4(e){e.min=l4(e.min),e.max=l4(e.max)}function Fj(e){c4(e.x),c4(e.y)}function X3(e,t,n){return e==="position"||e==="preserve-aspect"&&!wm(J2(t),J2(n),.2)}const Bj=Q3({attachResizeListener:(e,t)=>Ar(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qd={current:void 0},Z3=Q3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new Bj({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Uj={pan:{Feature:nj},drag:{Feature:tj,ProjectionNode:Z3,MeasureLayout:V3}},Hj=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function zj(e){const t=Hj.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Rm(e,t,n=1){const[r,i]=zj(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return P3(s)?parseFloat(s):s}else return vm(i)?Rm(i,t,n+1):i}function jj(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!vm(a))return;const s=Rm(a,r);s&&i.set(s)});for(const i in t){const a=t[i];if(!vm(a))continue;const s=Rm(a,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const $j=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),J3=e=>$j.has(e),Gj=e=>Object.keys(e).some(J3),u4=e=>e===xa||e===le,f4=(e,t)=>parseFloat(e.split(", ")[t]),d4=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return f4(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?f4(a[1],e):0}},Vj=new Set(["x","y","z"]),Kj=jl.filter(e=>!Vj.has(e));function Wj(e){const t=[];return Kj.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:d4(4,13),y:d4(5,14)};Os.translateX=Os.x;Os.translateY=Os.y;const Yj=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:s}=a,o={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{o[c]=Os[c](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);u&&u.jump(o[c]),e[c]=Os[c](l,a)}),e},qj=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(J3);let a=[],s=!1;const o=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let u=n[l],f=co(u);const d=t[l];let h;if(fu(d)){const p=d.length,g=d[0]===null?1:0;u=d[g],f=co(u);for(let v=g;v<p&&d[v]!==null;v++)h?k0(co(d[v])===h):h=co(d[v])}else h=co(d);if(f!==h)if(u4(f)&&u4(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof d=="string"?t[l]=parseFloat(d):Array.isArray(d)&&h===le&&(t[l]=d.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(u===0||d===0)?u===0?c.set(h.transform(u)):t[l]=f.transform(d):(s||(a=Wj(e),s=!0),o.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(d))}),o.length){const l=o.indexOf("height")>=0?window.pageYOffset:null,c=Yj(t,e,o);return a.length&&a.forEach(([u,f])=>{e.getValue(u).set(f)}),e.render(),pf&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Qj(e,t,n,r){return Gj(t)?qj(e,t,n,r):{target:t,transitionEnd:r}}const Xj=(e,t,n,r)=>{const i=jj(e,t,r);return t=i.target,r=i.transitionEnd,Qj(e,t,n,r)},Mm={current:null},e6={current:!1};function Zj(){if(e6.current=!0,!!pf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mm.current=e.matches;e.addListener(t),t()}else Mm.current=!1}function Jj(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],s=n[i];if(Vt(a))e.addValue(i,a),pu(r)&&r.add(i);else if(Vt(s))e.addValue(i,ks(a,{owner:e})),pu(r)&&r.remove(i);else if(s!==a)if(e.hasValue(i)){const o=e.getValue(i);!o.hasAnimated&&o.set(a)}else{const o=e.getStaticValue(i);e.addValue(i,ks(o!==void 0?o:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const h4=new WeakMap,t6=Object.keys(vl),e$=t6.length,m4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],t$=_0.length;class n${constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>He.render(this.render,!1,!0);const{latestValues:o,renderState:l}=a;this.latestValues=o,this.baseTarget={...o},this.initialValues=n.initial?{...o}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Ef(n),this.isVariantNode=Ub(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const d=u[f];o[f]!==void 0&&Vt(d)&&(d.set(o[f],!1),pu(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,h4.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),e6.current||Zj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){h4.delete(this.current),this.projection&&this.projection.unmount(),Dr(this.notifyUpdate),Dr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ca.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&He.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let s,o;for(let l=0;l<e$;l++){const c=t6[l],{isEnabled:u,Feature:f,ProjectionNode:d,MeasureLayout:h}=vl[c];d&&(s=d),u(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),h&&(o=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&as(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:d,layoutRoot:h})}return o}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<m4.length;r++){const i=m4[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a=t["on"+i];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Jj(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<t$;r++){const i=_0[r],a=this.props[i];(_l(a)||a===!1)&&(n[i]=a)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ks(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=w0(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Vt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new F0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class n6 extends n${sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let s=vz(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),a){yz(this,r,s);const o=Xj(this,r,s,n);n=o.transitionEnd,r=o.target}return{transition:t,transitionEnd:n,...r}}}function r$(e){return window.getComputedStyle(e)}class i$ extends n6{readValueFromInstance(t,n){if(Ca.has(n)){const r=M0(n);return r&&r.default||0}else{const r=r$(t),i=(Gb(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return G3(t,n)}build(t,n,r,i){b0(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return x0(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Qb(t,n,r,i)}}class a$ extends n6{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ca.has(n)){const r=M0(n);return r&&r.default||0}return n=Xb.has(n)?n:C0(n),t.getAttribute(n)}measureInstanceViewportBox(){return rt()}scrapeMotionValuesFromProps(t,n){return Jb(t,n)}build(t,n,r,i){A0(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Zb(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const s$=(e,t)=>v0(e)?new a$(t,{enableHardwareAcceleration:!1}):new i$(t,{enableHardwareAcceleration:!0}),o$={layout:{ProjectionNode:Z3,MeasureLayout:V3}},l$={...Pz,...tH,...Uj,...o$},c$=cU((e,t)=>jU(e,t,l$,s$)),u$=[{position:{left:0,top:0},delay:.1},{position:{left:16,top:0},delay:.05},{position:{left:32,top:0},delay:0},{position:{left:0,top:16},delay:.15},{position:{left:16,top:16},delay:.2},{position:{left:32,top:16},delay:.25},{position:{left:0,top:32},delay:.4},{position:{left:16,top:32},delay:.35},{position:{left:32,top:32},delay:.3}],B0=({color:e})=>_.jsx("div",{className:"relative h-[34px] w-[34px]",role:"progressbar",children:u$.map(({position:t,delay:n},r)=>_.jsx(c$.div,{className:`absolute ${e?"bg-"+e:"bg-ide-highlight"} left-[${t.left}px] top-[${t.top}px] h-[2px] w-[2px]`,animate:{opacity:[0,1,1,0,0]},transition:{delay:n,duration:1,repeat:1/0,times:[0,.1,.6,.7,1],repeatDelay:1}},r))}),f$=({initiallyCollapsed:e,title:t,grow:n,children:r,headerChildren:i,focusCommand:a})=>{const[s,o]=L.useState(e),l=L.useCallback(({data:c})=>{c.command===a&&o(()=>!1)},[a]);return L.useEffect(()=>{if(a)return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[a,l]),_.jsxs("section",{className:$e("flex flex-col",n&&!s?"grow overflow-hidden":"grow-0"),children:[_.jsxs("header",{className:"flex flex-row items-center justify-between border-b border-b-ide-border px-2 py-1",children:[_.jsxs("div",{className:"flex cursor-pointer flex-row items-center gap-2 hover:opacity-80",onClick:()=>o(c=>!c),children:[s?_.jsx(_e.ChevronRight,{}):_.jsx(_e.ChevronDown,{}),_.jsx("h1",{className:"font-bold",children:t})]}),_.jsx("div",{className:$e(s?"invisible":"visible"),children:i})]}),_.jsx("main",{className:$e("flex flex-col",n&&!s&&"grow",s?"hidden":"block overflow-hidden"),children:r})]})},p4=({message:e})=>{window.sourceryLS.postMessage({message:e})},d$=()=>{const[{recipes:e,status:t},n]=L.useState({recipes:[],status:"pending"}),r=L.useCallback(({data:{command:i,recipes:a}})=>{switch(i){case"recipes/addRecipes":n(gt(s=>{s.status="ok",s.recipes=a}))}},[]);return L.useEffect(()=>(window.addEventListener("message",r),()=>window.removeEventListener("message",r)),[r]),L.useEffect(()=>{p4({message:$B})},[]),_.jsx("section",{className:"h-fit grow overflow-y-auto p-2",children:t==="pending"?_.jsx("div",{className:"flex h-20 flex-col items-center justify-center",children:_.jsx(B0,{})}):_.jsx("ul",{className:"flex flex-col gap-2",children:e.map(({id:i,name:a},s)=>_.jsx("li",{children:_.jsx("button",{className:"btn-primary w-full rounded border border-ide-primary-btn-border p-1 text-center",onClick:()=>{p4({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:i,name:a,trigger:"recipeViewButton"}})},children:a})},s))})})},h$=({value:e=null,onChange:t=()=>{}})=>{const[n,r]=L.useState(e),i=L.useCallback(a=>()=>{r(()=>a),t(a)},[t]);return _.jsxs("div",{className:"flex flex-row items-center gap-1",children:[n==="liked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Like":void 0,children:_.jsx(_e.ThumbsUp.Solid,{})}):_.jsx("button",{onClick:i("liked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Like":void 0,children:_.jsx(_e.ThumbsUp.Regular,{})}),n==="disliked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Dislike":void 0,children:_.jsx(_e.ThumbsDown.Solid,{})}):_.jsx("button",{onClick:i("disliked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Dislike":void 0,children:_.jsx(_e.ThumbsDown.Regular,{})})]})},m$=e=>e.contextType==="uri",r6=e=>e.contextType==="location",p$=e=>m$(e)?e.uri:r6(e)?e.location.uri:null,g$=e=>r6(e)?e.location.range:null,E$=({message:e})=>{window.sourceryLS.postMessage({message:e})},i6=({contextIndicators:e,className:t})=>!e||!e.length?null:_.jsx("div",{className:$e("flex flex-row gap-2 flex-wrap",t),children:e.map((n,r)=>{const i=p$(n),a=i?()=>{E$({message:{target:"extension",request:"openLink",linkType:"file",link:i.slice(7),documentRange:g$(n)}})}:void 0;return _.jsxs("span",{className:$e("text-sm text-ide-disabled-text",a&&"cursor-pointer hover:text-ide-primary-btn-bg"),onClick:a,children:[n.tag&&_.jsxs("span",{className:"font-bold",children:[n.tag,": "]}),n.label]},r)})}),Sl=({message:e})=>{window.sourceryLS.postMessage({message:e})},g4=({message:{outcome:e,textContent:t,requestId:n,contextIndicators:r}})=>{const[i,a]=L.useState(!1),s=L.useCallback(o=>{n&&(Sl({message:{target:"languageServer",view:"chat",request:"sendFeedback",feedback:o,requestId:n}}),a(!0))},[n]);return _.jsx("div",{className:"flex flex-row justify-start",children:_.jsxs("div",{className:$e("assistant-message border border-ide-border relative flex flex-col",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:[_.jsx("div",{className:$e(n?"mb-5":"mb-2"),children:t?_.jsx(is,{markdown:t}):_.jsx(Db,{})}),n&&_.jsxs("div",{className:"ml-auto mt-2 flex flex-col",title:i?void 0:"Send feedback on this result",children:[_.jsx("div",{className:"ml-auto",children:_.jsx(h$,{onChange:s})}),i&&_.jsx("div",{children:_.jsx("a",{className:"break-words underline hover:cursor-pointer",href:`https://research.typeform.com/to/JmPsEwTM#chat_request=${n}`,children:"Give more feedback"})})]}),_.jsx(i6,{contextIndicators:r,className:"justify-start"})]})})},T$=({message:{textContent:e,contextIndicators:t}})=>_.jsx("div",{className:"flex flex-row justify-end",children:_.jsxs("div",{className:"rounded-lg-br-none ml-4 flex w-fit flex-col gap-1 border border-ide-border bg-ide-chat-input-bg px-4 py-2 text-ide-chat-input-text",children:[_.jsx("p",{children:e}),_.jsx(i6,{contextIndicators:t,className:"justify-end"})]})}),y$=()=>_.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[_.jsx("span",{children:_.jsx(_e.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),_$=L.forwardRef((e,t)=>{const[n,r]=L.useState(),i=L.useRef(null),a=L.useRef(null),s=L.useCallback(()=>{var u;(u=a.current)==null||u.focus()},[]);L.useImperativeHandle(t,()=>({focus:s}),[s]);const o=L.useCallback(({data:u})=>{switch(u.command){case"chat/focus":s()}},[s]);L.useEffect(()=>(window.addEventListener("message",o),()=>window.removeEventListener("message",o)),[o]),L.useEffect(()=>(window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)),[s]);const l=u=>{u.preventDefault(),n&&(Sl({message:{target:"languageServer",view:"chat",request:"sendMessage",textContent:n}}),r(""))},c=L.useCallback(u=>{var f;u.key=="Enter"&&!u.shiftKey&&(u.preventDefault(),(f=i.current)==null||f.requestSubmit())},[]);return _.jsx("div",{className:"relative w-full",children:_.jsxs("form",{onSubmit:l,ref:i,autoFocus:!0,children:[_.jsx("textarea",{name:"chatPrompt",id:"chatPrompt",placeholder:"Type your message here!",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",value:n,onChange:({target:{value:u}})=>r(u),onKeyDown:c,ref:a,autoFocus:!0}),_.jsx("button",{className:"absolute right-3 top-3",type:"submit",children:_.jsx(_e.PaperPlane,{className:"h-4 w-4"})})]})})}),v$=()=>_.jsxs("button",{className:"flex flex-row items-center gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Sl({message:zB})},children:[_.jsx("span",{children:_.jsx(_e.Plus,{})}),_.jsx("span",{children:"New Chat"})]}),b$=L.forwardRef(({className:e},t)=>{const[{messages:n,currentMessage:r},i]=L.useState({messages:[],currentMessage:null}),a=L.useRef(null),s=iv(a),o=L.useRef(null),l=L.useCallback(u=>{switch(u.role){case"user":{i(gt(f=>{f.messages.push(u),f.currentMessage={role:"assistant",outcome:"success",textContent:""}})),a.current&&rv(a.current);break}case"assistant":i(gt(f=>{f.currentMessage&&u.outcome==="success"?f.currentMessage.textContent+=u.textContent:f.currentMessage&&f.currentMessage.textContent&&u.outcome==="error"?(f.messages.push(f.currentMessage,u),f.currentMessage=null):u.outcome==="error"?(f.messages.push(u),f.currentMessage=null):u.outcome==="finished"?(f.currentMessage&&f.currentMessage.textContent&&(f.currentMessage.requestId=u.requestId,f.currentMessage.contextIndicators=u.contextIndicators,f.messages.push(f.currentMessage)),f.currentMessage=null):f.currentMessage=u}))}},[]),c=L.useCallback(({data:u})=>{switch(u.command){case"chat/addMessage":l(u.message);break;case"chat/clear":i(gt(f=>{f.messages=[],f.currentMessage=null}));break;case"chat/notifyCancel":i(gt(f=>{f.currentMessage&&f.currentMessage.textContent.length&&(f.currentMessage.requestId=u.requestId||void 0,f.messages.push(f.currentMessage)),f.messages.push("cancellationNotification"),f.currentMessage=null}))}},[l]);return L.useImperativeHandle(t,()=>({focus:()=>{var u;(u=o.current)==null||u.focus()}})),L.useLayoutEffect(()=>{s()},[r==null?void 0:r.textContent,n.length,s]),L.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),L.useEffect(()=>{Sl({message:HB})},[]),_.jsxs("div",{className:e,"data-testid":"chat-view",children:[n.length===0&&r===null?_.jsx("div",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(B0,{})}):_.jsxs("section",{className:"flex grow flex-col gap-4 overflow-auto p-2",ref:a,children:[n.map((u,f)=>{if(u==="cancellationNotification")return _.jsx(y$,{});switch(u.role){case"assistant":return _.jsx(g4,{message:u},f);case"user":return _.jsx(T$,{message:u},f)}}),r&&_.jsx(g4,{message:r})]}),_.jsxs("footer",{className:$e("flex grow-0 flex-col gap-2 border-t border-t-ide-border p-2"),children:[_.jsx("div",{className:"flex flex-row justify-center",children:_.jsxs("button",{disabled:r===null,className:"flex w-fit flex-row items-center gap-2 p-2 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:u=>{var f;u.stopPropagation(),(f=o.current)==null||f.focus(),Sl({message:jB})},children:[_.jsx(_e.CirclePause,{}),_.jsx("span",{children:"Cancel"})]})}),_.jsx(_$,{ref:o})]}),_.jsx("div",{className:"flex h-1 w-full bg-ide-border"}),_.jsx(f$,{title:"Recipes",children:_.jsx(d$,{})})]})}),S$=({chart:e,title:t})=>{const[n,r]=L.useState(""),[i,a]=L.useState(!1);return L.useEffect(()=>{(async()=>{try{const o=btoa(e),l=document.documentElement.classList.contains("dark")?"dark":"default",c=`https://mermaid.ink/svg/${o}?theme=${l}&width=800`;r(c),a(!1)}catch(o){console.error("Failed to render mermaid diagram:",o),a(!0)}})()},[e]),i?null:_.jsxs("div",{className:"group relative my-4",children:[_.jsxs("div",{className:"relative mb-2 flex flex-row flex-nowrap items-center gap-4",children:[_.jsx("div",{className:"font-medium",children:t}),_.jsxs("div",{className:"invisible absolute right-0 top-0 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:[_.jsx(A$,{imageUrl:n}),_.jsx(N$,{code:e})]})]}),_.jsx("div",{className:"w-full",children:n&&_.jsx("img",{src:n,alt:"Mermaid diagram",className:"h-auto w-full",onError:()=>a(!0)})})]})},A$=({imageUrl:e})=>_.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Open diagram in new tab",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",children:_.jsx(_e.FileExport,{})}),N$=({code:e})=>{const[t,n]=L.useState(!1);return _.jsx("button",{title:"Copy diagram code",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{na({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(_e.Check,{}):_.jsx(_e.Copy,{})})},a6={selectedTab:"review",selectedReviewOption:"current"},vf=L.createContext({uiState:a6,updateUIState:e=>{console.warn("Default updateUIState called - this means you are using the context outside of UIStateProvider!",e)}}),s6={isFeatureFlagEnabled:!1,isAuthenticated:!1,isAuthorized:!1,isRepositoryOpenSource:!1,isConfigEnabled:!1,showCodeLens:!0,isGitRepository:!1,branches:[]},bf=L.createContext(s6),C$=bf.Provider,x$=({disabled:e,isOpen:t,setIsOpen:n,selectedReviewOption:r,selectedBranch:i,updateUIState:a,isGitRepository:s,branches:o,onRefresh:l})=>{const c=()=>{switch(r){case"current":return"Review current file";case"head":return"Compare with HEAD";case"branch":return`Compare with ${i}`;default:return"Select comparison"}};return _.jsxs("div",{className:"relative",children:[_.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-2 rounded border border-ide-border bg-ide-editor-bg px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>n(!t),disabled:e,children:[_.jsxs("div",{className:"flex items-center gap-2",children:[r==="current"?_.jsx(_e.File,{className:"h-4 w-4 opacity-70"}):_.jsx(_e.Git,{className:"h-4 w-4 opacity-70"}),_.jsx("span",{children:c()})]}),_.jsx(_e.ChevronDown,{className:"h-4 w-4 opacity-50"})]}),t&&_.jsxs("div",{className:"absolute left-0 top-full z-10 mt-1 w-full rounded border border-ide-border bg-ide-editor-bg shadow-lg",children:[_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"current"}),n(!1)},children:[_.jsx(_e.File,{className:"h-4 w-4"}),"Review current file"]}),s&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"border-t border-ide-border"}),_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"head"}),n(!1)},children:[_.jsx(_e.Git,{className:"h-4 w-4"}),"Compare with HEAD"]}),_.jsx("div",{className:"border-t border-ide-border"}),_.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[_.jsx("span",{className:"text-sm opacity-70",children:"Compare with branch:"}),_.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),l()},className:"flex items-center justify-center rounded p-1 hover:bg-ide-chat-input-bg",title:"Refresh branches",children:_.jsx(_e.Refresh,{})})]}),_.jsx("div",{className:"max-h-[256px] overflow-y-auto",children:o.map(u=>_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"branch",selectedBranch:u.name}),n(!1)},children:[_.jsx(_e.Git,{className:"h-4 w-4"}),_.jsxs("span",{className:"flex items-center gap-2",children:[u.name,u.isDefault&&_.jsx("span",{className:"rounded bg-ide-border px-1.5 py-0.5 text-xs opacity-70",children:"default"})]})]},u.name))})]})]})]})},Is=({message:e})=>{window.sourceryLS.postMessage({message:e})},cs=({outcome:e,textContent:t})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:$e("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:t?_.jsx(is,{markdown:t}):_.jsx(Db,{})})}),w$=({diagrams:e})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:$e("rounded-lg-bl-none mr-4 rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg"),children:e.map((t,n)=>_.jsx("div",{children:_.jsx(S$,{chart:t.diagram,title:t.title})},n))})}),k$=({summary:e,follow_up_comment:t,file:n,location:r,diff_line_for_comment:i,diff_context:a,area:s,comment_type:o,formatted_fix:l,fix:c,resolved:u,outdated:f})=>{const[d,h]=L.useState(u);L.useEffect(()=>{h(u)},[u]);const p=L.useCallback(()=>{Is({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"apply",file:n,diff_line_for_comment:i,fix:c}})},[n,i,c]),g=()=>{h(!d)};return _.jsx("div",{className:"flex w-full flex-row justify-start",children:_.jsxs("div",{className:$e("rounded-lg-bl-none mr-4 w-full rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg","relative"),children:[f&&_.jsx("div",{className:$e("absolute right-2 top-2 rounded-full border border-ide-warning-bg bg-transparent px-2 py-0.5 text-xs text-ide-text",{"opacity-50":u}),children:"outdated"}),_.jsxs("div",{className:$e({"opacity-50":u}),children:[_.jsxs("div",{className:"flex items-center gap-2 pr-16",children:[_.jsx(_e.ChevronRight,{className:$e("transition-transform flex-shrink-0 mt-[2px] cursor-pointer hover:opacity-80",{"rotate-90":!d}),onClick:g}),_.jsxs("div",{className:"relative grow overflow-hidden",children:[_.jsx("div",{className:"truncate",children:_.jsx(is,{markdown:r})}),_.jsx("div",{className:"pointer-events-none absolute right-0 top-0 h-full w-4 bg-gradient-to-r from-transparent via-transparent to-ide-chat-input-bg"})]})]}),_.jsx("div",{className:"mt-2 flex flex-row gap-2",children:_.jsxs("span",{className:"text-sm",children:[_.jsx("span",{className:"font-bold",children:o}),_.jsx("span",{children:"("}),_.jsx("span",{className:"italic",children:s}),_.jsx("span",{children:"): "}),_.jsx("span",{children:e})]})})]}),!d&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:$e({"opacity-50":u}),children:[_.jsx(is,{markdown:a,hideCodeButtons:!0}),_.jsx(is,{markdown:t}),l&&_.jsxs("div",{className:"mt-2 border-t border-ide-border pt-2",children:[_.jsx("div",{className:"text-sm font-bold",children:"Suggested Fix:"}),_.jsx(is,{markdown:l,hideCodeButtons:!0,onApplyFix:!u&&!f?p:void 0})]})]}),_.jsx("div",{className:"mt-2 flex flex-row justify-end",children:_.jsxs("button",{onClick:()=>Is({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:u?"unresolved":"resolved",file:n,diff_line_for_comment:i}}),title:u?"Mark this comment as unresolved.":"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-full border border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(_e.Check,{})," ",u?"Unresolve":"Resolve"]})})]})]})})},O$=({summary:e,running:t})=>e&&e.textContent?_.jsx(cs,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?_.jsx(cs,{outcome:"success",textContent:"Generating detailed review - this might take a little while...",type:"text"}):null,I$=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Is({message:Pb})},children:[_.jsx("span",{children:_.jsx(_e.Plus,{})}),_.jsx("span",{children:"New Review"})]}),R$=({disabled:e})=>{const{uiState:t,updateUIState:n}=L.useContext(vf),r=L.useContext(bf),[i,a]=L.useState(!1),s=L.useCallback(()=>{window.sourceryLS.postMessage({message:Lb})},[]),o=L.useCallback(l=>{l.preventDefault(),Is({message:Pb}),Is({message:{target:"languageServer",view:"review",request:"review",comparisonType:t.selectedReviewOption,branch:t.selectedBranch}})},[t.selectedReviewOption,t.selectedBranch]);return _.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:o,children:[_.jsx("div",{className:"grow",children:_.jsx(x$,{disabled:e,isOpen:i,setIsOpen:a,selectedReviewOption:t.selectedReviewOption,selectedBranch:t.selectedBranch,updateUIState:n,isGitRepository:r.isGitRepository,branches:r.branches,onRefresh:s})}),_.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",disabled:e,children:"Review My Code"})]})},M$=()=>_.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[_.jsx("span",{children:_.jsx(_e.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),L$=({className:e})=>{const[{overview:t,change_summary:n,summary:r,diagram:i,comments:a,error:s,cancelled:o,running:l,running_detailed:c},u]=L.useState({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1}),f=L.useRef(null),d=iv(f),h=L.useCallback(({data:p})=>{switch(p.command){case"review/addOverviewMessage":u(gt(g=>{g.running=!0,g.overview=p.message}));break;case"review/addChangeSummaryMessage":u(gt(g=>{g.change_summary?g.change_summary.textContent+=p.message.textContent:g.change_summary=p.message}));break;case"review/addSummaryMessage":u(gt(g=>{g.summary=p.message}));break;case"review/addCommentMessage":u(gt(g=>{g.comments.push(p.comment)}));break;case"review/addErrorMessage":u(gt(g=>{g.error=p.message}));break;case"review/clear":u(gt(()=>({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1})));break;case"review/notifyCancel":u(gt(g=>{g.cancelled=!0}));break;case"review/notifyStreamingComplete":u(gt(g=>{g.running_detailed=!0}));break;case"review/notifyComplete":u(gt(g=>{g.running=!1,g.running_detailed=!1}));break;case"review/addDiagramMessage":u(gt(g=>{g.diagram=p.message}));break;case"review/updateComment":u(gt(g=>{const v=g.comments.findIndex(E=>E.comment.file.trim()===p.comment.comment.file.trim()&&E.comment.diff_line_for_comment===p.comment.comment.diff_line_for_comment);v!==-1&&(g.comments[v].comment=p.comment.comment)}));break}},[]);return L.useLayoutEffect(()=>{d()},[a.length,d]),L.useEffect(()=>(window.addEventListener("message",h),()=>window.removeEventListener("message",h)),[h]),_.jsxs("div",{className:e,"data-testid":"review-view",children:[_.jsx(R$,{disabled:l}),_.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:f,children:[t&&_.jsxs(_.Fragment,{children:[_.jsx(cs,{outcome:t.outcome,textContent:t.textContent,type:"text"})," "]}),n&&_.jsx(_.Fragment,{children:_.jsx(cs,{outcome:n.outcome,textContent:n.textContent,type:"text"})}),t&&_.jsx(_.Fragment,{children:_.jsx(O$,{summary:r,running:c})}),i&&_.jsx(w$,{diagrams:i.diagrams,type:"diagrams"}),a.map((p,g)=>_.jsx(k$,{...p.comment},g)),c&&_.jsx(cs,{outcome:"success",textContent:"",type:"text"}),o&&_.jsx(M$,{}),s&&_.jsx(cs,{outcome:s.outcome,textContent:s.textContent,type:"text"})]}),_.jsx("footer",{className:$e(l?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:_.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>Is({message:GB}),children:[_.jsx(_e.Cancel,{}),_.jsx("span",{children:"Cancel"})]})})]})},P$=""+new URL("sourcery-logo.svg",import.meta.url).href;var E4=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},T4=typeof window<"u"&&window.document&&window.document.createElement?L.useLayoutEffect:L.useEffect,$t="top",vn="bottom",bn="right",Gt="left",U0="auto",Kl=[$t,vn,bn,Gt],Rs="start",Al="end",D$="clippingParents",o6="viewport",fo="popper",F$="reference",y4=Kl.reduce(function(e,t){return e.concat([t+"-"+Rs,t+"-"+Al])},[]),l6=[].concat(Kl,[U0]).reduce(function(e,t){return e.concat([t,t+"-"+Rs,t+"-"+Al])},[]),B$="beforeRead",U$="read",H$="afterRead",z$="beforeMain",j$="main",$$="afterMain",G$="beforeWrite",V$="write",K$="afterWrite",W$=[B$,U$,H$,z$,j$,$$,G$,V$,K$];function lr(e){return e?(e.nodeName||"").toLowerCase():null}function an(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ta(e){var t=an(e).Element;return e instanceof t||e instanceof Element}function Tn(e){var t=an(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function H0(e){if(typeof ShadowRoot>"u")return!1;var t=an(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Y$(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!Tn(a)||!lr(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function q$(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),o=s.reduce(function(l,c){return l[c]="",l},{});!Tn(i)||!lr(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const Q$={name:"applyStyles",enabled:!0,phase:"write",fn:Y$,effect:q$,requires:["computeStyles"]};function or(e){return e.split("-")[0]}var oa=Math.max,Eu=Math.min,Ms=Math.round;function Lm(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function c6(){return!/^((?!chrome|android).)*safari/i.test(Lm())}function Ls(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Tn(e)&&(i=e.offsetWidth>0&&Ms(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ms(r.height)/e.offsetHeight||1);var s=Ta(e)?an(e):window,o=s.visualViewport,l=!c6()&&n,c=(r.left+(l&&o?o.offsetLeft:0))/i,u=(r.top+(l&&o?o.offsetTop:0))/a,f=r.width/i,d=r.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function z0(e){var t=Ls(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function u6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&H0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Fr(e){return an(e).getComputedStyle(e)}function X$(e){return["table","td","th"].indexOf(lr(e))>=0}function Pi(e){return((Ta(e)?e.ownerDocument:e.document)||window.document).documentElement}function Sf(e){return lr(e)==="html"?e:e.assignedSlot||e.parentNode||(H0(e)?e.host:null)||Pi(e)}function _4(e){return!Tn(e)||Fr(e).position==="fixed"?null:e.offsetParent}function Z$(e){var t=/firefox/i.test(Lm()),n=/Trident/i.test(Lm());if(n&&Tn(e)){var r=Fr(e);if(r.position==="fixed")return null}var i=Sf(e);for(H0(i)&&(i=i.host);Tn(i)&&["html","body"].indexOf(lr(i))<0;){var a=Fr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Wl(e){for(var t=an(e),n=_4(e);n&&X$(n)&&Fr(n).position==="static";)n=_4(n);return n&&(lr(n)==="html"||lr(n)==="body"&&Fr(n).position==="static")?t:n||Z$(e)||t}function j0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Go(e,t,n){return oa(e,Eu(t,n))}function J$(e,t,n){var r=Go(e,t,n);return r>n?n:r}function f6(){return{top:0,right:0,bottom:0,left:0}}function d6(e){return Object.assign({},f6(),e)}function h6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var eG=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,d6(typeof t!="number"?t:h6(t,Kl))};function tG(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=or(n.placement),l=j0(o),c=[Gt,bn].indexOf(o)>=0,u=c?"height":"width";if(!(!a||!s)){var f=eG(i.padding,n),d=z0(a),h=l==="y"?$t:Gt,p=l==="y"?vn:bn,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],v=s[l]-n.rects.reference[l],E=Wl(a),T=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,y=g/2-v/2,S=f[h],w=T-d[u]-f[p],A=T/2-d[u]/2+y,N=Go(S,A,w),R=l;n.modifiersData[r]=(t={},t[R]=N,t.centerOffset=N-A,t)}}function nG(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||u6(t.elements.popper,i)&&(t.elements.arrow=i))}const rG={name:"arrow",enabled:!0,phase:"main",fn:tG,effect:nG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ps(e){return e.split("-")[1]}var iG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aG(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ms(n*i)/i||0,y:Ms(r*i)/i||0}}function v4(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=s.x,h=d===void 0?0:d,p=s.y,g=p===void 0?0:p,v=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var E=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),y=Gt,S=$t,w=window;if(c){var A=Wl(n),N="clientHeight",R="clientWidth";if(A===an(n)&&(A=Pi(n),Fr(A).position!=="static"&&o==="absolute"&&(N="scrollHeight",R="scrollWidth")),A=A,i===$t||(i===Gt||i===bn)&&a===Al){S=vn;var D=f&&A===w&&w.visualViewport?w.visualViewport.height:A[N];g-=D-r.height,g*=l?1:-1}if(i===Gt||(i===$t||i===vn)&&a===Al){y=bn;var O=f&&A===w&&w.visualViewport?w.visualViewport.width:A[R];h-=O-r.width,h*=l?1:-1}}var B=Object.assign({position:o},c&&iG),z=u===!0?aG({x:h,y:g},an(n)):{x:h,y:g};if(h=z.x,g=z.y,l){var Q;return Object.assign({},B,(Q={},Q[S]=T?"0":"",Q[y]=E?"0":"",Q.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",Q))}return Object.assign({},B,(t={},t[S]=T?g+"px":"",t[y]=E?h+"px":"",t.transform="",t))}function sG(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,s=a===void 0?!0:a,o=n.roundOffsets,l=o===void 0?!0:o,c={placement:or(t.placement),variation:Ps(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,v4(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,v4(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const oG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sG,data:{}};var Y1={passive:!0};function lG(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,s=r.resize,o=s===void 0?!0:s,l=an(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",n.update,Y1)}),o&&l.addEventListener("resize",n.update,Y1),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Y1)}),o&&l.removeEventListener("resize",n.update,Y1)}}const cG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lG,data:{}};var uG={left:"right",right:"left",bottom:"top",top:"bottom"};function yc(e){return e.replace(/left|right|bottom|top/g,function(t){return uG[t]})}var fG={start:"end",end:"start"};function b4(e){return e.replace(/start|end/g,function(t){return fG[t]})}function $0(e){var t=an(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function G0(e){return Ls(Pi(e)).left+$0(e).scrollLeft}function dG(e,t){var n=an(e),r=Pi(e),i=n.visualViewport,a=r.clientWidth,s=r.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;var c=c6();(c||!c&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:o+G0(e),y:l}}function hG(e){var t,n=Pi(e),r=$0(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=oa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=oa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-r.scrollLeft+G0(e),l=-r.scrollTop;return Fr(i||n).direction==="rtl"&&(o+=oa(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:l}}function V0(e){var t=Fr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m6(e){return["html","body","#document"].indexOf(lr(e))>=0?e.ownerDocument.body:Tn(e)&&V0(e)?e:m6(Sf(e))}function Vo(e,t){var n;t===void 0&&(t=[]);var r=m6(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=an(r),s=i?[a].concat(a.visualViewport||[],V0(r)?r:[]):r,o=t.concat(s);return i?o:o.concat(Vo(Sf(s)))}function Pm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mG(e,t){var n=Ls(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function S4(e,t,n){return t===o6?Pm(dG(e,n)):Ta(t)?mG(t,n):Pm(hG(Pi(e)))}function pG(e){var t=Vo(Sf(e)),n=["absolute","fixed"].indexOf(Fr(e).position)>=0,r=n&&Tn(e)?Wl(e):e;return Ta(r)?t.filter(function(i){return Ta(i)&&u6(i,r)&&lr(i)!=="body"}):[]}function gG(e,t,n,r){var i=t==="clippingParents"?pG(e):[].concat(t),a=[].concat(i,[n]),s=a[0],o=a.reduce(function(l,c){var u=S4(e,c,r);return l.top=oa(u.top,l.top),l.right=Eu(u.right,l.right),l.bottom=Eu(u.bottom,l.bottom),l.left=oa(u.left,l.left),l},S4(e,s,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function p6(e){var t=e.reference,n=e.element,r=e.placement,i=r?or(r):null,a=r?Ps(r):null,s=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2,l;switch(i){case $t:l={x:s,y:t.y-n.height};break;case vn:l={x:s,y:t.y+t.height};break;case bn:l={x:t.x+t.width,y:o};break;case Gt:l={x:t.x-n.width,y:o};break;default:l={x:t.x,y:t.y}}var c=i?j0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Rs:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Al:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Nl(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,o=n.boundary,l=o===void 0?D$:o,c=n.rootBoundary,u=c===void 0?o6:c,f=n.elementContext,d=f===void 0?fo:f,h=n.altBoundary,p=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,E=d6(typeof v!="number"?v:h6(v,Kl)),T=d===fo?F$:fo,y=e.rects.popper,S=e.elements[p?T:d],w=gG(Ta(S)?S:S.contextElement||Pi(e.elements.popper),l,u,s),A=Ls(e.elements.reference),N=p6({reference:A,element:y,strategy:"absolute",placement:i}),R=Pm(Object.assign({},y,N)),D=d===fo?R:A,O={top:w.top-D.top+E.top,bottom:D.bottom-w.bottom+E.bottom,left:w.left-D.left+E.left,right:D.right-w.right+E.right},B=e.modifiersData.offset;if(d===fo&&B){var z=B[i];Object.keys(O).forEach(function(Q){var X=[bn,vn].indexOf(Q)>=0?1:-1,q=[$t,vn].indexOf(Q)>=0?"y":"x";O[Q]+=z[q]*X})}return O}function EG(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,o=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?l6:l,u=Ps(r),f=u?o?y4:y4.filter(function(p){return Ps(p)===u}):Kl,d=f.filter(function(p){return c.indexOf(p)>=0});d.length===0&&(d=f);var h=d.reduce(function(p,g){return p[g]=Nl(e,{placement:g,boundary:i,rootBoundary:a,padding:s})[or(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function TG(e){if(or(e)===U0)return[];var t=yc(e);return[b4(e),t,b4(t)]}function yG(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,g=n.allowedAutoPlacements,v=t.options.placement,E=or(v),T=E===v,y=l||(T||!p?[yc(v)]:TG(v)),S=[v].concat(y).reduce(function(pe,me){return pe.concat(or(me)===U0?EG(t,{placement:me,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):me)},[]),w=t.rects.reference,A=t.rects.popper,N=new Map,R=!0,D=S[0],O=0;O<S.length;O++){var B=S[O],z=or(B),Q=Ps(B)===Rs,X=[$t,vn].indexOf(z)>=0,q=X?"width":"height",ae=Nl(t,{placement:B,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),F=X?Q?bn:Gt:Q?vn:$t;w[q]>A[q]&&(F=yc(F));var M=yc(F),H=[];if(a&&H.push(ae[z]<=0),o&&H.push(ae[F]<=0,ae[M]<=0),H.every(function(pe){return pe})){D=B,R=!1;break}N.set(B,H)}if(R)for(var b=p?3:1,j=function(me){var oe=S.find(function(ze){var Ge=N.get(ze);if(Ge)return Ge.slice(0,me).every(function(fe){return fe})});if(oe)return D=oe,"break"},te=b;te>0;te--){var x=j(te);if(x==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const _G={name:"flip",enabled:!0,phase:"main",fn:yG,requiresIfExists:["offset"],data:{_skip:!1}};function A4(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function N4(e){return[$t,bn,vn,Gt].some(function(t){return e[t]>=0})}function vG(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=Nl(t,{elementContext:"reference"}),o=Nl(t,{altBoundary:!0}),l=A4(s,r),c=A4(o,i,a),u=N4(l),f=N4(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const bG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vG};function SG(e,t,n){var r=or(e),i=[Gt,$t].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[Gt,bn].indexOf(r)>=0?{x:o,y:s}:{x:s,y:o}}function AG(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,s=l6.reduce(function(u,f){return u[f]=SG(f,t.rects,a),u},{}),o=s[t.placement],l=o.x,c=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const NG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AG};function CG(e){var t=e.state,n=e.name;t.modifiersData[n]=p6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xG={name:"popperOffsets",enabled:!0,phase:"read",fn:CG,data:{}};function wG(e){return e==="x"?"y":"x"}function kG(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,h=d===void 0?!0:d,p=n.tetherOffset,g=p===void 0?0:p,v=Nl(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),E=or(t.placement),T=Ps(t.placement),y=!T,S=j0(E),w=wG(S),A=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,D=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(A){if(a){var Q,X=S==="y"?$t:Gt,q=S==="y"?vn:bn,ae=S==="y"?"height":"width",F=A[S],M=F+v[X],H=F-v[q],b=h?-R[ae]/2:0,j=T===Rs?N[ae]:R[ae],te=T===Rs?-R[ae]:-N[ae],x=t.elements.arrow,pe=h&&x?z0(x):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:f6(),oe=me[X],ze=me[q],Ge=Go(0,N[ae],pe[ae]),fe=y?N[ae]/2-b-Ge-oe-O.mainAxis:j-Ge-oe-O.mainAxis,ut=y?-N[ae]/2+b+Ge+ze+O.mainAxis:te+Ge+ze+O.mainAxis,nt=t.elements.arrow&&Wl(t.elements.arrow),xn=nt?S==="y"?nt.clientTop||0:nt.clientLeft||0:0,ur=(Q=B==null?void 0:B[S])!=null?Q:0,jr=F+fe-ur-xn,wa=F+ut-ur,_t=Go(h?Eu(M,jr):M,F,h?oa(H,wa):H);A[S]=_t,z[S]=_t-F}if(o){var Di,$r=S==="x"?$t:Gt,ce=S==="x"?vn:bn,Wt=A[w],Me=w==="y"?"height":"width",Ae=Wt+v[$r],fr=Wt-v[ce],Yt=[$t,Gt].indexOf(E)!==-1,Gr=(Di=B==null?void 0:B[w])!=null?Di:0,Vr=Yt?Ae:Wt-N[Me]-R[Me]-Gr+O.altAxis,I=Yt?Wt+N[Me]+R[Me]-Gr-O.altAxis:fr,P=h&&Yt?J$(Vr,Wt,I):Go(h?Vr:Ae,Wt,h?I:fr);A[w]=P,z[w]=P-Wt}t.modifiersData[r]=z}}const OG={name:"preventOverflow",enabled:!0,phase:"main",fn:kG,requiresIfExists:["offset"]};function IG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function RG(e){return e===an(e)||!Tn(e)?$0(e):IG(e)}function MG(e){var t=e.getBoundingClientRect(),n=Ms(t.width)/e.offsetWidth||1,r=Ms(t.height)/e.offsetHeight||1;return n!==1||r!==1}function LG(e,t,n){n===void 0&&(n=!1);var r=Tn(t),i=Tn(t)&&MG(t),a=Pi(t),s=Ls(e,i,n),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lr(t)!=="body"||V0(a))&&(o=RG(t)),Tn(t)?(l=Ls(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=G0(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function PG(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var l=t.get(o);l&&i(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function DG(e){var t=PG(e);return W$.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function FG(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function BG(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var C4={placement:"bottom",modifiers:[],strategy:"absolute"};function x4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function UG(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?C4:i;return function(o,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},C4,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},f=[],d=!1,h={state:u,setOptions:function(E){var T=typeof E=="function"?E(u.options):E;g(),u.options=Object.assign({},a,u.options,T),u.scrollParents={reference:Ta(o)?Vo(o):o.contextElement?Vo(o.contextElement):[],popper:Vo(l)};var y=DG(BG([].concat(r,u.options.modifiers)));return u.orderedModifiers=y.filter(function(S){return S.enabled}),p(),h.update()},forceUpdate:function(){if(!d){var E=u.elements,T=E.reference,y=E.popper;if(x4(T,y)){u.rects={reference:LG(T,Wl(y),u.options.strategy==="fixed"),popper:z0(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(O){return u.modifiersData[O.name]=Object.assign({},O.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var w=u.orderedModifiers[S],A=w.fn,N=w.options,R=N===void 0?{}:N,D=w.name;typeof A=="function"&&(u=A({state:u,options:R,name:D,instance:h})||u)}}}},update:FG(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){g(),d=!0}};if(!x4(o,l))return h;h.setOptions(c).then(function(v){!d&&c.onFirstUpdate&&c.onFirstUpdate(v)});function p(){u.orderedModifiers.forEach(function(v){var E=v.name,T=v.options,y=T===void 0?{}:T,S=v.effect;if(typeof S=="function"){var w=S({state:u,name:E,instance:h,options:y}),A=function(){};f.push(w||A)}})}function g(){f.forEach(function(v){return v()}),f=[]}return h}}var HG=[cG,xG,oG,Q$,NG,_G,OG,rG,bG],zG=UG({defaultModifiers:HG}),jG=typeof Element<"u",$G=typeof Map=="function",GG=typeof Set=="function",VG=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function _c(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!_c(e[r],t[r]))return!1;return!0}var a;if($G&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!_c(r.value[1],t.get(r.value[0])))return!1;return!0}if(GG&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(VG&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(jG&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!_c(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var KG=function(t,n){try{return _c(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const WG=Gn(KG);var YG=[],qG=function(t,n,r){r===void 0&&(r={});var i=L.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||YG},s=L.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=s[0],l=s[1],c=L.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var p=h.state,g=Object.keys(p.elements);zy.flushSync(function(){l({styles:E4(g.map(function(v){return[v,p.styles[v]||{}]})),attributes:E4(g.map(function(v){return[v,p.attributes[v]]}))})})},requires:["computeStyles"]}},[]),u=L.useMemo(function(){var d={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return WG(i.current,d)?i.current||d:(i.current=d,d)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),f=L.useRef();return T4(function(){f.current&&f.current.setOptions(u)},[u]),T4(function(){if(!(t==null||n==null)){var d=r.createPopper||zG,h=d(t,n,u);return f.current=h,function(){h.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:o.styles,attributes:o.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};function QG(e,t){L.useEffect(()=>{const n=r=>{e&&r&&r.target instanceof Element&&!e.contains(r.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const q1=({message:e})=>{window.sourceryLS.postMessage({message:e})},g6=({text:e=!0,popperOptions:t={placement:"bottom-start"}})=>{const[n,r]=L.useState(!1),i=L.useCallback(()=>r(()=>!0),[]),a=L.useCallback(()=>r(()=>!1),[]),[s,o]=L.useState(null),[l,c]=L.useState(null),{styles:u,attributes:f}=qG(s,l,t);QG(l,a);const{showCodeLens:d}=L.useContext(bf),h=L.useCallback(()=>{q1(d?{message:KB}:{message:VB})},[d]),p=L.useCallback(()=>{q1({message:WB})},[]),g=L.useCallback(()=>{q1({message:YB})},[]);return _.jsxs(_.Fragment,{children:[_.jsxs("button",{type:"button",ref:o,onClick:i,className:$e("px-2 py-1 -my-[2px] hover:opacity-80 border flex flex-row items-center gap-1",n?"border-ide-primary-btn-bg rounded-t-sm":"border-transparent"),children:[_.jsx(_e.Cog,{}),e&&_.jsx("span",{children:"Settings"})]}),_.jsxs("div",{ref:c,style:u.popper,...f.popper,className:$e(n?"block":"hidden","bg-ide-chat-input-bg mt-1 px-2 py-1 z-10 rounded-sm min-w-[240px] border border-ide-border shadow-lg flex flex-col"),children:[_.jsx("button",{onClick:h,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d?_.jsx(_e.SquareCheck,{className:"text-ide-highlight"}):_.jsx(_e.Square,{}),_.jsx("span",{children:"Show Code Lenses"})]})}),_.jsx("hr",{className:"my-1.5 text-ide-border"}),_.jsx("button",{onClick:p,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[_.jsx(_e.Book,{}),_.jsx("span",{children:"Documentation"})]})}),_.jsx("button",{onClick:g,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[_.jsx(_e.Comment,{}),_.jsx("span",{children:"Feedback"})]})})]})]})},ho=({message:e})=>{window.sourceryLS.postMessage({message:e})},XG=()=>{const{productName:e,isConfigEnabled:t,isAuthenticated:n,isAuthorized:r}=L.useContext(bf),i=L.useCallback(()=>{ho({message:FB})},[]),a=L.useCallback(()=>{ho({message:LB})},[]),s=L.useCallback(()=>{ho({message:PB})},[]),o=L.useCallback(()=>{ho({message:DB})},[]);return L.useEffect(()=>{ho({message:BB})},[]),_.jsxs("section",{id:"access-details",className:"flex flex-col divide-y divide-ide-border overflow-y-auto px-4","data-testid":"access-details-view",children:[_.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center justify-between",children:[_.jsxs("div",{className:"flex flex-row items-center gap-[10px]",children:[_.jsx("div",{className:"h-8 w-8",children:_.jsx("img",{src:P$,alt:"Sourcery's Logo"})}),_.jsxs("h1",{className:"font-bold",children:["Sourcery ",e]})]}),_.jsx(g6,{popperOptions:{placement:"bottom-end"}})]}),t?n?!r&&_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-lg",children:"Upgrade to use Sourcery on private repos"}),_.jsx("p",{className:"text-sm",children:"If you have already upgraded, please refresh"}),_.jsxs("div",{className:"flex flex-row gap-4",children:[_.jsx("button",{onClick:s,className:"btn-primary px-3 py-1 font-bold",children:"Upgrade"}),_.jsx("button",{className:"btn-secondary px-3 py-1 font-bold",onClick:o,children:"Refresh"})]}),_.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"mt-8 cursor-pointer text-sm underline",children:"Running into issues?"})]}):_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-xl",children:"Log in to start using Sourcery"}),_.jsx("p",{className:"text-sm",children:"If you have already logged in to Sourcery, please refresh"}),_.jsxs("div",{className:"flex flex-row gap-4",children:[_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:i,children:"Log In"}),_.jsx("button",{className:"btn-secondary px-3 py-1 font-bold",onClick:o,children:"Refresh"})]}),_.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"mt-8 cursor-pointer text-sm underline",children:"Running into issues?"})]}):_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-xl",children:"Opt in to enable Sourcery coding assistant"}),_.jsx("p",{className:"text-sm",children:"Sourcery works with large language model providers (including OpenAI and Anthropic) to help us review and improve your code. By enabling the Sourcery coding assistant you agree to let us send code snippets to them as necessary."}),_.jsx("div",{className:"flex flex-row gap-4",children:_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:a,children:"Opt In"})})]})]})},ZG=({intent:e="info",children:t})=>_.jsx("div",{className:$e("flex flex-row gap-2 px-4 py-1 border-b border-ide-border",e==="error"&&"text-ide-error-text bg-ide-error-bg"),children:t});function JG({children:e}){const[t,n]=L.useState(a6),r=i=>{n(a=>({...a,...i}))};return L.useEffect(()=>{window.sourceryLS.postMessage({message:{...UB,updates:t}})},[t]),_.jsx(vf.Provider,{value:{uiState:t,updateUIState:r},children:e})}window.sourceryLS=window.sourceryLS||{};const eV=({message:e})=>{window.sourceryLS.postMessage({message:e})},tV=({activeView:e,onSelect:t})=>{const{updateUIState:n}=L.useContext(vf),r=i=>a=>{n==null||n({selectedTab:i}),t(i)(a)};return _.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[_.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[_.jsx("button",{className:$e("px-2 py-2 font-bold",e==="review"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:r("review"),children:"Review"}),_.jsx("button",{className:$e("px-2 py-2 font-bold",e==="chat"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:r("chat"),children:"Chat"})]}),_.jsxs("div",{className:"flex grow flex-row items-baseline justify-end gap-4 border-b border-ide-border p-2",children:[e==="chat"?_.jsx(v$,{}):e==="review"?_.jsx(I$,{}):null,_.jsx(g6,{text:!1,popperOptions:{placement:"bottom-end"}})]})]})},nV=()=>{const[{status:e,appContext:t},n]=L.useState({status:"pending",appContext:s6}),[r,i]=L.useState("review"),a=L.useRef(null);return L.useEffect(()=>{eV({message:Lb})},[]),_.jsx(JG,{children:_.jsx(C$,{value:t,children:_.jsx(rV,{status:e,appContext:t,activeView:r,setActiveView:i,chatRef:a,setAppContext:n})})})},rV=({status:e,appContext:t,activeView:n,setActiveView:r,chatRef:i,setAppContext:a})=>{const{updateUIState:s}=L.useContext(vf),o=L.useMemo(()=>t.isAuthenticated&&t.isAuthorized,[t]),l=L.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),c=L.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Pro trial",[t]),u=L.useCallback(({data:f})=>{switch(f.command){case"chat/focus":r("chat");break;case"context/update":a(gt(d=>{d.status="ok",d.appContext={...d.appContext,...f.updates}}));break;case"uiState/load":s(f.updates),r(f.updates.selectedTab);break}},[s,r,a]);return L.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),_.jsxs("main",{className:"flex h-full max-h-full flex-col overflow-y-hidden bg-ide-window-bg text-ide-text","data-testid":"app",children:[l&&_.jsxs(ZG,{children:[_.jsx("span",{children:_.jsx(_e.InfoCircle,{})}),_.jsx("span",{children:c}),_.jsx("span",{children:"-"}),_.jsx("a",{href:"https://app.sourcery.ai/dashboard?utm_source=ide_chat&utm_medium=banner&utm_campaign=open_source_upgrade",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?_.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[_.jsx(B0,{}),_.jsx("p",{className:"italic",children:"Loading..."})]}):o?_.jsxs(_.Fragment,{children:[_.jsx(tV,{activeView:n,onSelect:f=>()=>{r(f),f==="chat"&&setTimeout(()=>{var d;return(d=i.current)==null?void 0:d.focus()},25)}}),_.jsx(b$,{className:$e(n==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:i}),_.jsx(L$,{className:$e(n==="review"?"flex grow flex-col overflow-hidden":"hidden")})]}):_.jsx(XG,{})]})};Xd.createRoot(document.getElementById("root")).render(_.jsx(Un.StrictMode,{children:_.jsx(nV,{})}));
852
+ `:dB(e)?(o=2,l=2):bb(e)&&(o=1,l=1);++a<i.length;)s=s.concat(Sb(i[a],e,{whitespace:r,breakBefore:a?void 0:o,breakAfter:a<i.length-1?_m(i[a+1]):l}));return l2(e)&&a2(t,e,l2)&&s.push(" "),o&&s.unshift(o),l&&s.push(l),s}function Ab(e,t){const n=String(e.value),r=[],i=[];let a=0;for(;a<=n.length;){s2.lastIndex=a;const l=s2.exec(n),c=l&&"index"in l?l.index:n.length;r.push(gB(n.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),a=c+1}let s=-1,o;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(i.push(r[s]),o=void 0):r[s]?(typeof o=="number"&&i.push(o),i.push(r[s]),o=0):(s===0||s===r.length-1)&&i.push(0);return i}function pB(e){return[String(e.value)]}function gB(e,t,n){const r=[];let i=0,a;for(;i<e.length;){o2.lastIndex=i;const s=o2.exec(e);a=s?s.index:e.length,!i&&!a&&s&&!t&&r.push(""),i!==a&&r.push(e.slice(i,a)),i=s?a+s[0].length:a}return i!==a&&!n&&r.push(""),r.join(" ")}function Nb(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function EB(e){return!!(e.properties||{}).hidden}function TB(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const yB={}.hasOwnProperty;function _B(e={}){const{aliases:t,languages:n,prefix:r,plainText:i,ignoreMissing:a,subset:s,detect:o}=e;let l="hljs";if(t&&de.registerAlias(t),n){let c;for(c in n)yB.call(n,c)&&de.registerLanguage(c,n[c])}if(r){const c=r.indexOf("-");l=c>-1?r.slice(0,c):r}return(c,u)=>{Fl(c,"element",(f,d,h)=>{const p=h;if(!p||!("tagName"in p)||p.tagName!=="pre"||f.tagName!=="code"||!f.properties)return;const g=vB(f);if(g===!1||!g&&!o||g&&i&&i.includes(g))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);let v;try{v=g?de.highlight(g,u2(p),{prefix:r}):de.highlightAuto(u2(p),{prefix:r,subset:s})}catch(E){const T=E;(!a||!/Unknown language/.test(T.message))&&u.fail(T,f,"rehype-highlight:missing-language");return}!g&&v.data.language&&f.properties.className.push("language-"+v.data.language),Array.isArray(v.children)&&v.children.length>0&&(f.children=v.children)})}}function vB(e){const t=e.properties&&e.properties.className;let n=-1;if(Array.isArray(t))for(;++n<t.length;){const r=String(t[n]);if(r==="no-highlight"||r==="nohighlight")return!1;if(r.slice(0,5)==="lang-")return r.slice(5);if(r.slice(0,9)==="language-")return r.slice(9)}}const bB=e=>L.isValidElement(e)&&!!e.props.children,lu=bB,SB=e=>L.isValidElement(e)&&lu(e)&&L.Children.toArray(e.props.children).reduce((t,n)=>t||L.isValidElement(n),!1),zl=SB,Cb=(e,t)=>L.Children.toArray(e).filter(t).map(n=>L.isValidElement(n)&&zl(n)?L.cloneElement(n,{...n.props,children:Cb(n.props.children,t)}):n),xb=Cb,wb=(e,t)=>{let n;return L.Children.toArray(e).find((r,i,a)=>t(r,i,a)?(n=r,!0):L.isValidElement(r)&&zl(r)?(n=wb(r.props.children,t),typeof n<"u"):!1),n},AB=wb,kb=(e,t)=>{L.Children.forEach(e,(n,r)=>{L.isValidElement(n)&&zl(n)&&kb(n.props.children,t),t(n,r)})},NB=kb,Ob=(e,t)=>L.Children.toArray(e).map((n,r,i)=>L.isValidElement(n)&&zl(n)?t(L.cloneElement(n,{...n.props,children:Ob(n.props.children,t)})):t(n,r,i)),CB=Ob,xB=(e,t)=>L.Children.toArray(e).filter(t),wB=xB,kB=e=>L.isValidElement(e)?typeof e.type=="string"?e.type:e.type.name:null,Ib=kB,OB=(e,t=[],n="rest")=>{const r=t.map(i=>typeof i=="string"?i:i.name);return L.Children.toArray(e).reduce((i,a)=>{const s=Ib(a),o=s!==null&&r.includes(s)?s:n;return typeof i[o]>"u"&&(i[o]=[]),i[o]=[...i[o],a],i},{})},IB=OB,f2=e=>typeof e>"u"||e===null||typeof e=="boolean"||JSON.stringify(e)==="{}"?"":e.toString(),Rb=e=>!(e instanceof Array)&&!L.isValidElement(e)?f2(e):L.Children.toArray(e).reduce((t,n)=>{let r="";return L.isValidElement(n)&&lu(n)?r=Rb(n.props.children):L.isValidElement(n)&&!lu(n)?r="":r=f2(n),t.concat(r)},""),Mb=Rb,RB=e=>xb(e,t=>L.isValidElement(t)),MB=RB;({...L.Children});const Lb={target:"languageServer",view:"app",request:"context"},LB={target:"languageServer",view:"app",request:"optIn"},PB={target:"extension",request:"openLink",linkType:"url",link:"https://app.sourcery.ai/dashboard?utm_source=ide_chat&utm_medium=upgrade_button&utm_campaign=private_repo_access"},DB={target:"languageServer",view:"app",request:"authenticate"},FB={target:"languageServer",view:"app",request:"logIn"},BB={target:"languageServer",view:"app",request:"accessDetailsOpened"},UB={target:"languageServer",view:"app",request:"uiState/save",updates:{}},HB={target:"languageServer",view:"chat",request:"initialise"},zB={target:"languageServer",view:"chat",request:"clear"},jB={target:"languageServer",view:"chat",request:"cancel"},$B={target:"languageServer",view:"recipes",request:"initialise"},Pb={target:"languageServer",view:"review",request:"clear"},GB={target:"languageServer",view:"review",request:"cancel"},VB={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!0,configurationTarget:1},KB={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!1,configurationTarget:1},WB={target:"extension",request:"openLink",linkType:"url",link:"https://docs.sourcery.ai",documentRange:null},YB={target:"extension",request:"openLink",linkType:"url",link:"mailto:support@sourcery.ai?subject=Sourcery Assistant Feedback",documentRange:null},na=({message:e})=>{window.sourceryLS.postMessage({message:e})},qB=["className","hljs-addition","hljs-attr","hljs-attribute","hljs-built_in","hljs-bullet","hljs-char","hljs-code","hljs-comment","hljs-deletion","hljs-doctag","hljs-emphasis","hljs-formula","hljs-keyword","hljs-link","hljs-literal","hljs-meta","hljs-name","hljs-number","hljs-operator","hljs-params","hljs-property","hljs-punctuation","hljs-quote","hljs-regexp","hljs-section","hljs-selector-attr","hljs-selector-class","hljs-selector-id","hljs-selector-pseudo","hljs-selector-tag","hljs-string","hljs-strong","hljs-subst","hljs-symbol","hljs-tag","hljs-template-tag","hljs-template-variable","hljs-title","hljs-type","hljs-variable"],QB=({copyValue:e})=>{const[t,n]=L.useState(!1);return _.jsx("button",{title:"Copy to clipboard",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{na({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(_e.Check,{}):_.jsx(_e.Copy,{})})},XB=({copyValue:e})=>_.jsx("button",{title:"Insert at cursor",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>na({message:{target:"extension",request:"insertAtCursor",content:e}}),children:_.jsx(_e.FileExport,{})}),ZB=({onApplyFix:e})=>_.jsx("button",{title:"Apply fix",className:"flex h-7 flex-row items-center justify-center gap-1 bg-ide-editor-bg px-2 py-1 hover:bg-ide-chat-input-bg",onClick:()=>e(),children:_.jsx(_e.FileExport,{})}),JB=({inline:e=!1,className:t,children:n,hideCodeButtons:r,onApplyFix:i})=>{const a=Mb(n);return e?_.jsx("code",{className:t,children:n}):_.jsxs("div",{className:"group relative",children:[_.jsx("pre",{className:$e(t,"border-ide-border bg-ide-editor-bg my-4 overflow-x-auto rounded border px-4 py-3"),children:_.jsx("code",{className:t,children:n})}),(i||!r)&&_.jsx("div",{className:"invisible absolute right-3 top-3 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:i?_.jsx(ZB,{onApplyFix:i}):_.jsxs(_.Fragment,{children:[_.jsx(QB,{copyValue:a}),_.jsx(XB,{copyValue:a})]})})]})},is=({markdown:e,hideCodeButtons:t,onApplyFix:n})=>{var r,i;return _.jsx(Kv,{remarkPlugins:[tR],rehypePlugins:[PP,[_B,{ignoreMissing:!0}],[KP,{protocols:{...rs.protocols,href:[...((r=rs.protocols)==null?void 0:r.src)||[],"file"]},attributes:{...rs.attributes,span:[...((i=rs.attributes)==null?void 0:i.span)||[],qB]}}]],transformLinkUri:a=>a.startsWith("https")||a.startsWith("file")||a==="VALID_FILE"||a==="VALID_FILE_WITH_LINE_NUMBER"||a==="VALID_DIRECTORY"?a:"",components:{h1({children:a}){return _.jsx("h1",{className:"mb-2 mt-6 text-lg font-bold first:mt-0 last:mb-0",children:a})},h2({children:a}){return _.jsx("h2",{className:"mt-2 font-bold first:mt-0",children:a})},h3({children:a}){return _.jsx("h3",{className:"mt-2 font-bold first:mt-0",children:a})},h4({children:a}){return _.jsx("h4",{className:"mt-2 font-bold first:mt-0",children:a})},h5({children:a}){return _.jsx("h5",{className:"mt-2 font-bold first:mt-0",children:a})},h6({children:a}){return _.jsx("h6",{className:"mt-2 font-bold first:mt-0",children:a})},ul({children:a}){return _.jsx("ul",{className:"list-disc pl-5",children:a})},ol({children:a}){return _.jsx("ol",{className:"list-disc pl-5",children:a})},p({children:a}){return _.jsx("p",{className:"mt-2 first:mt-0",children:a})},code(a){return _.jsx(JB,{...a,hideCodeButtons:t,onApplyFix:n})},a({href:a,children:s}){if(!a)return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Missing link]"});if(a.startsWith("https"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>na({message:{target:"extension",request:"openLink",link:a,linkType:"url",documentRange:null}}),children:s});if(a.startsWith("file"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>na({message:{target:"extension",request:"openLink",linkType:"file",link:a.slice(7),documentRange:null}}),children:s});if(a==="VALID_FILE"||a==="VALID_FILE_WITH_LINE_NUMBER"){const o=String(s).replace(/\n$/,""),[l,c]=o.split(":"),u=parseInt(c,10)-1,f=isNaN(u)?null:{start:{line:u,character:0},end:{line:u,character:0}};return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:d=>{d.preventDefault(),na({message:{target:"extension",request:"openLink",link:l,linkType:"file",documentRange:f}})},children:s})}if(a==="VALID_DIRECTORY"){const o=String(s).replace(/\n$/,"");return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:l=>{l.preventDefault(),na({message:{target:"extension",request:"openLink",link:o,linkType:"directory",documentRange:null}})},children:s})}return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Invalid link]"})}},children:e})},Db=()=>_.jsxs("div",{className:"flex h-[1.5rem] flex-row items-center gap-1",children:[_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.2s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.4s"}})]}),Fb=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mf=L.createContext({}),T0=L.createContext(null),pf=typeof document<"u",eU=pf?L.useLayoutEffect:L.useEffect,Bb=L.createContext({strict:!1});function tU(e,t,n,r){const{visualElement:i}=L.useContext(mf),a=L.useContext(Bb),s=L.useContext(T0),o=L.useContext(Fb).reducedMotion,l=L.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:o}));const c=l.current;L.useInsertionEffect(()=>{c&&c.update(n,s)});const u=L.useRef(!!window.HandoffAppearAnimations);return eU(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),L.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,u.current=!1)}),c}function as(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nU(e,t,n){return L.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):as(n)&&(n.current=r))},[t])}function _l(e){return typeof e=="string"||Array.isArray(e)}function gf(e){return typeof e=="object"&&typeof e.start=="function"}const y0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_0=["initial",...y0];function Ef(e){return gf(e.animate)||_0.some(t=>_l(e[t]))}function Ub(e){return!!(Ef(e)||e.variants)}function rU(e,t){if(Ef(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_l(n)?n:void 0,animate:_l(r)?r:void 0}}return e.inherit!==!1?t:{}}function iU(e){const{initial:t,animate:n}=rU(e,L.useContext(mf));return L.useMemo(()=>({initial:t,animate:n}),[d2(t),d2(n)])}function d2(e){return Array.isArray(e)?e.join(" "):e}const h2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vl={};for(const e in h2)vl[e]={isEnabled:t=>h2[e].some(n=>!!t[n])};function aU(e){for(const t in e)vl[t]={...vl[t],...e[t]}}const Hb=L.createContext({}),zb=L.createContext({}),sU=Symbol.for("motionComponentSymbol");function oU({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&aU(e);function a(o,l){let c;const u={...L.useContext(Fb),...o,layoutId:lU(o)},{isStatic:f}=u,d=iU(o),h=r(o,f);if(!f&&pf){d.visualElement=tU(i,h,u,t);const p=L.useContext(zb),g=L.useContext(Bb).strict;d.visualElement&&(c=d.visualElement.loadFeatures(u,g,e,p))}return L.createElement(mf.Provider,{value:d},c&&d.visualElement?L.createElement(c,{visualElement:d.visualElement,...u}):null,n(i,o,nU(h,d.visualElement,l),h,f,d.visualElement))}const s=L.forwardRef(a);return s[sU]=i,s}function lU({layoutId:e}){const t=L.useContext(Hb).id;return t&&e!==void 0?t+"-"+e:e}function cU(e){function t(r,i={}){return oU(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const uU=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function v0(e){return typeof e!="string"||e.includes("-")?!1:!!(uU.indexOf(e)>-1||/[A-Z]/.test(e))}const cu={};function fU(e){Object.assign(cu,e)}const jl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ca=new Set(jl);function jb(e,{layout:t,layoutId:n}){return Ca.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!cu[e]||e==="opacity")}const Vt=e=>!!(e&&e.getVelocity),dU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hU=jl.length;function mU(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let s=0;s<hU;s++){const o=jl[s];if(e[o]!==void 0){const l=dU[o]||o;a+=`${l}(${e[o]}) `}}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}const $b=e=>t=>typeof t=="string"&&t.startsWith(e),Gb=$b("--"),vm=$b("var(--"),pU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,gU=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xi=(e,t,n)=>Math.min(Math.max(n,e),t),xa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ho={...xa,transform:e=>xi(0,1,e)},G1={...xa,default:1},zo=e=>Math.round(e*1e5)/1e5,Tf=/(-)?([\d]*\.?[\d])+/g,Vb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,EU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $l(e){return typeof e=="string"}const Gl=e=>({test:t=>$l(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ti=Gl("deg"),sr=Gl("%"),le=Gl("px"),TU=Gl("vh"),yU=Gl("vw"),m2={...sr,parse:e=>sr.parse(e)/100,transform:e=>sr.transform(e*100)},p2={...xa,transform:Math.round},Kb={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,size:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,rotate:ti,rotateX:ti,rotateY:ti,rotateZ:ti,scale:G1,scaleX:G1,scaleY:G1,scaleZ:G1,skew:ti,skewX:ti,skewY:ti,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Ho,originX:m2,originY:m2,originZ:le,zIndex:p2,fillOpacity:Ho,strokeOpacity:Ho,numOctaves:p2};function b0(e,t,n,r){const{style:i,vars:a,transform:s,transformOrigin:o}=e;let l=!1,c=!1,u=!0;for(const f in t){const d=t[f];if(Gb(f)){a[f]=d;continue}const h=Kb[f],p=gU(d,h);if(Ca.has(f)){if(l=!0,s[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,o[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=mU(e.transform,n,u,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:h=0}=o;i.transformOrigin=`${f} ${d} ${h}`}}const S0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wb(e,t,n){for(const r in t)!Vt(t[r])&&!jb(r,n)&&(e[r]=t[r])}function _U({transformTemplate:e},t,n){return L.useMemo(()=>{const r=S0();return b0(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function vU(e,t,n){const r=e.style||{},i={};return Wb(i,r,e),Object.assign(i,_U(e,t,n)),e.transformValues?e.transformValues(i):i}function bU(e,t,n){const r={},i=vU(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const SU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||SU.has(e)}let Yb=e=>!uu(e);function AU(e){e&&(Yb=t=>t.startsWith("on")?!uu(t):e(t))}try{AU(require("@emotion/is-prop-valid").default)}catch{}function NU(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Yb(i)||n===!0&&uu(i)||!t&&!uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function g2(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function CU(e,t,n){const r=g2(t,e.x,e.width),i=g2(n,e.y,e.height);return`${r} ${i}`}const xU={offset:"stroke-dashoffset",array:"stroke-dasharray"},wU={offset:"strokeDashoffset",array:"strokeDasharray"};function kU(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?xU:wU;e[a.offset]=le.transform(-r);const s=le.transform(t),o=le.transform(n);e[a.array]=`${s} ${o}`}function A0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},u,f,d){if(b0(e,c,u,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=CU(g,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&kU(h,s,o,l,!1)}const qb=()=>({...S0(),attrs:{}}),N0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function OU(e,t,n,r){const i=L.useMemo(()=>{const a=qb();return A0(a,t,{enableHardwareAcceleration:!1},N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Wb(a,e.style,e),i.style={...a,...i.style}}return i}function IU(e=!1){return(n,r,i,{latestValues:a},s)=>{const l=(v0(n)?OU:bU)(r,a,s,n),u={...NU(r,typeof n=="string",e),...l,ref:i},{children:f}=r,d=L.useMemo(()=>Vt(f)?f.get():f,[f]);return L.createElement(n,{...u,children:d})}}const C0=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Qb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Xb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Zb(e,t,n,r){Qb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xb.has(i)?i:C0(i),t.attrs[i])}function x0(e,t){const{style:n}=e,r={};for(const i in n)(Vt(n[i])||t.style&&Vt(t.style[i])||jb(i,e))&&(r[i]=n[i]);return r}function Jb(e,t){const n=x0(e,t);for(const r in e)if(Vt(e[r])||Vt(t[r])){const i=jl.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function w0(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function RU(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const fu=e=>Array.isArray(e),MU=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),LU=e=>fu(e)?e[e.length-1]||0:e;function Ec(e){const t=Vt(e)?e.get():e;return MU(t)?t.toValue():t}function PU({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const s={latestValues:DU(r,i,a,e),renderState:t()};return n&&(s.mount=o=>n(r,o,s)),s}const e3=e=>(t,n)=>{const r=L.useContext(mf),i=L.useContext(T0),a=()=>PU(e,t,r,i);return n?a():RU(a)};function DU(e,t,n,r){const i={},a=r(e,{});for(const d in a)i[d]=Ec(a[d]);let{initial:s,animate:o}=e;const l=Ef(e),c=Ub(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?o:s;return f&&typeof f!="boolean"&&!gf(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=w0(e,h);if(!p)return;const{transitionEnd:g,transition:v,...E}=p;for(const T in E){let y=E[T];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(i[T]=y)}for(const T in g)i[T]=g[T]}),i}const Ze=e=>e;function FU(e){let t=[],n=[],r=0,i=!1,a=!1;const s=new WeakSet,o={schedule:(l,c=!1,u=!1)=>{const f=u&&i,d=f?t:n;return c&&s.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),s.delete(l)},process:l=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const u=t[c];u(l),s.has(u)&&(o.schedule(u),e())}i=!1,a&&(a=!1,o.process(l))}};return o}const V1=["prepare","read","update","preRender","render","postRender"],BU=40;function UU(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=V1.reduce((f,d)=>(f[d]=FU(()=>n=!0),f),{}),s=f=>a[f].process(i),o=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,BU),1),i.timestamp=f,i.isProcessing=!0,V1.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(o))},l=()=>{n=!0,r=!0,i.isProcessing||e(o)};return{schedule:V1.reduce((f,d)=>{const h=a[d];return f[d]=(p,g=!1,v=!1)=>(n||l(),h.schedule(p,g,v)),f},{}),cancel:f=>V1.forEach(d=>a[d].cancel(f)),state:i,steps:a}}const{schedule:He,cancel:Dr,state:St,steps:Ud}=UU(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),HU={useVisualState:e3({scrapeMotionValuesFromProps:Jb,createRenderState:qb,onMount:(e,t,{renderState:n,latestValues:r})=>{He.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),He.render(()=>{A0(n,r,{enableHardwareAcceleration:!1},N0(t.tagName),e.transformTemplate),Zb(t,n)})}})},zU={useVisualState:e3({scrapeMotionValuesFromProps:x0,createRenderState:S0})};function jU(e,{forwardMotionProps:t=!1},n,r){return{...v0(e)?HU:zU,preloadedFeatures:n,useRender:IU(t),createVisualElement:r,Component:e}}function Ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const t3=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function yf(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const $U=e=>t=>t3(t)&&e(t,yf(t));function Cr(e,t,n,r){return Ar(e,t,$U(n),r)}const GU=(e,t)=>n=>t(e(n)),_i=(...e)=>e.reduce(GU);function n3(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const E2=n3("dragHorizontal"),T2=n3("dragVertical");function r3(e){let t=!1;if(e==="y")t=T2();else if(e==="x")t=E2();else{const n=E2(),r=T2();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function i3(){const e=r3(!0);return e?(e(),!1):!0}class Li{constructor(t){this.isMounted=!1,this.node=t}update(){}}function y2(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,s)=>{if(a.type==="touch"||i3())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t),o[r]&&He.update(()=>o[r](a,s))};return Cr(e.current,n,i,{passive:!e.getProps()[r]})}class VU extends Li{mount(){this.unmount=_i(y2(this.node,!0),y2(this.node,!1))}unmount(){}}class KU extends Li{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_i(Ar(this.node.current,"focus",()=>this.onFocus()),Ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const a3=(e,t)=>t?e===t?!0:a3(e,t.parentElement):!1;function Hd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,yf(n))}class WU extends Li{constructor(){super(...arguments),this.removeStartListeners=Ze,this.removeEndListeners=Ze,this.removeAccessibleListeners=Ze,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=Cr(window,"pointerup",(o,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u}=this.node.getProps();He.update(()=>{a3(this.node.current,o.target)?c&&c(o,l):u&&u(o,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Cr(window,"pointercancel",(o,l)=>this.cancelPress(o,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_i(a,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const s=o=>{o.key!=="Enter"||!this.checkPressEnd()||Hd("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&He.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Ar(this.node.current,"keyup",s),Hd("down",(o,l)=>{this.startPress(o,l)})},n=Ar(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hd("cancel",(a,s)=>this.cancelPress(a,s))},i=Ar(this.node.current,"blur",r);this.removeAccessibleListeners=_i(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&He.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!i3()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&He.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Cr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ar(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_i(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const bm=new WeakMap,zd=new WeakMap,YU=e=>{const t=bm.get(e.target);t&&t(e)},qU=e=>{e.forEach(YU)};function QU({root:e,...t}){const n=e||document;zd.has(n)||zd.set(n,{});const r=zd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(qU,{root:e,...t})),r[i]}function XU(e,t,n){const r=QU(t);return bm.set(e,n),r.observe(e),()=>{bm.delete(e),r.unobserve(e)}}const ZU={some:0,all:1};class JU extends Li{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZU[i]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return XU(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(eH(t,n))&&this.startObserver()}unmount(){}}function eH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tH={inView:{Feature:JU},tap:{Feature:WU},focus:{Feature:KU},hover:{Feature:VU}};function s3(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function nH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function rH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function _f(e,t,n){const r=e.getProps();return w0(r,t,n!==void 0?n:r.custom,nH(e),rH(e))}const iH="framerAppearId",aH="data-"+C0(iH);let sH=Ze,k0=Ze;const vi=e=>e*1e3,xr=e=>e/1e3,oH={current:!1},o3=e=>Array.isArray(e)&&typeof e[0]=="number";function l3(e){return!!(!e||typeof e=="string"&&c3[e]||o3(e)||Array.isArray(e)&&e.every(l3))}const _o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function u3(e){if(e)return o3(e)?_o(e):Array.isArray(e)?e.map(u3):c3[e]}function lH(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:s="loop",ease:o,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=u3(o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"})}function cH(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const f3=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uH=1e-7,fH=12;function dH(e,t,n,r,i){let a,s,o=0;do s=t+(n-t)/2,a=f3(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>uH&&++o<fH);return s}function Vl(e,t,n,r){if(e===t&&n===r)return Ze;const i=a=>dH(a,0,1,e,n);return a=>a===0||a===1?a:f3(i(a),t,r)}const hH=Vl(.42,0,1,1),mH=Vl(0,0,.58,1),d3=Vl(.42,0,.58,1),pH=e=>Array.isArray(e)&&typeof e[0]!="number",h3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,m3=e=>t=>1-e(1-t),p3=e=>1-Math.sin(Math.acos(e)),O0=m3(p3),gH=h3(O0),g3=Vl(.33,1.53,.69,.99),I0=m3(g3),EH=h3(I0),TH=e=>(e*=2)<1?.5*I0(e):.5*(2-Math.pow(2,-10*(e-1))),yH={linear:Ze,easeIn:hH,easeInOut:d3,easeOut:mH,circIn:p3,circInOut:gH,circOut:O0,backIn:I0,backInOut:EH,backOut:g3,anticipate:TH},_2=e=>{if(Array.isArray(e)){k0(e.length===4);const[t,n,r,i]=e;return Vl(t,n,r,i)}else if(typeof e=="string")return yH[e];return e},R0=(e,t)=>n=>!!($l(n)&&EU.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),E3=(e,t,n)=>r=>{if(!$l(r))return r;const[i,a,s,o]=r.match(Tf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},_H=e=>xi(0,255,e),jd={...xa,transform:e=>Math.round(_H(e))},ra={test:R0("rgb","red"),parse:E3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jd.transform(e)+", "+jd.transform(t)+", "+jd.transform(n)+", "+zo(Ho.transform(r))+")"};function vH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Sm={test:R0("#"),parse:vH,transform:ra.transform},ss={test:R0("hsl","hue"),parse:E3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sr.transform(zo(t))+", "+sr.transform(zo(n))+", "+zo(Ho.transform(r))+")"},wt={test:e=>ra.test(e)||Sm.test(e)||ss.test(e),parse:e=>ra.test(e)?ra.parse(e):ss.test(e)?ss.parse(e):Sm.parse(e),transform:e=>$l(e)?e:e.hasOwnProperty("red")?ra.transform(e):ss.transform(e)},Ke=(e,t,n)=>-n*e+n*t+e;function $d(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;i=$d(l,o,e+1/3),a=$d(l,o,e),s=$d(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}const Gd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},SH=[Sm,ra,ss],AH=e=>SH.find(t=>t.test(e));function v2(e){const t=AH(e);let n=t.parse(e);return t===ss&&(n=bH(n)),n}const T3=(e,t)=>{const n=v2(e),r=v2(t),i={...n};return a=>(i.red=Gd(n.red,r.red,a),i.green=Gd(n.green,r.green,a),i.blue=Gd(n.blue,r.blue,a),i.alpha=Ke(n.alpha,r.alpha,a),ra.transform(i))};function NH(e){var t,n;return isNaN(e)&&$l(e)&&(((t=e.match(Tf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Vb))===null||n===void 0?void 0:n.length)||0)>0}const y3={regex:pU,countKey:"Vars",token:"${v}",parse:Ze},_3={regex:Vb,countKey:"Colors",token:"${c}",parse:wt.parse},v3={regex:Tf,countKey:"Numbers",token:"${n}",parse:xa.parse};function Vd(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function du(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Vd(n,y3),Vd(n,_3),Vd(n,v3),n}function b3(e){return du(e).values}function S3(e){const{values:t,numColors:n,numVars:r,tokenised:i}=du(e),a=t.length;return s=>{let o=i;for(let l=0;l<a;l++)l<r?o=o.replace(y3.token,s[l]):l<r+n?o=o.replace(_3.token,wt.transform(s[l])):o=o.replace(v3.token,zo(s[l]));return o}}const CH=e=>typeof e=="number"?0:e;function xH(e){const t=b3(e);return S3(e)(t.map(CH))}const wi={test:NH,parse:b3,createTransformer:S3,getAnimatableNone:xH},A3=(e,t)=>n=>`${n>0?t:e}`;function N3(e,t){return typeof e=="number"?n=>Ke(e,t,n):wt.test(e)?T3(e,t):e.startsWith("var(")?A3(e,t):x3(e,t)}const C3=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,s)=>N3(a,t[s]));return a=>{for(let s=0;s<r;s++)n[s]=i[s](a);return n}},wH=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=N3(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},x3=(e,t)=>{const n=wi.createTransformer(t),r=du(e),i=du(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_i(C3(r.values,i.values),n):A3(e,t)},bl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},b2=(e,t)=>n=>Ke(e,t,n);function kH(e){return typeof e=="number"?b2:typeof e=="string"?wt.test(e)?T3:x3:Array.isArray(e)?C3:typeof e=="object"?wH:b2}function OH(e,t,n){const r=[],i=n||kH(e[0]),a=e.length-1;for(let s=0;s<a;s++){let o=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Ze:t;o=_i(l,o)}r.push(o)}return r}function w3(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(k0(a===t.length),a===1)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=OH(t,r,i),o=s.length,l=c=>{let u=0;if(o>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=bl(e[u],e[u+1],c);return s[u](f)};return n?c=>l(xi(e[0],e[a-1],c)):l}function IH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=bl(0,t,r);e.push(Ke(n,1,i))}}function RH(e){const t=[0];return IH(t,e.length-1),t}function MH(e,t){return e.map(n=>n*t)}function LH(e,t){return e.map(()=>t||d3).splice(0,e.length-1)}function hu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=pH(r)?r.map(_2):_2(r),a={done:!1,value:t[0]},s=MH(n&&n.length===t.length?n:RH(t),e),o=w3(s,t,{ease:Array.isArray(i)?i:LH(t,i)});return{calculatedDuration:e,next:l=>(a.value=o(l),a.done=l>=e,a)}}function k3(e,t){return t?e*(1e3/t):0}const PH=5;function O3(e,t,n){const r=Math.max(t-PH,0);return k3(n-e(r),t-r)}const Kd=.001,DH=.01,S2=10,FH=.05,BH=1;function UH({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;sH(e<=vi(S2));let s=1-t;s=xi(FH,BH,s),e=xi(DH,S2,xr(e)),s<1?(i=c=>{const u=c*s,f=u*e,d=u-n,h=Am(c,s),p=Math.exp(-f);return Kd-d/h*p},a=c=>{const f=c*s*e,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-f),g=Am(Math.pow(c,2),s);return(-i(c)+Kd>0?-1:1)*((d-h)*p)/g}):(i=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Kd+u*f},a=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const o=5/e,l=zH(i,a,o);if(e=vi(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const HH=12;function zH(e,t,n){let r=n;for(let i=1;i<HH;i++)r=r-e(r)/t(r);return r}function Am(e,t){return e*Math.sqrt(1-t*t)}const jH=["duration","bounce"],$H=["stiffness","damping","mass"];function A2(e,t){return t.some(n=>e[n]!==void 0)}function GH(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!A2(e,$H)&&A2(e,jH)){const n=UH(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function I3({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],s={done:!1,value:i},{stiffness:o,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=GH(r),h=u?-xr(u):0,p=l/(2*Math.sqrt(o*c)),g=a-i,v=xr(Math.sqrt(o/c)),E=Math.abs(g)<5;n||(n=E?.01:2),t||(t=E?.005:.5);let T;if(p<1){const y=Am(v,p);T=S=>{const w=Math.exp(-p*v*S);return a-w*((h+p*v*g)/y*Math.sin(y*S)+g*Math.cos(y*S))}}else if(p===1)T=y=>a-Math.exp(-v*y)*(g+(h+v*g)*y);else{const y=v*Math.sqrt(p*p-1);T=S=>{const w=Math.exp(-p*v*S),A=Math.min(y*S,300);return a-w*((h+p*v*g)*Math.sinh(A)+y*g*Math.cosh(A))/y}}return{calculatedDuration:d&&f||null,next:y=>{const S=T(y);if(d)s.done=y>=f;else{let w=h;y!==0&&(p<1?w=O3(T,y,S):w=0);const A=Math.abs(w)<=n,N=Math.abs(a-S)<=t;s.done=A&&N}return s.value=s.done?a:S,s}}}function N2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=R=>o!==void 0&&R<o||l!==void 0&&R>l,p=R=>o===void 0?l:l===void 0||Math.abs(o-R)<Math.abs(l-R)?o:l;let g=n*t;const v=f+g,E=s===void 0?v:s(v);E!==v&&(g=E-f);const T=R=>-g*Math.exp(-R/r),y=R=>E+T(R),S=R=>{const D=T(R),O=y(R);d.done=Math.abs(D)<=c,d.value=d.done?E:O};let w,A;const N=R=>{h(d.value)&&(w=R,A=I3({keyframes:[d.value,p(d.value)],velocity:O3(y,R,d.value),damping:i,stiffness:a,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:R=>{let D=!1;return!A&&w===void 0&&(D=!0,S(R),N(R)),w!==void 0&&R>w?A.next(R-w):(!D&&S(R),d)}}}const VH=e=>{const t=({timestamp:n})=>e(n);return{start:()=>He.update(t,!0),stop:()=>Dr(t),now:()=>St.isProcessing?St.timestamp:performance.now()}},C2=2e4;function x2(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<C2;)t+=n,r=e.next(t);return t>=C2?1/0:t}const KH={decay:N2,inertia:N2,tween:hu,keyframes:hu,spring:I3};function mu({autoplay:e=!0,delay:t=0,driver:n=VH,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:o="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:f,...d}){let h=1,p=!1,g,v;const E=()=>{v=new Promise(j=>{g=j})};E();let T;const y=KH[i]||hu;let S;y!==hu&&typeof r[0]!="number"&&(S=w3([0,100],r,{clamp:!1}),r=[0,100]);const w=y({...d,keyframes:r});let A;o==="mirror"&&(A=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let N="idle",R=null,D=null,O=null;w.calculatedDuration===null&&a&&(w.calculatedDuration=x2(w));const{calculatedDuration:B}=w;let z=1/0,Q=1/0;B!==null&&(z=B+s,Q=z*(a+1)-s);let X=0;const q=j=>{if(D===null)return;h>0&&(D=Math.min(D,j)),h<0&&(D=Math.min(j-Q/h,D)),R!==null?X=R:X=Math.round(j-D)*h;const te=X-t*(h>=0?1:-1),x=h>=0?te<0:te>Q;X=Math.max(te,0),N==="finished"&&R===null&&(X=Q);let pe=X,me=w;if(a){const fe=X/z;let ut=Math.floor(fe),nt=fe%1;!nt&&fe>=1&&(nt=1),nt===1&&ut--,ut=Math.min(ut,a+1);const xn=!!(ut%2);xn&&(o==="reverse"?(nt=1-nt,s&&(nt-=s/z)):o==="mirror"&&(me=A));let ur=xi(0,1,nt);X>Q&&(ur=o==="reverse"&&xn?1:0),pe=ur*z}const oe=x?{done:!1,value:r[0]}:me.next(pe);S&&(oe.value=S(oe.value));let{done:ze}=oe;!x&&B!==null&&(ze=h>=0?X>=Q:X<=0);const Ge=R===null&&(N==="finished"||N==="running"&&ze);return f&&f(oe.value),Ge&&M(),oe},ae=()=>{T&&T.stop(),T=void 0},F=()=>{N="idle",ae(),g(),E(),D=O=null},M=()=>{N="finished",u&&u(),ae(),g()},H=()=>{if(p)return;T||(T=n(q));const j=T.now();l&&l(),R!==null?D=j-R:(!D||N==="finished")&&(D=j),N==="finished"&&E(),O=D,R=null,N="running",T.start()};e&&H();const b={then(j,te){return v.then(j,te)},get time(){return xr(X)},set time(j){j=vi(j),X=j,R!==null||!T||h===0?R=j:D=T.now()-j/h},get duration(){const j=w.calculatedDuration===null?x2(w):w.calculatedDuration;return xr(j)},get speed(){return h},set speed(j){j===h||!T||(h=j,b.time=xr(X))},get state(){return N},play:H,pause:()=>{N="paused",R=X},stop:()=>{p=!0,N!=="idle"&&(N="idle",c&&c(),F())},cancel:()=>{O!==null&&q(O),F()},complete:()=>{N="finished"},sample:j=>(D=0,q(j))};return b}function WH(e){let t;return()=>(t===void 0&&(t=e()),t)}const YH=WH(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qH=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),K1=10,QH=2e4,XH=(e,t)=>t.type==="spring"||e==="backgroundColor"||!l3(t.ease);function ZH(e,t,{onUpdate:n,onComplete:r,...i}){if(!(YH()&&qH.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,o,l;const c=()=>{l=new Promise(T=>{o=T})};c();let{keyframes:u,duration:f=300,ease:d,times:h}=i;if(XH(t,i)){const T=mu({...i,repeat:0,delay:0});let y={done:!1,value:u[0]};const S=[];let w=0;for(;!y.done&&w<QH;)y=T.sample(w),S.push(y.value),w+=K1;h=void 0,u=S,f=w-K1,d="linear"}const p=lH(e.owner.current,t,u,{...i,duration:f,ease:d,times:h}),g=()=>p.cancel(),v=()=>{He.update(g),o(),c()};return p.onfinish=()=>{e.set(cH(u,i)),r&&r(),v()},{then(T,y){return l.then(T,y)},attachTimeline(T){return p.timeline=T,p.onfinish=null,Ze},get time(){return xr(p.currentTime||0)},set time(T){p.currentTime=vi(T)},get speed(){return p.playbackRate},set speed(T){p.playbackRate=T},get duration(){return xr(f)},play:()=>{s||(p.play(),Dr(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:T}=p;if(T){const y=mu({...i,autoplay:!1});e.setWithVelocity(y.sample(T-K1).value,y.sample(T).value,K1)}v()},complete:()=>p.finish(),cancel:v}}function JH({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ze,pause:Ze,stop:Ze,then:a=>(a(),Promise.resolve()),cancel:Ze,complete:Ze});return t?mu({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const ez={type:"spring",stiffness:500,damping:25,restSpeed:10},tz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nz={type:"keyframes",duration:.8},rz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iz=(e,{keyframes:t})=>t.length>2?nz:Ca.has(e)?e.startsWith("scale")?tz(t[1]):ez:rz,Nm=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wi.test(t)||t==="0")&&!t.startsWith("url(")),az=new Set(["brightness","contrast","saturate","opacity"]);function sz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tf)||[];if(!r)return e;const i=n.replace(r,"");let a=az.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const oz=/([a-z-]*)\(.*?\)/g,Cm={...wi,getAnimatableNone:e=>{const t=e.match(oz);return t?t.map(sz).join(" "):e}},lz={...Kb,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Cm,WebkitFilter:Cm},M0=e=>lz[e];function R3(e,t){let n=M0(e);return n!==Cm&&(n=wi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const M3=e=>/^0[^.\s]+$/.test(e);function cz(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||M3(e)}function uz(e,t,n,r){const i=Nm(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const s=r.from!==void 0?r.from:e.get();let o;const l=[];for(let c=0;c<a.length;c++)a[c]===null&&(a[c]=c===0?s:a[c-1]),cz(a[c])&&l.push(c),typeof a[c]=="string"&&a[c]!=="none"&&a[c]!=="0"&&(o=a[c]);if(i&&l.length&&o)for(let c=0;c<l.length;c++){const u=l[c];a[u]=R3(t,o)}return a}function fz({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function L3(e,t){return e[t]||e.default||e}const L0=(e,t,n,r={})=>i=>{const a=L3(r,e)||{},s=a.delay||r.delay||0;let{elapsed:o=0}=r;o=o-vi(s);const l=uz(t,e,n,a),c=l[0],u=l[l.length-1],f=Nm(e,c),d=Nm(e,u);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-o,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(fz(a)||(h={...h,...iz(e,h)}),h.duration&&(h.duration=vi(h.duration)),h.repeatDelay&&(h.repeatDelay=vi(h.repeatDelay)),!f||!d||oH.current||a.type===!1)return JH(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=ZH(t,e,h);if(p)return p}return mu(h)};function pu(e){return!!(Vt(e)&&e.add)}const P3=e=>/^\-?\d*\.?\d+$/.test(e);function P0(e,t){e.indexOf(t)===-1&&e.push(t)}function D0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class F0{constructor(){this.subscriptions=[]}add(t){return P0(this.subscriptions,t),()=>D0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const dz=e=>!isNaN(parseFloat(e));class hz{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:s}=St;this.lastUpdated!==s&&(this.timeDelta=a,this.lastUpdated=s,He.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>He.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=dz(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new F0);const r=this.events[t].add(n);return t==="change"?()=>{r(),He.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?k3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ks(e,t){return new hz(e,t)}const D3=e=>t=>t.test(e),mz={test:e=>e==="auto",parse:e=>e},F3=[xa,le,sr,ti,yU,TU,mz],co=e=>F3.find(D3(e)),pz=[...F3,wt,wi],gz=e=>pz.find(D3(e));function Ez(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ks(n))}function Tz(e,t){const n=_f(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const s in a){const o=LU(a[s]);Ez(e,s,o)}}function yz(e,t,n){var r,i;const a=Object.keys(t).filter(o=>!e.hasValue(o)),s=a.length;if(s)for(let o=0;o<s;o++){const l=a[o],c=t[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),u!=null&&(typeof u=="string"&&(P3(u)||M3(u))?u=parseFloat(u):!gz(u)&&wi.test(c)&&(u=R3(l,c)),e.addValue(l,ks(u,{owner:e})),n[l]===void 0&&(n[l]=u),u!==null&&e.setBaseTarget(l,u))}}function _z(e,t){return t?(t[e]||t.default||t).from:void 0}function vz(e,t,n){const r={};for(const i in e){const a=_z(i,t);if(a!==void 0)r[i]=a;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function bz({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function B3(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(a=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const d=e.getValue(f),h=o[f];if(!d||h===void 0||u&&bz(u,f))continue;const p={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!d.hasAnimated){const v=e.getProps()[aH];v&&(p.elapsed=window.HandoffAppearAnimations(v,f,d,He))}d.start(L0(f,d,h,e.shouldReduceMotion&&Ca.has(f)?{type:!1}:p));const g=d.animation;pu(l)&&(l.add(f),g.then(()=>l.remove(f))),c.push(g)}return s&&Promise.all(c).then(()=>{s&&Tz(e,s)}),c}function xm(e,t,n={}){const r=_f(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(B3(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Sz(e,t,c+l,u,f,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[l,c]=o==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function Sz(e,t,n=0,r=0,i=1,a){const s=[],o=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(Az).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(xm(c,t,{...a,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function Az(e,t){return e.sortNodePosition(t)}function Nz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>xm(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=xm(e,t,n);else{const i=typeof t=="function"?_f(e,t,n.custom):t;r=Promise.all(B3(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Cz=[...y0].reverse(),xz=y0.length;function wz(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nz(e,n,r)))}function kz(e){let t=wz(e);const n=Iz();let r=!0;const i=(l,c)=>{const u=_f(e,c);if(u){const{transition:f,transitionEnd:d,...h}=u;l={...l,...h,...d}}return l};function a(l){t=l(e)}function s(l,c){const u=e.getProps(),f=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},g=1/0;for(let E=0;E<xz;E++){const T=Cz[E],y=n[T],S=u[T]!==void 0?u[T]:f[T],w=_l(S),A=T===c?y.isActive:null;A===!1&&(g=E);let N=S===f[T]&&S!==u[T]&&w;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),y.protectedKeys={...p},!y.isActive&&A===null||!S&&!y.prevProp||gf(S)||typeof S=="boolean")continue;const R=Oz(y.prevProp,S);let D=R||T===c&&y.isActive&&!N&&w||E>g&&w;const O=Array.isArray(S)?S:[S];let B=O.reduce(i,{});A===!1&&(B={});const{prevResolvedValues:z={}}=y,Q={...z,...B},X=q=>{D=!0,h.delete(q),y.needsAnimating[q]=!0};for(const q in Q){const ae=B[q],F=z[q];p.hasOwnProperty(q)||(ae!==F?fu(ae)&&fu(F)?!s3(ae,F)||R?X(q):y.protectedKeys[q]=!0:ae!==void 0?X(q):h.add(q):ae!==void 0&&h.has(q)?X(q):y.protectedKeys[q]=!0)}y.prevProp=S,y.prevResolvedValues=B,y.isActive&&(p={...p,...B}),r&&e.blockInitialAnimation&&(D=!1),D&&!N&&d.push(...O.map(q=>({animation:q,options:{type:T,...l}})))}if(h.size){const E={};h.forEach(T=>{const y=e.getBaseTarget(T);y!==void 0&&(E[T]=y)}),d.push({animation:E})}let v=!!d.length;return r&&u.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(l,c,u){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(u,l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:a,getState:()=>n}}function Oz(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!s3(t,e):!1}function ji(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Iz(){return{animate:ji(!0),whileInView:ji(),whileHover:ji(),whileTap:ji(),whileDrag:ji(),whileFocus:ji(),exit:ji()}}class Rz extends Li{constructor(t){super(t),t.animationState||(t.animationState=kz(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),gf(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Mz=0;class Lz extends Li{constructor(){super(...arguments),this.id=Mz++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Pz={animation:{Feature:Rz},exit:{Feature:Lz}},w2=(e,t)=>Math.abs(e-t);function Dz(e,t){const n=w2(e.x,t.x),r=w2(e.y,t.y);return Math.sqrt(n**2+r**2)}class U3{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Yd(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=Dz(c.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=c,{timestamp:h}=St;this.history.push({...d,timestamp:h});const{onStart:p,onMove:g}=this.handlers;u||(p&&p(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,u)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Wd(u,this.transformPagePoint),He.update(this.updatePoint,!0)},this.handlePointerUp=(c,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=Yd(c.type==="pointercancel"?this.lastMoveEventInfo:Wd(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(c,h),d&&d(c,h)},!t3(t))return;this.handlers=n,this.transformPagePoint=r;const i=yf(t),a=Wd(i,this.transformPagePoint),{point:s}=a,{timestamp:o}=St;this.history=[{...s,timestamp:o}];const{onSessionStart:l}=n;l&&l(t,Yd(a,this.history)),this.removeListeners=_i(Cr(window,"pointermove",this.handlePointerMove),Cr(window,"pointerup",this.handlePointerUp),Cr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dr(this.updatePoint)}}function Wd(e,t){return t?{point:t(e.point)}:e}function k2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yd({point:e},t){return{point:e,delta:k2(e,H3(t)),offset:k2(e,Fz(t)),velocity:Bz(t,.1)}}function Fz(e){return e[0]}function H3(e){return e[e.length-1]}function Bz(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=H3(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>vi(t)));)n--;if(!r)return{x:0,y:0};const a=xr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function rn(e){return e.max-e.min}function wm(e,t=0,n=.01){return Math.abs(e-t)<=n}function O2(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=rn(n)/rn(t),(wm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(wm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){O2(e.x,t.x,n.x,r?r.originX:void 0),O2(e.y,t.y,n.y,r?r.originY:void 0)}function I2(e,t,n){e.min=n.min+t.min,e.max=e.min+rn(t)}function Uz(e,t,n){I2(e.x,t.x,n.x),I2(e.y,t.y,n.y)}function R2(e,t,n){e.min=t.min-n.min,e.max=e.min+rn(t)}function $o(e,t,n){R2(e.x,t.x,n.x),R2(e.y,t.y,n.y)}function Hz(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function M2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zz(e,{top:t,left:n,bottom:r,right:i}){return{x:M2(e.x,n,i),y:M2(e.y,t,r)}}function L2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function jz(e,t){return{x:L2(e.x,t.x),y:L2(e.y,t.y)}}function $z(e,t){let n=.5;const r=rn(e),i=rn(t);return i>r?n=bl(t.min,t.max-r,e.min):r>i&&(n=bl(e.min,e.max-i,t.min)),xi(0,1,n)}function Gz(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const km=.35;function Vz(e=km){return e===!1?e=0:e===!0&&(e=km),{x:P2(e,"left","right"),y:P2(e,"top","bottom")}}function P2(e,t,n){return{min:D2(e,t),max:D2(e,n)}}function D2(e,t){return typeof e=="number"?e:e[t]||0}const F2=()=>({translate:0,scale:1,origin:0,originPoint:0}),os=()=>({x:F2(),y:F2()}),B2=()=>({min:0,max:0}),rt=()=>({x:B2(),y:B2()});function Zn(e){return[e("x"),e("y")]}function z3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Kz({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wz(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qd(e){return e===void 0||e===1}function Om({scale:e,scaleX:t,scaleY:n}){return!qd(e)||!qd(t)||!qd(n)}function Wi(e){return Om(e)||j3(e)||e.z||e.rotate||e.rotateX||e.rotateY}function j3(e){return U2(e.x)||U2(e.y)}function U2(e){return e&&e!=="0%"}function gu(e,t,n){const r=e-n,i=t*r;return n+i}function H2(e,t,n,r,i){return i!==void 0&&(e=gu(e,i,r)),gu(e,n,r)+t}function Im(e,t=0,n=1,r,i){e.min=H2(e.min,t,n,r,i),e.max=H2(e.max,t,n,r,i)}function $3(e,{x:t,y:n}){Im(e.x,t.translate,t.scale,t.originPoint),Im(e.y,n.translate,n.scale,n.originPoint)}function Yz(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let o=0;o<i;o++){a=n[o],s=a.projectionDelta;const l=a.instance;l&&l.style&&l.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ls(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,$3(e,s)),r&&Wi(a.latestValues)&&ls(e,a.latestValues))}t.x=z2(t.x),t.y=z2(t.y)}function z2(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function j2(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,s=Ke(e.min,e.max,a);Im(e,t[n],t[r],s,t.scale)}const qz=["x","scaleX","originX"],Qz=["y","scaleY","originY"];function ls(e,t){j2(e.x,t,qz),j2(e.y,t,Qz)}function G3(e,t){return z3(Wz(e.getBoundingClientRect(),t))}function Xz(e,t,n){const r=G3(e,n),{scroll:i}=t;return i&&(ai(r.x,i.offset.x),ai(r.y,i.offset.y)),r}const Zz=new WeakMap;class Jz{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(yf(l,"page").point)},a=(l,c)=>{const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=r3(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zn(p=>{let g=this.getAxisMotionValue(p).get()||0;if(sr.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[p];E&&(g=rn(E)*(parseFloat(g)/100))}}this.originPoint[p]=g}),d&&He.update(()=>d(l,c),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(l,c)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(f&&this.currentDirection===null){this.currentDirection=ej(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),h&&h(l,c)},o=(l,c)=>this.stop(l,c);this.panSession=new U3(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&He.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!W1(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Hz(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zz(r.layoutBox,t):this.constraints=!1,this.elastic=Vz(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Zn(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Gz(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Xz(r,i.root,this.visualElement.getTransformPagePoint());let s=jz(i.layout.layoutBox,a);if(n){const o=n(Kz(s));this.hasMutatedConstraints=!!o,o&&(s=z3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=Zn(u=>{if(!W1(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(L0(t,r,0,n))}stopAnimation(){Zn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Zn(n=>{const{drag:r}=this.getProps();if(!W1(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n];a.set(t[n]-Ke(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zn(s=>{const o=this.getAxisMotionValue(s);if(o){const l=o.get();i[s]=$z({min:l,max:l},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zn(s=>{if(!W1(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(Ke(l,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;Zz.set(this.visualElement,this);const t=this.visualElement.current,n=Cr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();as(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Ar(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),a(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=km,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function W1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ej(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class tj extends Li{constructor(t){super(t),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new Jz(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const $2=e=>(t,n)=>{e&&He.update(()=>e(t,n))};class nj extends Li{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(t){this.session=new U3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:$2(t),onStart:$2(n),onMove:r,onEnd:(a,s)=>{delete this.session,i&&He.update(()=>i(a,s))}}}mount(){this.removePointerDownListener=Cr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function rj(){const e=L.useContext(T0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=L.useId();return L.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Tc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function G2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=G2(e,t.target.x),r=G2(e,t.target.y);return`${n}% ${r}%`}},ij={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=wi.parse(e);if(i.length>5)return r;const a=wi.createTransformer(e),s=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=l;const c=Ke(o,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),a(i)}};class aj extends Un.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;fU(sj),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Tc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,s=r.projection;return s&&(s.isPresent=a,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||He.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function V3(e){const[t,n]=rj(),r=L.useContext(Hb);return Un.createElement(aj,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(zb),isPresent:t,safeToRemove:n})}const sj={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:ij},K3=["TopLeft","TopRight","BottomLeft","BottomRight"],oj=K3.length,V2=e=>typeof e=="string"?parseFloat(e):e,K2=e=>typeof e=="number"||le.test(e);function lj(e,t,n,r,i,a){i?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,cj(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,uj(r))):a&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<oj;s++){const o=`border${K3[s]}Radius`;let l=W2(t,o),c=W2(n,o);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||K2(l)===K2(c)?(e[o]=Math.max(Ke(V2(l),V2(c),r),0),(sr.test(c)||sr.test(l))&&(e[o]+="%")):e[o]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function W2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const cj=W3(0,.5,O0),uj=W3(.5,.95,Ze);function W3(e,t,n){return r=>r<e?0:r>t?1:n(bl(e,t,r))}function Y2(e,t){e.min=t.min,e.max=t.max}function un(e,t){Y2(e.x,t.x),Y2(e.y,t.y)}function q2(e,t,n,r,i){return e-=t,e=gu(e,1/n,r),i!==void 0&&(e=gu(e,1/i,r)),e}function fj(e,t=0,n=1,r=.5,i,a=e,s=e){if(sr.test(t)&&(t=parseFloat(t),t=Ke(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=Ke(a.min,a.max,r);e===a&&(o-=t),e.min=q2(e.min,t,n,o,i),e.max=q2(e.max,t,n,o,i)}function Q2(e,t,[n,r,i],a,s){fj(e,t[n],t[r],t[i],t.scale,a,s)}const dj=["x","scaleX","originX"],hj=["y","scaleY","originY"];function X2(e,t,n,r){Q2(e.x,t,dj,n?n.x:void 0,r?r.x:void 0),Q2(e.y,t,hj,n?n.y:void 0,r?r.y:void 0)}function Z2(e){return e.translate===0&&e.scale===1}function Y3(e){return Z2(e.x)&&Z2(e.y)}function mj(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function q3(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function J2(e){return rn(e.x)/rn(e.y)}class pj{constructor(){this.members=[]}add(t){P0(this.members,t),t.scheduleRender()}remove(t){if(D0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function e4(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),u&&(r+=`rotateY(${u}deg) `)}const s=e.x.scale*t.x,o=e.y.scale*t.y;return(s!==1||o!==1)&&(r+=`scale(${s}, ${o})`),r||"none"}const gj=(e,t)=>e.depth-t.depth;class Ej{constructor(){this.children=[],this.isDirty=!1}add(t){P0(this.children,t),this.isDirty=!0}remove(t){D0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gj),this.isDirty=!1,this.children.forEach(t)}}function Tj(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Dr(r),e(a-t))};return He.read(r,!0),()=>Dr(r)}function yj(e){window.MotionDebug&&window.MotionDebug.record(e)}function _j(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vj(e,t,n){const r=Vt(e)?e:ks(e);return r.start(L0("",r,t,n)),r.animation}const t4=["","X","Y","Z"],n4=1e3;let bj=0;const Yi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Q3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=bj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Yi.totalNodes=Yi.resolvedTargetDeltas=Yi.recalculatedProjection=0,this.nodes.forEach(Nj),this.nodes.forEach(Oj),this.nodes.forEach(Ij),this.nodes.forEach(Cj),yj(Yi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ej)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new F0),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const l=this.eventHandlers.get(s);l&&l.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_j(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Tj(d,250),Tc.hasAnimatedSinceResize&&(Tc.hasAnimatedSinceResize=!1,this.nodes.forEach(i4))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||Dj,{onLayoutAnimationStart:v,onLayoutAnimationComplete:E}=u.getProps(),T=!this.targetLayout||!q3(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...L3(g,"layout"),onPlay:v,onComplete:E};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||i4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Rj),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r4);return}this.isUpdating||this.nodes.forEach(wj),this.isUpdating=!1,this.nodes.forEach(kj),this.nodes.forEach(Sj),this.nodes.forEach(Aj),this.clearAllSnapshots();const o=performance.now();St.delta=xi(0,1e3/60,o-St.timestamp),St.timestamp=o,St.isProcessing=!0,Ud.update.process(St),Ud.preRender.process(St),Ud.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(xj),this.sharedNodes.forEach(Mj)}scheduleUpdateProjection(){He.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){He.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=rt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,o=this.projectionDelta&&!Y3(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(o||Wi(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return s&&(l=this.removeTransform(l)),Fj(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return rt();const o=s.measureViewportBox(),{scroll:l}=this.root;return l&&(ai(o.x,l.offset.x),ai(o.y,l.offset.y)),o}removeElementScroll(s){const o=rt();un(o,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){un(o,s);const{scroll:d}=this.root;d&&(ai(o.x,-d.offset.x),ai(o.y,-d.offset.y))}ai(o.x,u.offset.x),ai(o.y,u.offset.y)}}return o}applyTransform(s,o=!1){const l=rt();un(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ls(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Wi(u.latestValues)&&ls(l,u.latestValues)}return Wi(this.latestValues)&&ls(l,this.latestValues),l}removeTransform(s){const o=rt();un(o,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Wi(c.latestValues))continue;Om(c.latestValues)&&c.updateSnapshot();const u=rt(),f=c.measurePageBox();un(u,f),X2(o,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Wi(this.latestValues)&&X2(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=St.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),$o(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=rt(),this.targetWithTransforms=rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Uz(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):un(this.target,this.layout.layoutBox),$3(this.target,this.targetDelta)):un(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),$o(this.relativeTargetOrigin,this.target,h.target),un(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Yi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Om(this.parent.latestValues)||j3(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===St.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;un(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Yz(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox);const{target:p}=o;if(!p){this.projectionTransform&&(this.projectionDelta=os(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=os(),this.projectionDeltaWithTransform=os());const g=this.projectionTransform;jo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=e4(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Yi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,o=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=os();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const d=rt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,v=this.getStack(),E=!v||v.members.length<=1,T=!!(g&&!E&&this.options.crossfade===!0&&!this.path.some(Pj));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const w=S/1e3;a4(f.x,s.x,w),a4(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lj(this.relativeTarget,this.relativeTargetOrigin,d,w),y&&mj(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=rt()),un(y,this.relativeTarget)),g&&(this.animationValues=u,lj(u,c,this.latestValues,w,T,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=He.update(()=>{Tc.hasAnimatedSinceResize=!0,this.currentAnimation=vj(0,n4,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(n4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:u}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&X3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||rt();const f=rn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=rn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}un(o,l),ls(o,u),jo(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new pj),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(o=!0),!o)return;const c={};for(let u=0;u<t4.length;u++){const f="rotate"+t4[u];l[f]&&(c[f]=l[f],s.setStaticValue(f,0))}s.render();for(const u in c)s.setStaticValue(u,c[u]);s.scheduleRender()}getProjectionStyles(s={}){var o,l;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ec(s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ec(s.pointerEvents)||""),this.hasProjected&&!Wi(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=e4(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(o=d.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in cu){if(d[g]===void 0)continue;const{correct:v,applyTo:E}=cu[g],T=c.transform==="none"?d[g]:v(d[g],f);if(E){const y=E.length;for(let S=0;S<y;S++)c[E[S]]=T}else c[g]=T}return this.options.layoutId&&(c.pointerEvents=f===this?Ec(s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(r4),this.root.sharedNodes.clear()}}}function Sj(e){e.updateLayout()}function Aj(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,s=n.source!==e.layout.source;a==="size"?Zn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=rn(d);d.min=r[f].min,d.max=d.min+h}):X3(a,n.layoutBox,r)&&Zn(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=rn(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const o=os();jo(o,r,n.layoutBox);const l=os();s?jo(l,e.applyTransform(i,!0),n.measuredBox):jo(l,r,n.layoutBox);const c=!Y3(o);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=rt();$o(p,n.layoutBox,d.layoutBox);const g=rt();$o(g,r,h.layoutBox),q3(p,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Nj(e){Yi.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xj(e){e.clearSnapshot()}function r4(e){e.clearMeasurements()}function wj(e){e.isLayoutDirty=!1}function kj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function i4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Oj(e){e.resolveTargetDelta()}function Ij(e){e.calcProjection()}function Rj(e){e.resetRotation()}function Mj(e){e.removeLeadSnapshot()}function a4(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function s4(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function Lj(e,t,n,r){s4(e.x,t.x,n.x,r),s4(e.y,t.y,n.y,r)}function Pj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Dj={duration:.45,ease:[.4,0,.1,1]},o4=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),l4=o4("applewebkit/")&&!o4("chrome/")?Math.round:Ze;function c4(e){e.min=l4(e.min),e.max=l4(e.max)}function Fj(e){c4(e.x),c4(e.y)}function X3(e,t,n){return e==="position"||e==="preserve-aspect"&&!wm(J2(t),J2(n),.2)}const Bj=Q3({attachResizeListener:(e,t)=>Ar(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qd={current:void 0},Z3=Q3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new Bj({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Uj={pan:{Feature:nj},drag:{Feature:tj,ProjectionNode:Z3,MeasureLayout:V3}},Hj=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function zj(e){const t=Hj.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Rm(e,t,n=1){const[r,i]=zj(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return P3(s)?parseFloat(s):s}else return vm(i)?Rm(i,t,n+1):i}function jj(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!vm(a))return;const s=Rm(a,r);s&&i.set(s)});for(const i in t){const a=t[i];if(!vm(a))continue;const s=Rm(a,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const $j=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),J3=e=>$j.has(e),Gj=e=>Object.keys(e).some(J3),u4=e=>e===xa||e===le,f4=(e,t)=>parseFloat(e.split(", ")[t]),d4=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return f4(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?f4(a[1],e):0}},Vj=new Set(["x","y","z"]),Kj=jl.filter(e=>!Vj.has(e));function Wj(e){const t=[];return Kj.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:d4(4,13),y:d4(5,14)};Os.translateX=Os.x;Os.translateY=Os.y;const Yj=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:s}=a,o={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{o[c]=Os[c](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);u&&u.jump(o[c]),e[c]=Os[c](l,a)}),e},qj=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(J3);let a=[],s=!1;const o=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let u=n[l],f=co(u);const d=t[l];let h;if(fu(d)){const p=d.length,g=d[0]===null?1:0;u=d[g],f=co(u);for(let v=g;v<p&&d[v]!==null;v++)h?k0(co(d[v])===h):h=co(d[v])}else h=co(d);if(f!==h)if(u4(f)&&u4(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof d=="string"?t[l]=parseFloat(d):Array.isArray(d)&&h===le&&(t[l]=d.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(u===0||d===0)?u===0?c.set(h.transform(u)):t[l]=f.transform(d):(s||(a=Wj(e),s=!0),o.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(d))}),o.length){const l=o.indexOf("height")>=0?window.pageYOffset:null,c=Yj(t,e,o);return a.length&&a.forEach(([u,f])=>{e.getValue(u).set(f)}),e.render(),pf&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Qj(e,t,n,r){return Gj(t)?qj(e,t,n,r):{target:t,transitionEnd:r}}const Xj=(e,t,n,r)=>{const i=jj(e,t,r);return t=i.target,r=i.transitionEnd,Qj(e,t,n,r)},Mm={current:null},e6={current:!1};function Zj(){if(e6.current=!0,!!pf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mm.current=e.matches;e.addListener(t),t()}else Mm.current=!1}function Jj(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],s=n[i];if(Vt(a))e.addValue(i,a),pu(r)&&r.add(i);else if(Vt(s))e.addValue(i,ks(a,{owner:e})),pu(r)&&r.remove(i);else if(s!==a)if(e.hasValue(i)){const o=e.getValue(i);!o.hasAnimated&&o.set(a)}else{const o=e.getStaticValue(i);e.addValue(i,ks(o!==void 0?o:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const h4=new WeakMap,t6=Object.keys(vl),e$=t6.length,m4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],t$=_0.length;class n${constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>He.render(this.render,!1,!0);const{latestValues:o,renderState:l}=a;this.latestValues=o,this.baseTarget={...o},this.initialValues=n.initial?{...o}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Ef(n),this.isVariantNode=Ub(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const d=u[f];o[f]!==void 0&&Vt(d)&&(d.set(o[f],!1),pu(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,h4.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),e6.current||Zj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){h4.delete(this.current),this.projection&&this.projection.unmount(),Dr(this.notifyUpdate),Dr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ca.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&He.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let s,o;for(let l=0;l<e$;l++){const c=t6[l],{isEnabled:u,Feature:f,ProjectionNode:d,MeasureLayout:h}=vl[c];d&&(s=d),u(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),h&&(o=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&as(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:d,layoutRoot:h})}return o}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<m4.length;r++){const i=m4[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a=t["on"+i];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Jj(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<t$;r++){const i=_0[r],a=this.props[i];(_l(a)||a===!1)&&(n[i]=a)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ks(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=w0(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Vt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new F0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class n6 extends n${sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let s=vz(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),a){yz(this,r,s);const o=Xj(this,r,s,n);n=o.transitionEnd,r=o.target}return{transition:t,transitionEnd:n,...r}}}function r$(e){return window.getComputedStyle(e)}class i$ extends n6{readValueFromInstance(t,n){if(Ca.has(n)){const r=M0(n);return r&&r.default||0}else{const r=r$(t),i=(Gb(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return G3(t,n)}build(t,n,r,i){b0(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return x0(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Qb(t,n,r,i)}}class a$ extends n6{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ca.has(n)){const r=M0(n);return r&&r.default||0}return n=Xb.has(n)?n:C0(n),t.getAttribute(n)}measureInstanceViewportBox(){return rt()}scrapeMotionValuesFromProps(t,n){return Jb(t,n)}build(t,n,r,i){A0(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Zb(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const s$=(e,t)=>v0(e)?new a$(t,{enableHardwareAcceleration:!1}):new i$(t,{enableHardwareAcceleration:!0}),o$={layout:{ProjectionNode:Z3,MeasureLayout:V3}},l$={...Pz,...tH,...Uj,...o$},c$=cU((e,t)=>jU(e,t,l$,s$)),u$=[{position:{left:0,top:0},delay:.1},{position:{left:16,top:0},delay:.05},{position:{left:32,top:0},delay:0},{position:{left:0,top:16},delay:.15},{position:{left:16,top:16},delay:.2},{position:{left:32,top:16},delay:.25},{position:{left:0,top:32},delay:.4},{position:{left:16,top:32},delay:.35},{position:{left:32,top:32},delay:.3}],B0=({color:e})=>_.jsx("div",{className:"relative h-[34px] w-[34px]",role:"progressbar",children:u$.map(({position:t,delay:n},r)=>_.jsx(c$.div,{className:`absolute ${e?"bg-"+e:"bg-ide-highlight"} left-[${t.left}px] top-[${t.top}px] h-[2px] w-[2px]`,animate:{opacity:[0,1,1,0,0]},transition:{delay:n,duration:1,repeat:1/0,times:[0,.1,.6,.7,1],repeatDelay:1}},r))}),f$=({initiallyCollapsed:e,title:t,grow:n,children:r,headerChildren:i,focusCommand:a})=>{const[s,o]=L.useState(e),l=L.useCallback(({data:c})=>{c.command===a&&o(()=>!1)},[a]);return L.useEffect(()=>{if(a)return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[a,l]),_.jsxs("section",{className:$e("flex flex-col",n&&!s?"grow overflow-hidden":"grow-0"),children:[_.jsxs("header",{className:"flex flex-row items-center justify-between border-b border-b-ide-border px-2 py-1",children:[_.jsxs("div",{className:"flex cursor-pointer flex-row items-center gap-2 hover:opacity-80",onClick:()=>o(c=>!c),children:[s?_.jsx(_e.ChevronRight,{}):_.jsx(_e.ChevronDown,{}),_.jsx("h1",{className:"font-bold",children:t})]}),_.jsx("div",{className:$e(s?"invisible":"visible"),children:i})]}),_.jsx("main",{className:$e("flex flex-col",n&&!s&&"grow",s?"hidden":"block overflow-hidden"),children:r})]})},p4=({message:e})=>{window.sourceryLS.postMessage({message:e})},d$=()=>{const[{recipes:e,status:t},n]=L.useState({recipes:[],status:"pending"}),r=L.useCallback(({data:{command:i,recipes:a}})=>{switch(i){case"recipes/addRecipes":n(gt(s=>{s.status="ok",s.recipes=a}))}},[]);return L.useEffect(()=>(window.addEventListener("message",r),()=>window.removeEventListener("message",r)),[r]),L.useEffect(()=>{p4({message:$B})},[]),_.jsx("section",{className:"h-fit grow overflow-y-auto p-2",children:t==="pending"?_.jsx("div",{className:"flex h-20 flex-col items-center justify-center",children:_.jsx(B0,{})}):_.jsx("ul",{className:"flex flex-col gap-2",children:e.map(({id:i,name:a},s)=>_.jsx("li",{children:_.jsx("button",{className:"btn-primary w-full rounded border border-ide-primary-btn-border p-1 text-center",onClick:()=>{p4({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:i,name:a,trigger:"recipeViewButton"}})},children:a})},s))})})},h$=({value:e=null,onChange:t=()=>{}})=>{const[n,r]=L.useState(e),i=L.useCallback(a=>()=>{r(()=>a),t(a)},[t]);return _.jsxs("div",{className:"flex flex-row items-center gap-1",children:[n==="liked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Like":void 0,children:_.jsx(_e.ThumbsUp.Solid,{})}):_.jsx("button",{onClick:i("liked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Like":void 0,children:_.jsx(_e.ThumbsUp.Regular,{})}),n==="disliked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Dislike":void 0,children:_.jsx(_e.ThumbsDown.Solid,{})}):_.jsx("button",{onClick:i("disliked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Dislike":void 0,children:_.jsx(_e.ThumbsDown.Regular,{})})]})},m$=e=>e.contextType==="uri",r6=e=>e.contextType==="location",p$=e=>m$(e)?e.uri:r6(e)?e.location.uri:null,g$=e=>r6(e)?e.location.range:null,E$=({message:e})=>{window.sourceryLS.postMessage({message:e})},i6=({contextIndicators:e,className:t})=>!e||!e.length?null:_.jsx("div",{className:$e("flex flex-row gap-2 flex-wrap",t),children:e.map((n,r)=>{const i=p$(n),a=i?()=>{E$({message:{target:"extension",request:"openLink",linkType:"file",link:i.slice(7),documentRange:g$(n)}})}:void 0;return _.jsxs("span",{className:$e("text-sm text-ide-disabled-text",a&&"cursor-pointer hover:text-ide-primary-btn-bg"),onClick:a,children:[n.tag&&_.jsxs("span",{className:"font-bold",children:[n.tag,": "]}),n.label]},r)})}),Sl=({message:e})=>{window.sourceryLS.postMessage({message:e})},g4=({message:{outcome:e,textContent:t,requestId:n,contextIndicators:r}})=>{const[i,a]=L.useState(!1),s=L.useCallback(o=>{n&&(Sl({message:{target:"languageServer",view:"chat",request:"sendFeedback",feedback:o,requestId:n}}),a(!0))},[n]);return _.jsx("div",{className:"flex flex-row justify-start",children:_.jsxs("div",{className:$e("assistant-message border border-ide-border relative flex flex-col",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:[_.jsx("div",{className:$e(n?"mb-5":"mb-2"),children:t?_.jsx(is,{markdown:t}):_.jsx(Db,{})}),n&&_.jsxs("div",{className:"ml-auto mt-2 flex flex-col",title:i?void 0:"Send feedback on this result",children:[_.jsx("div",{className:"ml-auto",children:_.jsx(h$,{onChange:s})}),i&&_.jsx("div",{children:_.jsx("a",{className:"break-words underline hover:cursor-pointer",href:`https://research.typeform.com/to/JmPsEwTM#chat_request=${n}`,children:"Give more feedback"})})]}),_.jsx(i6,{contextIndicators:r,className:"justify-start"})]})})},T$=({message:{textContent:e,contextIndicators:t}})=>_.jsx("div",{className:"flex flex-row justify-end",children:_.jsxs("div",{className:"rounded-lg-br-none ml-4 flex w-fit flex-col gap-1 border border-ide-border bg-ide-chat-input-bg px-4 py-2 text-ide-chat-input-text",children:[_.jsx("p",{children:e}),_.jsx(i6,{contextIndicators:t,className:"justify-end"})]})}),y$=()=>_.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[_.jsx("span",{children:_.jsx(_e.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),_$=L.forwardRef((e,t)=>{const[n,r]=L.useState(),i=L.useRef(null),a=L.useRef(null),s=L.useCallback(()=>{var u;(u=a.current)==null||u.focus()},[]);L.useImperativeHandle(t,()=>({focus:s}),[s]);const o=L.useCallback(({data:u})=>{switch(u.command){case"chat/focus":s()}},[s]);L.useEffect(()=>(window.addEventListener("message",o),()=>window.removeEventListener("message",o)),[o]),L.useEffect(()=>(window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)),[s]);const l=u=>{u.preventDefault(),n&&(Sl({message:{target:"languageServer",view:"chat",request:"sendMessage",textContent:n}}),r(""))},c=L.useCallback(u=>{var f;u.key=="Enter"&&!u.shiftKey&&(u.preventDefault(),(f=i.current)==null||f.requestSubmit())},[]);return _.jsx("div",{className:"relative w-full",children:_.jsxs("form",{onSubmit:l,ref:i,autoFocus:!0,children:[_.jsx("textarea",{name:"chatPrompt",id:"chatPrompt",placeholder:"Type your message here!",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",value:n,onChange:({target:{value:u}})=>r(u),onKeyDown:c,ref:a,autoFocus:!0}),_.jsx("button",{className:"absolute right-3 top-3",type:"submit",children:_.jsx(_e.PaperPlane,{className:"h-4 w-4"})})]})})}),v$=()=>_.jsxs("button",{className:"flex flex-row items-center gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Sl({message:zB})},children:[_.jsx("span",{children:_.jsx(_e.Plus,{})}),_.jsx("span",{children:"New Chat"})]}),b$=L.forwardRef(({className:e},t)=>{const[{messages:n,currentMessage:r},i]=L.useState({messages:[],currentMessage:null}),a=L.useRef(null),s=iv(a),o=L.useRef(null),l=L.useCallback(u=>{switch(u.role){case"user":{i(gt(f=>{f.messages.push(u),f.currentMessage={role:"assistant",outcome:"success",textContent:""}})),a.current&&rv(a.current);break}case"assistant":i(gt(f=>{f.currentMessage&&u.outcome==="success"?f.currentMessage.textContent+=u.textContent:f.currentMessage&&f.currentMessage.textContent&&u.outcome==="error"?(f.messages.push(f.currentMessage,u),f.currentMessage=null):u.outcome==="error"?(f.messages.push(u),f.currentMessage=null):u.outcome==="finished"?(f.currentMessage&&f.currentMessage.textContent&&(f.currentMessage.requestId=u.requestId,f.currentMessage.contextIndicators=u.contextIndicators,f.messages.push(f.currentMessage)),f.currentMessage=null):f.currentMessage=u}))}},[]),c=L.useCallback(({data:u})=>{switch(u.command){case"chat/addMessage":l(u.message);break;case"chat/clear":i(gt(f=>{f.messages=[],f.currentMessage=null}));break;case"chat/notifyCancel":i(gt(f=>{f.currentMessage&&f.currentMessage.textContent.length&&(f.currentMessage.requestId=u.requestId||void 0,f.messages.push(f.currentMessage)),f.messages.push("cancellationNotification"),f.currentMessage=null}))}},[l]);return L.useImperativeHandle(t,()=>({focus:()=>{var u;(u=o.current)==null||u.focus()}})),L.useLayoutEffect(()=>{s()},[r==null?void 0:r.textContent,n.length,s]),L.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),L.useEffect(()=>{Sl({message:HB})},[]),_.jsxs("div",{className:e,"data-testid":"chat-view",children:[n.length===0&&r===null?_.jsx("div",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(B0,{})}):_.jsxs("section",{className:"flex grow flex-col gap-4 overflow-auto p-2",ref:a,children:[n.map((u,f)=>{if(u==="cancellationNotification")return _.jsx(y$,{});switch(u.role){case"assistant":return _.jsx(g4,{message:u},f);case"user":return _.jsx(T$,{message:u},f)}}),r&&_.jsx(g4,{message:r})]}),_.jsxs("footer",{className:$e("flex grow-0 flex-col gap-2 border-t border-t-ide-border p-2"),children:[_.jsx("div",{className:"flex flex-row justify-center",children:_.jsxs("button",{disabled:r===null,className:"flex w-fit flex-row items-center gap-2 p-2 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:u=>{var f;u.stopPropagation(),(f=o.current)==null||f.focus(),Sl({message:jB})},children:[_.jsx(_e.CirclePause,{}),_.jsx("span",{children:"Cancel"})]})}),_.jsx(_$,{ref:o})]}),_.jsx("div",{className:"flex h-1 w-full bg-ide-border"}),_.jsx(f$,{title:"Recipes",children:_.jsx(d$,{})})]})}),S$=({chart:e,title:t})=>{const[n,r]=L.useState(""),[i,a]=L.useState(!1);return L.useEffect(()=>{(async()=>{try{const o=btoa(e),l=document.documentElement.classList.contains("dark")?"dark":"default",c=`https://mermaid.ink/svg/${o}?theme=${l}&width=800`;r(c),a(!1)}catch(o){console.error("Failed to render mermaid diagram:",o),a(!0)}})()},[e]),i?null:_.jsxs("div",{className:"group relative my-4",children:[_.jsxs("div",{className:"relative mb-2 flex flex-row flex-nowrap items-center gap-4",children:[_.jsx("div",{className:"font-medium",children:t}),_.jsxs("div",{className:"invisible absolute right-0 top-0 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:[_.jsx(A$,{imageUrl:n}),_.jsx(N$,{code:e})]})]}),_.jsx("div",{className:"w-full",children:n&&_.jsx("img",{src:n,alt:"Mermaid diagram",className:"h-auto w-full",onError:()=>a(!0)})})]})},A$=({imageUrl:e})=>_.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Open diagram in new tab",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",children:_.jsx(_e.FileExport,{})}),N$=({code:e})=>{const[t,n]=L.useState(!1);return _.jsx("button",{title:"Copy diagram code",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{na({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(_e.Check,{}):_.jsx(_e.Copy,{})})},a6={selectedTab:"review",selectedReviewOption:"current"},vf=L.createContext({uiState:a6,updateUIState:e=>{console.warn("Default updateUIState called - this means you are using the context outside of UIStateProvider!",e)}}),s6={isFeatureFlagEnabled:!1,isAuthenticated:!1,isAuthorized:!1,isRepositoryOpenSource:!1,isConfigEnabled:!1,showCodeLens:!0,isGitRepository:!1,branches:[]},bf=L.createContext(s6),C$=bf.Provider,x$=({disabled:e,isOpen:t,setIsOpen:n,selectedReviewOption:r,selectedBranch:i,updateUIState:a,isGitRepository:s,branches:o,onRefresh:l})=>{const c=()=>{switch(r){case"current":return"Review current file";case"head":return"Compare with HEAD";case"branch":return`Compare with ${i}`;default:return"Select comparison"}};return _.jsxs("div",{className:"relative",children:[_.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-2 rounded border border-ide-border bg-ide-editor-bg px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>n(!t),disabled:e,children:[_.jsxs("div",{className:"flex items-center gap-2",children:[r==="current"?_.jsx(_e.File,{className:"h-4 w-4 opacity-70"}):_.jsx(_e.Git,{className:"h-4 w-4 opacity-70"}),_.jsx("span",{children:c()})]}),_.jsx(_e.ChevronDown,{className:"h-4 w-4 opacity-50"})]}),t&&_.jsxs("div",{className:"absolute left-0 top-full z-10 mt-1 w-full rounded border border-ide-border bg-ide-editor-bg shadow-lg",children:[_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"current"}),n(!1)},children:[_.jsx(_e.File,{className:"h-4 w-4"}),"Review current file"]}),s&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"border-t border-ide-border"}),_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"head"}),n(!1)},children:[_.jsx(_e.Git,{className:"h-4 w-4"}),"Compare with HEAD"]}),_.jsx("div",{className:"border-t border-ide-border"}),_.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[_.jsx("span",{className:"text-sm opacity-70",children:"Compare with branch:"}),_.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),l()},className:"flex items-center justify-center rounded p-1 hover:bg-ide-chat-input-bg",title:"Refresh branches",children:_.jsx(_e.Refresh,{})})]}),_.jsx("div",{className:"max-h-[256px] overflow-y-auto",children:o.map(u=>_.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"branch",selectedBranch:u.name}),n(!1)},children:[_.jsx(_e.Git,{className:"h-4 w-4"}),_.jsxs("span",{className:"flex items-center gap-2",children:[u.name,u.isDefault&&_.jsx("span",{className:"rounded bg-ide-border px-1.5 py-0.5 text-xs opacity-70",children:"default"})]})]},u.name))})]})]})]})},Is=({message:e})=>{window.sourceryLS.postMessage({message:e})},cs=({outcome:e,textContent:t})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:$e("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:t?_.jsx(is,{markdown:t}):_.jsx(Db,{})})}),w$=({diagrams:e})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:$e("rounded-lg-bl-none mr-4 rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg"),children:e.map((t,n)=>_.jsx("div",{children:_.jsx(S$,{chart:t.diagram,title:t.title})},n))})}),k$=({summary:e,follow_up_comment:t,file:n,location:r,diff_line_for_comment:i,diff_context:a,area:s,comment_type:o,formatted_fix:l,fix:c,resolved:u,outdated:f})=>{const[d,h]=L.useState(u);L.useEffect(()=>{h(u)},[u]);const p=L.useCallback(()=>{Is({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"apply",file:n,diff_line_for_comment:i,fix:c}})},[n,i,c]),g=()=>{h(!d)};return _.jsx("div",{className:"flex w-full flex-row justify-start",children:_.jsxs("div",{className:$e("rounded-lg-bl-none mr-4 w-full rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg","relative"),children:[f&&_.jsx("div",{className:$e("absolute right-2 top-2 rounded-full border border-ide-warning-bg bg-transparent px-2 py-0.5 text-xs text-ide-text",{"opacity-50":u}),children:"outdated"}),_.jsxs("div",{className:$e({"opacity-50":u}),children:[_.jsxs("div",{className:"flex items-center gap-2 pr-16",children:[_.jsx(_e.ChevronRight,{className:$e("transition-transform flex-shrink-0 mt-[2px] cursor-pointer hover:opacity-80",{"rotate-90":!d}),onClick:g}),_.jsxs("div",{className:"relative grow overflow-hidden",children:[_.jsx("div",{className:"truncate",children:_.jsx(is,{markdown:r})}),_.jsx("div",{className:"pointer-events-none absolute right-0 top-0 h-full w-4 bg-gradient-to-r from-transparent via-transparent to-ide-chat-input-bg"})]})]}),_.jsx("div",{className:"mt-2 flex flex-row gap-2",children:_.jsxs("span",{className:"text-sm",children:[_.jsx("span",{className:"font-bold",children:o}),_.jsx("span",{children:"("}),_.jsx("span",{className:"italic",children:s}),_.jsx("span",{children:"): "}),_.jsx("span",{children:e})]})})]}),!d&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:$e({"opacity-50":u}),children:[_.jsx(is,{markdown:a,hideCodeButtons:!0}),_.jsx(is,{markdown:t}),l&&_.jsxs("div",{className:"mt-2 border-t border-ide-border pt-2",children:[_.jsx("div",{className:"text-sm font-bold",children:"Suggested Fix:"}),_.jsx(is,{markdown:l,hideCodeButtons:!0,onApplyFix:!u&&!f?p:void 0})]})]}),_.jsx("div",{className:"mt-2 flex flex-row justify-end",children:_.jsxs("button",{onClick:()=>Is({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:u?"unresolved":"resolved",file:n,diff_line_for_comment:i}}),title:u?"Mark this comment as unresolved.":"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-full border border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(_e.Check,{})," ",u?"Unresolve":"Resolve"]})})]})]})})},O$=({summary:e,running:t})=>e&&e.textContent?_.jsx(cs,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?_.jsx(cs,{outcome:"success",textContent:"Generating detailed review - this might take a little while...",type:"text"}):null,I$=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Is({message:Pb})},children:[_.jsx("span",{children:_.jsx(_e.Plus,{})}),_.jsx("span",{children:"New Review"})]}),R$=({disabled:e})=>{const{uiState:t,updateUIState:n}=L.useContext(vf),r=L.useContext(bf),[i,a]=L.useState(!1),[s,o]=L.useState(!1),l=L.useCallback(()=>{window.sourceryLS.postMessage({message:Lb})},[]),c=L.useCallback(f=>{f.preventDefault(),o(!0),Is({message:Pb}),Is({message:{target:"languageServer",view:"review",request:"review",comparisonType:t.selectedReviewOption,branch:t.selectedBranch}})},[t.selectedReviewOption,t.selectedBranch]);L.useEffect(()=>{e||o(!1)},[e]);const u=e||s;return _.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:c,children:[_.jsx("div",{className:"grow",children:_.jsx(x$,{disabled:u,isOpen:i,setIsOpen:a,selectedReviewOption:t.selectedReviewOption,selectedBranch:t.selectedBranch,updateUIState:n,isGitRepository:r.isGitRepository,branches:r.branches,onRefresh:l})}),_.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",disabled:u,children:u?"Review in progress...":"Review My Code"})]})},M$=()=>_.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[_.jsx("span",{children:_.jsx(_e.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),L$=({className:e})=>{const[{overview:t,change_summary:n,summary:r,diagram:i,comments:a,error:s,cancelled:o,running:l,running_detailed:c},u]=L.useState({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1}),f=L.useRef(null),d=iv(f),h=L.useCallback(({data:p})=>{switch(p.command){case"review/addOverviewMessage":u(gt(g=>{g.running=!0,g.overview=p.message}));break;case"review/addChangeSummaryMessage":u(gt(g=>{g.change_summary?g.change_summary.textContent+=p.message.textContent:g.change_summary=p.message}));break;case"review/addSummaryMessage":u(gt(g=>{g.summary=p.message}));break;case"review/addCommentMessage":u(gt(g=>{g.comments.push(p.comment)}));break;case"review/addErrorMessage":u(gt(g=>{g.error=p.message}));break;case"review/clear":u(gt(()=>({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1})));break;case"review/notifyCancel":u(gt(g=>{g.cancelled=!0}));break;case"review/notifyStreamingComplete":u(gt(g=>{g.running_detailed=!0}));break;case"review/notifyComplete":u(gt(g=>{g.running=!1,g.running_detailed=!1}));break;case"review/addDiagramMessage":u(gt(g=>{g.diagram=p.message}));break;case"review/updateComment":u(gt(g=>{const v=g.comments.findIndex(E=>E.comment.file.trim()===p.comment.comment.file.trim()&&E.comment.diff_line_for_comment===p.comment.comment.diff_line_for_comment);v!==-1&&(g.comments[v].comment=p.comment.comment)}));break}},[]);return L.useLayoutEffect(()=>{d()},[a.length,d]),L.useEffect(()=>(window.addEventListener("message",h),()=>window.removeEventListener("message",h)),[h]),_.jsxs("div",{className:e,"data-testid":"review-view",children:[_.jsx(R$,{disabled:l}),_.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:f,children:[t&&_.jsxs(_.Fragment,{children:[_.jsx(cs,{outcome:t.outcome,textContent:t.textContent,type:"text"})," "]}),n&&_.jsx(_.Fragment,{children:_.jsx(cs,{outcome:n.outcome,textContent:n.textContent,type:"text"})}),t&&_.jsx(_.Fragment,{children:_.jsx(O$,{summary:r,running:c})}),i&&_.jsx(w$,{diagrams:i.diagrams,type:"diagrams"}),a.map((p,g)=>_.jsx(k$,{...p.comment},g)),c&&_.jsx(cs,{outcome:"success",textContent:"",type:"text"}),o&&_.jsx(M$,{}),s&&_.jsx(cs,{outcome:s.outcome,textContent:s.textContent,type:"text"})]}),_.jsx("footer",{className:$e(l?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:_.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>Is({message:GB}),children:[_.jsx(_e.Cancel,{}),_.jsx("span",{children:"Cancel"})]})})]})},P$=""+new URL("sourcery-logo.svg",import.meta.url).href;var E4=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},T4=typeof window<"u"&&window.document&&window.document.createElement?L.useLayoutEffect:L.useEffect,$t="top",vn="bottom",bn="right",Gt="left",U0="auto",Kl=[$t,vn,bn,Gt],Rs="start",Al="end",D$="clippingParents",o6="viewport",fo="popper",F$="reference",y4=Kl.reduce(function(e,t){return e.concat([t+"-"+Rs,t+"-"+Al])},[]),l6=[].concat(Kl,[U0]).reduce(function(e,t){return e.concat([t,t+"-"+Rs,t+"-"+Al])},[]),B$="beforeRead",U$="read",H$="afterRead",z$="beforeMain",j$="main",$$="afterMain",G$="beforeWrite",V$="write",K$="afterWrite",W$=[B$,U$,H$,z$,j$,$$,G$,V$,K$];function lr(e){return e?(e.nodeName||"").toLowerCase():null}function an(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ta(e){var t=an(e).Element;return e instanceof t||e instanceof Element}function Tn(e){var t=an(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function H0(e){if(typeof ShadowRoot>"u")return!1;var t=an(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Y$(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!Tn(a)||!lr(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function q$(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),o=s.reduce(function(l,c){return l[c]="",l},{});!Tn(i)||!lr(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const Q$={name:"applyStyles",enabled:!0,phase:"write",fn:Y$,effect:q$,requires:["computeStyles"]};function or(e){return e.split("-")[0]}var oa=Math.max,Eu=Math.min,Ms=Math.round;function Lm(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function c6(){return!/^((?!chrome|android).)*safari/i.test(Lm())}function Ls(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Tn(e)&&(i=e.offsetWidth>0&&Ms(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ms(r.height)/e.offsetHeight||1);var s=Ta(e)?an(e):window,o=s.visualViewport,l=!c6()&&n,c=(r.left+(l&&o?o.offsetLeft:0))/i,u=(r.top+(l&&o?o.offsetTop:0))/a,f=r.width/i,d=r.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function z0(e){var t=Ls(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function u6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&H0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Fr(e){return an(e).getComputedStyle(e)}function X$(e){return["table","td","th"].indexOf(lr(e))>=0}function Pi(e){return((Ta(e)?e.ownerDocument:e.document)||window.document).documentElement}function Sf(e){return lr(e)==="html"?e:e.assignedSlot||e.parentNode||(H0(e)?e.host:null)||Pi(e)}function _4(e){return!Tn(e)||Fr(e).position==="fixed"?null:e.offsetParent}function Z$(e){var t=/firefox/i.test(Lm()),n=/Trident/i.test(Lm());if(n&&Tn(e)){var r=Fr(e);if(r.position==="fixed")return null}var i=Sf(e);for(H0(i)&&(i=i.host);Tn(i)&&["html","body"].indexOf(lr(i))<0;){var a=Fr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Wl(e){for(var t=an(e),n=_4(e);n&&X$(n)&&Fr(n).position==="static";)n=_4(n);return n&&(lr(n)==="html"||lr(n)==="body"&&Fr(n).position==="static")?t:n||Z$(e)||t}function j0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Go(e,t,n){return oa(e,Eu(t,n))}function J$(e,t,n){var r=Go(e,t,n);return r>n?n:r}function f6(){return{top:0,right:0,bottom:0,left:0}}function d6(e){return Object.assign({},f6(),e)}function h6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var eG=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,d6(typeof t!="number"?t:h6(t,Kl))};function tG(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=or(n.placement),l=j0(o),c=[Gt,bn].indexOf(o)>=0,u=c?"height":"width";if(!(!a||!s)){var f=eG(i.padding,n),d=z0(a),h=l==="y"?$t:Gt,p=l==="y"?vn:bn,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],v=s[l]-n.rects.reference[l],E=Wl(a),T=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,y=g/2-v/2,S=f[h],w=T-d[u]-f[p],A=T/2-d[u]/2+y,N=Go(S,A,w),R=l;n.modifiersData[r]=(t={},t[R]=N,t.centerOffset=N-A,t)}}function nG(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||u6(t.elements.popper,i)&&(t.elements.arrow=i))}const rG={name:"arrow",enabled:!0,phase:"main",fn:tG,effect:nG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ps(e){return e.split("-")[1]}var iG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aG(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ms(n*i)/i||0,y:Ms(r*i)/i||0}}function v4(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=s.x,h=d===void 0?0:d,p=s.y,g=p===void 0?0:p,v=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var E=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),y=Gt,S=$t,w=window;if(c){var A=Wl(n),N="clientHeight",R="clientWidth";if(A===an(n)&&(A=Pi(n),Fr(A).position!=="static"&&o==="absolute"&&(N="scrollHeight",R="scrollWidth")),A=A,i===$t||(i===Gt||i===bn)&&a===Al){S=vn;var D=f&&A===w&&w.visualViewport?w.visualViewport.height:A[N];g-=D-r.height,g*=l?1:-1}if(i===Gt||(i===$t||i===vn)&&a===Al){y=bn;var O=f&&A===w&&w.visualViewport?w.visualViewport.width:A[R];h-=O-r.width,h*=l?1:-1}}var B=Object.assign({position:o},c&&iG),z=u===!0?aG({x:h,y:g},an(n)):{x:h,y:g};if(h=z.x,g=z.y,l){var Q;return Object.assign({},B,(Q={},Q[S]=T?"0":"",Q[y]=E?"0":"",Q.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",Q))}return Object.assign({},B,(t={},t[S]=T?g+"px":"",t[y]=E?h+"px":"",t.transform="",t))}function sG(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,s=a===void 0?!0:a,o=n.roundOffsets,l=o===void 0?!0:o,c={placement:or(t.placement),variation:Ps(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,v4(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,v4(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const oG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sG,data:{}};var Y1={passive:!0};function lG(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,s=r.resize,o=s===void 0?!0:s,l=an(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",n.update,Y1)}),o&&l.addEventListener("resize",n.update,Y1),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Y1)}),o&&l.removeEventListener("resize",n.update,Y1)}}const cG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lG,data:{}};var uG={left:"right",right:"left",bottom:"top",top:"bottom"};function yc(e){return e.replace(/left|right|bottom|top/g,function(t){return uG[t]})}var fG={start:"end",end:"start"};function b4(e){return e.replace(/start|end/g,function(t){return fG[t]})}function $0(e){var t=an(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function G0(e){return Ls(Pi(e)).left+$0(e).scrollLeft}function dG(e,t){var n=an(e),r=Pi(e),i=n.visualViewport,a=r.clientWidth,s=r.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;var c=c6();(c||!c&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:o+G0(e),y:l}}function hG(e){var t,n=Pi(e),r=$0(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=oa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=oa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-r.scrollLeft+G0(e),l=-r.scrollTop;return Fr(i||n).direction==="rtl"&&(o+=oa(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:l}}function V0(e){var t=Fr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m6(e){return["html","body","#document"].indexOf(lr(e))>=0?e.ownerDocument.body:Tn(e)&&V0(e)?e:m6(Sf(e))}function Vo(e,t){var n;t===void 0&&(t=[]);var r=m6(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=an(r),s=i?[a].concat(a.visualViewport||[],V0(r)?r:[]):r,o=t.concat(s);return i?o:o.concat(Vo(Sf(s)))}function Pm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mG(e,t){var n=Ls(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function S4(e,t,n){return t===o6?Pm(dG(e,n)):Ta(t)?mG(t,n):Pm(hG(Pi(e)))}function pG(e){var t=Vo(Sf(e)),n=["absolute","fixed"].indexOf(Fr(e).position)>=0,r=n&&Tn(e)?Wl(e):e;return Ta(r)?t.filter(function(i){return Ta(i)&&u6(i,r)&&lr(i)!=="body"}):[]}function gG(e,t,n,r){var i=t==="clippingParents"?pG(e):[].concat(t),a=[].concat(i,[n]),s=a[0],o=a.reduce(function(l,c){var u=S4(e,c,r);return l.top=oa(u.top,l.top),l.right=Eu(u.right,l.right),l.bottom=Eu(u.bottom,l.bottom),l.left=oa(u.left,l.left),l},S4(e,s,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function p6(e){var t=e.reference,n=e.element,r=e.placement,i=r?or(r):null,a=r?Ps(r):null,s=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2,l;switch(i){case $t:l={x:s,y:t.y-n.height};break;case vn:l={x:s,y:t.y+t.height};break;case bn:l={x:t.x+t.width,y:o};break;case Gt:l={x:t.x-n.width,y:o};break;default:l={x:t.x,y:t.y}}var c=i?j0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Rs:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Al:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Nl(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,o=n.boundary,l=o===void 0?D$:o,c=n.rootBoundary,u=c===void 0?o6:c,f=n.elementContext,d=f===void 0?fo:f,h=n.altBoundary,p=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,E=d6(typeof v!="number"?v:h6(v,Kl)),T=d===fo?F$:fo,y=e.rects.popper,S=e.elements[p?T:d],w=gG(Ta(S)?S:S.contextElement||Pi(e.elements.popper),l,u,s),A=Ls(e.elements.reference),N=p6({reference:A,element:y,strategy:"absolute",placement:i}),R=Pm(Object.assign({},y,N)),D=d===fo?R:A,O={top:w.top-D.top+E.top,bottom:D.bottom-w.bottom+E.bottom,left:w.left-D.left+E.left,right:D.right-w.right+E.right},B=e.modifiersData.offset;if(d===fo&&B){var z=B[i];Object.keys(O).forEach(function(Q){var X=[bn,vn].indexOf(Q)>=0?1:-1,q=[$t,vn].indexOf(Q)>=0?"y":"x";O[Q]+=z[q]*X})}return O}function EG(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,o=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?l6:l,u=Ps(r),f=u?o?y4:y4.filter(function(p){return Ps(p)===u}):Kl,d=f.filter(function(p){return c.indexOf(p)>=0});d.length===0&&(d=f);var h=d.reduce(function(p,g){return p[g]=Nl(e,{placement:g,boundary:i,rootBoundary:a,padding:s})[or(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function TG(e){if(or(e)===U0)return[];var t=yc(e);return[b4(e),t,b4(t)]}function yG(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,g=n.allowedAutoPlacements,v=t.options.placement,E=or(v),T=E===v,y=l||(T||!p?[yc(v)]:TG(v)),S=[v].concat(y).reduce(function(pe,me){return pe.concat(or(me)===U0?EG(t,{placement:me,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):me)},[]),w=t.rects.reference,A=t.rects.popper,N=new Map,R=!0,D=S[0],O=0;O<S.length;O++){var B=S[O],z=or(B),Q=Ps(B)===Rs,X=[$t,vn].indexOf(z)>=0,q=X?"width":"height",ae=Nl(t,{placement:B,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),F=X?Q?bn:Gt:Q?vn:$t;w[q]>A[q]&&(F=yc(F));var M=yc(F),H=[];if(a&&H.push(ae[z]<=0),o&&H.push(ae[F]<=0,ae[M]<=0),H.every(function(pe){return pe})){D=B,R=!1;break}N.set(B,H)}if(R)for(var b=p?3:1,j=function(me){var oe=S.find(function(ze){var Ge=N.get(ze);if(Ge)return Ge.slice(0,me).every(function(fe){return fe})});if(oe)return D=oe,"break"},te=b;te>0;te--){var x=j(te);if(x==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const _G={name:"flip",enabled:!0,phase:"main",fn:yG,requiresIfExists:["offset"],data:{_skip:!1}};function A4(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function N4(e){return[$t,bn,vn,Gt].some(function(t){return e[t]>=0})}function vG(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=Nl(t,{elementContext:"reference"}),o=Nl(t,{altBoundary:!0}),l=A4(s,r),c=A4(o,i,a),u=N4(l),f=N4(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const bG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vG};function SG(e,t,n){var r=or(e),i=[Gt,$t].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[Gt,bn].indexOf(r)>=0?{x:o,y:s}:{x:s,y:o}}function AG(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,s=l6.reduce(function(u,f){return u[f]=SG(f,t.rects,a),u},{}),o=s[t.placement],l=o.x,c=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const NG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AG};function CG(e){var t=e.state,n=e.name;t.modifiersData[n]=p6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xG={name:"popperOffsets",enabled:!0,phase:"read",fn:CG,data:{}};function wG(e){return e==="x"?"y":"x"}function kG(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,o=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,h=d===void 0?!0:d,p=n.tetherOffset,g=p===void 0?0:p,v=Nl(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),E=or(t.placement),T=Ps(t.placement),y=!T,S=j0(E),w=wG(S),A=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,D=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(A){if(a){var Q,X=S==="y"?$t:Gt,q=S==="y"?vn:bn,ae=S==="y"?"height":"width",F=A[S],M=F+v[X],H=F-v[q],b=h?-R[ae]/2:0,j=T===Rs?N[ae]:R[ae],te=T===Rs?-R[ae]:-N[ae],x=t.elements.arrow,pe=h&&x?z0(x):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:f6(),oe=me[X],ze=me[q],Ge=Go(0,N[ae],pe[ae]),fe=y?N[ae]/2-b-Ge-oe-O.mainAxis:j-Ge-oe-O.mainAxis,ut=y?-N[ae]/2+b+Ge+ze+O.mainAxis:te+Ge+ze+O.mainAxis,nt=t.elements.arrow&&Wl(t.elements.arrow),xn=nt?S==="y"?nt.clientTop||0:nt.clientLeft||0:0,ur=(Q=B==null?void 0:B[S])!=null?Q:0,jr=F+fe-ur-xn,wa=F+ut-ur,_t=Go(h?Eu(M,jr):M,F,h?oa(H,wa):H);A[S]=_t,z[S]=_t-F}if(o){var Di,$r=S==="x"?$t:Gt,ce=S==="x"?vn:bn,Wt=A[w],Me=w==="y"?"height":"width",Ae=Wt+v[$r],fr=Wt-v[ce],Yt=[$t,Gt].indexOf(E)!==-1,Gr=(Di=B==null?void 0:B[w])!=null?Di:0,Vr=Yt?Ae:Wt-N[Me]-R[Me]-Gr+O.altAxis,I=Yt?Wt+N[Me]+R[Me]-Gr-O.altAxis:fr,P=h&&Yt?J$(Vr,Wt,I):Go(h?Vr:Ae,Wt,h?I:fr);A[w]=P,z[w]=P-Wt}t.modifiersData[r]=z}}const OG={name:"preventOverflow",enabled:!0,phase:"main",fn:kG,requiresIfExists:["offset"]};function IG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function RG(e){return e===an(e)||!Tn(e)?$0(e):IG(e)}function MG(e){var t=e.getBoundingClientRect(),n=Ms(t.width)/e.offsetWidth||1,r=Ms(t.height)/e.offsetHeight||1;return n!==1||r!==1}function LG(e,t,n){n===void 0&&(n=!1);var r=Tn(t),i=Tn(t)&&MG(t),a=Pi(t),s=Ls(e,i,n),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lr(t)!=="body"||V0(a))&&(o=RG(t)),Tn(t)?(l=Ls(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=G0(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function PG(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var l=t.get(o);l&&i(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function DG(e){var t=PG(e);return W$.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function FG(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function BG(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var C4={placement:"bottom",modifiers:[],strategy:"absolute"};function x4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function UG(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?C4:i;return function(o,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},C4,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},f=[],d=!1,h={state:u,setOptions:function(E){var T=typeof E=="function"?E(u.options):E;g(),u.options=Object.assign({},a,u.options,T),u.scrollParents={reference:Ta(o)?Vo(o):o.contextElement?Vo(o.contextElement):[],popper:Vo(l)};var y=DG(BG([].concat(r,u.options.modifiers)));return u.orderedModifiers=y.filter(function(S){return S.enabled}),p(),h.update()},forceUpdate:function(){if(!d){var E=u.elements,T=E.reference,y=E.popper;if(x4(T,y)){u.rects={reference:LG(T,Wl(y),u.options.strategy==="fixed"),popper:z0(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(O){return u.modifiersData[O.name]=Object.assign({},O.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var w=u.orderedModifiers[S],A=w.fn,N=w.options,R=N===void 0?{}:N,D=w.name;typeof A=="function"&&(u=A({state:u,options:R,name:D,instance:h})||u)}}}},update:FG(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){g(),d=!0}};if(!x4(o,l))return h;h.setOptions(c).then(function(v){!d&&c.onFirstUpdate&&c.onFirstUpdate(v)});function p(){u.orderedModifiers.forEach(function(v){var E=v.name,T=v.options,y=T===void 0?{}:T,S=v.effect;if(typeof S=="function"){var w=S({state:u,name:E,instance:h,options:y}),A=function(){};f.push(w||A)}})}function g(){f.forEach(function(v){return v()}),f=[]}return h}}var HG=[cG,xG,oG,Q$,NG,_G,OG,rG,bG],zG=UG({defaultModifiers:HG}),jG=typeof Element<"u",$G=typeof Map=="function",GG=typeof Set=="function",VG=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function _c(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!_c(e[r],t[r]))return!1;return!0}var a;if($G&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!_c(r.value[1],t.get(r.value[0])))return!1;return!0}if(GG&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(VG&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(jG&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!_c(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var KG=function(t,n){try{return _c(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const WG=Gn(KG);var YG=[],qG=function(t,n,r){r===void 0&&(r={});var i=L.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||YG},s=L.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=s[0],l=s[1],c=L.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var p=h.state,g=Object.keys(p.elements);zy.flushSync(function(){l({styles:E4(g.map(function(v){return[v,p.styles[v]||{}]})),attributes:E4(g.map(function(v){return[v,p.attributes[v]]}))})})},requires:["computeStyles"]}},[]),u=L.useMemo(function(){var d={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return WG(i.current,d)?i.current||d:(i.current=d,d)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),f=L.useRef();return T4(function(){f.current&&f.current.setOptions(u)},[u]),T4(function(){if(!(t==null||n==null)){var d=r.createPopper||zG,h=d(t,n,u);return f.current=h,function(){h.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:o.styles,attributes:o.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};function QG(e,t){L.useEffect(()=>{const n=r=>{e&&r&&r.target instanceof Element&&!e.contains(r.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const q1=({message:e})=>{window.sourceryLS.postMessage({message:e})},g6=({text:e=!0,popperOptions:t={placement:"bottom-start"}})=>{const[n,r]=L.useState(!1),i=L.useCallback(()=>r(()=>!0),[]),a=L.useCallback(()=>r(()=>!1),[]),[s,o]=L.useState(null),[l,c]=L.useState(null),{styles:u,attributes:f}=qG(s,l,t);QG(l,a);const{showCodeLens:d}=L.useContext(bf),h=L.useCallback(()=>{q1(d?{message:KB}:{message:VB})},[d]),p=L.useCallback(()=>{q1({message:WB})},[]),g=L.useCallback(()=>{q1({message:YB})},[]);return _.jsxs(_.Fragment,{children:[_.jsxs("button",{type:"button",ref:o,onClick:i,className:$e("px-2 py-1 -my-[2px] hover:opacity-80 border flex flex-row items-center gap-1",n?"border-ide-primary-btn-bg rounded-t-sm":"border-transparent"),children:[_.jsx(_e.Cog,{}),e&&_.jsx("span",{children:"Settings"})]}),_.jsxs("div",{ref:c,style:u.popper,...f.popper,className:$e(n?"block":"hidden","bg-ide-chat-input-bg mt-1 px-2 py-1 z-10 rounded-sm min-w-[240px] border border-ide-border shadow-lg flex flex-col"),children:[_.jsx("button",{onClick:h,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d?_.jsx(_e.SquareCheck,{className:"text-ide-highlight"}):_.jsx(_e.Square,{}),_.jsx("span",{children:"Show Code Lenses"})]})}),_.jsx("hr",{className:"my-1.5 text-ide-border"}),_.jsx("button",{onClick:p,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[_.jsx(_e.Book,{}),_.jsx("span",{children:"Documentation"})]})}),_.jsx("button",{onClick:g,className:"hover:opacity-80",children:_.jsxs("div",{className:"flex flex-row items-center gap-2",children:[_.jsx(_e.Comment,{}),_.jsx("span",{children:"Feedback"})]})})]})]})},ho=({message:e})=>{window.sourceryLS.postMessage({message:e})},XG=()=>{const{productName:e,isConfigEnabled:t,isAuthenticated:n,isAuthorized:r}=L.useContext(bf),i=L.useCallback(()=>{ho({message:FB})},[]),a=L.useCallback(()=>{ho({message:LB})},[]),s=L.useCallback(()=>{ho({message:PB})},[]),o=L.useCallback(()=>{ho({message:DB})},[]);return L.useEffect(()=>{ho({message:BB})},[]),_.jsxs("section",{id:"access-details",className:"flex flex-col divide-y divide-ide-border overflow-y-auto px-4","data-testid":"access-details-view",children:[_.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center justify-between",children:[_.jsxs("div",{className:"flex flex-row items-center gap-[10px]",children:[_.jsx("div",{className:"h-8 w-8",children:_.jsx("img",{src:P$,alt:"Sourcery's Logo"})}),_.jsxs("h1",{className:"font-bold",children:["Sourcery ",e]})]}),_.jsx(g6,{popperOptions:{placement:"bottom-end"}})]}),t?n?!r&&_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-lg",children:"Upgrade to use Sourcery on private repos"}),_.jsx("p",{className:"text-sm",children:"If you have already upgraded, please refresh"}),_.jsxs("div",{className:"flex flex-row gap-4",children:[_.jsx("button",{onClick:s,className:"btn-primary px-3 py-1 font-bold",children:"Upgrade"}),_.jsx("button",{className:"btn-secondary px-3 py-1 font-bold",onClick:o,children:"Refresh"})]}),_.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"mt-8 cursor-pointer text-sm underline",children:"Running into issues?"})]}):_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-xl",children:"Log in to start using Sourcery"}),_.jsx("p",{className:"text-sm",children:"If you have already logged in to Sourcery, please refresh"}),_.jsxs("div",{className:"flex flex-row gap-4",children:[_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:i,children:"Log In"}),_.jsx("button",{className:"btn-secondary px-3 py-1 font-bold",onClick:o,children:"Refresh"})]}),_.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"mt-8 cursor-pointer text-sm underline",children:"Running into issues?"})]}):_.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[_.jsx("h6",{className:"mt-2 text-xl",children:"Opt in to enable Sourcery coding assistant"}),_.jsx("p",{className:"text-sm",children:"Sourcery works with large language model providers (including OpenAI and Anthropic) to help us review and improve your code. By enabling the Sourcery coding assistant you agree to let us send code snippets to them as necessary."}),_.jsx("div",{className:"flex flex-row gap-4",children:_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:a,children:"Opt In"})})]})]})},ZG=({intent:e="info",children:t})=>_.jsx("div",{className:$e("flex flex-row gap-2 px-4 py-1 border-b border-ide-border",e==="error"&&"text-ide-error-text bg-ide-error-bg"),children:t});function JG({children:e}){const[t,n]=L.useState(a6),r=i=>{n(a=>({...a,...i}))};return L.useEffect(()=>{window.sourceryLS.postMessage({message:{...UB,updates:t}})},[t]),_.jsx(vf.Provider,{value:{uiState:t,updateUIState:r},children:e})}window.sourceryLS=window.sourceryLS||{};const eV=({message:e})=>{window.sourceryLS.postMessage({message:e})},tV=({activeView:e,onSelect:t})=>{const{updateUIState:n}=L.useContext(vf),r=i=>a=>{n==null||n({selectedTab:i}),t(i)(a)};return _.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[_.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[_.jsx("button",{className:$e("px-2 py-2 font-bold",e==="review"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:r("review"),children:"Review"}),_.jsx("button",{className:$e("px-2 py-2 font-bold",e==="chat"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:r("chat"),children:"Chat"})]}),_.jsxs("div",{className:"flex grow flex-row items-baseline justify-end gap-4 border-b border-ide-border p-2",children:[e==="chat"?_.jsx(v$,{}):e==="review"?_.jsx(I$,{}):null,_.jsx(g6,{text:!1,popperOptions:{placement:"bottom-end"}})]})]})},nV=()=>{const[{status:e,appContext:t},n]=L.useState({status:"pending",appContext:s6}),[r,i]=L.useState("review"),a=L.useRef(null);return L.useEffect(()=>{eV({message:Lb})},[]),_.jsx(JG,{children:_.jsx(C$,{value:t,children:_.jsx(rV,{status:e,appContext:t,activeView:r,setActiveView:i,chatRef:a,setAppContext:n})})})},rV=({status:e,appContext:t,activeView:n,setActiveView:r,chatRef:i,setAppContext:a})=>{const{updateUIState:s}=L.useContext(vf),o=L.useMemo(()=>t.isAuthenticated&&t.isAuthorized,[t]),l=L.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),c=L.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Pro trial",[t]),u=L.useCallback(({data:f})=>{switch(f.command){case"chat/focus":r("chat");break;case"context/update":a(gt(d=>{d.status="ok",d.appContext={...d.appContext,...f.updates}}));break;case"uiState/load":s(f.updates),r(f.updates.selectedTab);break}},[s,r,a]);return L.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),_.jsxs("main",{className:"flex h-full max-h-full flex-col overflow-y-hidden bg-ide-window-bg text-ide-text","data-testid":"app",children:[l&&_.jsxs(ZG,{children:[_.jsx("span",{children:_.jsx(_e.InfoCircle,{})}),_.jsx("span",{children:c}),_.jsx("span",{children:"-"}),_.jsx("a",{href:"https://app.sourcery.ai/dashboard?utm_source=ide_chat&utm_medium=banner&utm_campaign=open_source_upgrade",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?_.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[_.jsx(B0,{}),_.jsx("p",{className:"italic",children:"Loading..."})]}):o?_.jsxs(_.Fragment,{children:[_.jsx(tV,{activeView:n,onSelect:f=>()=>{r(f),f==="chat"&&setTimeout(()=>{var d;return(d=i.current)==null?void 0:d.focus()},25)}}),_.jsx(b$,{className:$e(n==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:i}),_.jsx(L$,{className:$e(n==="review"?"flex grow flex-col overflow-hidden":"hidden")})]}):_.jsx(XG,{})]})};Xd.createRoot(document.getElementById("root")).render(_.jsx(Un.StrictMode,{children:_.jsx(nV,{})}));