@dyrected/core 2.8.3 → 2.9.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 (500) hide show
  1. package/dist/{app-config-BccpBUqJ.d.cts → app-config-gEQJFvnN.d.cts} +212 -85
  2. package/dist/{app-config-BccpBUqJ.d.ts → app-config-gEQJFvnN.d.ts} +212 -85
  3. package/dist/chunk-JSBRDJBE.js +30 -0
  4. package/dist/{chunk-GFFGDHST.js → chunk-XRIONGRY.js} +1769 -12
  5. package/dist/index.cjs +1813 -6
  6. package/dist/index.d.cts +19 -4
  7. package/dist/index.d.ts +19 -4
  8. package/dist/index.js +56 -4
  9. package/dist/{observability-KCMTV7GO.js → observability-HQF4EUSV.js} +1 -0
  10. package/dist/server.cjs +1979 -13
  11. package/dist/server.d.cts +37 -15
  12. package/dist/server.d.ts +37 -15
  13. package/dist/server.js +230 -15
  14. package/dist/{where-sanitizer-WJ2W2QCE.js → where-sanitizer-3MNFMYA2.js} +2 -0
  15. package/package.json +3 -3
  16. package/dist/__tests__/access-features.test.d.ts +0 -2
  17. package/dist/__tests__/access-features.test.d.ts.map +0 -1
  18. package/dist/__tests__/access-features.test.js +0 -159
  19. package/dist/__tests__/access-features.test.js.map +0 -1
  20. package/dist/__tests__/access-parity.test.d.ts +0 -2
  21. package/dist/__tests__/access-parity.test.d.ts.map +0 -1
  22. package/dist/__tests__/access-parity.test.js +0 -338
  23. package/dist/__tests__/access-parity.test.js.map +0 -1
  24. package/dist/__tests__/access.test.d.ts +0 -2
  25. package/dist/__tests__/access.test.d.ts.map +0 -1
  26. package/dist/__tests__/access.test.js +0 -137
  27. package/dist/__tests__/access.test.js.map +0 -1
  28. package/dist/__tests__/admin-auth.test.d.ts +0 -2
  29. package/dist/__tests__/admin-auth.test.d.ts.map +0 -1
  30. package/dist/__tests__/admin-auth.test.js +0 -440
  31. package/dist/__tests__/admin-auth.test.js.map +0 -1
  32. package/dist/__tests__/app.test.d.ts +0 -2
  33. package/dist/__tests__/app.test.d.ts.map +0 -1
  34. package/dist/__tests__/app.test.js +0 -112
  35. package/dist/__tests__/app.test.js.map +0 -1
  36. package/dist/__tests__/audit.test.d.ts +0 -2
  37. package/dist/__tests__/audit.test.d.ts.map +0 -1
  38. package/dist/__tests__/audit.test.js +0 -125
  39. package/dist/__tests__/audit.test.js.map +0 -1
  40. package/dist/__tests__/auth-hydration.test.d.ts +0 -2
  41. package/dist/__tests__/auth-hydration.test.d.ts.map +0 -1
  42. package/dist/__tests__/auth-hydration.test.js +0 -90
  43. package/dist/__tests__/auth-hydration.test.js.map +0 -1
  44. package/dist/__tests__/auth-invite.test.d.ts +0 -2
  45. package/dist/__tests__/auth-invite.test.d.ts.map +0 -1
  46. package/dist/__tests__/auth-invite.test.js +0 -152
  47. package/dist/__tests__/auth-invite.test.js.map +0 -1
  48. package/dist/__tests__/auth-lockout.test.d.ts +0 -2
  49. package/dist/__tests__/auth-lockout.test.d.ts.map +0 -1
  50. package/dist/__tests__/auth-lockout.test.js +0 -154
  51. package/dist/__tests__/auth-lockout.test.js.map +0 -1
  52. package/dist/__tests__/auth-sessions.test.d.ts +0 -2
  53. package/dist/__tests__/auth-sessions.test.d.ts.map +0 -1
  54. package/dist/__tests__/auth-sessions.test.js +0 -118
  55. package/dist/__tests__/auth-sessions.test.js.map +0 -1
  56. package/dist/__tests__/config.test.d.ts +0 -2
  57. package/dist/__tests__/config.test.d.ts.map +0 -1
  58. package/dist/__tests__/config.test.js +0 -402
  59. package/dist/__tests__/config.test.js.map +0 -1
  60. package/dist/__tests__/define-field.test.d.ts +0 -2
  61. package/dist/__tests__/define-field.test.d.ts.map +0 -1
  62. package/dist/__tests__/define-field.test.js +0 -121
  63. package/dist/__tests__/define-field.test.js.map +0 -1
  64. package/dist/__tests__/deleteMany.test.d.ts +0 -2
  65. package/dist/__tests__/deleteMany.test.d.ts.map +0 -1
  66. package/dist/__tests__/deleteMany.test.js +0 -75
  67. package/dist/__tests__/deleteMany.test.js.map +0 -1
  68. package/dist/__tests__/depth.test.d.ts +0 -2
  69. package/dist/__tests__/depth.test.d.ts.map +0 -1
  70. package/dist/__tests__/depth.test.js +0 -115
  71. package/dist/__tests__/depth.test.js.map +0 -1
  72. package/dist/__tests__/dynamic-options.test.d.ts +0 -2
  73. package/dist/__tests__/dynamic-options.test.d.ts.map +0 -1
  74. package/dist/__tests__/dynamic-options.test.js +0 -168
  75. package/dist/__tests__/dynamic-options.test.js.map +0 -1
  76. package/dist/__tests__/email.service.test.d.ts +0 -2
  77. package/dist/__tests__/email.service.test.d.ts.map +0 -1
  78. package/dist/__tests__/email.service.test.js +0 -52
  79. package/dist/__tests__/email.service.test.js.map +0 -1
  80. package/dist/__tests__/field-inference.test-types.d.ts +0 -161
  81. package/dist/__tests__/field-inference.test-types.d.ts.map +0 -1
  82. package/dist/__tests__/field-inference.test-types.js +0 -87
  83. package/dist/__tests__/field-inference.test-types.js.map +0 -1
  84. package/dist/__tests__/fixtures/editorial-workflow.d.ts +0 -14
  85. package/dist/__tests__/fixtures/editorial-workflow.d.ts.map +0 -1
  86. package/dist/__tests__/fixtures/editorial-workflow.js +0 -12
  87. package/dist/__tests__/fixtures/editorial-workflow.js.map +0 -1
  88. package/dist/__tests__/hooks.test.d.ts +0 -2
  89. package/dist/__tests__/hooks.test.d.ts.map +0 -1
  90. package/dist/__tests__/hooks.test.js +0 -320
  91. package/dist/__tests__/hooks.test.js.map +0 -1
  92. package/dist/__tests__/mocks.d.ts +0 -75
  93. package/dist/__tests__/mocks.d.ts.map +0 -1
  94. package/dist/__tests__/mocks.js +0 -170
  95. package/dist/__tests__/mocks.js.map +0 -1
  96. package/dist/__tests__/observability.test.d.ts +0 -2
  97. package/dist/__tests__/observability.test.d.ts.map +0 -1
  98. package/dist/__tests__/observability.test.js +0 -233
  99. package/dist/__tests__/observability.test.js.map +0 -1
  100. package/dist/__tests__/openapi.test.d.ts +0 -2
  101. package/dist/__tests__/openapi.test.d.ts.map +0 -1
  102. package/dist/__tests__/openapi.test.js +0 -105
  103. package/dist/__tests__/openapi.test.js.map +0 -1
  104. package/dist/__tests__/parse-sort.test.d.ts +0 -2
  105. package/dist/__tests__/parse-sort.test.d.ts.map +0 -1
  106. package/dist/__tests__/parse-sort.test.js +0 -24
  107. package/dist/__tests__/parse-sort.test.js.map +0 -1
  108. package/dist/__tests__/preferences.test.d.ts +0 -2
  109. package/dist/__tests__/preferences.test.d.ts.map +0 -1
  110. package/dist/__tests__/preferences.test.js +0 -168
  111. package/dist/__tests__/preferences.test.js.map +0 -1
  112. package/dist/__tests__/router.test.d.ts +0 -2
  113. package/dist/__tests__/router.test.d.ts.map +0 -1
  114. package/dist/__tests__/router.test.js +0 -70
  115. package/dist/__tests__/router.test.js.map +0 -1
  116. package/dist/__tests__/search.test.d.ts +0 -2
  117. package/dist/__tests__/search.test.d.ts.map +0 -1
  118. package/dist/__tests__/search.test.js +0 -174
  119. package/dist/__tests__/search.test.js.map +0 -1
  120. package/dist/__tests__/upload-validation.test.d.ts +0 -2
  121. package/dist/__tests__/upload-validation.test.d.ts.map +0 -1
  122. package/dist/__tests__/upload-validation.test.js +0 -41
  123. package/dist/__tests__/upload-validation.test.js.map +0 -1
  124. package/dist/__tests__/where.test.d.ts +0 -2
  125. package/dist/__tests__/where.test.d.ts.map +0 -1
  126. package/dist/__tests__/where.test.js +0 -105
  127. package/dist/__tests__/where.test.js.map +0 -1
  128. package/dist/__tests__/workflow.test.d.ts +0 -2
  129. package/dist/__tests__/workflow.test.d.ts.map +0 -1
  130. package/dist/__tests__/workflow.test.js +0 -684
  131. package/dist/__tests__/workflow.test.js.map +0 -1
  132. package/dist/app-config-7G-3tF_I.d.cts +0 -2259
  133. package/dist/app-config-7G-3tF_I.d.ts +0 -2259
  134. package/dist/app-config-9hs8DRED.d.cts +0 -1718
  135. package/dist/app-config-9hs8DRED.d.ts +0 -1718
  136. package/dist/app-config-B3ByBjCN.d.cts +0 -2222
  137. package/dist/app-config-B3ByBjCN.d.ts +0 -2222
  138. package/dist/app-config-B5tYsZaH.d.cts +0 -2404
  139. package/dist/app-config-B5tYsZaH.d.ts +0 -2404
  140. package/dist/app-config-BEuyPktb.d.cts +0 -2556
  141. package/dist/app-config-BEuyPktb.d.ts +0 -2556
  142. package/dist/app-config-BIkjQWzU.d.cts +0 -2218
  143. package/dist/app-config-BIkjQWzU.d.ts +0 -2218
  144. package/dist/app-config-BcuZIpvL.d.cts +0 -1951
  145. package/dist/app-config-BcuZIpvL.d.ts +0 -1951
  146. package/dist/app-config-BfpeE3bF.d.cts +0 -2100
  147. package/dist/app-config-BfpeE3bF.d.ts +0 -2100
  148. package/dist/app-config-Bm9-2Am6.d.cts +0 -1875
  149. package/dist/app-config-Bm9-2Am6.d.ts +0 -1875
  150. package/dist/app-config-BqhrBrSM.d.cts +0 -1522
  151. package/dist/app-config-BqhrBrSM.d.ts +0 -1522
  152. package/dist/app-config-Bxg_DVxv.d.cts +0 -1413
  153. package/dist/app-config-Bxg_DVxv.d.ts +0 -1413
  154. package/dist/app-config-C0twGIaF.d.cts +0 -1597
  155. package/dist/app-config-C0twGIaF.d.ts +0 -1597
  156. package/dist/app-config-C0uxEU7Q.d.cts +0 -1874
  157. package/dist/app-config-C0uxEU7Q.d.ts +0 -1874
  158. package/dist/app-config-C3X5BAyK.d.cts +0 -1539
  159. package/dist/app-config-C3X5BAyK.d.ts +0 -1539
  160. package/dist/app-config-C9VJ6rTv.d.cts +0 -2092
  161. package/dist/app-config-C9VJ6rTv.d.ts +0 -2092
  162. package/dist/app-config-CBOn8IyZ.d.cts +0 -1838
  163. package/dist/app-config-CBOn8IyZ.d.ts +0 -1838
  164. package/dist/app-config-CCe-yq9q.d.cts +0 -2222
  165. package/dist/app-config-CCe-yq9q.d.ts +0 -2222
  166. package/dist/app-config-CJAGGPrk.d.cts +0 -1900
  167. package/dist/app-config-CJAGGPrk.d.ts +0 -1900
  168. package/dist/app-config-CPOs7THF.d.cts +0 -2217
  169. package/dist/app-config-CPOs7THF.d.ts +0 -2217
  170. package/dist/app-config-CYV70eoF.d.cts +0 -2100
  171. package/dist/app-config-CYV70eoF.d.ts +0 -2100
  172. package/dist/app-config-ChsrBB7p.d.cts +0 -2100
  173. package/dist/app-config-ChsrBB7p.d.ts +0 -2100
  174. package/dist/app-config-CiEDJm0e.d.cts +0 -1912
  175. package/dist/app-config-CiEDJm0e.d.ts +0 -1912
  176. package/dist/app-config-CstocO9M.d.cts +0 -1580
  177. package/dist/app-config-CstocO9M.d.ts +0 -1580
  178. package/dist/app-config-Ctp454zB.d.cts +0 -2214
  179. package/dist/app-config-Ctp454zB.d.ts +0 -2214
  180. package/dist/app-config-CwaU1de2.d.cts +0 -1868
  181. package/dist/app-config-CwaU1de2.d.ts +0 -1868
  182. package/dist/app-config-DCDh8Gbx.d.cts +0 -1926
  183. package/dist/app-config-DCDh8Gbx.d.ts +0 -1926
  184. package/dist/app-config-DCWinlNK.d.cts +0 -2091
  185. package/dist/app-config-DCWinlNK.d.ts +0 -2091
  186. package/dist/app-config-DIwvzbpe.d.cts +0 -1555
  187. package/dist/app-config-DIwvzbpe.d.ts +0 -1555
  188. package/dist/app-config-DJmNYgYh.d.cts +0 -2305
  189. package/dist/app-config-DJmNYgYh.d.ts +0 -2305
  190. package/dist/app-config-DO3laV58.d.cts +0 -2397
  191. package/dist/app-config-DO3laV58.d.ts +0 -2397
  192. package/dist/app-config-DVdSospO.d.cts +0 -1842
  193. package/dist/app-config-DVdSospO.d.ts +0 -1842
  194. package/dist/app-config-DZf_mmi9.d.cts +0 -2211
  195. package/dist/app-config-DZf_mmi9.d.ts +0 -2211
  196. package/dist/app-config-DbK2Tv6i.d.cts +0 -2080
  197. package/dist/app-config-DbK2Tv6i.d.ts +0 -2080
  198. package/dist/app-config-Dkndq5ni.d.cts +0 -1580
  199. package/dist/app-config-Dkndq5ni.d.ts +0 -1580
  200. package/dist/app-config-Dms6kvE-.d.cts +0 -2072
  201. package/dist/app-config-Dms6kvE-.d.ts +0 -2072
  202. package/dist/app-config-DqCipvSI.d.cts +0 -1411
  203. package/dist/app-config-DqCipvSI.d.ts +0 -1411
  204. package/dist/app-config-Dv5XACR4.d.cts +0 -2065
  205. package/dist/app-config-Dv5XACR4.d.ts +0 -2065
  206. package/dist/app-config-P-SF5nnR.d.cts +0 -1568
  207. package/dist/app-config-P-SF5nnR.d.ts +0 -1568
  208. package/dist/app-config-SkUoN5JU.d.cts +0 -2192
  209. package/dist/app-config-SkUoN5JU.d.ts +0 -2192
  210. package/dist/app-config-WzqpuZMr.d.cts +0 -2566
  211. package/dist/app-config-WzqpuZMr.d.ts +0 -2566
  212. package/dist/app-config-_kkj71CB.d.cts +0 -2010
  213. package/dist/app-config-_kkj71CB.d.ts +0 -2010
  214. package/dist/app-config-fEjRm1o9.d.cts +0 -2402
  215. package/dist/app-config-fEjRm1o9.d.ts +0 -2402
  216. package/dist/app-config-oU1EGHND.d.cts +0 -1538
  217. package/dist/app-config-oU1EGHND.d.ts +0 -1538
  218. package/dist/app-config-ouBRb6Bf.d.cts +0 -1716
  219. package/dist/app-config-ouBRb6Bf.d.ts +0 -1716
  220. package/dist/app-config-oz8H_MOX.d.cts +0 -2224
  221. package/dist/app-config-oz8H_MOX.d.ts +0 -2224
  222. package/dist/app-config-tITj_0sn.d.cts +0 -1926
  223. package/dist/app-config-tITj_0sn.d.ts +0 -1926
  224. package/dist/app-config-wnLtFu6c.d.cts +0 -1538
  225. package/dist/app-config-wnLtFu6c.d.ts +0 -1538
  226. package/dist/app-config-x-CnipcA.d.cts +0 -2072
  227. package/dist/app-config-x-CnipcA.d.ts +0 -2072
  228. package/dist/app.d.ts +0 -35
  229. package/dist/app.d.ts.map +0 -1
  230. package/dist/app.js +0 -164
  231. package/dist/app.js.map +0 -1
  232. package/dist/auth/access.d.ts +0 -5
  233. package/dist/auth/access.d.ts.map +0 -1
  234. package/dist/auth/access.js +0 -59
  235. package/dist/auth/access.js.map +0 -1
  236. package/dist/auth/jexl.d.ts +0 -13
  237. package/dist/auth/jexl.d.ts.map +0 -1
  238. package/dist/auth/jexl.js +0 -30
  239. package/dist/auth/jexl.js.map +0 -1
  240. package/dist/auth/lockout.d.ts +0 -11
  241. package/dist/auth/lockout.d.ts.map +0 -1
  242. package/dist/auth/lockout.js +0 -37
  243. package/dist/auth/lockout.js.map +0 -1
  244. package/dist/auth/password.d.ts +0 -10
  245. package/dist/auth/password.d.ts.map +0 -1
  246. package/dist/auth/password.js +0 -28
  247. package/dist/auth/password.js.map +0 -1
  248. package/dist/auth/sessions.d.ts +0 -39
  249. package/dist/auth/sessions.d.ts.map +0 -1
  250. package/dist/auth/sessions.js +0 -126
  251. package/dist/auth/sessions.js.map +0 -1
  252. package/dist/auth/token.d.ts +0 -23
  253. package/dist/auth/token.d.ts.map +0 -1
  254. package/dist/auth/token.js +0 -40
  255. package/dist/auth/token.js.map +0 -1
  256. package/dist/chunk-23NM4LDU.js +0 -2883
  257. package/dist/chunk-2TKDCCIR.js +0 -2622
  258. package/dist/chunk-2UXLA4YN.js +0 -3139
  259. package/dist/chunk-2WODKOUB.js +0 -1627
  260. package/dist/chunk-35NM2WPO.js +0 -1658
  261. package/dist/chunk-3CMG2BH2.js +0 -1618
  262. package/dist/chunk-3SFITPX4.js +0 -2628
  263. package/dist/chunk-3TRRTN6U.js +0 -3441
  264. package/dist/chunk-57FNM42D.js +0 -2392
  265. package/dist/chunk-5U2WRCNH.js +0 -3140
  266. package/dist/chunk-5ZIA5COH.js +0 -3414
  267. package/dist/chunk-6TWQ6GTD.js +0 -3480
  268. package/dist/chunk-AKYYGMFS.js +0 -3365
  269. package/dist/chunk-AQO4HI2Y.js +0 -3204
  270. package/dist/chunk-BAMX7YUC.js +0 -1815
  271. package/dist/chunk-BQV3QW3Y.js +0 -2588
  272. package/dist/chunk-CQVTQ67D.js +0 -2632
  273. package/dist/chunk-CUOPCOU2.js +0 -1644
  274. package/dist/chunk-DCY7QHRB.js +0 -1637
  275. package/dist/chunk-DFBLNYUH.js +0 -3402
  276. package/dist/chunk-EH3MJGB5.js +0 -2571
  277. package/dist/chunk-EJG6AMYB.js +0 -3537
  278. package/dist/chunk-ELHRRPKX.js +0 -2863
  279. package/dist/chunk-EOW4YMAV.js +0 -1637
  280. package/dist/chunk-G43REXPX.js +0 -3147
  281. package/dist/chunk-GFKBPBJJ.js +0 -3637
  282. package/dist/chunk-HRLSFTLR.js +0 -3061
  283. package/dist/chunk-JFA22YFB.js +0 -1625
  284. package/dist/chunk-K3ASMUKV.js +0 -2601
  285. package/dist/chunk-KEKOEAX6.js +0 -3139
  286. package/dist/chunk-L65PQYDP.js +0 -1536
  287. package/dist/chunk-LFGSRQLX.js +0 -3568
  288. package/dist/chunk-M3HKRN7E.js +0 -1665
  289. package/dist/chunk-MQZH7RQC.js +0 -1667
  290. package/dist/chunk-NNZRYF3U.js +0 -3537
  291. package/dist/chunk-PRQ2RF5C.js +0 -3485
  292. package/dist/chunk-PYE2JSY4.js +0 -3568
  293. package/dist/chunk-PZMDK3MH.js +0 -3203
  294. package/dist/chunk-QCXLDKZO.js +0 -3272
  295. package/dist/chunk-QTIAQBNH.js +0 -3097
  296. package/dist/chunk-ROECUARS.js +0 -2615
  297. package/dist/chunk-SM32ND5M.js +0 -3472
  298. package/dist/chunk-T2DGC4MD.js +0 -3008
  299. package/dist/chunk-T626OZMH.js +0 -2602
  300. package/dist/chunk-TEGRS6J7.js +0 -2609
  301. package/dist/chunk-TLU77TLE.js +0 -3203
  302. package/dist/chunk-UKUEKTAO.js +0 -513
  303. package/dist/chunk-VCYYBN5J.js +0 -1873
  304. package/dist/chunk-VM43G3IG.js +0 -506
  305. package/dist/chunk-VWJKFZQU.js +0 -3139
  306. package/dist/chunk-WF5A6PDJ.js +0 -1618
  307. package/dist/chunk-WVD7PORQ.js +0 -1672
  308. package/dist/chunk-XX7N64NL.js +0 -3550
  309. package/dist/chunk-XZLIBQSO.js +0 -2397
  310. package/dist/chunk-YEBCT77K.js +0 -3269
  311. package/dist/chunk-YSSHLGQ6.js +0 -3139
  312. package/dist/chunk-YXEKNN5X.js +0 -3085
  313. package/dist/chunk-Z7CFUYVP.js +0 -3653
  314. package/dist/chunk-ZISFMAEL.js +0 -3550
  315. package/dist/controllers/admin-auth.controller.d.ts +0 -71
  316. package/dist/controllers/admin-auth.controller.d.ts.map +0 -1
  317. package/dist/controllers/admin-auth.controller.js +0 -450
  318. package/dist/controllers/admin-auth.controller.js.map +0 -1
  319. package/dist/controllers/audit.controller.d.ts +0 -42
  320. package/dist/controllers/audit.controller.d.ts.map +0 -1
  321. package/dist/controllers/audit.controller.js +0 -149
  322. package/dist/controllers/audit.controller.js.map +0 -1
  323. package/dist/controllers/auth.controller.d.ts +0 -143
  324. package/dist/controllers/auth.controller.d.ts.map +0 -1
  325. package/dist/controllers/auth.controller.js +0 -572
  326. package/dist/controllers/auth.controller.js.map +0 -1
  327. package/dist/controllers/collection.controller.d.ts +0 -170
  328. package/dist/controllers/collection.controller.d.ts.map +0 -1
  329. package/dist/controllers/collection.controller.js +0 -1033
  330. package/dist/controllers/collection.controller.js.map +0 -1
  331. package/dist/controllers/global.controller.d.ts +0 -20
  332. package/dist/controllers/global.controller.d.ts.map +0 -1
  333. package/dist/controllers/global.controller.js +0 -182
  334. package/dist/controllers/global.controller.js.map +0 -1
  335. package/dist/controllers/media.controller.d.ts +0 -39
  336. package/dist/controllers/media.controller.d.ts.map +0 -1
  337. package/dist/controllers/media.controller.js +0 -178
  338. package/dist/controllers/media.controller.js.map +0 -1
  339. package/dist/controllers/preview.controller.d.ts +0 -37
  340. package/dist/controllers/preview.controller.d.ts.map +0 -1
  341. package/dist/controllers/preview.controller.js +0 -48
  342. package/dist/controllers/preview.controller.js.map +0 -1
  343. package/dist/index.d.ts.map +0 -1
  344. package/dist/index.js.map +0 -1
  345. package/dist/middleware/auth.d.ts +0 -19
  346. package/dist/middleware/auth.d.ts.map +0 -1
  347. package/dist/middleware/auth.js +0 -157
  348. package/dist/middleware/auth.js.map +0 -1
  349. package/dist/middleware/rate-limit.d.ts +0 -9
  350. package/dist/middleware/rate-limit.d.ts.map +0 -1
  351. package/dist/middleware/rate-limit.js +0 -75
  352. package/dist/middleware/rate-limit.js.map +0 -1
  353. package/dist/network.d.ts +0 -6
  354. package/dist/network.d.ts.map +0 -1
  355. package/dist/network.js +0 -70
  356. package/dist/network.js.map +0 -1
  357. package/dist/observability-CNM4QFE4.js +0 -34
  358. package/dist/observability-L5BORBB2.js +0 -34
  359. package/dist/observability.d.ts +0 -113
  360. package/dist/observability.d.ts.map +0 -1
  361. package/dist/observability.js +0 -497
  362. package/dist/observability.js.map +0 -1
  363. package/dist/router.d.ts +0 -8
  364. package/dist/router.d.ts.map +0 -1
  365. package/dist/router.js +0 -704
  366. package/dist/router.js.map +0 -1
  367. package/dist/server.d.ts.map +0 -1
  368. package/dist/server.js.map +0 -1
  369. package/dist/services/audit.service.d.ts +0 -23
  370. package/dist/services/audit.service.d.ts.map +0 -1
  371. package/dist/services/audit.service.js +0 -39
  372. package/dist/services/audit.service.js.map +0 -1
  373. package/dist/services/defaults.service.d.ts +0 -8
  374. package/dist/services/defaults.service.d.ts.map +0 -1
  375. package/dist/services/defaults.service.js +0 -55
  376. package/dist/services/defaults.service.js.map +0 -1
  377. package/dist/services/email-template.d.ts +0 -46
  378. package/dist/services/email-template.d.ts.map +0 -1
  379. package/dist/services/email-template.js +0 -88
  380. package/dist/services/email-template.js.map +0 -1
  381. package/dist/services/email.service.d.ts +0 -34
  382. package/dist/services/email.service.d.ts.map +0 -1
  383. package/dist/services/email.service.js +0 -129
  384. package/dist/services/email.service.js.map +0 -1
  385. package/dist/services/media.service.d.ts +0 -20
  386. package/dist/services/media.service.d.ts.map +0 -1
  387. package/dist/services/media.service.js +0 -49
  388. package/dist/services/media.service.js.map +0 -1
  389. package/dist/services/population.service.d.ts +0 -20
  390. package/dist/services/population.service.d.ts.map +0 -1
  391. package/dist/services/population.service.js +0 -224
  392. package/dist/services/population.service.js.map +0 -1
  393. package/dist/types/access.d.ts +0 -48
  394. package/dist/types/access.d.ts.map +0 -1
  395. package/dist/types/access.js +0 -2
  396. package/dist/types/access.js.map +0 -1
  397. package/dist/types/adapters.d.ts +0 -152
  398. package/dist/types/adapters.d.ts.map +0 -1
  399. package/dist/types/adapters.js +0 -2
  400. package/dist/types/adapters.js.map +0 -1
  401. package/dist/types/admin-auth.d.ts +0 -132
  402. package/dist/types/admin-auth.d.ts.map +0 -1
  403. package/dist/types/admin-auth.js +0 -2
  404. package/dist/types/admin-auth.js.map +0 -1
  405. package/dist/types/admin.d.ts +0 -86
  406. package/dist/types/admin.d.ts.map +0 -1
  407. package/dist/types/admin.js +0 -2
  408. package/dist/types/admin.js.map +0 -1
  409. package/dist/types/app-config.d.ts +0 -279
  410. package/dist/types/app-config.d.ts.map +0 -1
  411. package/dist/types/app-config.js +0 -2
  412. package/dist/types/app-config.js.map +0 -1
  413. package/dist/types/documents.d.ts +0 -65
  414. package/dist/types/documents.d.ts.map +0 -1
  415. package/dist/types/documents.js +0 -2
  416. package/dist/types/documents.js.map +0 -1
  417. package/dist/types/hooks.d.ts +0 -122
  418. package/dist/types/hooks.d.ts.map +0 -1
  419. package/dist/types/hooks.js +0 -2
  420. package/dist/types/hooks.js.map +0 -1
  421. package/dist/types/index.d.ts +0 -13
  422. package/dist/types/index.d.ts.map +0 -1
  423. package/dist/types/index.js +0 -13
  424. package/dist/types/index.js.map +0 -1
  425. package/dist/types/request.d.ts +0 -42
  426. package/dist/types/request.d.ts.map +0 -1
  427. package/dist/types/request.js +0 -2
  428. package/dist/types/request.js.map +0 -1
  429. package/dist/types/schema-config.d.ts +0 -443
  430. package/dist/types/schema-config.d.ts.map +0 -1
  431. package/dist/types/schema-config.js +0 -2
  432. package/dist/types/schema-config.js.map +0 -1
  433. package/dist/types/schema-core.d.ts +0 -628
  434. package/dist/types/schema-core.d.ts.map +0 -1
  435. package/dist/types/schema-core.js +0 -2
  436. package/dist/types/schema-core.js.map +0 -1
  437. package/dist/types/schema-inference.d.ts +0 -73
  438. package/dist/types/schema-inference.d.ts.map +0 -1
  439. package/dist/types/schema-inference.js +0 -2
  440. package/dist/types/schema-inference.js.map +0 -1
  441. package/dist/types/workflows.d.ts +0 -121
  442. package/dist/types/workflows.d.ts.map +0 -1
  443. package/dist/types/workflows.js +0 -7
  444. package/dist/types/workflows.js.map +0 -1
  445. package/dist/utils/access-control.d.ts +0 -35
  446. package/dist/utils/access-control.d.ts.map +0 -1
  447. package/dist/utils/access-control.js +0 -161
  448. package/dist/utils/access-control.js.map +0 -1
  449. package/dist/utils/admin-auth.d.ts +0 -5
  450. package/dist/utils/admin-auth.d.ts.map +0 -1
  451. package/dist/utils/admin-auth.js +0 -39
  452. package/dist/utils/admin-auth.js.map +0 -1
  453. package/dist/utils/block-references.d.ts +0 -10
  454. package/dist/utils/block-references.d.ts.map +0 -1
  455. package/dist/utils/block-references.js +0 -100
  456. package/dist/utils/block-references.js.map +0 -1
  457. package/dist/utils/collection-search.d.ts +0 -11
  458. package/dist/utils/collection-search.d.ts.map +0 -1
  459. package/dist/utils/collection-search.js +0 -204
  460. package/dist/utils/collection-search.js.map +0 -1
  461. package/dist/utils/config.d.ts +0 -8
  462. package/dist/utils/config.d.ts.map +0 -1
  463. package/dist/utils/config.js +0 -336
  464. package/dist/utils/config.js.map +0 -1
  465. package/dist/utils/hooks.d.ts +0 -41
  466. package/dist/utils/hooks.d.ts.map +0 -1
  467. package/dist/utils/hooks.js +0 -177
  468. package/dist/utils/hooks.js.map +0 -1
  469. package/dist/utils/openapi.d.ts +0 -6
  470. package/dist/utils/openapi.d.ts.map +0 -1
  471. package/dist/utils/openapi.js +0 -981
  472. package/dist/utils/openapi.js.map +0 -1
  473. package/dist/utils/parse-sort.d.ts +0 -43
  474. package/dist/utils/parse-sort.d.ts.map +0 -1
  475. package/dist/utils/parse-sort.js +0 -70
  476. package/dist/utils/parse-sort.js.map +0 -1
  477. package/dist/utils/parse-where.d.ts +0 -69
  478. package/dist/utils/parse-where.d.ts.map +0 -1
  479. package/dist/utils/parse-where.js +0 -202
  480. package/dist/utils/parse-where.js.map +0 -1
  481. package/dist/utils/readonly-db.d.ts +0 -9
  482. package/dist/utils/readonly-db.d.ts.map +0 -1
  483. package/dist/utils/readonly-db.js +0 -21
  484. package/dist/utils/readonly-db.js.map +0 -1
  485. package/dist/utils/swagger.d.ts +0 -11
  486. package/dist/utils/swagger.d.ts.map +0 -1
  487. package/dist/utils/swagger.js +0 -62
  488. package/dist/utils/swagger.js.map +0 -1
  489. package/dist/utils/upload-validation.d.ts +0 -23
  490. package/dist/utils/upload-validation.d.ts.map +0 -1
  491. package/dist/utils/upload-validation.js +0 -46
  492. package/dist/utils/upload-validation.js.map +0 -1
  493. package/dist/utils/where-sanitizer.d.ts +0 -10
  494. package/dist/utils/where-sanitizer.d.ts.map +0 -1
  495. package/dist/utils/where-sanitizer.js +0 -67
  496. package/dist/utils/where-sanitizer.js.map +0 -1
  497. package/dist/workflows.d.ts +0 -86
  498. package/dist/workflows.d.ts.map +0 -1
  499. package/dist/workflows.js +0 -405
  500. package/dist/workflows.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -8,6 +8,9 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __esm = (fn, res) => function __init() {
9
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
10
  };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
