@sitecore/sc-contenthub-blok 0.0.91 → 1.0.2

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 (891) hide show
  1. package/dist/Components/BlokBadge/BlokBadge.spec.js +1 -1
  2. package/dist/Components/BlokBadge/BlokBadge.spec.js.map +1 -1
  3. package/dist/Components/BlokButton/BlokButton.d.ts +3 -4
  4. package/dist/Components/BlokButton/BlokButton.js +3 -3
  5. package/dist/Components/BlokButton/BlokButton.js.map +1 -1
  6. package/dist/Components/BlokIcon/BlokIcon.d.ts +2 -1
  7. package/dist/Components/BlokIcon/BlokIcon.js +3 -3
  8. package/dist/Components/BlokIcon/BlokIcon.js.map +1 -1
  9. package/dist/Components/BlokIcon/iconNames.d.ts +1 -1
  10. package/dist/Components/BlokIcon/iconNames.js +1 -0
  11. package/dist/Components/BlokIcon/iconNames.js.map +1 -1
  12. package/dist/Components/BlokIconButton/BlokIconButton.d.ts +2 -4
  13. package/dist/Components/BlokIconButton/BlokIconButton.js +3 -3
  14. package/dist/Components/BlokIconButton/BlokIconButton.js.map +1 -1
  15. package/dist/Components/BlokSearchBox/BlokSearchBox.d.ts +3 -2
  16. package/dist/Components/BlokSearchBox/BlokSearchBox.js +3 -2
  17. package/dist/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
  18. package/dist/Components/BlokTooltip/BlokTooltip.js +0 -4
  19. package/dist/Components/BlokTooltip/BlokTooltip.js.map +1 -1
  20. package/esm/Components/BlokButton/BlokButton.js +2 -3
  21. package/esm/Components/BlokButton/BlokButton.js.map +1 -1
  22. package/esm/Components/BlokIcon/BlokIcon.js +2 -3
  23. package/esm/Components/BlokIcon/BlokIcon.js.map +1 -1
  24. package/esm/Components/BlokIcon/iconNames.js +1 -0
  25. package/esm/Components/BlokIcon/iconNames.js.map +1 -1
  26. package/esm/Components/BlokIconButton/BlokIconButton.js +2 -3
  27. package/esm/Components/BlokIconButton/BlokIconButton.js.map +1 -1
  28. package/esm/Components/BlokSearchBox/BlokSearchBox.js +3 -3
  29. package/esm/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
  30. package/esm/Components/BlokTooltip/BlokTooltip.js +0 -4
  31. package/esm/Components/BlokTooltip/BlokTooltip.js.map +1 -1
  32. package/node_modules/@babel/code-frame/package.json +3 -3
  33. package/node_modules/@babel/generator/lib/generators/classes.js +7 -4
  34. package/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
  35. package/node_modules/@babel/generator/lib/generators/deprecated.js +28 -0
  36. package/node_modules/@babel/generator/lib/generators/deprecated.js.map +1 -0
  37. package/node_modules/@babel/generator/lib/generators/expressions.js +17 -12
  38. package/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
  39. package/node_modules/@babel/generator/lib/generators/jsx.js +6 -1
  40. package/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
  41. package/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  42. package/node_modules/@babel/generator/lib/generators/modules.js +8 -3
  43. package/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
  44. package/node_modules/@babel/generator/lib/generators/statements.js +1 -4
  45. package/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
  46. package/node_modules/@babel/generator/lib/generators/template-literals.js +16 -11
  47. package/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
  48. package/node_modules/@babel/generator/lib/generators/types.js +4 -9
  49. package/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
  50. package/node_modules/@babel/generator/lib/generators/typescript.js +40 -18
  51. package/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
  52. package/node_modules/@babel/generator/lib/index.js +3 -1
  53. package/node_modules/@babel/generator/lib/index.js.map +1 -1
  54. package/node_modules/@babel/generator/lib/node/index.js +11 -8
  55. package/node_modules/@babel/generator/lib/node/index.js.map +1 -1
  56. package/node_modules/@babel/generator/lib/node/parentheses.js +44 -7
  57. package/node_modules/@babel/generator/lib/node/parentheses.js.map +1 -1
  58. package/node_modules/@babel/generator/lib/printer.js +31 -24
  59. package/node_modules/@babel/generator/lib/printer.js.map +1 -1
  60. package/node_modules/@babel/generator/package.json +9 -9
  61. package/node_modules/@babel/helper-globals/LICENSE +22 -0
  62. package/node_modules/@babel/helper-globals/README.md +19 -0
  63. package/node_modules/@babel/helper-globals/data/browser-upper.json +911 -0
  64. package/node_modules/@babel/helper-globals/data/builtin-lower.json +15 -0
  65. package/node_modules/@babel/helper-globals/data/builtin-upper.json +51 -0
  66. package/node_modules/@babel/helper-globals/package.json +32 -0
  67. package/node_modules/@babel/helper-module-imports/lib/import-builder.js.map +1 -1
  68. package/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
  69. package/node_modules/@babel/helper-module-imports/package.json +4 -4
  70. package/node_modules/@babel/helper-string-parser/package.json +1 -1
  71. package/node_modules/@babel/helper-validator-identifier/package.json +1 -1
  72. package/node_modules/@babel/parser/bin/babel-parser.js +1 -1
  73. package/node_modules/@babel/parser/lib/index.js +5814 -5255
  74. package/node_modules/@babel/parser/lib/index.js.map +1 -1
  75. package/node_modules/@babel/parser/package.json +7 -7
  76. package/node_modules/@babel/parser/typings/babel-parser.d.ts +137 -165
  77. package/node_modules/@babel/template/lib/options.js +1 -1
  78. package/node_modules/@babel/template/lib/options.js.map +1 -1
  79. package/node_modules/@babel/template/lib/parse.js +3 -0
  80. package/node_modules/@babel/template/lib/parse.js.map +1 -1
  81. package/node_modules/@babel/template/lib/populate.js +2 -1
  82. package/node_modules/@babel/template/lib/populate.js.map +1 -1
  83. package/node_modules/@babel/template/package.json +4 -4
  84. package/node_modules/@babel/traverse/lib/cache.js +10 -16
  85. package/node_modules/@babel/traverse/lib/cache.js.map +1 -1
  86. package/node_modules/@babel/traverse/lib/index.js +8 -16
  87. package/node_modules/@babel/traverse/lib/index.js.map +1 -1
  88. package/node_modules/@babel/traverse/lib/path/ancestry.js +1 -3
  89. package/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
  90. package/node_modules/@babel/traverse/lib/path/context.js +0 -15
  91. package/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
  92. package/node_modules/@babel/traverse/lib/path/conversion.js +7 -4
  93. package/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
  94. package/node_modules/@babel/traverse/lib/path/evaluation.js +23 -2
  95. package/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
  96. package/node_modules/@babel/traverse/lib/path/family.js +13 -7
  97. package/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
  98. package/node_modules/@babel/traverse/lib/path/index.js +2 -1
  99. package/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
  100. package/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
  101. package/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
  102. package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +1 -1
  103. package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map +1 -1
  104. package/node_modules/@babel/traverse/lib/path/modification.js +3 -2
  105. package/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
  106. package/node_modules/@babel/traverse/lib/path/removal.js +2 -1
  107. package/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
  108. package/node_modules/@babel/traverse/lib/path/replacement.js +2 -2
  109. package/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
  110. package/node_modules/@babel/traverse/lib/scope/binding.js +4 -3
  111. package/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
  112. package/node_modules/@babel/traverse/lib/scope/index.js +99 -39
  113. package/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
  114. package/node_modules/@babel/traverse/lib/traverse-node.js +109 -0
  115. package/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
  116. package/node_modules/@babel/traverse/lib/types.js +1 -1
  117. package/node_modules/@babel/traverse/lib/visitors.js +6 -4
  118. package/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
  119. package/node_modules/@babel/traverse/package.json +10 -10
  120. package/node_modules/@babel/types/lib/asserts/generated/index.js +19 -3
  121. package/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
  122. package/node_modules/@babel/types/lib/ast-types/generated/index.js +1 -1
  123. package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
  124. package/node_modules/@babel/types/lib/builders/generated/index.js +22 -2858
  125. package/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
  126. package/node_modules/@babel/types/lib/builders/generated/lowercase.js +2896 -0
  127. package/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
  128. package/node_modules/@babel/types/lib/builders/generated/uppercase.js +267 -1525
  129. package/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
  130. package/node_modules/@babel/types/lib/constants/generated/index.js +2 -1
  131. package/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
  132. package/node_modules/@babel/types/lib/constants/index.js +5 -3
  133. package/node_modules/@babel/types/lib/constants/index.js.map +1 -1
  134. package/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
  135. package/node_modules/@babel/types/lib/converters/toExpression.js +1 -0
  136. package/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
  137. package/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
  138. package/node_modules/@babel/types/lib/converters/valueToNode.js +16 -3
  139. package/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
  140. package/node_modules/@babel/types/lib/definitions/core.js +73 -44
  141. package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
  142. package/node_modules/@babel/types/lib/definitions/experimental.js +3 -11
  143. package/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
  144. package/node_modules/@babel/types/lib/definitions/flow.js +6 -3
  145. package/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
  146. package/node_modules/@babel/types/lib/definitions/index.js +13 -0
  147. package/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
  148. package/node_modules/@babel/types/lib/definitions/jsx.js +9 -4
  149. package/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
  150. package/node_modules/@babel/types/lib/definitions/typescript.js +56 -28
  151. package/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
  152. package/node_modules/@babel/types/lib/definitions/utils.js +37 -15
  153. package/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
  154. package/node_modules/@babel/types/lib/index-legacy.d.ts +72 -41
  155. package/node_modules/@babel/types/lib/index.d.ts +1699 -1655
  156. package/node_modules/@babel/types/lib/index.js +10 -21
  157. package/node_modules/@babel/types/lib/index.js.flow +72 -42
  158. package/node_modules/@babel/types/lib/index.js.map +1 -1
  159. package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +9 -8
  160. package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
  161. package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +1 -0
  162. package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
  163. package/node_modules/@babel/types/lib/traverse/traverseFast.js +19 -5
  164. package/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
  165. package/node_modules/@babel/types/lib/utils/deprecationWarning.js +3 -3
  166. package/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -1
  167. package/node_modules/@babel/types/lib/validators/generated/index.js +50 -5
  168. package/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
  169. package/node_modules/@babel/types/lib/validators/isLet.js +6 -2
  170. package/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
  171. package/node_modules/@babel/types/lib/validators/isPlaceholderType.js +1 -5
  172. package/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
  173. package/node_modules/@babel/types/lib/validators/isType.js +1 -6
  174. package/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
  175. package/node_modules/@babel/types/lib/validators/isVar.js +8 -4
  176. package/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
  177. package/node_modules/@babel/types/lib/validators/matchesPattern.js +10 -2
  178. package/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
  179. package/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
  180. package/node_modules/@babel/types/package.json +14 -14
  181. package/node_modules/@emotion/cache/dist/declarations/src/index.d.ts +16 -2
  182. package/node_modules/@emotion/cache/dist/declarations/src/types.d.ts +14 -0
  183. package/node_modules/@emotion/cache/dist/emotion-cache.browser.cjs.js +7 -36
  184. package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.cjs.js +10 -43
  185. package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.esm.js +10 -43
  186. package/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +7 -36
  187. package/node_modules/@emotion/cache/dist/emotion-cache.cjs.js +11 -73
  188. package/node_modules/@emotion/cache/dist/emotion-cache.development.cjs.js +15 -81
  189. package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.cjs.js +50 -60
  190. package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.esm.js +51 -61
  191. package/node_modules/@emotion/cache/dist/emotion-cache.development.esm.js +15 -81
  192. package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.cjs.js +28 -56
  193. package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.esm.js +29 -57
  194. package/node_modules/@emotion/cache/dist/emotion-cache.esm.js +11 -73
  195. package/node_modules/@emotion/cache/package.json +11 -11
  196. package/node_modules/@emotion/cache/src/{index.js → index.ts} +39 -55
  197. package/node_modules/@emotion/cache/src/{prefixer.js → prefixer.ts} +11 -4
  198. package/node_modules/@emotion/cache/src/{stylis-plugins.js → stylis-plugins.ts} +91 -83
  199. package/node_modules/@emotion/cache/src/{types.js → types.ts} +4 -5
  200. package/node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.umd.min.js.map +1 -1
  201. package/node_modules/@emotion/react/_isolated-hnrs/package.json +1 -0
  202. package/node_modules/@emotion/react/dist/declarations/src/_isolated-hnrs.d.ts +3 -3
  203. package/node_modules/@emotion/react/dist/declarations/src/class-names.d.ts +18 -0
  204. package/node_modules/@emotion/react/dist/declarations/src/context.d.ts +6 -0
  205. package/node_modules/@emotion/react/dist/declarations/src/css.d.ts +5 -0
  206. package/node_modules/@emotion/react/dist/declarations/src/global.d.ts +7 -0
  207. package/node_modules/@emotion/react/dist/declarations/src/index.d.ts +14 -1
  208. package/node_modules/@emotion/react/dist/declarations/src/jsx-dev-runtime.d.ts +6 -1
  209. package/node_modules/@emotion/react/dist/declarations/src/jsx-namespace.d.ts +64 -0
  210. package/node_modules/@emotion/react/dist/declarations/src/jsx-runtime.d.ts +7 -1
  211. package/node_modules/@emotion/react/dist/declarations/src/jsx.d.ts +22 -0
  212. package/node_modules/@emotion/react/dist/declarations/src/keyframes.d.ts +10 -0
  213. package/node_modules/@emotion/react/dist/declarations/src/theming.d.ts +28 -0
  214. package/node_modules/@emotion/react/dist/declarations/src/types.d.ts +7 -0
  215. package/node_modules/@emotion/react/dist/{emotion-element-f66136f5.development.edge-light.cjs.js → emotion-element-010f37fa.development.edge-light.cjs.js} +23 -84
  216. package/node_modules/@emotion/react/dist/{emotion-element-832b737b.browser.cjs.js → emotion-element-25f9958c.browser.cjs.js} +20 -65
  217. package/node_modules/@emotion/react/dist/{emotion-element-7447be04.browser.development.cjs.js → emotion-element-4787f564.browser.development.cjs.js} +21 -74
  218. package/node_modules/@emotion/react/dist/{emotion-element-7a1343fa.browser.development.esm.js → emotion-element-489459f2.browser.development.esm.js} +21 -74
  219. package/node_modules/@emotion/react/dist/{emotion-element-efb2998a.development.edge-light.esm.js → emotion-element-516430c7.development.edge-light.esm.js} +23 -84
  220. package/node_modules/@emotion/react/dist/{emotion-element-ba80abe0.development.esm.js → emotion-element-782f682d.development.esm.js} +23 -84
  221. package/node_modules/@emotion/react/dist/{emotion-element-657efc1f.edge-light.esm.js → emotion-element-8113875a.edge-light.esm.js} +22 -75
  222. package/node_modules/@emotion/react/dist/{emotion-element-b1930563.cjs.js → emotion-element-a1829a1e.cjs.js} +22 -75
  223. package/node_modules/@emotion/react/dist/{emotion-element-60389d2b.edge-light.cjs.js → emotion-element-af3dc15b.edge-light.cjs.js} +22 -75
  224. package/node_modules/@emotion/react/dist/{emotion-element-b4c8b265.esm.js → emotion-element-d59e098f.esm.js} +22 -75
  225. package/node_modules/@emotion/react/dist/{emotion-element-9150ebbd.development.cjs.js → emotion-element-e8f4cc37.development.cjs.js} +23 -84
  226. package/node_modules/@emotion/react/dist/{emotion-element-5486c51c.browser.esm.js → emotion-element-f0de968e.browser.esm.js} +20 -65
  227. package/node_modules/@emotion/react/dist/emotion-react.browser.cjs.js +19 -75
  228. package/node_modules/@emotion/react/dist/emotion-react.browser.development.cjs.js +38 -102
  229. package/node_modules/@emotion/react/dist/emotion-react.browser.development.esm.js +38 -101
  230. package/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +19 -74
  231. package/node_modules/@emotion/react/dist/emotion-react.cjs.js +19 -75
  232. package/node_modules/@emotion/react/dist/emotion-react.development.cjs.js +38 -102
  233. package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.cjs.js +37 -99
  234. package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.esm.js +37 -98
  235. package/node_modules/@emotion/react/dist/emotion-react.development.esm.js +38 -101
  236. package/node_modules/@emotion/react/dist/emotion-react.edge-light.cjs.js +18 -72
  237. package/node_modules/@emotion/react/dist/emotion-react.edge-light.esm.js +18 -71
  238. package/node_modules/@emotion/react/dist/emotion-react.esm.js +19 -74
  239. package/node_modules/@emotion/react/dist/emotion-react.umd.min.js +1 -1
  240. package/node_modules/@emotion/react/dist/emotion-react.umd.min.js.map +1 -1
  241. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js +3 -3
  242. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.js +3 -3
  243. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js +3 -3
  244. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js +3 -3
  245. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js +3 -3
  246. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js +3 -3
  247. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js +3 -3
  248. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js +3 -3
  249. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.esm.js +3 -3
  250. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js +3 -3
  251. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js +3 -3
  252. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js +3 -3
  253. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.umd.min.js.map +1 -1
  254. package/node_modules/@emotion/react/jsx-dev-runtime/package.json +1 -1
  255. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.js +5 -5
  256. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.js +5 -5
  257. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js +5 -5
  258. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js +5 -5
  259. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js +5 -5
  260. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js +5 -5
  261. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js +5 -5
  262. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js +5 -5
  263. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.esm.js +5 -5
  264. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js +5 -5
  265. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js +5 -5
  266. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js +5 -5
  267. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.umd.min.js.map +1 -1
  268. package/node_modules/@emotion/react/jsx-runtime/package.json +1 -1
  269. package/node_modules/@emotion/react/package.json +19 -18
  270. package/node_modules/@emotion/react/src/{_isolated-hnrs.js → _isolated-hnrs.ts} +7 -2
  271. package/node_modules/@emotion/react/src/{class-names.js → class-names.tsx} +43 -32
  272. package/node_modules/@emotion/react/src/{context.js → context.tsx} +25 -22
  273. package/node_modules/@emotion/react/src/css.ts +14 -0
  274. package/node_modules/@emotion/react/src/{emotion-element.js → emotion-element.tsx} +37 -17
  275. package/node_modules/@emotion/react/src/{get-label-from-stack-trace.js → get-label-from-stack-trace.ts} +7 -4
  276. package/node_modules/@emotion/react/src/global.tsx +147 -0
  277. package/node_modules/@emotion/react/src/{index.js → index.ts} +24 -3
  278. package/node_modules/@emotion/react/src/{jsx-dev-runtime.js → jsx-dev-runtime.ts} +12 -2
  279. package/node_modules/@emotion/react/src/jsx-namespace.ts +107 -0
  280. package/node_modules/@emotion/react/src/jsx-runtime.ts +32 -0
  281. package/node_modules/@emotion/react/src/jsx.ts +45 -0
  282. package/node_modules/@emotion/react/src/keyframes.ts +27 -0
  283. package/node_modules/@emotion/react/src/{theming.js → theming.tsx} +40 -18
  284. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.cjs.js +19 -92
  285. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.cjs.js +22 -94
  286. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.esm.js +22 -94
  287. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js +19 -92
  288. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.cjs.js +20 -93
  289. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.cjs.js +23 -95
  290. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.cjs.js +22 -94
  291. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.esm.js +22 -94
  292. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.esm.js +24 -96
  293. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.cjs.js +19 -92
  294. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.esm.js +19 -92
  295. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js +21 -94
  296. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js +1 -1
  297. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js.map +1 -1
  298. package/node_modules/@emotion/styled/base/package.json +1 -1
  299. package/node_modules/@emotion/styled/dist/declarations/src/base.d.ts +4 -2
  300. package/node_modules/@emotion/styled/dist/declarations/src/index.d.ts +15 -2
  301. package/node_modules/@emotion/styled/dist/declarations/src/jsx-namespace.d.ts +5 -0
  302. package/node_modules/@emotion/styled/dist/declarations/src/types.d.ts +88 -0
  303. package/node_modules/@emotion/styled/dist/emotion-styled.browser.cjs.js +7 -6
  304. package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.cjs.js +7 -6
  305. package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.esm.js +7 -6
  306. package/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js +7 -6
  307. package/node_modules/@emotion/styled/dist/emotion-styled.cjs.js +7 -6
  308. package/node_modules/@emotion/styled/dist/emotion-styled.development.cjs.js +7 -6
  309. package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.cjs.js +7 -6
  310. package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.esm.js +7 -6
  311. package/node_modules/@emotion/styled/dist/emotion-styled.development.esm.js +7 -6
  312. package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.cjs.js +7 -6
  313. package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.esm.js +7 -6
  314. package/node_modules/@emotion/styled/dist/emotion-styled.esm.js +7 -6
  315. package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js +1 -1
  316. package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js.map +1 -1
  317. package/node_modules/@emotion/styled/package.json +13 -14
  318. package/node_modules/@emotion/styled/src/{base.js → base.tsx} +56 -42
  319. package/node_modules/@emotion/styled/{types/index.d.ts → src/index.ts} +21 -12
  320. package/node_modules/@emotion/styled/{dist/declarations/types/jsx-namespace.d.ts → src/jsx-namespace.ts} +3 -5
  321. package/node_modules/@emotion/styled/src/{tags.js → tags.ts} +1 -1
  322. package/node_modules/@emotion/styled/{types/base.d.ts → src/types.ts} +8 -15
  323. package/node_modules/@emotion/styled/src/utils.ts +38 -0
  324. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/declarations/src/index.d.ts +3 -0
  325. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.mts +2 -0
  326. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.ts +2 -0
  327. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/package.json +7 -6
  328. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.ts +21 -0
  329. package/node_modules/@jridgewell/gen-mapping/LICENSE +1 -1
  330. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +256 -194
  331. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +6 -1
  332. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +339 -239
  333. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +6 -1
  334. package/node_modules/@jridgewell/gen-mapping/package.json +46 -51
  335. package/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts +614 -0
  336. package/node_modules/@jridgewell/gen-mapping/src/set-array.ts +82 -0
  337. package/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts +16 -0
  338. package/node_modules/@jridgewell/gen-mapping/src/types.ts +61 -0
  339. package/node_modules/@jridgewell/gen-mapping/{dist/types/gen-mapping.d.ts → types/gen-mapping.d.cts} +3 -2
  340. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map +1 -0
  341. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
  342. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map +1 -0
  343. package/node_modules/@jridgewell/{set-array/dist/types/set-array.d.ts → gen-mapping/types/set-array.d.cts} +2 -1
  344. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map +1 -0
  345. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
  346. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map +1 -0
  347. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts +13 -0
  348. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map +1 -0
  349. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
  350. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map +1 -0
  351. package/node_modules/@jridgewell/gen-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
  352. package/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map +1 -0
  353. package/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
  354. package/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map +1 -0
  355. package/node_modules/@jridgewell/trace-mapping/LICENSE +1 -1
  356. package/node_modules/@jridgewell/trace-mapping/README.md +160 -69
  357. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +417 -493
  358. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +6 -1
  359. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +546 -588
  360. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +6 -1
  361. package/node_modules/@jridgewell/trace-mapping/package.json +43 -49
  362. package/node_modules/@jridgewell/trace-mapping/src/binary-search.ts +115 -0
  363. package/node_modules/@jridgewell/trace-mapping/src/by-source.ts +65 -0
  364. package/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts +192 -0
  365. package/node_modules/@jridgewell/trace-mapping/src/resolve.ts +16 -0
  366. package/node_modules/@jridgewell/trace-mapping/src/sort.ts +45 -0
  367. package/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +23 -0
  368. package/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +8 -0
  369. package/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +504 -0
  370. package/node_modules/@jridgewell/trace-mapping/src/types.ts +114 -0
  371. package/node_modules/@jridgewell/trace-mapping/{dist/types/binary-search.d.ts → types/binary-search.d.cts} +2 -1
  372. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map +1 -0
  373. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
  374. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map +1 -0
  375. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts +8 -0
  376. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map +1 -0
  377. package/node_modules/@jridgewell/trace-mapping/{dist/types/by-source.d.ts → types/by-source.d.mts} +3 -2
  378. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map +1 -0
  379. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts +9 -0
  380. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map +1 -0
  381. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
  382. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map +1 -0
  383. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts +4 -0
  384. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map +1 -0
  385. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
  386. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map +1 -0
  387. package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts +3 -0
  388. package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map +1 -0
  389. package/node_modules/@jridgewell/trace-mapping/{dist/types/sort.d.ts → types/sort.d.mts} +2 -1
  390. package/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map +1 -0
  391. package/node_modules/@jridgewell/trace-mapping/{dist/types/sourcemap-segment.d.ts → types/sourcemap-segment.d.cts} +1 -0
  392. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map +1 -0
  393. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
  394. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map +1 -0
  395. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts +5 -0
  396. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map +1 -0
  397. package/node_modules/@jridgewell/trace-mapping/{dist/types/strip-filename.d.ts → types/strip-filename.d.mts} +1 -0
  398. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map +1 -0
  399. package/node_modules/@jridgewell/trace-mapping/{dist/types/trace-mapping.d.ts → types/trace-mapping.d.cts} +7 -6
  400. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map +1 -0
  401. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
  402. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map +1 -0
  403. package/node_modules/@jridgewell/trace-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
  404. package/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map +1 -0
  405. package/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
  406. package/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map +1 -0
  407. package/node_modules/@mui/core-downloads-tracker/package.json +1 -1
  408. package/node_modules/@mui/material/Accordion/Accordion.d.ts +32 -15
  409. package/node_modules/@mui/material/Accordion/Accordion.js +18 -6
  410. package/node_modules/@mui/material/AccordionActions/AccordionActions.d.ts +2 -2
  411. package/node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts +2 -2
  412. package/node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts +62 -7
  413. package/node_modules/@mui/material/AccordionSummary/AccordionSummary.js +67 -16
  414. package/node_modules/@mui/material/Alert/Alert.d.ts +6 -18
  415. package/node_modules/@mui/material/AlertTitle/AlertTitle.d.ts +3 -3
  416. package/node_modules/@mui/material/AppBar/AppBar.d.ts +4 -4
  417. package/node_modules/@mui/material/Autocomplete/Autocomplete.d.ts +2 -2
  418. package/node_modules/@mui/material/Autocomplete/Autocomplete.js +1 -1
  419. package/node_modules/@mui/material/Avatar/Avatar.d.ts +2 -2
  420. package/node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts +2 -2
  421. package/node_modules/@mui/material/AvatarGroup/AvatarGroup.js +10 -2
  422. package/node_modules/@mui/material/Backdrop/Backdrop.d.ts +17 -15
  423. package/node_modules/@mui/material/Badge/Badge.d.ts +35 -31
  424. package/node_modules/@mui/material/Badge/Badge.js +27 -20
  425. package/node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts +2 -2
  426. package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts +43 -6
  427. package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.js +53 -9
  428. package/node_modules/@mui/material/Box/Box.d.ts +2 -2
  429. package/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  430. package/node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  431. package/node_modules/@mui/material/Button/Button.d.ts +4 -4
  432. package/node_modules/@mui/material/Button/Button.js +3 -3
  433. package/node_modules/@mui/material/ButtonBase/ButtonBase.d.ts +2 -2
  434. package/node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts +2 -2
  435. package/node_modules/@mui/material/CHANGELOG.md +345 -0
  436. package/node_modules/@mui/material/Card/Card.d.ts +4 -4
  437. package/node_modules/@mui/material/CardActionArea/CardActionArea.d.ts +43 -6
  438. package/node_modules/@mui/material/CardActionArea/CardActionArea.js +47 -8
  439. package/node_modules/@mui/material/CardActions/CardActions.d.ts +2 -2
  440. package/node_modules/@mui/material/CardContent/CardContent.d.ts +2 -2
  441. package/node_modules/@mui/material/CardHeader/CardHeader.d.ts +6 -22
  442. package/node_modules/@mui/material/CardMedia/CardMedia.d.ts +2 -2
  443. package/node_modules/@mui/material/Checkbox/Checkbox.d.ts +49 -13
  444. package/node_modules/@mui/material/Checkbox/Checkbox.js +51 -21
  445. package/node_modules/@mui/material/Chip/Chip.d.ts +2 -2
  446. package/node_modules/@mui/material/CircularProgress/CircularProgress.d.ts +7 -3
  447. package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  448. package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js +3 -3
  449. package/node_modules/@mui/material/Collapse/Collapse.d.ts +5 -5
  450. package/node_modules/@mui/material/Container/Container.d.ts +2 -2
  451. package/node_modules/@mui/material/CssBaseline/CssBaseline.d.ts +2 -2
  452. package/node_modules/@mui/material/Dialog/Dialog.d.ts +7 -7
  453. package/node_modules/@mui/material/Dialog/dialogClasses.d.ts +6 -2
  454. package/node_modules/@mui/material/DialogActions/DialogActions.d.ts +2 -2
  455. package/node_modules/@mui/material/DialogContent/DialogContent.d.ts +2 -2
  456. package/node_modules/@mui/material/DialogContentText/DialogContentText.d.ts +3 -3
  457. package/node_modules/@mui/material/DialogTitle/DialogTitle.d.ts +3 -3
  458. package/node_modules/@mui/material/Divider/Divider.d.ts +3 -3
  459. package/node_modules/@mui/material/Drawer/Drawer.d.ts +95 -4
  460. package/node_modules/@mui/material/Drawer/Drawer.js +108 -36
  461. package/node_modules/@mui/material/Fab/Fab.d.ts +3 -3
  462. package/node_modules/@mui/material/Fade/Fade.d.ts +3 -3
  463. package/node_modules/@mui/material/FilledInput/FilledInput.d.ts +3 -3
  464. package/node_modules/@mui/material/FormControl/FormControl.d.ts +6 -6
  465. package/node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts +4 -4
  466. package/node_modules/@mui/material/FormGroup/FormGroup.d.ts +3 -3
  467. package/node_modules/@mui/material/FormHelperText/FormHelperText.d.ts +2 -2
  468. package/node_modules/@mui/material/FormLabel/FormLabel.d.ts +4 -4
  469. package/node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts +2 -2
  470. package/node_modules/@mui/material/Grid/Grid.d.ts +2 -2
  471. package/node_modules/@mui/material/Grid2/Grid2.d.ts +2 -2
  472. package/node_modules/@mui/material/Grid2/Grid2.js +2 -2
  473. package/node_modules/@mui/material/Grow/Grow.d.ts +5 -5
  474. package/node_modules/@mui/material/Hidden/Hidden.d.ts +2 -2
  475. package/node_modules/@mui/material/Icon/Icon.d.ts +3 -3
  476. package/node_modules/@mui/material/IconButton/IconButton.d.ts +4 -4
  477. package/node_modules/@mui/material/IconButton/IconButton.js +3 -3
  478. package/node_modules/@mui/material/ImageList/ImageList.d.ts +2 -2
  479. package/node_modules/@mui/material/ImageListItem/ImageListItem.d.ts +2 -2
  480. package/node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  481. package/node_modules/@mui/material/Input/Input.d.ts +3 -3
  482. package/node_modules/@mui/material/InputAdornment/InputAdornment.d.ts +2 -2
  483. package/node_modules/@mui/material/InputBase/InputBase.d.ts +2 -2
  484. package/node_modules/@mui/material/InputBase/inputBaseClasses.d.ts +15 -6
  485. package/node_modules/@mui/material/InputLabel/InputLabel.d.ts +3 -3
  486. package/node_modules/@mui/material/LinearProgress/LinearProgress.d.ts +7 -3
  487. package/node_modules/@mui/material/Link/Link.d.ts +4 -4
  488. package/node_modules/@mui/material/List/List.d.ts +3 -3
  489. package/node_modules/@mui/material/ListItem/ListItem.d.ts +3 -3
  490. package/node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  491. package/node_modules/@mui/material/ListItemButton/ListItemButton.d.ts +3 -3
  492. package/node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts +2 -2
  493. package/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  494. package/node_modules/@mui/material/ListItemText/ListItemText.d.ts +12 -2
  495. package/node_modules/@mui/material/ListItemText/ListItemText.js +14 -5
  496. package/node_modules/@mui/material/ListSubheader/ListSubheader.d.ts +2 -2
  497. package/node_modules/@mui/material/Menu/Menu.d.ts +92 -5
  498. package/node_modules/@mui/material/Menu/Menu.js +58 -19
  499. package/node_modules/@mui/material/MenuItem/MenuItem.d.ts +3 -3
  500. package/node_modules/@mui/material/MenuList/MenuList.d.ts +4 -4
  501. package/node_modules/@mui/material/MobileStepper/MobileStepper.d.ts +72 -4
  502. package/node_modules/@mui/material/MobileStepper/MobileStepper.js +76 -18
  503. package/node_modules/@mui/material/Modal/Modal.d.ts +7 -7
  504. package/node_modules/@mui/material/Modal/Modal.js +9 -10
  505. package/node_modules/@mui/material/NativeSelect/NativeSelect.d.ts +3 -3
  506. package/node_modules/@mui/material/NativeSelect/NativeSelectInput.js +6 -2
  507. package/node_modules/@mui/material/NoSsr/NoSsr.d.ts +2 -2
  508. package/node_modules/@mui/material/NoSsr/NoSsr.js +2 -2
  509. package/node_modules/@mui/material/OutlinedInput/NotchedOutline.js +2 -0
  510. package/node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts +32 -5
  511. package/node_modules/@mui/material/OutlinedInput/OutlinedInput.js +30 -10
  512. package/node_modules/@mui/material/OverridableComponent/index.d.ts +41 -0
  513. package/node_modules/@mui/material/OverridableComponent/index.js +1 -0
  514. package/node_modules/@mui/material/OverridableComponent/package.json +6 -0
  515. package/node_modules/@mui/material/Pagination/Pagination.d.ts +2 -2
  516. package/node_modules/@mui/material/PaginationItem/PaginationItem.d.ts +3 -3
  517. package/node_modules/@mui/material/Paper/Paper.d.ts +3 -3
  518. package/node_modules/@mui/material/PigmentContainer/PigmentContainer.d.ts +2 -2
  519. package/node_modules/@mui/material/PigmentContainer/PigmentContainer.js +2 -2
  520. package/node_modules/@mui/material/PigmentGrid/PigmentGrid.d.ts +2 -2
  521. package/node_modules/@mui/material/PigmentGrid/PigmentGrid.js +2 -2
  522. package/node_modules/@mui/material/PigmentHidden/PigmentHidden.d.ts +2 -2
  523. package/node_modules/@mui/material/PigmentHidden/PigmentHidden.js +2 -2
  524. package/node_modules/@mui/material/PigmentStack/PigmentStack.d.ts +2 -2
  525. package/node_modules/@mui/material/PigmentStack/PigmentStack.js +2 -2
  526. package/node_modules/@mui/material/Popover/Popover.d.ts +65 -12
  527. package/node_modules/@mui/material/Popover/Popover.js +79 -52
  528. package/node_modules/@mui/material/Popper/Popper.d.ts +4 -4
  529. package/node_modules/@mui/material/Popper/Popper.js +4 -4
  530. package/node_modules/@mui/material/Portal/Portal.d.ts +2 -2
  531. package/node_modules/@mui/material/Portal/Portal.js +2 -2
  532. package/node_modules/@mui/material/README.md +4 -2
  533. package/node_modules/@mui/material/Radio/Radio.d.ts +48 -4
  534. package/node_modules/@mui/material/Radio/Radio.js +61 -16
  535. package/node_modules/@mui/material/Radio/RadioButtonIcon.js +7 -2
  536. package/node_modules/@mui/material/RadioGroup/RadioGroup.d.ts +3 -3
  537. package/node_modules/@mui/material/Rating/Rating.d.ts +61 -3
  538. package/node_modules/@mui/material/Rating/Rating.js +131 -45
  539. package/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  540. package/node_modules/@mui/material/Select/Select.d.ts +3 -3
  541. package/node_modules/@mui/material/Select/SelectInput.js +8 -8
  542. package/node_modules/@mui/material/Skeleton/Skeleton.d.ts +2 -2
  543. package/node_modules/@mui/material/Slide/Slide.d.ts +4 -4
  544. package/node_modules/@mui/material/Slider/Slider.d.ts +2 -2
  545. package/node_modules/@mui/material/Slider/sliderClasses.d.ts +21 -7
  546. package/node_modules/@mui/material/Slider/useSlider.js +2 -2
  547. package/node_modules/@mui/material/Snackbar/Snackbar.d.ts +81 -4
  548. package/node_modules/@mui/material/Snackbar/Snackbar.js +116 -32
  549. package/node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts +3 -3
  550. package/node_modules/@mui/material/SpeedDial/SpeedDial.d.ts +20 -8
  551. package/node_modules/@mui/material/SpeedDial/SpeedDial.js +40 -11
  552. package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts +85 -4
  553. package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.js +109 -31
  554. package/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  555. package/node_modules/@mui/material/Stack/Stack.d.ts +2 -2
  556. package/node_modules/@mui/material/Step/Step.d.ts +2 -2
  557. package/node_modules/@mui/material/StepButton/StepButton.d.ts +3 -3
  558. package/node_modules/@mui/material/StepConnector/StepConnector.d.ts +2 -2
  559. package/node_modules/@mui/material/StepContent/StepContent.d.ts +4 -4
  560. package/node_modules/@mui/material/StepIcon/StepIcon.d.ts +3 -3
  561. package/node_modules/@mui/material/StepLabel/StepLabel.d.ts +21 -3
  562. package/node_modules/@mui/material/StepLabel/StepLabel.js +14 -5
  563. package/node_modules/@mui/material/Stepper/Stepper.d.ts +2 -2
  564. package/node_modules/@mui/material/SvgIcon/SvgIcon.d.ts +3 -3
  565. package/node_modules/@mui/material/SwipeableDrawer/SwipeArea.js +1 -0
  566. package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts +31 -5
  567. package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.js +60 -13
  568. package/node_modules/@mui/material/Switch/Switch.d.ts +78 -5
  569. package/node_modules/@mui/material/Switch/Switch.js +73 -9
  570. package/node_modules/@mui/material/Tab/Tab.d.ts +3 -3
  571. package/node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts +2 -2
  572. package/node_modules/@mui/material/Table/Table.d.ts +2 -2
  573. package/node_modules/@mui/material/TableBody/TableBody.d.ts +2 -2
  574. package/node_modules/@mui/material/TableCell/TableCell.d.ts +2 -2
  575. package/node_modules/@mui/material/TableContainer/TableContainer.d.ts +2 -2
  576. package/node_modules/@mui/material/TableFooter/TableFooter.d.ts +2 -2
  577. package/node_modules/@mui/material/TableHead/TableHead.d.ts +2 -2
  578. package/node_modules/@mui/material/TablePagination/TablePagination.d.ts +4 -4
  579. package/node_modules/@mui/material/TableRow/TableRow.d.ts +2 -2
  580. package/node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts +3 -3
  581. package/node_modules/@mui/material/Tabs/Tabs.d.ts +131 -31
  582. package/node_modules/@mui/material/Tabs/Tabs.js +124 -52
  583. package/node_modules/@mui/material/Tabs/tabsClasses.d.ts +4 -0
  584. package/node_modules/@mui/material/Tabs/tabsClasses.js +1 -1
  585. package/node_modules/@mui/material/TextField/TextField.d.ts +40 -10
  586. package/node_modules/@mui/material/TextField/TextField.js +22 -11
  587. package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  588. package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js +68 -47
  589. package/node_modules/@mui/material/ToggleButton/ToggleButton.d.ts +3 -3
  590. package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  591. package/node_modules/@mui/material/Toolbar/Toolbar.d.ts +2 -2
  592. package/node_modules/@mui/material/Tooltip/Tooltip.d.ts +23 -27
  593. package/node_modules/@mui/material/Tooltip/Tooltip.js +1 -1
  594. package/node_modules/@mui/material/Typography/Typography.d.ts +3 -3
  595. package/node_modules/@mui/material/Zoom/Zoom.d.ts +3 -3
  596. package/node_modules/@mui/material/index.js +1 -1
  597. package/node_modules/@mui/material/internal/SwitchBase.d.ts +35 -1
  598. package/node_modules/@mui/material/internal/SwitchBase.js +88 -31
  599. package/node_modules/@mui/material/modern/Accordion/Accordion.js +18 -6
  600. package/node_modules/@mui/material/modern/AccordionSummary/AccordionSummary.js +67 -16
  601. package/node_modules/@mui/material/modern/Autocomplete/Autocomplete.js +1 -1
  602. package/node_modules/@mui/material/modern/AvatarGroup/AvatarGroup.js +10 -2
  603. package/node_modules/@mui/material/modern/Badge/Badge.js +27 -20
  604. package/node_modules/@mui/material/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
  605. package/node_modules/@mui/material/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  606. package/node_modules/@mui/material/modern/Button/Button.js +3 -3
  607. package/node_modules/@mui/material/modern/CardActionArea/CardActionArea.js +47 -8
  608. package/node_modules/@mui/material/modern/Checkbox/Checkbox.js +51 -21
  609. package/node_modules/@mui/material/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  610. package/node_modules/@mui/material/modern/Drawer/Drawer.js +108 -36
  611. package/node_modules/@mui/material/modern/Grid2/Grid2.js +2 -2
  612. package/node_modules/@mui/material/modern/IconButton/IconButton.js +3 -3
  613. package/node_modules/@mui/material/modern/ListItemText/ListItemText.js +14 -5
  614. package/node_modules/@mui/material/modern/Menu/Menu.js +58 -19
  615. package/node_modules/@mui/material/modern/MobileStepper/MobileStepper.js +76 -18
  616. package/node_modules/@mui/material/modern/Modal/Modal.js +9 -10
  617. package/node_modules/@mui/material/modern/NativeSelect/NativeSelectInput.js +6 -2
  618. package/node_modules/@mui/material/modern/NoSsr/NoSsr.js +2 -2
  619. package/node_modules/@mui/material/modern/OutlinedInput/NotchedOutline.js +2 -0
  620. package/node_modules/@mui/material/modern/OutlinedInput/OutlinedInput.js +30 -10
  621. package/node_modules/@mui/material/modern/OverridableComponent/index.js +1 -0
  622. package/node_modules/@mui/material/modern/PigmentContainer/PigmentContainer.js +2 -2
  623. package/node_modules/@mui/material/modern/PigmentGrid/PigmentGrid.js +2 -2
  624. package/node_modules/@mui/material/modern/PigmentHidden/PigmentHidden.js +2 -2
  625. package/node_modules/@mui/material/modern/PigmentStack/PigmentStack.js +2 -2
  626. package/node_modules/@mui/material/modern/Popover/Popover.js +79 -52
  627. package/node_modules/@mui/material/modern/Popper/Popper.js +4 -4
  628. package/node_modules/@mui/material/modern/Portal/Portal.js +2 -2
  629. package/node_modules/@mui/material/modern/Radio/Radio.js +61 -16
  630. package/node_modules/@mui/material/modern/Radio/RadioButtonIcon.js +7 -2
  631. package/node_modules/@mui/material/modern/Rating/Rating.js +131 -45
  632. package/node_modules/@mui/material/modern/Select/SelectInput.js +8 -8
  633. package/node_modules/@mui/material/modern/Slider/useSlider.js +2 -2
  634. package/node_modules/@mui/material/modern/Snackbar/Snackbar.js +116 -32
  635. package/node_modules/@mui/material/modern/SpeedDial/SpeedDial.js +40 -11
  636. package/node_modules/@mui/material/modern/SpeedDialAction/SpeedDialAction.js +109 -31
  637. package/node_modules/@mui/material/modern/StepLabel/StepLabel.js +14 -5
  638. package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeArea.js +1 -0
  639. package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeableDrawer.js +60 -13
  640. package/node_modules/@mui/material/modern/Switch/Switch.js +73 -9
  641. package/node_modules/@mui/material/modern/Tabs/Tabs.js +124 -52
  642. package/node_modules/@mui/material/modern/Tabs/tabsClasses.js +1 -1
  643. package/node_modules/@mui/material/modern/TextField/TextField.js +22 -11
  644. package/node_modules/@mui/material/modern/TextareaAutosize/TextareaAutosize.js +68 -47
  645. package/node_modules/@mui/material/modern/Tooltip/Tooltip.js +1 -1
  646. package/node_modules/@mui/material/modern/index.js +1 -1
  647. package/node_modules/@mui/material/modern/internal/SwitchBase.js +88 -31
  648. package/node_modules/@mui/material/modern/styles/ThemeProvider.js +20 -9
  649. package/node_modules/@mui/material/modern/styles/components.js +1 -0
  650. package/node_modules/@mui/material/modern/styles/createThemeNoVars.js +5 -2
  651. package/node_modules/@mui/material/modern/styles/overrides.js +1 -0
  652. package/node_modules/@mui/material/modern/styles/props.js +1 -0
  653. package/node_modules/@mui/material/modern/styles/shouldSkipGeneratingVar.js +1 -1
  654. package/node_modules/@mui/material/modern/styles/variants.js +1 -0
  655. package/node_modules/@mui/material/modern/useAutocomplete/useAutocomplete.js +16 -14
  656. package/node_modules/@mui/material/modern/useScrollTrigger/useScrollTrigger.js +3 -0
  657. package/node_modules/@mui/material/modern/utils/mergeSlotProps.js +10 -3
  658. package/node_modules/@mui/material/modern/version/index.js +3 -3
  659. package/node_modules/@mui/material/node/Accordion/Accordion.js +18 -6
  660. package/node_modules/@mui/material/node/AccordionSummary/AccordionSummary.js +67 -16
  661. package/node_modules/@mui/material/node/Autocomplete/Autocomplete.js +1 -1
  662. package/node_modules/@mui/material/node/AvatarGroup/AvatarGroup.js +10 -2
  663. package/node_modules/@mui/material/node/Badge/Badge.js +27 -20
  664. package/node_modules/@mui/material/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
  665. package/node_modules/@mui/material/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  666. package/node_modules/@mui/material/node/Button/Button.js +3 -3
  667. package/node_modules/@mui/material/node/CardActionArea/CardActionArea.js +47 -8
  668. package/node_modules/@mui/material/node/Checkbox/Checkbox.js +51 -21
  669. package/node_modules/@mui/material/node/ClickAwayListener/ClickAwayListener.js +3 -3
  670. package/node_modules/@mui/material/node/Drawer/Drawer.js +108 -36
  671. package/node_modules/@mui/material/node/Grid2/Grid2.js +2 -2
  672. package/node_modules/@mui/material/node/IconButton/IconButton.js +3 -3
  673. package/node_modules/@mui/material/node/ListItemText/ListItemText.js +14 -5
  674. package/node_modules/@mui/material/node/Menu/Menu.js +58 -19
  675. package/node_modules/@mui/material/node/MobileStepper/MobileStepper.js +76 -18
  676. package/node_modules/@mui/material/node/Modal/Modal.js +9 -10
  677. package/node_modules/@mui/material/node/NativeSelect/NativeSelectInput.js +6 -2
  678. package/node_modules/@mui/material/node/NoSsr/NoSsr.js +2 -2
  679. package/node_modules/@mui/material/node/OutlinedInput/NotchedOutline.js +2 -0
  680. package/node_modules/@mui/material/node/OutlinedInput/OutlinedInput.js +30 -10
  681. package/node_modules/@mui/material/node/OverridableComponent/index.js +5 -0
  682. package/node_modules/@mui/material/node/PigmentContainer/PigmentContainer.js +2 -2
  683. package/node_modules/@mui/material/node/PigmentGrid/PigmentGrid.js +2 -2
  684. package/node_modules/@mui/material/node/PigmentHidden/PigmentHidden.js +2 -2
  685. package/node_modules/@mui/material/node/PigmentStack/PigmentStack.js +2 -2
  686. package/node_modules/@mui/material/node/Popover/Popover.js +79 -52
  687. package/node_modules/@mui/material/node/Popper/Popper.js +4 -4
  688. package/node_modules/@mui/material/node/Portal/Portal.js +2 -2
  689. package/node_modules/@mui/material/node/Radio/Radio.js +61 -16
  690. package/node_modules/@mui/material/node/Radio/RadioButtonIcon.js +7 -2
  691. package/node_modules/@mui/material/node/Rating/Rating.js +132 -46
  692. package/node_modules/@mui/material/node/Select/SelectInput.js +8 -8
  693. package/node_modules/@mui/material/node/Slider/useSlider.js +2 -2
  694. package/node_modules/@mui/material/node/Snackbar/Snackbar.js +116 -32
  695. package/node_modules/@mui/material/node/SpeedDial/SpeedDial.js +40 -11
  696. package/node_modules/@mui/material/node/SpeedDialAction/SpeedDialAction.js +109 -31
  697. package/node_modules/@mui/material/node/StepLabel/StepLabel.js +14 -5
  698. package/node_modules/@mui/material/node/SwipeableDrawer/SwipeArea.js +1 -0
  699. package/node_modules/@mui/material/node/SwipeableDrawer/SwipeableDrawer.js +60 -13
  700. package/node_modules/@mui/material/node/Switch/Switch.js +73 -9
  701. package/node_modules/@mui/material/node/Tabs/Tabs.js +124 -52
  702. package/node_modules/@mui/material/node/Tabs/tabsClasses.js +1 -1
  703. package/node_modules/@mui/material/node/TextField/TextField.js +22 -11
  704. package/node_modules/@mui/material/node/TextareaAutosize/TextareaAutosize.js +67 -46
  705. package/node_modules/@mui/material/node/Tooltip/Tooltip.js +1 -1
  706. package/node_modules/@mui/material/node/index.js +1 -1
  707. package/node_modules/@mui/material/node/internal/SwitchBase.js +88 -31
  708. package/node_modules/@mui/material/node/styles/ThemeProvider.js +20 -9
  709. package/node_modules/@mui/material/node/styles/components.js +5 -0
  710. package/node_modules/@mui/material/node/styles/createThemeNoVars.js +5 -2
  711. package/node_modules/@mui/material/node/styles/overrides.js +5 -0
  712. package/node_modules/@mui/material/node/styles/props.js +5 -0
  713. package/node_modules/@mui/material/node/styles/shouldSkipGeneratingVar.js +1 -1
  714. package/node_modules/@mui/material/node/styles/variants.js +5 -0
  715. package/node_modules/@mui/material/node/useAutocomplete/useAutocomplete.js +16 -14
  716. package/node_modules/@mui/material/node/useScrollTrigger/useScrollTrigger.js +3 -0
  717. package/node_modules/@mui/material/node/utils/mergeSlotProps.js +10 -3
  718. package/node_modules/@mui/material/node/version/index.js +3 -3
  719. package/node_modules/@mui/material/package.json +6 -6
  720. package/node_modules/@mui/material/styles/ThemeProvider.d.ts +6 -0
  721. package/node_modules/@mui/material/styles/ThemeProvider.js +20 -9
  722. package/node_modules/@mui/material/styles/ThemeProviderWithVars.d.ts +1 -0
  723. package/node_modules/@mui/material/styles/components.d.ts +590 -591
  724. package/node_modules/@mui/material/styles/components.js +1 -0
  725. package/node_modules/@mui/material/styles/createThemeNoVars.d.ts +2 -1
  726. package/node_modules/@mui/material/styles/createThemeNoVars.js +5 -2
  727. package/node_modules/@mui/material/styles/index.d.ts +1 -0
  728. package/node_modules/@mui/material/styles/overrides.d.ts +123 -142
  729. package/node_modules/@mui/material/styles/overrides.js +1 -0
  730. package/node_modules/@mui/material/styles/props.d.ts +120 -122
  731. package/node_modules/@mui/material/styles/props.js +1 -0
  732. package/node_modules/@mui/material/styles/shouldSkipGeneratingVar.js +1 -1
  733. package/node_modules/@mui/material/styles/variants.d.ts +7 -10
  734. package/node_modules/@mui/material/styles/variants.js +1 -0
  735. package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts +2 -2
  736. package/node_modules/@mui/material/useAutocomplete/useAutocomplete.js +16 -14
  737. package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts +1 -1
  738. package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.js +3 -0
  739. package/node_modules/@mui/material/utils/mergeSlotProps.js +10 -3
  740. package/node_modules/@mui/material/version/index.js +3 -3
  741. package/node_modules/@mui/private-theming/CHANGELOG.md +256 -0
  742. package/node_modules/@mui/private-theming/index.js +1 -1
  743. package/node_modules/@mui/private-theming/modern/index.js +1 -1
  744. package/node_modules/@mui/private-theming/node/index.js +1 -1
  745. package/node_modules/@mui/private-theming/package.json +2 -2
  746. package/node_modules/@mui/styled-engine/CHANGELOG.md +387 -0
  747. package/node_modules/@mui/styled-engine/README.md +2 -2
  748. package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts +1 -0
  749. package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +72 -18
  750. package/node_modules/@mui/styled-engine/index.js +1 -1
  751. package/node_modules/@mui/styled-engine/modern/StyledEngineProvider/StyledEngineProvider.js +72 -18
  752. package/node_modules/@mui/styled-engine/modern/index.js +1 -1
  753. package/node_modules/@mui/styled-engine/node/StyledEngineProvider/StyledEngineProvider.js +72 -17
  754. package/node_modules/@mui/styled-engine/node/index.js +1 -1
  755. package/node_modules/@mui/styled-engine/package.json +1 -1
  756. package/node_modules/@mui/system/CHANGELOG.md +345 -0
  757. package/node_modules/@mui/system/GlobalStyles/GlobalStyles.js +25 -1
  758. package/node_modules/@mui/system/Grid/createGrid.js +4 -0
  759. package/node_modules/@mui/system/Grid/deleteLegacyGridProps.d.ts +11 -0
  760. package/node_modules/@mui/system/Grid/deleteLegacyGridProps.js +47 -0
  761. package/node_modules/@mui/system/README.md +6 -4
  762. package/node_modules/@mui/system/ThemeProvider/ThemeProvider.js +4 -2
  763. package/node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts +8 -0
  764. package/node_modules/@mui/system/ThemeProvider/useLayerOrder.js +58 -0
  765. package/node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts +5 -5
  766. package/node_modules/@mui/system/createStyled/createStyled.js +34 -21
  767. package/node_modules/@mui/system/cssContainerQueries/cssContainerQueries.d.ts +1 -2
  768. package/node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts +6 -0
  769. package/node_modules/@mui/system/cssVars/createCssVarsProvider.js +7 -0
  770. package/node_modules/@mui/system/cssVars/index.d.ts +1 -0
  771. package/node_modules/@mui/system/cssVars/localStorageManager.d.ts +34 -0
  772. package/node_modules/@mui/system/cssVars/localStorageManager.js +57 -0
  773. package/node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts +2 -0
  774. package/node_modules/@mui/system/cssVars/useCurrentColorScheme.js +50 -69
  775. package/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +26 -2
  776. package/node_modules/@mui/system/esm/Grid/createGrid.js +4 -0
  777. package/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js +41 -0
  778. package/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +5 -3
  779. package/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js +52 -0
  780. package/node_modules/@mui/system/esm/createStyled/createStyled.js +35 -22
  781. package/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js +7 -0
  782. package/node_modules/@mui/system/esm/cssVars/localStorageManager.js +51 -0
  783. package/node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js +49 -69
  784. package/node_modules/@mui/system/esm/styleFunctionSx/AliasesCSSProperties.js +1 -0
  785. package/node_modules/@mui/system/esm/styleFunctionSx/OverwriteCSSProperties.js +1 -0
  786. package/node_modules/@mui/system/esm/styleFunctionSx/StandardCssProperties.js +1 -0
  787. package/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +9 -2
  788. package/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js +3 -0
  789. package/node_modules/@mui/system/esm/version/index.js +3 -3
  790. package/node_modules/@mui/system/index.js +1 -1
  791. package/node_modules/@mui/system/modern/GlobalStyles/GlobalStyles.js +26 -2
  792. package/node_modules/@mui/system/modern/Grid/createGrid.js +4 -0
  793. package/node_modules/@mui/system/modern/Grid/deleteLegacyGridProps.js +41 -0
  794. package/node_modules/@mui/system/modern/ThemeProvider/ThemeProvider.js +5 -3
  795. package/node_modules/@mui/system/modern/ThemeProvider/useLayerOrder.js +52 -0
  796. package/node_modules/@mui/system/modern/createStyled/createStyled.js +35 -22
  797. package/node_modules/@mui/system/modern/cssVars/createCssVarsProvider.js +7 -0
  798. package/node_modules/@mui/system/modern/cssVars/localStorageManager.js +51 -0
  799. package/node_modules/@mui/system/modern/cssVars/useCurrentColorScheme.js +49 -69
  800. package/node_modules/@mui/system/modern/index.js +1 -1
  801. package/node_modules/@mui/system/modern/styleFunctionSx/AliasesCSSProperties.js +1 -0
  802. package/node_modules/@mui/system/modern/styleFunctionSx/OverwriteCSSProperties.js +1 -0
  803. package/node_modules/@mui/system/modern/styleFunctionSx/StandardCssProperties.js +1 -0
  804. package/node_modules/@mui/system/modern/styleFunctionSx/styleFunctionSx.js +9 -2
  805. package/node_modules/@mui/system/modern/useMediaQuery/useMediaQuery.js +3 -0
  806. package/node_modules/@mui/system/modern/version/index.js +3 -3
  807. package/node_modules/@mui/system/package.json +5 -5
  808. package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts +266 -267
  809. package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.js +5 -0
  810. package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts +51 -52
  811. package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.js +5 -0
  812. package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts +0 -1
  813. package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.js +5 -0
  814. package/node_modules/@mui/system/styleFunctionSx/styleFunctionSx.js +9 -2
  815. package/node_modules/@mui/system/useMediaQuery/useMediaQuery.js +3 -0
  816. package/node_modules/@mui/system/version/index.js +3 -3
  817. package/node_modules/@mui/types/package.json +1 -1
  818. package/node_modules/@mui/utils/CHANGELOG.md +256 -0
  819. package/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +32 -12
  820. package/node_modules/@mui/utils/index.js +1 -1
  821. package/node_modules/@mui/utils/modern/index.js +1 -1
  822. package/node_modules/@mui/utils/modern/useForkRef/useForkRef.js +32 -12
  823. package/node_modules/@mui/utils/package.json +3 -3
  824. package/node_modules/@mui/utils/useForkRef/useForkRef.d.ts +1 -2
  825. package/node_modules/@mui/utils/useForkRef/useForkRef.js +32 -13
  826. package/package.json +24 -24
  827. package/node_modules/@babel/parser/index.cjs +0 -5
  828. package/node_modules/@babel/traverse/lib/scope/traverseForScope.js +0 -68
  829. package/node_modules/@babel/traverse/lib/scope/traverseForScope.js.map +0 -1
  830. package/node_modules/@babel/traverse/node_modules/globals/globals.json +0 -1563
  831. package/node_modules/@babel/traverse/node_modules/globals/index.js +0 -2
  832. package/node_modules/@babel/traverse/node_modules/globals/license +0 -9
  833. package/node_modules/@babel/traverse/node_modules/globals/package.json +0 -41
  834. package/node_modules/@babel/traverse/node_modules/globals/readme.md +0 -41
  835. package/node_modules/@emotion/cache/dist/declarations/types/index.d.ts +0 -45
  836. package/node_modules/@emotion/cache/src/index.d.ts +0 -2
  837. package/node_modules/@emotion/cache/types/index.d.ts +0 -45
  838. package/node_modules/@emotion/react/dist/declarations/dist/emotion-react.cjs.d.ts +0 -2
  839. package/node_modules/@emotion/react/dist/declarations/types/helper.d.ts +0 -14
  840. package/node_modules/@emotion/react/dist/declarations/types/index.d.ts +0 -115
  841. package/node_modules/@emotion/react/dist/declarations/types/jsx-dev-runtime.d.ts +0 -1
  842. package/node_modules/@emotion/react/dist/declarations/types/jsx-namespace.d.ts +0 -102
  843. package/node_modules/@emotion/react/dist/declarations/types/jsx-runtime.d.ts +0 -1
  844. package/node_modules/@emotion/react/dist/declarations/types/theming.d.ts +0 -31
  845. package/node_modules/@emotion/react/src/_isolated-hnrs.d.ts +0 -3
  846. package/node_modules/@emotion/react/src/css.js +0 -8
  847. package/node_modules/@emotion/react/src/global.js +0 -145
  848. package/node_modules/@emotion/react/src/index.d.ts +0 -1
  849. package/node_modules/@emotion/react/src/jsx-dev-runtime.d.ts +0 -1
  850. package/node_modules/@emotion/react/src/jsx-runtime.d.ts +0 -1
  851. package/node_modules/@emotion/react/src/jsx-runtime.js +0 -21
  852. package/node_modules/@emotion/react/src/jsx.js +0 -25
  853. package/node_modules/@emotion/react/src/keyframes.js +0 -23
  854. package/node_modules/@emotion/react/types/index.d.ts +0 -115
  855. package/node_modules/@emotion/react/types/jsx-dev-runtime.d.ts +0 -1
  856. package/node_modules/@emotion/react/types/jsx-namespace.d.ts +0 -102
  857. package/node_modules/@emotion/react/types/jsx-runtime.d.ts +0 -1
  858. package/node_modules/@emotion/react/types/theming.d.ts +0 -31
  859. package/node_modules/@emotion/styled/dist/declarations/types/base.d.ts +0 -197
  860. package/node_modules/@emotion/styled/dist/declarations/types/index.d.ts +0 -33
  861. package/node_modules/@emotion/styled/src/base.d.ts +0 -2
  862. package/node_modules/@emotion/styled/src/index.d.ts +0 -2
  863. package/node_modules/@emotion/styled/src/index.js +0 -11
  864. package/node_modules/@emotion/styled/src/utils.js +0 -86
  865. package/node_modules/@emotion/styled/types/jsx-namespace.d.ts +0 -14
  866. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.js +0 -15
  867. package/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +0 -12
  868. package/node_modules/@jridgewell/set-array/LICENSE +0 -19
  869. package/node_modules/@jridgewell/set-array/README.md +0 -37
  870. package/node_modules/@jridgewell/set-array/dist/set-array.mjs +0 -69
  871. package/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +0 -1
  872. package/node_modules/@jridgewell/set-array/dist/set-array.umd.js +0 -83
  873. package/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +0 -1
  874. package/node_modules/@jridgewell/set-array/package.json +0 -65
  875. package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +0 -8
  876. package/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +0 -1
  877. package/node_modules/@mui/material/OverridableComponent.d.ts +0 -67
  878. /package/node_modules/@emotion/cache/src/conditions/{false.js → false.ts} +0 -0
  879. /package/node_modules/@emotion/cache/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  880. /package/node_modules/@emotion/cache/src/conditions/{true.js → true.ts} +0 -0
  881. /package/node_modules/@emotion/react/src/conditions/{false.js → false.ts} +0 -0
  882. /package/node_modules/@emotion/react/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  883. /package/node_modules/@emotion/react/src/conditions/{true.js → true.ts} +0 -0
  884. /package/node_modules/@emotion/react/{types/helper.d.ts → src/types.ts} +0 -0
  885. /package/node_modules/@emotion/react/src/{utils.js → utils.ts} +0 -0
  886. /package/node_modules/@emotion/styled/src/conditions/{false.js → false.ts} +0 -0
  887. /package/node_modules/@emotion/styled/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  888. /package/node_modules/@emotion/styled/src/conditions/{true.js → true.ts} +0 -0
  889. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{false.js → false.ts} +0 -0
  890. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  891. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{true.js → true.ts} +0 -0
