@epic-web/workshop-app 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2191) hide show
  1. package/README.md +10 -0
  2. package/bin/epicshop.js +84 -0
  3. package/build/client/app-default.css +39 -0
  4. package/build/client/assets/_-ByTWgb53.js +2 -0
  5. package/build/client/assets/_-ByTWgb53.js.map +1 -0
  6. package/build/client/assets/_-l0sNRNKZ.js +2 -0
  7. package/build/client/assets/_-l0sNRNKZ.js.map +1 -0
  8. package/build/client/assets/_exerciseNumber-B_VU-pG1.js +2 -0
  9. package/build/client/assets/_exerciseNumber-B_VU-pG1.js.map +1 -0
  10. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js +2 -0
  11. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js.map +1 -0
  12. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js +2 -0
  13. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js.map +1 -0
  14. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js +2 -0
  15. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js.map +1 -0
  16. package/build/client/assets/_layout--icRfEZS.js +2 -0
  17. package/build/client/assets/_layout--icRfEZS.js.map +1 -0
  18. package/build/client/assets/_layout-BaPtC79F.js +2 -0
  19. package/build/client/assets/_layout-BaPtC79F.js.map +1 -0
  20. package/build/client/assets/_layout-Bj9PyQQD.js +2 -0
  21. package/build/client/assets/_layout-Bj9PyQQD.js.map +1 -0
  22. package/build/client/assets/_layout-CIgVeko6.js +2 -0
  23. package/build/client/assets/_layout-CIgVeko6.js.map +1 -0
  24. package/build/client/assets/account-Bk4o4AzZ.js +2 -0
  25. package/build/client/assets/account-Bk4o4AzZ.js.map +1 -0
  26. package/build/client/assets/api._-l0sNRNKZ.js +2 -0
  27. package/build/client/assets/api._-l0sNRNKZ.js.map +1 -0
  28. package/build/client/assets/app-B0HiIPBO.css +1 -0
  29. package/build/client/assets/app._id-l0sNRNKZ.js +2 -0
  30. package/build/client/assets/app._id-l0sNRNKZ.js.map +1 -0
  31. package/build/client/assets/app._id._-l0sNRNKZ.js +2 -0
  32. package/build/client/assets/app._id._-l0sNRNKZ.js.map +1 -0
  33. package/build/client/assets/app._id.api._-l0sNRNKZ.js +2 -0
  34. package/build/client/assets/app._id.api._-l0sNRNKZ.js.map +1 -0
  35. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js +2 -0
  36. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
  37. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js +2 -0
  38. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js.map +1 -0
  39. package/build/client/assets/apps-DP2rzg_V.js +2 -0
  40. package/build/client/assets/apps-DP2rzg_V.js.map +1 -0
  41. package/build/client/assets/apps-l0sNRNKZ.js +2 -0
  42. package/build/client/assets/apps-l0sNRNKZ.js.map +1 -0
  43. package/build/client/assets/button-DnQOyJAN.js +2 -0
  44. package/build/client/assets/button-DnQOyJAN.js.map +1 -0
  45. package/build/client/assets/client-hints-BHTHvBjk.js +24 -0
  46. package/build/client/assets/client-hints-BHTHvBjk.js.map +1 -0
  47. package/build/client/assets/clsx-B-dksMZM.js +2 -0
  48. package/build/client/assets/clsx-B-dksMZM.js.map +1 -0
  49. package/build/client/assets/components-Dj3sm47B.js +100 -0
  50. package/build/client/assets/components-Dj3sm47B.js.map +1 -0
  51. package/build/client/assets/diff-Blb5EPiO.js +2 -0
  52. package/build/client/assets/diff-Blb5EPiO.js.map +1 -0
  53. package/build/client/assets/diff-MSYB00VZ.js +42 -0
  54. package/build/client/assets/diff-MSYB00VZ.js.map +1 -0
  55. package/build/client/assets/discord-CK7yz4w6.js +2 -0
  56. package/build/client/assets/discord-CK7yz4w6.js.map +1 -0
  57. package/build/client/assets/discord-CsluX01E.js +2 -0
  58. package/build/client/assets/discord-CsluX01E.js.map +1 -0
  59. package/build/client/assets/discord.callback-l0sNRNKZ.js +2 -0
  60. package/build/client/assets/discord.callback-l0sNRNKZ.js.map +1 -0
  61. package/build/client/assets/entry.client-DBBrAxtJ.js +73 -0
  62. package/build/client/assets/entry.client-DBBrAxtJ.js.map +1 -0
  63. package/build/client/assets/epic-video-BwJwnV_j.js +2992 -0
  64. package/build/client/assets/epic-video-BwJwnV_j.js.map +1 -0
  65. package/build/client/assets/epic-video-DUnRvy1A.css +1 -0
  66. package/build/client/assets/error-boundary-Bg54_knF.js +2 -0
  67. package/build/client/assets/error-boundary-Bg54_knF.js.map +1 -0
  68. package/build/client/assets/exercises-l0sNRNKZ.js +2 -0
  69. package/build/client/assets/exercises-l0sNRNKZ.js.map +1 -0
  70. package/build/client/assets/finished-CGll5TOI.js +2 -0
  71. package/build/client/assets/finished-CGll5TOI.js.map +1 -0
  72. package/build/client/assets/index-B8k-Gd1G.js +2 -0
  73. package/build/client/assets/index-B8k-Gd1G.js.map +1 -0
  74. package/build/client/assets/index-BL4aE6WC.js +8 -0
  75. package/build/client/assets/index-BL4aE6WC.js.map +1 -0
  76. package/build/client/assets/index-BfoHqrT5.js +2 -0
  77. package/build/client/assets/index-BfoHqrT5.js.map +1 -0
  78. package/build/client/assets/index-D1WEsmVZ.js +36 -0
  79. package/build/client/assets/index-D1WEsmVZ.js.map +1 -0
  80. package/build/client/assets/index-DP2rzg_V.js +2 -0
  81. package/build/client/assets/index-DP2rzg_V.js.map +1 -0
  82. package/build/client/assets/index-DqBktlAI.js +2 -0
  83. package/build/client/assets/index-DqBktlAI.js.map +1 -0
  84. package/build/client/assets/index-K6Dvbx-E.js +2 -0
  85. package/build/client/assets/index-K6Dvbx-E.js.map +1 -0
  86. package/build/client/assets/index-l0sNRNKZ.js +2 -0
  87. package/build/client/assets/index-l0sNRNKZ.js.map +1 -0
  88. package/build/client/assets/index-zG3_j9lj.js +2 -0
  89. package/build/client/assets/index-zG3_j9lj.js.map +1 -0
  90. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js +2 -0
  91. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js.map +1 -0
  92. package/build/client/assets/launch-editor-l0sNRNKZ.js +2 -0
  93. package/build/client/assets/launch-editor-l0sNRNKZ.js.map +1 -0
  94. package/build/client/assets/loading-CaagEELb.js +2 -0
  95. package/build/client/assets/loading-CaagEELb.js.map +1 -0
  96. package/build/client/assets/login-2BiFV7_R.js +2 -0
  97. package/build/client/assets/login-2BiFV7_R.js.map +1 -0
  98. package/build/client/assets/login-sse-l0sNRNKZ.js +2 -0
  99. package/build/client/assets/login-sse-l0sNRNKZ.js.map +1 -0
  100. package/build/client/assets/manifest-92896199.js +1 -0
  101. package/build/client/assets/mdx-DdywIxB6.js +2 -0
  102. package/build/client/assets/mdx-DdywIxB6.js.map +1 -0
  103. package/build/client/assets/misc-CXGQ7VS9.js +2 -0
  104. package/build/client/assets/misc-CXGQ7VS9.js.map +1 -0
  105. package/build/client/assets/nav-chevrons-D8c9lJW6.js +2 -0
  106. package/build/client/assets/nav-chevrons-D8c9lJW6.js.map +1 -0
  107. package/build/client/assets/onboarding-eFvyCmxD.js +2 -0
  108. package/build/client/assets/onboarding-eFvyCmxD.js.map +1 -0
  109. package/build/client/assets/presence-u-05JV3Z.js +28 -0
  110. package/build/client/assets/presence-u-05JV3Z.js.map +1 -0
  111. package/build/client/assets/processes-l0sNRNKZ.js +2 -0
  112. package/build/client/assets/processes-l0sNRNKZ.js.map +1 -0
  113. package/build/client/assets/progress-CBZt2pmu.js +2 -0
  114. package/build/client/assets/progress-CBZt2pmu.js.map +1 -0
  115. package/build/client/assets/progress-bar-DX6yYES2.js +2 -0
  116. package/build/client/assets/progress-bar-DX6yYES2.js.map +1 -0
  117. package/build/client/assets/progress-l0sNRNKZ.js +2 -0
  118. package/build/client/assets/progress-l0sNRNKZ.js.map +1 -0
  119. package/build/client/assets/root-BLcghf_N.js +68 -0
  120. package/build/client/assets/root-BLcghf_N.js.map +1 -0
  121. package/build/client/assets/set-playground-l0sNRNKZ.js +2 -0
  122. package/build/client/assets/set-playground-l0sNRNKZ.js.map +1 -0
  123. package/build/client/assets/start-l0sNRNKZ.js +2 -0
  124. package/build/client/assets/start-l0sNRNKZ.js.map +1 -0
  125. package/build/client/assets/support-QTdmLyE7.js +2 -0
  126. package/build/client/assets/support-QTdmLyE7.js.map +1 -0
  127. package/build/client/assets/tailwind-BStGdHyu.css +1 -0
  128. package/build/client/assets/test-l0sNRNKZ.js +2 -0
  129. package/build/client/assets/test-l0sNRNKZ.js.map +1 -0
  130. package/build/client/assets/test._testName-l0sNRNKZ.js +2 -0
  131. package/build/client/assets/test._testName-l0sNRNKZ.js.map +1 -0
  132. package/build/client/assets/tooltip-CVFWPOu0.js +2 -0
  133. package/build/client/assets/tooltip-CVFWPOu0.js.map +1 -0
  134. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js +2 -0
  135. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js.map +1 -0
  136. package/build/client/assets/use-event-source-DXlRuRq2.js +2 -0
  137. package/build/client/assets/use-event-source-DXlRuRq2.js.map +1 -0
  138. package/build/client/assets/user-DiGtbaa7.js +2 -0
  139. package/build/client/assets/user-DiGtbaa7.js.map +1 -0
  140. package/build/client/favicon.ico +0 -0
  141. package/build/client/favicon.png +0 -0
  142. package/build/client/favicon.svg +13 -0
  143. package/build/client/fonts/neogrotesk/0b8b755c-fee2-4661-9c8b-c5d1fbea901b.woff2 +0 -0
  144. package/build/client/fonts/neogrotesk/146d9d20-3e53-4e5d-beb2-1209bba5ac61.woff2 +0 -0
  145. package/build/client/fonts/neogrotesk/1798ef2b-5ee0-4f39-8b2c-ae3e36f07cd1.woff2 +0 -0
  146. package/build/client/fonts/neogrotesk/1eb2cb40-6822-4654-856c-8cbe652366b6.woff +0 -0
  147. package/build/client/fonts/neogrotesk/3b64793c-0bdb-4e4f-bf0e-cdf2e974d5f2.woff +0 -0
  148. package/build/client/fonts/neogrotesk/3bb44ed4-cf17-469c-8d0d-5946d10fdad1.woff +0 -0
  149. package/build/client/fonts/neogrotesk/4bd29470-1701-41fe-94b6-4a147512160c.woff +0 -0
  150. package/build/client/fonts/neogrotesk/5cdbf070-a094-44c8-b8f1-17a00a19c959.woff2 +0 -0
  151. package/build/client/fonts/neogrotesk/6d439be9-37df-4912-ac09-388ce938fa46.woff2 +0 -0
  152. package/build/client/fonts/neogrotesk/7fc2971f-a9c2-4e09-bd24-bfd4ee6e97b3.woff +0 -0
  153. package/build/client/fonts/neogrotesk/861b65ee-56bd-4057-9af4-3b2903af231e.woff +0 -0
  154. package/build/client/fonts/neogrotesk/8cf836d9-a49e-4387-bcbd-4800766e5d24.woff +0 -0
  155. package/build/client/fonts/neogrotesk/8d61128d-534c-4793-9668-b98bcc2e5969.woff2 +0 -0
  156. package/build/client/fonts/neogrotesk/98423f75-c341-4161-8b92-7cd5c05081e5.woff +0 -0
  157. package/build/client/fonts/neogrotesk/a1456726-ad0d-4f5e-9d8f-ce92e8ce375d.woff2 +0 -0
  158. package/build/client/fonts/neogrotesk/af81e7d2-0bb1-4aa0-bc76-adb78338c568.woff +0 -0
  159. package/build/client/fonts/neogrotesk/d1302ad5-ceee-47cb-a0fa-2da6bd0d4d54.woff2 +0 -0
  160. package/build/client/fonts/neogrotesk/e7e15c31-aad1-4384-abd3-0671ccd03251.woff +0 -0
  161. package/build/client/fonts/neogrotesk/ec6cb127-161b-469c-9816-69489032a234.woff2 +0 -0
  162. package/build/client/fonts/neogrotesk/f480430c-6c50-4ae3-9abb-e92c484f84d6.woff2 +0 -0
  163. package/build/client/icons.svg +529 -0
  164. package/build/client/neogrotesk-font.css +100 -0
  165. package/build/server/index.js +12875 -0
  166. package/build/server/index.js.map +1 -0
  167. package/dist/server/index.js +176 -0
  168. package/node_modules/@babel/runtime/LICENSE +22 -0
  169. package/node_modules/@babel/runtime/README.md +19 -0
  170. package/node_modules/@babel/runtime/helpers/AsyncGenerator.js +64 -0
  171. package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
  172. package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
  173. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +24 -0
  174. package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
  175. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
  176. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
  177. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
  178. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
  179. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
  180. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
  181. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
  182. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
  183. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
  184. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +7 -0
  185. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
  186. package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
  187. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +31 -0
  188. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
  189. package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
  190. package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
  191. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +6 -0
  192. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +18 -0
  193. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +7 -0
  194. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +11 -0
  195. package/node_modules/@babel/runtime/helpers/classCallCheck.js +6 -0
  196. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
  197. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +6 -0
  198. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
  199. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
  200. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
  201. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
  202. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
  203. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +6 -0
  204. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +7 -0
  205. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
  206. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +8 -0
  207. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
  208. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
  209. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +6 -0
  210. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +6 -0
  211. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
  212. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
  213. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +9 -0
  214. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +9 -0
  215. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +10 -0
  216. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +6 -0
  217. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
  218. package/node_modules/@babel/runtime/helpers/construct.js +10 -0
  219. package/node_modules/@babel/runtime/helpers/createClass.js +19 -0
  220. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +53 -0
  221. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +20 -0
  222. package/node_modules/@babel/runtime/helpers/createSuper.js +18 -0
  223. package/node_modules/@babel/runtime/helpers/decorate.js +343 -0
  224. package/node_modules/@babel/runtime/helpers/defaults.js +12 -0
  225. package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
  226. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +20 -0
  227. package/node_modules/@babel/runtime/helpers/defineProperty.js +16 -0
  228. package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
  229. package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +63 -0
  230. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +3 -0
  231. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +3 -0
  232. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +23 -0
  233. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +235 -0
  234. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +183 -0
  235. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +190 -0
  236. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +221 -0
  237. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +132 -0
  238. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +123 -0
  239. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +5 -0
  240. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +3 -0
  241. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -0
  242. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +4 -0
  243. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +6 -0
  244. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +23 -0
  245. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +44 -0
  246. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +30 -0
  247. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +4 -0
  248. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +6 -0
  249. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +5 -0
  250. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +5 -0
  251. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +17 -0
  252. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +6 -0
  253. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +10 -0
  254. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
  255. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +4 -0
  256. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +5 -0
  257. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +4 -0
  258. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +3 -0
  259. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +6 -0
  260. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +6 -0
  261. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +4 -0
  262. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  263. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +6 -0
  264. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -0
  265. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
  266. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +4 -0
  267. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +4 -0
  268. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
  269. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  270. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -0
  271. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +4 -0
  272. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +8 -0
  273. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +8 -0
  274. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +9 -0
  275. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  276. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -0
  277. package/node_modules/@babel/runtime/helpers/esm/construct.js +9 -0
  278. package/node_modules/@babel/runtime/helpers/esm/createClass.js +18 -0
  279. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +52 -0
  280. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  281. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +17 -0
  282. package/node_modules/@babel/runtime/helpers/esm/decorate.js +342 -0
  283. package/node_modules/@babel/runtime/helpers/esm/defaults.js +11 -0
  284. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +7 -0
  285. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +19 -0
  286. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +15 -0
  287. package/node_modules/@babel/runtime/helpers/esm/dispose.js +27 -0
  288. package/node_modules/@babel/runtime/helpers/esm/extends.js +14 -0
  289. package/node_modules/@babel/runtime/helpers/esm/get.js +17 -0
  290. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
  291. package/node_modules/@babel/runtime/helpers/esm/identity.js +3 -0
  292. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +26 -0
  293. package/node_modules/@babel/runtime/helpers/esm/inherits.js +17 -0
  294. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +6 -0
  295. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
  296. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +3 -0
  297. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +7 -0
  298. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -0
  299. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +26 -0
  300. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +7 -0
  301. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +8 -0
  302. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +3 -0
  303. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +27 -0
  304. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +9 -0
  305. package/node_modules/@babel/runtime/helpers/esm/jsx.js +21 -0
  306. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +8 -0
  307. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +5 -0
  308. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -0
  309. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -0
  310. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +3 -0
  311. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +3 -0
  312. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +16 -0
  313. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +22 -0
  314. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +16 -0
  315. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  316. package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
  317. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
  318. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +3 -0
  319. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +303 -0
  320. package/node_modules/@babel/runtime/helpers/esm/set.js +40 -0
  321. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +11 -0
  322. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +7 -0
  323. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
  324. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +7 -0
  325. package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +7 -0
  326. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +8 -0
  327. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +10 -0
  328. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +7 -0
  329. package/node_modules/@babel/runtime/helpers/esm/tdz.js +3 -0
  330. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +5 -0
  331. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +1 -0
  332. package/node_modules/@babel/runtime/helpers/esm/toArray.js +7 -0
  333. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +7 -0
  334. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +11 -0
  335. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +6 -0
  336. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +9 -0
  337. package/node_modules/@babel/runtime/helpers/esm/typeof.js +9 -0
  338. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
  339. package/node_modules/@babel/runtime/helpers/esm/using.js +11 -0
  340. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +43 -0
  341. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +6 -0
  342. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +30 -0
  343. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +50 -0
  344. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +3 -0
  345. package/node_modules/@babel/runtime/helpers/extends.js +15 -0
  346. package/node_modules/@babel/runtime/helpers/get.js +18 -0
  347. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +7 -0
  348. package/node_modules/@babel/runtime/helpers/identity.js +4 -0
  349. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
  350. package/node_modules/@babel/runtime/helpers/inherits.js +18 -0
  351. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +7 -0
  352. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +10 -0
  353. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
  354. package/node_modules/@babel/runtime/helpers/instanceof.js +8 -0
  355. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
  356. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
  357. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
  358. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
  359. package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
  360. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
  361. package/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +10 -0
  362. package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
  363. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
  364. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +6 -0
  365. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
  366. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
  367. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
  368. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
  369. package/node_modules/@babel/runtime/helpers/objectSpread.js +17 -0
  370. package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
  371. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +17 -0
  372. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +13 -0
  373. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +11 -0
  374. package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
  375. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
  376. package/node_modules/@babel/runtime/helpers/set.js +41 -0
  377. package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
  378. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +8 -0
  379. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +8 -0
  380. package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
  381. package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +8 -0
  382. package/node_modules/@babel/runtime/helpers/superPropBase.js +9 -0
  383. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +11 -0
  384. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +8 -0
  385. package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
  386. package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
  387. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
  388. package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
  389. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
  390. package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
  391. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
  392. package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
  393. package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
  394. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +10 -0
  395. package/node_modules/@babel/runtime/helpers/using.js +12 -0
  396. package/node_modules/@babel/runtime/helpers/usingCtx.js +44 -0
  397. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +7 -0
  398. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +31 -0
  399. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +51 -0
  400. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
  401. package/node_modules/@babel/runtime/package.json +1065 -0
  402. package/node_modules/@babel/runtime/regenerator/index.js +15 -0
  403. package/node_modules/@conform-to/dom/LICENSE +21 -0
  404. package/node_modules/@conform-to/dom/README +37 -0
  405. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.js +58 -0
  406. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  407. package/node_modules/@conform-to/dom/dom.d.ts +43 -0
  408. package/node_modules/@conform-to/dom/dom.js +104 -0
  409. package/node_modules/@conform-to/dom/dom.mjs +95 -0
  410. package/node_modules/@conform-to/dom/form.d.ts +147 -0
  411. package/node_modules/@conform-to/dom/form.js +578 -0
  412. package/node_modules/@conform-to/dom/form.mjs +574 -0
  413. package/node_modules/@conform-to/dom/formdata.d.ts +61 -0
  414. package/node_modules/@conform-to/dom/formdata.js +234 -0
  415. package/node_modules/@conform-to/dom/formdata.mjs +220 -0
  416. package/node_modules/@conform-to/dom/index.d.ts +4 -0
  417. package/node_modules/@conform-to/dom/index.js +20 -0
  418. package/node_modules/@conform-to/dom/index.mjs +4 -0
  419. package/node_modules/@conform-to/dom/package.json +42 -0
  420. package/node_modules/@conform-to/dom/submission.d.ts +135 -0
  421. package/node_modules/@conform-to/dom/submission.js +303 -0
  422. package/node_modules/@conform-to/dom/submission.mjs +286 -0
  423. package/node_modules/@conform-to/dom/util.d.ts +3 -0
  424. package/node_modules/@conform-to/dom/util.js +19 -0
  425. package/node_modules/@conform-to/dom/util.mjs +13 -0
  426. package/node_modules/@conform-to/react/LICENSE +21 -0
  427. package/node_modules/@conform-to/react/README +37 -0
  428. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.js +87 -0
  429. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.mjs +78 -0
  430. package/node_modules/@conform-to/react/context.d.ts +72 -0
  431. package/node_modules/@conform-to/react/context.js +258 -0
  432. package/node_modules/@conform-to/react/context.mjs +243 -0
  433. package/node_modules/@conform-to/react/helpers.d.ts +208 -0
  434. package/node_modules/@conform-to/react/helpers.js +222 -0
  435. package/node_modules/@conform-to/react/helpers.mjs +211 -0
  436. package/node_modules/@conform-to/react/hooks.d.ts +34 -0
  437. package/node_modules/@conform-to/react/hooks.js +88 -0
  438. package/node_modules/@conform-to/react/hooks.mjs +79 -0
  439. package/node_modules/@conform-to/react/index.d.ts +5 -0
  440. package/node_modules/@conform-to/react/index.js +30 -0
  441. package/node_modules/@conform-to/react/index.mjs +5 -0
  442. package/node_modules/@conform-to/react/integrations.d.ts +45 -0
  443. package/node_modules/@conform-to/react/integrations.js +285 -0
  444. package/node_modules/@conform-to/react/integrations.mjs +271 -0
  445. package/node_modules/@conform-to/react/package.json +53 -0
  446. package/node_modules/@conform-to/zod/LICENSE +21 -0
  447. package/node_modules/@conform-to/zod/README +37 -0
  448. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.js +58 -0
  449. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  450. package/node_modules/@conform-to/zod/coercion.d.ts +26 -0
  451. package/node_modules/@conform-to/zod/coercion.js +169 -0
  452. package/node_modules/@conform-to/zod/coercion.mjs +162 -0
  453. package/node_modules/@conform-to/zod/constraint.d.ts +3 -0
  454. package/node_modules/@conform-to/zod/constraint.js +100 -0
  455. package/node_modules/@conform-to/zod/constraint.mjs +96 -0
  456. package/node_modules/@conform-to/zod/index.d.ts +2 -0
  457. package/node_modules/@conform-to/zod/index.js +12 -0
  458. package/node_modules/@conform-to/zod/index.mjs +2 -0
  459. package/node_modules/@conform-to/zod/package.json +46 -0
  460. package/node_modules/@conform-to/zod/parse.d.ts +28 -0
  461. package/node_modules/@conform-to/zod/parse.js +64 -0
  462. package/node_modules/@conform-to/zod/parse.mjs +59 -0
  463. package/node_modules/@epic-web/client-hints/README.md +221 -0
  464. package/node_modules/@epic-web/client-hints/dist/color-scheme.d.ts +12 -0
  465. package/node_modules/@epic-web/client-hints/dist/color-scheme.js +25 -0
  466. package/node_modules/@epic-web/client-hints/dist/index.d.ts +6 -0
  467. package/node_modules/@epic-web/client-hints/dist/index.js +67 -0
  468. package/node_modules/@epic-web/client-hints/dist/reduced-motion.d.ts +12 -0
  469. package/node_modules/@epic-web/client-hints/dist/reduced-motion.js +25 -0
  470. package/node_modules/@epic-web/client-hints/dist/time-zone.d.ts +5 -0
  471. package/node_modules/@epic-web/client-hints/dist/time-zone.js +5 -0
  472. package/node_modules/@epic-web/client-hints/dist/utils.d.ts +9 -0
  473. package/node_modules/@epic-web/client-hints/dist/utils.js +1 -0
  474. package/node_modules/@epic-web/client-hints/package.json +71 -0
  475. package/node_modules/@epic-web/restore-scroll/README.md +103 -0
  476. package/node_modules/@epic-web/restore-scroll/dist/index.d.ts +4 -0
  477. package/node_modules/@epic-web/restore-scroll/dist/index.js +77 -0
  478. package/node_modules/@epic-web/restore-scroll/package.json +64 -0
  479. package/node_modules/@floating-ui/core/LICENSE +20 -0
  480. package/node_modules/@floating-ui/core/README.md +4 -0
  481. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
  482. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1141 -0
  483. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +521 -0
  484. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +521 -0
  485. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1022 -0
  486. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1022 -0
  487. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1160 -0
  488. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
  489. package/node_modules/@floating-ui/core/package.json +62 -0
  490. package/node_modules/@floating-ui/dom/LICENSE +20 -0
  491. package/node_modules/@floating-ui/dom/README.md +4 -0
  492. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
  493. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +816 -0
  494. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +315 -0
  495. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +315 -0
  496. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +679 -0
  497. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +679 -0
  498. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +840 -0
  499. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
  500. package/node_modules/@floating-ui/dom/package.json +70 -0
  501. package/node_modules/@floating-ui/react-dom/LICENSE +20 -0
  502. package/node_modules/@floating-ui/react-dom/README.md +3 -0
  503. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +258 -0
  504. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +258 -0
  505. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +273 -0
  506. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +273 -0
  507. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +348 -0
  508. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.min.js +1 -0
  509. package/node_modules/@floating-ui/react-dom/package.json +76 -0
  510. package/node_modules/@floating-ui/utils/LICENSE +20 -0
  511. package/node_modules/@floating-ui/utils/README.md +4 -0
  512. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.min.mjs +1 -0
  513. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.mjs +129 -0
  514. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +98 -0
  515. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +98 -0
  516. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.min.mjs +1 -0
  517. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.mjs +128 -0
  518. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +43 -0
  519. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +43 -0
  520. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +128 -0
  521. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +128 -0
  522. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +153 -0
  523. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
  524. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +129 -0
  525. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +129 -0
  526. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +160 -0
  527. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
  528. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +43 -0
  529. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +128 -0
  530. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +153 -0
  531. package/node_modules/@floating-ui/utils/dom/package.json +6 -0
  532. package/node_modules/@floating-ui/utils/package.json +69 -0
  533. package/node_modules/@radix-ui/number/README.md +13 -0
  534. package/node_modules/@radix-ui/number/dist/index.d.mts +3 -0
  535. package/node_modules/@radix-ui/number/dist/index.d.ts +3 -0
  536. package/node_modules/@radix-ui/number/dist/index.d.ts.map +1 -0
  537. package/node_modules/@radix-ui/number/dist/index.js +13 -0
  538. package/node_modules/@radix-ui/number/dist/index.js.map +1 -0
  539. package/node_modules/@radix-ui/number/dist/index.mjs +9 -0
  540. package/node_modules/@radix-ui/number/dist/index.mjs.map +1 -0
  541. package/node_modules/@radix-ui/number/package.json +41 -0
  542. package/node_modules/@radix-ui/primitive/README.md +13 -0
  543. package/node_modules/@radix-ui/primitive/dist/index.d.mts +5 -0
  544. package/node_modules/@radix-ui/primitive/dist/index.d.ts +5 -0
  545. package/node_modules/@radix-ui/primitive/dist/index.d.ts.map +1 -0
  546. package/node_modules/@radix-ui/primitive/dist/index.js +16 -0
  547. package/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
  548. package/node_modules/@radix-ui/primitive/dist/index.mjs +12 -0
  549. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +1 -0
  550. package/node_modules/@radix-ui/primitive/package.json +41 -0
  551. package/node_modules/@radix-ui/react-accordion/README.md +13 -0
  552. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +113 -0
  553. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +113 -0
  554. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts.map +1 -0
  555. package/node_modules/@radix-ui/react-accordion/dist/index.js +342 -0
  556. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
  557. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +325 -0
  558. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +1 -0
  559. package/node_modules/@radix-ui/react-accordion/package.json +64 -0
  560. package/node_modules/@radix-ui/react-arrow/README.md +13 -0
  561. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +10 -0
  562. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +10 -0
  563. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts.map +1 -0
  564. package/node_modules/@radix-ui/react-arrow/dist/index.js +40 -0
  565. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
  566. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +32 -0
  567. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +1 -0
  568. package/node_modules/@radix-ui/react-arrow/package.json +56 -0
  569. package/node_modules/@radix-ui/react-collapsible/README.md +13 -0
  570. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +32 -0
  571. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +32 -0
  572. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts.map +1 -0
  573. package/node_modules/@radix-ui/react-collapsible/dist/index.js +177 -0
  574. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
  575. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +164 -0
  576. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +1 -0
  577. package/node_modules/@radix-ui/react-collapsible/package.json +63 -0
  578. package/node_modules/@radix-ui/react-collection/README.md +13 -0
  579. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +22 -0
  580. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +22 -0
  581. package/node_modules/@radix-ui/react-collection/dist/index.d.ts.map +1 -0
  582. package/node_modules/@radix-ui/react-collection/dist/index.js +117 -0
  583. package/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
  584. package/node_modules/@radix-ui/react-collection/dist/index.mjs +110 -0
  585. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -0
  586. package/node_modules/@radix-ui/react-collection/package.json +59 -0
  587. package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
  588. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +14 -0
  589. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +14 -0
  590. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts.map +1 -0
  591. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +36 -0
  592. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
  593. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +31 -0
  594. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +1 -0
  595. package/node_modules/@radix-ui/react-compose-refs/package.json +50 -0
  596. package/node_modules/@radix-ui/react-context/README.md +13 -0
  597. package/node_modules/@radix-ui/react-context/dist/index.d.mts +26 -0
  598. package/node_modules/@radix-ui/react-context/dist/index.d.ts +26 -0
  599. package/node_modules/@radix-ui/react-context/dist/index.d.ts.map +1 -0
  600. package/node_modules/@radix-ui/react-context/dist/index.js +133 -0
  601. package/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  602. package/node_modules/@radix-ui/react-context/dist/index.mjs +128 -0
  603. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  604. package/node_modules/@radix-ui/react-context/package.json +50 -0
  605. package/node_modules/@radix-ui/react-direction/README.md +13 -0
  606. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +11 -0
  607. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +11 -0
  608. package/node_modules/@radix-ui/react-direction/dist/index.d.ts.map +1 -0
  609. package/node_modules/@radix-ui/react-direction/dist/index.js +29 -0
  610. package/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
  611. package/node_modules/@radix-ui/react-direction/dist/index.mjs +23 -0
  612. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -0
  613. package/node_modules/@radix-ui/react-direction/package.json +50 -0
  614. package/node_modules/@radix-ui/react-dismissable-layer/README.md +13 -0
  615. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +51 -0
  616. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +51 -0
  617. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts.map +1 -0
  618. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +293 -0
  619. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
  620. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +283 -0
  621. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  622. package/node_modules/@radix-ui/react-dismissable-layer/package.json +63 -0
  623. package/node_modules/@radix-ui/react-focus-guards/README.md +13 -0
  624. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +9 -0
  625. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +9 -0
  626. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts.map +1 -0
  627. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +45 -0
  628. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
  629. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +39 -0
  630. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  631. package/node_modules/@radix-ui/react-focus-guards/package.json +50 -0
  632. package/node_modules/@radix-ui/react-focus-scope/README.md +13 -0
  633. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +32 -0
  634. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +32 -0
  635. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts.map +1 -0
  636. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +300 -0
  637. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
  638. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +292 -0
  639. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +1 -0
  640. package/node_modules/@radix-ui/react-focus-scope/package.json +58 -0
  641. package/node_modules/@radix-ui/react-id/README.md +13 -0
  642. package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  643. package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
  644. package/node_modules/@radix-ui/react-id/dist/index.d.ts.map +1 -0
  645. package/node_modules/@radix-ui/react-id/dist/index.js +28 -0
  646. package/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
  647. package/node_modules/@radix-ui/react-id/dist/index.mjs +24 -0
  648. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +1 -0
  649. package/node_modules/@radix-ui/react-id/package.json +51 -0
  650. package/node_modules/@radix-ui/react-popover/README.md +13 -0
  651. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +84 -0
  652. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +84 -0
  653. package/node_modules/@radix-ui/react-popover/dist/index.d.ts.map +1 -0
  654. package/node_modules/@radix-ui/react-popover/dist/index.js +342 -0
  655. package/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
  656. package/node_modules/@radix-ui/react-popover/dist/index.mjs +321 -0
  657. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +1 -0
  658. package/node_modules/@radix-ui/react-popover/package.json +70 -0
  659. package/node_modules/@radix-ui/react-popper/README.md +13 -0
  660. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +45 -0
  661. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +45 -0
  662. package/node_modules/@radix-ui/react-popper/dist/index.d.ts.map +1 -0
  663. package/node_modules/@radix-ui/react-popper/dist/index.js +341 -0
  664. package/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
  665. package/node_modules/@radix-ui/react-popper/dist/index.mjs +324 -0
  666. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -0
  667. package/node_modules/@radix-ui/react-popper/package.json +65 -0
  668. package/node_modules/@radix-ui/react-portal/README.md +13 -0
  669. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +14 -0
  670. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +14 -0
  671. package/node_modules/@radix-ui/react-portal/dist/index.d.ts.map +1 -0
  672. package/node_modules/@radix-ui/react-portal/dist/index.js +37 -0
  673. package/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
  674. package/node_modules/@radix-ui/react-portal/dist/index.mjs +29 -0
  675. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  676. package/node_modules/@radix-ui/react-portal/package.json +56 -0
  677. package/node_modules/@radix-ui/react-presence/README.md +13 -0
  678. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +10 -0
  679. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +10 -0
  680. package/node_modules/@radix-ui/react-presence/dist/index.d.ts.map +1 -0
  681. package/node_modules/@radix-ui/react-presence/dist/index.js +143 -0
  682. package/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
  683. package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
  684. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  685. package/node_modules/@radix-ui/react-presence/package.json +57 -0
  686. package/node_modules/@radix-ui/react-primitive/README.md +13 -0
  687. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +53 -0
  688. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +53 -0
  689. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts.map +1 -0
  690. package/node_modules/@radix-ui/react-primitive/dist/index.js +105 -0
  691. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  692. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +96 -0
  693. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -0
  694. package/node_modules/@radix-ui/react-primitive/package.json +59 -0
  695. package/node_modules/@radix-ui/react-roving-focus/README.md +13 -0
  696. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +43 -0
  697. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +43 -0
  698. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts.map +1 -0
  699. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +268 -0
  700. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
  701. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +257 -0
  702. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -0
  703. package/node_modules/@radix-ui/react-roving-focus/package.json +64 -0
  704. package/node_modules/@radix-ui/react-select/README.md +13 -0
  705. package/node_modules/@radix-ui/react-select/dist/index.d.mts +132 -0
  706. package/node_modules/@radix-ui/react-select/dist/index.d.ts +132 -0
  707. package/node_modules/@radix-ui/react-select/dist/index.d.ts.map +1 -0
  708. package/node_modules/@radix-ui/react-select/dist/index.js +1310 -0
  709. package/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
  710. package/node_modules/@radix-ui/react-select/dist/index.mjs +1271 -0
  711. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +1 -0
  712. package/node_modules/@radix-ui/react-select/package.json +76 -0
  713. package/node_modules/@radix-ui/react-slot/README.md +13 -0
  714. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +11 -0
  715. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +11 -0
  716. package/node_modules/@radix-ui/react-slot/dist/index.d.ts.map +1 -0
  717. package/node_modules/@radix-ui/react-slot/dist/index.js +98 -0
  718. package/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  719. package/node_modules/@radix-ui/react-slot/dist/index.mjs +89 -0
  720. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -0
  721. package/node_modules/@radix-ui/react-slot/package.json +51 -0
  722. package/node_modules/@radix-ui/react-tabs/README.md +13 -0
  723. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +55 -0
  724. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +55 -0
  725. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts.map +1 -0
  726. package/node_modules/@radix-ui/react-tabs/dist/index.js +198 -0
  727. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
  728. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +183 -0
  729. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
  730. package/node_modules/@radix-ui/react-tabs/package.json +63 -0
  731. package/node_modules/@radix-ui/react-toast/README.md +13 -0
  732. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +119 -0
  733. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +119 -0
  734. package/node_modules/@radix-ui/react-toast/dist/index.d.ts.map +1 -0
  735. package/node_modules/@radix-ui/react-toast/dist/index.js +751 -0
  736. package/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
  737. package/node_modules/@radix-ui/react-toast/dist/index.mjs +730 -0
  738. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +1 -0
  739. package/node_modules/@radix-ui/react-toast/package.json +67 -0
  740. package/node_modules/@radix-ui/react-use-callback-ref/README.md +13 -0
  741. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +7 -0
  742. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +7 -0
  743. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts.map +1 -0
  744. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +27 -0
  745. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
  746. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +23 -0
  747. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +1 -0
  748. package/node_modules/@radix-ui/react-use-callback-ref/package.json +50 -0
  749. package/node_modules/@radix-ui/react-use-controllable-state/README.md +13 -0
  750. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +9 -0
  751. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +9 -0
  752. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts.map +1 -0
  753. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -0
  754. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
  755. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +53 -0
  756. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -0
  757. package/node_modules/@radix-ui/react-use-controllable-state/package.json +51 -0
  758. package/node_modules/@radix-ui/react-use-escape-keydown/README.md +13 -0
  759. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +6 -0
  760. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +6 -0
  761. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts.map +1 -0
  762. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +31 -0
  763. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
  764. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +27 -0
  765. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +1 -0
  766. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +51 -0
  767. package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
  768. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +11 -0
  769. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +11 -0
  770. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts.map +1 -0
  771. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +20 -0
  772. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
  773. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +16 -0
  774. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +1 -0
  775. package/node_modules/@radix-ui/react-use-layout-effect/package.json +50 -0
  776. package/node_modules/@radix-ui/react-use-previous/README.md +13 -0
  777. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +3 -0
  778. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +3 -0
  779. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts.map +1 -0
  780. package/node_modules/@radix-ui/react-use-previous/dist/index.js +30 -0
  781. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
  782. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +26 -0
  783. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +1 -0
  784. package/node_modules/@radix-ui/react-use-previous/package.json +50 -0
  785. package/node_modules/@radix-ui/react-use-rect/README.md +13 -0
  786. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +8 -0
  787. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +8 -0
  788. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts.map +1 -0
  789. package/node_modules/@radix-ui/react-use-rect/dist/index.js +34 -0
  790. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +1 -0
  791. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +30 -0
  792. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +1 -0
  793. package/node_modules/@radix-ui/react-use-rect/package.json +51 -0
  794. package/node_modules/@radix-ui/react-use-size/README.md +13 -0
  795. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +6 -0
  796. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +6 -0
  797. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts.map +1 -0
  798. package/node_modules/@radix-ui/react-use-size/dist/index.js +61 -0
  799. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
  800. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +57 -0
  801. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +1 -0
  802. package/node_modules/@radix-ui/react-use-size/package.json +54 -0
  803. package/node_modules/@radix-ui/react-visually-hidden/README.md +13 -0
  804. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +10 -0
  805. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +10 -0
  806. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts.map +1 -0
  807. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +47 -0
  808. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
  809. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +39 -0
  810. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -0
  811. package/node_modules/@radix-ui/react-visually-hidden/package.json +56 -0
  812. package/node_modules/@radix-ui/rect/README.md +13 -0
  813. package/node_modules/@radix-ui/rect/dist/index.d.mts +16 -0
  814. package/node_modules/@radix-ui/rect/dist/index.d.ts +16 -0
  815. package/node_modules/@radix-ui/rect/dist/index.d.ts.map +1 -0
  816. package/node_modules/@radix-ui/rect/dist/index.js +70 -0
  817. package/node_modules/@radix-ui/rect/dist/index.js.map +1 -0
  818. package/node_modules/@radix-ui/rect/dist/index.mjs +66 -0
  819. package/node_modules/@radix-ui/rect/dist/index.mjs.map +1 -0
  820. package/node_modules/@radix-ui/rect/package.json +41 -0
  821. package/node_modules/@remix-run/react/CHANGELOG.md +907 -0
  822. package/node_modules/@remix-run/react/LICENSE.md +22 -0
  823. package/node_modules/@remix-run/react/README.md +13 -0
  824. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +30 -0
  825. package/node_modules/@remix-run/react/dist/browser.d.ts +35 -0
  826. package/node_modules/@remix-run/react/dist/browser.js +221 -0
  827. package/node_modules/@remix-run/react/dist/components.d.ts +128 -0
  828. package/node_modules/@remix-run/react/dist/components.js +874 -0
  829. package/node_modules/@remix-run/react/dist/data.d.ts +14 -0
  830. package/node_modules/@remix-run/react/dist/data.js +275 -0
  831. package/node_modules/@remix-run/react/dist/entry.d.ts +38 -0
  832. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +33 -0
  833. package/node_modules/@remix-run/react/dist/errorBoundaries.js +165 -0
  834. package/node_modules/@remix-run/react/dist/errors.d.ts +2 -0
  835. package/node_modules/@remix-run/react/dist/errors.js +53 -0
  836. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +26 -0
  837. package/node_modules/@remix-run/react/dist/esm/browser.js +261 -0
  838. package/node_modules/@remix-run/react/dist/esm/components.js +841 -0
  839. package/node_modules/@remix-run/react/dist/esm/data.js +263 -0
  840. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +139 -0
  841. package/node_modules/@remix-run/react/dist/esm/errors.js +49 -0
  842. package/node_modules/@remix-run/react/dist/esm/fallback.js +35 -0
  843. package/node_modules/@remix-run/react/dist/esm/index.js +16 -0
  844. package/node_modules/@remix-run/react/dist/esm/invariant.js +17 -0
  845. package/node_modules/@remix-run/react/dist/esm/links.js +258 -0
  846. package/node_modules/@remix-run/react/dist/esm/markup.js +34 -0
  847. package/node_modules/@remix-run/react/dist/esm/routeModules.js +89 -0
  848. package/node_modules/@remix-run/react/dist/esm/routes.js +407 -0
  849. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +84 -0
  850. package/node_modules/@remix-run/react/dist/esm/server.js +84 -0
  851. package/node_modules/@remix-run/react/dist/fallback.d.ts +2 -0
  852. package/node_modules/@remix-run/react/dist/fallback.js +59 -0
  853. package/node_modules/@remix-run/react/dist/index.d.ts +14 -0
  854. package/node_modules/@remix-run/react/dist/index.js +224 -0
  855. package/node_modules/@remix-run/react/dist/invariant.d.ts +2 -0
  856. package/node_modules/@remix-run/react/dist/invariant.js +19 -0
  857. package/node_modules/@remix-run/react/dist/links.d.ts +128 -0
  858. package/node_modules/@remix-run/react/dist/links.js +268 -0
  859. package/node_modules/@remix-run/react/dist/markup.d.ts +5 -0
  860. package/node_modules/@remix-run/react/dist/markup.js +39 -0
  861. package/node_modules/@remix-run/react/dist/routeModules.d.ts +132 -0
  862. package/node_modules/@remix-run/react/dist/routeModules.js +111 -0
  863. package/node_modules/@remix-run/react/dist/routes.d.ts +32 -0
  864. package/node_modules/@remix-run/react/dist/routes.js +434 -0
  865. package/node_modules/@remix-run/react/dist/scroll-restoration.d.ts +12 -0
  866. package/node_modules/@remix-run/react/dist/scroll-restoration.js +108 -0
  867. package/node_modules/@remix-run/react/dist/server.d.ts +13 -0
  868. package/node_modules/@remix-run/react/dist/server.js +108 -0
  869. package/node_modules/@remix-run/react/dist/tsconfig.tsbuildinfo +1 -0
  870. package/node_modules/@remix-run/react/dist/warnings.d.ts +1 -0
  871. package/node_modules/@remix-run/react/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  872. package/node_modules/@remix-run/react/node_modules/@remix-run/router/LICENSE.md +23 -0
  873. package/node_modules/@remix-run/react/node_modules/@remix-run/router/README.md +135 -0
  874. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  875. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  876. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  877. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  878. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  879. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js +4327 -0
  880. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js.map +1 -0
  881. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  882. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  883. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  884. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  885. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  886. package/node_modules/@remix-run/react/node_modules/@remix-run/router/history.ts +746 -0
  887. package/node_modules/@remix-run/react/node_modules/@remix-run/router/index.ts +96 -0
  888. package/node_modules/@remix-run/react/node_modules/@remix-run/router/package.json +33 -0
  889. package/node_modules/@remix-run/react/node_modules/@remix-run/router/router.ts +4915 -0
  890. package/node_modules/@remix-run/react/node_modules/@remix-run/router/utils.ts +1598 -0
  891. package/node_modules/@remix-run/react/package.json +52 -0
  892. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +957 -0
  893. package/node_modules/@remix-run/server-runtime/LICENSE.md +22 -0
  894. package/node_modules/@remix-run/server-runtime/README.md +26 -0
  895. package/node_modules/@remix-run/server-runtime/dist/build.d.ts +38 -0
  896. package/node_modules/@remix-run/server-runtime/dist/cookies.d.ts +69 -0
  897. package/node_modules/@remix-run/server-runtime/dist/cookies.js +173 -0
  898. package/node_modules/@remix-run/server-runtime/dist/crypto.d.ts +2 -0
  899. package/node_modules/@remix-run/server-runtime/dist/data.d.ts +28 -0
  900. package/node_modules/@remix-run/server-runtime/dist/data.js +114 -0
  901. package/node_modules/@remix-run/server-runtime/dist/dev.d.ts +10 -0
  902. package/node_modules/@remix-run/server-runtime/dist/dev.js +53 -0
  903. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +30 -0
  904. package/node_modules/@remix-run/server-runtime/dist/entry.js +22 -0
  905. package/node_modules/@remix-run/server-runtime/dist/errors.d.ts +51 -0
  906. package/node_modules/@remix-run/server-runtime/dist/errors.js +122 -0
  907. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +168 -0
  908. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +109 -0
  909. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +46 -0
  910. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +18 -0
  911. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +115 -0
  912. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +55 -0
  913. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +90 -0
  914. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +20 -0
  915. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +18 -0
  916. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +29 -0
  917. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +24 -0
  918. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +123 -0
  919. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +23 -0
  920. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +77 -0
  921. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +343 -0
  922. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +20 -0
  923. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +51 -0
  924. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +61 -0
  925. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +145 -0
  926. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +19 -0
  927. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +50 -0
  928. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +19 -0
  929. package/node_modules/@remix-run/server-runtime/dist/formData.d.ts +15 -0
  930. package/node_modules/@remix-run/server-runtime/dist/formData.js +60 -0
  931. package/node_modules/@remix-run/server-runtime/dist/headers.d.ts +3 -0
  932. package/node_modules/@remix-run/server-runtime/dist/headers.js +94 -0
  933. package/node_modules/@remix-run/server-runtime/dist/index.d.ts +12 -0
  934. package/node_modules/@remix-run/server-runtime/dist/index.js +46 -0
  935. package/node_modules/@remix-run/server-runtime/dist/interface.d.ts +6 -0
  936. package/node_modules/@remix-run/server-runtime/dist/invariant.d.ts +2 -0
  937. package/node_modules/@remix-run/server-runtime/dist/invariant.js +22 -0
  938. package/node_modules/@remix-run/server-runtime/dist/jsonify.d.ts +33 -0
  939. package/node_modules/@remix-run/server-runtime/dist/links.d.ts +104 -0
  940. package/node_modules/@remix-run/server-runtime/dist/markup.d.ts +1 -0
  941. package/node_modules/@remix-run/server-runtime/dist/markup.js +33 -0
  942. package/node_modules/@remix-run/server-runtime/dist/mode.d.ts +9 -0
  943. package/node_modules/@remix-run/server-runtime/dist/mode.js +29 -0
  944. package/node_modules/@remix-run/server-runtime/dist/reexport.d.ts +14 -0
  945. package/node_modules/@remix-run/server-runtime/dist/responses.d.ts +47 -0
  946. package/node_modules/@remix-run/server-runtime/dist/responses.js +135 -0
  947. package/node_modules/@remix-run/server-runtime/dist/routeMatching.d.ts +8 -0
  948. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +27 -0
  949. package/node_modules/@remix-run/server-runtime/dist/routeModules.d.ts +211 -0
  950. package/node_modules/@remix-run/server-runtime/dist/routes.d.ts +31 -0
  951. package/node_modules/@remix-run/server-runtime/dist/routes.js +82 -0
  952. package/node_modules/@remix-run/server-runtime/dist/serialize.d.ts +25 -0
  953. package/node_modules/@remix-run/server-runtime/dist/server.d.ts +5 -0
  954. package/node_modules/@remix-run/server-runtime/dist/server.js +347 -0
  955. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.d.ts +12 -0
  956. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +24 -0
  957. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.d.ts +23 -0
  958. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +55 -0
  959. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.d.ts +20 -0
  960. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +65 -0
  961. package/node_modules/@remix-run/server-runtime/dist/sessions.d.ts +143 -0
  962. package/node_modules/@remix-run/server-runtime/dist/sessions.js +152 -0
  963. package/node_modules/@remix-run/server-runtime/dist/tsconfig.tsbuildinfo +1 -0
  964. package/node_modules/@remix-run/server-runtime/dist/typecheck.d.ts +4 -0
  965. package/node_modules/@remix-run/server-runtime/dist/upload/errors.d.ts +5 -0
  966. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +23 -0
  967. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.d.ts +21 -0
  968. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +54 -0
  969. package/node_modules/@remix-run/server-runtime/dist/warnings.d.ts +1 -0
  970. package/node_modules/@remix-run/server-runtime/dist/warnings.js +23 -0
  971. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  972. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/LICENSE.md +23 -0
  973. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/README.md +135 -0
  974. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  975. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  976. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  977. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  978. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  979. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js +4327 -0
  980. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js.map +1 -0
  981. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  982. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  983. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  984. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  985. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  986. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/history.ts +746 -0
  987. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/index.ts +96 -0
  988. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/package.json +33 -0
  989. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/router.ts +4915 -0
  990. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/utils.ts +1598 -0
  991. package/node_modules/@remix-run/server-runtime/package.json +47 -0
  992. package/node_modules/@types/cookie/LICENSE +21 -0
  993. package/node_modules/@types/cookie/README.md +15 -0
  994. package/node_modules/@types/cookie/index.d.ts +154 -0
  995. package/node_modules/@types/cookie/package.json +30 -0
  996. package/node_modules/@web3-storage/multipart-parser/README.md +37 -0
  997. package/node_modules/@web3-storage/multipart-parser/cjs/src/index.js +218 -0
  998. package/node_modules/@web3-storage/multipart-parser/cjs/src/search.js +269 -0
  999. package/node_modules/@web3-storage/multipart-parser/cjs/src/utils.js +37 -0
  1000. package/node_modules/@web3-storage/multipart-parser/esm/package.json +4 -0
  1001. package/node_modules/@web3-storage/multipart-parser/esm/src/index.js +219 -0
  1002. package/node_modules/@web3-storage/multipart-parser/esm/src/search.js +269 -0
  1003. package/node_modules/@web3-storage/multipart-parser/esm/src/utils.js +28 -0
  1004. package/node_modules/@web3-storage/multipart-parser/index.js +1 -0
  1005. package/node_modules/@web3-storage/multipart-parser/package.json +44 -0
  1006. package/node_modules/@web3-storage/multipart-parser/src/index.js +257 -0
  1007. package/node_modules/@web3-storage/multipart-parser/src/search.js +329 -0
  1008. package/node_modules/@web3-storage/multipart-parser/src/utils.js +43 -0
  1009. package/node_modules/@web3-storage/multipart-parser/test/test.spec.js +65 -0
  1010. package/node_modules/@web3-storage/multipart-parser/tsconfig.json +41 -0
  1011. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts +15 -0
  1012. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts.map +1 -0
  1013. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts +36 -0
  1014. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts.map +1 -0
  1015. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts +18 -0
  1016. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts.map +1 -0
  1017. package/node_modules/aria-hidden/LICENSE +21 -0
  1018. package/node_modules/aria-hidden/README.md +99 -0
  1019. package/node_modules/aria-hidden/dist/es2015/index.d.ts +29 -0
  1020. package/node_modules/aria-hidden/dist/es2015/index.js +166 -0
  1021. package/node_modules/aria-hidden/dist/es2019/index.d.ts +29 -0
  1022. package/node_modules/aria-hidden/dist/es2019/index.js +155 -0
  1023. package/node_modules/aria-hidden/dist/es5/index.d.ts +29 -0
  1024. package/node_modules/aria-hidden/dist/es5/index.js +173 -0
  1025. package/node_modules/aria-hidden/package.json +70 -0
  1026. package/node_modules/assertion-error/LICENSE +21 -0
  1027. package/node_modules/assertion-error/README.md +68 -0
  1028. package/node_modules/assertion-error/index.d.ts +27 -0
  1029. package/node_modules/assertion-error/index.js +60 -0
  1030. package/node_modules/assertion-error/package.json +32 -0
  1031. package/node_modules/chai/CODEOWNERS +1 -0
  1032. package/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
  1033. package/node_modules/chai/CONTRIBUTING.md +218 -0
  1034. package/node_modules/chai/History.md +1059 -0
  1035. package/node_modules/chai/LICENSE +21 -0
  1036. package/node_modules/chai/README.md +154 -0
  1037. package/node_modules/chai/ReleaseNotes.md +737 -0
  1038. package/node_modules/chai/chai.js +3992 -0
  1039. package/node_modules/chai/index.js +1 -0
  1040. package/node_modules/chai/lib/chai/assertion.js +164 -0
  1041. package/node_modules/chai/lib/chai/config.js +120 -0
  1042. package/node_modules/chai/lib/chai/core/assertions.js +3937 -0
  1043. package/node_modules/chai/lib/chai/interface/assert.js +3003 -0
  1044. package/node_modules/chai/lib/chai/interface/expect.js +50 -0
  1045. package/node_modules/chai/lib/chai/interface/should.js +211 -0
  1046. package/node_modules/chai/lib/chai/utils/addChainableMethod.js +148 -0
  1047. package/node_modules/chai/lib/chai/utils/addLengthGuard.js +60 -0
  1048. package/node_modules/chai/lib/chai/utils/addMethod.js +68 -0
  1049. package/node_modules/chai/lib/chai/utils/addProperty.js +72 -0
  1050. package/node_modules/chai/lib/chai/utils/compareByInspect.js +27 -0
  1051. package/node_modules/chai/lib/chai/utils/expectTypes.js +51 -0
  1052. package/node_modules/chai/lib/chai/utils/flag.js +33 -0
  1053. package/node_modules/chai/lib/chai/utils/getActual.js +20 -0
  1054. package/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
  1055. package/node_modules/chai/lib/chai/utils/getMessage.js +46 -0
  1056. package/node_modules/chai/lib/chai/utils/getOperator.js +54 -0
  1057. package/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +25 -0
  1058. package/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +27 -0
  1059. package/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
  1060. package/node_modules/chai/lib/chai/utils/index.js +91 -0
  1061. package/node_modules/chai/lib/chai/utils/inspect.js +30 -0
  1062. package/node_modules/chai/lib/chai/utils/isNaN.js +26 -0
  1063. package/node_modules/chai/lib/chai/utils/isProxyEnabled.js +24 -0
  1064. package/node_modules/chai/lib/chai/utils/objDisplay.js +47 -0
  1065. package/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
  1066. package/node_modules/chai/lib/chai/utils/overwriteMethod.js +92 -0
  1067. package/node_modules/chai/lib/chai/utils/overwriteProperty.js +92 -0
  1068. package/node_modules/chai/lib/chai/utils/proxify.js +147 -0
  1069. package/node_modules/chai/lib/chai/utils/test.js +24 -0
  1070. package/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
  1071. package/node_modules/chai/lib/chai/utils/type-detect.js +16 -0
  1072. package/node_modules/chai/lib/chai.js +65 -0
  1073. package/node_modules/chai/package.json +58 -0
  1074. package/node_modules/chai/register-assert.cjs +3 -0
  1075. package/node_modules/chai/register-assert.js +3 -0
  1076. package/node_modules/chai/register-expect.cjs +3 -0
  1077. package/node_modules/chai/register-expect.js +3 -0
  1078. package/node_modules/chai/register-should.cjs +3 -0
  1079. package/node_modules/chai/register-should.js +3 -0
  1080. package/node_modules/chai/web-test-runner.config.js +17 -0
  1081. package/node_modules/chai-dom/.eslintrc +22 -0
  1082. package/node_modules/chai-dom/.travis.yml +15 -0
  1083. package/node_modules/chai-dom/LICENSE +24 -0
  1084. package/node_modules/chai-dom/README.md +267 -0
  1085. package/node_modules/chai-dom/bower.json +31 -0
  1086. package/node_modules/chai-dom/chai-dom.js +429 -0
  1087. package/node_modules/chai-dom/package.json +44 -0
  1088. package/node_modules/chai-dom/test/.eslintrc +12 -0
  1089. package/node_modules/chai-dom/test/index.html +27 -0
  1090. package/node_modules/chai-dom/test/tests.js +1124 -0
  1091. package/node_modules/chai-dom/testem.js +31 -0
  1092. package/node_modules/check-error/LICENSE +19 -0
  1093. package/node_modules/check-error/README.md +204 -0
  1094. package/node_modules/check-error/index.js +125 -0
  1095. package/node_modules/check-error/package.json +79 -0
  1096. package/node_modules/clsx/clsx.d.mts +6 -0
  1097. package/node_modules/clsx/clsx.d.ts +10 -0
  1098. package/node_modules/clsx/dist/clsx.js +1 -0
  1099. package/node_modules/clsx/dist/clsx.min.js +1 -0
  1100. package/node_modules/clsx/dist/clsx.mjs +1 -0
  1101. package/node_modules/clsx/dist/lite.js +1 -0
  1102. package/node_modules/clsx/dist/lite.mjs +1 -0
  1103. package/node_modules/clsx/license +9 -0
  1104. package/node_modules/clsx/package.json +60 -0
  1105. package/node_modules/clsx/readme.md +154 -0
  1106. package/node_modules/cookie/HISTORY.md +147 -0
  1107. package/node_modules/cookie/LICENSE +24 -0
  1108. package/node_modules/cookie/README.md +317 -0
  1109. package/node_modules/cookie/SECURITY.md +25 -0
  1110. package/node_modules/cookie/index.js +274 -0
  1111. package/node_modules/cookie/package.json +44 -0
  1112. package/node_modules/deep-eql/LICENSE +19 -0
  1113. package/node_modules/deep-eql/README.md +93 -0
  1114. package/node_modules/deep-eql/index.js +508 -0
  1115. package/node_modules/deep-eql/package.json +73 -0
  1116. package/node_modules/detect-node-es/LICENSE +21 -0
  1117. package/node_modules/detect-node-es/Readme.md +39 -0
  1118. package/node_modules/detect-node-es/es5/browser.js +2 -0
  1119. package/node_modules/detect-node-es/es5/node.d.ts +4 -0
  1120. package/node_modules/detect-node-es/es5/node.js +2 -0
  1121. package/node_modules/detect-node-es/esm/browser.js +2 -0
  1122. package/node_modules/detect-node-es/esm/node.js +2 -0
  1123. package/node_modules/detect-node-es/package.json +29 -0
  1124. package/node_modules/framer-motion/LICENSE.md +21 -0
  1125. package/node_modules/framer-motion/README.md +105 -0
  1126. package/node_modules/framer-motion/dist/cjs/dom-entry.js +53 -0
  1127. package/node_modules/framer-motion/dist/cjs/index-legacy-94465f57.js +5926 -0
  1128. package/node_modules/framer-motion/dist/cjs/index.js +6391 -0
  1129. package/node_modules/framer-motion/dist/dom-entry.d.ts +951 -0
  1130. package/node_modules/framer-motion/dist/dom.js +1 -0
  1131. package/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +81 -0
  1132. package/node_modules/framer-motion/dist/es/animation/animate.mjs +83 -0
  1133. package/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +295 -0
  1134. package/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +84 -0
  1135. package/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +378 -0
  1136. package/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
  1137. package/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +33 -0
  1138. package/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs +31 -0
  1139. package/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs +23 -0
  1140. package/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +12 -0
  1141. package/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs +87 -0
  1142. package/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs +51 -0
  1143. package/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs +89 -0
  1144. package/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs +131 -0
  1145. package/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +17 -0
  1146. package/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
  1147. package/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs +80 -0
  1148. package/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs +17 -0
  1149. package/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +62 -0
  1150. package/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs +41 -0
  1151. package/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +109 -0
  1152. package/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs +11 -0
  1153. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +80 -0
  1154. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +66 -0
  1155. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs +29 -0
  1156. package/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +6 -0
  1157. package/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +62 -0
  1158. package/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs +80 -0
  1159. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +3 -0
  1160. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs +3 -0
  1161. package/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +227 -0
  1162. package/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +21 -0
  1163. package/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +31 -0
  1164. package/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +14 -0
  1165. package/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +32 -0
  1166. package/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs +40 -0
  1167. package/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs +30 -0
  1168. package/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +7 -0
  1169. package/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +5 -0
  1170. package/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +5 -0
  1171. package/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs +15 -0
  1172. package/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs +26 -0
  1173. package/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs +13 -0
  1174. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +75 -0
  1175. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +56 -0
  1176. package/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs +169 -0
  1177. package/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +66 -0
  1178. package/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs +14 -0
  1179. package/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs +31 -0
  1180. package/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs +67 -0
  1181. package/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs +43 -0
  1182. package/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs +53 -0
  1183. package/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs +33 -0
  1184. package/node_modules/framer-motion/dist/es/components/Reorder/index.mjs +9 -0
  1185. package/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +24 -0
  1186. package/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +10 -0
  1187. package/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs +5 -0
  1188. package/node_modules/framer-motion/dist/es/context/LazyContext.mjs +5 -0
  1189. package/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs +12 -0
  1190. package/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs +13 -0
  1191. package/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs +5 -0
  1192. package/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs +17 -0
  1193. package/node_modules/framer-motion/dist/es/context/PresenceContext.mjs +8 -0
  1194. package/node_modules/framer-motion/dist/es/context/ReorderContext.mjs +5 -0
  1195. package/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +8 -0
  1196. package/node_modules/framer-motion/dist/es/debug/record.mjs +7 -0
  1197. package/node_modules/framer-motion/dist/es/dom-entry.mjs +25 -0
  1198. package/node_modules/framer-motion/dist/es/easing/anticipate.mjs +5 -0
  1199. package/node_modules/framer-motion/dist/es/easing/back.mjs +9 -0
  1200. package/node_modules/framer-motion/dist/es/easing/circ.mjs +8 -0
  1201. package/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs +51 -0
  1202. package/node_modules/framer-motion/dist/es/easing/ease.mjs +7 -0
  1203. package/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs +5 -0
  1204. package/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs +5 -0
  1205. package/node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +18 -0
  1206. package/node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
  1207. package/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +3 -0
  1208. package/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs +5 -0
  1209. package/node_modules/framer-motion/dist/es/easing/utils/map.mjs +37 -0
  1210. package/node_modules/framer-motion/dist/es/events/add-dom-event.mjs +6 -0
  1211. package/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs +8 -0
  1212. package/node_modules/framer-motion/dist/es/events/event-info.mjs +15 -0
  1213. package/node_modules/framer-motion/dist/es/events/use-dom-event.mjs +34 -0
  1214. package/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs +18 -0
  1215. package/node_modules/framer-motion/dist/es/frameloop/batcher.mjs +65 -0
  1216. package/node_modules/framer-motion/dist/es/frameloop/frame.mjs +6 -0
  1217. package/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs +20 -0
  1218. package/node_modules/framer-motion/dist/es/frameloop/microtask.mjs +5 -0
  1219. package/node_modules/framer-motion/dist/es/frameloop/render-step.mjs +104 -0
  1220. package/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs +31 -0
  1221. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +478 -0
  1222. package/node_modules/framer-motion/dist/es/gestures/drag/index.mjs +27 -0
  1223. package/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +88 -0
  1224. package/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +129 -0
  1225. package/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs +53 -0
  1226. package/node_modules/framer-motion/dist/es/gestures/focus.mjs +41 -0
  1227. package/node_modules/framer-motion/dist/es/gestures/hover.mjs +31 -0
  1228. package/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs +156 -0
  1229. package/node_modules/framer-motion/dist/es/gestures/pan/index.mjs +48 -0
  1230. package/node_modules/framer-motion/dist/es/gestures/press.mjs +116 -0
  1231. package/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs +20 -0
  1232. package/node_modules/framer-motion/dist/es/index.mjs +101 -0
  1233. package/node_modules/framer-motion/dist/es/motion/features/Feature.mjs +9 -0
  1234. package/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs +31 -0
  1235. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +38 -0
  1236. package/node_modules/framer-motion/dist/es/motion/features/animations.mjs +13 -0
  1237. package/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +28 -0
  1238. package/node_modules/framer-motion/dist/es/motion/features/drag.mjs +17 -0
  1239. package/node_modules/framer-motion/dist/es/motion/features/gestures.mjs +21 -0
  1240. package/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +132 -0
  1241. package/node_modules/framer-motion/dist/es/motion/features/layout.mjs +11 -0
  1242. package/node_modules/framer-motion/dist/es/motion/features/load-features.mjs +12 -0
  1243. package/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs +72 -0
  1244. package/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs +49 -0
  1245. package/node_modules/framer-motion/dist/es/motion/index.mjs +79 -0
  1246. package/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +11 -0
  1247. package/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs +12 -0
  1248. package/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs +3 -0
  1249. package/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +17 -0
  1250. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +33 -0
  1251. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +75 -0
  1252. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs +81 -0
  1253. package/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs +57 -0
  1254. package/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs +93 -0
  1255. package/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs +33 -0
  1256. package/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs +20 -0
  1257. package/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs +122 -0
  1258. package/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs +41 -0
  1259. package/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs +54 -0
  1260. package/node_modules/framer-motion/dist/es/projection/geometry/models.mjs +17 -0
  1261. package/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs +25 -0
  1262. package/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +13 -0
  1263. package/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +27 -0
  1264. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +1519 -0
  1265. package/node_modules/framer-motion/dist/es/projection/node/group.mjs +24 -0
  1266. package/node_modules/framer-motion/dist/es/projection/node/state.mjs +19 -0
  1267. package/node_modules/framer-motion/dist/es/projection/shared/stack.mjs +112 -0
  1268. package/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +41 -0
  1269. package/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +35 -0
  1270. package/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs +6 -0
  1271. package/node_modules/framer-motion/dist/es/projection/styles/transform.mjs +49 -0
  1272. package/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +14 -0
  1273. package/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs +14 -0
  1274. package/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs +5 -0
  1275. package/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs +26 -0
  1276. package/node_modules/framer-motion/dist/es/projection/utils/measure.mjs +17 -0
  1277. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +534 -0
  1278. package/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +121 -0
  1279. package/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +26 -0
  1280. package/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs +15 -0
  1281. package/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs +14 -0
  1282. package/node_modules/framer-motion/dist/es/render/dom/features-max.mjs +14 -0
  1283. package/node_modules/framer-motion/dist/es/render/dom/motion-minimal.mjs +9 -0
  1284. package/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs +47 -0
  1285. package/node_modules/framer-motion/dist/es/render/dom/motion.mjs +42 -0
  1286. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs +64 -0
  1287. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs +30 -0
  1288. package/node_modules/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
  1289. package/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +36 -0
  1290. package/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +56 -0
  1291. package/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs +18 -0
  1292. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +45 -0
  1293. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +59 -0
  1294. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +45 -0
  1295. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +35 -0
  1296. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +20 -0
  1297. package/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +48 -0
  1298. package/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
  1299. package/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +84 -0
  1300. package/node_modules/framer-motion/dist/es/render/dom/use-render.mjs +33 -0
  1301. package/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +6 -0
  1302. package/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs +19 -0
  1303. package/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +42 -0
  1304. package/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs +57 -0
  1305. package/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +13 -0
  1306. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +30 -0
  1307. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +5 -0
  1308. package/node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +28 -0
  1309. package/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +65 -0
  1310. package/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +15 -0
  1311. package/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs +30 -0
  1312. package/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +15 -0
  1313. package/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs +15 -0
  1314. package/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +10 -0
  1315. package/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs +74 -0
  1316. package/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs +6 -0
  1317. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +9 -0
  1318. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
  1319. package/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +43 -0
  1320. package/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +59 -0
  1321. package/node_modules/framer-motion/dist/es/render/html/config-motion.mjs +12 -0
  1322. package/node_modules/framer-motion/dist/es/render/html/use-props.mjs +57 -0
  1323. package/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs +74 -0
  1324. package/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs +45 -0
  1325. package/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs +8 -0
  1326. package/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +27 -0
  1327. package/node_modules/framer-motion/dist/es/render/html/utils/render.mjs +9 -0
  1328. package/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +19 -0
  1329. package/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs +28 -0
  1330. package/node_modules/framer-motion/dist/es/render/store.mjs +3 -0
  1331. package/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +47 -0
  1332. package/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs +40 -0
  1333. package/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs +33 -0
  1334. package/node_modules/framer-motion/dist/es/render/svg/use-props.mjs +24 -0
  1335. package/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +52 -0
  1336. package/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +30 -0
  1337. package/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +8 -0
  1338. package/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +3 -0
  1339. package/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs +32 -0
  1340. package/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs +12 -0
  1341. package/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +18 -0
  1342. package/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +18 -0
  1343. package/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +157 -0
  1344. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +320 -0
  1345. package/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs +3 -0
  1346. package/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs +24 -0
  1347. package/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
  1348. package/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs +8 -0
  1349. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +67 -0
  1350. package/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +24 -0
  1351. package/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs +26 -0
  1352. package/node_modules/framer-motion/dist/es/render/utils/setters.mjs +27 -0
  1353. package/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs +12 -0
  1354. package/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs +6 -0
  1355. package/node_modules/framer-motion/dist/es/utils/array.mjs +21 -0
  1356. package/node_modules/framer-motion/dist/es/utils/clamp.mjs +9 -0
  1357. package/node_modules/framer-motion/dist/es/utils/delay.mjs +20 -0
  1358. package/node_modules/framer-motion/dist/es/utils/distance.mjs +9 -0
  1359. package/node_modules/framer-motion/dist/es/utils/errors.mjs +18 -0
  1360. package/node_modules/framer-motion/dist/es/utils/get-context-window.mjs +6 -0
  1361. package/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs +42 -0
  1362. package/node_modules/framer-motion/dist/es/utils/interpolate.mjs +75 -0
  1363. package/node_modules/framer-motion/dist/es/utils/is-browser.mjs +3 -0
  1364. package/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs +6 -0
  1365. package/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs +7 -0
  1366. package/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs +6 -0
  1367. package/node_modules/framer-motion/dist/es/utils/memo.mjs +10 -0
  1368. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +41 -0
  1369. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +89 -0
  1370. package/node_modules/framer-motion/dist/es/utils/mix/index.mjs +14 -0
  1371. package/node_modules/framer-motion/dist/es/utils/mix/number.mjs +26 -0
  1372. package/node_modules/framer-motion/dist/es/utils/noop.mjs +3 -0
  1373. package/node_modules/framer-motion/dist/es/utils/offsets/default.mjs +9 -0
  1374. package/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
  1375. package/node_modules/framer-motion/dist/es/utils/offsets/time.mjs +5 -0
  1376. package/node_modules/framer-motion/dist/es/utils/pipe.mjs +11 -0
  1377. package/node_modules/framer-motion/dist/es/utils/progress.mjs +18 -0
  1378. package/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs +19 -0
  1379. package/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs +5 -0
  1380. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +19 -0
  1381. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +47 -0
  1382. package/node_modules/framer-motion/dist/es/utils/resolve-value.mjs +11 -0
  1383. package/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs +14 -0
  1384. package/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs +40 -0
  1385. package/node_modules/framer-motion/dist/es/utils/time-conversion.mjs +10 -0
  1386. package/node_modules/framer-motion/dist/es/utils/transform.mjs +21 -0
  1387. package/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs +21 -0
  1388. package/node_modules/framer-motion/dist/es/utils/use-constant.mjs +18 -0
  1389. package/node_modules/framer-motion/dist/es/utils/use-cycle.mjs +47 -0
  1390. package/node_modules/framer-motion/dist/es/utils/use-force-update.mjs +19 -0
  1391. package/node_modules/framer-motion/dist/es/utils/use-in-view.mjs +23 -0
  1392. package/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs +5 -0
  1393. package/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs +41 -0
  1394. package/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs +15 -0
  1395. package/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +6 -0
  1396. package/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs +13 -0
  1397. package/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs +7 -0
  1398. package/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs +11 -0
  1399. package/node_modules/framer-motion/dist/es/utils/warn-once.mjs +11 -0
  1400. package/node_modules/framer-motion/dist/es/utils/wrap.mjs +6 -0
  1401. package/node_modules/framer-motion/dist/es/value/index.mjs +317 -0
  1402. package/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +14 -0
  1403. package/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +14 -0
  1404. package/node_modules/framer-motion/dist/es/value/types/color/hex.mjs +40 -0
  1405. package/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs +22 -0
  1406. package/node_modules/framer-motion/dist/es/value/types/color/index.mjs +28 -0
  1407. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +25 -0
  1408. package/node_modules/framer-motion/dist/es/value/types/color/utils.mjs +23 -0
  1409. package/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs +30 -0
  1410. package/node_modules/framer-motion/dist/es/value/types/complex/index.mjs +90 -0
  1411. package/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs +17 -0
  1412. package/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs +19 -0
  1413. package/node_modules/framer-motion/dist/es/value/types/utils.mjs +15 -0
  1414. package/node_modules/framer-motion/dist/es/value/use-combine-values.mjs +37 -0
  1415. package/node_modules/framer-motion/dist/es/value/use-computed.mjs +19 -0
  1416. package/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs +52 -0
  1417. package/node_modules/framer-motion/dist/es/value/use-motion-template.mjs +45 -0
  1418. package/node_modules/framer-motion/dist/es/value/use-motion-value.mjs +38 -0
  1419. package/node_modules/framer-motion/dist/es/value/use-scroll.mjs +39 -0
  1420. package/node_modules/framer-motion/dist/es/value/use-spring.mjs +73 -0
  1421. package/node_modules/framer-motion/dist/es/value/use-time.mjs +10 -0
  1422. package/node_modules/framer-motion/dist/es/value/use-transform.mjs +29 -0
  1423. package/node_modules/framer-motion/dist/es/value/use-velocity.mjs +35 -0
  1424. package/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs +50 -0
  1425. package/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
  1426. package/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs +3 -0
  1427. package/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +16 -0
  1428. package/node_modules/framer-motion/dist/framer-motion.dev.js +12195 -0
  1429. package/node_modules/framer-motion/dist/framer-motion.js +1 -0
  1430. package/node_modules/framer-motion/dist/index.d.ts +5242 -0
  1431. package/node_modules/framer-motion/dist/projection.dev.js +6433 -0
  1432. package/node_modules/framer-motion/dist/three-entry.d.ts +2977 -0
  1433. package/node_modules/framer-motion/dom/README.md +1 -0
  1434. package/node_modules/framer-motion/dom/package.json +6 -0
  1435. package/node_modules/framer-motion/package.json +122 -0
  1436. package/node_modules/get-func-name/LICENSE +19 -0
  1437. package/node_modules/get-func-name/README.md +123 -0
  1438. package/node_modules/get-func-name/get-func-name.js +1 -0
  1439. package/node_modules/get-func-name/index.js +52 -0
  1440. package/node_modules/get-func-name/package.json +85 -0
  1441. package/node_modules/get-nonce/LICENSE +21 -0
  1442. package/node_modules/get-nonce/README.md +54 -0
  1443. package/node_modules/get-nonce/dist/es2015/index.d.ts +2 -0
  1444. package/node_modules/get-nonce/dist/es2015/index.js +13 -0
  1445. package/node_modules/get-nonce/dist/es5/index.d.ts +2 -0
  1446. package/node_modules/get-nonce/dist/es5/index.js +15 -0
  1447. package/node_modules/get-nonce/package.json +68 -0
  1448. package/node_modules/invariant/LICENSE +21 -0
  1449. package/node_modules/invariant/README.md +37 -0
  1450. package/node_modules/invariant/browser.js +49 -0
  1451. package/node_modules/invariant/invariant.js +51 -0
  1452. package/node_modules/invariant/invariant.js.flow +7 -0
  1453. package/node_modules/invariant/package.json +35 -0
  1454. package/node_modules/js-tokens/LICENSE +21 -0
  1455. package/node_modules/js-tokens/README.md +240 -0
  1456. package/node_modules/js-tokens/index.js +23 -0
  1457. package/node_modules/js-tokens/package.json +30 -0
  1458. package/node_modules/loose-envify/LICENSE +21 -0
  1459. package/node_modules/loose-envify/README.md +45 -0
  1460. package/node_modules/loose-envify/cli.js +16 -0
  1461. package/node_modules/loose-envify/custom.js +4 -0
  1462. package/node_modules/loose-envify/index.js +3 -0
  1463. package/node_modules/loose-envify/loose-envify.js +36 -0
  1464. package/node_modules/loose-envify/package.json +36 -0
  1465. package/node_modules/loose-envify/replace.js +65 -0
  1466. package/node_modules/loupe/LICENSE +9 -0
  1467. package/node_modules/loupe/README.md +63 -0
  1468. package/node_modules/loupe/lib/arguments.d.ts +3 -0
  1469. package/node_modules/loupe/lib/arguments.d.ts.map +1 -0
  1470. package/node_modules/loupe/lib/arguments.js +7 -0
  1471. package/node_modules/loupe/lib/array.d.ts +3 -0
  1472. package/node_modules/loupe/lib/array.d.ts.map +1 -0
  1473. package/node_modules/loupe/lib/array.js +16 -0
  1474. package/node_modules/loupe/lib/bigint.d.ts +3 -0
  1475. package/node_modules/loupe/lib/bigint.d.ts.map +1 -0
  1476. package/node_modules/loupe/lib/bigint.js +7 -0
  1477. package/node_modules/loupe/lib/class.d.ts +5 -0
  1478. package/node_modules/loupe/lib/class.d.ts.map +1 -0
  1479. package/node_modules/loupe/lib/class.js +15 -0
  1480. package/node_modules/loupe/lib/date.d.ts +3 -0
  1481. package/node_modules/loupe/lib/date.d.ts.map +1 -0
  1482. package/node_modules/loupe/lib/date.js +11 -0
  1483. package/node_modules/loupe/lib/error.d.ts +3 -0
  1484. package/node_modules/loupe/lib/error.d.ts.map +1 -0
  1485. package/node_modules/loupe/lib/error.js +29 -0
  1486. package/node_modules/loupe/lib/function.d.ts +7 -0
  1487. package/node_modules/loupe/lib/function.d.ts.map +1 -0
  1488. package/node_modules/loupe/lib/function.js +9 -0
  1489. package/node_modules/loupe/lib/helpers.d.ts +7 -0
  1490. package/node_modules/loupe/lib/helpers.d.ts.map +1 -0
  1491. package/node_modules/loupe/lib/helpers.js +152 -0
  1492. package/node_modules/loupe/lib/html.d.ts +5 -0
  1493. package/node_modules/loupe/lib/html.d.ts.map +1 -0
  1494. package/node_modules/loupe/lib/html.js +34 -0
  1495. package/node_modules/loupe/lib/index.d.ts +7 -0
  1496. package/node_modules/loupe/lib/index.d.ts.map +1 -0
  1497. package/node_modules/loupe/lib/index.js +161 -0
  1498. package/node_modules/loupe/lib/map.d.ts +3 -0
  1499. package/node_modules/loupe/lib/map.d.ts.map +1 -0
  1500. package/node_modules/loupe/lib/map.js +24 -0
  1501. package/node_modules/loupe/lib/number.d.ts +3 -0
  1502. package/node_modules/loupe/lib/number.d.ts.map +1 -0
  1503. package/node_modules/loupe/lib/number.js +17 -0
  1504. package/node_modules/loupe/lib/object.d.ts +3 -0
  1505. package/node_modules/loupe/lib/object.d.ts.map +1 -0
  1506. package/node_modules/loupe/lib/object.js +22 -0
  1507. package/node_modules/loupe/lib/promise.d.ts +5 -0
  1508. package/node_modules/loupe/lib/promise.d.ts.map +1 -0
  1509. package/node_modules/loupe/lib/promise.js +18 -0
  1510. package/node_modules/loupe/lib/regexp.d.ts +3 -0
  1511. package/node_modules/loupe/lib/regexp.d.ts.map +1 -0
  1512. package/node_modules/loupe/lib/regexp.js +7 -0
  1513. package/node_modules/loupe/lib/set.d.ts +3 -0
  1514. package/node_modules/loupe/lib/set.d.ts.map +1 -0
  1515. package/node_modules/loupe/lib/set.js +15 -0
  1516. package/node_modules/loupe/lib/string.d.ts +3 -0
  1517. package/node_modules/loupe/lib/string.d.ts.map +1 -0
  1518. package/node_modules/loupe/lib/string.js +24 -0
  1519. package/node_modules/loupe/lib/symbol.d.ts +2 -0
  1520. package/node_modules/loupe/lib/symbol.d.ts.map +1 -0
  1521. package/node_modules/loupe/lib/symbol.js +6 -0
  1522. package/node_modules/loupe/lib/typedarray.d.ts +5 -0
  1523. package/node_modules/loupe/lib/typedarray.d.ts.map +1 -0
  1524. package/node_modules/loupe/lib/typedarray.js +38 -0
  1525. package/node_modules/loupe/lib/types.d.ts +15 -0
  1526. package/node_modules/loupe/lib/types.d.ts.map +1 -0
  1527. package/node_modules/loupe/lib/types.js +1 -0
  1528. package/node_modules/loupe/loupe.js +637 -0
  1529. package/node_modules/loupe/package.json +126 -0
  1530. package/node_modules/pathval/LICENSE +16 -0
  1531. package/node_modules/pathval/README.md +147 -0
  1532. package/node_modules/pathval/index.js +292 -0
  1533. package/node_modules/pathval/package.json +73 -0
  1534. package/node_modules/pathval/pathval.js +1 -0
  1535. package/node_modules/react-remove-scroll/LICENSE +21 -0
  1536. package/node_modules/react-remove-scroll/README.md +152 -0
  1537. package/node_modules/react-remove-scroll/UI/UI.d.ts +1 -0
  1538. package/node_modules/react-remove-scroll/UI/package.json +8 -0
  1539. package/node_modules/react-remove-scroll/dist/es2015/Combination.d.ts +3 -0
  1540. package/node_modules/react-remove-scroll/dist/es2015/Combination.js +7 -0
  1541. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.d.ts +5 -0
  1542. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
  1543. package/node_modules/react-remove-scroll/dist/es2015/UI.d.ts +7 -0
  1544. package/node_modules/react-remove-scroll/dist/es2015/UI.js +36 -0
  1545. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.d.ts +3 -0
  1546. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +19 -0
  1547. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.d.ts +3 -0
  1548. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +96 -0
  1549. package/node_modules/react-remove-scroll/dist/es2015/index.d.ts +2 -0
  1550. package/node_modules/react-remove-scroll/dist/es2015/index.js +2 -0
  1551. package/node_modules/react-remove-scroll/dist/es2015/medium.d.ts +2 -0
  1552. package/node_modules/react-remove-scroll/dist/es2015/medium.js +2 -0
  1553. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.d.ts +8 -0
  1554. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.js +33 -0
  1555. package/node_modules/react-remove-scroll/dist/es2015/sidecar.d.ts +2 -0
  1556. package/node_modules/react-remove-scroll/dist/es2015/sidecar.js +4 -0
  1557. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +90 -0
  1558. package/node_modules/react-remove-scroll/dist/es2015/types.js +1 -0
  1559. package/node_modules/react-remove-scroll/dist/es2019/Combination.d.ts +3 -0
  1560. package/node_modules/react-remove-scroll/dist/es2019/Combination.js +6 -0
  1561. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.d.ts +5 -0
  1562. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +144 -0
  1563. package/node_modules/react-remove-scroll/dist/es2019/UI.d.ts +7 -0
  1564. package/node_modules/react-remove-scroll/dist/es2019/UI.js +41 -0
  1565. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.d.ts +3 -0
  1566. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js +19 -0
  1567. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.d.ts +3 -0
  1568. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +84 -0
  1569. package/node_modules/react-remove-scroll/dist/es2019/index.d.ts +2 -0
  1570. package/node_modules/react-remove-scroll/dist/es2019/index.js +2 -0
  1571. package/node_modules/react-remove-scroll/dist/es2019/medium.d.ts +2 -0
  1572. package/node_modules/react-remove-scroll/dist/es2019/medium.js +2 -0
  1573. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.d.ts +8 -0
  1574. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.js +33 -0
  1575. package/node_modules/react-remove-scroll/dist/es2019/sidecar.d.ts +2 -0
  1576. package/node_modules/react-remove-scroll/dist/es2019/sidecar.js +4 -0
  1577. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +90 -0
  1578. package/node_modules/react-remove-scroll/dist/es2019/types.js +1 -0
  1579. package/node_modules/react-remove-scroll/dist/es5/Combination.d.ts +3 -0
  1580. package/node_modules/react-remove-scroll/dist/es5/Combination.js +9 -0
  1581. package/node_modules/react-remove-scroll/dist/es5/SideEffect.d.ts +5 -0
  1582. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +152 -0
  1583. package/node_modules/react-remove-scroll/dist/es5/UI.d.ts +7 -0
  1584. package/node_modules/react-remove-scroll/dist/es5/UI.js +39 -0
  1585. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.d.ts +3 -0
  1586. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.js +22 -0
  1587. package/node_modules/react-remove-scroll/dist/es5/handleScroll.d.ts +3 -0
  1588. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +101 -0
  1589. package/node_modules/react-remove-scroll/dist/es5/index.d.ts +2 -0
  1590. package/node_modules/react-remove-scroll/dist/es5/index.js +6 -0
  1591. package/node_modules/react-remove-scroll/dist/es5/medium.d.ts +2 -0
  1592. package/node_modules/react-remove-scroll/dist/es5/medium.js +5 -0
  1593. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.d.ts +8 -0
  1594. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.js +37 -0
  1595. package/node_modules/react-remove-scroll/dist/es5/sidecar.d.ts +2 -0
  1596. package/node_modules/react-remove-scroll/dist/es5/sidecar.js +6 -0
  1597. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +90 -0
  1598. package/node_modules/react-remove-scroll/dist/es5/types.js +2 -0
  1599. package/node_modules/react-remove-scroll/package.json +96 -0
  1600. package/node_modules/react-remove-scroll/sidecar/package.json +7 -0
  1601. package/node_modules/react-remove-scroll/sidecar/sidecar.d.ts +5 -0
  1602. package/node_modules/react-remove-scroll-bar/README.md +52 -0
  1603. package/node_modules/react-remove-scroll-bar/constants/package.json +8 -0
  1604. package/node_modules/react-remove-scroll-bar/dist/es2015/component.d.ts +13 -0
  1605. package/node_modules/react-remove-scroll-bar/dist/es2015/component.js +53 -0
  1606. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.d.ts +8 -0
  1607. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
  1608. package/node_modules/react-remove-scroll-bar/dist/es2015/index.d.ts +4 -0
  1609. package/node_modules/react-remove-scroll-bar/dist/es2015/index.js +4 -0
  1610. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.d.ts +14 -0
  1611. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +29 -0
  1612. package/node_modules/react-remove-scroll-bar/dist/es2019/component.d.ts +13 -0
  1613. package/node_modules/react-remove-scroll-bar/dist/es2019/component.js +85 -0
  1614. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.d.ts +8 -0
  1615. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.js +8 -0
  1616. package/node_modules/react-remove-scroll-bar/dist/es2019/index.d.ts +4 -0
  1617. package/node_modules/react-remove-scroll-bar/dist/es2019/index.js +4 -0
  1618. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.d.ts +14 -0
  1619. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.js +28 -0
  1620. package/node_modules/react-remove-scroll-bar/dist/es5/component.d.ts +13 -0
  1621. package/node_modules/react-remove-scroll-bar/dist/es5/component.js +59 -0
  1622. package/node_modules/react-remove-scroll-bar/dist/es5/constants.d.ts +8 -0
  1623. package/node_modules/react-remove-scroll-bar/dist/es5/constants.js +11 -0
  1624. package/node_modules/react-remove-scroll-bar/dist/es5/index.d.ts +4 -0
  1625. package/node_modules/react-remove-scroll-bar/dist/es5/index.js +12 -0
  1626. package/node_modules/react-remove-scroll-bar/dist/es5/utils.d.ts +14 -0
  1627. package/node_modules/react-remove-scroll-bar/dist/es5/utils.js +33 -0
  1628. package/node_modules/react-remove-scroll-bar/package.json +85 -0
  1629. package/node_modules/react-router/CHANGELOG.md +688 -0
  1630. package/node_modules/react-router/LICENSE.md +23 -0
  1631. package/node_modules/react-router/README.md +16 -0
  1632. package/node_modules/react-router/dist/index.d.ts +25 -0
  1633. package/node_modules/react-router/dist/index.js +1454 -0
  1634. package/node_modules/react-router/dist/index.js.map +1 -0
  1635. package/node_modules/react-router/dist/lib/components.d.ts +157 -0
  1636. package/node_modules/react-router/dist/lib/context.d.ts +102 -0
  1637. package/node_modules/react-router/dist/lib/hooks.d.ts +181 -0
  1638. package/node_modules/react-router/dist/main.js +19 -0
  1639. package/node_modules/react-router/dist/react-router.development.js +1350 -0
  1640. package/node_modules/react-router/dist/react-router.development.js.map +1 -0
  1641. package/node_modules/react-router/dist/react-router.production.min.js +12 -0
  1642. package/node_modules/react-router/dist/react-router.production.min.js.map +1 -0
  1643. package/node_modules/react-router/dist/umd/react-router.development.js +1572 -0
  1644. package/node_modules/react-router/dist/umd/react-router.development.js.map +1 -0
  1645. package/node_modules/react-router/dist/umd/react-router.production.min.js +12 -0
  1646. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +1 -0
  1647. package/node_modules/react-router/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1648. package/node_modules/react-router/node_modules/@remix-run/router/LICENSE.md +23 -0
  1649. package/node_modules/react-router/node_modules/@remix-run/router/README.md +135 -0
  1650. package/node_modules/react-router/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1651. package/node_modules/react-router/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1652. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1653. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1654. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1655. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js +4327 -0
  1656. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1657. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1658. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1659. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1660. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1661. package/node_modules/react-router/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1662. package/node_modules/react-router/node_modules/@remix-run/router/history.ts +746 -0
  1663. package/node_modules/react-router/node_modules/@remix-run/router/index.ts +96 -0
  1664. package/node_modules/react-router/node_modules/@remix-run/router/package.json +33 -0
  1665. package/node_modules/react-router/node_modules/@remix-run/router/router.ts +4915 -0
  1666. package/node_modules/react-router/node_modules/@remix-run/router/utils.ts +1598 -0
  1667. package/node_modules/react-router/package.json +43 -0
  1668. package/node_modules/react-router-dom/CHANGELOG.md +825 -0
  1669. package/node_modules/react-router-dom/LICENSE.md +23 -0
  1670. package/node_modules/react-router-dom/README.md +5 -0
  1671. package/node_modules/react-router-dom/dist/dom.d.ts +104 -0
  1672. package/node_modules/react-router-dom/dist/index.d.ts +317 -0
  1673. package/node_modules/react-router-dom/dist/index.js +1442 -0
  1674. package/node_modules/react-router-dom/dist/index.js.map +1 -0
  1675. package/node_modules/react-router-dom/dist/main.js +19 -0
  1676. package/node_modules/react-router-dom/dist/react-router-dom.development.js +1483 -0
  1677. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +1 -0
  1678. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +12 -0
  1679. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +1 -0
  1680. package/node_modules/react-router-dom/dist/server.d.ts +31 -0
  1681. package/node_modules/react-router-dom/dist/server.js +318 -0
  1682. package/node_modules/react-router-dom/dist/server.mjs +293 -0
  1683. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +1779 -0
  1684. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +1 -0
  1685. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +12 -0
  1686. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +1 -0
  1687. package/node_modules/react-router-dom/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1688. package/node_modules/react-router-dom/node_modules/@remix-run/router/LICENSE.md +23 -0
  1689. package/node_modules/react-router-dom/node_modules/@remix-run/router/README.md +135 -0
  1690. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1691. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1692. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1693. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1694. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1695. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js +4327 -0
  1696. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1697. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1698. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1699. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1700. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1701. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1702. package/node_modules/react-router-dom/node_modules/@remix-run/router/history.ts +746 -0
  1703. package/node_modules/react-router-dom/node_modules/@remix-run/router/index.ts +96 -0
  1704. package/node_modules/react-router-dom/node_modules/@remix-run/router/package.json +33 -0
  1705. package/node_modules/react-router-dom/node_modules/@remix-run/router/router.ts +4915 -0
  1706. package/node_modules/react-router-dom/node_modules/@remix-run/router/utils.ts +1598 -0
  1707. package/node_modules/react-router-dom/package.json +49 -0
  1708. package/node_modules/react-router-dom/server.d.ts +31 -0
  1709. package/node_modules/react-router-dom/server.js +318 -0
  1710. package/node_modules/react-router-dom/server.mjs +293 -0
  1711. package/node_modules/react-style-singleton/README.md +41 -0
  1712. package/node_modules/react-style-singleton/dist/es2015/component.d.ts +21 -0
  1713. package/node_modules/react-style-singleton/dist/es2015/component.js +16 -0
  1714. package/node_modules/react-style-singleton/dist/es2015/hook.d.ts +23 -0
  1715. package/node_modules/react-style-singleton/dist/es2015/hook.js +22 -0
  1716. package/node_modules/react-style-singleton/dist/es2015/index.d.ts +3 -0
  1717. package/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
  1718. package/node_modules/react-style-singleton/dist/es2015/singleton.d.ts +4 -0
  1719. package/node_modules/react-style-singleton/dist/es2015/singleton.js +48 -0
  1720. package/node_modules/react-style-singleton/dist/es2019/component.d.ts +21 -0
  1721. package/node_modules/react-style-singleton/dist/es2019/component.js +15 -0
  1722. package/node_modules/react-style-singleton/dist/es2019/hook.d.ts +23 -0
  1723. package/node_modules/react-style-singleton/dist/es2019/hook.js +22 -0
  1724. package/node_modules/react-style-singleton/dist/es2019/index.d.ts +3 -0
  1725. package/node_modules/react-style-singleton/dist/es2019/index.js +3 -0
  1726. package/node_modules/react-style-singleton/dist/es2019/singleton.d.ts +4 -0
  1727. package/node_modules/react-style-singleton/dist/es2019/singleton.js +48 -0
  1728. package/node_modules/react-style-singleton/dist/es5/component.d.ts +21 -0
  1729. package/node_modules/react-style-singleton/dist/es5/component.js +20 -0
  1730. package/node_modules/react-style-singleton/dist/es5/hook.d.ts +23 -0
  1731. package/node_modules/react-style-singleton/dist/es5/hook.js +27 -0
  1732. package/node_modules/react-style-singleton/dist/es5/index.d.ts +3 -0
  1733. package/node_modules/react-style-singleton/dist/es5/index.js +9 -0
  1734. package/node_modules/react-style-singleton/dist/es5/singleton.d.ts +4 -0
  1735. package/node_modules/react-style-singleton/dist/es5/singleton.js +52 -0
  1736. package/node_modules/react-style-singleton/dist/index.js +1 -0
  1737. package/node_modules/react-style-singleton/package.json +87 -0
  1738. package/node_modules/regenerator-runtime/LICENSE +21 -0
  1739. package/node_modules/regenerator-runtime/README.md +31 -0
  1740. package/node_modules/regenerator-runtime/package.json +19 -0
  1741. package/node_modules/regenerator-runtime/path.js +11 -0
  1742. package/node_modules/regenerator-runtime/runtime.js +761 -0
  1743. package/node_modules/remix-utils/.eslintrc.cjs +54 -0
  1744. package/node_modules/remix-utils/LICENSE +21 -0
  1745. package/node_modules/remix-utils/README.md +2141 -0
  1746. package/node_modules/remix-utils/build/client/cache-assets.d.ts +22 -0
  1747. package/node_modules/remix-utils/build/client/cache-assets.js +66 -0
  1748. package/node_modules/remix-utils/build/common/promise.d.ts +87 -0
  1749. package/node_modules/remix-utils/build/common/promise.js +112 -0
  1750. package/node_modules/remix-utils/build/common/timers.d.ts +27 -0
  1751. package/node_modules/remix-utils/build/common/timers.js +47 -0
  1752. package/node_modules/remix-utils/build/react/authenticity-token.d.ts +50 -0
  1753. package/node_modules/remix-utils/build/react/authenticity-token.js +54 -0
  1754. package/node_modules/remix-utils/build/react/client-only.d.ts +27 -0
  1755. package/node_modules/remix-utils/build/react/client-only.js +20 -0
  1756. package/node_modules/remix-utils/build/react/existing-search-params.d.ts +34 -0
  1757. package/node_modules/remix-utils/build/react/existing-search-params.js +32 -0
  1758. package/node_modules/remix-utils/build/react/external-scripts.d.ts +91 -0
  1759. package/node_modules/remix-utils/build/react/external-scripts.js +106 -0
  1760. package/node_modules/remix-utils/build/react/fetcher-type.d.ts +31 -0
  1761. package/node_modules/remix-utils/build/react/fetcher-type.js +53 -0
  1762. package/node_modules/remix-utils/build/react/handle-conventions.d.ts +10 -0
  1763. package/node_modules/remix-utils/build/react/handle-conventions.js +1 -0
  1764. package/node_modules/remix-utils/build/react/honeypot.d.ts +11 -0
  1765. package/node_modules/remix-utils/build/react/honeypot.js +16 -0
  1766. package/node_modules/remix-utils/build/react/server-only.d.ts +25 -0
  1767. package/node_modules/remix-utils/build/react/server-only.js +18 -0
  1768. package/node_modules/remix-utils/build/react/use-debounce-fetcher.d.ts +28 -0
  1769. package/node_modules/remix-utils/build/react/use-debounce-fetcher.js +27 -0
  1770. package/node_modules/remix-utils/build/react/use-debounce-submit.d.ts +7 -0
  1771. package/node_modules/remix-utils/build/react/use-debounce-submit.js +41 -0
  1772. package/node_modules/remix-utils/build/react/use-delegated-anchors.d.ts +6 -0
  1773. package/node_modules/remix-utils/build/react/use-delegated-anchors.js +69 -0
  1774. package/node_modules/remix-utils/build/react/use-event-source.d.ts +17 -0
  1775. package/node_modules/remix-utils/build/react/use-event-source.js +37 -0
  1776. package/node_modules/remix-utils/build/react/use-global-navigation-state.d.ts +33 -0
  1777. package/node_modules/remix-utils/build/react/use-global-navigation-state.js +67 -0
  1778. package/node_modules/remix-utils/build/react/use-hydrated.d.ts +18 -0
  1779. package/node_modules/remix-utils/build/react/use-hydrated.js +24 -0
  1780. package/node_modules/remix-utils/build/react/use-locales.d.ts +24 -0
  1781. package/node_modules/remix-utils/build/react/use-locales.js +56 -0
  1782. package/node_modules/remix-utils/build/react/use-should-hydrate.d.ts +21 -0
  1783. package/node_modules/remix-utils/build/react/use-should-hydrate.js +44 -0
  1784. package/node_modules/remix-utils/build/server/cors.d.ts +101 -0
  1785. package/node_modules/remix-utils/build/server/cors.js +179 -0
  1786. package/node_modules/remix-utils/build/server/csrf.d.ts +75 -0
  1787. package/node_modules/remix-utils/build/server/csrf.js +106 -0
  1788. package/node_modules/remix-utils/build/server/event-stream.d.ts +27 -0
  1789. package/node_modules/remix-utils/build/server/event-stream.js +44 -0
  1790. package/node_modules/remix-utils/build/server/get-client-ip-address.d.ts +29 -0
  1791. package/node_modules/remix-utils/build/server/get-client-ip-address.js +51 -0
  1792. package/node_modules/remix-utils/build/server/get-client-locales.d.ts +18 -0
  1793. package/node_modules/remix-utils/build/server/get-client-locales.js +18 -0
  1794. package/node_modules/remix-utils/build/server/get-headers.d.ts +6 -0
  1795. package/node_modules/remix-utils/build/server/get-headers.js +11 -0
  1796. package/node_modules/remix-utils/build/server/honeypot.d.ts +32 -0
  1797. package/node_modules/remix-utils/build/server/honeypot.js +96 -0
  1798. package/node_modules/remix-utils/build/server/is-prefetch.d.ts +16 -0
  1799. package/node_modules/remix-utils/build/server/is-prefetch.js +11 -0
  1800. package/node_modules/remix-utils/build/server/json-hash.d.ts +6 -0
  1801. package/node_modules/remix-utils/build/server/json-hash.js +16 -0
  1802. package/node_modules/remix-utils/build/server/named-action.d.ts +19 -0
  1803. package/node_modules/remix-utils/build/server/named-action.js +62 -0
  1804. package/node_modules/remix-utils/build/server/parse-accept-header.d.ts +12 -0
  1805. package/node_modules/remix-utils/build/server/parse-accept-header.js +17 -0
  1806. package/node_modules/remix-utils/build/server/preload-route-assets.d.ts +80 -0
  1807. package/node_modules/remix-utils/build/server/preload-route-assets.js +120 -0
  1808. package/node_modules/remix-utils/build/server/redirect-back.d.ts +17 -0
  1809. package/node_modules/remix-utils/build/server/redirect-back.js +29 -0
  1810. package/node_modules/remix-utils/build/server/respond-to.d.ts +40 -0
  1811. package/node_modules/remix-utils/build/server/respond-to.js +22 -0
  1812. package/node_modules/remix-utils/build/server/responses.d.ts +100 -0
  1813. package/node_modules/remix-utils/build/server/responses.js +167 -0
  1814. package/node_modules/remix-utils/build/server/rolling-cookie.d.ts +4 -0
  1815. package/node_modules/remix-utils/build/server/rolling-cookie.js +9 -0
  1816. package/node_modules/remix-utils/build/server/safe-redirect.d.ts +10 -0
  1817. package/node_modules/remix-utils/build/server/safe-redirect.js +22 -0
  1818. package/node_modules/remix-utils/build/server/sec-fetch.d.ts +43 -0
  1819. package/node_modules/remix-utils/build/server/sec-fetch.js +67 -0
  1820. package/node_modules/remix-utils/build/server/typed-cookie.d.ts +17 -0
  1821. package/node_modules/remix-utils/build/server/typed-cookie.js +58 -0
  1822. package/node_modules/remix-utils/build/server/typed-session.d.ts +59 -0
  1823. package/node_modules/remix-utils/build/server/typed-session.js +88 -0
  1824. package/node_modules/remix-utils/package.json +182 -0
  1825. package/node_modules/remix-utils/scripts/check-pkg-exports.ts +61 -0
  1826. package/node_modules/set-cookie-parser/LICENSE +21 -0
  1827. package/node_modules/set-cookie-parser/README.md +199 -0
  1828. package/node_modules/set-cookie-parser/lib/set-cookie.js +226 -0
  1829. package/node_modules/set-cookie-parser/package.json +43 -0
  1830. package/node_modules/source-map/LICENSE +28 -0
  1831. package/node_modules/source-map/README.md +822 -0
  1832. package/node_modules/source-map/dist/source-map.js +1 -0
  1833. package/node_modules/source-map/lib/array-set.js +100 -0
  1834. package/node_modules/source-map/lib/base64-vlq.js +111 -0
  1835. package/node_modules/source-map/lib/base64.js +18 -0
  1836. package/node_modules/source-map/lib/binary-search.js +107 -0
  1837. package/node_modules/source-map/lib/mapping-list.js +80 -0
  1838. package/node_modules/source-map/lib/mappings.wasm +0 -0
  1839. package/node_modules/source-map/lib/read-wasm.js +49 -0
  1840. package/node_modules/source-map/lib/source-map-consumer.js +1237 -0
  1841. package/node_modules/source-map/lib/source-map-generator.js +413 -0
  1842. package/node_modules/source-map/lib/source-node.js +404 -0
  1843. package/node_modules/source-map/lib/util.js +546 -0
  1844. package/node_modules/source-map/lib/wasm.js +107 -0
  1845. package/node_modules/source-map/package.json +91 -0
  1846. package/node_modules/source-map/source-map.d.ts +369 -0
  1847. package/node_modules/source-map/source-map.js +8 -0
  1848. package/node_modules/tailwind-merge/LICENSE.md +21 -0
  1849. package/node_modules/tailwind-merge/README.md +38 -0
  1850. package/node_modules/tailwind-merge/dist/bundle-cjs.js +2595 -0
  1851. package/node_modules/tailwind-merge/dist/bundle-cjs.js.map +1 -0
  1852. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs +2583 -0
  1853. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs.map +1 -0
  1854. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js +2645 -0
  1855. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js.map +1 -0
  1856. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs +2633 -0
  1857. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs.map +1 -0
  1858. package/node_modules/tailwind-merge/dist/types.d.ts +2143 -0
  1859. package/node_modules/tailwind-merge/package.json +95 -0
  1860. package/node_modules/tailwind-merge/src/index.ts +14 -0
  1861. package/node_modules/tailwind-merge/src/lib/class-utils.ts +215 -0
  1862. package/node_modules/tailwind-merge/src/lib/config-utils.ts +14 -0
  1863. package/node_modules/tailwind-merge/src/lib/create-tailwind-merge.ts +50 -0
  1864. package/node_modules/tailwind-merge/src/lib/default-config.ts +1866 -0
  1865. package/node_modules/tailwind-merge/src/lib/extend-tailwind-merge.ts +26 -0
  1866. package/node_modules/tailwind-merge/src/lib/from-theme.ts +13 -0
  1867. package/node_modules/tailwind-merge/src/lib/lru-cache.ts +52 -0
  1868. package/node_modules/tailwind-merge/src/lib/merge-classlist.ts +99 -0
  1869. package/node_modules/tailwind-merge/src/lib/merge-configs.ts +72 -0
  1870. package/node_modules/tailwind-merge/src/lib/modifier-utils.ts +95 -0
  1871. package/node_modules/tailwind-merge/src/lib/tw-join.ts +50 -0
  1872. package/node_modules/tailwind-merge/src/lib/tw-merge.ts +4 -0
  1873. package/node_modules/tailwind-merge/src/lib/types.ts +412 -0
  1874. package/node_modules/tailwind-merge/src/lib/validators.ts +104 -0
  1875. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  1876. package/node_modules/tslib/LICENSE.txt +12 -0
  1877. package/node_modules/tslib/README.md +164 -0
  1878. package/node_modules/tslib/SECURITY.md +41 -0
  1879. package/node_modules/tslib/modules/index.d.ts +37 -0
  1880. package/node_modules/tslib/modules/index.js +68 -0
  1881. package/node_modules/tslib/modules/package.json +3 -0
  1882. package/node_modules/tslib/package.json +47 -0
  1883. package/node_modules/tslib/tslib.d.ts +453 -0
  1884. package/node_modules/tslib/tslib.es6.html +1 -0
  1885. package/node_modules/tslib/tslib.es6.js +370 -0
  1886. package/node_modules/tslib/tslib.es6.mjs +370 -0
  1887. package/node_modules/tslib/tslib.html +1 -0
  1888. package/node_modules/tslib/tslib.js +421 -0
  1889. package/node_modules/type-fest/index.d.ts +153 -0
  1890. package/node_modules/type-fest/package.json +71 -0
  1891. package/node_modules/type-fest/readme.md +971 -0
  1892. package/node_modules/type-fest/source/array-indices.d.ts +23 -0
  1893. package/node_modules/type-fest/source/array-slice.d.ts +106 -0
  1894. package/node_modules/type-fest/source/array-splice.d.ts +97 -0
  1895. package/node_modules/type-fest/source/array-values.d.ts +22 -0
  1896. package/node_modules/type-fest/source/async-return-type.d.ts +23 -0
  1897. package/node_modules/type-fest/source/asyncify.d.ts +32 -0
  1898. package/node_modules/type-fest/source/basic.d.ts +68 -0
  1899. package/node_modules/type-fest/source/camel-case.d.ts +80 -0
  1900. package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  1901. package/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
  1902. package/node_modules/type-fest/source/conditional-except.d.ts +45 -0
  1903. package/node_modules/type-fest/source/conditional-keys.d.ts +45 -0
  1904. package/node_modules/type-fest/source/conditional-pick-deep.d.ts +104 -0
  1905. package/node_modules/type-fest/source/conditional-pick.d.ts +44 -0
  1906. package/node_modules/type-fest/source/conditional-simplify.d.ts +32 -0
  1907. package/node_modules/type-fest/source/delimiter-case.d.ts +99 -0
  1908. package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +82 -0
  1909. package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  1910. package/node_modules/type-fest/source/distributed-omit.d.ts +89 -0
  1911. package/node_modules/type-fest/source/distributed-pick.d.ts +85 -0
  1912. package/node_modules/type-fest/source/empty-object.d.ts +46 -0
  1913. package/node_modules/type-fest/source/enforce-optional.d.ts +47 -0
  1914. package/node_modules/type-fest/source/entries.d.ts +62 -0
  1915. package/node_modules/type-fest/source/entry.d.ts +65 -0
  1916. package/node_modules/type-fest/source/exact.d.ts +63 -0
  1917. package/node_modules/type-fest/source/except.d.ts +80 -0
  1918. package/node_modules/type-fest/source/fixed-length-array.d.ts +43 -0
  1919. package/node_modules/type-fest/source/get.d.ts +191 -0
  1920. package/node_modules/type-fest/source/global-this.d.ts +21 -0
  1921. package/node_modules/type-fest/source/greater-than-or-equal.d.ts +22 -0
  1922. package/node_modules/type-fest/source/greater-than.d.ts +49 -0
  1923. package/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
  1924. package/node_modules/type-fest/source/has-readonly-keys.d.ts +21 -0
  1925. package/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
  1926. package/node_modules/type-fest/source/has-writable-keys.d.ts +21 -0
  1927. package/node_modules/type-fest/source/if-any.d.ts +24 -0
  1928. package/node_modules/type-fest/source/if-empty-object.d.ts +26 -0
  1929. package/node_modules/type-fest/source/if-never.d.ts +24 -0
  1930. package/node_modules/type-fest/source/if-unknown.d.ts +24 -0
  1931. package/node_modules/type-fest/source/includes.d.ts +22 -0
  1932. package/node_modules/type-fest/source/int-range.d.ts +53 -0
  1933. package/node_modules/type-fest/source/internal.d.ts +824 -0
  1934. package/node_modules/type-fest/source/invariant-of.d.ts +78 -0
  1935. package/node_modules/type-fest/source/is-any.d.ts +29 -0
  1936. package/node_modules/type-fest/source/is-equal.d.ts +31 -0
  1937. package/node_modules/type-fest/source/is-literal.d.ts +256 -0
  1938. package/node_modules/type-fest/source/is-never.d.ts +49 -0
  1939. package/node_modules/type-fest/source/is-unknown.d.ts +52 -0
  1940. package/node_modules/type-fest/source/iterable-element.d.ts +54 -0
  1941. package/node_modules/type-fest/source/join.d.ts +68 -0
  1942. package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
  1943. package/node_modules/type-fest/source/jsonify.d.ts +121 -0
  1944. package/node_modules/type-fest/source/kebab-case.d.ts +38 -0
  1945. package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  1946. package/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
  1947. package/node_modules/type-fest/source/keys-of-union.d.ts +40 -0
  1948. package/node_modules/type-fest/source/last-array-element.d.ts +38 -0
  1949. package/node_modules/type-fest/source/less-than-or-equal.d.ts +22 -0
  1950. package/node_modules/type-fest/source/less-than.d.ts +22 -0
  1951. package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +36 -0
  1952. package/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
  1953. package/node_modules/type-fest/source/literal-union.d.ts +35 -0
  1954. package/node_modules/type-fest/source/merge-deep.d.ts +487 -0
  1955. package/node_modules/type-fest/source/merge-exclusive.d.ts +41 -0
  1956. package/node_modules/type-fest/source/merge.d.ts +48 -0
  1957. package/node_modules/type-fest/source/multidimensional-array.d.ts +44 -0
  1958. package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +48 -0
  1959. package/node_modules/type-fest/source/non-empty-object.d.ts +35 -0
  1960. package/node_modules/type-fest/source/numeric.d.ts +187 -0
  1961. package/node_modules/type-fest/source/observable-like.d.ts +63 -0
  1962. package/node_modules/type-fest/source/omit-deep.d.ts +140 -0
  1963. package/node_modules/type-fest/source/omit-index-signature.d.ts +107 -0
  1964. package/node_modules/type-fest/source/opaque.d.ts +250 -0
  1965. package/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
  1966. package/node_modules/type-fest/source/override-properties.d.ts +36 -0
  1967. package/node_modules/type-fest/source/package-json.d.ts +676 -0
  1968. package/node_modules/type-fest/source/partial-deep.d.ts +109 -0
  1969. package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +71 -0
  1970. package/node_modules/type-fest/source/pascal-case.d.ts +38 -0
  1971. package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +55 -0
  1972. package/node_modules/type-fest/source/pascal-cased-properties.d.ts +35 -0
  1973. package/node_modules/type-fest/source/paths.d.ts +79 -0
  1974. package/node_modules/type-fest/source/pick-deep.d.ts +149 -0
  1975. package/node_modules/type-fest/source/pick-index-signature.d.ts +102 -0
  1976. package/node_modules/type-fest/source/primitive.d.ts +13 -0
  1977. package/node_modules/type-fest/source/promisable.d.ts +25 -0
  1978. package/node_modules/type-fest/source/readonly-deep.d.ts +81 -0
  1979. package/node_modules/type-fest/source/readonly-keys-of.d.ts +29 -0
  1980. package/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
  1981. package/node_modules/type-fest/source/replace.d.ts +67 -0
  1982. package/node_modules/type-fest/source/require-all-or-none.d.ts +42 -0
  1983. package/node_modules/type-fest/source/require-at-least-one.d.ts +34 -0
  1984. package/node_modules/type-fest/source/require-exactly-one.d.ts +34 -0
  1985. package/node_modules/type-fest/source/require-one-or-none.d.ts +37 -0
  1986. package/node_modules/type-fest/source/required-deep.d.ts +78 -0
  1987. package/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
  1988. package/node_modules/type-fest/source/schema.d.ts +71 -0
  1989. package/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
  1990. package/node_modules/type-fest/source/set-field-type.d.ts +37 -0
  1991. package/node_modules/type-fest/source/set-non-nullable.d.ts +39 -0
  1992. package/node_modules/type-fest/source/set-optional.d.ts +35 -0
  1993. package/node_modules/type-fest/source/set-parameter-type.d.ts +117 -0
  1994. package/node_modules/type-fest/source/set-readonly.d.ts +38 -0
  1995. package/node_modules/type-fest/source/set-required.d.ts +40 -0
  1996. package/node_modules/type-fest/source/set-return-type.d.ts +29 -0
  1997. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +168 -0
  1998. package/node_modules/type-fest/source/simplify.d.ts +58 -0
  1999. package/node_modules/type-fest/source/single-key-object.d.ts +29 -0
  2000. package/node_modules/type-fest/source/snake-case.d.ts +38 -0
  2001. package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  2002. package/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
  2003. package/node_modules/type-fest/source/split-words.d.ts +57 -0
  2004. package/node_modules/type-fest/source/split.d.ts +29 -0
  2005. package/node_modules/type-fest/source/spread.d.ts +85 -0
  2006. package/node_modules/type-fest/source/string-key-of.d.ts +25 -0
  2007. package/node_modules/type-fest/source/string-slice.d.ts +37 -0
  2008. package/node_modules/type-fest/source/stringified.d.ts +23 -0
  2009. package/node_modules/type-fest/source/subtract.d.ts +68 -0
  2010. package/node_modules/type-fest/source/sum.d.ts +68 -0
  2011. package/node_modules/type-fest/source/tagged-union.d.ts +51 -0
  2012. package/node_modules/type-fest/source/trim.d.ts +27 -0
  2013. package/node_modules/type-fest/source/tsconfig-json.d.ts +1180 -0
  2014. package/node_modules/type-fest/source/tuple-to-union.d.ts +51 -0
  2015. package/node_modules/type-fest/source/typed-array.d.ts +17 -0
  2016. package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +81 -0
  2017. package/node_modules/type-fest/source/union-to-intersection.d.ts +61 -0
  2018. package/node_modules/type-fest/source/unknown-array.d.ts +25 -0
  2019. package/node_modules/type-fest/source/unknown-record.d.ts +31 -0
  2020. package/node_modules/type-fest/source/value-of.d.ts +42 -0
  2021. package/node_modules/type-fest/source/writable-deep.d.ts +83 -0
  2022. package/node_modules/type-fest/source/writable-keys-of.d.ts +30 -0
  2023. package/node_modules/type-fest/source/writable.d.ts +68 -0
  2024. package/node_modules/use-callback-ref/LICENSE +21 -0
  2025. package/node_modules/use-callback-ref/README.md +170 -0
  2026. package/node_modules/use-callback-ref/dist/es2015/assignRef.d.ts +15 -0
  2027. package/node_modules/use-callback-ref/dist/es2015/assignRef.js +22 -0
  2028. package/node_modules/use-callback-ref/dist/es2015/createRef.d.ts +10 -0
  2029. package/node_modules/use-callback-ref/dist/es2015/createRef.js +23 -0
  2030. package/node_modules/use-callback-ref/dist/es2015/index.d.ts +8 -0
  2031. package/node_modules/use-callback-ref/dist/es2015/index.js +12 -0
  2032. package/node_modules/use-callback-ref/dist/es2015/mergeRef.d.ts +16 -0
  2033. package/node_modules/use-callback-ref/dist/es2015/mergeRef.js +18 -0
  2034. package/node_modules/use-callback-ref/dist/es2015/refToCallback.d.ts +24 -0
  2035. package/node_modules/use-callback-ref/dist/es2015/refToCallback.js +48 -0
  2036. package/node_modules/use-callback-ref/dist/es2015/transformRef.d.ts +11 -0
  2037. package/node_modules/use-callback-ref/dist/es2015/transformRef.js +14 -0
  2038. package/node_modules/use-callback-ref/dist/es2015/types.d.ts +5 -0
  2039. package/node_modules/use-callback-ref/dist/es2015/types.js +1 -0
  2040. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.d.ts +17 -0
  2041. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +45 -0
  2042. package/node_modules/use-callback-ref/dist/es2015/useRef.d.ts +16 -0
  2043. package/node_modules/use-callback-ref/dist/es2015/useRef.js +39 -0
  2044. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.d.ts +15 -0
  2045. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.js +18 -0
  2046. package/node_modules/use-callback-ref/dist/es2019/assignRef.d.ts +15 -0
  2047. package/node_modules/use-callback-ref/dist/es2019/assignRef.js +22 -0
  2048. package/node_modules/use-callback-ref/dist/es2019/createRef.d.ts +10 -0
  2049. package/node_modules/use-callback-ref/dist/es2019/createRef.js +23 -0
  2050. package/node_modules/use-callback-ref/dist/es2019/index.d.ts +8 -0
  2051. package/node_modules/use-callback-ref/dist/es2019/index.js +12 -0
  2052. package/node_modules/use-callback-ref/dist/es2019/mergeRef.d.ts +16 -0
  2053. package/node_modules/use-callback-ref/dist/es2019/mergeRef.js +18 -0
  2054. package/node_modules/use-callback-ref/dist/es2019/refToCallback.d.ts +24 -0
  2055. package/node_modules/use-callback-ref/dist/es2019/refToCallback.js +48 -0
  2056. package/node_modules/use-callback-ref/dist/es2019/transformRef.d.ts +11 -0
  2057. package/node_modules/use-callback-ref/dist/es2019/transformRef.js +14 -0
  2058. package/node_modules/use-callback-ref/dist/es2019/types.d.ts +5 -0
  2059. package/node_modules/use-callback-ref/dist/es2019/types.js +1 -0
  2060. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.d.ts +17 -0
  2061. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.js +43 -0
  2062. package/node_modules/use-callback-ref/dist/es2019/useRef.d.ts +16 -0
  2063. package/node_modules/use-callback-ref/dist/es2019/useRef.js +39 -0
  2064. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.d.ts +15 -0
  2065. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.js +18 -0
  2066. package/node_modules/use-callback-ref/dist/es5/assignRef.d.ts +15 -0
  2067. package/node_modules/use-callback-ref/dist/es5/assignRef.js +26 -0
  2068. package/node_modules/use-callback-ref/dist/es5/createRef.d.ts +10 -0
  2069. package/node_modules/use-callback-ref/dist/es5/createRef.js +27 -0
  2070. package/node_modules/use-callback-ref/dist/es5/index.d.ts +8 -0
  2071. package/node_modules/use-callback-ref/dist/es5/index.js +24 -0
  2072. package/node_modules/use-callback-ref/dist/es5/mergeRef.d.ts +16 -0
  2073. package/node_modules/use-callback-ref/dist/es5/mergeRef.js +22 -0
  2074. package/node_modules/use-callback-ref/dist/es5/refToCallback.d.ts +24 -0
  2075. package/node_modules/use-callback-ref/dist/es5/refToCallback.js +53 -0
  2076. package/node_modules/use-callback-ref/dist/es5/transformRef.d.ts +11 -0
  2077. package/node_modules/use-callback-ref/dist/es5/transformRef.js +18 -0
  2078. package/node_modules/use-callback-ref/dist/es5/types.d.ts +5 -0
  2079. package/node_modules/use-callback-ref/dist/es5/types.js +2 -0
  2080. package/node_modules/use-callback-ref/dist/es5/useMergeRef.d.ts +17 -0
  2081. package/node_modules/use-callback-ref/dist/es5/useMergeRef.js +50 -0
  2082. package/node_modules/use-callback-ref/dist/es5/useRef.d.ts +16 -0
  2083. package/node_modules/use-callback-ref/dist/es5/useRef.js +43 -0
  2084. package/node_modules/use-callback-ref/dist/es5/useTransformRef.d.ts +15 -0
  2085. package/node_modules/use-callback-ref/dist/es5/useTransformRef.js +22 -0
  2086. package/node_modules/use-callback-ref/package.json +84 -0
  2087. package/node_modules/use-sidecar/LICENSE +21 -0
  2088. package/node_modules/use-sidecar/README.md +349 -0
  2089. package/node_modules/use-sidecar/dist/es2015/config.d.ts +5 -0
  2090. package/node_modules/use-sidecar/dist/es2015/config.js +6 -0
  2091. package/node_modules/use-sidecar/dist/es2015/env.d.ts +4 -0
  2092. package/node_modules/use-sidecar/dist/es2015/env.js +5 -0
  2093. package/node_modules/use-sidecar/dist/es2015/exports.d.ts +3 -0
  2094. package/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  2095. package/node_modules/use-sidecar/dist/es2015/hoc.d.ts +3 -0
  2096. package/node_modules/use-sidecar/dist/es2015/hoc.js +15 -0
  2097. package/node_modules/use-sidecar/dist/es2015/hook.d.ts +2 -0
  2098. package/node_modules/use-sidecar/dist/es2015/hook.js +41 -0
  2099. package/node_modules/use-sidecar/dist/es2015/index.d.ts +7 -0
  2100. package/node_modules/use-sidecar/dist/es2015/index.js +6 -0
  2101. package/node_modules/use-sidecar/dist/es2015/medium.d.ts +3 -0
  2102. package/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
  2103. package/node_modules/use-sidecar/dist/es2015/renderProp.d.ts +8 -0
  2104. package/node_modules/use-sidecar/dist/es2015/renderProp.js +35 -0
  2105. package/node_modules/use-sidecar/dist/es2015/types.d.ts +47 -0
  2106. package/node_modules/use-sidecar/dist/es2015/types.js +1 -0
  2107. package/node_modules/use-sidecar/dist/es2019/config.d.ts +5 -0
  2108. package/node_modules/use-sidecar/dist/es2019/config.js +6 -0
  2109. package/node_modules/use-sidecar/dist/es2019/env.d.ts +4 -0
  2110. package/node_modules/use-sidecar/dist/es2019/env.js +5 -0
  2111. package/node_modules/use-sidecar/dist/es2019/exports.d.ts +3 -0
  2112. package/node_modules/use-sidecar/dist/es2019/exports.js +16 -0
  2113. package/node_modules/use-sidecar/dist/es2019/hoc.d.ts +3 -0
  2114. package/node_modules/use-sidecar/dist/es2019/hoc.js +14 -0
  2115. package/node_modules/use-sidecar/dist/es2019/hook.d.ts +2 -0
  2116. package/node_modules/use-sidecar/dist/es2019/hook.js +41 -0
  2117. package/node_modules/use-sidecar/dist/es2019/index.d.ts +7 -0
  2118. package/node_modules/use-sidecar/dist/es2019/index.js +6 -0
  2119. package/node_modules/use-sidecar/dist/es2019/medium.d.ts +3 -0
  2120. package/node_modules/use-sidecar/dist/es2019/medium.js +78 -0
  2121. package/node_modules/use-sidecar/dist/es2019/renderProp.d.ts +8 -0
  2122. package/node_modules/use-sidecar/dist/es2019/renderProp.js +28 -0
  2123. package/node_modules/use-sidecar/dist/es2019/types.d.ts +47 -0
  2124. package/node_modules/use-sidecar/dist/es2019/types.js +1 -0
  2125. package/node_modules/use-sidecar/dist/es5/config.d.ts +5 -0
  2126. package/node_modules/use-sidecar/dist/es5/config.js +10 -0
  2127. package/node_modules/use-sidecar/dist/es5/env.d.ts +4 -0
  2128. package/node_modules/use-sidecar/dist/es5/env.js +8 -0
  2129. package/node_modules/use-sidecar/dist/es5/exports.d.ts +3 -0
  2130. package/node_modules/use-sidecar/dist/es5/exports.js +22 -0
  2131. package/node_modules/use-sidecar/dist/es5/hoc.d.ts +3 -0
  2132. package/node_modules/use-sidecar/dist/es5/hoc.js +19 -0
  2133. package/node_modules/use-sidecar/dist/es5/hook.d.ts +2 -0
  2134. package/node_modules/use-sidecar/dist/es5/hook.js +45 -0
  2135. package/node_modules/use-sidecar/dist/es5/index.d.ts +7 -0
  2136. package/node_modules/use-sidecar/dist/es5/index.js +16 -0
  2137. package/node_modules/use-sidecar/dist/es5/medium.d.ts +3 -0
  2138. package/node_modules/use-sidecar/dist/es5/medium.js +83 -0
  2139. package/node_modules/use-sidecar/dist/es5/renderProp.d.ts +8 -0
  2140. package/node_modules/use-sidecar/dist/es5/renderProp.js +39 -0
  2141. package/node_modules/use-sidecar/dist/es5/types.d.ts +47 -0
  2142. package/node_modules/use-sidecar/dist/es5/types.js +2 -0
  2143. package/node_modules/use-sidecar/package.json +89 -0
  2144. package/node_modules/zod/LICENSE +21 -0
  2145. package/node_modules/zod/README.md +2834 -0
  2146. package/node_modules/zod/index.d.ts +2 -0
  2147. package/node_modules/zod/lib/ZodError.d.ts +163 -0
  2148. package/node_modules/zod/lib/ZodError.js +132 -0
  2149. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  2150. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  2151. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  2152. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  2153. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  2154. package/node_modules/zod/lib/benchmarks/index.js +46 -0
  2155. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  2156. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  2157. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  2158. package/node_modules/zod/lib/benchmarks/primitives.js +136 -0
  2159. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  2160. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  2161. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  2162. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  2163. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  2164. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  2165. package/node_modules/zod/lib/errors.d.ts +5 -0
  2166. package/node_modules/zod/lib/errors.js +17 -0
  2167. package/node_modules/zod/lib/external.d.ts +6 -0
  2168. package/node_modules/zod/lib/external.js +18 -0
  2169. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  2170. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  2171. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  2172. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  2173. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  2174. package/node_modules/zod/lib/helpers/parseUtil.js +115 -0
  2175. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  2176. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  2177. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  2178. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  2179. package/node_modules/zod/lib/helpers/util.d.ts +68 -0
  2180. package/node_modules/zod/lib/helpers/util.js +142 -0
  2181. package/node_modules/zod/lib/index.d.ts +4 -0
  2182. package/node_modules/zod/lib/index.js +29 -0
  2183. package/node_modules/zod/lib/index.mjs +4017 -0
  2184. package/node_modules/zod/lib/index.umd.js +4131 -0
  2185. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  2186. package/node_modules/zod/lib/locales/en.js +129 -0
  2187. package/node_modules/zod/lib/types.d.ts +1057 -0
  2188. package/node_modules/zod/lib/types.js +3495 -0
  2189. package/node_modules/zod/package.json +119 -0
  2190. package/package.json +191 -0
  2191. package/start.js +52 -0