11
14
  var __export = (target, all) => {
12
15
  for (var name in all)
13
16
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -541,6 +544,1757 @@ var init_observability = __esm({
541
544
  }
542
545
  });
543
546
 
547
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/interopRequireDefault.js
548
+ var require_interopRequireDefault = __commonJS({
549
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports2, module2) {
550
+ "use strict";
551
+ function _interopRequireDefault(e) {
552
+ return e && e.__esModule ? e : {
553
+ "default": e
554
+ };
555
+ }
556
+ module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
557
+ }
558
+ });
559
+
560
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/typeof.js
561
+ var require_typeof = __commonJS({
562
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/typeof.js"(exports2, module2) {
563
+ "use strict";
564
+ function _typeof(o) {
565
+ "@babel/helpers - typeof";
566
+ return module2.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
567
+ return typeof o2;
568
+ } : function(o2) {
569
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
570
+ }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof(o);
571
+ }
572
+ module2.exports = _typeof, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
573
+ }
574
+ });
575
+
576
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPrimitive.js
577
+ var require_toPrimitive = __commonJS({
578
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPrimitive.js"(exports2, module2) {
579
+ "use strict";
580
+ var _typeof = require_typeof()["default"];
581
+ function toPrimitive(t, r) {
582
+ if ("object" != _typeof(t) || !t) return t;
583
+ var e = t[Symbol.toPrimitive];
584
+ if (void 0 !== e) {
585
+ var i = e.call(t, r || "default");
586
+ if ("object" != _typeof(i)) return i;
587
+ throw new TypeError("@@toPrimitive must return a primitive value.");
588
+ }
589
+ return ("string" === r ? String : Number)(t);
590
+ }
591
+ module2.exports = toPrimitive, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
592
+ }
593
+ });
594
+
595
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPropertyKey.js
596
+ var require_toPropertyKey = __commonJS({
597
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports2, module2) {
598
+ "use strict";
599
+ var _typeof = require_typeof()["default"];
600
+ var toPrimitive = require_toPrimitive();
601
+ function toPropertyKey(t) {
602
+ var i = toPrimitive(t, "string");
603
+ return "symbol" == _typeof(i) ? i : i + "";
604
+ }
605
+ module2.exports = toPropertyKey, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
606
+ }
607
+ });
608
+
609
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/defineProperty.js
610
+ var require_defineProperty = __commonJS({
611
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/defineProperty.js"(exports2, module2) {
612
+ "use strict";
613
+ var toPropertyKey = require_toPropertyKey();
614
+ function _defineProperty(e, r, t) {
615
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
616
+ value: t,
617
+ enumerable: true,
618
+ configurable: true,
619
+ writable: true
620
+ }) : e[r] = t, e;
621
+ }
622
+ module2.exports = _defineProperty, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
623
+ }
624
+ });
625
+
626
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/classCallCheck.js
627
+ var require_classCallCheck = __commonJS({
628
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/classCallCheck.js"(exports2, module2) {
629
+ "use strict";
630
+ function _classCallCheck(a, n) {
631
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
632
+ }
633
+ module2.exports = _classCallCheck, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
634
+ }
635
+ });
636
+
637
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/createClass.js
638
+ var require_createClass = __commonJS({
639
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/createClass.js"(exports2, module2) {
640
+ "use strict";
641
+ var toPropertyKey = require_toPropertyKey();
642
+ function _defineProperties(e, r) {
643
+ for (var t = 0; t < r.length; t++) {
644
+ var o = r[t];
645
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
646
+ }
647
+ }
648
+ function _createClass(e, r, t) {
649
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
650
+ writable: false
651
+ }), e;
652
+ }
653
+ module2.exports = _createClass, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
654
+ }
655
+ });
656
+
657
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayLikeToArray.js
658
+ var require_arrayLikeToArray = __commonJS({
659
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports2, module2) {
660
+ "use strict";
661
+ function _arrayLikeToArray(r, a) {
662
+ (null == a || a > r.length) && (a = r.length);
663
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
664
+ return n;
665
+ }
666
+ module2.exports = _arrayLikeToArray, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
667
+ }
668
+ });
669
+
670
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
671
+ var require_arrayWithoutHoles = __commonJS({
672
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports2, module2) {
673
+ "use strict";
674
+ var arrayLikeToArray = require_arrayLikeToArray();
675
+ function _arrayWithoutHoles(r) {
676
+ if (Array.isArray(r)) return arrayLikeToArray(r);
677
+ }
678
+ module2.exports = _arrayWithoutHoles, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
679
+ }
680
+ });
681
+
682
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/iterableToArray.js
683
+ var require_iterableToArray = __commonJS({
684
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/iterableToArray.js"(exports2, module2) {
685
+ "use strict";
686
+ function _iterableToArray(r) {
687
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
688
+ }
689
+ module2.exports = _iterableToArray, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
690
+ }
691
+ });
692
+
693
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js
694
+ var require_unsupportedIterableToArray = __commonJS({
695
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports2, module2) {
696
+ "use strict";
697
+ var arrayLikeToArray = require_arrayLikeToArray();
698
+ function _unsupportedIterableToArray(r, a) {
699
+ if (r) {
700
+ if ("string" == typeof r) return arrayLikeToArray(r, a);
701
+ var t = {}.toString.call(r).slice(8, -1);
702
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
703
+ }
704
+ }
705
+ module2.exports = _unsupportedIterableToArray, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
706
+ }
707
+ });
708
+
709
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/nonIterableSpread.js
710
+ var require_nonIterableSpread = __commonJS({
711
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports2, module2) {
712
+ "use strict";
713
+ function _nonIterableSpread() {
714
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
715
+ }
716
+ module2.exports = _nonIterableSpread, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
717
+ }
718
+ });
719
+
720
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toConsumableArray.js
721
+ var require_toConsumableArray = __commonJS({
722
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports2, module2) {
723
+ "use strict";
724
+ var arrayWithoutHoles = require_arrayWithoutHoles();
725
+ var iterableToArray = require_iterableToArray();
726
+ var unsupportedIterableToArray = require_unsupportedIterableToArray();
727
+ var nonIterableSpread = require_nonIterableSpread();
728
+ function _toConsumableArray(r) {
729
+ return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
730
+ }
731
+ module2.exports = _toConsumableArray, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
732
+ }
733
+ });
734
+
735
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/handlers.js
736
+ var require_handlers = __commonJS({
737
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/handlers.js"(exports2) {
738
+ "use strict";
739
+ var _interopRequireDefault = require_interopRequireDefault();
740
+ var _toConsumableArray2 = _interopRequireDefault(require_toConsumableArray());
741
+ var poolNames = {
742
+ functions: "Jexl Function",
743
+ transforms: "Transform"
744
+ };
745
+ exports2.ArrayLiteral = function(ast) {
746
+ return this.evalArray(ast.value);
747
+ };
748
+ exports2.BinaryExpression = function(ast) {
749
+ var _this = this;
750
+ var grammarOp = this._grammar.elements[ast.operator];
751
+ if (grammarOp.evalOnDemand) {
752
+ var wrap = function wrap2(subAst) {
753
+ return {
754
+ eval: function _eval() {
755
+ return _this.eval(subAst);
756
+ }
757
+ };
758
+ };
759
+ return grammarOp.evalOnDemand(wrap(ast.left), wrap(ast.right));
760
+ }
761
+ return this.Promise.all([this.eval(ast.left), this.eval(ast.right)]).then(function(arr) {
762
+ return grammarOp.eval(arr[0], arr[1]);
763
+ });
764
+ };
765
+ exports2.ConditionalExpression = function(ast) {
766
+ var _this2 = this;
767
+ return this.eval(ast.test).then(function(res) {
768
+ if (res) {
769
+ if (ast.consequent) {
770
+ return _this2.eval(ast.consequent);
771
+ }
772
+ return res;
773
+ }
774
+ return _this2.eval(ast.alternate);
775
+ });
776
+ };
777
+ exports2.FilterExpression = function(ast) {
778
+ var _this3 = this;
779
+ return this.eval(ast.subject).then(function(subject) {
780
+ if (ast.relative) {
781
+ return _this3._filterRelative(subject, ast.expr);
782
+ }
783
+ return _this3._filterStatic(subject, ast.expr);
784
+ });
785
+ };
786
+ exports2.Identifier = function(ast) {
787
+ if (!ast.from) {
788
+ return ast.relative ? this._relContext[ast.value] : this._context[ast.value];
789
+ }
790
+ return this.eval(ast.from).then(function(context) {
791
+ if (context === void 0 || context === null) {
792
+ return void 0;
793
+ }
794
+ if (Array.isArray(context)) {
795
+ context = context[0];
796
+ }
797
+ return context[ast.value];
798
+ });
799
+ };
800
+ exports2.Literal = function(ast) {
801
+ return ast.value;
802
+ };
803
+ exports2.ObjectLiteral = function(ast) {
804
+ return this.evalMap(ast.value);
805
+ };
806
+ exports2.FunctionCall = function(ast) {
807
+ var poolName = poolNames[ast.pool];
808
+ if (!poolName) {
809
+ throw new Error("Corrupt AST: Pool '".concat(ast.pool, "' not found"));
810
+ }
811
+ var pool = this._grammar[ast.pool];
812
+ var func = pool[ast.name];
813
+ if (!func) {
814
+ throw new Error("".concat(poolName, " ").concat(ast.name, " is not defined."));
815
+ }
816
+ return this.evalArray(ast.args || []).then(function(args) {
817
+ return func.apply(void 0, (0, _toConsumableArray2.default)(args));
818
+ });
819
+ };
820
+ exports2.UnaryExpression = function(ast) {
821
+ var _this4 = this;
822
+ return this.eval(ast.right).then(function(right) {
823
+ return _this4._grammar.elements[ast.operator].eval(right);
824
+ });
825
+ };
826
+ }
827
+ });
828
+
829
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/Evaluator.js
830
+ var require_Evaluator = __commonJS({
831
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/Evaluator.js"(exports2, module2) {
832
+ "use strict";
833
+ var _interopRequireDefault = require_interopRequireDefault();
834
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
835
+ var _createClass2 = _interopRequireDefault(require_createClass());
836
+ var handlers = require_handlers();
837
+ var Evaluator = /* @__PURE__ */ (function() {
838
+ function Evaluator2(grammar, context, relativeContext) {
839
+ var promise = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Promise;
840
+ (0, _classCallCheck2.default)(this, Evaluator2);
841
+ this._grammar = grammar;
842
+ this._context = context || {};
843
+ this._relContext = relativeContext || this._context;
844
+ this.Promise = promise;
845
+ }
846
+ (0, _createClass2.default)(Evaluator2, [{
847
+ key: "eval",
848
+ value: function _eval(ast) {
849
+ var _this = this;
850
+ return this.Promise.resolve().then(function() {
851
+ return handlers[ast.type].call(_this, ast);
852
+ });
853
+ }
854
+ /**
855
+ * Simultaneously evaluates each expression within an array, and delivers the
856
+ * response as an array with the resulting values at the same indexes as their
857
+ * originating expressions.
858
+ * @param {Array<string>} arr An array of expression strings to be evaluated
859
+ * @returns {Promise<Array<{}>>} resolves with the result array
860
+ */
861
+ }, {
862
+ key: "evalArray",
863
+ value: function evalArray(arr) {
864
+ var _this2 = this;
865
+ return this.Promise.all(arr.map(function(elem) {
866
+ return _this2.eval(elem);
867
+ }));
868
+ }
869
+ /**
870
+ * Simultaneously evaluates each expression within a map, and delivers the
871
+ * response as a map with the same keys, but with the evaluated result for each
872
+ * as their value.
873
+ * @param {{}} map A map of expression names to expression trees to be
874
+ * evaluated
875
+ * @returns {Promise<{}>} resolves with the result map.
876
+ */
877
+ }, {
878
+ key: "evalMap",
879
+ value: function evalMap(map) {
880
+ var _this3 = this;
881
+ var keys = Object.keys(map);
882
+ var result = {};
883
+ var asts = keys.map(function(key) {
884
+ return _this3.eval(map[key]);
885
+ });
886
+ return this.Promise.all(asts).then(function(vals) {
887
+ vals.forEach(function(val, idx) {
888
+ result[keys[idx]] = val;
889
+ });
890
+ return result;
891
+ });
892
+ }
893
+ /**
894
+ * Applies a filter expression with relative identifier elements to a subject.
895
+ * The intent is for the subject to be an array of subjects that will be
896
+ * individually used as the relative context against the provided expression
897
+ * tree. Only the elements whose expressions result in a truthy value will be
898
+ * included in the resulting array.
899
+ *
900
+ * If the subject is not an array of values, it will be converted to a single-
901
+ * element array before running the filter.
902
+ * @param {*} subject The value to be filtered usually an array. If this value is
903
+ * not an array, it will be converted to an array with this value as the
904
+ * only element.
905
+ * @param {{}} expr The expression tree to run against each subject. If the
906
+ * tree evaluates to a truthy result, then the value will be included in
907
+ * the returned array otherwise, it will be eliminated.
908
+ * @returns {Promise<Array>} resolves with an array of values that passed the
909
+ * expression filter.
910
+ * @private
911
+ */
912
+ }, {
913
+ key: "_filterRelative",
914
+ value: function _filterRelative(subject, expr) {
915
+ var _this4 = this;
916
+ var promises = [];
917
+ if (!Array.isArray(subject)) {
918
+ subject = subject === void 0 ? [] : [subject];
919
+ }
920
+ subject.forEach(function(elem) {
921
+ var evalInst = new Evaluator2(_this4._grammar, _this4._context, elem, _this4.Promise);
922
+ promises.push(evalInst.eval(expr));
923
+ });
924
+ return this.Promise.all(promises).then(function(values) {
925
+ var results = [];
926
+ values.forEach(function(value, idx) {
927
+ if (value) {
928
+ results.push(subject[idx]);
929
+ }
930
+ });
931
+ return results;
932
+ });
933
+ }
934
+ /**
935
+ * Applies a static filter expression to a subject value. If the filter
936
+ * expression evaluates to boolean true, the subject is returned if false,
937
+ * undefined.
938
+ *
939
+ * For any other resulting value of the expression, this function will attempt
940
+ * to respond with the property at that name or index of the subject.
941
+ * @param {*} subject The value to be filtered. Usually an Array (for which
942
+ * the expression would generally resolve to a numeric index) or an
943
+ * Object (for which the expression would generally resolve to a string
944
+ * indicating a property name)
945
+ * @param {{}} expr The expression tree to run against the subject
946
+ * @returns {Promise<*>} resolves with the value of the drill-down.
947
+ * @private
948
+ */
949
+ }, {
950
+ key: "_filterStatic",
951
+ value: function _filterStatic(subject, expr) {
952
+ return this.eval(expr).then(function(res) {
953
+ if (typeof res === "boolean") {
954
+ return res ? subject : void 0;
955
+ }
956
+ return subject[res];
957
+ });
958
+ }
959
+ }]);
960
+ return Evaluator2;
961
+ })();
962
+ module2.exports = Evaluator;
963
+ }
964
+ });
965
+
966
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Lexer.js
967
+ var require_Lexer = __commonJS({
968
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Lexer.js"(exports2, module2) {
969
+ "use strict";
970
+ var _interopRequireDefault = require_interopRequireDefault();
971
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
972
+ var _createClass2 = _interopRequireDefault(require_createClass());
973
+ var numericRegex = /^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;
974
+ var identRegex = /^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/;
975
+ var escEscRegex = /\\\\/;
976
+ var whitespaceRegex = /^\s*$/;
977
+ var preOpRegexElems = [
978
+ // Strings
979
+ "'(?:(?:\\\\')|[^'])*'",
980
+ '"(?:(?:\\\\")|[^"])*"',
981
+ // Whitespace
982
+ "\\s+",
983
+ // Booleans
984
+ "\\btrue\\b",
985
+ "\\bfalse\\b"
986
+ ];
987
+ var postOpRegexElems = [
988
+ // Identifiers
989
+ "[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*",
990
+ // Numerics (without negative symbol)
991
+ "(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"
992
+ ];
993
+ var minusNegatesAfter = ["binaryOp", "unaryOp", "openParen", "openBracket", "question", "colon"];
994
+ var Lexer = /* @__PURE__ */ (function() {
995
+ function Lexer2(grammar) {
996
+ (0, _classCallCheck2.default)(this, Lexer2);
997
+ this._grammar = grammar;
998
+ }
999
+ (0, _createClass2.default)(Lexer2, [{
1000
+ key: "getElements",
1001
+ value: function getElements(str) {
1002
+ var regex = this._getSplitRegex();
1003
+ return str.split(regex).filter(function(elem) {
1004
+ return elem;
1005
+ });
1006
+ }
1007
+ /**
1008
+ * Converts an array of expression elements into an array of tokens. Note that
1009
+ * the resulting array may not equal the element array in length, as any
1010
+ * elements that consist only of whitespace get appended to the previous
1011
+ * token's "raw" property. For the structure of a token object, please see
1012
+ * {@link Lexer#tokenize}.
1013
+ * @param {Array<string>} elements An array of Jexl expression elements to be
1014
+ * converted to tokens
1015
+ * @returns {Array<{type, value, raw}>} an array of token objects.
1016
+ */
1017
+ }, {
1018
+ key: "getTokens",
1019
+ value: function getTokens(elements) {
1020
+ var tokens = [];
1021
+ var negate = false;
1022
+ for (var i = 0; i < elements.length; i++) {
1023
+ if (this._isWhitespace(elements[i])) {
1024
+ if (tokens.length) {
1025
+ tokens[tokens.length - 1].raw += elements[i];
1026
+ }
1027
+ } else if (elements[i] === "-" && this._isNegative(tokens)) {
1028
+ negate = true;
1029
+ } else {
1030
+ if (negate) {
1031
+ elements[i] = "-" + elements[i];
1032
+ negate = false;
1033
+ }
1034
+ tokens.push(this._createToken(elements[i]));
1035
+ }
1036
+ }
1037
+ if (negate) {
1038
+ tokens.push(this._createToken("-"));
1039
+ }
1040
+ return tokens;
1041
+ }
1042
+ /**
1043
+ * Converts a Jexl string into an array of tokens. Each token is an object
1044
+ * in the following format:
1045
+ *
1046
+ * {
1047
+ * type: <string>,
1048
+ * [name]: <string>,
1049
+ * value: <boolean|number|string>,
1050
+ * raw: <string>
1051
+ * }
1052
+ *
1053
+ * Type is one of the following:
1054
+ *
1055
+ * literal, identifier, binaryOp, unaryOp
1056
+ *
1057
+ * OR, if the token is a control character its type is the name of the element
1058
+ * defined in the Grammar.
1059
+ *
1060
+ * Name appears only if the token is a control string found in
1061
+ * {@link grammar#elements}, and is set to the name of the element.
1062
+ *
1063
+ * Value is the value of the token in the correct type (boolean or numeric as
1064
+ * appropriate). Raw is the string representation of this value taken directly
1065
+ * from the expression string, including any trailing spaces.
1066
+ * @param {string} str The Jexl string to be tokenized
1067
+ * @returns {Array<{type, value, raw}>} an array of token objects.
1068
+ * @throws {Error} if the provided string contains an invalid token.
1069
+ */
1070
+ }, {
1071
+ key: "tokenize",
1072
+ value: function tokenize(str) {
1073
+ var elements = this.getElements(str);
1074
+ return this.getTokens(elements);
1075
+ }
1076
+ /**
1077
+ * Creates a new token object from an element of a Jexl string. See
1078
+ * {@link Lexer#tokenize} for a description of the token object.
1079
+ * @param {string} element The element from which a token should be made
1080
+ * @returns {{value: number|boolean|string, [name]: string, type: string,
1081
+ * raw: string}} a token object describing the provided element.
1082
+ * @throws {Error} if the provided string is not a valid expression element.
1083
+ * @private
1084
+ */
1085
+ }, {
1086
+ key: "_createToken",
1087
+ value: function _createToken(element) {
1088
+ var token = {
1089
+ type: "literal",
1090
+ value: element,
1091
+ raw: element
1092
+ };
1093
+ if (element[0] === '"' || element[0] === "'") {
1094
+ token.value = this._unquote(element);
1095
+ } else if (element.match(numericRegex)) {
1096
+ token.value = parseFloat(element);
1097
+ } else if (element === "true" || element === "false") {
1098
+ token.value = element === "true";
1099
+ } else if (this._grammar.elements[element]) {
1100
+ token.type = this._grammar.elements[element].type;
1101
+ } else if (element.match(identRegex)) {
1102
+ token.type = "identifier";
1103
+ } else {
1104
+ throw new Error("Invalid expression token: ".concat(element));
1105
+ }
1106
+ return token;
1107
+ }
1108
+ /**
1109
+ * Escapes a string so that it can be treated as a string literal within a
1110
+ * regular expression.
1111
+ * @param {string} str The string to be escaped
1112
+ * @returns {string} the RegExp-escaped string.
1113
+ * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
1114
+ * @private
1115
+ */
1116
+ }, {
1117
+ key: "_escapeRegExp",
1118
+ value: function _escapeRegExp(str) {
1119
+ str = str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1120
+ if (str.match(identRegex)) {
1121
+ str = "\\b" + str + "\\b";
1122
+ }
1123
+ return str;
1124
+ }
1125
+ /**
1126
+ * Gets a RegEx object appropriate for splitting a Jexl string into its core
1127
+ * elements.
1128
+ * @returns {RegExp} An element-splitting RegExp object
1129
+ * @private
1130
+ */
1131
+ }, {
1132
+ key: "_getSplitRegex",
1133
+ value: function _getSplitRegex() {
1134
+ var _this = this;
1135
+ if (!this._splitRegex) {
1136
+ var elemArray = Object.keys(this._grammar.elements).sort(function(a, b) {
1137
+ return b.length - a.length;
1138
+ }).map(function(elem) {
1139
+ return _this._escapeRegExp(elem);
1140
+ }, this);
1141
+ this._splitRegex = new RegExp("(" + [preOpRegexElems.join("|"), elemArray.join("|"), postOpRegexElems.join("|")].join("|") + ")");
1142
+ }
1143
+ return this._splitRegex;
1144
+ }
1145
+ /**
1146
+ * Determines whether the addition of a '-' token should be interpreted as a
1147
+ * negative symbol for an upcoming number, given an array of tokens already
1148
+ * processed.
1149
+ * @param {Array<Object>} tokens An array of tokens already processed
1150
+ * @returns {boolean} true if adding a '-' should be considered a negative
1151
+ * symbol; false otherwise
1152
+ * @private
1153
+ */
1154
+ }, {
1155
+ key: "_isNegative",
1156
+ value: function _isNegative(tokens) {
1157
+ if (!tokens.length) return true;
1158
+ return minusNegatesAfter.some(function(type) {
1159
+ return type === tokens[tokens.length - 1].type;
1160
+ });
1161
+ }
1162
+ /**
1163
+ * A utility function to determine if a string consists of only space
1164
+ * characters.
1165
+ * @param {string} str A string to be tested
1166
+ * @returns {boolean} true if the string is empty or consists of only spaces;
1167
+ * false otherwise.
1168
+ * @private
1169
+ */
1170
+ }, {
1171
+ key: "_isWhitespace",
1172
+ value: function _isWhitespace(str) {
1173
+ return !!str.match(whitespaceRegex);
1174
+ }
1175
+ /**
1176
+ * Removes the beginning and trailing quotes from a string, unescapes any
1177
+ * escaped quotes on its interior, and unescapes any escaped escape
1178
+ * characters. Note that this function is not defensive; it assumes that the
1179
+ * provided string is not empty, and that its first and last characters are
1180
+ * actually quotes.
1181
+ * @param {string} str A string whose first and last characters are quotes
1182
+ * @returns {string} a string with the surrounding quotes stripped and escapes
1183
+ * properly processed.
1184
+ * @private
1185
+ */
1186
+ }, {
1187
+ key: "_unquote",
1188
+ value: function _unquote(str) {
1189
+ var quote = str[0];
1190
+ var escQuoteRegex = new RegExp("\\\\" + quote, "g");
1191
+ return str.substr(1, str.length - 2).replace(escQuoteRegex, quote).replace(escEscRegex, "\\");
1192
+ }
1193
+ }]);
1194
+ return Lexer2;
1195
+ })();
1196
+ module2.exports = Lexer;
1197
+ }
1198
+ });
1199
+
1200
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/handlers.js
1201
+ var require_handlers2 = __commonJS({
1202
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/handlers.js"(exports2) {
1203
+ "use strict";
1204
+ exports2.argVal = function(ast) {
1205
+ if (ast) this._cursor.args.push(ast);
1206
+ };
1207
+ exports2.arrayStart = function() {
1208
+ this._placeAtCursor({
1209
+ type: "ArrayLiteral",
1210
+ value: []
1211
+ });
1212
+ };
1213
+ exports2.arrayVal = function(ast) {
1214
+ if (ast) {
1215
+ this._cursor.value.push(ast);
1216
+ }
1217
+ };
1218
+ exports2.binaryOp = function(token) {
1219
+ var precedence = this._grammar.elements[token.value].precedence || 0;
1220
+ var parent = this._cursor._parent;
1221
+ while (parent && parent.operator && this._grammar.elements[parent.operator].precedence >= precedence) {
1222
+ this._cursor = parent;
1223
+ parent = parent._parent;
1224
+ }
1225
+ var node = {
1226
+ type: "BinaryExpression",
1227
+ operator: token.value,
1228
+ left: this._cursor
1229
+ };
1230
+ this._setParent(this._cursor, node);
1231
+ this._cursor = parent;
1232
+ this._placeAtCursor(node);
1233
+ };
1234
+ exports2.dot = function() {
1235
+ this._nextIdentEncapsulate = this._cursor && this._cursor.type !== "UnaryExpression" && (this._cursor.type !== "BinaryExpression" || this._cursor.type === "BinaryExpression" && this._cursor.right);
1236
+ this._nextIdentRelative = !this._cursor || this._cursor && !this._nextIdentEncapsulate;
1237
+ if (this._nextIdentRelative) {
1238
+ this._relative = true;
1239
+ }
1240
+ };
1241
+ exports2.filter = function(ast) {
1242
+ this._placeBeforeCursor({
1243
+ type: "FilterExpression",
1244
+ expr: ast,
1245
+ relative: this._subParser.isRelative(),
1246
+ subject: this._cursor
1247
+ });
1248
+ };
1249
+ exports2.functionCall = function() {
1250
+ this._placeBeforeCursor({
1251
+ type: "FunctionCall",
1252
+ name: this._cursor.value,
1253
+ args: [],
1254
+ pool: "functions"
1255
+ });
1256
+ };
1257
+ exports2.identifier = function(token) {
1258
+ var node = {
1259
+ type: "Identifier",
1260
+ value: token.value
1261
+ };
1262
+ if (this._nextIdentEncapsulate) {
1263
+ node.from = this._cursor;
1264
+ this._placeBeforeCursor(node);
1265
+ this._nextIdentEncapsulate = false;
1266
+ } else {
1267
+ if (this._nextIdentRelative) {
1268
+ node.relative = true;
1269
+ this._nextIdentRelative = false;
1270
+ }
1271
+ this._placeAtCursor(node);
1272
+ }
1273
+ };
1274
+ exports2.literal = function(token) {
1275
+ this._placeAtCursor({
1276
+ type: "Literal",
1277
+ value: token.value
1278
+ });
1279
+ };
1280
+ exports2.objKey = function(token) {
1281
+ this._curObjKey = token.value;
1282
+ };
1283
+ exports2.objStart = function() {
1284
+ this._placeAtCursor({
1285
+ type: "ObjectLiteral",
1286
+ value: {}
1287
+ });
1288
+ };
1289
+ exports2.objVal = function(ast) {
1290
+ this._cursor.value[this._curObjKey] = ast;
1291
+ };
1292
+ exports2.subExpression = function(ast) {
1293
+ this._placeAtCursor(ast);
1294
+ };
1295
+ exports2.ternaryEnd = function(ast) {
1296
+ this._cursor.alternate = ast;
1297
+ };
1298
+ exports2.ternaryMid = function(ast) {
1299
+ this._cursor.consequent = ast;
1300
+ };
1301
+ exports2.ternaryStart = function() {
1302
+ this._tree = {
1303
+ type: "ConditionalExpression",
1304
+ test: this._tree
1305
+ };
1306
+ this._cursor = this._tree;
1307
+ };
1308
+ exports2.transform = function(token) {
1309
+ this._placeBeforeCursor({
1310
+ type: "FunctionCall",
1311
+ name: token.value,
1312
+ args: [this._cursor],
1313
+ pool: "transforms"
1314
+ });
1315
+ };
1316
+ exports2.unaryOp = function(token) {
1317
+ this._placeAtCursor({
1318
+ type: "UnaryExpression",
1319
+ operator: token.value
1320
+ });
1321
+ };
1322
+ }
1323
+ });
1324
+
1325
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/states.js
1326
+ var require_states = __commonJS({
1327
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/states.js"(exports2) {
1328
+ "use strict";
1329
+ var h = require_handlers2();
1330
+ exports2.states = {
1331
+ expectOperand: {
1332
+ tokenTypes: {
1333
+ literal: {
1334
+ toState: "expectBinOp"
1335
+ },
1336
+ identifier: {
1337
+ toState: "identifier"
1338
+ },
1339
+ unaryOp: {},
1340
+ openParen: {
1341
+ toState: "subExpression"
1342
+ },
1343
+ openCurl: {
1344
+ toState: "expectObjKey",
1345
+ handler: h.objStart
1346
+ },
1347
+ dot: {
1348
+ toState: "traverse"
1349
+ },
1350
+ openBracket: {
1351
+ toState: "arrayVal",
1352
+ handler: h.arrayStart
1353
+ }
1354
+ }
1355
+ },
1356
+ expectBinOp: {
1357
+ tokenTypes: {
1358
+ binaryOp: {
1359
+ toState: "expectOperand"
1360
+ },
1361
+ pipe: {
1362
+ toState: "expectTransform"
1363
+ },
1364
+ dot: {
1365
+ toState: "traverse"
1366
+ },
1367
+ question: {
1368
+ toState: "ternaryMid",
1369
+ handler: h.ternaryStart
1370
+ }
1371
+ },
1372
+ completable: true
1373
+ },
1374
+ expectTransform: {
1375
+ tokenTypes: {
1376
+ identifier: {
1377
+ toState: "postTransform",
1378
+ handler: h.transform
1379
+ }
1380
+ }
1381
+ },
1382
+ expectObjKey: {
1383
+ tokenTypes: {
1384
+ identifier: {
1385
+ toState: "expectKeyValSep",
1386
+ handler: h.objKey
1387
+ },
1388
+ closeCurl: {
1389
+ toState: "expectBinOp"
1390
+ }
1391
+ }
1392
+ },
1393
+ expectKeyValSep: {
1394
+ tokenTypes: {
1395
+ colon: {
1396
+ toState: "objVal"
1397
+ }
1398
+ }
1399
+ },
1400
+ postTransform: {
1401
+ tokenTypes: {
1402
+ openParen: {
1403
+ toState: "argVal"
1404
+ },
1405
+ binaryOp: {
1406
+ toState: "expectOperand"
1407
+ },
1408
+ dot: {
1409
+ toState: "traverse"
1410
+ },
1411
+ openBracket: {
1412
+ toState: "filter"
1413
+ },
1414
+ pipe: {
1415
+ toState: "expectTransform"
1416
+ }
1417
+ },
1418
+ completable: true
1419
+ },
1420
+ postArgs: {
1421
+ tokenTypes: {
1422
+ binaryOp: {
1423
+ toState: "expectOperand"
1424
+ },
1425
+ dot: {
1426
+ toState: "traverse"
1427
+ },
1428
+ openBracket: {
1429
+ toState: "filter"
1430
+ },
1431
+ pipe: {
1432
+ toState: "expectTransform"
1433
+ }
1434
+ },
1435
+ completable: true
1436
+ },
1437
+ identifier: {
1438
+ tokenTypes: {
1439
+ binaryOp: {
1440
+ toState: "expectOperand"
1441
+ },
1442
+ dot: {
1443
+ toState: "traverse"
1444
+ },
1445
+ openBracket: {
1446
+ toState: "filter"
1447
+ },
1448
+ openParen: {
1449
+ toState: "argVal",
1450
+ handler: h.functionCall
1451
+ },
1452
+ pipe: {
1453
+ toState: "expectTransform"
1454
+ },
1455
+ question: {
1456
+ toState: "ternaryMid",
1457
+ handler: h.ternaryStart
1458
+ }
1459
+ },
1460
+ completable: true
1461
+ },
1462
+ traverse: {
1463
+ tokenTypes: {
1464
+ identifier: {
1465
+ toState: "identifier"
1466
+ }
1467
+ }
1468
+ },
1469
+ filter: {
1470
+ subHandler: h.filter,
1471
+ endStates: {
1472
+ closeBracket: "identifier"
1473
+ }
1474
+ },
1475
+ subExpression: {
1476
+ subHandler: h.subExpression,
1477
+ endStates: {
1478
+ closeParen: "expectBinOp"
1479
+ }
1480
+ },
1481
+ argVal: {
1482
+ subHandler: h.argVal,
1483
+ endStates: {
1484
+ comma: "argVal",
1485
+ closeParen: "postArgs"
1486
+ }
1487
+ },
1488
+ objVal: {
1489
+ subHandler: h.objVal,
1490
+ endStates: {
1491
+ comma: "expectObjKey",
1492
+ closeCurl: "expectBinOp"
1493
+ }
1494
+ },
1495
+ arrayVal: {
1496
+ subHandler: h.arrayVal,
1497
+ endStates: {
1498
+ comma: "arrayVal",
1499
+ closeBracket: "expectBinOp"
1500
+ }
1501
+ },
1502
+ ternaryMid: {
1503
+ subHandler: h.ternaryMid,
1504
+ endStates: {
1505
+ colon: "ternaryEnd"
1506
+ }
1507
+ },
1508
+ ternaryEnd: {
1509
+ subHandler: h.ternaryEnd,
1510
+ completable: true
1511
+ }
1512
+ };
1513
+ }
1514
+ });
1515
+
1516
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/Parser.js
1517
+ var require_Parser = __commonJS({
1518
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/Parser.js"(exports2, module2) {
1519
+ "use strict";
1520
+ var _interopRequireDefault = require_interopRequireDefault();
1521
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1522
+ var _createClass2 = _interopRequireDefault(require_createClass());
1523
+ var handlers = require_handlers2();
1524
+ var states = require_states().states;
1525
+ var Parser = /* @__PURE__ */ (function() {
1526
+ function Parser2(grammar, prefix, stopMap) {
1527
+ (0, _classCallCheck2.default)(this, Parser2);
1528
+ this._grammar = grammar;
1529
+ this._state = "expectOperand";
1530
+ this._tree = null;
1531
+ this._exprStr = prefix || "";
1532
+ this._relative = false;
1533
+ this._stopMap = stopMap || {};
1534
+ }
1535
+ (0, _createClass2.default)(Parser2, [{
1536
+ key: "addToken",
1537
+ value: function addToken(token) {
1538
+ if (this._state === "complete") {
1539
+ throw new Error("Cannot add a new token to a completed Parser");
1540
+ }
1541
+ var state = states[this._state];
1542
+ var startExpr = this._exprStr;
1543
+ this._exprStr += token.raw;
1544
+ if (state.subHandler) {
1545
+ if (!this._subParser) {
1546
+ this._startSubExpression(startExpr);
1547
+ }
1548
+ var stopState = this._subParser.addToken(token);
1549
+ if (stopState) {
1550
+ this._endSubExpression();
1551
+ if (this._parentStop) return stopState;
1552
+ this._state = stopState;
1553
+ }
1554
+ } else if (state.tokenTypes[token.type]) {
1555
+ var typeOpts = state.tokenTypes[token.type];
1556
+ var handleFunc = handlers[token.type];
1557
+ if (typeOpts.handler) {
1558
+ handleFunc = typeOpts.handler;
1559
+ }
1560
+ if (handleFunc) {
1561
+ handleFunc.call(this, token);
1562
+ }
1563
+ if (typeOpts.toState) {
1564
+ this._state = typeOpts.toState;
1565
+ }
1566
+ } else if (this._stopMap[token.type]) {
1567
+ return this._stopMap[token.type];
1568
+ } else {
1569
+ throw new Error("Token ".concat(token.raw, " (").concat(token.type, ") unexpected in expression: ").concat(this._exprStr));
1570
+ }
1571
+ return false;
1572
+ }
1573
+ /**
1574
+ * Processes an array of tokens iteratively through the {@link #addToken}
1575
+ * function.
1576
+ * @param {Array<{type: <string>}>} tokens An array of tokens, as provided by
1577
+ * the {@link Lexer#tokenize} function.
1578
+ */
1579
+ }, {
1580
+ key: "addTokens",
1581
+ value: function addTokens(tokens) {
1582
+ tokens.forEach(this.addToken, this);
1583
+ }
1584
+ /**
1585
+ * Marks this Parser instance as completed and retrieves the full AST.
1586
+ * @returns {{}|null} a full expression tree, ready for evaluation by the
1587
+ * {@link Evaluator#eval} function, or null if no tokens were passed to
1588
+ * the parser before complete was called
1589
+ * @throws {Error} if the parser is not in a state where it's legal to end
1590
+ * the expression, indicating that the expression is incomplete
1591
+ */
1592
+ }, {
1593
+ key: "complete",
1594
+ value: function complete() {
1595
+ if (this._cursor && !states[this._state].completable) {
1596
+ throw new Error("Unexpected end of expression: ".concat(this._exprStr));
1597
+ }
1598
+ if (this._subParser) {
1599
+ this._endSubExpression();
1600
+ }
1601
+ this._state = "complete";
1602
+ return this._cursor ? this._tree : null;
1603
+ }
1604
+ /**
1605
+ * Indicates whether the expression tree contains a relative path identifier.
1606
+ * @returns {boolean} true if a relative identifier exists false otherwise.
1607
+ */
1608
+ }, {
1609
+ key: "isRelative",
1610
+ value: function isRelative() {
1611
+ return this._relative;
1612
+ }
1613
+ /**
1614
+ * Ends a subexpression by completing the subParser and passing its result
1615
+ * to the subHandler configured in the current state.
1616
+ * @private
1617
+ */
1618
+ }, {
1619
+ key: "_endSubExpression",
1620
+ value: function _endSubExpression() {
1621
+ states[this._state].subHandler.call(this, this._subParser.complete());
1622
+ this._subParser = null;
1623
+ }
1624
+ /**
1625
+ * Places a new tree node at the current position of the cursor (to the 'right'
1626
+ * property) and then advances the cursor to the new node. This function also
1627
+ * handles setting the parent of the new node.
1628
+ * @param {{type: <string>}} node A node to be added to the AST
1629
+ * @private
1630
+ */
1631
+ }, {
1632
+ key: "_placeAtCursor",
1633
+ value: function _placeAtCursor(node) {
1634
+ if (!this._cursor) {
1635
+ this._tree = node;
1636
+ } else {
1637
+ this._cursor.right = node;
1638
+ this._setParent(node, this._cursor);
1639
+ }
1640
+ this._cursor = node;
1641
+ }
1642
+ /**
1643
+ * Places a tree node before the current position of the cursor, replacing
1644
+ * the node that the cursor currently points to. This should only be called in
1645
+ * cases where the cursor is known to exist, and the provided node already
1646
+ * contains a pointer to what's at the cursor currently.
1647
+ * @param {{type: <string>}} node A node to be added to the AST
1648
+ * @private
1649
+ */
1650
+ }, {
1651
+ key: "_placeBeforeCursor",
1652
+ value: function _placeBeforeCursor(node) {
1653
+ this._cursor = this._cursor._parent;
1654
+ this._placeAtCursor(node);
1655
+ }
1656
+ /**
1657
+ * Sets the parent of a node by creating a non-enumerable _parent property
1658
+ * that points to the supplied parent argument.
1659
+ * @param {{type: <string>}} node A node of the AST on which to set a new
1660
+ * parent
1661
+ * @param {{type: <string>}} parent An existing node of the AST to serve as the
1662
+ * parent of the new node
1663
+ * @private
1664
+ */
1665
+ }, {
1666
+ key: "_setParent",
1667
+ value: function _setParent(node, parent) {
1668
+ Object.defineProperty(node, "_parent", {
1669
+ value: parent,
1670
+ writable: true
1671
+ });
1672
+ }
1673
+ /**
1674
+ * Prepares the Parser to accept a subexpression by (re)instantiating the
1675
+ * subParser.
1676
+ * @param {string} [exprStr] The expression string to prefix to the new Parser
1677
+ * @private
1678
+ */
1679
+ }, {
1680
+ key: "_startSubExpression",
1681
+ value: function _startSubExpression(exprStr) {
1682
+ var endStates = states[this._state].endStates;
1683
+ if (!endStates) {
1684
+ this._parentStop = true;
1685
+ endStates = this._stopMap;
1686
+ }
1687
+ this._subParser = new Parser2(this._grammar, exprStr, endStates);
1688
+ }
1689
+ }]);
1690
+ return Parser2;
1691
+ })();
1692
+ module2.exports = Parser;
1693
+ }
1694
+ });
1695
+
1696
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/PromiseSync.js
1697
+ var require_PromiseSync = __commonJS({
1698
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/PromiseSync.js"(exports2, module2) {
1699
+ "use strict";
1700
+ var _interopRequireDefault = require_interopRequireDefault();
1701
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1702
+ var _createClass2 = _interopRequireDefault(require_createClass());
1703
+ var PromiseSync = /* @__PURE__ */ (function() {
1704
+ function PromiseSync2(fn) {
1705
+ (0, _classCallCheck2.default)(this, PromiseSync2);
1706
+ fn(this._resolve.bind(this), this._reject.bind(this));
1707
+ }
1708
+ (0, _createClass2.default)(PromiseSync2, [{
1709
+ key: "catch",
1710
+ value: function _catch(rejected) {
1711
+ if (this.error) {
1712
+ try {
1713
+ this._resolve(rejected(this.error));
1714
+ } catch (e) {
1715
+ this._reject(e);
1716
+ }
1717
+ }
1718
+ return this;
1719
+ }
1720
+ }, {
1721
+ key: "then",
1722
+ value: function then(resolved, rejected) {
1723
+ if (!this.error) {
1724
+ try {
1725
+ this._resolve(resolved(this.value));
1726
+ } catch (e) {
1727
+ this._reject(e);
1728
+ }
1729
+ }
1730
+ if (rejected) this.catch(rejected);
1731
+ return this;
1732
+ }
1733
+ }, {
1734
+ key: "_reject",
1735
+ value: function _reject(error) {
1736
+ this.value = void 0;
1737
+ this.error = error;
1738
+ }
1739
+ }, {
1740
+ key: "_resolve",
1741
+ value: function _resolve(val) {
1742
+ if (val instanceof PromiseSync2) {
1743
+ if (val.error) {
1744
+ this._reject(val.error);
1745
+ } else {
1746
+ this._resolve(val.value);
1747
+ }
1748
+ } else {
1749
+ this.value = val;
1750
+ this.error = void 0;
1751
+ }
1752
+ }
1753
+ }]);
1754
+ return PromiseSync2;
1755
+ })();
1756
+ PromiseSync.all = function(vals) {
1757
+ return new PromiseSync(function(resolve) {
1758
+ var resolved = vals.map(function(val) {
1759
+ while (val instanceof PromiseSync) {
1760
+ if (val.error) throw Error(val.error);
1761
+ val = val.value;
1762
+ }
1763
+ return val;
1764
+ });
1765
+ resolve(resolved);
1766
+ });
1767
+ };
1768
+ PromiseSync.resolve = function(val) {
1769
+ return new PromiseSync(function(resolve) {
1770
+ return resolve(val);
1771
+ });
1772
+ };
1773
+ PromiseSync.reject = function(error) {
1774
+ return new PromiseSync(function(resolve, reject) {
1775
+ return reject(error);
1776
+ });
1777
+ };
1778
+ module2.exports = PromiseSync;
1779
+ }
1780
+ });
1781
+
1782
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Expression.js
1783
+ var require_Expression = __commonJS({
1784
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Expression.js"(exports2, module2) {
1785
+ "use strict";
1786
+ var _interopRequireDefault = require_interopRequireDefault();
1787
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1788
+ var _createClass2 = _interopRequireDefault(require_createClass());
1789
+ var Evaluator = require_Evaluator();
1790
+ var Lexer = require_Lexer();
1791
+ var Parser = require_Parser();
1792
+ var PromiseSync = require_PromiseSync();
1793
+ var Expression = /* @__PURE__ */ (function() {
1794
+ function Expression2(grammar, exprStr) {
1795
+ (0, _classCallCheck2.default)(this, Expression2);
1796
+ this._grammar = grammar;
1797
+ this._exprStr = exprStr;
1798
+ this._ast = null;
1799
+ }
1800
+ (0, _createClass2.default)(Expression2, [{
1801
+ key: "compile",
1802
+ value: function compile() {
1803
+ var lexer = new Lexer(this._grammar);
1804
+ var parser = new Parser(this._grammar);
1805
+ var tokens = lexer.tokenize(this._exprStr);
1806
+ parser.addTokens(tokens);
1807
+ this._ast = parser.complete();
1808
+ return this;
1809
+ }
1810
+ /**
1811
+ * Asynchronously evaluates the expression within an optional context.
1812
+ * @param {Object} [context] A mapping of variables to values, which will be
1813
+ * made accessible to the Jexl expression when evaluating it
1814
+ * @returns {Promise<*>} resolves with the result of the evaluation.
1815
+ */
1816
+ }, {
1817
+ key: "eval",
1818
+ value: function _eval() {
1819
+ var context = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1820
+ return this._eval(context, Promise);
1821
+ }
1822
+ /**
1823
+ * Synchronously evaluates the expression within an optional context.
1824
+ * @param {Object} [context] A mapping of variables to values, which will be
1825
+ * made accessible to the Jexl expression when evaluating it
1826
+ * @returns {*} the result of the evaluation.
1827
+ * @throws {*} on error
1828
+ */
1829
+ }, {
1830
+ key: "evalSync",
1831
+ value: function evalSync() {
1832
+ var context = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1833
+ var res = this._eval(context, PromiseSync);
1834
+ if (res.error) throw res.error;
1835
+ return res.value;
1836
+ }
1837
+ }, {
1838
+ key: "_eval",
1839
+ value: function _eval(context, promise) {
1840
+ var _this = this;
1841
+ return promise.resolve().then(function() {
1842
+ var ast = _this._getAst();
1843
+ var evaluator = new Evaluator(_this._grammar, context, void 0, promise);
1844
+ return evaluator.eval(ast);
1845
+ });
1846
+ }
1847
+ }, {
1848
+ key: "_getAst",
1849
+ value: function _getAst() {
1850
+ if (!this._ast) this.compile();
1851
+ return this._ast;
1852
+ }
1853
+ }]);
1854
+ return Expression2;
1855
+ })();
1856
+ module2.exports = Expression;
1857
+ }
1858
+ });
1859
+
1860
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/grammar.js
1861
+ var require_grammar = __commonJS({
1862
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/grammar.js"(exports2) {
1863
+ "use strict";
1864
+ exports2.getGrammar = function() {
1865
+ return {
1866
+ /**
1867
+ * A map of all expression elements to their properties. Note that changes
1868
+ * here may require changes in the Lexer or Parser.
1869
+ * @type {{}}
1870
+ */
1871
+ elements: {
1872
+ ".": {
1873
+ type: "dot"
1874
+ },
1875
+ "[": {
1876
+ type: "openBracket"
1877
+ },
1878
+ "]": {
1879
+ type: "closeBracket"
1880
+ },
1881
+ "|": {
1882
+ type: "pipe"
1883
+ },
1884
+ "{": {
1885
+ type: "openCurl"
1886
+ },
1887
+ "}": {
1888
+ type: "closeCurl"
1889
+ },
1890
+ ":": {
1891
+ type: "colon"
1892
+ },
1893
+ ",": {
1894
+ type: "comma"
1895
+ },
1896
+ "(": {
1897
+ type: "openParen"
1898
+ },
1899
+ ")": {
1900
+ type: "closeParen"
1901
+ },
1902
+ "?": {
1903
+ type: "question"
1904
+ },
1905
+ "+": {
1906
+ type: "binaryOp",
1907
+ precedence: 30,
1908
+ eval: function _eval(left, right) {
1909
+ return left + right;
1910
+ }
1911
+ },
1912
+ "-": {
1913
+ type: "binaryOp",
1914
+ precedence: 30,
1915
+ eval: function _eval(left, right) {
1916
+ return left - right;
1917
+ }
1918
+ },
1919
+ "*": {
1920
+ type: "binaryOp",
1921
+ precedence: 40,
1922
+ eval: function _eval(left, right) {
1923
+ return left * right;
1924
+ }
1925
+ },
1926
+ "/": {
1927
+ type: "binaryOp",
1928
+ precedence: 40,
1929
+ eval: function _eval(left, right) {
1930
+ return left / right;
1931
+ }
1932
+ },
1933
+ "//": {
1934
+ type: "binaryOp",
1935
+ precedence: 40,
1936
+ eval: function _eval(left, right) {
1937
+ return Math.floor(left / right);
1938
+ }
1939
+ },
1940
+ "%": {
1941
+ type: "binaryOp",
1942
+ precedence: 50,
1943
+ eval: function _eval(left, right) {
1944
+ return left % right;
1945
+ }
1946
+ },
1947
+ "^": {
1948
+ type: "binaryOp",
1949
+ precedence: 50,
1950
+ eval: function _eval(left, right) {
1951
+ return Math.pow(left, right);
1952
+ }
1953
+ },
1954
+ "==": {
1955
+ type: "binaryOp",
1956
+ precedence: 20,
1957
+ eval: function _eval(left, right) {
1958
+ return left == right;
1959
+ }
1960
+ },
1961
+ "!=": {
1962
+ type: "binaryOp",
1963
+ precedence: 20,
1964
+ eval: function _eval(left, right) {
1965
+ return left != right;
1966
+ }
1967
+ },
1968
+ ">": {
1969
+ type: "binaryOp",
1970
+ precedence: 20,
1971
+ eval: function _eval(left, right) {
1972
+ return left > right;
1973
+ }
1974
+ },
1975
+ ">=": {
1976
+ type: "binaryOp",
1977
+ precedence: 20,
1978
+ eval: function _eval(left, right) {
1979
+ return left >= right;
1980
+ }
1981
+ },
1982
+ "<": {
1983
+ type: "binaryOp",
1984
+ precedence: 20,
1985
+ eval: function _eval(left, right) {
1986
+ return left < right;
1987
+ }
1988
+ },
1989
+ "<=": {
1990
+ type: "binaryOp",
1991
+ precedence: 20,
1992
+ eval: function _eval(left, right) {
1993
+ return left <= right;
1994
+ }
1995
+ },
1996
+ "&&": {
1997
+ type: "binaryOp",
1998
+ precedence: 10,
1999
+ evalOnDemand: function evalOnDemand(left, right) {
2000
+ return left.eval().then(function(leftVal) {
2001
+ if (!leftVal) return leftVal;
2002
+ return right.eval();
2003
+ });
2004
+ }
2005
+ },
2006
+ "||": {
2007
+ type: "binaryOp",
2008
+ precedence: 10,
2009
+ evalOnDemand: function evalOnDemand(left, right) {
2010
+ return left.eval().then(function(leftVal) {
2011
+ if (leftVal) return leftVal;
2012
+ return right.eval();
2013
+ });
2014
+ }
2015
+ },
2016
+ in: {
2017
+ type: "binaryOp",
2018
+ precedence: 20,
2019
+ eval: function _eval(left, right) {
2020
+ if (typeof right === "string") {
2021
+ return right.indexOf(left) !== -1;
2022
+ }
2023
+ if (Array.isArray(right)) {
2024
+ return right.some(function(elem) {
2025
+ return elem === left;
2026
+ });
2027
+ }
2028
+ return false;
2029
+ }
2030
+ },
2031
+ "!": {
2032
+ type: "unaryOp",
2033
+ precedence: Infinity,
2034
+ eval: function _eval(right) {
2035
+ return !right;
2036
+ }
2037
+ }
2038
+ },
2039
+ /**
2040
+ * A map of function names to javascript functions. A Jexl function
2041
+ * takes zero ore more arguemnts:
2042
+ *
2043
+ * - {*} ...args: A variable number of arguments passed to this function.
2044
+ * All of these are pre-evaluated to their actual values before calling
2045
+ * the function.
2046
+ *
2047
+ * The Jexl function should return either the transformed value, or
2048
+ * a Promises/A+ Promise object that resolves with the value and rejects
2049
+ * or throws only when an unrecoverable error occurs. Functions should
2050
+ * generally return undefined when they don't make sense to be used on the
2051
+ * given value type, rather than throw/reject. An error is only
2052
+ * appropriate when the function would normally return a value, but
2053
+ * cannot due to some other failure.
2054
+ */
2055
+ functions: {},
2056
+ /**
2057
+ * A map of transform names to transform functions. A transform function
2058
+ * takes one ore more arguemnts:
2059
+ *
2060
+ * - {*} val: A value to be transformed
2061
+ * - {*} ...args: A variable number of arguments passed to this transform.
2062
+ * All of these are pre-evaluated to their actual values before calling
2063
+ * the function.
2064
+ *
2065
+ * The transform function should return either the transformed value, or
2066
+ * a Promises/A+ Promise object that resolves with the value and rejects
2067
+ * or throws only when an unrecoverable error occurs. Transforms should
2068
+ * generally return undefined when they don't make sense to be used on the
2069
+ * given value type, rather than throw/reject. An error is only
2070
+ * appropriate when the transform would normally return a value, but
2071
+ * cannot due to some other failure.
2072
+ */
2073
+ transforms: {}
2074
+ };
2075
+ };
2076
+ }
2077
+ });
2078
+
2079
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Jexl.js
2080
+ var require_Jexl = __commonJS({
2081
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Jexl.js"(exports2, module2) {
2082
+ "use strict";
2083
+ var _interopRequireDefault = require_interopRequireDefault();
2084
+ var _defineProperty2 = _interopRequireDefault(require_defineProperty());
2085
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
2086
+ var _createClass2 = _interopRequireDefault(require_createClass());
2087
+ var Expression = require_Expression();
2088
+ var _require = require_grammar();
2089
+ var getGrammar = _require.getGrammar;
2090
+ var Jexl = /* @__PURE__ */ (function() {
2091
+ function Jexl2() {
2092
+ (0, _classCallCheck2.default)(this, Jexl2);
2093
+ this.expr = this.expr.bind(this);
2094
+ this._grammar = getGrammar();
2095
+ }
2096
+ (0, _createClass2.default)(Jexl2, [{
2097
+ key: "addBinaryOp",
2098
+ value: function addBinaryOp(operator, precedence, fn, manualEval) {
2099
+ this._addGrammarElement(operator, (0, _defineProperty2.default)({
2100
+ type: "binaryOp",
2101
+ precedence
2102
+ }, manualEval ? "evalOnDemand" : "eval", fn));
2103
+ }
2104
+ /**
2105
+ * Adds or replaces an expression function in this Jexl instance.
2106
+ * @param {string} name The name of the expression function, as it will be
2107
+ * used within Jexl expressions
2108
+ * @param {function} fn The javascript function to be executed when this
2109
+ * expression function is invoked. It will be provided with each argument
2110
+ * supplied in the expression, in the same order.
2111
+ */
2112
+ }, {
2113
+ key: "addFunction",
2114
+ value: function addFunction(name, fn) {
2115
+ this._grammar.functions[name] = fn;
2116
+ }
2117
+ /**
2118
+ * Syntactic sugar for calling {@link #addFunction} repeatedly. This function
2119
+ * accepts a map of one or more expression function names to their javascript
2120
+ * function counterpart.
2121
+ * @param {{}} map A map of expression function names to javascript functions
2122
+ */
2123
+ }, {
2124
+ key: "addFunctions",
2125
+ value: function addFunctions(map) {
2126
+ for (var key in map) {
2127
+ this._grammar.functions[key] = map[key];
2128
+ }
2129
+ }
2130
+ /**
2131
+ * Adds a unary operator to Jexl. Unary operators are currently only supported
2132
+ * on the left side of the value on which it will operate.
2133
+ * @param {string} operator The operator string to be added
2134
+ * @param {function} fn A function to run to calculate the result. The function
2135
+ * will be called with one argument: the literal value to the right of the
2136
+ * operator. It should return either the resulting value, or a Promise
2137
+ * that resolves with the resulting value.
2138
+ */
2139
+ }, {
2140
+ key: "addUnaryOp",
2141
+ value: function addUnaryOp(operator, fn) {
2142
+ this._addGrammarElement(operator, {
2143
+ type: "unaryOp",
2144
+ weight: Infinity,
2145
+ eval: fn
2146
+ });
2147
+ }
2148
+ /**
2149
+ * Adds or replaces a transform function in this Jexl instance.
2150
+ * @param {string} name The name of the transform function, as it will be used
2151
+ * within Jexl expressions
2152
+ * @param {function} fn The function to be executed when this transform is
2153
+ * invoked. It will be provided with at least one argument:
2154
+ * - {*} value: The value to be transformed
2155
+ * - {...*} args: The arguments for this transform
2156
+ */
2157
+ }, {
2158
+ key: "addTransform",
2159
+ value: function addTransform(name, fn) {
2160
+ this._grammar.transforms[name] = fn;
2161
+ }
2162
+ /**
2163
+ * Syntactic sugar for calling {@link #addTransform} repeatedly. This function
2164
+ * accepts a map of one or more transform names to their transform function.
2165
+ * @param {{}} map A map of transform names to transform functions
2166
+ */
2167
+ }, {
2168
+ key: "addTransforms",
2169
+ value: function addTransforms(map) {
2170
+ for (var key in map) {
2171
+ this._grammar.transforms[key] = map[key];
2172
+ }
2173
+ }
2174
+ /**
2175
+ * Creates an Expression object from the given Jexl expression string, and
2176
+ * immediately compiles it. The returned Expression object can then be
2177
+ * evaluated multiple times with new contexts, without generating any
2178
+ * additional string processing overhead.
2179
+ * @param {string} expression The Jexl expression to be compiled
2180
+ * @returns {Expression} The compiled Expression object
2181
+ */
2182
+ }, {
2183
+ key: "compile",
2184
+ value: function compile(expression) {
2185
+ var exprObj = this.createExpression(expression);
2186
+ return exprObj.compile();
2187
+ }
2188
+ /**
2189
+ * Constructs an Expression object from a Jexl expression string.
2190
+ * @param {string} expression The Jexl expression to be wrapped in an
2191
+ * Expression object
2192
+ * @returns {Expression} The Expression object representing the given string
2193
+ */
2194
+ }, {
2195
+ key: "createExpression",
2196
+ value: function createExpression(expression) {
2197
+ return new Expression(this._grammar, expression);
2198
+ }
2199
+ /**
2200
+ * Retrieves a previously set expression function.
2201
+ * @param {string} name The name of the expression function
2202
+ * @returns {function} The expression function
2203
+ */
2204
+ }, {
2205
+ key: "getFunction",
2206
+ value: function getFunction(name) {
2207
+ return this._grammar.functions[name];
2208
+ }
2209
+ /**
2210
+ * Retrieves a previously set transform function.
2211
+ * @param {string} name The name of the transform function
2212
+ * @returns {function} The transform function
2213
+ */
2214
+ }, {
2215
+ key: "getTransform",
2216
+ value: function getTransform(name) {
2217
+ return this._grammar.transforms[name];
2218
+ }
2219
+ /**
2220
+ * Asynchronously evaluates a Jexl string within an optional context.
2221
+ * @param {string} expression The Jexl expression to be evaluated
2222
+ * @param {Object} [context] A mapping of variables to values, which will be
2223
+ * made accessible to the Jexl expression when evaluating it
2224
+ * @returns {Promise<*>} resolves with the result of the evaluation.
2225
+ */
2226
+ }, {
2227
+ key: "eval",
2228
+ value: function _eval(expression) {
2229
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2230
+ var exprObj = this.createExpression(expression);
2231
+ return exprObj.eval(context);
2232
+ }
2233
+ /**
2234
+ * Synchronously evaluates a Jexl string within an optional context.
2235
+ * @param {string} expression The Jexl expression to be evaluated
2236
+ * @param {Object} [context] A mapping of variables to values, which will be
2237
+ * made accessible to the Jexl expression when evaluating it
2238
+ * @returns {*} the result of the evaluation.
2239
+ * @throws {*} on error
2240
+ */
2241
+ }, {
2242
+ key: "evalSync",
2243
+ value: function evalSync(expression) {
2244
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2245
+ var exprObj = this.createExpression(expression);
2246
+ return exprObj.evalSync(context);
2247
+ }
2248
+ /**
2249
+ * A JavaScript template literal to allow expressions to be defined by the
2250
+ * syntax: expr`40 + 2`
2251
+ * @param {Array<string>} strs
2252
+ * @param {...any} args
2253
+ */
2254
+ }, {
2255
+ key: "expr",
2256
+ value: function expr(strs) {
2257
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2258
+ args[_key - 1] = arguments[_key];
2259
+ }
2260
+ var exprStr = strs.reduce(function(acc, str, idx) {
2261
+ var arg = idx < args.length ? args[idx] : "";
2262
+ acc += str + arg;
2263
+ return acc;
2264
+ }, "");
2265
+ return this.createExpression(exprStr);
2266
+ }
2267
+ /**
2268
+ * Removes a binary or unary operator from the Jexl grammar.
2269
+ * @param {string} operator The operator string to be removed
2270
+ */
2271
+ }, {
2272
+ key: "removeOp",
2273
+ value: function removeOp(operator) {
2274
+ if (this._grammar.elements[operator] && (this._grammar.elements[operator].type === "binaryOp" || this._grammar.elements[operator].type === "unaryOp")) {
2275
+ delete this._grammar.elements[operator];
2276
+ }
2277
+ }
2278
+ /**
2279
+ * Adds an element to the grammar map used by this Jexl instance.
2280
+ * @param {string} str The key string to be added
2281
+ * @param {{type: <string>}} obj A map of configuration options for this
2282
+ * grammar element
2283
+ * @private
2284
+ */
2285
+ }, {
2286
+ key: "_addGrammarElement",
2287
+ value: function _addGrammarElement(str, obj) {
2288
+ this._grammar.elements[str] = obj;
2289
+ }
2290
+ }]);
2291
+ return Jexl2;
2292
+ })();
2293
+ module2.exports = new Jexl();
2294
+ module2.exports.Jexl = Jexl;
2295
+ }
2296
+ });
2297
+
544
2298
  // src/index.ts