@@ -70,25 +70,17 @@ traverse.removeProperties = function (tree, opts) {
70
70
  traverseFast(tree, traverse.clearNode, opts);
71
71
  return tree;
72
72
  };
73
- function hasDenylistedType(path, state) {
74
- if (path.node.type === state.type) {
75
- state.has = true;
76
- path.stop();
77
- }
78
- }
79
73
  traverse.hasType = function (tree, type, denylistTypes) {
80
74
  if (denylistTypes != null && denylistTypes.includes(tree.type)) return false;
81
75
  if (tree.type === type) return true;
82
- const state = {
83
- has: false,
84
- type: type
85
- };
86
- traverse(tree, {
87
- noScope: true,
88
- denylist: denylistTypes,
89
- enter: hasDenylistedType
90
- }, null, state);
91
- return state.has;
76
+ return traverseFast(tree, function (node) {
77
+ if (denylistTypes != null && denylistTypes.includes(node.type)) {
78
+ return traverseFast.skip;
79
+ }
80
+ if (node.type === type) {
81
+ return traverseFast.stop;
82
+ }
83
+ });
92
84
  };
93
85
  traverse.cache = cache;
94
86
 
@@ -1 +1 @@
1
- {"version":3,"names":["require","visitors","exports","_t","cache","_traverseNode","_index","_index2","_hub","VISITOR_KEYS","removeProperties","traverseFast","traverse","parent","opts","scope","state","parentPath","visitSelf","noScope","type","Error","explode","traverseNode","_default","default","verify","cheap","node","enter","path","skipKeys","clearNode","tree","hasDenylistedType","has","stop","hasType","denylistTypes","includes","denylist"],"sources":["../src/index.ts"],"sourcesContent":["import \"./path/context.ts\"; // We have some cycles, this ensures correct order to avoid TDZ\nimport * as visitors from \"./visitors.ts\";\nimport {\n VISITOR_KEYS,\n removeProperties,\n type RemovePropertiesOptions,\n traverseFast,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as cache from \"./cache.ts\";\nimport type NodePath from \"./path/index.ts\";\nimport type { default as Scope, Binding } from \"./scope/index.ts\";\nimport type { ExplodedVisitor, Visitor, VisitorBase } from \"./types.ts\";\nimport { traverseNode } from \"./traverse-node.ts\";\n\nexport type { ExplodedVisitor, Visitor, VisitorBase, Binding };\nexport { default as NodePath } from \"./path/index.ts\";\nexport { default as Scope } from \"./scope/index.ts\";\nexport { default as Hub } from \"./hub.ts\";\nexport type { HubInterface } from \"./hub.ts\";\n\nexport { visitors };\n\nexport type TraverseOptions<S = t.Node> = {\n scope?: Scope;\n noScope?: boolean;\n denylist?: string[];\n shouldSkip?: (node: NodePath) => boolean;\n} & Visitor<S>;\n\nexport type ExplodedTraverseOptions<S = t.Node> = TraverseOptions<S> &\n ExplodedVisitor<S>;\n\nfunction traverse<S>(\n parent: t.Node,\n opts: TraverseOptions<S>,\n scope: Scope | undefined,\n state: S,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse(\n parent: t.Node,\n opts: TraverseOptions,\n scope?: Scope,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse<Options extends TraverseOptions>(\n parent: t.Node,\n // @ts-expect-error provide {} as default value for Options\n opts: Options = {},\n scope?: Scope,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n) {\n if (!parent) return;\n\n if (!opts.noScope && !scope) {\n if (parent.type !== \"Program\" && parent.type !== \"File\") {\n throw new Error(\n \"You must pass a scope and parentPath unless traversing a Program/File. \" +\n `Instead of that you tried to traverse a ${parent.type} node without ` +\n \"passing scope and parentPath.\",\n );\n }\n }\n\n if (!parentPath && visitSelf) {\n throw new Error(\"visitSelf can only be used when providing a NodePath.\");\n }\n\n if (!VISITOR_KEYS[parent.type]) {\n return;\n }\n\n visitors.explode(opts as Visitor);\n\n traverseNode(\n parent,\n opts as ExplodedVisitor,\n scope,\n state,\n parentPath,\n /* skipKeys */ null,\n visitSelf,\n );\n}\n\nexport default traverse;\n\ntraverse.visitors = visitors;\ntraverse.verify = visitors.verify;\ntraverse.explode = visitors.explode;\n\ntraverse.cheap = function (node: t.Node, enter: (node: t.Node) => void) {\n traverseFast(node, enter);\n return;\n};\n\ntraverse.node = function (\n node: t.Node,\n opts: ExplodedTraverseOptions,\n scope?: Scope,\n state?: any,\n path?: NodePath,\n skipKeys?: Record<string, boolean>,\n) {\n traverseNode(node, opts, scope, state, path, skipKeys);\n // traverse.node always returns undefined\n};\n\ntraverse.clearNode = function (node: t.Node, opts?: RemovePropertiesOptions) {\n removeProperties(node, opts);\n};\n\ntraverse.removeProperties = function (\n tree: t.Node,\n opts?: RemovePropertiesOptions,\n) {\n traverseFast(tree, traverse.clearNode, opts);\n return tree;\n};\n\ntype HasDenylistedTypeState = {\n has: boolean;\n type: t.Node[\"type\"];\n};\nfunction hasDenylistedType(path: NodePath, state: HasDenylistedTypeState) {\n if (path.node.type === state.type) {\n state.has = true;\n path.stop();\n }\n}\n\ntraverse.hasType = function (\n tree: t.Node,\n type: t.Node[\"type\"],\n denylistTypes?: Array<string>,\n): boolean {\n // the node we're searching in is denylisted\n if (denylistTypes?.includes(tree.type)) return false;\n\n // the type we're looking for is the same as the passed node\n if (tree.type === type) return true;\n\n const state: HasDenylistedTypeState = {\n has: false,\n type: type,\n };\n\n traverse(\n tree,\n {\n noScope: true,\n denylist: denylistTypes,\n enter: hasDenylistedType,\n },\n null,\n state,\n );\n\n return state.has;\n};\n\ntraverse.cache = cache;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA0CE,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAC1C,IAAAE,EAAA,GAAAH,OAAA;AAOA,IAAAI,KAAA,GAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA0C;EAfxCS,YAAY;EACZC,gBAAgB;EAEhBC;AAAY,IAAAR,EAAA;AA6Cd,SAASS,QAAQA,CACfC,MAAc,EAEdC,IAAa,GAAG,CAAC,CAAC,EAClBC,KAAa,EACbC,KAAW,EACXC,UAAqB,EACrBC,SAAmB,EACnB;EACA,IAAI,CAACL,MAAM,EAAE;EAEb,IAAI,CAACC,IAAI,CAACK,OAAO,IAAI,CAACJ,KAAK,EAAE;IAC3B,IAAIF,MAAM,CAACO,IAAI,KAAK,SAAS,IAAIP,MAAM,CAACO,IAAI,KAAK,MAAM,EAA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;EACAH,YAAY,CAACsB,IAAI,EAAErB,QAAQ,CAACoB,SAAS,EAAElB,IAAI,CAAC;EAC5C,OAAOmB,IAAI;AACb,CAAC;AAMD,SAASC,iBAAiBA,CAACJ,IAAc,EAAEd,KAA6B,EAAE;EACxE,IAAIc,IAAI,CAACF,IAAI,CAACR,IAAI,KAAKJ,KAAK,CAACI,IAAI,EAAE;IACjCJ,KAAK,CAACmB,GAAG,GAAG,IAAI;IAChBL,IAAI,CAACM,IAAI,CAAC,CAAC;EACb;AACF;AAEAxB,QAAQ,CAACyB,OAAO,GAAG,UACjBJ,IAAY,EACZb,IAAoB,EACpBkB,aAA6B,EACpB;EAET,IAAIA,aAAa,YAAbA,aAAa,CAAEC,QAAQ,CAACN,IAAI,CAACb,IAAI,CAAC,EAAE,OAAO,KAAK;EAGpD,IAAIa,IAAI,CAACb,IAAI,KAAKA,IAAI,EAAE,OAAO,IAAI;EAEnC,MAAMJ,KAA6B,GAAG;IACpCmB,GAAG,EAAE,KAAK;IACVf,IAAI,EAAEA;EACR,CAAC;EAEDR,QAAQ,CACNqB,IAAI,EACJ;IACEd,OAAO,EAAE,IAAI;IACbqB,QAAQ,EAAEF,aAAa;IACvBT,KAAK,EAAEK;EACT,CAAC,EACD,IAAI,EACJlB,KACF,CAAC;EAED,OAAOA,KAAK,CAACmB,GAAG;AAClB,CAAC;AAEDvB,QAAQ,CAACR,KAAK,GAAGA,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["require","visitors","exports","_t","cache","_traverseNode","_index","_index2","_hub","VISITOR_KEYS","removeProperties","traverseFast","traverse","parent","opts","scope","state","parentPath","visitSelf","noScope","type","Error","explode","traverseNode","_default","default","verify","cheap","node","enter","path","skipKeys","clearNode","tree","hasType","denylistTypes","includes","skip","stop"],"sources":["../src/index.ts"],"sourcesContent":["import \"./path/context.ts\"; // We have some cycles, this ensures correct order to avoid TDZ\nimport * as visitors from \"./visitors.ts\";\nimport {\n VISITOR_KEYS,\n removeProperties,\n type RemovePropertiesOptions,\n traverseFast,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as cache from \"./cache.ts\";\nimport type NodePath from \"./path/index.ts\";\nimport type { default as Scope, Binding } from \"./scope/index.ts\";\nimport type { ExplodedVisitor, Visitor, VisitorBase } from \"./types.ts\";\nimport { traverseNode } from \"./traverse-node.ts\";\n\nexport type { ExplodedVisitor, Visitor, VisitorBase, Binding };\nexport { default as NodePath } from \"./path/index.ts\";\nexport { default as Scope } from \"./scope/index.ts\";\nexport { default as Hub } from \"./hub.ts\";\nexport type { HubInterface } from \"./hub.ts\";\n\nexport { visitors };\n\nexport type TraverseOptions<S = t.Node> = {\n scope?: Scope;\n noScope?: boolean;\n denylist?: string[];\n shouldSkip?: (node: NodePath) => boolean;\n} & Visitor<S>;\n\nexport type ExplodedTraverseOptions<S = t.Node> = TraverseOptions<S> &\n ExplodedVisitor<S>;\n\nfunction traverse<S>(\n parent: t.Node,\n opts: TraverseOptions<S>,\n scope: Scope | undefined,\n state: S,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse(\n parent: t.Node,\n opts: TraverseOptions,\n scope?: Scope,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse<Options extends TraverseOptions>(\n parent: t.Node,\n // @ts-expect-error provide {} as default value for Options\n opts: Options = {},\n scope?: Scope,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n) {\n if (!parent) return;\n\n if (!opts.noScope && !scope) {\n if (parent.type !== \"Program\" && parent.type !== \"File\") {\n throw new Error(\n \"You must pass a scope and parentPath unless traversing a Program/File. \" +\n `Instead of that you tried to traverse a ${parent.type} node without ` +\n \"passing scope and parentPath.\",\n );\n }\n }\n\n if (!parentPath && visitSelf) {\n throw new Error(\"visitSelf can only be used when providing a NodePath.\");\n }\n\n if (!VISITOR_KEYS[parent.type]) {\n return;\n }\n\n visitors.explode(opts as Visitor);\n\n traverseNode(\n parent,\n opts as ExplodedVisitor,\n scope,\n state,\n parentPath,\n /* skipKeys */ null,\n visitSelf,\n );\n}\n\nexport default traverse;\n\ntraverse.visitors = visitors;\ntraverse.verify = visitors.verify;\ntraverse.explode = visitors.explode;\n\ntraverse.cheap = function (node: t.Node, enter: (node: t.Node) => void) {\n traverseFast(node, enter);\n return;\n};\n\ntraverse.node = function (\n node: t.Node,\n opts: ExplodedTraverseOptions,\n scope?: Scope,\n state?: any,\n path?: NodePath,\n skipKeys?: Record<string, boolean>,\n) {\n traverseNode(node, opts, scope, state, path, skipKeys);\n // traverse.node always returns undefined\n};\n\ntraverse.clearNode = function (node: t.Node, opts?: RemovePropertiesOptions) {\n removeProperties(node, opts);\n};\n\ntraverse.removeProperties = function (\n tree: t.Node,\n opts?: RemovePropertiesOptions,\n) {\n traverseFast(tree, traverse.clearNode, opts);\n return tree;\n};\n\ntraverse.hasType = function (\n tree: t.Node,\n type: t.Node[\"type\"],\n denylistTypes?: Array<string>,\n): boolean {\n // the node we're searching in is denylisted\n if (denylistTypes?.includes(tree.type)) return false;\n\n // the type we're looking for is the same as the passed node\n if (tree.type === type) return true;\n\n return traverseFast(tree, function (node) {\n if (denylistTypes?.includes(node.type)) {\n return traverseFast.skip;\n }\n if (node.type === type) {\n return traverseFast.stop;\n }\n });\n};\n\ntraverse.cache = cache;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA0CE,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAC1C,IAAAE,EAAA,GAAAH,OAAA;AAOA,IAAAI,KAAA,GAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA0C;EAfxCS,YAAY;EACZC,gBAAgB;EAEhBC;AAAY,IAAAR,EAAA;AA6Cd,SAASS,QAAQA,CACfC,MAAc,EAEd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AEC,KAAK,EAAEc,IAAI,EAAEC,QAAQ,CAAC;AAExD,CAAC;AAEDnB,QAAQ,CAACoB,SAAS,GAAG,UAAUJ,IAAY,EAAEd,IAA8B,EAAE;EAC3EJ,gBAAgB,CAACkB,IAAI,EAAEd,IAAI,CAAC;AAC9B,CAAC;AAEDF,QAAQ,CAACF,gBAAgB,GAAG,UAC1BuB,IAAY,EACZnB,IAA8B,EAC9B;EACAH,YAAY,CAACsB,IAAI,EAAErB,QAAQ,CAACoB,SAAS,EAAElB,IAAI,CAAC;EAC5C,OAAOmB,IAAI;AACb,CAAC;AAEDrB,QAAQ,CAACsB,OAAO,GAAG,UACjBD,IAAY,EACZb,IAAoB,EACpBe,aAA6B,EACpB;EAET,IAAIA,aAAa,YAAbA,aAAa,CAAEC,QAAQ,CAACH,IAAI,CAACb,IAAI,CAAC,EAAE,OAAO,KAAK;EAGpD,IAAIa,IAAI,CAACb,IAAI,KAAKA,IAAI,EAAE,OAAO,IAAI;EAEnC,OAAOT,YAAY,CAACsB,IAAI,EAAE,UAAUL,IAAI,EAAE;IACxC,IAAIO,aAAa,YAAbA,aAAa,CAAEC,QAAQ,CAACR,IAAI,CAACR,IAAI,CAAC,EAAE;MACtC,OAAOT,YAAY,CAAC0B,IAAI;IAC1B;IACA,IAAIT,IAAI,CAACR,IAAI,KAAKA,IAAI,EAAE;MACtB,OAAOT,YAAY,CAAC2B,IAAI;IAC1B;EACF,CAAC,CAAC;AACJ,CAAC;AAED1B,QAAQ,CAACR,KAAK,GAAGA,KAAK","ignoreList":[]}
@@ -130,9 +130,7 @@ function isDescendant(maybeAncestor) {
130
130
  function inType(...candidateTypes) {
131
131
  let path = this;
132
132
  while (path) {
133
- for (const type of candidateTypes) {
134
- if (path.node.type === type) return true;
135
- }
133
+ if (candidateTypes.includes(path.node.type)) return true;
136
134
  path = path.parentPath;
137
135
  }
138
136
  return false;
@@ -1 +1 @@
1
- {"version":3,"names":["_t","require","VISITOR_KEYS","findParent","callback","path","parentPath","find","getFunctionParent","p","isFunction","getStatementParent","Array","isArray","container","isStatement","isProgram","isFile","Error","getEarliestCommonAncestorFrom","paths","getDeepestCommonAncestorFrom","deepest","i","ancestries","earliest","keys","type","ancestry","listKey","key","earliestKeyIndex","indexOf","parentKey","currentKeyIndex","filter","length","minDepth","Infinity","lastCommonIndex","lastCommon","map","unshift","first","depthLoop","shouldMatch","getAncestry","push","isAncestor","maybeDescendant","isDescendant","maybeAncestor","parent","inType","candidateTypes","node"],"sources":["../../src/path/ancestry.ts"],"sourcesContent":["// This file contains that retrieve or validate anything related to the current paths ancestry.\n\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type NodePath from \"./index.ts\";\n\n/**\n * Starting at the parent path of the current `NodePath` and going up the\n * tree, return the first `NodePath` that causes the provided `callback`\n * to return a truthy value, or `null` if the `callback` never returns a\n * truthy value.\n */\n\nexport function findParent(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n while ((path = path.parentPath)) {\n if (callback(path)) return path;\n }\n return null;\n}\n\n/**\n * Starting at current `NodePath` and going up the tree, return the first\n * `NodePath` that causes the provided `callback` to return a truthy value,\n * or `null` if the `callback` never returns a truthy value.\n */\n\nexport function find(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n do {\n if (callback(path)) return path;\n } while ((path = path.parentPath));\n return null;\n}\n\n/**\n * Get the parent function of the current path.\n */\n\nexport function getFunctionParent(this: NodePath): NodePath<t.Function> | null {\n return this.findParent(p => p.isFunction()) as NodePath<t.Function> | null;\n}\n\n/**\n * Walk up the tree until we hit a parent node path in a list.\n */\n\nexport function getStatementParent(this: NodePath): NodePath<t.Statement> {\n let path = this;\n\n do {\n if (\n !path.parentPath ||\n (Array.isArray(path.container) && path.isStatement())\n ) {\n break;\n } else {\n path = path.parentPath;\n }\n } while (path);\n\n if (path && (path.isProgram() || path.isFile())) {\n throw new Error(\n \"File/Program node, we can't possibly find a statement parent to this\",\n );\n }\n\n return path as NodePath<t.Statement>;\n}\n\n/**\n * Get the deepest common ancestor and then from it, get the earliest relationship path\n * to that ancestor.\n *\n * Earliest is defined as being \"before\" all the other nodes in terms of list container\n * position and visiting key.\n */\n\nexport function getEarliestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n): NodePath {\n return this.getDeepestCommonAncestorFrom(\n paths,\n function (deepest, i, ancestries) {\n let earliest;\n const keys = VISITOR_KEYS[deepest.type];\n\n for (const ancestry of ancestries) {\n const path = ancestry[i + 1];\n\n // first path\n if (!earliest) {\n earliest = path;\n continue;\n }\n\n // handle containers\n if (path.listKey && earliest.listKey === path.listKey) {\n // we're in the same container so check if we're earlier\n if (path.key < earliest.key) {\n earliest = path;\n continue;\n }\n }\n\n // handle keys\n const earliestKeyIndex = keys.indexOf(earliest.parentKey);\n const currentKeyIndex = keys.indexOf(path.parentKey);\n if (earliestKeyIndex > currentKeyIndex) {\n // key appears before so it's earlier\n earliest = path;\n }\n }\n\n return earliest;\n },\n );\n}\n\n/**\n * Get the earliest path in the tree where the provided `paths` intersect.\n *\n * TODO: Possible optimisation target.\n */\n\nexport function getDeepestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n filter?: (deepest: NodePath, i: number, ancestries: NodePath[][]) => NodePath,\n): NodePath {\n if (!paths.length) {\n return this;\n }\n\n if (paths.length === 1) {\n return paths[0];\n }\n\n // minimum depth of the tree so we know the highest node\n let minDepth = Infinity;\n\n // last common ancestor\n let lastCommonIndex, lastCommon;\n\n // get the ancestors of the path, breaking when the parent exceeds ourselves\n const ancestries = paths.map(path => {\n const ancestry: NodePath[] = [];\n\n do {\n ancestry.unshift(path);\n } while ((path = path.parentPath) && path !== this);\n\n // save min depth to avoid going too far in\n if (ancestry.length < minDepth) {\n minDepth = ancestry.length;\n }\n\n return ancestry;\n });\n\n // get the first ancestry so we have a seed to assess all other ancestries with\n const first = ancestries[0];\n\n // check ancestor equality\n depthLoop: for (let i = 0; i < minDepth; i++) {\n const shouldMatch = first[i];\n\n for (const ancestry of ancestries) {\n if (ancestry[i] !== shouldMatch) {\n // we've hit a snag\n break depthLoop;\n }\n }\n\n // next iteration may break so store these so they can be returned\n lastCommonIndex = i;\n lastCommon = shouldMatch;\n }\n\n if (lastCommon) {\n if (filter) {\n return filter(lastCommon, lastCommonIndex, ancestries);\n } else {\n return lastCommon;\n }\n } else {\n throw new Error(\"Couldn't find intersection\");\n }\n}\n\n/**\n * Build an array of node paths containing the entire ancestry of the current node path.\n *\n * NOTE: The current node path is included in this.\n */\n\nexport function getAncestry(this: NodePath): Array<NodePath> {\n let path = this;\n const paths = [];\n do {\n paths.push(path);\n } while ((path = path.parentPath));\n return paths;\n}\n\n/**\n * A helper to find if `this` path is an ancestor of @param maybeDescendant\n */\nexport function isAncestor(this: NodePath, maybeDescendant: NodePath): boolean {\n return maybeDescendant.isDescendant(this);\n}\n\n/**\n * A helper to find if `this` path is a descendant of @param maybeAncestor\n */\nexport function isDescendant(this: NodePath, maybeAncestor: NodePath): boolean {\n return !!this.findParent(parent => parent === maybeAncestor);\n}\n\nexport function inType(this: NodePath, ...candidateTypes: string[]): boolean {\n let path = this;\n while (path) {\n for (const type of candidateTypes) {\n if (path.node.type === type) return true;\n }\n path = path.parentPath;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAA4C;EAAnCC;AAAY,IAAAF,EAAA;AAWd,SAASG,UAAUA,CAExBC,QAAqC,EACpB;EACjB,IAAIC,IAAI,GAAG,IAAI;EACf,OAAQA,IAAI,GAAGA,IAAI,CAACC,UAAU,EAAG;IAC/B,IAAIF,QAAQ,CAACC,IAAI,CAAC,EAAE,OAAOA,IAAI;EACjC;EACA,OAAO,IAAI;AACb;AAQO,SAASE,IAAIA,CAElBH,QAAqC,EACpB;EACjB,IAAIC,IAAI,GAAG,IAAI;EACf,GAAG;IACD,IAAID,QAAQ,CAACC,IAAI,CAAC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]}
1
+ {"version":3,"names":["_t","require","VISITOR_KEYS","findParent","callback","path","parentPath","find","getFunctionParent","p","isFunction","getStatementParent","Array","isArray","container","isStatement","isProgram","isFile","Error","getEarliestCommonAncestorFrom","paths","getDeepestCommonAncestorFrom","deepest","i","ancestries","earliest","keys","type","ancestry","listKey","key","earliestKeyIndex","indexOf","parentKey","currentKeyIndex","filter","length","minDepth","Infinity","lastCommonIndex","lastCommon","map","unshift","first","depthLoop","shouldMatch","getAncestry","push","isAncestor","maybeDescendant","isDescendant","maybeAncestor","parent","inType","candidateTypes","includes","node"],"sources":["../../src/path/ancestry.ts"],"sourcesContent":["// This file contains that retrieve or validate anything related to the current paths ancestry.\n\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type NodePath from \"./index.ts\";\n\n/**\n * Starting at the parent path of the current `NodePath` and going up the\n * tree, return the first `NodePath` that causes the provided `callback`\n * to return a truthy value, or `null` if the `callback` never returns a\n * truthy value.\n */\n\nexport function findParent(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n while ((path = path.parentPath)) {\n if (callback(path)) return path;\n }\n return null;\n}\n\n/**\n * Starting at current `NodePath` and going up the tree, return the first\n * `NodePath` that causes the provided `callback` to return a truthy value,\n * or `null` if the `callback` never returns a truthy value.\n */\n\nexport function find(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n do {\n if (callback(path)) return path;\n } while ((path = path.parentPath));\n return null;\n}\n\n/**\n * Get the parent function of the current path.\n */\n\nexport function getFunctionParent(this: NodePath): NodePath<t.Function> | null {\n return this.findParent(p => p.isFunction()) as NodePath<t.Function> | null;\n}\n\n/**\n * Walk up the tree until we hit a parent node path in a list.\n */\n\nexport function getStatementParent(this: NodePath): NodePath<t.Statement> {\n let path = this;\n\n do {\n if (\n !path.parentPath ||\n (Array.isArray(path.container) && path.isStatement())\n ) {\n break;\n } else {\n path = path.parentPath;\n }\n } while (path);\n\n if (path && (path.isProgram() || path.isFile())) {\n throw new Error(\n \"File/Program node, we can't possibly find a statement parent to this\",\n );\n }\n\n return path as NodePath<t.Statement>;\n}\n\n/**\n * Get the deepest common ancestor and then from it, get the earliest relationship path\n * to that ancestor.\n *\n * Earliest is defined as being \"before\" all the other nodes in terms of list container\n * position and visiting key.\n */\n\nexport function getEarliestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n): NodePath {\n return this.getDeepestCommonAncestorFrom(\n paths,\n function (deepest, i, ancestries) {\n let earliest;\n const keys = VISITOR_KEYS[deepest.type];\n\n for (const ancestry of ancestries) {\n const path = ancestry[i + 1];\n\n // first path\n if (!earliest) {\n earliest = path;\n continue;\n }\n\n // handle containers\n if (path.listKey && earliest.listKey === path.listKey) {\n // we're in the same container so check if we're earlier\n if (path.key < earliest.key) {\n earliest = path;\n continue;\n }\n }\n\n // handle keys\n const earliestKeyIndex = keys.indexOf(earliest.parentKey);\n const currentKeyIndex = keys.indexOf(path.parentKey);\n if (earliestKeyIndex > currentKeyIndex) {\n // key appears before so it's earlier\n earliest = path;\n }\n }\n\n return earliest;\n },\n );\n}\n\n/**\n * Get the earliest path in the tree where the provided `paths` intersect.\n *\n * TODO: Possible optimisation target.\n */\n\nexport function getDeepestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n filter?: (deepest: NodePath, i: number, ancestries: NodePath[][]) => NodePath,\n): NodePath {\n if (!paths.length) {\n return this;\n }\n\n if (paths.length === 1) {\n return paths[0];\n }\n\n // minimum depth of the tree so we know the highest node\n let minDepth = Infinity;\n\n // last common ancestor\n let lastCommonIndex, lastCommon;\n\n // get the ancestors of the path, breaking when the parent exceeds ourselves\n const ancestries = paths.map(path => {\n const ancestry: NodePath[] = [];\n\n do {\n ancestry.unshift(path);\n } while ((path = path.parentPath) && path !== this);\n\n // save min depth to avoid going too far in\n if (ancestry.length < minDepth) {\n minDepth = ancestry.length;\n }\n\n return ancestry;\n });\n\n // get the first ancestry so we have a seed to assess all other ancestries with\n const first = ancestries[0];\n\n // check ancestor equality\n depthLoop: for (let i = 0; i < minDepth; i++) {\n const shouldMatch = first[i];\n\n for (const ancestry of ancestries) {\n if (ancestry[i] !== shouldMatch) {\n // we've hit a snag\n break depthLoop;\n }\n }\n\n // next iteration may break so store these so they can be returned\n lastCommonIndex = i;\n lastCommon = shouldMatch;\n }\n\n if (lastCommon) {\n if (filter) {\n return filter(lastCommon, lastCommonIndex, ancestries);\n } else {\n return lastCommon;\n }\n } else {\n throw new Error(\"Couldn't find intersection\");\n }\n}\n\n/**\n * Build an array of node paths containing the entire ancestry of the current node path.\n *\n * NOTE: The current node path is included in this.\n */\n\nexport function getAncestry(this: NodePath): Array<NodePath> {\n let path = this;\n const paths = [];\n do {\n paths.push(path);\n } while ((path = path.parentPath));\n return paths;\n}\n\n/**\n * A helper to find if `this` path is an ancestor of @param maybeDescendant\n */\nexport function isAncestor(this: NodePath, maybeDescendant: NodePath): boolean {\n return maybeDescendant.isDescendant(this);\n}\n\n/**\n * A helper to find if `this` path is a descendant of @param maybeAncestor\n */\nexport function isDescendant(this: NodePath, maybeAncestor: NodePath): boolean {\n return !!this.findParent(parent => parent === maybeAncestor);\n}\n\nexport function inType(this: NodePath, ...candidateTypes: string[]): boolean {\n let path = this;\n while (path) {\n if (candidateTypes.includes(path.node.type)) return true;\n path = path.parentPath;\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAA4C;EAAnCC;AAAY,IAAAF,EAAA;AAWd,SAASG,UAAUA,CAExBC,QAAqC,EACpB;EACjB,IAAIC,IAAI,GAAG,IAAI;EACf,OAAQA,IAAI,GAAGA,IAAI,CAACC,UAAU,EAAG;IAC/B,IAAIF,QAAQ,CAACC,IAAI,CAAC,EAAE,OAAOA,IAAI;EACjC;EACA,OAAO,IAAI;AACb;AAQO,SAASE,IAAIA,CAElBH,QAAqC,EACpB;EACjB,IAAIC,IAAI,GAAG,IA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K;AACd","ignoreList":[]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports._call = _call;
7
- exports._forceSetScope = _forceSetScope;
8
7
  exports._getQueueContexts = _getQueueContexts;
9
8
  exports._resyncKey = _resyncKey;
10
9
  exports._resyncList = _resyncList;
@@ -109,20 +108,6 @@ function skipKey(key) {
109
108
  function stop() {
110
109
  this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP;
111
110
  }
112
- function _forceSetScope(current) {
113
- var _current$scope;
114
- let path = current.parentPath;
115
- if ((current.key === "key" || current.listKey === "decorators") && path.isMethod() || current.key === "discriminant" && path.isSwitchStatement()) {
116
- path = path.parentPath;
117
- }
118
- let target;
119
- while (path && !target) {
120
- target = path.scope;
121
- path = path.parentPath;
122
- }
123
- current.scope = current.getScope(target);
124
- (_current$scope = current.scope) == null || _current$scope.init();
125
- }
126
111
  function setScope() {
127
112
  var _this$opts2, _this$scope;
128
113
  if ((_this$opts2 = this.opts) != null && _this$opts2.noScope) return;
@@ -1 +1 @@
1
- {"version":3,"names":["_traverseNode","require","_index","_removal","t","call","key","opts","debug","node","_call","_opts$this$node$type","type","fns","fn","ret","state","then","Error","_traverseFlags","isDenylisted","_this$opts$denylist","denylist","blacklist","includes","exports","isBlacklisted","restoreContext","path","context","visit","_this$opts$shouldSkip","_this$opts","shouldSkip","currentContext","shouldStop","traverseNode","scope","skipKeys","skip","skipKey","stop","SHOULD_SKIP","SHOULD_STOP","_forceSetScope","current","_current$scope","parentPath","listKey","isMethod","isSwitchStatement","target","getScope","init","setScope","_this$opts2","_this$scope","noScope","_path$opts","setContext","resync","removed","_resyncParent","_resyncList","_resyncKey","parent","container","Array","isArray","i","length","setKey","Object","keys","inList","newContainer","_resyncRemoved","_markRemoved","popContext","contexts","pop","undefined","pushContext","push","setup","_this$node","requeue","pathToQueue","maybeQueue","requeueComputedKeyAndDecorators","isPrivate","computed","get","decorators","decorator","_getQueueContexts"],"sources":["../../src/path/context.ts"],"sourcesContent":["// This file contains methods responsible for maintaining a TraversalContext.\n\nimport { traverseNode } from \"../traverse-node.ts\";\nimport { SHOULD_SKIP, SHOULD_STOP } from \"./index.ts\";\nimport { _markRemoved } from \"./removal.ts\";\nimport type TraversalContext from \"../context.ts\";\nimport type { VisitPhase } from \"../types.ts\";\nimport type NodePath from \"./index.ts\";\nimport * as t from \"@babel/types\";\n\nexport function call(this: NodePath, key: VisitPhase): boolean {\n const opts = this.opts;\n\n this.debug(key);\n\n if (this.node) {\n if (_call.call(this, opts[key])) return true;\n }\n\n if (this.node) {\n return _call.call(this, opts[this.node.type]?.[key]);\n }\n\n return false;\n}\n\nexport function _call(this: NodePath, fns?: Array<Function>): boolean {\n if (!fns) return false;\n\n for (const fn of fns) {\n if (!fn) continue;\n\n const node = this.node;\n if (!node) return true;\n\n const ret = fn.call(this.state, this, this.state);\n if (ret && typeof ret === \"object\" && typeof ret.then === \"function\") {\n throw new Error(\n `You appear to be using a plugin with an async traversal visitor, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n if (ret) {\n throw new Error(`Unexpected return value from visitor method ${fn}`);\n }\n\n // node has been replaced, it will have been requeued\n if (this.node !== node) return true;\n\n // this.shouldSkip || this.shouldStop || this.removed\n if (this._traverseFlags > 0) return true;\n }\n\n return false;\n}\n\nexport function isDenylisted(this: NodePath): boolean {\n // @ts-expect-error TODO(Babel 8): Remove blacklist\n const denylist = this.opts.denylist ?? this.opts.blacklist;\n return denylist?.includes(this.node.type);\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.isBlacklisted = isDenylisted;\n}\n\nfunction restoreContext(path: NodePath, context: TraversalContext) {\n if (path.context !== context) {\n path.context = context;\n path.state = context.state;\n path.opts = context.opts;\n }\n}\n\nexport function visit(this: NodePath): boolean {\n if (!this.node) {\n return false;\n }\n\n if (this.isDenylisted()) {\n return false;\n }\n\n if (this.opts.shouldSkip?.(this)) {\n return false;\n }\n\n const currentContext = this.context;\n // Note: We need to check \"this.shouldSkip\" first because\n // another visitor can set it to true. Usually .shouldSkip is false\n // before calling the enter visitor, but it can be true in case of\n // a requeued node (e.g. by .replaceWith()) that is then marked\n // with .skip().\n if (this.shouldSkip || call.call(this, \"enter\")) {\n this.debug(\"Skip...\");\n return this.shouldStop;\n }\n restoreContext(this, currentContext);\n\n this.debug(\"Recursing into...\");\n this.shouldStop = traverseNode(\n this.node,\n this.opts,\n this.scope,\n this.state,\n this,\n this.skipKeys,\n );\n\n restoreContext(this, currentContext);\n\n call.call(this, \"exit\");\n\n return this.shouldStop;\n}\n\nexport function skip(this: NodePath) {\n this.shouldSkip = true;\n}\n\nexport function skipKey(this: NodePath, key: string) {\n if (this.skipKeys == null) {\n this.skipKeys = {};\n }\n this.skipKeys[key] = true;\n}\n\nexport function stop(this: NodePath) {\n // this.shouldSkip = true; this.shouldStop = true;\n this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;\n}\n\nexport function _forceSetScope(current: NodePath) {\n let path = current.parentPath;\n\n if (\n // Skip method scope if is computed method key or decorator expression\n ((current.key === \"key\" || current.listKey === \"decorators\") &&\n path.isMethod()) ||\n // Skip switch scope if for discriminant (`x` in `switch (x) {}`).\n (current.key === \"discriminant\" && path.isSwitchStatement())\n ) {\n path = path.parentPath;\n }\n\n let target;\n while (path && !target) {\n target = path.scope;\n path = path.parentPath;\n }\n\n current.scope = current.getScope(target);\n current.scope?.init();\n}\n\nexport function setScope(this: NodePath) {\n if (this.opts?.noScope) return;\n\n let path = this.parentPath;\n\n if (\n // Skip method scope if is computed method key or decorator expression\n ((this.key === \"key\" || this.listKey === \"decorators\") &&\n path.isMethod()) ||\n // Skip switch scope if for discriminant (`x` in `switch (x) {}`).\n (this.key === \"discriminant\" && path.isSwitchStatement())\n ) {\n path = path.parentPath;\n }\n\n let target;\n while (path && !target) {\n if (path.opts?.noScope) return;\n\n target = path.scope;\n path = path.parentPath;\n }\n\n this.scope = this.getScope(target);\n this.scope?.init();\n}\n\nexport function setContext<S = unknown>(\n this: NodePath,\n context?: TraversalContext<S>,\n) {\n if (this.skipKeys != null) {\n this.skipKeys = {};\n }\n // this.shouldSkip = false; this.shouldStop = false; this.removed = false;\n this._traverseFlags = 0;\n\n if (context) {\n this.context = context;\n this.state = context.state;\n // Discard the S type parameter from context.opts\n this.opts = context.opts as typeof this.opts;\n }\n\n setScope.call(this);\n\n return this;\n}\n\n/**\n * Here we resync the node paths `key` and `container`. If they've changed according\n * to what we have stored internally then we attempt to resync by crawling and looking\n * for the new values.\n */\n\nexport function resync(this: NodePath) {\n if (this.removed) return;\n\n _resyncParent.call(this);\n _resyncList.call(this);\n _resyncKey.call(this);\n //this._resyncRemoved();\n}\n\nexport function _resyncParent(this: NodePath) {\n if (this.parentPath) {\n this.parent = this.parentPath.node;\n }\n}\n\nexport function _resyncKey(this: NodePath) {\n if (!this.container) return;\n\n if (\n this.node ===\n // @ts-expect-error this.key should present in this.container\n this.container[this.key]\n ) {\n return;\n }\n\n // grrr, path key is out of sync. this is likely due to a modification to the AST\n // not done through our path APIs\n\n if (Array.isArray(this.container)) {\n for (let i = 0; i < this.container.length; i++) {\n if (this.container[i] === this.node) {\n setKey.call(this, i);\n return;\n }\n }\n } else {\n for (const key of Object.keys(this.container)) {\n // @ts-expect-error this.key should present in this.container\n if (this.container[key] === this.node) {\n setKey.call(this, key);\n return;\n }\n }\n }\n\n // ¯\\_(ツ)_/¯ who knows where it's gone lol\n this.key = null;\n}\n\nexport function _resyncList(this: NodePath) {\n if (!this.parent || !this.inList) return;\n\n const newContainer =\n // @ts-expect-error this.listKey should present in this.parent\n this.parent[this.listKey];\n if (this.container === newContainer) return;\n\n // container is out of sync. this is likely the result of it being reassigned\n this.container = newContainer || null;\n}\n\nexport function _resyncRemoved(this: NodePath) {\n if (\n this.key == null ||\n !this.container ||\n // @ts-expect-error this.key should present in this.container\n this.container[this.key] !== this.node\n ) {\n _markRemoved.call(this);\n }\n}\n\nexport function popContext(this: NodePath) {\n this.contexts.pop();\n if (this.contexts.length > 0) {\n this.setContext(this.contexts[this.contexts.length - 1]);\n } else {\n this.setContext(undefined);\n }\n}\n\nexport function pushContext(this: NodePath, context: TraversalContext) {\n this.contexts.push(context);\n this.setContext(context);\n}\n\nexport function setup(\n this: NodePath,\n parentPath: NodePath | undefined,\n container: t.Node | t.Node[],\n listKey: string,\n key: string | number,\n) {\n this.listKey = listKey;\n this.container = container;\n\n this.parentPath = parentPath || this.parentPath;\n setKey.call(this, key);\n}\n\nexport function setKey(this: NodePath, key: string | number) {\n this.key = key;\n this.node =\n // @ts-expect-error this.key must present in this.container\n this.container[this.key];\n this.type = this.node?.type;\n}\n\nexport function requeue(this: NodePath, pathToQueue = this) {\n if (pathToQueue.removed) return;\n\n // If a path is skipped, and then replaced with a\n // new one, the new one shouldn't probably be skipped.\n if (process.env.BABEL_8_BREAKING) {\n pathToQueue.shouldSkip = false;\n }\n\n // TODO(loganfsmyth): This should be switched back to queue in parent contexts\n // automatically once #2892 and #4135 have been resolved. See #4140.\n // let contexts = this._getQueueContexts();\n const contexts = this.contexts;\n\n for (const context of contexts) {\n context.maybeQueue(pathToQueue);\n }\n}\n\nexport function requeueComputedKeyAndDecorators(\n this: NodePath<t.Method | t.Property>,\n) {\n const { context, node } = this;\n if (!t.isPrivate(node) && node.computed) {\n context.maybeQueue(this.get(\"key\"));\n }\n if (node.decorators) {\n for (const decorator of this.get(\"decorators\")) {\n context.maybeQueue(decorator);\n }\n }\n}\n\nexport function _getQueueContexts(this: NodePath) {\n let path = this;\n let contexts = this.contexts;\n while (!contexts.length) {\n path = path.parentPath;\n if (!path) break;\n contexts = path.contexts;\n }\n return contexts;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA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,MAAMC,SAAS,IAAI,IAAI,CAACF,GAAG,CAAC,YAAY,CAAC,EAAE;MAC9C/D,OAAO,CAAC2D,UAAU,CAACM,SAAS,CAAC;IAC/B;EACF;AACF;AAEO,SAASC,iBAAiBA,CAAA,EAAiB;EAChD,IAAInE,IAAI,GAAG,IAAI;EACf,IAAImD,QAAQ,GAAG,IAAI,CAACA,QAAQ;EAC5B,OAAO,CAACA,QAAQ,CAACT,MAAM,EAAE;IACvB1C,IAAI,GAAGA,IAAI,CAACmB,UAAU;IACtB,IAAI,CAACnB,IAAI,EAAE;IACXmD,QAAQ,GAAGnD,IAAI,CAACmD,QAAQ;EAC1B;EACA,OAAOA,QAAQ;AACjB","ignoreList":[]}
1
+ {"version":3,"names":["_traverseNode","require","_index","_removal","t","call","key","opts","debug","node","_call","_opts$this$node$type","type","fns","fn","ret","state","then","Error","_traverseFlags","isDenylisted","_this$opts$denylist","denylist","blacklist","includes","exports","isBlacklisted","restoreContext","path","context","visit","_this$opts$shouldSkip","_this$opts","shouldSkip","currentContext","shouldStop","traverseNode","scope","skipKeys","skip","skipKey","stop","SHOULD_SKIP","SHOULD_STOP","setScope","_this$opts2","_this$scope","noScope","parentPath","listKey","isMethod","isSwitchStatement","target","_path$opts","getScope","init","setContext","resync","removed","_resyncParent","_resyncList","_resyncKey","parent","container","Array","isArray","i","length","setKey","Object","keys","inList","newContainer","_resyncRemoved","_markRemoved","popContext","contexts","pop","undefined","pushContext","push","setup","_this$node","requeue","pathToQueue","maybeQueue","requeueComputedKeyAndDecorators","isPrivate","computed","get","decorators","decorator","_getQueueContexts"],"sources":["../../src/path/context.ts"],"sourcesContent":["// This file contains methods responsible for maintaining a TraversalContext.\n\nimport { traverseNode } from \"../traverse-node.ts\";\nimport { SHOULD_SKIP, SHOULD_STOP } from \"./index.ts\";\nimport { _markRemoved } from \"./removal.ts\";\nimport type TraversalContext from \"../context.ts\";\nimport type { VisitPhase } from \"../types.ts\";\nimport type NodePath from \"./index.ts\";\nimport * as t from \"@babel/types\";\n\nexport function call(this: NodePath, key: VisitPhase): boolean {\n const opts = this.opts;\n\n this.debug(key);\n\n if (this.node) {\n if (_call.call(this, opts[key])) return true;\n }\n\n if (this.node) {\n return _call.call(this, opts[this.node.type]?.[key]);\n }\n\n return false;\n}\n\nexport function _call(this: NodePath, fns?: Array<Function>): boolean {\n if (!fns) return false;\n\n for (const fn of fns) {\n if (!fn) continue;\n\n const node = this.node;\n if (!node) return true;\n\n const ret = fn.call(this.state, this, this.state);\n if (ret && typeof ret === \"object\" && typeof ret.then === \"function\") {\n throw new Error(\n `You appear to be using a plugin with an async traversal visitor, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n if (ret) {\n throw new Error(`Unexpected return value from visitor method ${fn}`);\n }\n\n // node has been replaced, it will have been requeued\n if (this.node !== node) return true;\n\n // this.shouldSkip || this.shouldStop || this.removed\n if (this._traverseFlags > 0) return true;\n }\n\n return false;\n}\n\nexport function isDenylisted(this: NodePath): boolean {\n // @ts-expect-error TODO(Babel 8): Remove blacklist\n const denylist = this.opts.denylist ?? this.opts.blacklist;\n return denylist?.includes(this.node.type);\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.isBlacklisted = isDenylisted;\n}\n\nfunction restoreContext(path: NodePath, context: TraversalContext) {\n if (path.context !== context) {\n path.context = context;\n path.state = context.state;\n path.opts = context.opts;\n }\n}\n\nexport function visit(this: NodePath): boolean {\n if (!this.node) {\n return false;\n }\n\n if (this.isDenylisted()) {\n return false;\n }\n\n if (this.opts.shouldSkip?.(this)) {\n return false;\n }\n\n const currentContext = this.context;\n // Note: We need to check \"this.shouldSkip\" first because\n // another visitor can set it to true. Usually .shouldSkip is false\n // before calling the enter visitor, but it can be true in case of\n // a requeued node (e.g. by .replaceWith()) that is then marked\n // with .skip().\n if (this.shouldSkip || call.call(this, \"enter\")) {\n this.debug(\"Skip...\");\n return this.shouldStop;\n }\n restoreContext(this, currentContext);\n\n this.debug(\"Recursing into...\");\n this.shouldStop = traverseNode(\n this.node,\n this.opts,\n this.scope,\n this.state,\n this,\n this.skipKeys,\n );\n\n restoreContext(this, currentContext);\n\n call.call(this, \"exit\");\n\n return this.shouldStop;\n}\n\nexport function skip(this: NodePath) {\n this.shouldSkip = true;\n}\n\nexport function skipKey(this: NodePath, key: string) {\n if (this.skipKeys == null) {\n this.skipKeys = {};\n }\n this.skipKeys[key] = true;\n}\n\nexport function stop(this: NodePath) {\n // this.shouldSkip = true; this.shouldStop = true;\n this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;\n}\n\nexport function setScope(this: NodePath) {\n if (this.opts?.noScope) return;\n\n let path = this.parentPath;\n\n if (\n // Skip method scope if is computed method key or decorator expression\n ((this.key === \"key\" || this.listKey === \"decorators\") &&\n path.isMethod()) ||\n // Skip switch scope if for discriminant (`x` in `switch (x) {}`).\n (this.key === \"discriminant\" && path.isSwitchStatement())\n ) {\n path = path.parentPath;\n }\n\n let target;\n while (path && !target) {\n if (path.opts?.noScope) return;\n\n target = path.scope;\n path = path.parentPath;\n }\n\n this.scope = this.getScope(target);\n this.scope?.init();\n}\n\nexport function setContext<S = unknown>(\n this: NodePath,\n context?: TraversalContext<S>,\n) {\n if (this.skipKeys != null) {\n this.skipKeys = {};\n }\n // this.shouldSkip = false; this.shouldStop = false; this.removed = false;\n this._traverseFlags = 0;\n\n if (context) {\n this.context = context;\n this.state = context.state;\n // Discard the S type parameter from context.opts\n this.opts = context.opts as typeof this.opts;\n }\n\n setScope.call(this);\n\n return this;\n}\n\n/**\n * Here we resync the node paths `key` and `container`. If they've changed according\n * to what we have stored internally then we attempt to resync by crawling and looking\n * for the new values.\n */\n\nexport function resync(this: NodePath) {\n if (this.removed) return;\n\n _resyncParent.call(this);\n _resyncList.call(this);\n _resyncKey.call(this);\n //this._resyncRemoved();\n}\n\nexport function _resyncParent(this: NodePath) {\n if (this.parentPath) {\n this.parent = this.parentPath.node;\n }\n}\n\nexport function _resyncKey(this: NodePath) {\n if (!this.container) return;\n\n if (\n this.node ===\n // @ts-expect-error this.key should present in this.container\n this.container[this.key]\n ) {\n return;\n }\n\n // grrr, path key is out of sync. this is likely due to a modification to the AST\n // not done through our path APIs\n\n if (Array.isArray(this.container)) {\n for (let i = 0; i < this.container.length; i++) {\n if (this.container[i] === this.node) {\n setKey.call(this, i);\n return;\n }\n }\n } else {\n for (const key of Object.keys(this.container)) {\n // @ts-expect-error this.key should present in this.container\n if (this.container[key] === this.node) {\n setKey.call(this, key);\n return;\n }\n }\n }\n\n // ¯\\_(ツ)_/¯ who knows where it's gone lol\n this.key = null;\n}\n\nexport function _resyncList(this: NodePath) {\n if (!this.parent || !this.inList) return;\n\n const newContainer =\n // @ts-expect-error this.listKey should present in this.parent\n this.parent[this.listKey];\n if (this.container === newContainer) return;\n\n // container is out of sync. this is likely the result of it being reassigned\n this.container = newContainer || null;\n}\n\nexport function _resyncRemoved(this: NodePath) {\n if (\n this.key == null ||\n !this.container ||\n // @ts-expect-error this.key should present in this.container\n this.container[this.key] !== this.node\n ) {\n _markRemoved.call(this);\n }\n}\n\nexport function popContext(this: NodePath) {\n this.contexts.pop();\n if (this.contexts.length > 0) {\n this.setContext(this.contexts[this.contexts.length - 1]);\n } else {\n this.setContext(undefined);\n }\n}\n\nexport function pushContext(this: NodePath, context: TraversalContext) {\n this.contexts.push(context);\n this.setContext(context);\n}\n\nexport function setup(\n this: NodePath,\n parentPath: NodePath | undefined,\n container: t.Node | t.Node[],\n listKey: string,\n key: string | number,\n) {\n this.listKey = listKey;\n this.container = container;\n\n this.parentPath = parentPath || this.parentPath;\n setKey.call(this, key);\n}\n\nexport function setKey(this: NodePath, key: string | number) {\n this.key = key;\n this.node =\n // @ts-expect-error this.key must present in this.container\n this.container[this.key];\n this.type = this.node?.type;\n}\n\nexport function requeue(this: NodePath, pathToQueue = this) {\n if (pathToQueue.removed) return;\n\n // If a path is skipped, and then replaced with a\n // new one, the new one shouldn't probably be skipped.\n if (process.env.BABEL_8_BREAKING) {\n pathToQueue.shouldSkip = false;\n }\n\n // TODO(loganfsmyth): This should be switched back to queue in parent contexts\n // automatically once #2892 and #4135 have been resolved. See #4140.\n // let contexts = this._getQueueContexts();\n const contexts = this.contexts;\n\n for (const context of contexts) {\n context.maybeQueue(pathToQueue);\n }\n}\n\nexport function requeueComputedKeyAndDecorators(\n this: NodePath<t.Method | t.Property>,\n) {\n const { context, node } = this;\n if (!t.isPrivate(node) && node.computed) {\n context.maybeQueue(this.get(\"key\"));\n }\n if (node.decorators) {\n for (const decorator of this.get(\"decorators\")) {\n context.maybeQueue(decorator);\n }\n }\n}\n\nexport function _getQueueContexts(this: NodePath) {\n let path = this;\n let contexts = this.contexts;\n while (!contexts.length) {\n path = path.parentPath;\n if (!path) break;\n contexts = path.contexts;\n }\n return contexts;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,CAAA,GAAAH,OAAA;AAEO,SAASI,IAAIA,CAAiBC,GAAe,EAAW;EAC7D,MAAMC,IAAI,GAAG,IAAI,CAACA,IAAI;EAEtB,IAAI,CAACC,KAAK,CAACF,GAAG,CAAC;EAEf,IAAI,IAAI,CAACG,IAAI,EAAE;IACb,IAAIC,KAAK,CAACL,IAAI,CAAC,IAAI,EAAEE,IAAI,CAACD,GAAG,CAAC,CAAC,EAAE,OAAO,IAAI;EAC9C;EAEA,IAAI,IAAI,CAACG,IAAI,EAAE;IAAA,IAAAE,oBAAA;IACb,OAAOD,KAAK,CAACL,IAAI,CAAC,IAAI,GAAAM,oBAAA,GAAEJ,IAAI,CAAC,IAAI,CAACE,IAAI,CAACG,IAAI,CAAC,qBAApBD,oBAAA,CAAuBL,GAAG,CAAC,CAAC;EACtD;EAEA,OAAO,KAAK;AACd;AAE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,SAAS,IAAI,IAAI,CAACF,GAAG,CAAC,YAAY,CAAC,EAAE;MAC9C5D,OAAO,CAACwD,UAAU,CAACM,SAAS,CAAC;IAC/B;EACF;AACF;AAEO,SAASC,iBAAiBA,CAAA,EAAiB;EAChD,IAAIhE,IAAI,GAAG,IAAI;EACf,IAAIgD,QAAQ,GAAG,IAAI,CAACA,QAAQ;EAC5B,OAAO,CAACA,QAAQ,CAACT,MAAM,EAAE;IACvBvC,IAAI,GAAGA,IAAI,CAACoB,UAAU;IACtB,IAAI,CAACpB,IAAI,EAAE;IACXgD,QAAQ,GAAGhD,IAAI,CAACgD,QAAQ;EAC1B;EACA,OAAOA,QAAQ;AACjB","ignoreList":[]}
@@ -160,8 +160,7 @@ function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow =
160
160
  let arrowParent;
161
161
  let thisEnvFn = fnPath.findParent(p => {
162
162
  if (p.isArrowFunctionExpression()) {
163
- var _arrowParent;
164
- (_arrowParent = arrowParent) != null ? _arrowParent : arrowParent = p;
163
+ arrowParent != null ? arrowParent : arrowParent = p;
165
164
  return false;
166
165
  }
167
166
  return p.isFunction() || p.isProgram() || p.isClassProperty({
@@ -571,13 +570,17 @@ function ensureFunctionName(supportUnicodeId) {
571
570
  }
572
571
  if (!state.needsRename) {
573
572
  this.node.id = id;
574
- scope.getProgramParent().references[id.name] = true;
573
+ {
574
+ scope.getProgramParent().references[id.name] = true;
575
+ }
575
576
  return this;
576
577
  }
577
578
  if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
578
579
  scope.rename(id.name);
579
580
  this.node.id = id;
580
- scope.getProgramParent().references[id.name] = true;
581
+ {
582
+ scope.getProgramParent().references[id.name] = true;
583
+ }
581
584
  return this;
582
585
  }
583
586
  if (!isFunction(this.node)) return null;
@@ -1 +1 @@
1
- {"version":3,"names":["_t","require","_template","_visitors","_context","arrowFunctionExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","conditionalExpression","expressionStatement","identifier","isIdentifier","jsxIdentifier","logicalExpression","LOGICAL_OPERATORS","memberExpression","metaProperty","numericLiteral","objectExpression","restElement","returnStatement","sequenceExpression","spreadElement","stringLiteral","super","_super","thisExpression","toExpression","unaryExpression","toBindingIdentifierName","isFunction","isAssignmentPattern","isRestElement","getFunctionName","cloneNode","variableDeclaration","variableDeclarator","exportNamedDeclaration","exportSpecifier","inherits","toComputedKey","key","isMemberExpression","node","property","isProperty","isMethod","ReferenceError","computed","name","ensureBlock","body","get","bodyNode","Array","isArray","Error","isBlockStatement","statements","stringPath","listKey","isStatement","push","parentPath","setup","call","exports","arrowFunctionToShadowed","isArrowFunctionExpression","arrowFunctionToExpression","unwrapFunctionEnvironment","isFunctionExpression","isFunctionDeclaration","buildCodeFrameError","hoistFunctionEnvironment","setType","path","type","allowInsertArrow","allowInsertArrowWithRest","noNewArrows","_arguments$","arguments","specCompliant","self","_self$ensureFunctionN","ensureFunctionName","thisBinding","fnPath","fn","checkBinding","scope","generateUidIdentifier","id","init","unshiftContainer","hub","addHelper","replaceWith","getSuperCallsVisitor","environmentVisitor","CallExpression","child","allSuperCalls","isSuper","arrowParent","thisEnvFn","findParent","p","_arrowParent","isProgram","isClassProperty","static","isClassPrivateProperty","inConstructor","isClassMethod","kind","thisPaths","argumentsPaths","newTargetPaths","superProps","superCalls","getScopeInformation","length","traverse","superBinding","getSuperBinding","forEach","superCall","callee","loc","argumentsBinding","getBinding","args","buildUndefinedNode","argumentsChild","argsRef","newTargetBinding","targetChild","targetRef","flatSuperProps","reduce","acc","superProp","concat","standardizeSuperProperty","superParentPath","isAssignment","isAssignmentExpression","left","isCall","isCallExpression","isTaggedTemplate","isTaggedTemplateExpression","tag","getSuperPropBinding","value","right","getThisBinding","hasSuperClass","thisChild","thisRef","isJSX","isLogicalOp","op","includes","operator","assignmentPath","slice","isLogicalAssignment","tmp","generateDeclaredUidIdentifier","object","rightExpression","isUpdateExpression","updateExpr","computedKey","parts","prefix","superClass","assignSuperThisVisitor","supers","has","add","replaceWithMultiple","WeakSet","argsBinding","propName","argsList","fnBody","method","unshift","valueIdent","cacheKey","data","getData","setData","getScopeInformationVisitor","ThisExpression","JSXIdentifier","isJSXMemberExpression","isJSXOpeningElement","MemberExpression","Identifier","isReferencedIdentifier","curr","hasOwnBinding","rename","parent","MetaProperty","splitExportDeclaration","isExportDeclaration","isExportAllDeclaration","isExportNamedDeclaration","declaration","isExportDefaultDeclaration","standaloneDeclaration","isClassDeclaration","exportExpr","isClassExpression","isScope","needBindingRegistration","hasBinding","updatedDeclaration","updatedExportDeclaration","insertAfter","registerDeclaration","bindingIdentifiers","getOuterBindingIdentifiers","specifiers","Object","keys","map","aliasDeclar","refersOuterBindingVisitor","ReferencedIdentifier|BindingIdentifier","state","needsRename","stop","Scope","skip","supportUnicodeId","res","test","startsWith","replace","originalNode","binding","getOwnBinding","hasGlobal","getProgramParent","references","params","i","len","getFunctionArity","template","expression","ast","count","findIndex","param"],"sources":["../../src/path/conversion.ts"],"sourcesContent":["// This file contains methods that convert the path node into another node or some other type of data.\n\nimport {\n arrowFunctionExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n conditionalExpression,\n expressionStatement,\n identifier,\n isIdentifier,\n jsxIdentifier,\n logicalExpression,\n LOGICAL_OPERATORS,\n memberExpression,\n metaProperty,\n numericLiteral,\n objectExpression,\n restElement,\n returnStatement,\n sequenceExpression,\n spreadElement,\n stringLiteral,\n super as _super,\n thisExpression,\n toExpression,\n unaryExpression,\n toBindingIdentifierName,\n isFunction,\n isAssignmentPattern,\n isRestElement,\n getFunctionName,\n cloneNode,\n variableDeclaration,\n variableDeclarator,\n exportNamedDeclaration,\n exportSpecifier,\n inherits,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport template from \"@babel/template\";\nimport { environmentVisitor } from \"../visitors.ts\";\nimport type NodePath from \"./index.ts\";\nimport type { Visitor } from \"../types.ts\";\nimport { setup } from \"./context.ts\";\n\nexport function toComputedKey(this: NodePath) {\n let key;\n if (this.isMemberExpression()) {\n key = this.node.property;\n } else if (this.isProperty() || this.isMethod()) {\n key = this.node.key;\n } else {\n throw new ReferenceError(\"todo\");\n }\n\n // @ts-expect-error todo(flow->ts) computed does not exist in ClassPrivateProperty\n if (!this.node.computed) {\n if (isIdentifier(key)) key = stringLiteral(key.name);\n }\n\n return key;\n}\n\nexport function ensureBlock(\n this: NodePath<\n t.Loop | t.WithStatement | t.Function | t.LabeledStatement | t.CatchClause\n >,\n): void {\n const body = this.get(\"body\");\n const bodyNode = body.node;\n\n if (Array.isArray(body)) {\n throw new Error(\"Can't convert array path to a block statement\");\n }\n if (!bodyNode) {\n throw new Error(\"Can't convert node without a body\");\n }\n\n if (body.isBlockStatement()) {\n // @ts-expect-error TS throws because ensureBlock returns the body node path\n // however, we don't use the return value and treat it as a transform and\n // assertion utilities. For better type inference we annotate it as an\n // assertion method\n // TODO: Unify the implementation with the type definition\n return bodyNode;\n }\n\n const statements: Array<t.Statement> = [];\n\n let stringPath = \"body\";\n let key;\n let listKey;\n if (body.isStatement()) {\n listKey = \"body\";\n key = 0;\n statements.push(body.node);\n } else {\n stringPath += \".body.0\";\n if (this.isFunction()) {\n key = \"argument\";\n statements.push(returnStatement(body.node as t.Expression));\n } else {\n key = \"expression\";\n statements.push(expressionStatement(body.node as t.Expression));\n }\n }\n\n this.node.body = blockStatement(statements);\n const parentPath = this.get(stringPath) as NodePath;\n setup.call(\n body,\n parentPath,\n listKey\n ? // @ts-expect-error listKey must present in parent path\n parentPath.node[listKey]\n : parentPath.node,\n listKey,\n key,\n );\n\n // @ts-expect-error TS throws because ensureBlock returns the body node path\n // however, we don't use the return value and treat it as a transform and\n // assertion utilities. For better type inference we annotate it as an\n // assertion method\n // TODO: Unify the implementation with the type definition\n return this.node;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * Keeping this for backward-compatibility. You should use arrowFunctionToExpression() for >=7.x.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.arrowFunctionToShadowed = function (this: NodePath) {\n if (!this.isArrowFunctionExpression()) return;\n\n this.arrowFunctionToExpression();\n };\n}\n\n/**\n * Given an arbitrary function, process its content as if it were an arrow function, moving references\n * to \"this\", \"arguments\", \"super\", and such into the function's parent scope. This method is useful if\n * you have wrapped some set of items in an IIFE or other function, but want \"this\", \"arguments\", and super\"\n * to continue behaving as expected.\n */\nexport function unwrapFunctionEnvironment(this: NodePath) {\n if (\n !this.isArrowFunctionExpression() &&\n !this.isFunctionExpression() &&\n !this.isFunctionDeclaration()\n ) {\n throw this.buildCodeFrameError(\n \"Can only unwrap the environment of a function.\",\n );\n }\n\n hoistFunctionEnvironment(this);\n}\n\nfunction setType<N extends t.Node, T extends N[\"type\"]>(\n path: NodePath<N>,\n type: T,\n): asserts path is NodePath<Extract<N, { type: T }>> {\n path.node.type = type;\n}\n\n/**\n * Convert a given arrow function into a normal ES5 function expression.\n */\nexport function arrowFunctionToExpression(\n this: NodePath<t.ArrowFunctionExpression>,\n {\n allowInsertArrow = true,\n allowInsertArrowWithRest = allowInsertArrow,\n noNewArrows = process.env.BABEL_8_BREAKING\n ? // TODO(Babel 8): Consider defaulting to `false` for spec compliance\n true\n : !arguments[0]?.specCompliant,\n }: {\n allowInsertArrow?: boolean | void;\n allowInsertArrowWithRest?: boolean | void;\n noNewArrows?: boolean;\n } = {},\n): NodePath<\n Exclude<t.Function, t.Method | t.ArrowFunctionExpression> | t.CallExpression\n> {\n if (!this.isArrowFunctionExpression()) {\n throw (this as NodePath).buildCodeFrameError(\n \"Cannot convert non-arrow function to a function expression.\",\n );\n }\n\n let self = this;\n if (!noNewArrows) {\n // @ts-expect-error This is technicallynot valid on arrow functions\n // because it adds an .id property, but we are going to convert it\n // to a function expression anyway\n self = self.ensureFunctionName(false) ?? self;\n }\n\n const { thisBinding, fnPath: fn } = hoistFunctionEnvironment(\n self,\n noNewArrows,\n allowInsertArrow,\n allowInsertArrowWithRest,\n );\n\n fn.ensureBlock();\n setType(fn, \"FunctionExpression\");\n\n if (!noNewArrows) {\n const checkBinding = thisBinding\n ? null\n : fn.scope.generateUidIdentifier(\"arrowCheckId\");\n if (checkBinding) {\n fn.parentPath.scope.push({\n id: checkBinding,\n init: objectExpression([]),\n });\n }\n\n fn.get(\"body\").unshiftContainer(\n \"body\",\n expressionStatement(\n callExpression(this.hub.addHelper(\"newArrowCheck\"), [\n thisExpression(),\n checkBinding\n ? identifier(checkBinding.name)\n : identifier(thisBinding),\n ]),\n ),\n );\n\n fn.replaceWith(\n callExpression(memberExpression(fn.node, identifier(\"bind\")), [\n checkBinding ? identifier(checkBinding.name) : thisExpression(),\n ]),\n );\n\n return fn.get(\"callee.object\");\n }\n\n return fn;\n}\n\nconst getSuperCallsVisitor = environmentVisitor<{\n allSuperCalls: NodePath<t.CallExpression>[];\n}>({\n CallExpression(child, { allSuperCalls }) {\n if (!child.get(\"callee\").isSuper()) return;\n allSuperCalls.push(child);\n },\n});\n\n/**\n * Given a function, traverse its contents, and if there are references to \"this\", \"arguments\", \"super\",\n * or \"new.target\", ensure that these references reference the parent environment around this function.\n *\n * @returns `thisBinding`: the name of the injected reference to `this`; for example \"_this\"\n * @returns `fnPath`: the new path to the function node. This is different from the fnPath\n * parameter when the function node is wrapped in another node.\n */\nfunction hoistFunctionEnvironment(\n fnPath: NodePath<t.Function>,\n // TODO(Babel 8): Consider defaulting to `false` for spec compliance\n noNewArrows: boolean | void = true,\n allowInsertArrow: boolean | void = true,\n allowInsertArrowWithRest: boolean | void = true,\n): { thisBinding: string; fnPath: NodePath<t.Function> } {\n let arrowParent;\n let thisEnvFn: NodePath<t.Function> = fnPath.findParent(p => {\n if (p.isArrowFunctionExpression()) {\n arrowParent ??= p;\n return false;\n }\n return (\n p.isFunction() ||\n p.isProgram() ||\n p.isClassProperty({ static: false }) ||\n p.isClassPrivateProperty({ static: false })\n );\n }) as NodePath<t.Function>;\n const inConstructor = thisEnvFn.isClassMethod({ kind: \"constructor\" });\n\n if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {\n if (arrowParent) {\n thisEnvFn = arrowParent;\n } else if (allowInsertArrow) {\n // It's safe to wrap this function in another and not hoist to the\n // top level because the 'this' binding is constant in class\n // properties (since 'super()' has already been called), so we don't\n // need to capture/reassign it at the top level.\n fnPath.replaceWith(\n callExpression(\n arrowFunctionExpression([], toExpression(fnPath.node)),\n [],\n ),\n );\n thisEnvFn = fnPath.get(\"callee\") as NodePath<t.ArrowFunctionExpression>;\n fnPath = thisEnvFn.get(\"body\") as NodePath<t.FunctionExpression>;\n } else {\n throw fnPath.buildCodeFrameError(\n \"Unable to transform arrow inside class property\",\n );\n }\n }\n\n const { thisPaths, argumentsPaths, newTargetPaths, superProps, superCalls } =\n getScopeInformation(fnPath);\n\n // Convert all super() calls in the constructor, if super is used in an arrow.\n if (inConstructor && superCalls.length > 0) {\n if (!allowInsertArrow) {\n throw superCalls[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-arrow-functions', \" +\n \"it's not possible to compile `super()` in an arrow function without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n if (!allowInsertArrowWithRest) {\n // preset-env with target `since 2017` enables `transform-parameters` without `transform-classes`.\n throw superCalls[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-parameters', \" +\n \"it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n const allSuperCalls: NodePath<t.CallExpression>[] = [];\n thisEnvFn.traverse(getSuperCallsVisitor, { allSuperCalls });\n const superBinding = getSuperBinding(thisEnvFn);\n allSuperCalls.forEach(superCall => {\n const callee = identifier(superBinding);\n callee.loc = superCall.node.callee.loc;\n\n superCall.get(\"callee\").replaceWith(callee);\n });\n }\n\n // Convert all \"arguments\" references in the arrow to point at the alias.\n if (argumentsPaths.length > 0) {\n const argumentsBinding = getBinding(thisEnvFn, \"arguments\", () => {\n const args = () => identifier(\"arguments\");\n if (thisEnvFn.scope.path.isProgram()) {\n return conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", args()),\n stringLiteral(\"undefined\"),\n ),\n thisEnvFn.scope.buildUndefinedNode(),\n args(),\n );\n } else {\n return args();\n }\n });\n\n argumentsPaths.forEach(argumentsChild => {\n const argsRef = identifier(argumentsBinding);\n argsRef.loc = argumentsChild.node.loc;\n\n argumentsChild.replaceWith(argsRef);\n });\n }\n\n // Convert all \"new.target\" references in the arrow to point at the alias.\n if (newTargetPaths.length > 0) {\n const newTargetBinding = getBinding(thisEnvFn, \"newtarget\", () =>\n metaProperty(identifier(\"new\"), identifier(\"target\")),\n );\n\n newTargetPaths.forEach(targetChild => {\n const targetRef = identifier(newTargetBinding);\n targetRef.loc = targetChild.node.loc;\n\n targetChild.replaceWith(targetRef);\n });\n }\n\n // Convert all \"super.prop\" references to point at aliases.\n if (superProps.length > 0) {\n if (!allowInsertArrow) {\n throw superProps[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-arrow-functions', \" +\n \"it's not possible to compile `super.prop` in an arrow function without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n\n const flatSuperProps: NodePath<t.MemberExpression>[] = superProps.reduce(\n (acc, superProp) => acc.concat(standardizeSuperProperty(superProp)),\n [],\n );\n\n flatSuperProps.forEach(superProp => {\n const key = superProp.node.computed\n ? \"\"\n : // @ts-expect-error super property must not contain private name\n superProp.get(\"property\").node.name;\n\n const superParentPath = superProp.parentPath;\n\n const isAssignment = superParentPath.isAssignmentExpression({\n left: superProp.node,\n });\n const isCall = superParentPath.isCallExpression({\n callee: superProp.node,\n });\n const isTaggedTemplate = superParentPath.isTaggedTemplateExpression({\n tag: superProp.node,\n });\n const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);\n\n const args: t.Expression[] = [];\n if (superProp.node.computed) {\n // SuperProperty must not be a private name\n args.push(superProp.get(\"property\").node as t.Expression);\n }\n\n if (isAssignment) {\n const value = superParentPath.node.right;\n args.push(value);\n }\n\n const call = callExpression(identifier(superBinding), args);\n\n if (isCall) {\n superParentPath.unshiftContainer(\"arguments\", thisExpression());\n superProp.replaceWith(memberExpression(call, identifier(\"call\")));\n\n thisPaths.push(\n superParentPath.get(\"arguments.0\") as NodePath<t.ThisExpression>,\n );\n } else if (isAssignment) {\n // Replace not only the super.prop, but the whole assignment\n superParentPath.replaceWith(call);\n } else if (isTaggedTemplate) {\n superProp.replaceWith(\n callExpression(memberExpression(call, identifier(\"bind\"), false), [\n thisExpression(),\n ]),\n );\n\n thisPaths.push(\n superProp.get(\"arguments.0\") as NodePath<t.ThisExpression>,\n );\n } else {\n superProp.replaceWith(call);\n }\n });\n }\n\n // Convert all \"this\" references in the arrow to point at the alias.\n let thisBinding: string | null;\n if (thisPaths.length > 0 || !noNewArrows) {\n thisBinding = getThisBinding(thisEnvFn, inConstructor);\n\n if (\n noNewArrows ||\n // In subclass constructors, still need to rewrite because \"this\" can't be bound in spec mode\n // because it might not have been initialized yet.\n (inConstructor && hasSuperClass(thisEnvFn))\n ) {\n thisPaths.forEach(thisChild => {\n const thisRef = thisChild.isJSX()\n ? jsxIdentifier(thisBinding)\n : identifier(thisBinding);\n\n thisRef.loc = thisChild.node.loc;\n thisChild.replaceWith(thisRef);\n });\n\n if (!noNewArrows) thisBinding = null;\n }\n }\n\n return { thisBinding, fnPath };\n}\n\ntype LogicalOp = Parameters<typeof logicalExpression>[0];\ntype BinaryOp = Parameters<typeof binaryExpression>[0];\n\nfunction isLogicalOp(op: string): op is LogicalOp {\n return LOGICAL_OPERATORS.includes(op);\n}\n\nfunction standardizeSuperProperty(\n superProp: NodePath<t.MemberExpression>,\n):\n | [NodePath<t.MemberExpression>]\n | [NodePath<t.MemberExpression>, NodePath<t.MemberExpression>] {\n if (\n superProp.parentPath.isAssignmentExpression() &&\n superProp.parentPath.node.operator !== \"=\"\n ) {\n const assignmentPath = superProp.parentPath;\n\n const op = assignmentPath.node.operator.slice(0, -1) as\n | LogicalOp\n | BinaryOp;\n\n const value = assignmentPath.node.right;\n\n const isLogicalAssignment = isLogicalOp(op);\n\n if (superProp.node.computed) {\n // from: super[foo] **= 4;\n // to: super[tmp = foo] = super[tmp] ** 4;\n\n // from: super[foo] ??= 4;\n // to: super[tmp = foo] ?? super[tmp] = 4;\n\n const tmp = superProp.scope.generateDeclaredUidIdentifier(\"tmp\");\n\n const object = superProp.node.object;\n const property = superProp.node.property as t.Expression;\n\n assignmentPath\n .get(\"left\")\n .replaceWith(\n memberExpression(\n object,\n assignmentExpression(\"=\", tmp, property),\n true /* computed */,\n ),\n );\n\n assignmentPath\n .get(\"right\")\n .replaceWith(\n rightExpression(\n isLogicalAssignment ? \"=\" : op,\n memberExpression(object, identifier(tmp.name), true /* computed */),\n value,\n ),\n );\n } else {\n // from: super.foo **= 4;\n // to: super.foo = super.foo ** 4;\n\n // from: super.foo ??= 4;\n // to: super.foo ?? super.foo = 4;\n\n const object = superProp.node.object;\n const property = superProp.node.property as t.Identifier;\n\n assignmentPath\n .get(\"left\")\n .replaceWith(memberExpression(object, property));\n\n assignmentPath\n .get(\"right\")\n .replaceWith(\n rightExpression(\n isLogicalAssignment ? \"=\" : op,\n memberExpression(object, identifier(property.name)),\n value,\n ),\n );\n }\n\n if (isLogicalAssignment) {\n assignmentPath.replaceWith(\n logicalExpression(\n op,\n assignmentPath.node.left as t.MemberExpression,\n assignmentPath.node.right,\n ),\n );\n } else {\n assignmentPath.node.operator = \"=\";\n }\n\n return [\n assignmentPath.get(\"left\") as NodePath<t.MemberExpression>,\n assignmentPath.get(\"right\").get(\"left\") as NodePath<t.MemberExpression>,\n ];\n } else if (superProp.parentPath.isUpdateExpression()) {\n const updateExpr = superProp.parentPath;\n\n const tmp = superProp.scope.generateDeclaredUidIdentifier(\"tmp\");\n const computedKey = superProp.node.computed\n ? superProp.scope.generateDeclaredUidIdentifier(\"prop\")\n : null;\n\n const parts: t.Expression[] = [\n assignmentExpression(\n \"=\",\n tmp,\n memberExpression(\n superProp.node.object,\n computedKey\n ? assignmentExpression(\n \"=\",\n computedKey,\n superProp.node.property as t.Expression,\n )\n : superProp.node.property,\n superProp.node.computed,\n ),\n ),\n assignmentExpression(\n \"=\",\n memberExpression(\n superProp.node.object,\n computedKey ? identifier(computedKey.name) : superProp.node.property,\n superProp.node.computed,\n ),\n binaryExpression(\n // map `++` to `+`, and `--` to `-`\n superProp.parentPath.node.operator[0] as \"+\" | \"-\",\n identifier(tmp.name),\n numericLiteral(1),\n ),\n ),\n ];\n\n if (!superProp.parentPath.node.prefix) {\n parts.push(identifier(tmp.name));\n }\n\n updateExpr.replaceWith(sequenceExpression(parts));\n\n const left = updateExpr.get(\n \"expressions.0.right\",\n ) as NodePath<t.MemberExpression>;\n const right = updateExpr.get(\n \"expressions.1.left\",\n ) as NodePath<t.MemberExpression>;\n return [left, right];\n }\n\n return [superProp];\n\n function rightExpression(\n op: BinaryOp | \"=\",\n left: t.MemberExpression,\n right: t.Expression,\n ) {\n if (op === \"=\") {\n return assignmentExpression(\"=\", left, right);\n } else {\n return binaryExpression(op, left, right);\n }\n }\n}\n\nfunction hasSuperClass(thisEnvFn: NodePath<t.Function>) {\n return (\n thisEnvFn.isClassMethod() &&\n !!(thisEnvFn.parentPath.parentPath.node as t.Class).superClass\n );\n}\n\nconst assignSuperThisVisitor = environmentVisitor<{\n supers: WeakSet<t.CallExpression>;\n thisBinding: string;\n}>({\n CallExpression(child, { supers, thisBinding }) {\n if (!child.get(\"callee\").isSuper()) return;\n if (supers.has(child.node)) return;\n supers.add(child.node);\n\n child.replaceWithMultiple([\n child.node,\n assignmentExpression(\"=\", identifier(thisBinding), identifier(\"this\")),\n ]);\n },\n});\n\n// Create a binding that evaluates to the \"this\" of the given function.\nfunction getThisBinding(\n thisEnvFn: NodePath<t.Function>,\n inConstructor: boolean,\n) {\n return getBinding(thisEnvFn, \"this\", thisBinding => {\n if (!inConstructor || !hasSuperClass(thisEnvFn)) return thisExpression();\n\n thisEnvFn.traverse(assignSuperThisVisitor, {\n supers: new WeakSet(),\n thisBinding,\n });\n });\n}\n\n// Create a binding for a function that will call \"super()\" with arguments passed through.\nfunction getSuperBinding(thisEnvFn: NodePath<t.Function>) {\n return getBinding(thisEnvFn, \"supercall\", () => {\n const argsBinding = thisEnvFn.scope.generateUidIdentifier(\"args\");\n return arrowFunctionExpression(\n [restElement(argsBinding)],\n callExpression(_super(), [spreadElement(identifier(argsBinding.name))]),\n );\n });\n}\n\n// Create a binding for a function that will call \"super.foo\" or \"super[foo]\".\nfunction getSuperPropBinding(\n thisEnvFn: NodePath<t.Function>,\n isAssignment: boolean,\n propName: string,\n) {\n const op = isAssignment ? \"set\" : \"get\";\n\n return getBinding(thisEnvFn, `superprop_${op}:${propName || \"\"}`, () => {\n const argsList = [];\n\n let fnBody;\n if (propName) {\n // () => super.foo\n fnBody = memberExpression(_super(), identifier(propName));\n } else {\n const method = thisEnvFn.scope.generateUidIdentifier(\"prop\");\n // (method) => super[method]\n argsList.unshift(method);\n fnBody = memberExpression(\n _super(),\n identifier(method.name),\n true /* computed */,\n );\n }\n\n if (isAssignment) {\n const valueIdent = thisEnvFn.scope.generateUidIdentifier(\"value\");\n argsList.push(valueIdent);\n\n fnBody = assignmentExpression(\"=\", fnBody, identifier(valueIdent.name));\n }\n\n return arrowFunctionExpression(argsList, fnBody);\n });\n}\n\nfunction getBinding(\n thisEnvFn: NodePath,\n key: string,\n init: (name: string) => t.Expression,\n) {\n const cacheKey = \"binding:\" + key;\n let data: string | undefined = thisEnvFn.getData(cacheKey);\n if (!data) {\n const id = thisEnvFn.scope.generateUidIdentifier(key);\n data = id.name;\n thisEnvFn.setData(cacheKey, data);\n\n thisEnvFn.scope.push({\n id: id,\n init: init(data),\n });\n }\n\n return data;\n}\n\ntype ScopeInfo = {\n thisPaths: NodePath<t.ThisExpression | t.JSXIdentifier>[];\n superCalls: NodePath<t.CallExpression>[];\n superProps: NodePath<t.MemberExpression>[];\n argumentsPaths: NodePath<t.Identifier | t.JSXIdentifier>[];\n newTargetPaths: NodePath<t.MetaProperty>[];\n};\n\nconst getScopeInformationVisitor = environmentVisitor<ScopeInfo>({\n ThisExpression(child, { thisPaths }) {\n thisPaths.push(child);\n },\n JSXIdentifier(child, { thisPaths }) {\n if (child.node.name !== \"this\") return;\n if (\n !child.parentPath.isJSXMemberExpression({ object: child.node }) &&\n !child.parentPath.isJSXOpeningElement({ name: child.node })\n ) {\n return;\n }\n\n thisPaths.push(child);\n },\n CallExpression(child, { superCalls }) {\n if (child.get(\"callee\").isSuper()) superCalls.push(child);\n },\n MemberExpression(child, { superProps }) {\n if (child.get(\"object\").isSuper()) superProps.push(child);\n },\n Identifier(child, { argumentsPaths }) {\n if (!child.isReferencedIdentifier({ name: \"arguments\" })) return;\n\n let curr = child.scope;\n do {\n if (curr.hasOwnBinding(\"arguments\")) {\n curr.rename(\"arguments\");\n return;\n }\n if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {\n break;\n }\n } while ((curr = curr.parent));\n\n argumentsPaths.push(child);\n },\n MetaProperty(child, { newTargetPaths }) {\n if (!child.get(\"meta\").isIdentifier({ name: \"new\" })) return;\n if (!child.get(\"property\").isIdentifier({ name: \"target\" })) return;\n\n newTargetPaths.push(child);\n },\n});\n\nfunction getScopeInformation(fnPath: NodePath) {\n const thisPaths: ScopeInfo[\"thisPaths\"] = [];\n const argumentsPaths: ScopeInfo[\"argumentsPaths\"] = [];\n const newTargetPaths: ScopeInfo[\"newTargetPaths\"] = [];\n const superProps: ScopeInfo[\"superProps\"] = [];\n const superCalls: ScopeInfo[\"superCalls\"] = [];\n\n fnPath.traverse(getScopeInformationVisitor, {\n thisPaths,\n argumentsPaths,\n newTargetPaths,\n superProps,\n superCalls,\n });\n\n return {\n thisPaths,\n argumentsPaths,\n newTargetPaths,\n superProps,\n superCalls,\n };\n}\n\nexport function splitExportDeclaration(\n this: NodePath<t.ExportDefaultDeclaration | t.ExportNamedDeclaration>,\n): NodePath<t.Declaration> {\n if (!this.isExportDeclaration() || this.isExportAllDeclaration()) {\n throw new Error(\"Only default and named export declarations can be split.\");\n }\n if (this.isExportNamedDeclaration() && this.get(\"specifiers\").length > 0) {\n throw new Error(\"It doesn't make sense to split exported specifiers.\");\n }\n\n const declaration = this.get(\"declaration\");\n\n if (this.isExportDefaultDeclaration()) {\n const standaloneDeclaration =\n declaration.isFunctionDeclaration() || declaration.isClassDeclaration();\n const exportExpr =\n declaration.isFunctionExpression() || declaration.isClassExpression();\n\n const scope = declaration.isScope()\n ? declaration.scope.parent\n : declaration.scope;\n\n // @ts-expect-error id is not defined in expressions other than function/class\n let id = declaration.node.id;\n let needBindingRegistration = false;\n\n if (!id) {\n needBindingRegistration = true;\n\n id = scope.generateUidIdentifier(\"default\");\n\n if (standaloneDeclaration || exportExpr) {\n declaration.node.id = cloneNode(id);\n }\n } else if (exportExpr && scope.hasBinding(id.name)) {\n needBindingRegistration = true;\n\n id = scope.generateUidIdentifier(id.name);\n }\n\n const updatedDeclaration = standaloneDeclaration\n ? declaration.node\n : variableDeclaration(\"var\", [\n variableDeclarator(\n cloneNode(id),\n // @ts-expect-error When `standaloneDeclaration` is false, declaration must not be a Function/ClassDeclaration\n declaration.node,\n ),\n ]);\n\n const updatedExportDeclaration = exportNamedDeclaration(null, [\n exportSpecifier(cloneNode(id), identifier(\"default\")),\n ]);\n\n this.insertAfter(updatedExportDeclaration);\n this.replaceWith(updatedDeclaration);\n\n if (needBindingRegistration) {\n scope.registerDeclaration(this);\n }\n\n return this;\n } else if (this.get(\"specifiers\").length > 0) {\n throw new Error(\"It doesn't make sense to split exported specifiers.\");\n }\n\n const bindingIdentifiers = declaration.getOuterBindingIdentifiers();\n\n const specifiers = Object.keys(bindingIdentifiers).map(name => {\n return exportSpecifier(identifier(name), identifier(name));\n });\n\n const aliasDeclar = exportNamedDeclaration(null, specifiers);\n\n this.insertAfter(aliasDeclar);\n this.replaceWith(declaration.node);\n return this;\n}\n\nconst refersOuterBindingVisitor: Visitor<{\n needsRename: boolean;\n name: string;\n}> = {\n \"ReferencedIdentifier|BindingIdentifier\"(\n path: NodePath<t.Identifier>,\n state,\n ) {\n // check if this node matches our function id\n if (path.node.name !== state.name) return;\n state.needsRename = true;\n path.stop();\n },\n Scope(path, state) {\n if (path.scope.hasOwnBinding(state.name)) {\n path.skip();\n }\n },\n};\n\nexport function ensureFunctionName<\n N extends t.FunctionExpression | t.ClassExpression,\n>(this: NodePath<N>, supportUnicodeId: boolean): null | NodePath<N> {\n if (this.node.id) return this;\n\n const res = getFunctionName(this.node, this.parent);\n if (res == null) return this;\n let { name } = res;\n\n if (!supportUnicodeId && /[\\uD800-\\uDFFF]/.test(name)) {\n return null;\n }\n\n if (name.startsWith(\"get \") || name.startsWith(\"set \")) {\n // TODO: Remove this to support naming getters and setters\n return null;\n }\n\n name = toBindingIdentifierName(name.replace(/[/ ]/g, \"_\"));\n const id = identifier(name);\n inherits(id, res.originalNode);\n\n const state = { needsRename: false, name };\n\n // check to see if we have a local binding of the id we're setting inside of\n // the function, this is important as there are caveats associated\n\n const { scope } = this;\n const binding = scope.getOwnBinding(name);\n if (binding) {\n if (binding.kind === \"param\") {\n // safari will blow up in strict mode with code like:\n //\n // let t = function t(t) {};\n //\n // with the error:\n //\n // Cannot declare a parameter named 't' as it shadows the name of a\n // strict mode function.\n //\n // this isn't to the spec and they've invented this behaviour which is\n // **extremely** annoying so we avoid setting the name if it has a param\n // with the same id\n state.needsRename = true;\n } else {\n // otherwise it's defined somewhere in scope like:\n //\n // let t = function () {\n // let t = 2;\n // };\n //\n // so we can safely just set the id and move along as it shadows the\n // bound function id\n }\n } else if (scope.parent.hasBinding(name) || scope.hasGlobal(name)) {\n this.traverse(refersOuterBindingVisitor, state);\n }\n\n if (!state.needsRename) {\n this.node.id = id;\n scope.getProgramParent().references[id.name] = true;\n return this;\n }\n\n if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {\n // we can just munge the local binding\n scope.rename(id.name);\n this.node.id = id;\n scope.getProgramParent().references[id.name] = true;\n return this;\n }\n\n // TODO: we don't currently support wrapping class expressions\n if (!isFunction(this.node)) return null;\n\n // need to add a wrapper since we can't change the references\n\n const key = scope.generateUidIdentifier(id.name);\n // shim in dummy params to retain function arity, if you try to read the\n // source then you'll get the original since it's proxied so it's all good\n const params = [];\n for (let i = 0, len = getFunctionArity(this.node); i < len; i++) {\n params.push(scope.generateUidIdentifier(\"x\"));\n }\n const call = template.expression.ast`\n (function (${key}) {\n function ${id}(${params}) {\n return ${cloneNode(key)}.apply(this, arguments);\n }\n\n ${cloneNode(id)}.toString = function () {\n return ${cloneNode(key)}.toString();\n }\n\n return ${cloneNode(id)};\n })(${toExpression(this.node)})\n ` as t.CallExpression;\n\n return this.replaceWith(call)[0].get(\"arguments.0\") as NodePath<N>;\n}\n\nfunction getFunctionArity(node: t.Function): number {\n const count = node.params.findIndex(\n param => isAssignmentPattern(param) || isRestElement(param),\n );\n return count === -1 ? node.params.length : count;\n}\n"],"mappings":";;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAuCA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAGA,IAAAG,QAAA,GAAAH,OAAA;AAAqC;EA1CnCI,uBAAuB;EACvBC,oBAAoB;EACpBC,gBAAgB;EAChBC,cAAc;EACdC,cAAc;EACdC,qBAAqB;EACrBC,mBAAmB;EACnBC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,iBAAiB;EACjBC,iBAAiB;EACjBC,gBAAgB;EAChBC,YAAY;EACZC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,eAAe;EACfC,kBAAkB;EAClBC,aAAa;EACbC,aAAa;EACbC,KAAK,EAAIC,MAAM;EACfC,cAAc;EACdC,YAAY;EACZC,eAAe;EACfC,uBAAuB;EACvBC,UAAU;EACVC,mBAAmB;EACnBC,aAAa;EACbC,eAAe;EACfC,SAAS;EACTC,mBAAmB;EACnBC,kBAAkB;EAClBC,sBAAsB;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I,CAACiN,MAAM,CAACQ,SAAS,CACjCC,KAAK,IAAItO,mBAAmB,CAACsO,KAAK,CAAC,IAAIrO,aAAa,CAACqO,KAAK,CAC5D,CAAC;EACD,OAAOF,KAAK,KAAK,CAAC,CAAC,GAAGxN,IAAI,CAACiN,MAAM,CAACjI,MAAM,GAAGwI,KAAK;AAClD","ignoreList":[]}
1
+ {"version":3,"names":["_t","require","_template","_visitors","_context","arrowFunctionExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","conditionalExpression","expressionStatement","identifier","isIdentifier","jsxIdentifier","logicalExpression","LOGICAL_OPERATORS","memberExpression","metaProperty","numericLiteral","objectExpression","restElement","returnStatement","sequenceExpression","spreadElement","stringLiteral","super","_super","thisExpression","toExpression","unaryExpression","toBindingIdentifierName","isFunction","isAssignmentPattern","isRestElement","getFunctionName","cloneNode","variableDeclaration","variableDeclarator","exportNamedDeclaration","exportSpecifier","inherits","toComputedKey","key","isMemberExpression","node","property","isProperty","isMethod","ReferenceError","computed","name","ensureBlock","body","get","bodyNode","Array","isArray","Error","isBlockStatement","statements","stringPath","listKey","isStatement","push","parentPath","setup","call","exports","arrowFunctionToShadowed","isArrowFunctionExpression","arrowFunctionToExpression","unwrapFunctionEnvironment","isFunctionExpression","isFunctionDeclaration","buildCodeFrameError","hoistFunctionEnvironment","setType","path","type","allowInsertArrow","allowInsertArrowWithRest","noNewArrows","_arguments$","arguments","specCompliant","self","_self$ensureFunctionN","ensureFunctionName","thisBinding","fnPath","fn","checkBinding","scope","generateUidIdentifier","id","init","unshiftContainer","hub","addHelper","replaceWith","getSuperCallsVisitor","environmentVisitor","CallExpression","child","allSuperCalls","isSuper","arrowParent","thisEnvFn","findParent","p","isProgram","isClassProperty","static","isClassPrivateProperty","inConstructor","isClassMethod","kind","thisPaths","argumentsPaths","newTargetPaths","superProps","superCalls","getScopeInformation","length","traverse","superBinding","getSuperBinding","forEach","superCall","callee","loc","argumentsBinding","getBinding","args","buildUndefinedNode","argumentsChild","argsRef","newTargetBinding","targetChild","targetRef","flatSuperProps","reduce","acc","superProp","concat","standardizeSuperProperty","superParentPath","isAssignment","isAssignmentExpression","left","isCall","isCallExpression","isTaggedTemplate","isTaggedTemplateExpression","tag","getSuperPropBinding","value","right","getThisBinding","hasSuperClass","thisChild","thisRef","isJSX","isLogicalOp","op","includes","operator","assignmentPath","slice","isLogicalAssignment","tmp","generateDeclaredUidIdentifier","object","rightExpression","isUpdateExpression","updateExpr","computedKey","parts","prefix","superClass","assignSuperThisVisitor","supers","has","add","replaceWithMultiple","WeakSet","argsBinding","propName","argsList","fnBody","method","unshift","valueIdent","cacheKey","data","getData","setData","getScopeInformationVisitor","ThisExpression","JSXIdentifier","isJSXMemberExpression","isJSXOpeningElement","MemberExpression","Identifier","isReferencedIdentifier","curr","hasOwnBinding","rename","parent","MetaProperty","splitExportDeclaration","isExportDeclaration","isExportAllDeclaration","isExportNamedDeclaration","declaration","isExportDefaultDeclaration","standaloneDeclaration","isClassDeclaration","exportExpr","isClassExpression","isScope","needBindingRegistration","hasBinding","updatedDeclaration","updatedExportDeclaration","insertAfter","registerDeclaration","bindingIdentifiers","getOuterBindingIdentifiers","specifiers","Object","keys","map","aliasDeclar","refersOuterBindingVisitor","ReferencedIdentifier|BindingIdentifier","state","needsRename","stop","Scope","skip","supportUnicodeId","res","test","startsWith","replace","originalNode","binding","getOwnBinding","hasGlobal","getProgramParent","references","params","i","len","getFunctionArity","template","expression","ast","count","findIndex","param"],"sources":["../../src/path/conversion.ts"],"sourcesContent":["// This file contains methods that convert the path node into another node or some other type of data.\n\nimport {\n arrowFunctionExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n conditionalExpression,\n expressionStatement,\n identifier,\n isIdentifier,\n jsxIdentifier,\n logicalExpression,\n LOGICAL_OPERATORS,\n memberExpression,\n metaProperty,\n numericLiteral,\n objectExpression,\n restElement,\n returnStatement,\n sequenceExpression,\n spreadElement,\n stringLiteral,\n super as _super,\n thisExpression,\n toExpression,\n unaryExpression,\n toBindingIdentifierName,\n isFunction,\n isAssignmentPattern,\n isRestElement,\n getFunctionName,\n cloneNode,\n variableDeclaration,\n variableDeclarator,\n exportNamedDeclaration,\n exportSpecifier,\n inherits,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport template from \"@babel/template\";\nimport { environmentVisitor } from \"../visitors.ts\";\nimport type NodePath from \"./index.ts\";\nimport type { Visitor } from \"../types.ts\";\nimport { setup } from \"./context.ts\";\n\nexport function toComputedKey(this: NodePath) {\n let key;\n if (this.isMemberExpression()) {\n key = this.node.property;\n } else if (this.isProperty() || this.isMethod()) {\n key = this.node.key;\n } else {\n throw new ReferenceError(\"todo\");\n }\n\n // @ts-expect-error todo(flow->ts) computed does not exist in ClassPrivateProperty\n if (!this.node.computed) {\n if (isIdentifier(key)) key = stringLiteral(key.name);\n }\n\n return key;\n}\n\nexport function ensureBlock(\n this: NodePath<\n t.Loop | t.WithStatement | t.Function | t.LabeledStatement | t.CatchClause\n >,\n): void {\n const body = this.get(\"body\");\n const bodyNode = body.node;\n\n if (Array.isArray(body)) {\n throw new Error(\"Can't convert array path to a block statement\");\n }\n if (!bodyNode) {\n throw new Error(\"Can't convert node without a body\");\n }\n\n if (body.isBlockStatement()) {\n // @ts-expect-error TS throws because ensureBlock returns the body node path\n // however, we don't use the return value and treat it as a transform and\n // assertion utilities. For better type inference we annotate it as an\n // assertion method\n // TODO: Unify the implementation with the type definition\n return bodyNode;\n }\n\n const statements: Array<t.Statement> = [];\n\n let stringPath = \"body\";\n let key;\n let listKey;\n if (body.isStatement()) {\n listKey = \"body\";\n key = 0;\n statements.push(body.node);\n } else {\n stringPath += \".body.0\";\n if (this.isFunction()) {\n key = \"argument\";\n statements.push(returnStatement(body.node as t.Expression));\n } else {\n key = \"expression\";\n statements.push(expressionStatement(body.node as t.Expression));\n }\n }\n\n this.node.body = blockStatement(statements);\n const parentPath = this.get(stringPath) as NodePath;\n setup.call(\n body,\n parentPath,\n listKey\n ? // @ts-expect-error listKey must present in parent path\n parentPath.node[listKey]\n : parentPath.node,\n listKey,\n key,\n );\n\n // @ts-expect-error TS throws because ensureBlock returns the body node path\n // however, we don't use the return value and treat it as a transform and\n // assertion utilities. For better type inference we annotate it as an\n // assertion method\n // TODO: Unify the implementation with the type definition\n return this.node;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * Keeping this for backward-compatibility. You should use arrowFunctionToExpression() for >=7.x.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.arrowFunctionToShadowed = function (this: NodePath) {\n if (!this.isArrowFunctionExpression()) return;\n\n this.arrowFunctionToExpression();\n };\n}\n\n/**\n * Given an arbitrary function, process its content as if it were an arrow function, moving references\n * to \"this\", \"arguments\", \"super\", and such into the function's parent scope. This method is useful if\n * you have wrapped some set of items in an IIFE or other function, but want \"this\", \"arguments\", and super\"\n * to continue behaving as expected.\n */\nexport function unwrapFunctionEnvironment(this: NodePath) {\n if (\n !this.isArrowFunctionExpression() &&\n !this.isFunctionExpression() &&\n !this.isFunctionDeclaration()\n ) {\n throw this.buildCodeFrameError(\n \"Can only unwrap the environment of a function.\",\n );\n }\n\n hoistFunctionEnvironment(this);\n}\n\nfunction setType<N extends t.Node, T extends N[\"type\"]>(\n path: NodePath<N>,\n type: T,\n): asserts path is NodePath<Extract<N, { type: T }>> {\n path.node.type = type;\n}\n\n/**\n * Convert a given arrow function into a normal ES5 function expression.\n */\nexport function arrowFunctionToExpression(\n this: NodePath<t.ArrowFunctionExpression>,\n {\n allowInsertArrow = true,\n allowInsertArrowWithRest = allowInsertArrow,\n noNewArrows = process.env.BABEL_8_BREAKING\n ? // TODO(Babel 8): Consider defaulting to `false` for spec compliance\n true\n : !arguments[0]?.specCompliant,\n }: {\n allowInsertArrow?: boolean | void;\n allowInsertArrowWithRest?: boolean | void;\n noNewArrows?: boolean;\n } = {},\n): NodePath<\n Exclude<t.Function, t.Method | t.ArrowFunctionExpression> | t.CallExpression\n> {\n if (!this.isArrowFunctionExpression()) {\n throw (this as NodePath).buildCodeFrameError(\n \"Cannot convert non-arrow function to a function expression.\",\n );\n }\n\n let self = this;\n if (!noNewArrows) {\n // @ts-expect-error This is technicallynot valid on arrow functions\n // because it adds an .id property, but we are going to convert it\n // to a function expression anyway\n self = self.ensureFunctionName(false) ?? self;\n }\n\n const { thisBinding, fnPath: fn } = hoistFunctionEnvironment(\n self,\n noNewArrows,\n allowInsertArrow,\n allowInsertArrowWithRest,\n );\n\n fn.ensureBlock();\n setType(fn, \"FunctionExpression\");\n\n if (!noNewArrows) {\n const checkBinding = thisBinding\n ? null\n : fn.scope.generateUidIdentifier(\"arrowCheckId\");\n if (checkBinding) {\n fn.parentPath.scope.push({\n id: checkBinding,\n init: objectExpression([]),\n });\n }\n\n fn.get(\"body\").unshiftContainer(\n \"body\",\n expressionStatement(\n callExpression(this.hub.addHelper(\"newArrowCheck\"), [\n thisExpression(),\n checkBinding\n ? identifier(checkBinding.name)\n : identifier(thisBinding),\n ]),\n ),\n );\n\n fn.replaceWith(\n callExpression(memberExpression(fn.node, identifier(\"bind\")), [\n checkBinding ? identifier(checkBinding.name) : thisExpression(),\n ]),\n );\n\n return fn.get(\"callee.object\");\n }\n\n return fn;\n}\n\nconst getSuperCallsVisitor = environmentVisitor<{\n allSuperCalls: NodePath<t.CallExpression>[];\n}>({\n CallExpression(child, { allSuperCalls }) {\n if (!child.get(\"callee\").isSuper()) return;\n allSuperCalls.push(child);\n },\n});\n\n/**\n * Given a function, traverse its contents, and if there are references to \"this\", \"arguments\", \"super\",\n * or \"new.target\", ensure that these references reference the parent environment around this function.\n *\n * @returns `thisBinding`: the name of the injected reference to `this`; for example \"_this\"\n * @returns `fnPath`: the new path to the function node. This is different from the fnPath\n * parameter when the function node is wrapped in another node.\n */\nfunction hoistFunctionEnvironment(\n fnPath: NodePath<t.Function>,\n // TODO(Babel 8): Consider defaulting to `false` for spec compliance\n noNewArrows: boolean | void = true,\n allowInsertArrow: boolean | void = true,\n allowInsertArrowWithRest: boolean | void = true,\n): { thisBinding: string; fnPath: NodePath<t.Function> } {\n let arrowParent;\n let thisEnvFn: NodePath<t.Function> = fnPath.findParent(p => {\n if (p.isArrowFunctionExpression()) {\n arrowParent ??= p;\n return false;\n }\n return (\n p.isFunction() ||\n p.isProgram() ||\n p.isClassProperty({ static: false }) ||\n p.isClassPrivateProperty({ static: false })\n );\n }) as NodePath<t.Function>;\n const inConstructor = thisEnvFn.isClassMethod({ kind: \"constructor\" });\n\n if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {\n if (arrowParent) {\n thisEnvFn = arrowParent;\n } else if (allowInsertArrow) {\n // It's safe to wrap this function in another and not hoist to the\n // top level because the 'this' binding is constant in class\n // properties (since 'super()' has already been called), so we don't\n // need to capture/reassign it at the top level.\n fnPath.replaceWith(\n callExpression(\n arrowFunctionExpression([], toExpression(fnPath.node)),\n [],\n ),\n );\n thisEnvFn = fnPath.get(\"callee\") as NodePath<t.ArrowFunctionExpression>;\n fnPath = thisEnvFn.get(\"body\") as NodePath<t.FunctionExpression>;\n } else {\n throw fnPath.buildCodeFrameError(\n \"Unable to transform arrow inside class property\",\n );\n }\n }\n\n const { thisPaths, argumentsPaths, newTargetPaths, superProps, superCalls } =\n getScopeInformation(fnPath);\n\n // Convert all super() calls in the constructor, if super is used in an arrow.\n if (inConstructor && superCalls.length > 0) {\n if (!allowInsertArrow) {\n throw superCalls[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-arrow-functions', \" +\n \"it's not possible to compile `super()` in an arrow function without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n if (!allowInsertArrowWithRest) {\n // preset-env with target `since 2017` enables `transform-parameters` without `transform-classes`.\n throw superCalls[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-parameters', \" +\n \"it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n const allSuperCalls: NodePath<t.CallExpression>[] = [];\n thisEnvFn.traverse(getSuperCallsVisitor, { allSuperCalls });\n const superBinding = getSuperBinding(thisEnvFn);\n allSuperCalls.forEach(superCall => {\n const callee = identifier(superBinding);\n callee.loc = superCall.node.callee.loc;\n\n superCall.get(\"callee\").replaceWith(callee);\n });\n }\n\n // Convert all \"arguments\" references in the arrow to point at the alias.\n if (argumentsPaths.length > 0) {\n const argumentsBinding = getBinding(thisEnvFn, \"arguments\", () => {\n const args = () => identifier(\"arguments\");\n if (thisEnvFn.scope.path.isProgram()) {\n return conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", args()),\n stringLiteral(\"undefined\"),\n ),\n thisEnvFn.scope.buildUndefinedNode(),\n args(),\n );\n } else {\n return args();\n }\n });\n\n argumentsPaths.forEach(argumentsChild => {\n const argsRef = identifier(argumentsBinding);\n argsRef.loc = argumentsChild.node.loc;\n\n argumentsChild.replaceWith(argsRef);\n });\n }\n\n // Convert all \"new.target\" references in the arrow to point at the alias.\n if (newTargetPaths.length > 0) {\n const newTargetBinding = getBinding(thisEnvFn, \"newtarget\", () =>\n metaProperty(identifier(\"new\"), identifier(\"target\")),\n );\n\n newTargetPaths.forEach(targetChild => {\n const targetRef = identifier(newTargetBinding);\n targetRef.loc = targetChild.node.loc;\n\n targetChild.replaceWith(targetRef);\n });\n }\n\n // Convert all \"super.prop\" references to point at aliases.\n if (superProps.length > 0) {\n if (!allowInsertArrow) {\n throw superProps[0].buildCodeFrameError(\n \"When using '@babel/plugin-transform-arrow-functions', \" +\n \"it's not possible to compile `super.prop` in an arrow function without compiling classes.\\n\" +\n \"Please add '@babel/plugin-transform-classes' to your Babel configuration.\",\n );\n }\n\n const flatSuperProps: NodePath<t.MemberExpression>[] = superProps.reduce(\n (acc, superProp) => acc.concat(standardizeSuperProperty(superProp)),\n [],\n );\n\n flatSuperProps.forEach(superProp => {\n const key = superProp.node.computed\n ? \"\"\n : // @ts-expect-error super property must not contain private name\n superProp.get(\"property\").node.name;\n\n const superParentPath = superProp.parentPath;\n\n const isAssignment = superParentPath.isAssignmentExpression({\n left: superProp.node,\n });\n const isCall = superParentPath.isCallExpression({\n callee: superProp.node,\n });\n const isTaggedTemplate = superParentPath.isTaggedTemplateExpression({\n tag: superProp.node,\n });\n const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);\n\n const args: t.Expression[] = [];\n if (superProp.node.computed) {\n // SuperProperty must not be a private name\n args.push(superProp.get(\"property\").node as t.Expression);\n }\n\n if (isAssignment) {\n const value = superParentPath.node.right;\n args.push(value);\n }\n\n const call = callExpression(identifier(superBinding), args);\n\n if (isCall) {\n superParentPath.unshiftContainer(\"arguments\", thisExpression());\n superProp.replaceWith(memberExpression(call, identifier(\"call\")));\n\n thisPaths.push(\n superParentPath.get(\"arguments.0\") as NodePath<t.ThisExpression>,\n );\n } else if (isAssignment) {\n // Replace not only the super.prop, but the whole assignment\n superParentPath.replaceWith(call);\n } else if (isTaggedTemplate) {\n superProp.replaceWith(\n callExpression(memberExpression(call, identifier(\"bind\"), false), [\n thisExpression(),\n ]),\n );\n\n thisPaths.push(\n superProp.get(\"arguments.0\") as NodePath<t.ThisExpression>,\n );\n } else {\n superProp.replaceWith(call);\n }\n });\n }\n\n // Convert all \"this\" references in the arrow to point at the alias.\n let thisBinding: string | null;\n if (thisPaths.length > 0 || !noNewArrows) {\n thisBinding = getThisBinding(thisEnvFn, inConstructor);\n\n if (\n noNewArrows ||\n // In subclass constructors, still need to rewrite because \"this\" can't be bound in spec mode\n // because it might not have been initialized yet.\n (inConstructor && hasSuperClass(thisEnvFn))\n ) {\n thisPaths.forEach(thisChild => {\n const thisRef = thisChild.isJSX()\n ? jsxIdentifier(thisBinding)\n : identifier(thisBinding);\n\n thisRef.loc = thisChild.node.loc;\n thisChild.replaceWith(thisRef);\n });\n\n if (!noNewArrows) thisBinding = null;\n }\n }\n\n return { thisBinding, fnPath };\n}\n\ntype LogicalOp = Parameters<typeof logicalExpression>[0];\ntype BinaryOp = Parameters<typeof binaryExpression>[0];\n\nfunction isLogicalOp(op: string): op is LogicalOp {\n return LOGICAL_OPERATORS.includes(op);\n}\n\nfunction standardizeSuperProperty(\n superProp: NodePath<t.MemberExpression>,\n):\n | [NodePath<t.MemberExpression>]\n | [NodePath<t.MemberExpression>, NodePath<t.MemberExpression>] {\n if (\n superProp.parentPath.isAssignmentExpression() &&\n superProp.parentPath.node.operator !== \"=\"\n ) {\n const assignmentPath = superProp.parentPath;\n\n const op = assignmentPath.node.operator.slice(0, -1) as\n | LogicalOp\n | BinaryOp;\n\n const value = assignmentPath.node.right;\n\n const isLogicalAssignment = isLogicalOp(op);\n\n if (superProp.node.computed) {\n // from: super[foo] **= 4;\n // to: super[tmp = foo] = super[tmp] ** 4;\n\n // from: super[foo] ??= 4;\n // to: super[tmp = foo] ?? super[tmp] = 4;\n\n const tmp = superProp.scope.generateDeclaredUidIdentifier(\"tmp\");\n\n const object = superProp.node.object;\n const property = superProp.node.property as t.Expression;\n\n assignmentPath\n .get(\"left\")\n .replaceWith(\n memberExpression(\n object,\n assignmentExpression(\"=\", tmp, property),\n true /* computed */,\n ),\n );\n\n assignmentPath\n .get(\"right\")\n .replaceWith(\n rightExpression(\n isLogicalAssignment ? \"=\" : op,\n memberExpression(object, identifier(tmp.name), true /* computed */),\n value,\n ),\n );\n } else {\n // from: super.foo **= 4;\n // to: super.foo = super.foo ** 4;\n\n // from: super.foo ??= 4;\n // to: super.foo ?? super.foo = 4;\n\n const object = superProp.node.object;\n const property = superProp.node.property as t.Identifier;\n\n assignmentPath\n .get(\"left\")\n .replaceWith(memberExpression(object, property));\n\n assignmentPath\n .get(\"right\")\n .replaceWith(\n rightExpression(\n isLogicalAssignment ? \"=\" : op,\n memberExpression(object, identifier(property.name)),\n value,\n ),\n );\n }\n\n if (isLogicalAssignment) {\n assignmentPath.replaceWith(\n logicalExpression(\n op,\n assignmentPath.node.left as t.MemberExpression,\n assignmentPath.node.right,\n ),\n );\n } else {\n assignmentPath.node.operator = \"=\";\n }\n\n return [\n assignmentPath.get(\"left\") as NodePath<t.MemberExpression>,\n assignmentPath.get(\"right\").get(\"left\") as NodePath<t.MemberExpression>,\n ];\n } else if (superProp.parentPath.isUpdateExpression()) {\n const updateExpr = superProp.parentPath;\n\n const tmp = superProp.scope.generateDeclaredUidIdentifier(\"tmp\");\n const computedKey = superProp.node.computed\n ? superProp.scope.generateDeclaredUidIdentifier(\"prop\")\n : null;\n\n const parts: t.Expression[] = [\n assignmentExpression(\n \"=\",\n tmp,\n memberExpression(\n superProp.node.object,\n computedKey\n ? assignmentExpression(\n \"=\",\n computedKey,\n superProp.node.property as t.Expression,\n )\n : superProp.node.property,\n superProp.node.computed,\n ),\n ),\n assignmentExpression(\n \"=\",\n memberExpression(\n superProp.node.object,\n computedKey ? identifier(computedKey.name) : superProp.node.property,\n superProp.node.computed,\n ),\n binaryExpression(\n // map `++` to `+`, and `--` to `-`\n superProp.parentPath.node.operator[0] as \"+\" | \"-\",\n identifier(tmp.name),\n numericLiteral(1),\n ),\n ),\n ];\n\n if (!superProp.parentPath.node.prefix) {\n parts.push(identifier(tmp.name));\n }\n\n updateExpr.replaceWith(sequenceExpression(parts));\n\n const left = updateExpr.get(\n \"expressions.0.right\",\n ) as NodePath<t.MemberExpression>;\n const right = updateExpr.get(\n \"expressions.1.left\",\n ) as NodePath<t.MemberExpression>;\n return [left, right];\n }\n\n return [superProp];\n\n function rightExpression(\n op: BinaryOp | \"=\",\n left: t.MemberExpression,\n right: t.Expression,\n ) {\n if (op === \"=\") {\n return assignmentExpression(\"=\", left, right);\n } else {\n return binaryExpression(op, left, right);\n }\n }\n}\n\nfunction hasSuperClass(thisEnvFn: NodePath<t.Function>) {\n return (\n thisEnvFn.isClassMethod() &&\n !!(thisEnvFn.parentPath.parentPath.node as t.Class).superClass\n );\n}\n\nconst assignSuperThisVisitor = environmentVisitor<{\n supers: WeakSet<t.CallExpression>;\n thisBinding: string;\n}>({\n CallExpression(child, { supers, thisBinding }) {\n if (!child.get(\"callee\").isSuper()) return;\n if (supers.has(child.node)) return;\n supers.add(child.node);\n\n child.replaceWithMultiple([\n child.node,\n assignmentExpression(\"=\", identifier(thisBinding), identifier(\"this\")),\n ]);\n },\n});\n\n// Create a binding that evaluates to the \"this\" of the given function.\nfunction getThisBinding(\n thisEnvFn: NodePath<t.Function>,\n inConstructor: boolean,\n) {\n return getBinding(thisEnvFn, \"this\", thisBinding => {\n if (!inConstructor || !hasSuperClass(thisEnvFn)) return thisExpression();\n\n thisEnvFn.traverse(assignSuperThisVisitor, {\n supers: new WeakSet(),\n thisBinding,\n });\n });\n}\n\n// Create a binding for a function that will call \"super()\" with arguments passed through.\nfunction getSuperBinding(thisEnvFn: NodePath<t.Function>) {\n return getBinding(thisEnvFn, \"supercall\", () => {\n const argsBinding = thisEnvFn.scope.generateUidIdentifier(\"args\");\n return arrowFunctionExpression(\n [restElement(argsBinding)],\n callExpression(_super(), [spreadElement(identifier(argsBinding.name))]),\n );\n });\n}\n\n// Create a binding for a function that will call \"super.foo\" or \"super[foo]\".\nfunction getSuperPropBinding(\n thisEnvFn: NodePath<t.Function>,\n isAssignment: boolean,\n propName: string,\n) {\n const op = isAssignment ? \"set\" : \"get\";\n\n return getBinding(thisEnvFn, `superprop_${op}:${propName || \"\"}`, () => {\n const argsList = [];\n\n let fnBody;\n if (propName) {\n // () => super.foo\n fnBody = memberExpression(_super(), identifier(propName));\n } else {\n const method = thisEnvFn.scope.generateUidIdentifier(\"prop\");\n // (method) => super[method]\n argsList.unshift(method);\n fnBody = memberExpression(\n _super(),\n identifier(method.name),\n true /* computed */,\n );\n }\n\n if (isAssignment) {\n const valueIdent = thisEnvFn.scope.generateUidIdentifier(\"value\");\n argsList.push(valueIdent);\n\n fnBody = assignmentExpression(\"=\", fnBody, identifier(valueIdent.name));\n }\n\n return arrowFunctionExpression(argsList, fnBody);\n });\n}\n\nfunction getBinding(\n thisEnvFn: NodePath,\n key: string,\n init: (name: string) => t.Expression,\n) {\n const cacheKey = \"binding:\" + key;\n let data: string | undefined = thisEnvFn.getData(cacheKey);\n if (!data) {\n const id = thisEnvFn.scope.generateUidIdentifier(key);\n data = id.name;\n thisEnvFn.setData(cacheKey, data);\n\n thisEnvFn.scope.push({\n id: id,\n init: init(data),\n });\n }\n\n return data;\n}\n\ntype ScopeInfo = {\n thisPaths: NodePath<t.ThisExpression | t.JSXIdentifier>[];\n superCalls: NodePath<t.CallExpression>[];\n superProps: NodePath<t.MemberExpression>[];\n argumentsPaths: NodePath<t.Identifier | t.JSXIdentifier>[];\n newTargetPaths: NodePath<t.MetaProperty>[];\n};\n\nconst getScopeInformationVisitor = environmentVisitor<ScopeInfo>({\n ThisExpression(child, { thisPaths }) {\n thisPaths.push(child);\n },\n JSXIdentifier(child, { thisPaths }) {\n if (child.node.name !== \"this\") return;\n if (\n !child.parentPath.isJSXMemberExpression({ object: child.node }) &&\n !child.parentPath.isJSXOpeningElement({ name: child.node })\n ) {\n return;\n }\n\n thisPaths.push(child);\n },\n CallExpression(child, { superCalls }) {\n if (child.get(\"callee\").isSuper()) superCalls.push(child);\n },\n MemberExpression(child, { superProps }) {\n if (child.get(\"object\").isSuper()) superProps.push(child);\n },\n Identifier(child, { argumentsPaths }) {\n if (!child.isReferencedIdentifier({ name: \"arguments\" })) return;\n\n let curr = child.scope;\n do {\n if (curr.hasOwnBinding(\"arguments\")) {\n curr.rename(\"arguments\");\n return;\n }\n if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {\n break;\n }\n } while ((curr = curr.parent));\n\n argumentsPaths.push(child);\n },\n MetaProperty(child, { newTargetPaths }) {\n if (!child.get(\"meta\").isIdentifier({ name: \"new\" })) return;\n if (!child.get(\"property\").isIdentifier({ name: \"target\" })) return;\n\n newTargetPaths.push(child);\n },\n});\n\nfunction getScopeInformation(fnPath: NodePath) {\n const thisPaths: ScopeInfo[\"thisPaths\"] = [];\n const argumentsPaths: ScopeInfo[\"argumentsPaths\"] = [];\n const newTargetPaths: ScopeInfo[\"newTargetPaths\"] = [];\n const superProps: ScopeInfo[\"superProps\"] = [];\n const superCalls: ScopeInfo[\"superCalls\"] = [];\n\n fnPath.traverse(getScopeInformationVisitor, {\n thisPaths,\n argumentsPaths,\n newTargetPaths,\n superProps,\n superCalls,\n });\n\n return {\n thisPaths,\n argumentsPaths,\n newTargetPaths,\n superProps,\n superCalls,\n };\n}\n\nexport function splitExportDeclaration(\n this: NodePath<t.ExportDefaultDeclaration | t.ExportNamedDeclaration>,\n): NodePath<t.Declaration> {\n if (!this.isExportDeclaration() || this.isExportAllDeclaration()) {\n throw new Error(\"Only default and named export declarations can be split.\");\n }\n if (this.isExportNamedDeclaration() && this.get(\"specifiers\").length > 0) {\n throw new Error(\"It doesn't make sense to split exported specifiers.\");\n }\n\n const declaration = this.get(\"declaration\");\n\n if (this.isExportDefaultDeclaration()) {\n const standaloneDeclaration =\n declaration.isFunctionDeclaration() || declaration.isClassDeclaration();\n const exportExpr =\n declaration.isFunctionExpression() || declaration.isClassExpression();\n\n const scope = declaration.isScope()\n ? declaration.scope.parent\n : declaration.scope;\n\n // @ts-expect-error id is not defined in expressions other than function/class\n let id = declaration.node.id;\n let needBindingRegistration = false;\n\n if (!id) {\n needBindingRegistration = true;\n\n id = scope.generateUidIdentifier(\"default\");\n\n if (standaloneDeclaration || exportExpr) {\n declaration.node.id = cloneNode(id);\n }\n } else if (exportExpr && scope.hasBinding(id.name)) {\n needBindingRegistration = true;\n\n id = scope.generateUidIdentifier(id.name);\n }\n\n const updatedDeclaration = standaloneDeclaration\n ? declaration.node\n : variableDeclaration(\"var\", [\n variableDeclarator(\n cloneNode(id),\n // @ts-expect-error When `standaloneDeclaration` is false, declaration must not be a Function/ClassDeclaration\n declaration.node,\n ),\n ]);\n\n const updatedExportDeclaration = exportNamedDeclaration(null, [\n exportSpecifier(cloneNode(id), identifier(\"default\")),\n ]);\n\n this.insertAfter(updatedExportDeclaration);\n this.replaceWith(updatedDeclaration);\n\n if (needBindingRegistration) {\n scope.registerDeclaration(this);\n }\n\n return this;\n } else if (this.get(\"specifiers\").length > 0) {\n throw new Error(\"It doesn't make sense to split exported specifiers.\");\n }\n\n const bindingIdentifiers = declaration.getOuterBindingIdentifiers();\n\n const specifiers = Object.keys(bindingIdentifiers).map(name => {\n return exportSpecifier(identifier(name), identifier(name));\n });\n\n const aliasDeclar = exportNamedDeclaration(null, specifiers);\n\n this.insertAfter(aliasDeclar);\n this.replaceWith(declaration.node);\n return this;\n}\n\nconst refersOuterBindingVisitor: Visitor<{\n needsRename: boolean;\n name: string;\n}> = {\n \"ReferencedIdentifier|BindingIdentifier\"(\n path: NodePath<t.Identifier>,\n state,\n ) {\n // check if this node matches our function id\n if (path.node.name !== state.name) return;\n state.needsRename = true;\n path.stop();\n },\n Scope(path, state) {\n if (path.scope.hasOwnBinding(state.name)) {\n path.skip();\n }\n },\n};\n\nexport function ensureFunctionName<\n N extends t.FunctionExpression | t.ClassExpression,\n>(this: NodePath<N>, supportUnicodeId: boolean): null | NodePath<N> {\n if (this.node.id) return this;\n\n const res = getFunctionName(this.node, this.parent);\n if (res == null) return this;\n let { name } = res;\n\n if (!supportUnicodeId && /[\\uD800-\\uDFFF]/.test(name)) {\n return null;\n }\n\n if (name.startsWith(\"get \") || name.startsWith(\"set \")) {\n // TODO: Remove this to support naming getters and setters\n return null;\n }\n\n name = toBindingIdentifierName(name.replace(/[/ ]/g, \"_\"));\n const id = identifier(name);\n inherits(id, res.originalNode);\n\n const state = { needsRename: false, name };\n\n // check to see if we have a local binding of the id we're setting inside of\n // the function, this is important as there are caveats associated\n\n const { scope } = this;\n const binding = scope.getOwnBinding(name);\n if (binding) {\n if (binding.kind === \"param\") {\n // safari will blow up in strict mode with code like:\n //\n // let t = function t(t) {};\n //\n // with the error:\n //\n // Cannot declare a parameter named 't' as it shadows the name of a\n // strict mode function.\n //\n // this isn't to the spec and they've invented this behaviour which is\n // **extremely** annoying so we avoid setting the name if it has a param\n // with the same id\n state.needsRename = true;\n } else {\n // otherwise it's defined somewhere in scope like:\n //\n // let t = function () {\n // let t = 2;\n // };\n //\n // so we can safely just set the id and move along as it shadows the\n // bound function id\n }\n } else if (scope.parent.hasBinding(name) || scope.hasGlobal(name)) {\n this.traverse(refersOuterBindingVisitor, state);\n }\n\n if (!state.needsRename) {\n this.node.id = id;\n if (process.env.BABEL_8_BREAKING) {\n scope.getProgramParent().referencesSet.add(id.name);\n } else {\n // @ts-expect-error Babel 7\n scope.getProgramParent().references[id.name] = true;\n }\n return this;\n }\n\n if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {\n // we can just munge the local binding\n scope.rename(id.name);\n this.node.id = id;\n if (process.env.BABEL_8_BREAKING) {\n scope.getProgramParent().referencesSet.add(id.name);\n } else {\n // @ts-expect-error Babel 7\n scope.getProgramParent().references[id.name] = true;\n }\n return this;\n }\n\n // TODO: we don't currently support wrapping class expressions\n if (!isFunction(this.node)) return null;\n\n // need to add a wrapper since we can't change the references\n\n const key = scope.generateUidIdentifier(id.name);\n // shim in dummy params to retain function arity, if you try to read the\n // source then you'll get the original since it's proxied so it's all good\n const params = [];\n for (let i = 0, len = getFunctionArity(this.node); i < len; i++) {\n params.push(scope.generateUidIdentifier(\"x\"));\n }\n const call = template.expression.ast`\n (function (${key}) {\n function ${id}(${params}) {\n return ${cloneNode(key)}.apply(this, arguments);\n }\n\n ${cloneNode(id)}.toString = function () {\n return ${cloneNode(key)}.toString();\n }\n\n return ${cloneNode(id)};\n })(${toExpression(this.node)})\n ` as t.CallExpression;\n\n return this.replaceWith(call)[0].get(\"arguments.0\") as NodePath<N>;\n}\n\nfunction getFunctionArity(node: t.Function): number {\n const count = node.params.findIndex(\n param => isAssignmentPattern(param) || isRestElement(param),\n );\n return count === -1 ? node.params.length : count;\n}\n"],"mappings":";;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAuCA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAGA,IAAAG,QAAA,GA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