@@ -0,0 +1,3937 @@
1
+ /*!
2
+ * chai
3
+ * http://chaijs.com
4
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
5
+ * MIT Licensed
6
+ */
7
+
8
+ import {Assertion} from '../assertion.js';
9
+ import {AssertionError} from 'assertion-error';
10
+ import * as _ from '../utils/index.js';
11
+
12
+ const {flag} = _;
13
+
14
+ /**
15
+ * ### Language Chains
16
+ *
17
+ * The following are provided as chainable getters to improve the readability
18
+ * of your assertions.
19
+ *
20
+ * **Chains**
21
+ *
22
+ * - to
23
+ * - be
24
+ * - been
25
+ * - is
26
+ * - that
27
+ * - which
28
+ * - and
29
+ * - has
30
+ * - have
31
+ * - with
32
+ * - at
33
+ * - of
34
+ * - same
35
+ * - but
36
+ * - does
37
+ * - still
38
+ * - also
39
+ *
40
+ * @name language chains
41
+ * @namespace BDD
42
+ * @api public
43
+ */
44
+
45
+ [ 'to', 'be', 'been', 'is'
46
+ , 'and', 'has', 'have', 'with'
47
+ , 'that', 'which', 'at', 'of'
48
+ , 'same', 'but', 'does', 'still', "also" ].forEach(function (chain) {
49
+ Assertion.addProperty(chain);
50
+ });
51
+
52
+ /**
53
+ * ### .not
54
+ *
55
+ * Negates all assertions that follow in the chain.
56
+ *
57
+ * expect(function () {}).to.not.throw();
58
+ * expect({a: 1}).to.not.have.property('b');
59
+ * expect([1, 2]).to.be.an('array').that.does.not.include(3);
60
+ *
61
+ * Just because you can negate any assertion with `.not` doesn't mean you
62
+ * should. With great power comes great responsibility. It's often best to
63
+ * assert that the one expected output was produced, rather than asserting
64
+ * that one of countless unexpected outputs wasn't produced. See individual
65
+ * assertions for specific guidance.
66
+ *
67
+ * expect(2).to.equal(2); // Recommended
68
+ * expect(2).to.not.equal(1); // Not recommended
69
+ *
70
+ * @name not
71
+ * @namespace BDD
72
+ * @api public
73
+ */
74
+
75
+ Assertion.addProperty('not', function () {
76
+ flag(this, 'negate', true);
77
+ });
78
+
79
+ /**
80
+ * ### .deep
81
+ *
82
+ * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property`
83
+ * assertions that follow in the chain to use deep equality instead of strict
84
+ * (`===`) equality. See the `deep-eql` project page for info on the deep
85
+ * equality algorithm: https://github.com/chaijs/deep-eql.
86
+ *
87
+ * // Target object deeply (but not strictly) equals `{a: 1}`
88
+ * expect({a: 1}).to.deep.equal({a: 1});
89
+ * expect({a: 1}).to.not.equal({a: 1});
90
+ *
91
+ * // Target array deeply (but not strictly) includes `{a: 1}`
92
+ * expect([{a: 1}]).to.deep.include({a: 1});
93
+ * expect([{a: 1}]).to.not.include({a: 1});
94
+ *
95
+ * // Target object deeply (but not strictly) includes `x: {a: 1}`
96
+ * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});
97
+ * expect({x: {a: 1}}).to.not.include({x: {a: 1}});
98
+ *
99
+ * // Target array deeply (but not strictly) has member `{a: 1}`
100
+ * expect([{a: 1}]).to.have.deep.members([{a: 1}]);
101
+ * expect([{a: 1}]).to.not.have.members([{a: 1}]);
102
+ *
103
+ * // Target set deeply (but not strictly) has key `{a: 1}`
104
+ * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]);
105
+ * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]);
106
+ *
107
+ * // Target object deeply (but not strictly) has property `x: {a: 1}`
108
+ * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});
109
+ * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});
110
+ *
111
+ * @name deep
112
+ * @namespace BDD
113
+ * @api public
114
+ */
115
+
116
+ Assertion.addProperty('deep', function () {
117
+ flag(this, 'deep', true);
118
+ });
119
+
120
+ /**
121
+ * ### .nested
122
+ *
123
+ * Enables dot- and bracket-notation in all `.property` and `.include`
124
+ * assertions that follow in the chain.
125
+ *
126
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');
127
+ * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});
128
+ *
129
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
130
+ * adding two backslashes before them.
131
+ *
132
+ * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]');
133
+ * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\.a.\\[b\\]': 'x'});
134
+ *
135
+ * `.nested` cannot be combined with `.own`.
136
+ *
137
+ * @name nested
138
+ * @namespace BDD
139
+ * @api public
140
+ */
141
+
142
+ Assertion.addProperty('nested', function () {
143
+ flag(this, 'nested', true);
144
+ });
145
+
146
+ /**
147
+ * ### .own
148
+ *
149
+ * Causes all `.property` and `.include` assertions that follow in the chain
150
+ * to ignore inherited properties.
151
+ *
152
+ * Object.prototype.b = 2;
153
+ *
154
+ * expect({a: 1}).to.have.own.property('a');
155
+ * expect({a: 1}).to.have.property('b');
156
+ * expect({a: 1}).to.not.have.own.property('b');
157
+ *
158
+ * expect({a: 1}).to.own.include({a: 1});
159
+ * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});
160
+ *
161
+ * `.own` cannot be combined with `.nested`.
162
+ *
163
+ * @name own
164
+ * @namespace BDD
165
+ * @api public
166
+ */
167
+
168
+ Assertion.addProperty('own', function () {
169
+ flag(this, 'own', true);
170
+ });
171
+
172
+ /**
173
+ * ### .ordered
174
+ *
175
+ * Causes all `.members` assertions that follow in the chain to require that
176
+ * members be in the same order.
177
+ *
178
+ * expect([1, 2]).to.have.ordered.members([1, 2])
179
+ * .but.not.have.ordered.members([2, 1]);
180
+ *
181
+ * When `.include` and `.ordered` are combined, the ordering begins at the
182
+ * start of both arrays.
183
+ *
184
+ * expect([1, 2, 3]).to.include.ordered.members([1, 2])
185
+ * .but.not.include.ordered.members([2, 3]);
186
+ *
187
+ * @name ordered
188
+ * @namespace BDD
189
+ * @api public
190
+ */
191
+
192
+ Assertion.addProperty('ordered', function () {
193
+ flag(this, 'ordered', true);
194
+ });
195
+
196
+ /**
197
+ * ### .any
198
+ *
199
+ * Causes all `.keys` assertions that follow in the chain to only require that
200
+ * the target have at least one of the given keys. This is the opposite of
201
+ * `.all`, which requires that the target have all of the given keys.
202
+ *
203
+ * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');
204
+ *
205
+ * See the `.keys` doc for guidance on when to use `.any` or `.all`.
206
+ *
207
+ * @name any
208
+ * @namespace BDD
209
+ * @api public
210
+ */
211
+
212
+ Assertion.addProperty('any', function () {
213
+ flag(this, 'any', true);
214
+ flag(this, 'all', false);
215
+ });
216
+
217
+ /**
218
+ * ### .all
219
+ *
220
+ * Causes all `.keys` assertions that follow in the chain to require that the
221
+ * target have all of the given keys. This is the opposite of `.any`, which
222
+ * only requires that the target have at least one of the given keys.
223
+ *
224
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
225
+ *
226
+ * Note that `.all` is used by default when neither `.all` nor `.any` are
227
+ * added earlier in the chain. However, it's often best to add `.all` anyway
228
+ * because it improves readability.
229
+ *
230
+ * See the `.keys` doc for guidance on when to use `.any` or `.all`.
231
+ *
232
+ * @name all
233
+ * @namespace BDD
234
+ * @api public
235
+ */
236
+
237
+ Assertion.addProperty('all', function () {
238
+ flag(this, 'all', true);
239
+ flag(this, 'any', false);
240
+ });
241
+
242
+ const functionTypes = {
243
+ 'function': ['function', 'asyncfunction', 'generatorfunction', 'asyncgeneratorfunction'],
244
+ 'asyncfunction': ['asyncfunction', 'asyncgeneratorfunction'],
245
+ 'generatorfunction': ['generatorfunction', 'asyncgeneratorfunction'],
246
+ 'asyncgeneratorfunction': ['asyncgeneratorfunction']
247
+ }
248
+
249
+ /**
250
+ * ### .a(type[, msg])
251
+ *
252
+ * Asserts that the target's type is equal to the given string `type`. Types
253
+ * are case insensitive. See the utility file `./type-detect.js` for info on the
254
+ * type detection algorithm.
255
+ *
256
+ * expect('foo').to.be.a('string');
257
+ * expect({a: 1}).to.be.an('object');
258
+ * expect(null).to.be.a('null');
259
+ * expect(undefined).to.be.an('undefined');
260
+ * expect(new Error).to.be.an('error');
261
+ * expect(Promise.resolve()).to.be.a('promise');
262
+ * expect(new Float32Array).to.be.a('float32array');
263
+ * expect(Symbol()).to.be.a('symbol');
264
+ *
265
+ * `.a` supports objects that have a custom type set via `Symbol.toStringTag`.
266
+ *
267
+ * var myObj = {
268
+ * [Symbol.toStringTag]: 'myCustomType'
269
+ * };
270
+ *
271
+ * expect(myObj).to.be.a('myCustomType').but.not.an('object');
272
+ *
273
+ * It's often best to use `.a` to check a target's type before making more
274
+ * assertions on the same target. That way, you avoid unexpected behavior from
275
+ * any assertion that does different things based on the target's type.
276
+ *
277
+ * expect([1, 2, 3]).to.be.an('array').that.includes(2);
278
+ * expect([]).to.be.an('array').that.is.empty;
279
+ *
280
+ * Add `.not` earlier in the chain to negate `.a`. However, it's often best to
281
+ * assert that the target is the expected type, rather than asserting that it
282
+ * isn't one of many unexpected types.
283
+ *
284
+ * expect('foo').to.be.a('string'); // Recommended
285
+ * expect('foo').to.not.be.an('array'); // Not recommended
286
+ *
287
+ * `.a` accepts an optional `msg` argument which is a custom error message to
288
+ * show when the assertion fails. The message can also be given as the second
289
+ * argument to `expect`.
290
+ *
291
+ * expect(1).to.be.a('string', 'nooo why fail??');
292
+ * expect(1, 'nooo why fail??').to.be.a('string');
293
+ *
294
+ * `.a` can also be used as a language chain to improve the readability of
295
+ * your assertions.
296
+ *
297
+ * expect({b: 2}).to.have.a.property('b');
298
+ *
299
+ * The alias `.an` can be used interchangeably with `.a`.
300
+ *
301
+ * @name a
302
+ * @alias an
303
+ * @param {String} type
304
+ * @param {String} msg _optional_
305
+ * @namespace BDD
306
+ * @api public
307
+ */
308
+ function an (type, msg) {
309
+ if (msg) flag(this, 'message', msg);
310
+ type = type.toLowerCase();
311
+ var obj = flag(this, 'object')
312
+ , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';
313
+
314
+ const detectedType = _.type(obj).toLowerCase();
315
+
316
+ if (functionTypes['function'].includes(type)) {
317
+ this.assert(
318
+ functionTypes[type].includes(detectedType)
319
+ , 'expected #{this} to be ' + article + type
320
+ , 'expected #{this} not to be ' + article + type
321
+ );
322
+ } else {
323
+ this.assert(
324
+ type === detectedType
325
+ , 'expected #{this} to be ' + article + type
326
+ , 'expected #{this} not to be ' + article + type
327
+ );
328
+ }
329
+ }
330
+
331
+ Assertion.addChainableMethod('an', an);
332
+ Assertion.addChainableMethod('a', an);
333
+
334
+ /**
335
+ * ### .include(val[, msg])
336
+ *
337
+ * When the target is a string, `.include` asserts that the given string `val`
338
+ * is a substring of the target.
339
+ *
340
+ * expect('foobar').to.include('foo');
341
+ *
342
+ * When the target is an array, `.include` asserts that the given `val` is a
343
+ * member of the target.
344
+ *
345
+ * expect([1, 2, 3]).to.include(2);
346
+ *
347
+ * When the target is an object, `.include` asserts that the given object
348
+ * `val`'s properties are a subset of the target's properties.
349
+ *
350
+ * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2});
351
+ *
352
+ * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a
353
+ * member of the target. SameValueZero equality algorithm is used.
354
+ *
355
+ * expect(new Set([1, 2])).to.include(2);
356
+ *
357
+ * When the target is a Map, `.include` asserts that the given `val` is one of
358
+ * the values of the target. SameValueZero equality algorithm is used.
359
+ *
360
+ * expect(new Map([['a', 1], ['b', 2]])).to.include(2);
361
+ *
362
+ * Because `.include` does different things based on the target's type, it's
363
+ * important to check the target's type before using `.include`. See the `.a`
364
+ * doc for info on testing a target's type.
365
+ *
366
+ * expect([1, 2, 3]).to.be.an('array').that.includes(2);
367
+ *
368
+ * By default, strict (`===`) equality is used to compare array members and
369
+ * object properties. Add `.deep` earlier in the chain to use deep equality
370
+ * instead (WeakSet targets are not supported). See the `deep-eql` project
371
+ * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
372
+ *
373
+ * // Target array deeply (but not strictly) includes `{a: 1}`
374
+ * expect([{a: 1}]).to.deep.include({a: 1});
375
+ * expect([{a: 1}]).to.not.include({a: 1});
376
+ *
377
+ * // Target object deeply (but not strictly) includes `x: {a: 1}`
378
+ * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});
379
+ * expect({x: {a: 1}}).to.not.include({x: {a: 1}});
380
+ *
381
+ * By default, all of the target's properties are searched when working with
382
+ * objects. This includes properties that are inherited and/or non-enumerable.
383
+ * Add `.own` earlier in the chain to exclude the target's inherited
384
+ * properties from the search.
385
+ *
386
+ * Object.prototype.b = 2;
387
+ *
388
+ * expect({a: 1}).to.own.include({a: 1});
389
+ * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2});
390
+ *
391
+ * Note that a target object is always only searched for `val`'s own
392
+ * enumerable properties.
393
+ *
394
+ * `.deep` and `.own` can be combined.
395
+ *
396
+ * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}});
397
+ *
398
+ * Add `.nested` earlier in the chain to enable dot- and bracket-notation when
399
+ * referencing nested properties.
400
+ *
401
+ * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'});
402
+ *
403
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
404
+ * adding two backslashes before them.
405
+ *
406
+ * expect({'.a': {'[b]': 2}}).to.nested.include({'\\.a.\\[b\\]': 2});
407
+ *
408
+ * `.deep` and `.nested` can be combined.
409
+ *
410
+ * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}});
411
+ *
412
+ * `.own` and `.nested` cannot be combined.
413
+ *
414
+ * Add `.not` earlier in the chain to negate `.include`.
415
+ *
416
+ * expect('foobar').to.not.include('taco');
417
+ * expect([1, 2, 3]).to.not.include(4);
418
+ *
419
+ * However, it's dangerous to negate `.include` when the target is an object.
420
+ * The problem is that it creates uncertain expectations by asserting that the
421
+ * target object doesn't have all of `val`'s key/value pairs but may or may
422
+ * not have some of them. It's often best to identify the exact output that's
423
+ * expected, and then write an assertion that only accepts that exact output.
424
+ *
425
+ * When the target object isn't even expected to have `val`'s keys, it's
426
+ * often best to assert exactly that.
427
+ *
428
+ * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended
429
+ * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended
430
+ *
431
+ * When the target object is expected to have `val`'s keys, it's often best to
432
+ * assert that each of the properties has its expected value, rather than
433
+ * asserting that each property doesn't have one of many unexpected values.
434
+ *
435
+ * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended
436
+ * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended
437
+ *
438
+ * `.include` accepts an optional `msg` argument which is a custom error
439
+ * message to show when the assertion fails. The message can also be given as
440
+ * the second argument to `expect`.
441
+ *
442
+ * expect([1, 2, 3]).to.include(4, 'nooo why fail??');
443
+ * expect([1, 2, 3], 'nooo why fail??').to.include(4);
444
+ *
445
+ * `.include` can also be used as a language chain, causing all `.members` and
446
+ * `.keys` assertions that follow in the chain to require the target to be a
447
+ * superset of the expected set, rather than an identical set. Note that
448
+ * `.members` ignores duplicates in the subset when `.include` is added.
449
+ *
450
+ * // Target object's keys are a superset of ['a', 'b'] but not identical
451
+ * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');
452
+ * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');
453
+ *
454
+ * // Target array is a superset of [1, 2] but not identical
455
+ * expect([1, 2, 3]).to.include.members([1, 2]);
456
+ * expect([1, 2, 3]).to.not.have.members([1, 2]);
457
+ *
458
+ * // Duplicates in the subset are ignored
459
+ * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);
460
+ *
461
+ * Note that adding `.any` earlier in the chain causes the `.keys` assertion
462
+ * to ignore `.include`.
463
+ *
464
+ * // Both assertions are identical
465
+ * expect({a: 1}).to.include.any.keys('a', 'b');
466
+ * expect({a: 1}).to.have.any.keys('a', 'b');
467
+ *
468
+ * The aliases `.includes`, `.contain`, and `.contains` can be used
469
+ * interchangeably with `.include`.
470
+ *
471
+ * @name include
472
+ * @alias contain
473
+ * @alias includes
474
+ * @alias contains
475
+ * @param {Mixed} val
476
+ * @param {String} msg _optional_
477
+ * @namespace BDD
478
+ * @api public
479
+ */
480
+
481
+ function SameValueZero(a, b) {
482
+ return (_.isNaN(a) && _.isNaN(b)) || a === b;
483
+ }
484
+
485
+ function includeChainingBehavior () {
486
+ flag(this, 'contains', true);
487
+ }
488
+
489
+ function include (val, msg) {
490
+ if (msg) flag(this, 'message', msg);
491
+
492
+ var obj = flag(this, 'object')
493
+ , objType = _.type(obj).toLowerCase()
494
+ , flagMsg = flag(this, 'message')
495
+ , negate = flag(this, 'negate')
496
+ , ssfi = flag(this, 'ssfi')
497
+ , isDeep = flag(this, 'deep')
498
+ , descriptor = isDeep ? 'deep ' : ''
499
+ , isEql = isDeep ? flag(this, 'eql') : SameValueZero;
500
+
501
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
502
+
503
+ var included = false;
504
+
505
+ switch (objType) {
506
+ case 'string':
507
+ included = obj.indexOf(val) !== -1;
508
+ break;
509
+
510
+ case 'weakset':
511
+ if (isDeep) {
512
+ throw new AssertionError(
513
+ flagMsg + 'unable to use .deep.include with WeakSet',
514
+ undefined,
515
+ ssfi
516
+ );
517
+ }
518
+
519
+ included = obj.has(val);
520
+ break;
521
+
522
+ case 'map':
523
+ obj.forEach(function (item) {
524
+ included = included || isEql(item, val);
525
+ });
526
+ break;
527
+
528
+ case 'set':
529
+ if (isDeep) {
530
+ obj.forEach(function (item) {
531
+ included = included || isEql(item, val);
532
+ });
533
+ } else {
534
+ included = obj.has(val);
535
+ }
536
+ break;
537
+
538
+ case 'array':
539
+ if (isDeep) {
540
+ included = obj.some(function (item) {
541
+ return isEql(item, val);
542
+ })
543
+ } else {
544
+ included = obj.indexOf(val) !== -1;
545
+ }
546
+ break;
547
+
548
+ default:
549
+ // This block is for asserting a subset of properties in an object.
550
+ // `_.expectTypes` isn't used here because `.include` should work with
551
+ // objects with a custom `@@toStringTag`.
552
+ if (val !== Object(val)) {
553
+ throw new AssertionError(
554
+ flagMsg + 'the given combination of arguments ('
555
+ + objType + ' and '
556
+ + _.type(val).toLowerCase() + ')'
557
+ + ' is invalid for this assertion. '
558
+ + 'You can use an array, a map, an object, a set, a string, '
559
+ + 'or a weakset instead of a '
560
+ + _.type(val).toLowerCase(),
561
+ undefined,
562
+ ssfi
563
+ );
564
+ }
565
+
566
+ var props = Object.keys(val)
567
+ , firstErr = null
568
+ , numErrs = 0;
569
+
570
+ props.forEach(function (prop) {
571
+ var propAssertion = new Assertion(obj);
572
+ _.transferFlags(this, propAssertion, true);
573
+ flag(propAssertion, 'lockSsfi', true);
574
+
575
+ if (!negate || props.length === 1) {
576
+ propAssertion.property(prop, val[prop]);
577
+ return;
578
+ }
579
+
580
+ try {
581
+ propAssertion.property(prop, val[prop]);
582
+ } catch (err) {
583
+ if (!_.checkError.compatibleConstructor(err, AssertionError)) {
584
+ throw err;
585
+ }
586
+ if (firstErr === null) firstErr = err;
587
+ numErrs++;
588
+ }
589
+ }, this);
590
+
591
+ // When validating .not.include with multiple properties, we only want
592
+ // to throw an assertion error if all of the properties are included,
593
+ // in which case we throw the first property assertion error that we
594
+ // encountered.
595
+ if (negate && props.length > 1 && numErrs === props.length) {
596
+ throw firstErr;
597
+ }
598
+ return;
599
+ }
600
+
601
+ // Assert inclusion in collection or substring in a string.
602
+ this.assert(
603
+ included
604
+ , 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val)
605
+ , 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val));
606
+ }
607
+
608
+ Assertion.addChainableMethod('include', include, includeChainingBehavior);
609
+ Assertion.addChainableMethod('contain', include, includeChainingBehavior);
610
+ Assertion.addChainableMethod('contains', include, includeChainingBehavior);
611
+ Assertion.addChainableMethod('includes', include, includeChainingBehavior);
612
+
613
+ /**
614
+ * ### .ok
615
+ *
616
+ * Asserts that the target is a truthy value (considered `true` in boolean context).
617
+ * However, it's often best to assert that the target is strictly (`===`) or
618
+ * deeply equal to its expected value.
619
+ *
620
+ * expect(1).to.equal(1); // Recommended
621
+ * expect(1).to.be.ok; // Not recommended
622
+ *
623
+ * expect(true).to.be.true; // Recommended
624
+ * expect(true).to.be.ok; // Not recommended
625
+ *
626
+ * Add `.not` earlier in the chain to negate `.ok`.
627
+ *
628
+ * expect(0).to.equal(0); // Recommended
629
+ * expect(0).to.not.be.ok; // Not recommended
630
+ *
631
+ * expect(false).to.be.false; // Recommended
632
+ * expect(false).to.not.be.ok; // Not recommended
633
+ *
634
+ * expect(null).to.be.null; // Recommended
635
+ * expect(null).to.not.be.ok; // Not recommended
636
+ *
637
+ * expect(undefined).to.be.undefined; // Recommended
638
+ * expect(undefined).to.not.be.ok; // Not recommended
639
+ *
640
+ * A custom error message can be given as the second argument to `expect`.
641
+ *
642
+ * expect(false, 'nooo why fail??').to.be.ok;
643
+ *
644
+ * @name ok
645
+ * @namespace BDD
646
+ * @api public
647
+ */
648
+
649
+ Assertion.addProperty('ok', function () {
650
+ this.assert(
651
+ flag(this, 'object')
652
+ , 'expected #{this} to be truthy'
653
+ , 'expected #{this} to be falsy');
654
+ });
655
+
656
+ /**
657
+ * ### .true
658
+ *
659
+ * Asserts that the target is strictly (`===`) equal to `true`.
660
+ *
661
+ * expect(true).to.be.true;
662
+ *
663
+ * Add `.not` earlier in the chain to negate `.true`. However, it's often best
664
+ * to assert that the target is equal to its expected value, rather than not
665
+ * equal to `true`.
666
+ *
667
+ * expect(false).to.be.false; // Recommended
668
+ * expect(false).to.not.be.true; // Not recommended
669
+ *
670
+ * expect(1).to.equal(1); // Recommended
671
+ * expect(1).to.not.be.true; // Not recommended
672
+ *
673
+ * A custom error message can be given as the second argument to `expect`.
674
+ *
675
+ * expect(false, 'nooo why fail??').to.be.true;
676
+ *
677
+ * @name true
678
+ * @namespace BDD
679
+ * @api public
680
+ */
681
+
682
+ Assertion.addProperty('true', function () {
683
+ this.assert(
684
+ true === flag(this, 'object')
685
+ , 'expected #{this} to be true'
686
+ , 'expected #{this} to be false'
687
+ , flag(this, 'negate') ? false : true
688
+ );
689
+ });
690
+
691
+ /**
692
+ * ### .callable
693
+ *
694
+ * Asserts that the target a callable function.
695
+ *
696
+ * expect(console.log).to.be.callable;
697
+ *
698
+ * A custom error message can be given as the second argument to `expect`.
699
+ *
700
+ * expect('not a function', 'nooo why fail??').to.be.callable;
701
+ *
702
+ * @name callable
703
+ * @namespace BDD
704
+ * @api public
705
+ */
706
+ Assertion.addProperty('callable', function () {
707
+ const val = flag(this, 'object')
708
+ const ssfi = flag(this, 'ssfi')
709
+ const message = flag(this, 'message')
710
+ const msg = message ? `${message}: ` : ''
711
+ const negate = flag(this, 'negate');
712
+
713
+ const assertionMessage = negate ?
714
+ `${msg}expected ${_.inspect(val)} not to be a callable function` :
715
+ `${msg}expected ${_.inspect(val)} to be a callable function`;
716
+
717
+ const isCallable = ['Function', 'AsyncFunction', 'GeneratorFunction', 'AsyncGeneratorFunction'].includes(_.type(val));
718
+
719
+ if ((isCallable && negate) || (!isCallable && !negate)) {
720
+ throw new AssertionError(
721
+ assertionMessage,
722
+ undefined,
723
+ ssfi
724
+ );
725
+ }
726
+ });
727
+
728
+ /**
729
+ * ### .false
730
+ *
731
+ * Asserts that the target is strictly (`===`) equal to `false`.
732
+ *
733
+ * expect(false).to.be.false;
734
+ *
735
+ * Add `.not` earlier in the chain to negate `.false`. However, it's often
736
+ * best to assert that the target is equal to its expected value, rather than
737
+ * not equal to `false`.
738
+ *
739
+ * expect(true).to.be.true; // Recommended
740
+ * expect(true).to.not.be.false; // Not recommended
741
+ *
742
+ * expect(1).to.equal(1); // Recommended
743
+ * expect(1).to.not.be.false; // Not recommended
744
+ *
745
+ * A custom error message can be given as the second argument to `expect`.
746
+ *
747
+ * expect(true, 'nooo why fail??').to.be.false;
748
+ *
749
+ * @name false
750
+ * @namespace BDD
751
+ * @api public
752
+ */
753
+
754
+ Assertion.addProperty('false', function () {
755
+ this.assert(
756
+ false === flag(this, 'object')
757
+ , 'expected #{this} to be false'
758
+ , 'expected #{this} to be true'
759
+ , flag(this, 'negate') ? true : false
760
+ );
761
+ });
762
+
763
+ /**
764
+ * ### .null
765
+ *
766
+ * Asserts that the target is strictly (`===`) equal to `null`.
767
+ *
768
+ * expect(null).to.be.null;
769
+ *
770
+ * Add `.not` earlier in the chain to negate `.null`. However, it's often best
771
+ * to assert that the target is equal to its expected value, rather than not
772
+ * equal to `null`.
773
+ *
774
+ * expect(1).to.equal(1); // Recommended
775
+ * expect(1).to.not.be.null; // Not recommended
776
+ *
777
+ * A custom error message can be given as the second argument to `expect`.
778
+ *
779
+ * expect(42, 'nooo why fail??').to.be.null;
780
+ *
781
+ * @name null
782
+ * @namespace BDD
783
+ * @api public
784
+ */
785
+
786
+ Assertion.addProperty('null', function () {
787
+ this.assert(
788
+ null === flag(this, 'object')
789
+ , 'expected #{this} to be null'
790
+ , 'expected #{this} not to be null'
791
+ );
792
+ });
793
+
794
+ /**
795
+ * ### .undefined
796
+ *
797
+ * Asserts that the target is strictly (`===`) equal to `undefined`.
798
+ *
799
+ * expect(undefined).to.be.undefined;
800
+ *
801
+ * Add `.not` earlier in the chain to negate `.undefined`. However, it's often
802
+ * best to assert that the target is equal to its expected value, rather than
803
+ * not equal to `undefined`.
804
+ *
805
+ * expect(1).to.equal(1); // Recommended
806
+ * expect(1).to.not.be.undefined; // Not recommended
807
+ *
808
+ * A custom error message can be given as the second argument to `expect`.
809
+ *
810
+ * expect(42, 'nooo why fail??').to.be.undefined;
811
+ *
812
+ * @name undefined
813
+ * @namespace BDD
814
+ * @api public
815
+ */
816
+
817
+ Assertion.addProperty('undefined', function () {
818
+ this.assert(
819
+ undefined === flag(this, 'object')
820
+ , 'expected #{this} to be undefined'
821
+ , 'expected #{this} not to be undefined'
822
+ );
823
+ });
824
+
825
+ /**
826
+ * ### .NaN
827
+ *
828
+ * Asserts that the target is exactly `NaN`.
829
+ *
830
+ * expect(NaN).to.be.NaN;
831
+ *
832
+ * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best
833
+ * to assert that the target is equal to its expected value, rather than not
834
+ * equal to `NaN`.
835
+ *
836
+ * expect('foo').to.equal('foo'); // Recommended
837
+ * expect('foo').to.not.be.NaN; // Not recommended
838
+ *
839
+ * A custom error message can be given as the second argument to `expect`.
840
+ *
841
+ * expect(42, 'nooo why fail??').to.be.NaN;
842
+ *
843
+ * @name NaN
844
+ * @namespace BDD
845
+ * @api public
846
+ */
847
+
848
+ Assertion.addProperty('NaN', function () {
849
+ this.assert(
850
+ _.isNaN(flag(this, 'object'))
851
+ , 'expected #{this} to be NaN'
852
+ , 'expected #{this} not to be NaN'
853
+ );
854
+ });
855
+
856
+ /**
857
+ * ### .exist
858
+ *
859
+ * Asserts that the target is not strictly (`===`) equal to either `null` or
860
+ * `undefined`. However, it's often best to assert that the target is equal to
861
+ * its expected value.
862
+ *
863
+ * expect(1).to.equal(1); // Recommended
864
+ * expect(1).to.exist; // Not recommended
865
+ *
866
+ * expect(0).to.equal(0); // Recommended
867
+ * expect(0).to.exist; // Not recommended
868
+ *
869
+ * Add `.not` earlier in the chain to negate `.exist`.
870
+ *
871
+ * expect(null).to.be.null; // Recommended
872
+ * expect(null).to.not.exist; // Not recommended
873
+ *
874
+ * expect(undefined).to.be.undefined; // Recommended
875
+ * expect(undefined).to.not.exist; // Not recommended
876
+ *
877
+ * A custom error message can be given as the second argument to `expect`.
878
+ *
879
+ * expect(null, 'nooo why fail??').to.exist;
880
+ *
881
+ * The alias `.exists` can be used interchangeably with `.exist`.
882
+ *
883
+ * @name exist
884
+ * @alias exists
885
+ * @namespace BDD
886
+ * @api public
887
+ */
888
+
889
+ function assertExist () {
890
+ var val = flag(this, 'object');
891
+ this.assert(
892
+ val !== null && val !== undefined
893
+ , 'expected #{this} to exist'
894
+ , 'expected #{this} to not exist'
895
+ );
896
+ }
897
+
898
+ Assertion.addProperty('exist', assertExist);
899
+ Assertion.addProperty('exists', assertExist);
900
+
901
+ /**
902
+ * ### .empty
903
+ *
904
+ * When the target is a string or array, `.empty` asserts that the target's
905
+ * `length` property is strictly (`===`) equal to `0`.
906
+ *
907
+ * expect([]).to.be.empty;
908
+ * expect('').to.be.empty;
909
+ *
910
+ * When the target is a map or set, `.empty` asserts that the target's `size`
911
+ * property is strictly equal to `0`.
912
+ *
913
+ * expect(new Set()).to.be.empty;
914
+ * expect(new Map()).to.be.empty;
915
+ *
916
+ * When the target is a non-function object, `.empty` asserts that the target
917
+ * doesn't have any own enumerable properties. Properties with Symbol-based
918
+ * keys are excluded from the count.
919
+ *
920
+ * expect({}).to.be.empty;
921
+ *
922
+ * Because `.empty` does different things based on the target's type, it's
923
+ * important to check the target's type before using `.empty`. See the `.a`
924
+ * doc for info on testing a target's type.
925
+ *
926
+ * expect([]).to.be.an('array').that.is.empty;
927
+ *
928
+ * Add `.not` earlier in the chain to negate `.empty`. However, it's often
929
+ * best to assert that the target contains its expected number of values,
930
+ * rather than asserting that it's not empty.
931
+ *
932
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
933
+ * expect([1, 2, 3]).to.not.be.empty; // Not recommended
934
+ *
935
+ * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended
936
+ * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended
937
+ *
938
+ * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended
939
+ * expect({a: 1}).to.not.be.empty; // Not recommended
940
+ *
941
+ * A custom error message can be given as the second argument to `expect`.
942
+ *
943
+ * expect([1, 2, 3], 'nooo why fail??').to.be.empty;
944
+ *
945
+ * @name empty
946
+ * @namespace BDD
947
+ * @api public
948
+ */
949
+
950
+ Assertion.addProperty('empty', function () {
951
+ var val = flag(this, 'object')
952
+ , ssfi = flag(this, 'ssfi')
953
+ , flagMsg = flag(this, 'message')
954
+ , itemsCount;
955
+
956
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
957
+
958
+ switch (_.type(val).toLowerCase()) {
959
+ case 'array':
960
+ case 'string':
961
+ itemsCount = val.length;
962
+ break;
963
+ case 'map':
964
+ case 'set':
965
+ itemsCount = val.size;
966
+ break;
967
+ case 'weakmap':
968
+ case 'weakset':
969
+ throw new AssertionError(
970
+ flagMsg + '.empty was passed a weak collection',
971
+ undefined,
972
+ ssfi
973
+ );
974
+ case 'function':
975
+ var msg = flagMsg + '.empty was passed a function ' + _.getName(val);
976
+ throw new AssertionError(msg.trim(), undefined, ssfi);
977
+ default:
978
+ if (val !== Object(val)) {
979
+ throw new AssertionError(
980
+ flagMsg + '.empty was passed non-string primitive ' + _.inspect(val),
981
+ undefined,
982
+ ssfi
983
+ );
984
+ }
985
+ itemsCount = Object.keys(val).length;
986
+ }
987
+
988
+ this.assert(
989
+ 0 === itemsCount
990
+ , 'expected #{this} to be empty'
991
+ , 'expected #{this} not to be empty'
992
+ );
993
+ });
994
+
995
+ /**
996
+ * ### .arguments
997
+ *
998
+ * Asserts that the target is an `arguments` object.
999
+ *
1000
+ * function test () {
1001
+ * expect(arguments).to.be.arguments;
1002
+ * }
1003
+ *
1004
+ * test();
1005
+ *
1006
+ * Add `.not` earlier in the chain to negate `.arguments`. However, it's often
1007
+ * best to assert which type the target is expected to be, rather than
1008
+ * asserting that it’s not an `arguments` object.
1009
+ *
1010
+ * expect('foo').to.be.a('string'); // Recommended
1011
+ * expect('foo').to.not.be.arguments; // Not recommended
1012
+ *
1013
+ * A custom error message can be given as the second argument to `expect`.
1014
+ *
1015
+ * expect({}, 'nooo why fail??').to.be.arguments;
1016
+ *
1017
+ * The alias `.Arguments` can be used interchangeably with `.arguments`.
1018
+ *
1019
+ * @name arguments
1020
+ * @alias Arguments
1021
+ * @namespace BDD
1022
+ * @api public
1023
+ */
1024
+
1025
+ function checkArguments () {
1026
+ var obj = flag(this, 'object')
1027
+ , type = _.type(obj);
1028
+ this.assert(
1029
+ 'Arguments' === type
1030
+ , 'expected #{this} to be arguments but got ' + type
1031
+ , 'expected #{this} to not be arguments'
1032
+ );
1033
+ }
1034
+
1035
+ Assertion.addProperty('arguments', checkArguments);
1036
+ Assertion.addProperty('Arguments', checkArguments);
1037
+
1038
+ /**
1039
+ * ### .equal(val[, msg])
1040
+ *
1041
+ * Asserts that the target is strictly (`===`) equal to the given `val`.
1042
+ *
1043
+ * expect(1).to.equal(1);
1044
+ * expect('foo').to.equal('foo');
1045
+ *
1046
+ * Add `.deep` earlier in the chain to use deep equality instead. See the
1047
+ * `deep-eql` project page for info on the deep equality algorithm:
1048
+ * https://github.com/chaijs/deep-eql.
1049
+ *
1050
+ * // Target object deeply (but not strictly) equals `{a: 1}`
1051
+ * expect({a: 1}).to.deep.equal({a: 1});
1052
+ * expect({a: 1}).to.not.equal({a: 1});
1053
+ *
1054
+ * // Target array deeply (but not strictly) equals `[1, 2]`
1055
+ * expect([1, 2]).to.deep.equal([1, 2]);
1056
+ * expect([1, 2]).to.not.equal([1, 2]);
1057
+ *
1058
+ * Add `.not` earlier in the chain to negate `.equal`. However, it's often
1059
+ * best to assert that the target is equal to its expected value, rather than
1060
+ * not equal to one of countless unexpected values.
1061
+ *
1062
+ * expect(1).to.equal(1); // Recommended
1063
+ * expect(1).to.not.equal(2); // Not recommended
1064
+ *
1065
+ * `.equal` accepts an optional `msg` argument which is a custom error message
1066
+ * to show when the assertion fails. The message can also be given as the
1067
+ * second argument to `expect`.
1068
+ *
1069
+ * expect(1).to.equal(2, 'nooo why fail??');
1070
+ * expect(1, 'nooo why fail??').to.equal(2);
1071
+ *
1072
+ * The aliases `.equals` and `eq` can be used interchangeably with `.equal`.
1073
+ *
1074
+ * @name equal
1075
+ * @alias equals
1076
+ * @alias eq
1077
+ * @param {Mixed} val
1078
+ * @param {String} msg _optional_
1079
+ * @namespace BDD
1080
+ * @api public
1081
+ */
1082
+
1083
+ function assertEqual (val, msg) {
1084
+ if (msg) flag(this, 'message', msg);
1085
+ var obj = flag(this, 'object');
1086
+ if (flag(this, 'deep')) {
1087
+ var prevLockSsfi = flag(this, 'lockSsfi');
1088
+ flag(this, 'lockSsfi', true);
1089
+ this.eql(val);
1090
+ flag(this, 'lockSsfi', prevLockSsfi);
1091
+ } else {
1092
+ this.assert(
1093
+ val === obj
1094
+ , 'expected #{this} to equal #{exp}'
1095
+ , 'expected #{this} to not equal #{exp}'
1096
+ , val
1097
+ , this._obj
1098
+ , true
1099
+ );
1100
+ }
1101
+ }
1102
+
1103
+ Assertion.addMethod('equal', assertEqual);
1104
+ Assertion.addMethod('equals', assertEqual);
1105
+ Assertion.addMethod('eq', assertEqual);
1106
+
1107
+ /**
1108
+ * ### .eql(obj[, msg])
1109
+ *
1110
+ * Asserts that the target is deeply equal to the given `obj`. See the
1111
+ * `deep-eql` project page for info on the deep equality algorithm:
1112
+ * https://github.com/chaijs/deep-eql.
1113
+ *
1114
+ * // Target object is deeply (but not strictly) equal to {a: 1}
1115
+ * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1});
1116
+ *
1117
+ * // Target array is deeply (but not strictly) equal to [1, 2]
1118
+ * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]);
1119
+ *
1120
+ * Add `.not` earlier in the chain to negate `.eql`. However, it's often best
1121
+ * to assert that the target is deeply equal to its expected value, rather
1122
+ * than not deeply equal to one of countless unexpected values.
1123
+ *
1124
+ * expect({a: 1}).to.eql({a: 1}); // Recommended
1125
+ * expect({a: 1}).to.not.eql({b: 2}); // Not recommended
1126
+ *
1127
+ * `.eql` accepts an optional `msg` argument which is a custom error message
1128
+ * to show when the assertion fails. The message can also be given as the
1129
+ * second argument to `expect`.
1130
+ *
1131
+ * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??');
1132
+ * expect({a: 1}, 'nooo why fail??').to.eql({b: 2});
1133
+ *
1134
+ * The alias `.eqls` can be used interchangeably with `.eql`.
1135
+ *
1136
+ * The `.deep.equal` assertion is almost identical to `.eql` but with one
1137
+ * difference: `.deep.equal` causes deep equality comparisons to also be used
1138
+ * for any other assertions that follow in the chain.
1139
+ *
1140
+ * @name eql
1141
+ * @alias eqls
1142
+ * @param {Mixed} obj
1143
+ * @param {String} msg _optional_
1144
+ * @namespace BDD
1145
+ * @api public
1146
+ */
1147
+
1148
+ function assertEql(obj, msg) {
1149
+ if (msg) flag(this, 'message', msg);
1150
+ var eql = flag(this, 'eql');
1151
+ this.assert(
1152
+ eql(obj, flag(this, 'object'))
1153
+ , 'expected #{this} to deeply equal #{exp}'
1154
+ , 'expected #{this} to not deeply equal #{exp}'
1155
+ , obj
1156
+ , this._obj
1157
+ , true
1158
+ );
1159
+ }
1160
+
1161
+ Assertion.addMethod('eql', assertEql);
1162
+ Assertion.addMethod('eqls', assertEql);
1163
+
1164
+ /**
1165
+ * ### .above(n[, msg])
1166
+ *
1167
+ * Asserts that the target is a number or a date greater than the given number or date `n` respectively.
1168
+ * However, it's often best to assert that the target is equal to its expected
1169
+ * value.
1170
+ *
1171
+ * expect(2).to.equal(2); // Recommended
1172
+ * expect(2).to.be.above(1); // Not recommended
1173
+ *
1174
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1175
+ * or `size` is greater than the given number `n`.
1176
+ *
1177
+ * expect('foo').to.have.lengthOf(3); // Recommended
1178
+ * expect('foo').to.have.lengthOf.above(2); // Not recommended
1179
+ *
1180
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1181
+ * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended
1182
+ *
1183
+ * Add `.not` earlier in the chain to negate `.above`.
1184
+ *
1185
+ * expect(2).to.equal(2); // Recommended
1186
+ * expect(1).to.not.be.above(2); // Not recommended
1187
+ *
1188
+ * `.above` accepts an optional `msg` argument which is a custom error message
1189
+ * to show when the assertion fails. The message can also be given as the
1190
+ * second argument to `expect`.
1191
+ *
1192
+ * expect(1).to.be.above(2, 'nooo why fail??');
1193
+ * expect(1, 'nooo why fail??').to.be.above(2);
1194
+ *
1195
+ * The aliases `.gt` and `.greaterThan` can be used interchangeably with
1196
+ * `.above`.
1197
+ *
1198
+ * @name above
1199
+ * @alias gt
1200
+ * @alias greaterThan
1201
+ * @param {Number} n
1202
+ * @param {String} msg _optional_
1203
+ * @namespace BDD
1204
+ * @api public
1205
+ */
1206
+
1207
+ function assertAbove (n, msg) {
1208
+ if (msg) flag(this, 'message', msg);
1209
+ var obj = flag(this, 'object')
1210
+ , doLength = flag(this, 'doLength')
1211
+ , flagMsg = flag(this, 'message')
1212
+ , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')
1213
+ , ssfi = flag(this, 'ssfi')
1214
+ , objType = _.type(obj).toLowerCase()
1215
+ , nType = _.type(n).toLowerCase()
1216
+ , errorMessage
1217
+ , shouldThrow = true;
1218
+
1219
+ if (doLength && objType !== 'map' && objType !== 'set') {
1220
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1221
+ }
1222
+
1223
+ if (!doLength && (objType === 'date' && nType !== 'date')) {
1224
+ errorMessage = msgPrefix + 'the argument to above must be a date';
1225
+ } else if (nType !== 'number' && (doLength || objType === 'number')) {
1226
+ errorMessage = msgPrefix + 'the argument to above must be a number';
1227
+ } else if (!doLength && (objType !== 'date' && objType !== 'number')) {
1228
+ var printObj = (objType === 'string') ? "'" + obj + "'" : obj;
1229
+ errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1230
+ } else {
1231
+ shouldThrow = false;
1232
+ }
1233
+
1234
+ if (shouldThrow) {
1235
+ throw new AssertionError(errorMessage, undefined, ssfi);
1236
+ }
1237
+
1238
+ if (doLength) {
1239
+ var descriptor = 'length'
1240
+ , itemsCount;
1241
+ if (objType === 'map' || objType === 'set') {
1242
+ descriptor = 'size';
1243
+ itemsCount = obj.size;
1244
+ } else {
1245
+ itemsCount = obj.length;
1246
+ }
1247
+ this.assert(
1248
+ itemsCount > n
1249
+ , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}'
1250
+ , 'expected #{this} to not have a ' + descriptor + ' above #{exp}'
1251
+ , n
1252
+ , itemsCount
1253
+ );
1254
+ } else {
1255
+ this.assert(
1256
+ obj > n
1257
+ , 'expected #{this} to be above #{exp}'
1258
+ , 'expected #{this} to be at most #{exp}'
1259
+ , n
1260
+ );
1261
+ }
1262
+ }
1263
+
1264
+ Assertion.addMethod('above', assertAbove);
1265
+ Assertion.addMethod('gt', assertAbove);
1266
+ Assertion.addMethod('greaterThan', assertAbove);
1267
+
1268
+ /**
1269
+ * ### .least(n[, msg])
1270
+ *
1271
+ * Asserts that the target is a number or a date greater than or equal to the given
1272
+ * number or date `n` respectively. However, it's often best to assert that the target is equal to
1273
+ * its expected value.
1274
+ *
1275
+ * expect(2).to.equal(2); // Recommended
1276
+ * expect(2).to.be.at.least(1); // Not recommended
1277
+ * expect(2).to.be.at.least(2); // Not recommended
1278
+ *
1279
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1280
+ * or `size` is greater than or equal to the given number `n`.
1281
+ *
1282
+ * expect('foo').to.have.lengthOf(3); // Recommended
1283
+ * expect('foo').to.have.lengthOf.at.least(2); // Not recommended
1284
+ *
1285
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1286
+ * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended
1287
+ *
1288
+ * Add `.not` earlier in the chain to negate `.least`.
1289
+ *
1290
+ * expect(1).to.equal(1); // Recommended
1291
+ * expect(1).to.not.be.at.least(2); // Not recommended
1292
+ *
1293
+ * `.least` accepts an optional `msg` argument which is a custom error message
1294
+ * to show when the assertion fails. The message can also be given as the
1295
+ * second argument to `expect`.
1296
+ *
1297
+ * expect(1).to.be.at.least(2, 'nooo why fail??');
1298
+ * expect(1, 'nooo why fail??').to.be.at.least(2);
1299
+ *
1300
+ * The aliases `.gte` and `.greaterThanOrEqual` can be used interchangeably with
1301
+ * `.least`.
1302
+ *
1303
+ * @name least
1304
+ * @alias gte
1305
+ * @alias greaterThanOrEqual
1306
+ * @param {Number} n
1307
+ * @param {String} msg _optional_
1308
+ * @namespace BDD
1309
+ * @api public
1310
+ */
1311
+
1312
+ function assertLeast (n, msg) {
1313
+ if (msg) flag(this, 'message', msg);
1314
+ var obj = flag(this, 'object')
1315
+ , doLength = flag(this, 'doLength')
1316
+ , flagMsg = flag(this, 'message')
1317
+ , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')
1318
+ , ssfi = flag(this, 'ssfi')
1319
+ , objType = _.type(obj).toLowerCase()
1320
+ , nType = _.type(n).toLowerCase()
1321
+ , errorMessage
1322
+ , shouldThrow = true;
1323
+
1324
+ if (doLength && objType !== 'map' && objType !== 'set') {
1325
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1326
+ }
1327
+
1328
+ if (!doLength && (objType === 'date' && nType !== 'date')) {
1329
+ errorMessage = msgPrefix + 'the argument to least must be a date';
1330
+ } else if (nType !== 'number' && (doLength || objType === 'number')) {
1331
+ errorMessage = msgPrefix + 'the argument to least must be a number';
1332
+ } else if (!doLength && (objType !== 'date' && objType !== 'number')) {
1333
+ var printObj = (objType === 'string') ? "'" + obj + "'" : obj;
1334
+ errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1335
+ } else {
1336
+ shouldThrow = false;
1337
+ }
1338
+
1339
+ if (shouldThrow) {
1340
+ throw new AssertionError(errorMessage, undefined, ssfi);
1341
+ }
1342
+
1343
+ if (doLength) {
1344
+ var descriptor = 'length'
1345
+ , itemsCount;
1346
+ if (objType === 'map' || objType === 'set') {
1347
+ descriptor = 'size';
1348
+ itemsCount = obj.size;
1349
+ } else {
1350
+ itemsCount = obj.length;
1351
+ }
1352
+ this.assert(
1353
+ itemsCount >= n
1354
+ , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}'
1355
+ , 'expected #{this} to have a ' + descriptor + ' below #{exp}'
1356
+ , n
1357
+ , itemsCount
1358
+ );
1359
+ } else {
1360
+ this.assert(
1361
+ obj >= n
1362
+ , 'expected #{this} to be at least #{exp}'
1363
+ , 'expected #{this} to be below #{exp}'
1364
+ , n
1365
+ );
1366
+ }
1367
+ }
1368
+
1369
+ Assertion.addMethod('least', assertLeast);
1370
+ Assertion.addMethod('gte', assertLeast);
1371
+ Assertion.addMethod('greaterThanOrEqual', assertLeast);
1372
+
1373
+ /**
1374
+ * ### .below(n[, msg])
1375
+ *
1376
+ * Asserts that the target is a number or a date less than the given number or date `n` respectively.
1377
+ * However, it's often best to assert that the target is equal to its expected
1378
+ * value.
1379
+ *
1380
+ * expect(1).to.equal(1); // Recommended
1381
+ * expect(1).to.be.below(2); // Not recommended
1382
+ *
1383
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1384
+ * or `size` is less than the given number `n`.
1385
+ *
1386
+ * expect('foo').to.have.lengthOf(3); // Recommended
1387
+ * expect('foo').to.have.lengthOf.below(4); // Not recommended
1388
+ *
1389
+ * expect([1, 2, 3]).to.have.length(3); // Recommended
1390
+ * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended
1391
+ *
1392
+ * Add `.not` earlier in the chain to negate `.below`.
1393
+ *
1394
+ * expect(2).to.equal(2); // Recommended
1395
+ * expect(2).to.not.be.below(1); // Not recommended
1396
+ *
1397
+ * `.below` accepts an optional `msg` argument which is a custom error message
1398
+ * to show when the assertion fails. The message can also be given as the
1399
+ * second argument to `expect`.
1400
+ *
1401
+ * expect(2).to.be.below(1, 'nooo why fail??');
1402
+ * expect(2, 'nooo why fail??').to.be.below(1);
1403
+ *
1404
+ * The aliases `.lt` and `.lessThan` can be used interchangeably with
1405
+ * `.below`.
1406
+ *
1407
+ * @name below
1408
+ * @alias lt
1409
+ * @alias lessThan
1410
+ * @param {Number} n
1411
+ * @param {String} msg _optional_
1412
+ * @namespace BDD
1413
+ * @api public
1414
+ */
1415
+
1416
+ function assertBelow (n, msg) {
1417
+ if (msg) flag(this, 'message', msg);
1418
+ var obj = flag(this, 'object')
1419
+ , doLength = flag(this, 'doLength')
1420
+ , flagMsg = flag(this, 'message')
1421
+ , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')
1422
+ , ssfi = flag(this, 'ssfi')
1423
+ , objType = _.type(obj).toLowerCase()
1424
+ , nType = _.type(n).toLowerCase()
1425
+ , errorMessage
1426
+ , shouldThrow = true;
1427
+
1428
+ if (doLength && objType !== 'map' && objType !== 'set') {
1429
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1430
+ }
1431
+
1432
+ if (!doLength && (objType === 'date' && nType !== 'date')) {
1433
+ errorMessage = msgPrefix + 'the argument to below must be a date';
1434
+ } else if (nType !== 'number' && (doLength || objType === 'number')) {
1435
+ errorMessage = msgPrefix + 'the argument to below must be a number';
1436
+ } else if (!doLength && (objType !== 'date' && objType !== 'number')) {
1437
+ var printObj = (objType === 'string') ? "'" + obj + "'" : obj;
1438
+ errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1439
+ } else {
1440
+ shouldThrow = false;
1441
+ }
1442
+
1443
+ if (shouldThrow) {
1444
+ throw new AssertionError(errorMessage, undefined, ssfi);
1445
+ }
1446
+
1447
+ if (doLength) {
1448
+ var descriptor = 'length'
1449
+ , itemsCount;
1450
+ if (objType === 'map' || objType === 'set') {
1451
+ descriptor = 'size';
1452
+ itemsCount = obj.size;
1453
+ } else {
1454
+ itemsCount = obj.length;
1455
+ }
1456
+ this.assert(
1457
+ itemsCount < n
1458
+ , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}'
1459
+ , 'expected #{this} to not have a ' + descriptor + ' below #{exp}'
1460
+ , n
1461
+ , itemsCount
1462
+ );
1463
+ } else {
1464
+ this.assert(
1465
+ obj < n
1466
+ , 'expected #{this} to be below #{exp}'
1467
+ , 'expected #{this} to be at least #{exp}'
1468
+ , n
1469
+ );
1470
+ }
1471
+ }
1472
+
1473
+ Assertion.addMethod('below', assertBelow);
1474
+ Assertion.addMethod('lt', assertBelow);
1475
+ Assertion.addMethod('lessThan', assertBelow);
1476
+
1477
+ /**
1478
+ * ### .most(n[, msg])
1479
+ *
1480
+ * Asserts that the target is a number or a date less than or equal to the given number
1481
+ * or date `n` respectively. However, it's often best to assert that the target is equal to its
1482
+ * expected value.
1483
+ *
1484
+ * expect(1).to.equal(1); // Recommended
1485
+ * expect(1).to.be.at.most(2); // Not recommended
1486
+ * expect(1).to.be.at.most(1); // Not recommended
1487
+ *
1488
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1489
+ * or `size` is less than or equal to the given number `n`.
1490
+ *
1491
+ * expect('foo').to.have.lengthOf(3); // Recommended
1492
+ * expect('foo').to.have.lengthOf.at.most(4); // Not recommended
1493
+ *
1494
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1495
+ * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended
1496
+ *
1497
+ * Add `.not` earlier in the chain to negate `.most`.
1498
+ *
1499
+ * expect(2).to.equal(2); // Recommended
1500
+ * expect(2).to.not.be.at.most(1); // Not recommended
1501
+ *
1502
+ * `.most` accepts an optional `msg` argument which is a custom error message
1503
+ * to show when the assertion fails. The message can also be given as the
1504
+ * second argument to `expect`.
1505
+ *
1506
+ * expect(2).to.be.at.most(1, 'nooo why fail??');
1507
+ * expect(2, 'nooo why fail??').to.be.at.most(1);
1508
+ *
1509
+ * The aliases `.lte` and `.lessThanOrEqual` can be used interchangeably with
1510
+ * `.most`.
1511
+ *
1512
+ * @name most
1513
+ * @alias lte
1514
+ * @alias lessThanOrEqual
1515
+ * @param {Number} n
1516
+ * @param {String} msg _optional_
1517
+ * @namespace BDD
1518
+ * @api public
1519
+ */
1520
+
1521
+ function assertMost (n, msg) {
1522
+ if (msg) flag(this, 'message', msg);
1523
+ var obj = flag(this, 'object')
1524
+ , doLength = flag(this, 'doLength')
1525
+ , flagMsg = flag(this, 'message')
1526
+ , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')
1527
+ , ssfi = flag(this, 'ssfi')
1528
+ , objType = _.type(obj).toLowerCase()
1529
+ , nType = _.type(n).toLowerCase()
1530
+ , errorMessage
1531
+ , shouldThrow = true;
1532
+
1533
+ if (doLength && objType !== 'map' && objType !== 'set') {
1534
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1535
+ }
1536
+
1537
+ if (!doLength && (objType === 'date' && nType !== 'date')) {
1538
+ errorMessage = msgPrefix + 'the argument to most must be a date';
1539
+ } else if (nType !== 'number' && (doLength || objType === 'number')) {
1540
+ errorMessage = msgPrefix + 'the argument to most must be a number';
1541
+ } else if (!doLength && (objType !== 'date' && objType !== 'number')) {
1542
+ var printObj = (objType === 'string') ? "'" + obj + "'" : obj;
1543
+ errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1544
+ } else {
1545
+ shouldThrow = false;
1546
+ }
1547
+
1548
+ if (shouldThrow) {
1549
+ throw new AssertionError(errorMessage, undefined, ssfi);
1550
+ }
1551
+
1552
+ if (doLength) {
1553
+ var descriptor = 'length'
1554
+ , itemsCount;
1555
+ if (objType === 'map' || objType === 'set') {
1556
+ descriptor = 'size';
1557
+ itemsCount = obj.size;
1558
+ } else {
1559
+ itemsCount = obj.length;
1560
+ }
1561
+ this.assert(
1562
+ itemsCount <= n
1563
+ , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}'
1564
+ , 'expected #{this} to have a ' + descriptor + ' above #{exp}'
1565
+ , n
1566
+ , itemsCount
1567
+ );
1568
+ } else {
1569
+ this.assert(
1570
+ obj <= n
1571
+ , 'expected #{this} to be at most #{exp}'
1572
+ , 'expected #{this} to be above #{exp}'
1573
+ , n
1574
+ );
1575
+ }
1576
+ }
1577
+
1578
+ Assertion.addMethod('most', assertMost);
1579
+ Assertion.addMethod('lte', assertMost);
1580
+ Assertion.addMethod('lessThanOrEqual', assertMost);
1581
+
1582
+ /**
1583
+ * ### .within(start, finish[, msg])
1584
+ *
1585
+ * Asserts that the target is a number or a date greater than or equal to the given
1586
+ * number or date `start`, and less than or equal to the given number or date `finish` respectively.
1587
+ * However, it's often best to assert that the target is equal to its expected
1588
+ * value.
1589
+ *
1590
+ * expect(2).to.equal(2); // Recommended
1591
+ * expect(2).to.be.within(1, 3); // Not recommended
1592
+ * expect(2).to.be.within(2, 3); // Not recommended
1593
+ * expect(2).to.be.within(1, 2); // Not recommended
1594
+ *
1595
+ * Add `.lengthOf` earlier in the chain to assert that the target's `length`
1596
+ * or `size` is greater than or equal to the given number `start`, and less
1597
+ * than or equal to the given number `finish`.
1598
+ *
1599
+ * expect('foo').to.have.lengthOf(3); // Recommended
1600
+ * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended
1601
+ *
1602
+ * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended
1603
+ * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended
1604
+ *
1605
+ * Add `.not` earlier in the chain to negate `.within`.
1606
+ *
1607
+ * expect(1).to.equal(1); // Recommended
1608
+ * expect(1).to.not.be.within(2, 4); // Not recommended
1609
+ *
1610
+ * `.within` accepts an optional `msg` argument which is a custom error
1611
+ * message to show when the assertion fails. The message can also be given as
1612
+ * the second argument to `expect`.
1613
+ *
1614
+ * expect(4).to.be.within(1, 3, 'nooo why fail??');
1615
+ * expect(4, 'nooo why fail??').to.be.within(1, 3);
1616
+ *
1617
+ * @name within
1618
+ * @param {Number} start lower bound inclusive
1619
+ * @param {Number} finish upper bound inclusive
1620
+ * @param {String} msg _optional_
1621
+ * @namespace BDD
1622
+ * @api public
1623
+ */
1624
+
1625
+ Assertion.addMethod('within', function (start, finish, msg) {
1626
+ if (msg) flag(this, 'message', msg);
1627
+ var obj = flag(this, 'object')
1628
+ , doLength = flag(this, 'doLength')
1629
+ , flagMsg = flag(this, 'message')
1630
+ , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '')
1631
+ , ssfi = flag(this, 'ssfi')
1632
+ , objType = _.type(obj).toLowerCase()
1633
+ , startType = _.type(start).toLowerCase()
1634
+ , finishType = _.type(finish).toLowerCase()
1635
+ , errorMessage
1636
+ , shouldThrow = true
1637
+ , range = (startType === 'date' && finishType === 'date')
1638
+ ? start.toISOString() + '..' + finish.toISOString()
1639
+ : start + '..' + finish;
1640
+
1641
+ if (doLength && objType !== 'map' && objType !== 'set') {
1642
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
1643
+ }
1644
+
1645
+ if (!doLength && (objType === 'date' && (startType !== 'date' || finishType !== 'date'))) {
1646
+ errorMessage = msgPrefix + 'the arguments to within must be dates';
1647
+ } else if ((startType !== 'number' || finishType !== 'number') && (doLength || objType === 'number')) {
1648
+ errorMessage = msgPrefix + 'the arguments to within must be numbers';
1649
+ } else if (!doLength && (objType !== 'date' && objType !== 'number')) {
1650
+ var printObj = (objType === 'string') ? "'" + obj + "'" : obj;
1651
+ errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date';
1652
+ } else {
1653
+ shouldThrow = false;
1654
+ }
1655
+
1656
+ if (shouldThrow) {
1657
+ throw new AssertionError(errorMessage, undefined, ssfi);
1658
+ }
1659
+
1660
+ if (doLength) {
1661
+ var descriptor = 'length'
1662
+ , itemsCount;
1663
+ if (objType === 'map' || objType === 'set') {
1664
+ descriptor = 'size';
1665
+ itemsCount = obj.size;
1666
+ } else {
1667
+ itemsCount = obj.length;
1668
+ }
1669
+ this.assert(
1670
+ itemsCount >= start && itemsCount <= finish
1671
+ , 'expected #{this} to have a ' + descriptor + ' within ' + range
1672
+ , 'expected #{this} to not have a ' + descriptor + ' within ' + range
1673
+ );
1674
+ } else {
1675
+ this.assert(
1676
+ obj >= start && obj <= finish
1677
+ , 'expected #{this} to be within ' + range
1678
+ , 'expected #{this} to not be within ' + range
1679
+ );
1680
+ }
1681
+ });
1682
+
1683
+ /**
1684
+ * ### .instanceof(constructor[, msg])
1685
+ *
1686
+ * Asserts that the target is an instance of the given `constructor`.
1687
+ *
1688
+ * function Cat () { }
1689
+ *
1690
+ * expect(new Cat()).to.be.an.instanceof(Cat);
1691
+ * expect([1, 2]).to.be.an.instanceof(Array);
1692
+ *
1693
+ * Add `.not` earlier in the chain to negate `.instanceof`.
1694
+ *
1695
+ * expect({a: 1}).to.not.be.an.instanceof(Array);
1696
+ *
1697
+ * `.instanceof` accepts an optional `msg` argument which is a custom error
1698
+ * message to show when the assertion fails. The message can also be given as
1699
+ * the second argument to `expect`.
1700
+ *
1701
+ * expect(1).to.be.an.instanceof(Array, 'nooo why fail??');
1702
+ * expect(1, 'nooo why fail??').to.be.an.instanceof(Array);
1703
+ *
1704
+ * Due to limitations in ES5, `.instanceof` may not always work as expected
1705
+ * when using a transpiler such as Babel or TypeScript. In particular, it may
1706
+ * produce unexpected results when subclassing built-in object such as
1707
+ * `Array`, `Error`, and `Map`. See your transpiler's docs for details:
1708
+ *
1709
+ * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))
1710
+ * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))
1711
+ *
1712
+ * The alias `.instanceOf` can be used interchangeably with `.instanceof`.
1713
+ *
1714
+ * @name instanceof
1715
+ * @param {Constructor} constructor
1716
+ * @param {String} msg _optional_
1717
+ * @alias instanceOf
1718
+ * @namespace BDD
1719
+ * @api public
1720
+ */
1721
+
1722
+ function assertInstanceOf (constructor, msg) {
1723
+ if (msg) flag(this, 'message', msg);
1724
+
1725
+ var target = flag(this, 'object')
1726
+ var ssfi = flag(this, 'ssfi');
1727
+ var flagMsg = flag(this, 'message');
1728
+
1729
+ try {
1730
+ var isInstanceOf = target instanceof constructor;
1731
+ } catch (err) {
1732
+ if (err instanceof TypeError) {
1733
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
1734
+ throw new AssertionError(
1735
+ flagMsg + 'The instanceof assertion needs a constructor but '
1736
+ + _.type(constructor) + ' was given.',
1737
+ undefined,
1738
+ ssfi
1739
+ );
1740
+ }
1741
+ throw err;
1742
+ }
1743
+
1744
+ var name = _.getName(constructor);
1745
+ if (name == null) {
1746
+ name = 'an unnamed constructor';
1747
+ }
1748
+
1749
+ this.assert(
1750
+ isInstanceOf
1751
+ , 'expected #{this} to be an instance of ' + name
1752
+ , 'expected #{this} to not be an instance of ' + name
1753
+ );
1754
+ };
1755
+
1756
+ Assertion.addMethod('instanceof', assertInstanceOf);
1757
+ Assertion.addMethod('instanceOf', assertInstanceOf);
1758
+
1759
+ /**
1760
+ * ### .property(name[, val[, msg]])
1761
+ *
1762
+ * Asserts that the target has a property with the given key `name`.
1763
+ *
1764
+ * expect({a: 1}).to.have.property('a');
1765
+ *
1766
+ * When `val` is provided, `.property` also asserts that the property's value
1767
+ * is equal to the given `val`.
1768
+ *
1769
+ * expect({a: 1}).to.have.property('a', 1);
1770
+ *
1771
+ * By default, strict (`===`) equality is used. Add `.deep` earlier in the
1772
+ * chain to use deep equality instead. See the `deep-eql` project page for
1773
+ * info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
1774
+ *
1775
+ * // Target object deeply (but not strictly) has property `x: {a: 1}`
1776
+ * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});
1777
+ * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});
1778
+ *
1779
+ * The target's enumerable and non-enumerable properties are always included
1780
+ * in the search. By default, both own and inherited properties are included.
1781
+ * Add `.own` earlier in the chain to exclude inherited properties from the
1782
+ * search.
1783
+ *
1784
+ * Object.prototype.b = 2;
1785
+ *
1786
+ * expect({a: 1}).to.have.own.property('a');
1787
+ * expect({a: 1}).to.have.own.property('a', 1);
1788
+ * expect({a: 1}).to.have.property('b');
1789
+ * expect({a: 1}).to.not.have.own.property('b');
1790
+ *
1791
+ * `.deep` and `.own` can be combined.
1792
+ *
1793
+ * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1});
1794
+ *
1795
+ * Add `.nested` earlier in the chain to enable dot- and bracket-notation when
1796
+ * referencing nested properties.
1797
+ *
1798
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]');
1799
+ * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y');
1800
+ *
1801
+ * If `.` or `[]` are part of an actual property name, they can be escaped by
1802
+ * adding two backslashes before them.
1803
+ *
1804
+ * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]');
1805
+ *
1806
+ * `.deep` and `.nested` can be combined.
1807
+ *
1808
+ * expect({a: {b: [{c: 3}]}})
1809
+ * .to.have.deep.nested.property('a.b[0]', {c: 3});
1810
+ *
1811
+ * `.own` and `.nested` cannot be combined.
1812
+ *
1813
+ * Add `.not` earlier in the chain to negate `.property`.
1814
+ *
1815
+ * expect({a: 1}).to.not.have.property('b');
1816
+ *
1817
+ * However, it's dangerous to negate `.property` when providing `val`. The
1818
+ * problem is that it creates uncertain expectations by asserting that the
1819
+ * target either doesn't have a property with the given key `name`, or that it
1820
+ * does have a property with the given key `name` but its value isn't equal to
1821
+ * the given `val`. It's often best to identify the exact output that's
1822
+ * expected, and then write an assertion that only accepts that exact output.
1823
+ *
1824
+ * When the target isn't expected to have a property with the given key
1825
+ * `name`, it's often best to assert exactly that.
1826
+ *
1827
+ * expect({b: 2}).to.not.have.property('a'); // Recommended
1828
+ * expect({b: 2}).to.not.have.property('a', 1); // Not recommended
1829
+ *
1830
+ * When the target is expected to have a property with the given key `name`,
1831
+ * it's often best to assert that the property has its expected value, rather
1832
+ * than asserting that it doesn't have one of many unexpected values.
1833
+ *
1834
+ * expect({a: 3}).to.have.property('a', 3); // Recommended
1835
+ * expect({a: 3}).to.not.have.property('a', 1); // Not recommended
1836
+ *
1837
+ * `.property` changes the target of any assertions that follow in the chain
1838
+ * to be the value of the property from the original target object.
1839
+ *
1840
+ * expect({a: 1}).to.have.property('a').that.is.a('number');
1841
+ *
1842
+ * `.property` accepts an optional `msg` argument which is a custom error
1843
+ * message to show when the assertion fails. The message can also be given as
1844
+ * the second argument to `expect`. When not providing `val`, only use the
1845
+ * second form.
1846
+ *
1847
+ * // Recommended
1848
+ * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??');
1849
+ * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2);
1850
+ * expect({a: 1}, 'nooo why fail??').to.have.property('b');
1851
+ *
1852
+ * // Not recommended
1853
+ * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??');
1854
+ *
1855
+ * The above assertion isn't the same thing as not providing `val`. Instead,
1856
+ * it's asserting that the target object has a `b` property that's equal to
1857
+ * `undefined`.
1858
+ *
1859
+ * The assertions `.ownProperty` and `.haveOwnProperty` can be used
1860
+ * interchangeably with `.own.property`.
1861
+ *
1862
+ * @name property
1863
+ * @param {String} name
1864
+ * @param {Mixed} val (optional)
1865
+ * @param {String} msg _optional_
1866
+ * @returns value of property for chaining
1867
+ * @namespace BDD
1868
+ * @api public
1869
+ */
1870
+
1871
+ function assertProperty (name, val, msg) {
1872
+ if (msg) flag(this, 'message', msg);
1873
+
1874
+ var isNested = flag(this, 'nested')
1875
+ , isOwn = flag(this, 'own')
1876
+ , flagMsg = flag(this, 'message')
1877
+ , obj = flag(this, 'object')
1878
+ , ssfi = flag(this, 'ssfi')
1879
+ , nameType = typeof name;
1880
+
1881
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
1882
+
1883
+ if (isNested) {
1884
+ if (nameType !== 'string') {
1885
+ throw new AssertionError(
1886
+ flagMsg + 'the argument to property must be a string when using nested syntax',
1887
+ undefined,
1888
+ ssfi
1889
+ );
1890
+ }
1891
+ } else {
1892
+ if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') {
1893
+ throw new AssertionError(
1894
+ flagMsg + 'the argument to property must be a string, number, or symbol',
1895
+ undefined,
1896
+ ssfi
1897
+ );
1898
+ }
1899
+ }
1900
+
1901
+ if (isNested && isOwn) {
1902
+ throw new AssertionError(
1903
+ flagMsg + 'The "nested" and "own" flags cannot be combined.',
1904
+ undefined,
1905
+ ssfi
1906
+ );
1907
+ }
1908
+
1909
+ if (obj === null || obj === undefined) {
1910
+ throw new AssertionError(
1911
+ flagMsg + 'Target cannot be null or undefined.',
1912
+ undefined,
1913
+ ssfi
1914
+ );
1915
+ }
1916
+
1917
+ var isDeep = flag(this, 'deep')
1918
+ , negate = flag(this, 'negate')
1919
+ , pathInfo = isNested ? _.getPathInfo(obj, name) : null
1920
+ , value = isNested ? pathInfo.value : obj[name]
1921
+ , isEql = isDeep ? flag(this, 'eql') : (val1, val2) => val1 === val2;
1922
+
1923
+ var descriptor = '';
1924
+ if (isDeep) descriptor += 'deep ';
1925
+ if (isOwn) descriptor += 'own ';
1926
+ if (isNested) descriptor += 'nested ';
1927
+ descriptor += 'property ';
1928
+
1929
+ var hasProperty;
1930
+ if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name);
1931
+ else if (isNested) hasProperty = pathInfo.exists;
1932
+ else hasProperty = _.hasProperty(obj, name);
1933
+
1934
+ // When performing a negated assertion for both name and val, merely having
1935
+ // a property with the given name isn't enough to cause the assertion to
1936
+ // fail. It must both have a property with the given name, and the value of
1937
+ // that property must equal the given val. Therefore, skip this assertion in
1938
+ // favor of the next.
1939
+ if (!negate || arguments.length === 1) {
1940
+ this.assert(
1941
+ hasProperty
1942
+ , 'expected #{this} to have ' + descriptor + _.inspect(name)
1943
+ , 'expected #{this} to not have ' + descriptor + _.inspect(name));
1944
+ }
1945
+
1946
+ if (arguments.length > 1) {
1947
+ this.assert(
1948
+ hasProperty && isEql(val, value)
1949
+ , 'expected #{this} to have ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'
1950
+ , 'expected #{this} to not have ' + descriptor + _.inspect(name) + ' of #{act}'
1951
+ , val
1952
+ , value
1953
+ );
1954
+ }
1955
+
1956
+ flag(this, 'object', value);
1957
+ }
1958
+
1959
+ Assertion.addMethod('property', assertProperty);
1960
+
1961
+ function assertOwnProperty (name, value, msg) {
1962
+ flag(this, 'own', true);
1963
+ assertProperty.apply(this, arguments);
1964
+ }
1965
+
1966
+ Assertion.addMethod('ownProperty', assertOwnProperty);
1967
+ Assertion.addMethod('haveOwnProperty', assertOwnProperty);
1968
+
1969
+ /**
1970
+ * ### .ownPropertyDescriptor(name[, descriptor[, msg]])
1971
+ *
1972
+ * Asserts that the target has its own property descriptor with the given key
1973
+ * `name`. Enumerable and non-enumerable properties are included in the
1974
+ * search.
1975
+ *
1976
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a');
1977
+ *
1978
+ * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that
1979
+ * the property's descriptor is deeply equal to the given `descriptor`. See
1980
+ * the `deep-eql` project page for info on the deep equality algorithm:
1981
+ * https://github.com/chaijs/deep-eql.
1982
+ *
1983
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a', {
1984
+ * configurable: true,
1985
+ * enumerable: true,
1986
+ * writable: true,
1987
+ * value: 1,
1988
+ * });
1989
+ *
1990
+ * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`.
1991
+ *
1992
+ * expect({a: 1}).to.not.have.ownPropertyDescriptor('b');
1993
+ *
1994
+ * However, it's dangerous to negate `.ownPropertyDescriptor` when providing
1995
+ * a `descriptor`. The problem is that it creates uncertain expectations by
1996
+ * asserting that the target either doesn't have a property descriptor with
1997
+ * the given key `name`, or that it does have a property descriptor with the
1998
+ * given key `name` but it’s not deeply equal to the given `descriptor`. It's
1999
+ * often best to identify the exact output that's expected, and then write an
2000
+ * assertion that only accepts that exact output.
2001
+ *
2002
+ * When the target isn't expected to have a property descriptor with the given
2003
+ * key `name`, it's often best to assert exactly that.
2004
+ *
2005
+ * // Recommended
2006
+ * expect({b: 2}).to.not.have.ownPropertyDescriptor('a');
2007
+ *
2008
+ * // Not recommended
2009
+ * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', {
2010
+ * configurable: true,
2011
+ * enumerable: true,
2012
+ * writable: true,
2013
+ * value: 1,
2014
+ * });
2015
+ *
2016
+ * When the target is expected to have a property descriptor with the given
2017
+ * key `name`, it's often best to assert that the property has its expected
2018
+ * descriptor, rather than asserting that it doesn't have one of many
2019
+ * unexpected descriptors.
2020
+ *
2021
+ * // Recommended
2022
+ * expect({a: 3}).to.have.ownPropertyDescriptor('a', {
2023
+ * configurable: true,
2024
+ * enumerable: true,
2025
+ * writable: true,
2026
+ * value: 3,
2027
+ * });
2028
+ *
2029
+ * // Not recommended
2030
+ * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', {
2031
+ * configurable: true,
2032
+ * enumerable: true,
2033
+ * writable: true,
2034
+ * value: 1,
2035
+ * });
2036
+ *
2037
+ * `.ownPropertyDescriptor` changes the target of any assertions that follow
2038
+ * in the chain to be the value of the property descriptor from the original
2039
+ * target object.
2040
+ *
2041
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a')
2042
+ * .that.has.property('enumerable', true);
2043
+ *
2044
+ * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a
2045
+ * custom error message to show when the assertion fails. The message can also
2046
+ * be given as the second argument to `expect`. When not providing
2047
+ * `descriptor`, only use the second form.
2048
+ *
2049
+ * // Recommended
2050
+ * expect({a: 1}).to.have.ownPropertyDescriptor('a', {
2051
+ * configurable: true,
2052
+ * enumerable: true,
2053
+ * writable: true,
2054
+ * value: 2,
2055
+ * }, 'nooo why fail??');
2056
+ *
2057
+ * // Recommended
2058
+ * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', {
2059
+ * configurable: true,
2060
+ * enumerable: true,
2061
+ * writable: true,
2062
+ * value: 2,
2063
+ * });
2064
+ *
2065
+ * // Recommended
2066
+ * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b');
2067
+ *
2068
+ * // Not recommended
2069
+ * expect({a: 1})
2070
+ * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??');
2071
+ *
2072
+ * The above assertion isn't the same thing as not providing `descriptor`.
2073
+ * Instead, it's asserting that the target object has a `b` property
2074
+ * descriptor that's deeply equal to `undefined`.
2075
+ *
2076
+ * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with
2077
+ * `.ownPropertyDescriptor`.
2078
+ *
2079
+ * @name ownPropertyDescriptor
2080
+ * @alias haveOwnPropertyDescriptor
2081
+ * @param {String} name
2082
+ * @param {Object} descriptor _optional_
2083
+ * @param {String} msg _optional_
2084
+ * @namespace BDD
2085
+ * @api public
2086
+ */
2087
+
2088
+ function assertOwnPropertyDescriptor (name, descriptor, msg) {
2089
+ if (typeof descriptor === 'string') {
2090
+ msg = descriptor;
2091
+ descriptor = null;
2092
+ }
2093
+ if (msg) flag(this, 'message', msg);
2094
+ var obj = flag(this, 'object');
2095
+ var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);
2096
+ var eql = flag(this, 'eql');
2097
+ if (actualDescriptor && descriptor) {
2098
+ this.assert(
2099
+ eql(descriptor, actualDescriptor)
2100
+ , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor)
2101
+ , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor)
2102
+ , descriptor
2103
+ , actualDescriptor
2104
+ , true
2105
+ );
2106
+ } else {
2107
+ this.assert(
2108
+ actualDescriptor
2109
+ , 'expected #{this} to have an own property descriptor for ' + _.inspect(name)
2110
+ , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name)
2111
+ );
2112
+ }
2113
+ flag(this, 'object', actualDescriptor);
2114
+ }
2115
+
2116
+ Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);
2117
+ Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);
2118
+
2119
+ /**
2120
+ * ### .lengthOf(n[, msg])
2121
+ *
2122
+ * Asserts that the target's `length` or `size` is equal to the given number
2123
+ * `n`.
2124
+ *
2125
+ * expect([1, 2, 3]).to.have.lengthOf(3);
2126
+ * expect('foo').to.have.lengthOf(3);
2127
+ * expect(new Set([1, 2, 3])).to.have.lengthOf(3);
2128
+ * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3);
2129
+ *
2130
+ * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often
2131
+ * best to assert that the target's `length` property is equal to its expected
2132
+ * value, rather than not equal to one of many unexpected values.
2133
+ *
2134
+ * expect('foo').to.have.lengthOf(3); // Recommended
2135
+ * expect('foo').to.not.have.lengthOf(4); // Not recommended
2136
+ *
2137
+ * `.lengthOf` accepts an optional `msg` argument which is a custom error
2138
+ * message to show when the assertion fails. The message can also be given as
2139
+ * the second argument to `expect`.
2140
+ *
2141
+ * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??');
2142
+ * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2);
2143
+ *
2144
+ * `.lengthOf` can also be used as a language chain, causing all `.above`,
2145
+ * `.below`, `.least`, `.most`, and `.within` assertions that follow in the
2146
+ * chain to use the target's `length` property as the target. However, it's
2147
+ * often best to assert that the target's `length` property is equal to its
2148
+ * expected length, rather than asserting that its `length` property falls
2149
+ * within some range of values.
2150
+ *
2151
+ * // Recommended
2152
+ * expect([1, 2, 3]).to.have.lengthOf(3);
2153
+ *
2154
+ * // Not recommended
2155
+ * expect([1, 2, 3]).to.have.lengthOf.above(2);
2156
+ * expect([1, 2, 3]).to.have.lengthOf.below(4);
2157
+ * expect([1, 2, 3]).to.have.lengthOf.at.least(3);
2158
+ * expect([1, 2, 3]).to.have.lengthOf.at.most(3);
2159
+ * expect([1, 2, 3]).to.have.lengthOf.within(2,4);
2160
+ *
2161
+ * Due to a compatibility issue, the alias `.length` can't be chained directly
2162
+ * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used
2163
+ * interchangeably with `.lengthOf` in every situation. It's recommended to
2164
+ * always use `.lengthOf` instead of `.length`.
2165
+ *
2166
+ * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error
2167
+ * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected
2168
+ *
2169
+ * @name lengthOf
2170
+ * @alias length
2171
+ * @param {Number} n
2172
+ * @param {String} msg _optional_
2173
+ * @namespace BDD
2174
+ * @api public
2175
+ */
2176
+
2177
+ function assertLengthChain () {
2178
+ flag(this, 'doLength', true);
2179
+ }
2180
+
2181
+ function assertLength (n, msg) {
2182
+ if (msg) flag(this, 'message', msg);
2183
+ var obj = flag(this, 'object')
2184
+ , objType = _.type(obj).toLowerCase()
2185
+ , flagMsg = flag(this, 'message')
2186
+ , ssfi = flag(this, 'ssfi')
2187
+ , descriptor = 'length'
2188
+ , itemsCount;
2189
+
2190
+ switch (objType) {
2191
+ case 'map':
2192
+ case 'set':
2193
+ descriptor = 'size';
2194
+ itemsCount = obj.size;
2195
+ break;
2196
+ default:
2197
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property('length');
2198
+ itemsCount = obj.length;
2199
+ }
2200
+
2201
+ this.assert(
2202
+ itemsCount == n
2203
+ , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}'
2204
+ , 'expected #{this} to not have a ' + descriptor + ' of #{act}'
2205
+ , n
2206
+ , itemsCount
2207
+ );
2208
+ }
2209
+
2210
+ Assertion.addChainableMethod('length', assertLength, assertLengthChain);
2211
+ Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain);
2212
+
2213
+ /**
2214
+ * ### .match(re[, msg])
2215
+ *
2216
+ * Asserts that the target matches the given regular expression `re`.
2217
+ *
2218
+ * expect('foobar').to.match(/^foo/);
2219
+ *
2220
+ * Add `.not` earlier in the chain to negate `.match`.
2221
+ *
2222
+ * expect('foobar').to.not.match(/taco/);
2223
+ *
2224
+ * `.match` accepts an optional `msg` argument which is a custom error message
2225
+ * to show when the assertion fails. The message can also be given as the
2226
+ * second argument to `expect`.
2227
+ *
2228
+ * expect('foobar').to.match(/taco/, 'nooo why fail??');
2229
+ * expect('foobar', 'nooo why fail??').to.match(/taco/);
2230
+ *
2231
+ * The alias `.matches` can be used interchangeably with `.match`.
2232
+ *
2233
+ * @name match
2234
+ * @alias matches
2235
+ * @param {RegExp} re
2236
+ * @param {String} msg _optional_
2237
+ * @namespace BDD
2238
+ * @api public
2239
+ */
2240
+ function assertMatch(re, msg) {
2241
+ if (msg) flag(this, 'message', msg);
2242
+ var obj = flag(this, 'object');
2243
+ this.assert(
2244
+ re.exec(obj)
2245
+ , 'expected #{this} to match ' + re
2246
+ , 'expected #{this} not to match ' + re
2247
+ );
2248
+ }
2249
+
2250
+ Assertion.addMethod('match', assertMatch);
2251
+ Assertion.addMethod('matches', assertMatch);
2252
+
2253
+ /**
2254
+ * ### .string(str[, msg])
2255
+ *
2256
+ * Asserts that the target string contains the given substring `str`.
2257
+ *
2258
+ * expect('foobar').to.have.string('bar');
2259
+ *
2260
+ * Add `.not` earlier in the chain to negate `.string`.
2261
+ *
2262
+ * expect('foobar').to.not.have.string('taco');
2263
+ *
2264
+ * `.string` accepts an optional `msg` argument which is a custom error
2265
+ * message to show when the assertion fails. The message can also be given as
2266
+ * the second argument to `expect`.
2267
+ *
2268
+ * expect('foobar').to.have.string('taco', 'nooo why fail??');
2269
+ * expect('foobar', 'nooo why fail??').to.have.string('taco');
2270
+ *
2271
+ * @name string
2272
+ * @param {String} str
2273
+ * @param {String} msg _optional_
2274
+ * @namespace BDD
2275
+ * @api public
2276
+ */
2277
+
2278
+ Assertion.addMethod('string', function (str, msg) {
2279
+ if (msg) flag(this, 'message', msg);
2280
+ var obj = flag(this, 'object')
2281
+ , flagMsg = flag(this, 'message')
2282
+ , ssfi = flag(this, 'ssfi');
2283
+ new Assertion(obj, flagMsg, ssfi, true).is.a('string');
2284
+
2285
+ this.assert(
2286
+ ~obj.indexOf(str)
2287
+ , 'expected #{this} to contain ' + _.inspect(str)
2288
+ , 'expected #{this} to not contain ' + _.inspect(str)
2289
+ );
2290
+ });
2291
+
2292
+ /**
2293
+ * ### .keys(key1[, key2[, ...]])
2294
+ *
2295
+ * Asserts that the target object, array, map, or set has the given keys. Only
2296
+ * the target's own inherited properties are included in the search.
2297
+ *
2298
+ * When the target is an object or array, keys can be provided as one or more
2299
+ * string arguments, a single array argument, or a single object argument. In
2300
+ * the latter case, only the keys in the given object matter; the values are
2301
+ * ignored.
2302
+ *
2303
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
2304
+ * expect(['x', 'y']).to.have.all.keys(0, 1);
2305
+ *
2306
+ * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']);
2307
+ * expect(['x', 'y']).to.have.all.keys([0, 1]);
2308
+ *
2309
+ * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5
2310
+ * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5
2311
+ *
2312
+ * When the target is a map or set, each key must be provided as a separate
2313
+ * argument.
2314
+ *
2315
+ * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b');
2316
+ * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b');
2317
+ *
2318
+ * Because `.keys` does different things based on the target's type, it's
2319
+ * important to check the target's type before using `.keys`. See the `.a` doc
2320
+ * for info on testing a target's type.
2321
+ *
2322
+ * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b');
2323
+ *
2324
+ * By default, strict (`===`) equality is used to compare keys of maps and
2325
+ * sets. Add `.deep` earlier in the chain to use deep equality instead. See
2326
+ * the `deep-eql` project page for info on the deep equality algorithm:
2327
+ * https://github.com/chaijs/deep-eql.
2328
+ *
2329
+ * // Target set deeply (but not strictly) has key `{a: 1}`
2330
+ * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]);
2331
+ * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]);
2332
+ *
2333
+ * By default, the target must have all of the given keys and no more. Add
2334
+ * `.any` earlier in the chain to only require that the target have at least
2335
+ * one of the given keys. Also, add `.not` earlier in the chain to negate
2336
+ * `.keys`. It's often best to add `.any` when negating `.keys`, and to use
2337
+ * `.all` when asserting `.keys` without negation.
2338
+ *
2339
+ * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts
2340
+ * exactly what's expected of the output, whereas `.not.all.keys` creates
2341
+ * uncertain expectations.
2342
+ *
2343
+ * // Recommended; asserts that target doesn't have any of the given keys
2344
+ * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');
2345
+ *
2346
+ * // Not recommended; asserts that target doesn't have all of the given
2347
+ * // keys but may or may not have some of them
2348
+ * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd');
2349
+ *
2350
+ * When asserting `.keys` without negation, `.all` is preferred because
2351
+ * `.all.keys` asserts exactly what's expected of the output, whereas
2352
+ * `.any.keys` creates uncertain expectations.
2353
+ *
2354
+ * // Recommended; asserts that target has all the given keys
2355
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
2356
+ *
2357
+ * // Not recommended; asserts that target has at least one of the given
2358
+ * // keys but may or may not have more of them
2359
+ * expect({a: 1, b: 2}).to.have.any.keys('a', 'b');
2360
+ *
2361
+ * Note that `.all` is used by default when neither `.all` nor `.any` appear
2362
+ * earlier in the chain. However, it's often best to add `.all` anyway because
2363
+ * it improves readability.
2364
+ *
2365
+ * // Both assertions are identical
2366
+ * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended
2367
+ * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended
2368
+ *
2369
+ * Add `.include` earlier in the chain to require that the target's keys be a
2370
+ * superset of the expected keys, rather than identical sets.
2371
+ *
2372
+ * // Target object's keys are a superset of ['a', 'b'] but not identical
2373
+ * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b');
2374
+ * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b');
2375
+ *
2376
+ * However, if `.any` and `.include` are combined, only the `.any` takes
2377
+ * effect. The `.include` is ignored in this case.
2378
+ *
2379
+ * // Both assertions are identical
2380
+ * expect({a: 1}).to.have.any.keys('a', 'b');
2381
+ * expect({a: 1}).to.include.any.keys('a', 'b');
2382
+ *
2383
+ * A custom error message can be given as the second argument to `expect`.
2384
+ *
2385
+ * expect({a: 1}, 'nooo why fail??').to.have.key('b');
2386
+ *
2387
+ * The alias `.key` can be used interchangeably with `.keys`.
2388
+ *
2389
+ * @name keys
2390
+ * @alias key
2391
+ * @param {...String|Array|Object} keys
2392
+ * @namespace BDD
2393
+ * @api public
2394
+ */
2395
+
2396
+ function assertKeys (keys) {
2397
+ var obj = flag(this, 'object')
2398
+ , objType = _.type(obj)
2399
+ , keysType = _.type(keys)
2400
+ , ssfi = flag(this, 'ssfi')
2401
+ , isDeep = flag(this, 'deep')
2402
+ , str
2403
+ , deepStr = ''
2404
+ , actual
2405
+ , ok = true
2406
+ , flagMsg = flag(this, 'message');
2407
+
2408
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
2409
+ var mixedArgsMsg = flagMsg + 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments';
2410
+
2411
+ if (objType === 'Map' || objType === 'Set') {
2412
+ deepStr = isDeep ? 'deeply ' : '';
2413
+ actual = [];
2414
+
2415
+ // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach.
2416
+ obj.forEach(function (val, key) { actual.push(key) });
2417
+
2418
+ if (keysType !== 'Array') {
2419
+ keys = Array.prototype.slice.call(arguments);
2420
+ }
2421
+ } else {
2422
+ actual = _.getOwnEnumerableProperties(obj);
2423
+
2424
+ switch (keysType) {
2425
+ case 'Array':
2426
+ if (arguments.length > 1) {
2427
+ throw new AssertionError(mixedArgsMsg, undefined, ssfi);
2428
+ }
2429
+ break;
2430
+ case 'Object':
2431
+ if (arguments.length > 1) {
2432
+ throw new AssertionError(mixedArgsMsg, undefined, ssfi);
2433
+ }
2434
+ keys = Object.keys(keys);
2435
+ break;
2436
+ default:
2437
+ keys = Array.prototype.slice.call(arguments);
2438
+ }
2439
+
2440
+ // Only stringify non-Symbols because Symbols would become "Symbol()"
2441
+ keys = keys.map(function (val) {
2442
+ return typeof val === 'symbol' ? val : String(val);
2443
+ });
2444
+ }
2445
+
2446
+ if (!keys.length) {
2447
+ throw new AssertionError(flagMsg + 'keys required', undefined, ssfi);
2448
+ }
2449
+
2450
+ var len = keys.length
2451
+ , any = flag(this, 'any')
2452
+ , all = flag(this, 'all')
2453
+ , expected = keys
2454
+ , isEql = isDeep ? flag(this, 'eql') : (val1, val2) => val1 === val2;
2455
+
2456
+ if (!any && !all) {
2457
+ all = true;
2458
+ }
2459
+
2460
+ // Has any
2461
+ if (any) {
2462
+ ok = expected.some(function(expectedKey) {
2463
+ return actual.some(function(actualKey) {
2464
+ return isEql(expectedKey, actualKey);
2465
+ });
2466
+ });
2467
+ }
2468
+
2469
+ // Has all
2470
+ if (all) {
2471
+ ok = expected.every(function(expectedKey) {
2472
+ return actual.some(function(actualKey) {
2473
+ return isEql(expectedKey, actualKey);
2474
+ });
2475
+ });
2476
+
2477
+ if (!flag(this, 'contains')) {
2478
+ ok = ok && keys.length == actual.length;
2479
+ }
2480
+ }
2481
+
2482
+ // Key string
2483
+ if (len > 1) {
2484
+ keys = keys.map(function(key) {
2485
+ return _.inspect(key);
2486
+ });
2487
+ var last = keys.pop();
2488
+ if (all) {
2489
+ str = keys.join(', ') + ', and ' + last;
2490
+ }
2491
+ if (any) {
2492
+ str = keys.join(', ') + ', or ' + last;
2493
+ }
2494
+ } else {
2495
+ str = _.inspect(keys[0]);
2496
+ }
2497
+
2498
+ // Form
2499
+ str = (len > 1 ? 'keys ' : 'key ') + str;
2500
+
2501
+ // Have / include
2502
+ str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;
2503
+
2504
+ // Assertion
2505
+ this.assert(
2506
+ ok
2507
+ , 'expected #{this} to ' + deepStr + str
2508
+ , 'expected #{this} to not ' + deepStr + str
2509
+ , expected.slice(0).sort(_.compareByInspect)
2510
+ , actual.sort(_.compareByInspect)
2511
+ , true
2512
+ );
2513
+ }
2514
+
2515
+ Assertion.addMethod('keys', assertKeys);
2516
+ Assertion.addMethod('key', assertKeys);
2517
+
2518
+ /**
2519
+ * ### .throw([errorLike], [errMsgMatcher], [msg])
2520
+ *
2521
+ * When no arguments are provided, `.throw` invokes the target function and
2522
+ * asserts that an error is thrown.
2523
+ *
2524
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2525
+ *
2526
+ * expect(badFn).to.throw();
2527
+ *
2528
+ * When one argument is provided, and it's an error constructor, `.throw`
2529
+ * invokes the target function and asserts that an error is thrown that's an
2530
+ * instance of that error constructor.
2531
+ *
2532
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2533
+ *
2534
+ * expect(badFn).to.throw(TypeError);
2535
+ *
2536
+ * When one argument is provided, and it's an error instance, `.throw` invokes
2537
+ * the target function and asserts that an error is thrown that's strictly
2538
+ * (`===`) equal to that error instance.
2539
+ *
2540
+ * var err = new TypeError('Illegal salmon!');
2541
+ * var badFn = function () { throw err; };
2542
+ *
2543
+ * expect(badFn).to.throw(err);
2544
+ *
2545
+ * When one argument is provided, and it's a string, `.throw` invokes the
2546
+ * target function and asserts that an error is thrown with a message that
2547
+ * contains that string.
2548
+ *
2549
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2550
+ *
2551
+ * expect(badFn).to.throw('salmon');
2552
+ *
2553
+ * When one argument is provided, and it's a regular expression, `.throw`
2554
+ * invokes the target function and asserts that an error is thrown with a
2555
+ * message that matches that regular expression.
2556
+ *
2557
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2558
+ *
2559
+ * expect(badFn).to.throw(/salmon/);
2560
+ *
2561
+ * When two arguments are provided, and the first is an error instance or
2562
+ * constructor, and the second is a string or regular expression, `.throw`
2563
+ * invokes the function and asserts that an error is thrown that fulfills both
2564
+ * conditions as described above.
2565
+ *
2566
+ * var err = new TypeError('Illegal salmon!');
2567
+ * var badFn = function () { throw err; };
2568
+ *
2569
+ * expect(badFn).to.throw(TypeError, 'salmon');
2570
+ * expect(badFn).to.throw(TypeError, /salmon/);
2571
+ * expect(badFn).to.throw(err, 'salmon');
2572
+ * expect(badFn).to.throw(err, /salmon/);
2573
+ *
2574
+ * Add `.not` earlier in the chain to negate `.throw`.
2575
+ *
2576
+ * var goodFn = function () {};
2577
+ *
2578
+ * expect(goodFn).to.not.throw();
2579
+ *
2580
+ * However, it's dangerous to negate `.throw` when providing any arguments.
2581
+ * The problem is that it creates uncertain expectations by asserting that the
2582
+ * target either doesn't throw an error, or that it throws an error but of a
2583
+ * different type than the given type, or that it throws an error of the given
2584
+ * type but with a message that doesn't include the given string. It's often
2585
+ * best to identify the exact output that's expected, and then write an
2586
+ * assertion that only accepts that exact output.
2587
+ *
2588
+ * When the target isn't expected to throw an error, it's often best to assert
2589
+ * exactly that.
2590
+ *
2591
+ * var goodFn = function () {};
2592
+ *
2593
+ * expect(goodFn).to.not.throw(); // Recommended
2594
+ * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended
2595
+ *
2596
+ * When the target is expected to throw an error, it's often best to assert
2597
+ * that the error is of its expected type, and has a message that includes an
2598
+ * expected string, rather than asserting that it doesn't have one of many
2599
+ * unexpected types, and doesn't have a message that includes some string.
2600
+ *
2601
+ * var badFn = function () { throw new TypeError('Illegal salmon!'); };
2602
+ *
2603
+ * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended
2604
+ * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended
2605
+ *
2606
+ * `.throw` changes the target of any assertions that follow in the chain to
2607
+ * be the error object that's thrown.
2608
+ *
2609
+ * var err = new TypeError('Illegal salmon!');
2610
+ * err.code = 42;
2611
+ * var badFn = function () { throw err; };
2612
+ *
2613
+ * expect(badFn).to.throw(TypeError).with.property('code', 42);
2614
+ *
2615
+ * `.throw` accepts an optional `msg` argument which is a custom error message
2616
+ * to show when the assertion fails. The message can also be given as the
2617
+ * second argument to `expect`. When not providing two arguments, always use
2618
+ * the second form.
2619
+ *
2620
+ * var goodFn = function () {};
2621
+ *
2622
+ * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??');
2623
+ * expect(goodFn, 'nooo why fail??').to.throw();
2624
+ *
2625
+ * Due to limitations in ES5, `.throw` may not always work as expected when
2626
+ * using a transpiler such as Babel or TypeScript. In particular, it may
2627
+ * produce unexpected results when subclassing the built-in `Error` object and
2628
+ * then passing the subclassed constructor to `.throw`. See your transpiler's
2629
+ * docs for details:
2630
+ *
2631
+ * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes))
2632
+ * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work))
2633
+ *
2634
+ * Beware of some common mistakes when using the `throw` assertion. One common
2635
+ * mistake is to accidentally invoke the function yourself instead of letting
2636
+ * the `throw` assertion invoke the function for you. For example, when
2637
+ * testing if a function named `fn` throws, provide `fn` instead of `fn()` as
2638
+ * the target for the assertion.
2639
+ *
2640
+ * expect(fn).to.throw(); // Good! Tests `fn` as desired
2641
+ * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn`
2642
+ *
2643
+ * If you need to assert that your function `fn` throws when passed certain
2644
+ * arguments, then wrap a call to `fn` inside of another function.
2645
+ *
2646
+ * expect(function () { fn(42); }).to.throw(); // Function expression
2647
+ * expect(() => fn(42)).to.throw(); // ES6 arrow function
2648
+ *
2649
+ * Another common mistake is to provide an object method (or any stand-alone
2650
+ * function that relies on `this`) as the target of the assertion. Doing so is
2651
+ * problematic because the `this` context will be lost when the function is
2652
+ * invoked by `.throw`; there's no way for it to know what `this` is supposed
2653
+ * to be. There are two ways around this problem. One solution is to wrap the
2654
+ * method or function call inside of another function. Another solution is to
2655
+ * use `bind`.
2656
+ *
2657
+ * expect(function () { cat.meow(); }).to.throw(); // Function expression
2658
+ * expect(() => cat.meow()).to.throw(); // ES6 arrow function
2659
+ * expect(cat.meow.bind(cat)).to.throw(); // Bind
2660
+ *
2661
+ * Finally, it's worth mentioning that it's a best practice in JavaScript to
2662
+ * only throw `Error` and derivatives of `Error` such as `ReferenceError`,
2663
+ * `TypeError`, and user-defined objects that extend `Error`. No other type of
2664
+ * value will generate a stack trace when initialized. With that said, the
2665
+ * `throw` assertion does technically support any type of value being thrown,
2666
+ * not just `Error` and its derivatives.
2667
+ *
2668
+ * The aliases `.throws` and `.Throw` can be used interchangeably with
2669
+ * `.throw`.
2670
+ *
2671
+ * @name throw
2672
+ * @alias throws
2673
+ * @alias Throw
2674
+ * @param {Error|ErrorConstructor} errorLike
2675
+ * @param {String|RegExp} errMsgMatcher error message
2676
+ * @param {String} msg _optional_
2677
+ * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
2678
+ * @returns error for chaining (null if no error)
2679
+ * @namespace BDD
2680
+ * @api public
2681
+ */
2682
+
2683
+ function assertThrows (errorLike, errMsgMatcher, msg) {
2684
+ if (msg) flag(this, 'message', msg);
2685
+ var obj = flag(this, 'object')
2686
+ , ssfi = flag(this, 'ssfi')
2687
+ , flagMsg = flag(this, 'message')
2688
+ , negate = flag(this, 'negate') || false;
2689
+ new Assertion(obj, flagMsg, ssfi, true).is.a('function');
2690
+
2691
+ if (errorLike instanceof RegExp || typeof errorLike === 'string') {
2692
+ errMsgMatcher = errorLike;
2693
+ errorLike = null;
2694
+ }
2695
+
2696
+ var caughtErr;
2697
+ try {
2698
+ obj();
2699
+ } catch (err) {
2700
+ caughtErr = err;
2701
+ }
2702
+
2703
+ // If we have the negate flag enabled and at least one valid argument it means we do expect an error
2704
+ // but we want it to match a given set of criteria
2705
+ var everyArgIsUndefined = errorLike === undefined && errMsgMatcher === undefined;
2706
+
2707
+ // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible
2708
+ // See Issue #551 and PR #683@GitHub
2709
+ var everyArgIsDefined = Boolean(errorLike && errMsgMatcher);
2710
+ var errorLikeFail = false;
2711
+ var errMsgMatcherFail = false;
2712
+
2713
+ // Checking if error was thrown
2714
+ if (everyArgIsUndefined || !everyArgIsUndefined && !negate) {
2715
+ // We need this to display results correctly according to their types
2716
+ var errorLikeString = 'an error';
2717
+ if (errorLike instanceof Error) {
2718
+ errorLikeString = '#{exp}';
2719
+ } else if (errorLike) {
2720
+ errorLikeString = _.checkError.getConstructorName(errorLike);
2721
+ }
2722
+
2723
+ this.assert(
2724
+ caughtErr
2725
+ , 'expected #{this} to throw ' + errorLikeString
2726
+ , 'expected #{this} to not throw an error but #{act} was thrown'
2727
+ , errorLike && errorLike.toString()
2728
+ , (caughtErr instanceof Error ?
2729
+ caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr &&
2730
+ _.checkError.getConstructorName(caughtErr)))
2731
+ );
2732
+ }
2733
+
2734
+ if (errorLike && caughtErr) {
2735
+ // We should compare instances only if `errorLike` is an instance of `Error`
2736
+ if (errorLike instanceof Error) {
2737
+ var isCompatibleInstance = _.checkError.compatibleInstance(caughtErr, errorLike);
2738
+
2739
+ if (isCompatibleInstance === negate) {
2740
+ // These checks were created to ensure we won't fail too soon when we've got both args and a negate
2741
+ // See Issue #551 and PR #683@GitHub
2742
+ if (everyArgIsDefined && negate) {
2743
+ errorLikeFail = true;
2744
+ } else {
2745
+ this.assert(
2746
+ negate
2747
+ , 'expected #{this} to throw #{exp} but #{act} was thrown'
2748
+ , 'expected #{this} to not throw #{exp}' + (caughtErr && !negate ? ' but #{act} was thrown' : '')
2749
+ , errorLike.toString()
2750
+ , caughtErr.toString()
2751
+ );
2752
+ }
2753
+ }
2754
+ }
2755
+
2756
+ var isCompatibleConstructor = _.checkError.compatibleConstructor(caughtErr, errorLike);
2757
+ if (isCompatibleConstructor === negate) {
2758
+ if (everyArgIsDefined && negate) {
2759
+ errorLikeFail = true;
2760
+ } else {
2761
+ this.assert(
2762
+ negate
2763
+ , 'expected #{this} to throw #{exp} but #{act} was thrown'
2764
+ , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '')
2765
+ , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike))
2766
+ , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr))
2767
+ );
2768
+ }
2769
+ }
2770
+ }
2771
+
2772
+ if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) {
2773
+ // Here we check compatible messages
2774
+ var placeholder = 'including';
2775
+ if (errMsgMatcher instanceof RegExp) {
2776
+ placeholder = 'matching'
2777
+ }
2778
+
2779
+ var isCompatibleMessage = _.checkError.compatibleMessage(caughtErr, errMsgMatcher);
2780
+ if (isCompatibleMessage === negate) {
2781
+ if (everyArgIsDefined && negate) {
2782
+ errMsgMatcherFail = true;
2783
+ } else {
2784
+ this.assert(
2785
+ negate
2786
+ , 'expected #{this} to throw error ' + placeholder + ' #{exp} but got #{act}'
2787
+ , 'expected #{this} to throw error not ' + placeholder + ' #{exp}'
2788
+ , errMsgMatcher
2789
+ , _.checkError.getMessage(caughtErr)
2790
+ );
2791
+ }
2792
+ }
2793
+ }
2794
+
2795
+ // If both assertions failed and both should've matched we throw an error
2796
+ if (errorLikeFail && errMsgMatcherFail) {
2797
+ this.assert(
2798
+ negate
2799
+ , 'expected #{this} to throw #{exp} but #{act} was thrown'
2800
+ , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '')
2801
+ , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike))
2802
+ , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr))
2803
+ );
2804
+ }
2805
+
2806
+ flag(this, 'object', caughtErr);
2807
+ };
2808
+
2809
+ Assertion.addMethod('throw', assertThrows);
2810
+ Assertion.addMethod('throws', assertThrows);
2811
+ Assertion.addMethod('Throw', assertThrows);
2812
+
2813
+ /**
2814
+ * ### .respondTo(method[, msg])
2815
+ *
2816
+ * When the target is a non-function object, `.respondTo` asserts that the
2817
+ * target has a method with the given name `method`. The method can be own or
2818
+ * inherited, and it can be enumerable or non-enumerable.
2819
+ *
2820
+ * function Cat () {}
2821
+ * Cat.prototype.meow = function () {};
2822
+ *
2823
+ * expect(new Cat()).to.respondTo('meow');
2824
+ *
2825
+ * When the target is a function, `.respondTo` asserts that the target's
2826
+ * `prototype` property has a method with the given name `method`. Again, the
2827
+ * method can be own or inherited, and it can be enumerable or non-enumerable.
2828
+ *
2829
+ * function Cat () {}
2830
+ * Cat.prototype.meow = function () {};
2831
+ *
2832
+ * expect(Cat).to.respondTo('meow');
2833
+ *
2834
+ * Add `.itself` earlier in the chain to force `.respondTo` to treat the
2835
+ * target as a non-function object, even if it's a function. Thus, it asserts
2836
+ * that the target has a method with the given name `method`, rather than
2837
+ * asserting that the target's `prototype` property has a method with the
2838
+ * given name `method`.
2839
+ *
2840
+ * function Cat () {}
2841
+ * Cat.prototype.meow = function () {};
2842
+ * Cat.hiss = function () {};
2843
+ *
2844
+ * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');
2845
+ *
2846
+ * When not adding `.itself`, it's important to check the target's type before
2847
+ * using `.respondTo`. See the `.a` doc for info on checking a target's type.
2848
+ *
2849
+ * function Cat () {}
2850
+ * Cat.prototype.meow = function () {};
2851
+ *
2852
+ * expect(new Cat()).to.be.an('object').that.respondsTo('meow');
2853
+ *
2854
+ * Add `.not` earlier in the chain to negate `.respondTo`.
2855
+ *
2856
+ * function Dog () {}
2857
+ * Dog.prototype.bark = function () {};
2858
+ *
2859
+ * expect(new Dog()).to.not.respondTo('meow');
2860
+ *
2861
+ * `.respondTo` accepts an optional `msg` argument which is a custom error
2862
+ * message to show when the assertion fails. The message can also be given as
2863
+ * the second argument to `expect`.
2864
+ *
2865
+ * expect({}).to.respondTo('meow', 'nooo why fail??');
2866
+ * expect({}, 'nooo why fail??').to.respondTo('meow');
2867
+ *
2868
+ * The alias `.respondsTo` can be used interchangeably with `.respondTo`.
2869
+ *
2870
+ * @name respondTo
2871
+ * @alias respondsTo
2872
+ * @param {String} method
2873
+ * @param {String} msg _optional_
2874
+ * @namespace BDD
2875
+ * @api public
2876
+ */
2877
+
2878
+ function respondTo (method, msg) {
2879
+ if (msg) flag(this, 'message', msg);
2880
+ var obj = flag(this, 'object')
2881
+ , itself = flag(this, 'itself')
2882
+ , context = ('function' === typeof obj && !itself)
2883
+ ? obj.prototype[method]
2884
+ : obj[method];
2885
+
2886
+ this.assert(
2887
+ 'function' === typeof context
2888
+ , 'expected #{this} to respond to ' + _.inspect(method)
2889
+ , 'expected #{this} to not respond to ' + _.inspect(method)
2890
+ );
2891
+ }
2892
+
2893
+ Assertion.addMethod('respondTo', respondTo);
2894
+ Assertion.addMethod('respondsTo', respondTo);
2895
+
2896
+ /**
2897
+ * ### .itself
2898
+ *
2899
+ * Forces all `.respondTo` assertions that follow in the chain to behave as if
2900
+ * the target is a non-function object, even if it's a function. Thus, it
2901
+ * causes `.respondTo` to assert that the target has a method with the given
2902
+ * name, rather than asserting that the target's `prototype` property has a
2903
+ * method with the given name.
2904
+ *
2905
+ * function Cat () {}
2906
+ * Cat.prototype.meow = function () {};
2907
+ * Cat.hiss = function () {};
2908
+ *
2909
+ * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow');
2910
+ *
2911
+ * @name itself
2912
+ * @namespace BDD
2913
+ * @api public
2914
+ */
2915
+
2916
+ Assertion.addProperty('itself', function () {
2917
+ flag(this, 'itself', true);
2918
+ });
2919
+
2920
+ /**
2921
+ * ### .satisfy(matcher[, msg])
2922
+ *
2923
+ * Invokes the given `matcher` function with the target being passed as the
2924
+ * first argument, and asserts that the value returned is truthy.
2925
+ *
2926
+ * expect(1).to.satisfy(function(num) {
2927
+ * return num > 0;
2928
+ * });
2929
+ *
2930
+ * Add `.not` earlier in the chain to negate `.satisfy`.
2931
+ *
2932
+ * expect(1).to.not.satisfy(function(num) {
2933
+ * return num > 2;
2934
+ * });
2935
+ *
2936
+ * `.satisfy` accepts an optional `msg` argument which is a custom error
2937
+ * message to show when the assertion fails. The message can also be given as
2938
+ * the second argument to `expect`.
2939
+ *
2940
+ * expect(1).to.satisfy(function(num) {
2941
+ * return num > 2;
2942
+ * }, 'nooo why fail??');
2943
+ *
2944
+ * expect(1, 'nooo why fail??').to.satisfy(function(num) {
2945
+ * return num > 2;
2946
+ * });
2947
+ *
2948
+ * The alias `.satisfies` can be used interchangeably with `.satisfy`.
2949
+ *
2950
+ * @name satisfy
2951
+ * @alias satisfies
2952
+ * @param {Function} matcher
2953
+ * @param {String} msg _optional_
2954
+ * @namespace BDD
2955
+ * @api public
2956
+ */
2957
+
2958
+ function satisfy (matcher, msg) {
2959
+ if (msg) flag(this, 'message', msg);
2960
+ var obj = flag(this, 'object');
2961
+ var result = matcher(obj);
2962
+ this.assert(
2963
+ result
2964
+ , 'expected #{this} to satisfy ' + _.objDisplay(matcher)
2965
+ , 'expected #{this} to not satisfy' + _.objDisplay(matcher)
2966
+ , flag(this, 'negate') ? false : true
2967
+ , result
2968
+ );
2969
+ }
2970
+
2971
+ Assertion.addMethod('satisfy', satisfy);
2972
+ Assertion.addMethod('satisfies', satisfy);
2973
+
2974
+ /**
2975
+ * ### .closeTo(expected, delta[, msg])
2976
+ *
2977
+ * Asserts that the target is a number that's within a given +/- `delta` range
2978
+ * of the given number `expected`. However, it's often best to assert that the
2979
+ * target is equal to its expected value.
2980
+ *
2981
+ * // Recommended
2982
+ * expect(1.5).to.equal(1.5);
2983
+ *
2984
+ * // Not recommended
2985
+ * expect(1.5).to.be.closeTo(1, 0.5);
2986
+ * expect(1.5).to.be.closeTo(2, 0.5);
2987
+ * expect(1.5).to.be.closeTo(1, 1);
2988
+ *
2989
+ * Add `.not` earlier in the chain to negate `.closeTo`.
2990
+ *
2991
+ * expect(1.5).to.equal(1.5); // Recommended
2992
+ * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended
2993
+ *
2994
+ * `.closeTo` accepts an optional `msg` argument which is a custom error
2995
+ * message to show when the assertion fails. The message can also be given as
2996
+ * the second argument to `expect`.
2997
+ *
2998
+ * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??');
2999
+ * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1);
3000
+ *
3001
+ * The alias `.approximately` can be used interchangeably with `.closeTo`.
3002
+ *
3003
+ * @name closeTo
3004
+ * @alias approximately
3005
+ * @param {Number} expected
3006
+ * @param {Number} delta
3007
+ * @param {String} msg _optional_
3008
+ * @namespace BDD
3009
+ * @api public
3010
+ */
3011
+
3012
+ function closeTo(expected, delta, msg) {
3013
+ if (msg) flag(this, 'message', msg);
3014
+ var obj = flag(this, 'object')
3015
+ , flagMsg = flag(this, 'message')
3016
+ , ssfi = flag(this, 'ssfi');
3017
+
3018
+ new Assertion(obj, flagMsg, ssfi, true).is.a('number');
3019
+ if (typeof expected !== 'number' || typeof delta !== 'number') {
3020
+ flagMsg = flagMsg ? flagMsg + ': ' : '';
3021
+ var deltaMessage = delta === undefined ? ", and a delta is required" : "";
3022
+ throw new AssertionError(
3023
+ flagMsg + 'the arguments to closeTo or approximately must be numbers' + deltaMessage,
3024
+ undefined,
3025
+ ssfi
3026
+ );
3027
+ }
3028
+
3029
+ this.assert(
3030
+ Math.abs(obj - expected) <= delta
3031
+ , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
3032
+ , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta
3033
+ );
3034
+ }
3035
+
3036
+ Assertion.addMethod('closeTo', closeTo);
3037
+ Assertion.addMethod('approximately', closeTo);
3038
+
3039
+ // Note: Duplicates are ignored if testing for inclusion instead of sameness.
3040
+ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
3041
+ let superset = Array.from(_superset);
3042
+ let subset = Array.from(_subset);
3043
+ if (!contains) {
3044
+ if (subset.length !== superset.length) return false;
3045
+ superset = superset.slice();
3046
+ }
3047
+
3048
+ return subset.every(function(elem, idx) {
3049
+ if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];
3050
+
3051
+ if (!cmp) {
3052
+ var matchIdx = superset.indexOf(elem);
3053
+ if (matchIdx === -1) return false;
3054
+
3055
+ // Remove match from superset so not counted twice if duplicate in subset.
3056
+ if (!contains) superset.splice(matchIdx, 1);
3057
+ return true;
3058
+ }
3059
+
3060
+ return superset.some(function(elem2, matchIdx) {
3061
+ if (!cmp(elem, elem2)) return false;
3062
+
3063
+ // Remove match from superset so not counted twice if duplicate in subset.
3064
+ if (!contains) superset.splice(matchIdx, 1);
3065
+ return true;
3066
+ });
3067
+ });
3068
+ }
3069
+
3070
+ /**
3071
+ * ### .members(set[, msg])
3072
+ *
3073
+ * Asserts that the target array has the same members as the given array
3074
+ * `set`.
3075
+ *
3076
+ * expect([1, 2, 3]).to.have.members([2, 1, 3]);
3077
+ * expect([1, 2, 2]).to.have.members([2, 1, 2]);
3078
+ *
3079
+ * By default, members are compared using strict (`===`) equality. Add `.deep`
3080
+ * earlier in the chain to use deep equality instead. See the `deep-eql`
3081
+ * project page for info on the deep equality algorithm:
3082
+ * https://github.com/chaijs/deep-eql.
3083
+ *
3084
+ * // Target array deeply (but not strictly) has member `{a: 1}`
3085
+ * expect([{a: 1}]).to.have.deep.members([{a: 1}]);
3086
+ * expect([{a: 1}]).to.not.have.members([{a: 1}]);
3087
+ *
3088
+ * By default, order doesn't matter. Add `.ordered` earlier in the chain to
3089
+ * require that members appear in the same order.
3090
+ *
3091
+ * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]);
3092
+ * expect([1, 2, 3]).to.have.members([2, 1, 3])
3093
+ * .but.not.ordered.members([2, 1, 3]);
3094
+ *
3095
+ * By default, both arrays must be the same size. Add `.include` earlier in
3096
+ * the chain to require that the target's members be a superset of the
3097
+ * expected members. Note that duplicates are ignored in the subset when
3098
+ * `.include` is added.
3099
+ *
3100
+ * // Target array is a superset of [1, 2] but not identical
3101
+ * expect([1, 2, 3]).to.include.members([1, 2]);
3102
+ * expect([1, 2, 3]).to.not.have.members([1, 2]);
3103
+ *
3104
+ * // Duplicates in the subset are ignored
3105
+ * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]);
3106
+ *
3107
+ * `.deep`, `.ordered`, and `.include` can all be combined. However, if
3108
+ * `.include` and `.ordered` are combined, the ordering begins at the start of
3109
+ * both arrays.
3110
+ *
3111
+ * expect([{a: 1}, {b: 2}, {c: 3}])
3112
+ * .to.include.deep.ordered.members([{a: 1}, {b: 2}])
3113
+ * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]);
3114
+ *
3115
+ * Add `.not` earlier in the chain to negate `.members`. However, it's
3116
+ * dangerous to do so. The problem is that it creates uncertain expectations
3117
+ * by asserting that the target array doesn't have all of the same members as
3118
+ * the given array `set` but may or may not have some of them. It's often best
3119
+ * to identify the exact output that's expected, and then write an assertion
3120
+ * that only accepts that exact output.
3121
+ *
3122
+ * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended
3123
+ * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended
3124
+ *
3125
+ * `.members` accepts an optional `msg` argument which is a custom error
3126
+ * message to show when the assertion fails. The message can also be given as
3127
+ * the second argument to `expect`.
3128
+ *
3129
+ * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??');
3130
+ * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]);
3131
+ *
3132
+ * @name members
3133
+ * @param {Array} set
3134
+ * @param {String} msg _optional_
3135
+ * @namespace BDD
3136
+ * @api public
3137
+ */
3138
+ Assertion.addMethod('members', function (subset, msg) {
3139
+ if (msg) flag(this, 'message', msg);
3140
+ var obj = flag(this, 'object')
3141
+ , flagMsg = flag(this, 'message')
3142
+ , ssfi = flag(this, 'ssfi');
3143
+
3144
+ new Assertion(obj, flagMsg, ssfi, true).to.be.iterable;
3145
+ new Assertion(subset, flagMsg, ssfi, true).to.be.iterable;
3146
+
3147
+ var contains = flag(this, 'contains');
3148
+ var ordered = flag(this, 'ordered');
3149
+
3150
+ var subject, failMsg, failNegateMsg;
3151
+
3152
+ if (contains) {
3153
+ subject = ordered ? 'an ordered superset' : 'a superset';
3154
+ failMsg = 'expected #{this} to be ' + subject + ' of #{exp}';
3155
+ failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}';
3156
+ } else {
3157
+ subject = ordered ? 'ordered members' : 'members';
3158
+ failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}';
3159
+ failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}';
3160
+ }
3161
+
3162
+ var cmp = flag(this, 'deep') ? flag(this, 'eql') : undefined;
3163
+
3164
+ this.assert(
3165
+ isSubsetOf(subset, obj, cmp, contains, ordered)
3166
+ , failMsg
3167
+ , failNegateMsg
3168
+ , subset
3169
+ , obj
3170
+ , true
3171
+ );
3172
+ });
3173
+
3174
+ /**
3175
+ * ### .iterable
3176
+ *
3177
+ * Asserts that the target is an iterable, which means that it has a iterator.
3178
+ *
3179
+ * expect([1, 2]).to.be.iterable;
3180
+ * expect("foobar").to.be.iterable;
3181
+ *
3182
+ * Add `.not` earlier in the chain to negate `.iterable`.
3183
+ *
3184
+ * expect(1).to.not.be.iterable;
3185
+ * expect(true).to.not.be.iterable;
3186
+ *
3187
+ * A custom error message can be given as the second argument to `expect`.
3188
+ *
3189
+ * expect(1, 'nooo why fail??').to.be.iterable;
3190
+ *
3191
+ * @name iterable
3192
+ * @namespace BDD
3193
+ * @api public
3194
+ */
3195
+ Assertion.addProperty('iterable', function(msg) {
3196
+ if (msg) flag(this, 'message', msg);
3197
+ var obj = flag(this, 'object');
3198
+
3199
+ this.assert(
3200
+ obj != undefined && obj[Symbol.iterator]
3201
+ , 'expected #{this} to be an iterable'
3202
+ , 'expected #{this} to not be an iterable'
3203
+ , obj
3204
+ );
3205
+ });
3206
+
3207
+ /**
3208
+ * ### .oneOf(list[, msg])
3209
+ *
3210
+ * Asserts that the target is a member of the given array `list`. However,
3211
+ * it's often best to assert that the target is equal to its expected value.
3212
+ *
3213
+ * expect(1).to.equal(1); // Recommended
3214
+ * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended
3215
+ *
3216
+ * Comparisons are performed using strict (`===`) equality.
3217
+ *
3218
+ * Add `.not` earlier in the chain to negate `.oneOf`.
3219
+ *
3220
+ * expect(1).to.equal(1); // Recommended
3221
+ * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended
3222
+ *
3223
+ * It can also be chained with `.contain` or `.include`, which will work with
3224
+ * both arrays and strings:
3225
+ *
3226
+ * expect('Today is sunny').to.contain.oneOf(['sunny', 'cloudy'])
3227
+ * expect('Today is rainy').to.not.contain.oneOf(['sunny', 'cloudy'])
3228
+ * expect([1,2,3]).to.contain.oneOf([3,4,5])
3229
+ * expect([1,2,3]).to.not.contain.oneOf([4,5,6])
3230
+ *
3231
+ * `.oneOf` accepts an optional `msg` argument which is a custom error message
3232
+ * to show when the assertion fails. The message can also be given as the
3233
+ * second argument to `expect`.
3234
+ *
3235
+ * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??');
3236
+ * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]);
3237
+ *
3238
+ * @name oneOf
3239
+ * @param {Array<*>} list
3240
+ * @param {String} msg _optional_
3241
+ * @namespace BDD
3242
+ * @api public
3243
+ */
3244
+
3245
+ function oneOf (list, msg) {
3246
+ if (msg) flag(this, 'message', msg);
3247
+ var expected = flag(this, 'object')
3248
+ , flagMsg = flag(this, 'message')
3249
+ , ssfi = flag(this, 'ssfi')
3250
+ , contains = flag(this, 'contains')
3251
+ , isDeep = flag(this, 'deep')
3252
+ , eql = flag(this, 'eql');
3253
+ new Assertion(list, flagMsg, ssfi, true).to.be.an('array');
3254
+
3255
+ if (contains) {
3256
+ this.assert(
3257
+ list.some(function(possibility) { return expected.indexOf(possibility) > -1 })
3258
+ , 'expected #{this} to contain one of #{exp}'
3259
+ , 'expected #{this} to not contain one of #{exp}'
3260
+ , list
3261
+ , expected
3262
+ );
3263
+ } else {
3264
+ if (isDeep) {
3265
+ this.assert(
3266
+ list.some(function(possibility) { return eql(expected, possibility) })
3267
+ , 'expected #{this} to deeply equal one of #{exp}'
3268
+ , 'expected #{this} to deeply equal one of #{exp}'
3269
+ , list
3270
+ , expected
3271
+ );
3272
+ } else {
3273
+ this.assert(
3274
+ list.indexOf(expected) > -1
3275
+ , 'expected #{this} to be one of #{exp}'
3276
+ , 'expected #{this} to not be one of #{exp}'
3277
+ , list
3278
+ , expected
3279
+ );
3280
+ }
3281
+ }
3282
+ }
3283
+
3284
+ Assertion.addMethod('oneOf', oneOf);
3285
+
3286
+ /**
3287
+ * ### .change(subject[, prop[, msg]])
3288
+ *
3289
+ * When one argument is provided, `.change` asserts that the given function
3290
+ * `subject` returns a different value when it's invoked before the target
3291
+ * function compared to when it's invoked afterward. However, it's often best
3292
+ * to assert that `subject` is equal to its expected value.
3293
+ *
3294
+ * var dots = ''
3295
+ * , addDot = function () { dots += '.'; }
3296
+ * , getDots = function () { return dots; };
3297
+ *
3298
+ * // Recommended
3299
+ * expect(getDots()).to.equal('');
3300
+ * addDot();
3301
+ * expect(getDots()).to.equal('.');
3302
+ *
3303
+ * // Not recommended
3304
+ * expect(addDot).to.change(getDots);
3305
+ *
3306
+ * When two arguments are provided, `.change` asserts that the value of the
3307
+ * given object `subject`'s `prop` property is different before invoking the
3308
+ * target function compared to afterward.
3309
+ *
3310
+ * var myObj = {dots: ''}
3311
+ * , addDot = function () { myObj.dots += '.'; };
3312
+ *
3313
+ * // Recommended
3314
+ * expect(myObj).to.have.property('dots', '');
3315
+ * addDot();
3316
+ * expect(myObj).to.have.property('dots', '.');
3317
+ *
3318
+ * // Not recommended
3319
+ * expect(addDot).to.change(myObj, 'dots');
3320
+ *
3321
+ * Strict (`===`) equality is used to compare before and after values.
3322
+ *
3323
+ * Add `.not` earlier in the chain to negate `.change`.
3324
+ *
3325
+ * var dots = ''
3326
+ * , noop = function () {}
3327
+ * , getDots = function () { return dots; };
3328
+ *
3329
+ * expect(noop).to.not.change(getDots);
3330
+ *
3331
+ * var myObj = {dots: ''}
3332
+ * , noop = function () {};
3333
+ *
3334
+ * expect(noop).to.not.change(myObj, 'dots');
3335
+ *
3336
+ * `.change` accepts an optional `msg` argument which is a custom error
3337
+ * message to show when the assertion fails. The message can also be given as
3338
+ * the second argument to `expect`. When not providing two arguments, always
3339
+ * use the second form.
3340
+ *
3341
+ * var myObj = {dots: ''}
3342
+ * , addDot = function () { myObj.dots += '.'; };
3343
+ *
3344
+ * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??');
3345
+ *
3346
+ * var dots = ''
3347
+ * , addDot = function () { dots += '.'; }
3348
+ * , getDots = function () { return dots; };
3349
+ *
3350
+ * expect(addDot, 'nooo why fail??').to.not.change(getDots);
3351
+ *
3352
+ * `.change` also causes all `.by` assertions that follow in the chain to
3353
+ * assert how much a numeric subject was increased or decreased by. However,
3354
+ * it's dangerous to use `.change.by`. The problem is that it creates
3355
+ * uncertain expectations by asserting that the subject either increases by
3356
+ * the given delta, or that it decreases by the given delta. It's often best
3357
+ * to identify the exact output that's expected, and then write an assertion
3358
+ * that only accepts that exact output.
3359
+ *
3360
+ * var myObj = {val: 1}
3361
+ * , addTwo = function () { myObj.val += 2; }
3362
+ * , subtractTwo = function () { myObj.val -= 2; };
3363
+ *
3364
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3365
+ * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended
3366
+ *
3367
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3368
+ * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended
3369
+ *
3370
+ * The alias `.changes` can be used interchangeably with `.change`.
3371
+ *
3372
+ * @name change
3373
+ * @alias changes
3374
+ * @param {String} subject
3375
+ * @param {String} prop name _optional_
3376
+ * @param {String} msg _optional_
3377
+ * @namespace BDD
3378
+ * @api public
3379
+ */
3380
+
3381
+ function assertChanges (subject, prop, msg) {
3382
+ if (msg) flag(this, 'message', msg);
3383
+ var fn = flag(this, 'object')
3384
+ , flagMsg = flag(this, 'message')
3385
+ , ssfi = flag(this, 'ssfi');
3386
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3387
+
3388
+ var initial;
3389
+ if (!prop) {
3390
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3391
+ initial = subject();
3392
+ } else {
3393
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3394
+ initial = subject[prop];
3395
+ }
3396
+
3397
+ fn();
3398
+
3399
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3400
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3401
+
3402
+ // This gets flagged because of the .by(delta) assertion
3403
+ flag(this, 'deltaMsgObj', msgObj);
3404
+ flag(this, 'initialDeltaValue', initial);
3405
+ flag(this, 'finalDeltaValue', final);
3406
+ flag(this, 'deltaBehavior', 'change');
3407
+ flag(this, 'realDelta', final !== initial);
3408
+
3409
+ this.assert(
3410
+ initial !== final
3411
+ , 'expected ' + msgObj + ' to change'
3412
+ , 'expected ' + msgObj + ' to not change'
3413
+ );
3414
+ }
3415
+
3416
+ Assertion.addMethod('change', assertChanges);
3417
+ Assertion.addMethod('changes', assertChanges);
3418
+
3419
+ /**
3420
+ * ### .increase(subject[, prop[, msg]])
3421
+ *
3422
+ * When one argument is provided, `.increase` asserts that the given function
3423
+ * `subject` returns a greater number when it's invoked after invoking the
3424
+ * target function compared to when it's invoked beforehand. `.increase` also
3425
+ * causes all `.by` assertions that follow in the chain to assert how much
3426
+ * greater of a number is returned. It's often best to assert that the return
3427
+ * value increased by the expected amount, rather than asserting it increased
3428
+ * by any amount.
3429
+ *
3430
+ * var val = 1
3431
+ * , addTwo = function () { val += 2; }
3432
+ * , getVal = function () { return val; };
3433
+ *
3434
+ * expect(addTwo).to.increase(getVal).by(2); // Recommended
3435
+ * expect(addTwo).to.increase(getVal); // Not recommended
3436
+ *
3437
+ * When two arguments are provided, `.increase` asserts that the value of the
3438
+ * given object `subject`'s `prop` property is greater after invoking the
3439
+ * target function compared to beforehand.
3440
+ *
3441
+ * var myObj = {val: 1}
3442
+ * , addTwo = function () { myObj.val += 2; };
3443
+ *
3444
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3445
+ * expect(addTwo).to.increase(myObj, 'val'); // Not recommended
3446
+ *
3447
+ * Add `.not` earlier in the chain to negate `.increase`. However, it's
3448
+ * dangerous to do so. The problem is that it creates uncertain expectations
3449
+ * by asserting that the subject either decreases, or that it stays the same.
3450
+ * It's often best to identify the exact output that's expected, and then
3451
+ * write an assertion that only accepts that exact output.
3452
+ *
3453
+ * When the subject is expected to decrease, it's often best to assert that it
3454
+ * decreased by the expected amount.
3455
+ *
3456
+ * var myObj = {val: 1}
3457
+ * , subtractTwo = function () { myObj.val -= 2; };
3458
+ *
3459
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3460
+ * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended
3461
+ *
3462
+ * When the subject is expected to stay the same, it's often best to assert
3463
+ * exactly that.
3464
+ *
3465
+ * var myObj = {val: 1}
3466
+ * , noop = function () {};
3467
+ *
3468
+ * expect(noop).to.not.change(myObj, 'val'); // Recommended
3469
+ * expect(noop).to.not.increase(myObj, 'val'); // Not recommended
3470
+ *
3471
+ * `.increase` accepts an optional `msg` argument which is a custom error
3472
+ * message to show when the assertion fails. The message can also be given as
3473
+ * the second argument to `expect`. When not providing two arguments, always
3474
+ * use the second form.
3475
+ *
3476
+ * var myObj = {val: 1}
3477
+ * , noop = function () {};
3478
+ *
3479
+ * expect(noop).to.increase(myObj, 'val', 'nooo why fail??');
3480
+ *
3481
+ * var val = 1
3482
+ * , noop = function () {}
3483
+ * , getVal = function () { return val; };
3484
+ *
3485
+ * expect(noop, 'nooo why fail??').to.increase(getVal);
3486
+ *
3487
+ * The alias `.increases` can be used interchangeably with `.increase`.
3488
+ *
3489
+ * @name increase
3490
+ * @alias increases
3491
+ * @param {String|Function} subject
3492
+ * @param {String} prop name _optional_
3493
+ * @param {String} msg _optional_
3494
+ * @namespace BDD
3495
+ * @api public
3496
+ */
3497
+
3498
+ function assertIncreases (subject, prop, msg) {
3499
+ if (msg) flag(this, 'message', msg);
3500
+ var fn = flag(this, 'object')
3501
+ , flagMsg = flag(this, 'message')
3502
+ , ssfi = flag(this, 'ssfi');
3503
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3504
+
3505
+ var initial;
3506
+ if (!prop) {
3507
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3508
+ initial = subject();
3509
+ } else {
3510
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3511
+ initial = subject[prop];
3512
+ }
3513
+
3514
+ // Make sure that the target is a number
3515
+ new Assertion(initial, flagMsg, ssfi, true).is.a('number');
3516
+
3517
+ fn();
3518
+
3519
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3520
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3521
+
3522
+ flag(this, 'deltaMsgObj', msgObj);
3523
+ flag(this, 'initialDeltaValue', initial);
3524
+ flag(this, 'finalDeltaValue', final);
3525
+ flag(this, 'deltaBehavior', 'increase');
3526
+ flag(this, 'realDelta', final - initial);
3527
+
3528
+ this.assert(
3529
+ final - initial > 0
3530
+ , 'expected ' + msgObj + ' to increase'
3531
+ , 'expected ' + msgObj + ' to not increase'
3532
+ );
3533
+ }
3534
+
3535
+ Assertion.addMethod('increase', assertIncreases);
3536
+ Assertion.addMethod('increases', assertIncreases);
3537
+
3538
+ /**
3539
+ * ### .decrease(subject[, prop[, msg]])
3540
+ *
3541
+ * When one argument is provided, `.decrease` asserts that the given function
3542
+ * `subject` returns a lesser number when it's invoked after invoking the
3543
+ * target function compared to when it's invoked beforehand. `.decrease` also
3544
+ * causes all `.by` assertions that follow in the chain to assert how much
3545
+ * lesser of a number is returned. It's often best to assert that the return
3546
+ * value decreased by the expected amount, rather than asserting it decreased
3547
+ * by any amount.
3548
+ *
3549
+ * var val = 1
3550
+ * , subtractTwo = function () { val -= 2; }
3551
+ * , getVal = function () { return val; };
3552
+ *
3553
+ * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended
3554
+ * expect(subtractTwo).to.decrease(getVal); // Not recommended
3555
+ *
3556
+ * When two arguments are provided, `.decrease` asserts that the value of the
3557
+ * given object `subject`'s `prop` property is lesser after invoking the
3558
+ * target function compared to beforehand.
3559
+ *
3560
+ * var myObj = {val: 1}
3561
+ * , subtractTwo = function () { myObj.val -= 2; };
3562
+ *
3563
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3564
+ * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended
3565
+ *
3566
+ * Add `.not` earlier in the chain to negate `.decrease`. However, it's
3567
+ * dangerous to do so. The problem is that it creates uncertain expectations
3568
+ * by asserting that the subject either increases, or that it stays the same.
3569
+ * It's often best to identify the exact output that's expected, and then
3570
+ * write an assertion that only accepts that exact output.
3571
+ *
3572
+ * When the subject is expected to increase, it's often best to assert that it
3573
+ * increased by the expected amount.
3574
+ *
3575
+ * var myObj = {val: 1}
3576
+ * , addTwo = function () { myObj.val += 2; };
3577
+ *
3578
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3579
+ * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended
3580
+ *
3581
+ * When the subject is expected to stay the same, it's often best to assert
3582
+ * exactly that.
3583
+ *
3584
+ * var myObj = {val: 1}
3585
+ * , noop = function () {};
3586
+ *
3587
+ * expect(noop).to.not.change(myObj, 'val'); // Recommended
3588
+ * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended
3589
+ *
3590
+ * `.decrease` accepts an optional `msg` argument which is a custom error
3591
+ * message to show when the assertion fails. The message can also be given as
3592
+ * the second argument to `expect`. When not providing two arguments, always
3593
+ * use the second form.
3594
+ *
3595
+ * var myObj = {val: 1}
3596
+ * , noop = function () {};
3597
+ *
3598
+ * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??');
3599
+ *
3600
+ * var val = 1
3601
+ * , noop = function () {}
3602
+ * , getVal = function () { return val; };
3603
+ *
3604
+ * expect(noop, 'nooo why fail??').to.decrease(getVal);
3605
+ *
3606
+ * The alias `.decreases` can be used interchangeably with `.decrease`.
3607
+ *
3608
+ * @name decrease
3609
+ * @alias decreases
3610
+ * @param {String|Function} subject
3611
+ * @param {String} prop name _optional_
3612
+ * @param {String} msg _optional_
3613
+ * @namespace BDD
3614
+ * @api public
3615
+ */
3616
+
3617
+ function assertDecreases (subject, prop, msg) {
3618
+ if (msg) flag(this, 'message', msg);
3619
+ var fn = flag(this, 'object')
3620
+ , flagMsg = flag(this, 'message')
3621
+ , ssfi = flag(this, 'ssfi');
3622
+ new Assertion(fn, flagMsg, ssfi, true).is.a('function');
3623
+
3624
+ var initial;
3625
+ if (!prop) {
3626
+ new Assertion(subject, flagMsg, ssfi, true).is.a('function');
3627
+ initial = subject();
3628
+ } else {
3629
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
3630
+ initial = subject[prop];
3631
+ }
3632
+
3633
+ // Make sure that the target is a number
3634
+ new Assertion(initial, flagMsg, ssfi, true).is.a('number');
3635
+
3636
+ fn();
3637
+
3638
+ var final = prop === undefined || prop === null ? subject() : subject[prop];
3639
+ var msgObj = prop === undefined || prop === null ? initial : '.' + prop;
3640
+
3641
+ flag(this, 'deltaMsgObj', msgObj);
3642
+ flag(this, 'initialDeltaValue', initial);
3643
+ flag(this, 'finalDeltaValue', final);
3644
+ flag(this, 'deltaBehavior', 'decrease');
3645
+ flag(this, 'realDelta', initial - final);
3646
+
3647
+ this.assert(
3648
+ final - initial < 0
3649
+ , 'expected ' + msgObj + ' to decrease'
3650
+ , 'expected ' + msgObj + ' to not decrease'
3651
+ );
3652
+ }
3653
+
3654
+ Assertion.addMethod('decrease', assertDecreases);
3655
+ Assertion.addMethod('decreases', assertDecreases);
3656
+
3657
+ /**
3658
+ * ### .by(delta[, msg])
3659
+ *
3660
+ * When following an `.increase` assertion in the chain, `.by` asserts that
3661
+ * the subject of the `.increase` assertion increased by the given `delta`.
3662
+ *
3663
+ * var myObj = {val: 1}
3664
+ * , addTwo = function () { myObj.val += 2; };
3665
+ *
3666
+ * expect(addTwo).to.increase(myObj, 'val').by(2);
3667
+ *
3668
+ * When following a `.decrease` assertion in the chain, `.by` asserts that the
3669
+ * subject of the `.decrease` assertion decreased by the given `delta`.
3670
+ *
3671
+ * var myObj = {val: 1}
3672
+ * , subtractTwo = function () { myObj.val -= 2; };
3673
+ *
3674
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2);
3675
+ *
3676
+ * When following a `.change` assertion in the chain, `.by` asserts that the
3677
+ * subject of the `.change` assertion either increased or decreased by the
3678
+ * given `delta`. However, it's dangerous to use `.change.by`. The problem is
3679
+ * that it creates uncertain expectations. It's often best to identify the
3680
+ * exact output that's expected, and then write an assertion that only accepts
3681
+ * that exact output.
3682
+ *
3683
+ * var myObj = {val: 1}
3684
+ * , addTwo = function () { myObj.val += 2; }
3685
+ * , subtractTwo = function () { myObj.val -= 2; };
3686
+ *
3687
+ * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended
3688
+ * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended
3689
+ *
3690
+ * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended
3691
+ * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended
3692
+ *
3693
+ * Add `.not` earlier in the chain to negate `.by`. However, it's often best
3694
+ * to assert that the subject changed by its expected delta, rather than
3695
+ * asserting that it didn't change by one of countless unexpected deltas.
3696
+ *
3697
+ * var myObj = {val: 1}
3698
+ * , addTwo = function () { myObj.val += 2; };
3699
+ *
3700
+ * // Recommended
3701
+ * expect(addTwo).to.increase(myObj, 'val').by(2);
3702
+ *
3703
+ * // Not recommended
3704
+ * expect(addTwo).to.increase(myObj, 'val').but.not.by(3);
3705
+ *
3706
+ * `.by` accepts an optional `msg` argument which is a custom error message to
3707
+ * show when the assertion fails. The message can also be given as the second
3708
+ * argument to `expect`.
3709
+ *
3710
+ * var myObj = {val: 1}
3711
+ * , addTwo = function () { myObj.val += 2; };
3712
+ *
3713
+ * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??');
3714
+ * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3);
3715
+ *
3716
+ * @name by
3717
+ * @param {Number} delta
3718
+ * @param {String} msg _optional_
3719
+ * @namespace BDD
3720
+ * @api public
3721
+ */
3722
+
3723
+ function assertDelta(delta, msg) {
3724
+ if (msg) flag(this, 'message', msg);
3725
+
3726
+ var msgObj = flag(this, 'deltaMsgObj');
3727
+ var initial = flag(this, 'initialDeltaValue');
3728
+ var final = flag(this, 'finalDeltaValue');
3729
+ var behavior = flag(this, 'deltaBehavior');
3730
+ var realDelta = flag(this, 'realDelta');
3731
+
3732
+ var expression;
3733
+ if (behavior === 'change') {
3734
+ expression = Math.abs(final - initial) === Math.abs(delta);
3735
+ } else {
3736
+ expression = realDelta === Math.abs(delta);
3737
+ }
3738
+
3739
+ this.assert(
3740
+ expression
3741
+ , 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta
3742
+ , 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta
3743
+ );
3744
+ }
3745
+
3746
+ Assertion.addMethod('by', assertDelta);
3747
+
3748
+ /**
3749
+ * ### .extensible
3750
+ *
3751
+ * Asserts that the target is extensible, which means that new properties can
3752
+ * be added to it. Primitives are never extensible.
3753
+ *
3754
+ * expect({a: 1}).to.be.extensible;
3755
+ *
3756
+ * Add `.not` earlier in the chain to negate `.extensible`.
3757
+ *
3758
+ * var nonExtensibleObject = Object.preventExtensions({})
3759
+ * , sealedObject = Object.seal({})
3760
+ * , frozenObject = Object.freeze({});
3761
+ *
3762
+ * expect(nonExtensibleObject).to.not.be.extensible;
3763
+ * expect(sealedObject).to.not.be.extensible;
3764
+ * expect(frozenObject).to.not.be.extensible;
3765
+ * expect(1).to.not.be.extensible;
3766
+ *
3767
+ * A custom error message can be given as the second argument to `expect`.
3768
+ *
3769
+ * expect(1, 'nooo why fail??').to.be.extensible;
3770
+ *
3771
+ * @name extensible
3772
+ * @namespace BDD
3773
+ * @api public
3774
+ */
3775
+
3776
+ Assertion.addProperty('extensible', function() {
3777
+ var obj = flag(this, 'object');
3778
+
3779
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3780
+ // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false.
3781
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible
3782
+ // The following provides ES6 behavior for ES5 environments.
3783
+
3784
+ var isExtensible = obj === Object(obj) && Object.isExtensible(obj);
3785
+
3786
+ this.assert(
3787
+ isExtensible
3788
+ , 'expected #{this} to be extensible'
3789
+ , 'expected #{this} to not be extensible'
3790
+ );
3791
+ });
3792
+
3793
+ /**
3794
+ * ### .sealed
3795
+ *
3796
+ * Asserts that the target is sealed, which means that new properties can't be
3797
+ * added to it, and its existing properties can't be reconfigured or deleted.
3798
+ * However, it's possible that its existing properties can still be reassigned
3799
+ * to different values. Primitives are always sealed.
3800
+ *
3801
+ * var sealedObject = Object.seal({});
3802
+ * var frozenObject = Object.freeze({});
3803
+ *
3804
+ * expect(sealedObject).to.be.sealed;
3805
+ * expect(frozenObject).to.be.sealed;
3806
+ * expect(1).to.be.sealed;
3807
+ *
3808
+ * Add `.not` earlier in the chain to negate `.sealed`.
3809
+ *
3810
+ * expect({a: 1}).to.not.be.sealed;
3811
+ *
3812
+ * A custom error message can be given as the second argument to `expect`.
3813
+ *
3814
+ * expect({a: 1}, 'nooo why fail??').to.be.sealed;
3815
+ *
3816
+ * @name sealed
3817
+ * @namespace BDD
3818
+ * @api public
3819
+ */
3820
+
3821
+ Assertion.addProperty('sealed', function() {
3822
+ var obj = flag(this, 'object');
3823
+
3824
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3825
+ // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true.
3826
+ // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed
3827
+ // The following provides ES6 behavior for ES5 environments.
3828
+
3829
+ var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true;
3830
+
3831
+ this.assert(
3832
+ isSealed
3833
+ , 'expected #{this} to be sealed'
3834
+ , 'expected #{this} to not be sealed'
3835
+ );
3836
+ });
3837
+
3838
+ /**
3839
+ * ### .frozen
3840
+ *
3841
+ * Asserts that the target is frozen, which means that new properties can't be
3842
+ * added to it, and its existing properties can't be reassigned to different
3843
+ * values, reconfigured, or deleted. Primitives are always frozen.
3844
+ *
3845
+ * var frozenObject = Object.freeze({});
3846
+ *
3847
+ * expect(frozenObject).to.be.frozen;
3848
+ * expect(1).to.be.frozen;
3849
+ *
3850
+ * Add `.not` earlier in the chain to negate `.frozen`.
3851
+ *
3852
+ * expect({a: 1}).to.not.be.frozen;
3853
+ *
3854
+ * A custom error message can be given as the second argument to `expect`.
3855
+ *
3856
+ * expect({a: 1}, 'nooo why fail??').to.be.frozen;
3857
+ *
3858
+ * @name frozen
3859
+ * @namespace BDD
3860
+ * @api public
3861
+ */
3862
+
3863
+ Assertion.addProperty('frozen', function() {
3864
+ var obj = flag(this, 'object');
3865
+
3866
+ // In ES5, if the argument to this method is a primitive, then it will cause a TypeError.
3867
+ // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true.
3868
+ // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen
3869
+ // The following provides ES6 behavior for ES5 environments.
3870
+
3871
+ var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true;
3872
+
3873
+ this.assert(
3874
+ isFrozen
3875
+ , 'expected #{this} to be frozen'
3876
+ , 'expected #{this} to not be frozen'
3877
+ );
3878
+ });
3879
+
3880
+ /**
3881
+ * ### .finite
3882
+ *
3883
+ * Asserts that the target is a number, and isn't `NaN` or positive/negative
3884
+ * `Infinity`.
3885
+ *
3886
+ * expect(1).to.be.finite;
3887
+ *
3888
+ * Add `.not` earlier in the chain to negate `.finite`. However, it's
3889
+ * dangerous to do so. The problem is that it creates uncertain expectations
3890
+ * by asserting that the subject either isn't a number, or that it's `NaN`, or
3891
+ * that it's positive `Infinity`, or that it's negative `Infinity`. It's often
3892
+ * best to identify the exact output that's expected, and then write an
3893
+ * assertion that only accepts that exact output.
3894
+ *
3895
+ * When the target isn't expected to be a number, it's often best to assert
3896
+ * that it's the expected type, rather than asserting that it isn't one of
3897
+ * many unexpected types.
3898
+ *
3899
+ * expect('foo').to.be.a('string'); // Recommended
3900
+ * expect('foo').to.not.be.finite; // Not recommended
3901
+ *
3902
+ * When the target is expected to be `NaN`, it's often best to assert exactly
3903
+ * that.
3904
+ *
3905
+ * expect(NaN).to.be.NaN; // Recommended
3906
+ * expect(NaN).to.not.be.finite; // Not recommended
3907
+ *
3908
+ * When the target is expected to be positive infinity, it's often best to
3909
+ * assert exactly that.
3910
+ *
3911
+ * expect(Infinity).to.equal(Infinity); // Recommended
3912
+ * expect(Infinity).to.not.be.finite; // Not recommended
3913
+ *
3914
+ * When the target is expected to be negative infinity, it's often best to
3915
+ * assert exactly that.
3916
+ *
3917
+ * expect(-Infinity).to.equal(-Infinity); // Recommended
3918
+ * expect(-Infinity).to.not.be.finite; // Not recommended
3919
+ *
3920
+ * A custom error message can be given as the second argument to `expect`.
3921
+ *
3922
+ * expect('foo', 'nooo why fail??').to.be.finite;
3923
+ *
3924
+ * @name finite
3925
+ * @namespace BDD
3926
+ * @api public
3927
+ */
3928
+
3929
+ Assertion.addProperty('finite', function(msg) {
3930
+ var obj = flag(this, 'object');
3931
+
3932
+ this.assert(
3933
+ typeof obj === 'number' && isFinite(obj)
3934
+ , 'expected #{this} to be a finite number'
3935
+ , 'expected #{this} to not be a finite number'
3936
+ );
3937
+ });