545
2299
  var index_exports = {};
546
2300
  __export(index_exports, {
@@ -574,6 +2328,7 @@ __export(index_exports, {
574
2328
  createLifecycleEvent: () => createLifecycleEvent,
575
2329
  createWorkflowDocument: () => createWorkflowDocument,
576
2330
  defaultValue: () => defaultValue,
2331
+ defineAction: () => defineAction,
577
2332
  defineArrayField: () => defineArrayField,
578
2333
  defineBlock: () => defineBlock,
579
2334
  defineBlocksField: () => defineBlocksField,
@@ -603,6 +2358,7 @@ __export(index_exports, {
603
2358
  defineTextareaField: () => defineTextareaField,
604
2359
  defineTimeField: () => defineTimeField,
605
2360
  defineUrlField: () => defineUrlField,
2361
+ defineView: () => defineView,
606
2362
  diffDays: () => diffDays,
607
2363
  dispatchLifecycleEvent: () => dispatchLifecycleEvent,
608
2364
  dispatchPendingLifecycleEvents: () => dispatchPendingLifecycleEvents,
@@ -691,6 +2447,41 @@ var LIFECYCLE_EVENT_NAMES = [
691
2447
  "entry.unpublished"
692
2448
  ];
693
2449
 
2450
+ // src/types/views.ts
2451
+ function defineView(config) {
2452
+ return {
2453
+ slug: config.slug,
2454
+ label: config.label,
2455
+ icon: config.icon,
2456
+ layout: config.layout ?? "table",
2457
+ filter: config.filter,
2458
+ groupBy: config.groupBy,
2459
+ dateField: config.dateField,
2460
+ startDateField: config.startDateField,
2461
+ endDateField: config.endDateField,
2462
+ columns: config.columns,
2463
+ sort: config.sort,
2464
+ actions: config.actions,
2465
+ features: config.features,
2466
+ actionOrder: config.actionOrder,
2467
+ metrics: config.metrics,
2468
+ access: config.access
2469
+ };
2470
+ }
2471
+ function defineAction(config) {
2472
+ return {
2473
+ name: config.name,
2474
+ label: config.label,
2475
+ icon: config.icon,
2476
+ type: config.type ?? "row",
2477
+ confirm: config.confirm,
2478
+ fields: config.fields,
2479
+ mutation: config.mutation,
2480
+ handler: config.handler,
2481
+ access: config.access
2482
+ };
2483
+ }
2484
+
694
2485
  // src/auth/token.ts
695
2486
  var import_jose = require("jose");
696
2487
 
@@ -1241,10 +3032,10 @@ function normalizeSchemaFragment(fragment) {
1241
3032
  }
1242
3033
 
1243
3034
  // src/utils/declarative-hooks.ts
1244
- var import_jexl2 = __toESM(require("jexl"), 1);
3035
+ var import_jexl2 = __toESM(require_Jexl(), 1);
1245
3036
 
1246
3037
  // src/utils/jexl-helpers.ts
1247
- var import_jexl = __toESM(require("jexl"), 1);
3038
+ var import_jexl = __toESM(require_Jexl(), 1);
1248
3039
  function slugify(val) {
1249
3040
  if (val === void 0 || val === null) return "";
1250
3041
  return String(val).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
@@ -2519,7 +4310,7 @@ function parseSqlWhere(where, getJsonField, placeholder = "?", likeOperator = "L
2519
4310
  function buildOperator(field, value) {
2520
4311
  const c = col(field);
2521
4312
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
2522
- params.push(value);
4313
+ params.push(typeof value === "boolean" ? String(value) : value);
2523
4314
  return `${c} = ${next()}`;
2524
4315
  }
2525
4316
  const entries = Object.entries(value);
@@ -2541,7 +4332,7 @@ function parseSqlWhere(where, getJsonField, placeholder = "?", likeOperator = "L
2541
4332
  const vals = Array.isArray(operand) ? operand : [operand];
2542
4333
  if (vals.length === 0) return "1=0";
2543
4334
  const placeholders = vals.map((v) => {
2544
- params.push(v);
4335
+ params.push(typeof v === "boolean" ? String(v) : v);
2545
4336
  return next();
2546
4337
  });
2547
4338
  return `${c} IN (${placeholders.join(", ")})`;
@@ -2550,24 +4341,31 @@ function parseSqlWhere(where, getJsonField, placeholder = "?", likeOperator = "L
2550
4341
  const vals = Array.isArray(operand) ? operand : [operand];
2551
4342
  if (vals.length === 0) return "1=1";
2552
4343
  const placeholders = vals.map((v) => {
2553
- params.push(v);
4344
+ params.push(typeof v === "boolean" ? String(v) : v);
2554
4345
  return next();
2555
4346
  });
2556
4347
  return `${c} NOT IN (${placeholders.join(", ")})`;
2557
4348
  }
2558
4349
  case "gt":
4350
+ case "greater_than":
2559
4351
  params.push(operand);
2560
4352
  return `${c} > ${next()}`;
2561
4353
  case "gte":
4354
+ case "greater_than_equal":
4355
+ case "greater_than_or_equal":
2562
4356
  params.push(operand);
2563
4357
  return `${c} >= ${next()}`;
2564
4358
  case "lt":
4359
+ case "less_than":
2565
4360
  params.push(operand);
2566
4361
  return `${c} < ${next()}`;
2567
4362
  case "lte":
4363
+ case "less_than_equal":
4364
+ case "less_than_or_equal":
2568
4365
  params.push(operand);
2569
4366
  return `${c} <= ${next()}`;
2570
4367
  case "contains":
4368
+ case "like":
2571
4369
  params.push(`%${operand}%`);
2572
4370
  return `${c} ${likeOperator} ${next()}`;
2573
4371
  case "starts_with":
@@ -2625,14 +4423,21 @@ function parseMongoWhere(where) {
2625
4423
  case "not_in":
2626
4424
  return { [field]: { $nin: Array.isArray(operand) ? operand : [operand] } };
2627
4425
  case "gt":
4426
+ case "greater_than":
2628
4427
  return { [field]: { $gt: operand } };
2629
4428
  case "gte":
4429
+ case "greater_than_equal":
4430
+ case "greater_than_or_equal":
2630
4431
  return { [field]: { $gte: operand } };
2631
4432
  case "lt":
4433
+ case "less_than":
2632
4434
  return { [field]: { $lt: operand } };
2633
4435
  case "lte":
4436
+ case "less_than_equal":
4437
+ case "less_than_or_equal":
2634
4438
  return { [field]: { $lte: operand } };
2635
4439
  case "contains":
4440
+ case "like":
2636
4441
  return { [field]: { $regex: operand, $options: "i" } };
2637
4442
  case "starts_with":
2638
4443
  return { [field]: { $regex: `^${operand}`, $options: "i" } };
@@ -2706,7 +4511,7 @@ function buildSqlOrderBy(sort, existingColumns, numericFields, dialect) {
2706
4511
  }
2707
4512
 
2708
4513
  // src/utils/hooks.ts
2709
- var import_jexl3 = __toESM(require("jexl"), 1);
4514
+ var import_jexl3 = __toESM(require_Jexl(), 1);
2710
4515
  async function runCollectionHooks(hooks, args, options = {}) {
2711
4516
  if (!hooks || hooks.length === 0) {
2712
4517
  return args.data ?? args.doc ?? args.query ?? void 0;
@@ -4246,6 +6051,7 @@ function defineTab(args) {
4246
6051
  createLifecycleEvent,
4247
6052
  createWorkflowDocument,
4248
6053
  defaultValue,
6054
+ defineAction,
4249
6055
  defineArrayField,
4250
6056
  defineBlock,
4251
6057
  defineBlocksField,
@@ -4275,6 +6081,7 @@ function defineTab(args) {
4275
6081
  defineTextareaField,
4276
6082
  defineTimeField,
4277
6083
  defineUrlField,
6084
+ defineView,
4278
6085
  diffDays,
4279
6086
  dispatchLifecycleEvent,
4280
6087
  dispatchPendingLifecycleEvents,