@baseplate-dev/plugin-auth 0.6.14 → 0.6.16

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 (145) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/auth/core/components/auth-definition-editor.js +3 -0
  3. package/dist/auth/core/components/role-editor-form/role-editor-form.js +2 -0
  4. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -28
  5. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -28
  6. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -14
  7. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -14
  8. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -28
  9. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -28
  10. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -14
  11. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -28
  12. package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -14
  13. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +9 -2
  14. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +6 -2
  15. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +16 -2
  16. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +8 -1
  17. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +8 -1
  18. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +5 -1
  19. package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.js +4 -0
  20. package/dist/better-auth/generators/fastify/seed-initial-user/templates/src/prisma/seed-initial-user.ts +3 -2
  21. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +7 -14
  22. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +42 -84
  23. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +7 -14
  24. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +70 -140
  25. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +14 -28
  26. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +7 -14
  27. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +7 -14
  28. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +7 -14
  29. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -28
  30. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -28
  31. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -14
  32. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -14
  33. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -28
  34. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -28
  35. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -14
  36. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -28
  37. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -14
  38. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +2 -1
  39. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +6 -3
  40. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +2 -1
  41. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +6 -3
  42. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +2 -2
  43. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +2 -2
  44. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +2 -2
  45. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +2 -2
  46. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +8 -5
  47. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +8 -8
  48. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +10 -2
  49. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +3 -1
  50. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +27 -3
  51. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +9 -1
  52. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +20 -3
  53. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +18 -16
  54. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +18 -16
  55. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +6 -6
  56. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.ts +6 -6
  57. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +7 -14
  58. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +42 -84
  59. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +7 -14
  60. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +63 -126
  61. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +14 -28
  62. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +7 -14
  63. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +14 -28
  64. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +7 -14
  65. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +4 -0
  66. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js +2 -1
  67. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.ts +3 -1
  68. package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.d.ts +1 -1
  69. package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.js +3 -1
  70. package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-3sV-KVGF.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-04_7KkB1.js} +15 -15
  71. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-0m3QgjSy.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-BfSk5vRC.js} +5 -4
  72. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-QrOyqu9V.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-DZIcwf2B.js} +1 -1
  73. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-BTSgZGcl.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-CXGct_48.js} +10053 -3750
  74. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CJ027_El.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-Ci5_qYaj.js} +3823 -2545
  75. package/dist/web/assets/arduino-BP2nYunF.js +21 -0
  76. package/dist/web/assets/auth-8qJtXAgU.js +1 -0
  77. package/dist/web/assets/bash-Zh_IyzBN.js +192 -0
  78. package/dist/web/assets/basic-3mvohyEL.js +28 -0
  79. package/dist/web/assets/c-C7Ey31hW.js +74 -0
  80. package/dist/web/assets/clike-D9YNFwtw.js +41 -0
  81. package/dist/web/assets/{common-Aq-HXybV.js → common-23-wvKrM.js} +5 -5
  82. package/dist/web/assets/{common-7-ZtKO5B.js → common-B-NI9TR-.js} +2 -2
  83. package/dist/web/assets/{common-CDrUdhRf.js → common-BBriDRRy.js} +3 -3
  84. package/dist/web/assets/{common-BPbNs2A1.js → common-BvU-7KsV.js} +5 -5
  85. package/dist/web/assets/{common-B_XZ3l9w.js → common-DBBUvtGu.js} +2 -2
  86. package/dist/web/assets/{common-B8N9gx2s.js → common-eFh2vwGb.js} +3 -3
  87. package/dist/web/assets/cpp-_RjA_yNA.js +82 -0
  88. package/dist/web/assets/csharp-0LZzOc6Q.js +301 -0
  89. package/dist/web/assets/css-D7TbgetL.js +70 -0
  90. package/dist/web/assets/diff-CtSa_15w.js +54 -0
  91. package/dist/web/assets/{dist-D3CkiDKT.js → dist-BjxypexQ.js} +1672 -992
  92. package/dist/web/assets/{get-auth-plugin-definition-D3ocnNxw.js → get-auth-plugin-definition-x8oAsN1R.js} +2 -2
  93. package/dist/web/assets/go-CzER04EZ.js +36 -0
  94. package/dist/web/assets/{hostInit-D3RxwboF.js → hostInit-Bay0Y9UX.js} +1 -1
  95. package/dist/web/assets/{index-CozZxQl1.js → index-qso1IsKy.js} +2 -2
  96. package/dist/web/assets/ini-CU-wHLTy.js +51 -0
  97. package/dist/web/assets/java-HAvRESj1.js +116 -0
  98. package/dist/web/assets/javascript-BVAr0eZH.js +124 -0
  99. package/dist/web/assets/json-DN8T4yFI.js +38 -0
  100. package/dist/web/assets/kotlin-DkCMjTKK.js +83 -0
  101. package/dist/web/assets/less-ZXX1tgaG.js +42 -0
  102. package/dist/web/assets/lua-D9bD4wrb.js +28 -0
  103. package/dist/web/assets/makefile-CKoRpler.js +40 -0
  104. package/dist/web/assets/markdown-_2_uVr2L.js +278 -0
  105. package/dist/web/assets/markup-BVZ8HhdW.js +176 -0
  106. package/dist/web/assets/markup-templating-BDIRuVJH.js +94 -0
  107. package/dist/web/assets/{mf-entry-bootstrap-0-069a3ab2.js → mf-entry-bootstrap-0-659c976f.js} +2 -2
  108. package/dist/web/assets/{model-utils-CYaLYwoX.js → model-utils-dNFTOjqi.js} +305 -27
  109. package/dist/web/assets/{models-BX4xFiEn.js → models-BpslIbU7.js} +2 -2
  110. package/dist/web/assets/{models-k-iaCft-.js → models-CKab4MTC.js} +2 -2
  111. package/dist/web/assets/objectivec-DPgB68It.js +25 -0
  112. package/dist/web/assets/perl-Cul_ma_h.js +92 -0
  113. package/dist/web/assets/php-JTON0zp9.js +298 -0
  114. package/dist/web/assets/{plugin-definition-CI1aEVGv.js → plugin-definition-8Exesd6T.js} +2 -2
  115. package/dist/web/assets/{plugin-definition-BI565qFo.js → plugin-definition-ChBrbazJ.js} +2 -2
  116. package/dist/web/assets/python-CURlmZ7M.js +73 -0
  117. package/dist/web/assets/r-8lr7pbGm.js +30 -0
  118. package/dist/web/assets/regex-CxQ7DXCx.js +96 -0
  119. package/dist/web/assets/ruby-BoFHz67P.js +175 -0
  120. package/dist/web/assets/rust-CpZXpaj0.js +107 -0
  121. package/dist/web/assets/sass-DG0YAnL7.js +65 -0
  122. package/dist/web/assets/scss-BDRIqhak.js +70 -0
  123. package/dist/web/assets/sql-C-bL8_gT.js +40 -0
  124. package/dist/web/assets/{styles-f4jHVv0S.js → styles-Cuq4wgvD.js} +7 -7
  125. package/dist/web/assets/swift-rQ52kfab.js +107 -0
  126. package/dist/web/assets/typescript-CDkIWcT8.js +57 -0
  127. package/dist/web/assets/vbnet-_PL7-T9d.js +32 -0
  128. package/dist/web/assets/{virtualExposes-BHQhgLE-.js → virtualExposes-BwIds34r.js} +1 -1
  129. package/dist/web/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-aH8n-Nbe.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-BBt5f0I7.js} +3 -3
  130. package/dist/web/assets/{virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-I_SxfvGj.js → virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-RzPgl37a.js} +13 -13
  131. package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-BQ0UMKSv.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DM6Ir1_S.js} +13 -13
  132. package/dist/web/assets/{web-DCK_tLVa.js → web-BZd3bM0n.js} +6 -6
  133. package/dist/web/assets/{web-CkbTu31Q.js → web-BgWG7dYl.js} +10 -10
  134. package/dist/web/assets/{web-Dh6pUTrF.js → web-CXHw8SK7.js} +13 -13
  135. package/dist/web/assets/{web-Cn3uvuFs.js → web-CnB-sqCR.js} +20 -18
  136. package/dist/web/assets/{web-BRvS0HRS.js → web-DHv2aVpi.js} +10 -10
  137. package/dist/web/assets/{web-YXVJWeXy.js → web-DNrWXjpS.js} +3 -3
  138. package/dist/web/assets/{web-nLSlkJy_.js → web-D_H-MoGI.js} +3 -3
  139. package/dist/web/assets/workerBundle-GFUata9j.js +10 -0
  140. package/dist/web/assets/yaml-C9m3vuV5.js +90 -0
  141. package/dist/web/index.html +2 -2
  142. package/dist/web/remoteEntry.js +1 -1
  143. package/dist/web/remoteEntry.ssr.js +1 -1
  144. package/package.json +18 -17
  145. package/dist/web/assets/auth-D8BnFQKk.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { t as __commonJSMin } from "./rolldown-runtime-FZ4Itg2g.js";
2
- import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-BTSgZGcl.js";
2
+ import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-CXGct_48.js";
3
3
  import { n as __mf_0, t as __mfDefaultExport } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-Do-7VDVw.js";
4
- import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as isEqualsSameValueZero, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as createPluginSpec, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, s as DefinitionEntityType, t as ModelUtils, tt as sortBy, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-CYaLYwoX.js";
4
+ import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as eq, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as sortBy, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, rt as createPluginSpec, s as DefinitionEntityType, t as ModelUtils, tt as isBuffer, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-dNFTOjqi.js";
5
5
  //#region ../../packages/utils/dist/arrays/assert-no-duplicates.js
6
6
  /**
7
7
  * Asserts that an array has no duplicate values based on an optional key function.
@@ -43,7 +43,45 @@ function enhanceErrorWithContext(originalError, contextMessage) {
43
43
  return enhancedError;
44
44
  }
45
45
  //#endregion
46
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/groupBy.mjs
46
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/groupBy.mjs
47
+ /**
48
+ * Groups the elements of an array based on a provided key-generating function.
49
+ *
50
+ * This function takes an array and a function that generates a key from each element. It returns
51
+ * an object where the keys are the generated keys and the values are arrays of elements that share
52
+ * the same key.
53
+ *
54
+ * @template T - The type of elements in the array.
55
+ * @template K - The type of keys.
56
+ * @param arr - The array to group.
57
+ * @param getKeyFromItem - A function that generates a key from an element, its index, and the array.
58
+ * @returns An object where each key is associated with an array of elements that
59
+ * share that key.
60
+ *
61
+ * @example
62
+ * const array = [
63
+ * { category: 'fruit', name: 'apple' },
64
+ * { category: 'fruit', name: 'banana' },
65
+ * { category: 'vegetable', name: 'carrot' }
66
+ * ];
67
+ * const result = groupBy(array, item => item.category);
68
+ * // result will be:
69
+ * // {
70
+ * // fruit: [
71
+ * // { category: 'fruit', name: 'apple' },
72
+ * // { category: 'fruit', name: 'banana' }
73
+ * // ],
74
+ * // vegetable: [
75
+ * // { category: 'vegetable', name: 'carrot' }
76
+ * // ]
77
+ * // }
78
+ *
79
+ * @example
80
+ * // Using index parameter
81
+ * const items = ['a', 'b', 'c', 'd'];
82
+ * const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd');
83
+ * // result will be: { even: ['a', 'c'], odd: ['b', 'd'] }
84
+ */
47
85
  function groupBy$1(arr, getKeyFromItem) {
48
86
  const result = {};
49
87
  for (let i = 0; i < arr.length; i++) {
@@ -55,7 +93,40 @@ function groupBy$1(arr, getKeyFromItem) {
55
93
  return result;
56
94
  }
57
95
  //#endregion
58
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/keyBy.mjs
96
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/keyBy.mjs
97
+ /**
98
+ * Maps each element of an array based on a provided key-generating function.
99
+ *
100
+ * This function takes an array and a function that generates a key from each element. It returns
101
+ * an object where the keys are the generated keys and the values are the corresponding elements.
102
+ * If there are multiple elements generating the same key, the last element among them is used
103
+ * as the value.
104
+ *
105
+ * @template T - The type of elements in the array.
106
+ * @template K - The type of keys.
107
+ * @param arr - The array of elements to be mapped.
108
+ * @param getKeyFromItem - A function that generates a key from an element, its index, and the array.
109
+ * @returns An object where keys are mapped to each element of an array.
110
+ *
111
+ * @example
112
+ * const array = [
113
+ * { category: 'fruit', name: 'apple' },
114
+ * { category: 'fruit', name: 'banana' },
115
+ * { category: 'vegetable', name: 'carrot' }
116
+ * ];
117
+ * const result = keyBy(array, item => item.category);
118
+ * // result will be:
119
+ * // {
120
+ * // fruit: { category: 'fruit', name: 'banana' },
121
+ * // vegetable: { category: 'vegetable', name: 'carrot' }
122
+ * // }
123
+ *
124
+ * @example
125
+ * // Using index parameter
126
+ * const items = ['a', 'b', 'c'];
127
+ * const result = keyBy(items, (item, index) => index);
128
+ * // result will be: { 0: 'a', 1: 'b', 2: 'c' }
129
+ */
59
130
  function keyBy(arr, getKeyFromItem) {
60
131
  const result = {};
61
132
  for (let i = 0; i < arr.length; i++) {
@@ -66,17 +137,42 @@ function keyBy(arr, getKeyFromItem) {
66
137
  return result;
67
138
  }
68
139
  //#endregion
69
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
70
- function isSymbol(value) {
71
- return typeof value === "symbol" || value instanceof Symbol;
72
- }
73
- //#endregion
74
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniq.mjs
140
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/uniq.mjs
141
+ /**
142
+ * Creates a duplicate-free version of an array.
143
+ *
144
+ * This function takes an array and returns a new array containing only the unique values
145
+ * from the original array, preserving the order of first occurrence.
146
+ *
147
+ * @template T - The type of elements in the array.
148
+ * @param arr - The array to process.
149
+ * @returns A new array with only unique values from the original array.
150
+ *
151
+ * @example
152
+ * const array = [1, 2, 2, 3, 4, 4, 5];
153
+ * const result = uniq(array);
154
+ * // result will be [1, 2, 3, 4, 5]
155
+ */
75
156
  function uniq(arr) {
76
157
  return [...new Set(arr)];
77
158
  }
78
159
  //#endregion
79
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/flow.mjs
160
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/function/flow.mjs
161
+ /**
162
+ * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.
163
+ *
164
+ * The `this` context of the returned function is also passed to the functions provided as parameters.
165
+ *
166
+ * @param funcs The functions to invoke.
167
+ * @returns Returns the new composite function.
168
+ *
169
+ * @example
170
+ * const add = (x: number, y: number) => x + y;
171
+ * const square = (n: number) => n * n;
172
+ *
173
+ * const combined = flow(add, square);
174
+ * console.log(combined(1, 2)); // 9
175
+ */
80
176
  function flow(...funcs) {
81
177
  return function(...args) {
82
178
  let result = funcs.length ? funcs[0].apply(this, args) : args[0];
@@ -85,22 +181,105 @@ function flow(...funcs) {
85
181
  };
86
182
  }
87
183
  //#endregion
88
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/identity.mjs
184
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/function/identity.mjs
185
+ /**
186
+ * Returns the input value unchanged.
187
+ *
188
+ * @template T - The type of the input value.
189
+ * @param x - The value to be returned.
190
+ * @returns The input value.
191
+ *
192
+ * @example
193
+ * // Returns 5
194
+ * identity(5);
195
+ *
196
+ * @example
197
+ * // Returns 'hello'
198
+ * identity('hello');
199
+ *
200
+ * @example
201
+ * // Returns { key: 'value' }
202
+ * identity({ key: 'value' });
203
+ */
89
204
  function identity$1(x) {
90
205
  return x;
91
206
  }
92
207
  //#endregion
93
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
208
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
209
+ /**
210
+ * Checks whether a value is a JavaScript primitive.
211
+ * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
212
+ *
213
+ * @param value The value to check.
214
+ * @returns Returns true if `value` is a primitive, false otherwise.
215
+ *
216
+ * @example
217
+ * isPrimitive(null); // true
218
+ * isPrimitive(undefined); // true
219
+ * isPrimitive('123'); // true
220
+ * isPrimitive(false); // true
221
+ * isPrimitive(true); // true
222
+ * isPrimitive(Symbol('a')); // true
223
+ * isPrimitive(123n); // true
224
+ * isPrimitive({}); // false
225
+ * isPrimitive(new Date()); // false
226
+ * isPrimitive(new Map()); // false
227
+ * isPrimitive(new Set()); // false
228
+ * isPrimitive([1, 2, 3]); // false
229
+ */
94
230
  function isPrimitive(value) {
95
231
  return value == null || typeof value !== "object" && typeof value !== "function";
96
232
  }
97
233
  //#endregion
98
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
234
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
235
+ /**
236
+ * Checks if a value is a TypedArray.
237
+ * @param x The value to check.
238
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
239
+ *
240
+ * @example
241
+ * const arr = new Uint8Array([1, 2, 3]);
242
+ * isTypedArray(arr); // true
243
+ *
244
+ * const regularArray = [1, 2, 3];
245
+ * isTypedArray(regularArray); // false
246
+ *
247
+ * const buffer = new ArrayBuffer(16);
248
+ * isTypedArray(buffer); // false
249
+ */
99
250
  function isTypedArray(x) {
100
251
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
101
252
  }
102
253
  //#endregion
103
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/clone.mjs
254
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/clone.mjs
255
+ /**
256
+ * Creates a shallow clone of the given object.
257
+ *
258
+ * @template T - The type of the object.
259
+ * @param obj - The object to clone.
260
+ * @returns A shallow clone of the given object.
261
+ *
262
+ * @example
263
+ * // Clone a primitive value
264
+ * const num = 29;
265
+ * const clonedNum = clone(num);
266
+ * console.log(clonedNum); // 29
267
+ * console.log(clonedNum === num); // true
268
+ *
269
+ * @example
270
+ * // Clone an array
271
+ * const arr = [1, 2, 3];
272
+ * const clonedArr = clone(arr);
273
+ * console.log(clonedArr); // [1, 2, 3]
274
+ * console.log(clonedArr === arr); // false
275
+ *
276
+ * @example
277
+ * // Clone an object
278
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
279
+ * const clonedObj = clone(obj);
280
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
281
+ * console.log(clonedObj === obj); // false
282
+ */
104
283
  function clone(obj) {
105
284
  if (isPrimitive(obj)) return obj;
106
285
  if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
@@ -126,14 +305,51 @@ function clone(obj) {
126
305
  type: obj.type,
127
306
  lastModified: obj.lastModified
128
307
  });
129
- if (typeof obj === "object") {
130
- const newObject = Object.create(prototype);
131
- return Object.assign(newObject, obj);
132
- }
308
+ if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
133
309
  return obj;
134
310
  }
135
311
  //#endregion
136
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
312
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
313
+ /**
314
+ * Deeply clones the given object.
315
+ *
316
+ * You can customize the deep cloning process using the `cloneValue` function.
317
+ * The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
318
+ * If the function returns a value, that value is used;
319
+ * if it returns `undefined`, the default cloning method is used.
320
+ *
321
+ * @template T - The type of the object.
322
+ * @param obj - The object to clone.
323
+ * @param [cloneValue] - A function to customize the cloning process.
324
+ * @returns A deep clone of the given object.
325
+ *
326
+ * @example
327
+ * // Clone a primitive value
328
+ * const num = 29;
329
+ * const clonedNum = cloneDeepWith(num);
330
+ * console.log(clonedNum); // 29
331
+ * console.log(clonedNum === num); // true
332
+ *
333
+ * @example
334
+ * // Clone an object with a customizer
335
+ * const obj = { a: 1, b: 2 };
336
+ * const clonedObj = cloneDeepWith(obj, (value) => {
337
+ * if (typeof value === 'number') {
338
+ * return value * 2; // Double the number
339
+ * }
340
+ * });
341
+ * console.log(clonedObj); // { a: 2, b: 4 }
342
+ * console.log(clonedObj === obj); // false
343
+ *
344
+ * @example
345
+ * // Clone an array with a customizer
346
+ * const arr = [1, 2, 3];
347
+ * const clonedArr = cloneDeepWith(arr, (value) => {
348
+ * return value + 1; // Increment each value
349
+ * });
350
+ * console.log(clonedArr); // [2, 3, 4]
351
+ * console.log(clonedArr === arr); // false
352
+ */
137
353
  function cloneDeepWith$1(obj, cloneValue) {
138
354
  return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
139
355
  }
@@ -168,7 +384,7 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
168
384
  for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
169
385
  return result;
170
386
  }
171
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
387
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
172
388
  if (isTypedArray(valueToClone)) {
173
389
  const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
174
390
  stack.set(valueToClone, result);
@@ -195,12 +411,13 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
195
411
  return result;
196
412
  }
197
413
  if (valueToClone instanceof Error) {
198
- const result = new valueToClone.constructor();
414
+ const result = structuredClone(valueToClone);
199
415
  stack.set(valueToClone, result);
200
416
  result.message = valueToClone.message;
201
417
  result.name = valueToClone.name;
202
418
  result.stack = valueToClone.stack;
203
419
  result.cause = valueToClone.cause;
420
+ result.constructor = valueToClone.constructor;
204
421
  copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
205
422
  return result;
206
423
  }
@@ -266,12 +483,76 @@ function isCloneableObject(object) {
266
483
  }
267
484
  }
268
485
  //#endregion
269
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
486
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
487
+ /**
488
+ * Creates a deep clone of the given object.
489
+ *
490
+ * @template T - The type of the object.
491
+ * @param obj - The object to clone.
492
+ * @returns A deep clone of the given object.
493
+ *
494
+ * @example
495
+ * // Clone a primitive value
496
+ * const num = 29;
497
+ * const clonedNum = cloneDeep(num);
498
+ * console.log(clonedNum); // 29
499
+ * console.log(clonedNum === num); // true
500
+ *
501
+ * @example
502
+ * // Clone an array
503
+ * const arr = [1, 2, 3];
504
+ * const clonedArr = cloneDeep(arr);
505
+ * console.log(clonedArr); // [1, 2, 3]
506
+ * console.log(clonedArr === arr); // false
507
+ *
508
+ * @example
509
+ * // Clone an array with nested objects
510
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
511
+ * const clonedArr = cloneDeep(arr);
512
+ * arr[1].a = 2;
513
+ * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
514
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
515
+ * console.log(clonedArr === arr); // false
516
+ *
517
+ * @example
518
+ * // Clone an object
519
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
520
+ * const clonedObj = cloneDeep(obj);
521
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
522
+ * console.log(clonedObj === obj); // false
523
+ *
524
+ * @example
525
+ * // Clone an object with nested objects
526
+ * const obj = { a: 1, b: { c: 1 } };
527
+ * const clonedObj = cloneDeep(obj);
528
+ * obj.b.c = 2;
529
+ * console.log(obj); // { a: 1, b: { c: 2 } }
530
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
531
+ * console.log(clonedObj === obj); // false
532
+ */
270
533
  function cloneDeep$1(obj) {
271
534
  return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
272
535
  }
273
536
  //#endregion
274
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mapValues.mjs
537
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/mapValues.mjs
538
+ /**
539
+ * Creates a new object with the same keys as the given object, but with values generated
540
+ * by running each own enumerable property of the object through the iteratee function.
541
+ *
542
+ * @template T - The type of the object.
543
+ * @template K - The type of the keys in the object.
544
+ * @template V - The type of the new values generated by the iteratee function.
545
+ *
546
+ * @param object - The object to iterate over.
547
+ * @param getNewValue - The function invoked per own enumerable property.
548
+ * @returns Returns the new mapped object.
549
+ *
550
+ * @example
551
+ * // Example usage:
552
+ * const obj = { a: 1, b: 2 };
553
+ * const result = mapValues(obj, (value) => value * 2);
554
+ * console.log(result); // { a: 2, b: 4 }
555
+ */
275
556
  function mapValues(object, getNewValue) {
276
557
  const result = {};
277
558
  const keys = Object.keys(object);
@@ -283,12 +564,70 @@ function mapValues(object, getNewValue) {
283
564
  return result;
284
565
  }
285
566
  //#endregion
286
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
567
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
568
+ /**
569
+ * Checks if a property key is unsafe to modify directly.
570
+ *
571
+ * This function is used in functions like `merge` to prevent prototype pollution attacks
572
+ * by identifying property keys that could modify the object's prototype chain or constructor.
573
+ *
574
+ * @param key - The property key to check
575
+ * @returns `true` if the property is unsafe to modify directly, `false` otherwise
576
+ * @internal
577
+ */
287
578
  function isUnsafeProperty(key) {
288
579
  return key === "__proto__";
289
580
  }
290
581
  //#endregion
291
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
582
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
583
+ /**
584
+ * Merges the properties of the source object into the target object.
585
+ *
586
+ * You can provide a custom `merge` function to control how properties are merged. It should return the value to be set in the target object.
587
+ *
588
+ * If it returns `undefined`, a default deep merge will be applied for arrays and objects:
589
+ *
590
+ * - If a property in the source object is an array or an object and the corresponding property in the target object is also an array or object, they will be merged.
591
+ * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.
592
+ *
593
+ * Note that this function mutates the target object.
594
+ *
595
+ * @param target - The target object into which the source object properties will be merged. This object is modified in place.
596
+ * @param source - The source object whose properties will be merged into the target object.
597
+ * @param merge - A custom merge function that defines how properties should be combined. It receives the following arguments:
598
+ * - `targetValue`: The current value of the property in the target object.
599
+ * - `sourceValue`: The value of the property in the source object.
600
+ * - `key`: The key of the property being merged.
601
+ * - `target`: The target object.
602
+ * - `source`: The source object.
603
+ *
604
+ * @returns The updated target object with properties from the source object merged in.
605
+ *
606
+ * @template T - Type of the target object.
607
+ * @template S - Type of the source object.
608
+ *
609
+ * @example
610
+ * const target = { a: 1, b: 2 };
611
+ * const source = { b: 3, c: 4 };
612
+ *
613
+ * mergeWith(target, source, (targetValue, sourceValue) => {
614
+ * if (typeof targetValue === 'number' && typeof sourceValue === 'number') {
615
+ * return targetValue + sourceValue;
616
+ * }
617
+ * });
618
+ * // Returns { a: 1, b: 5, c: 4 }
619
+ * @example
620
+ * const target = { a: [1], b: [2] };
621
+ * const source = { a: [3], b: [4] };
622
+ *
623
+ * const result = mergeWith(target, source, (objValue, srcValue) => {
624
+ * if (Array.isArray(objValue)) {
625
+ * return objValue.concat(srcValue);
626
+ * }
627
+ * });
628
+ *
629
+ * expect(result).toEqual({ a: [1, 3], b: [2, 4] });
630
+ */
292
631
  function mergeWith(target, source, merge) {
293
632
  const sourceKeys = Object.keys(source);
294
633
  for (let i = 0; i < sourceKeys.length; i++) {
@@ -307,7 +646,24 @@ function mergeWith(target, source, merge) {
307
646
  return target;
308
647
  }
309
648
  //#endregion
310
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/omit.mjs
649
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/omit.mjs
650
+ /**
651
+ * Creates a new object with specified keys omitted.
652
+ *
653
+ * This function takes an object and an array of keys, and returns a new object that
654
+ * excludes the properties corresponding to the specified keys.
655
+ *
656
+ * @template T - The type of object.
657
+ * @template K - The type of keys in object.
658
+ * @param obj - The object to omit keys from.
659
+ * @param keys - An array of keys to be omitted from the object.
660
+ * @returns A new object with the specified keys omitted.
661
+ *
662
+ * @example
663
+ * const obj = { a: 1, b: 2, c: 3 };
664
+ * const result = omit(obj, ['b', 'c']);
665
+ * // result will be { a: 1 }
666
+ */
311
667
  function omit(obj, keys) {
312
668
  const result = { ...obj };
313
669
  for (let i = 0; i < keys.length; i++) {
@@ -317,7 +673,26 @@ function omit(obj, keys) {
317
673
  return result;
318
674
  }
319
675
  //#endregion
320
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/pickBy.mjs
676
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/pickBy.mjs
677
+ /**
678
+ * Creates a new object composed of the properties that satisfy the predicate function.
679
+ *
680
+ * This function takes an object and a predicate function, and returns a new object that
681
+ * includes only the properties for which the predicate function returns true.
682
+ *
683
+ * @template T - The type of object.
684
+ * @param obj - The object to pick properties from.
685
+ * @param shouldPick - A predicate function that determines
686
+ * whether a property should be picked. It takes the property's key and value as arguments and returns `true`
687
+ * if the property should be picked, and `false` otherwise.
688
+ * @returns A new object with the properties that satisfy the predicate function.
689
+ *
690
+ * @example
691
+ * const obj = { a: 1, b: 'pick', c: 3 };
692
+ * const shouldPick = (value) => typeof value === 'string';
693
+ * const result = pickBy(obj, shouldPick);
694
+ * // result will be { b: 'pick' }
695
+ */
321
696
  function pickBy(obj, shouldPick) {
322
697
  const result = {};
323
698
  const keys = Object.keys(obj);
@@ -329,14 +704,67 @@ function pickBy(obj, shouldPick) {
329
704
  return result;
330
705
  }
331
706
  //#endregion
332
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/capitalize.mjs
707
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/string/capitalize.mjs
708
+ /**
709
+ * Converts the first character of string to upper case and the remaining to lower case.
710
+ *
711
+ * @template T - Literal type of the string.
712
+ * @param str - The string to be converted to uppercase.
713
+ * @returns The capitalized string.
714
+ *
715
+ * @example
716
+ * const result = capitalize('fred') // returns 'Fred'
717
+ * const result2 = capitalize('FRED') // returns 'Fred'
718
+ */
333
719
  function capitalize$1(str) {
334
720
  return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
335
721
  }
336
722
  //#endregion
337
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toMerged.mjs
723
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/toMerged.mjs
724
+ /**
725
+ * Merges the properties of the source object into a deep clone of the target object.
726
+ * Unlike `merge`, This function does not modify the original target object.
727
+ *
728
+ * This function performs a deep merge, meaning nested objects and arrays are merged recursively.
729
+ *
730
+ * - If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
731
+ * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.
732
+ *
733
+ * Note that this function does not mutate the target object.
734
+ *
735
+ * @param target - The target object to be cloned and merged into. This object is not modified directly.
736
+ * @param source - The source object whose properties will be merged into the cloned target object.
737
+ * @returns A new object with properties from the source object merged into a deep clone of the target object.
738
+ *
739
+ * @template T - Type of the target object.
740
+ * @template S - Type of the source object.
741
+ *
742
+ * @example
743
+ * const target = { a: 1, b: { x: 1, y: 2 } };
744
+ * const source = { b: { y: 3, z: 4 }, c: 5 };
745
+ *
746
+ * const result = toMerged(target, source);
747
+ * console.log(result);
748
+ * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
749
+ *
750
+ * @example
751
+ * const target = { a: [1, 2], b: { x: 1 } };
752
+ * const source = { a: [3], b: { y: 2 } };
753
+ *
754
+ * const result = toMerged(target, source);
755
+ * console.log(result);
756
+ * // Output: { a: [3, 2], b: { x: 1, y: 2 } }
757
+ *
758
+ * @example
759
+ * const target = { a: null };
760
+ * const source = { a: [1, 2, 3] };
761
+ *
762
+ * const result = toMerged(target, source);
763
+ * console.log(result);
764
+ * // Output: { a: [1, 2, 3] }
765
+ */
338
766
  function toMerged(target, source) {
339
- return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
767
+ return mergeWith(cloneDeep$1(target), source, function mergeRecursively(targetValue, sourceValue) {
340
768
  if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
341
769
  else return mergeWith([], sourceValue, mergeRecursively);
342
770
  else if (isPlainObject$1(sourceValue)) if (isPlainObject$1(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
@@ -344,7 +772,28 @@ function toMerged(target, source) {
344
772
  });
345
773
  }
346
774
  //#endregion
347
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
775
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
776
+ /**
777
+ * Checks if a given value is a valid length.
778
+ *
779
+ * A valid length is of type `number`, is a non-negative integer, and is less than or equal to
780
+ * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).
781
+ * It returns `true` if the value is a valid length, and `false` otherwise.
782
+ *
783
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the
784
+ * argument to a valid length (`number`).
785
+ *
786
+ * @param value The value to check.
787
+ * @returns Returns `true` if `value` is a valid length, else `false`.
788
+ *
789
+ * @example
790
+ * isLength(0); // true
791
+ * isLength(42); // true
792
+ * isLength(-1); // false
793
+ * isLength(1.5); // false
794
+ * isLength(Number.MAX_SAFE_INTEGER); // true
795
+ * isLength(Number.MAX_SAFE_INTEGER + 1); // false
796
+ */
348
797
  function isLength(value) {
349
798
  return Number.isSafeInteger(value) && value >= 0;
350
799
  }
@@ -488,6 +937,17 @@ var ToposortUnknownNodeError = class extends Error {
488
937
  }
489
938
  };
490
939
  //#endregion
940
+ //#region ../../packages/utils/dist/toposort/node-index.js
941
+ /**
942
+ * Reads a node index that is in-bounds by construction, throwing if the graph
943
+ * bookkeeping is corrupt rather than silently producing a wrong ordering.
944
+ */
945
+ function atNodeIndex(items, index) {
946
+ const item = items[index];
947
+ if (item === void 0) throw new Error(`Toposort encountered an unknown node index: ${index}`);
948
+ return item;
949
+ }
950
+ //#endregion
491
951
  //#region ../../node_modules/.pnpm/tinyqueue@3.0.0/node_modules/tinyqueue/index.js
492
952
  var TinyQueue = class {
493
953
  constructor(data = [], compare = (a, b) => a < b ? -1 : a > b ? 1 : 0) {
@@ -564,7 +1024,7 @@ function makeOutgoingEdges(nodes, edgeArr) {
564
1024
  */
565
1025
  function makeNodeInDegrees(outgoingEdgesMap, nodeLength) {
566
1026
  const nodeInDegrees = Array.from({ length: nodeLength }, () => 0);
567
- for (const [, targets] of outgoingEdgesMap.entries()) for (const target of targets) nodeInDegrees[target]++;
1027
+ for (const [, targets] of outgoingEdgesMap.entries()) for (const target of targets) nodeInDegrees[target] = atNodeIndex(nodeInDegrees, target) + 1;
568
1028
  return nodeInDegrees;
569
1029
  }
570
1030
  /**
@@ -591,7 +1051,7 @@ function detectCycle(nodes, visited, edges) {
591
1051
  for (let i = 0; i < nodes.length; i++) if (!visited.has(i)) {
592
1052
  path.length = 0;
593
1053
  visitSet.clear();
594
- if (dfs(i)) return path.map((idx) => nodes[idx]);
1054
+ if (dfs(i)) return path.map((idx) => atNodeIndex(nodes, idx));
595
1055
  }
596
1056
  return [];
597
1057
  }
@@ -607,7 +1067,7 @@ function toposort(nodes, edges, options = {}) {
607
1067
  const { compareFunc } = options;
608
1068
  const outgoingEdgesMap = makeOutgoingEdges(new Map(nodes.map((node, index) => [node, index])), edges);
609
1069
  const nodeInDegrees = makeNodeInDegrees(outgoingEdgesMap, nodes.length);
610
- const zeroInDegreeQueue = compareFunc ? new TinyQueue([], (a, b) => compareFunc(nodes[a], nodes[b])) : [];
1070
+ const zeroInDegreeQueue = compareFunc ? new TinyQueue([], (a, b) => compareFunc(atNodeIndex(nodes, a), atNodeIndex(nodes, b))) : [];
611
1071
  for (const [i, nodeInDegree] of nodeInDegrees.entries()) if (nodeInDegree === 0) zeroInDegreeQueue.push(i);
612
1072
  const result = [];
613
1073
  const visited = /* @__PURE__ */ new Set();
@@ -615,11 +1075,12 @@ function toposort(nodes, edges, options = {}) {
615
1075
  const current = zeroInDegreeQueue.pop();
616
1076
  if (current === void 0) break;
617
1077
  visited.add(current);
618
- result.push(nodes[current]);
1078
+ result.push(atNodeIndex(nodes, current));
619
1079
  const outgoingEdges = outgoingEdgesMap.get(current);
620
1080
  if (outgoingEdges) for (const target of outgoingEdges) {
621
- nodeInDegrees[target]--;
622
- if (nodeInDegrees[target] === 0) zeroInDegreeQueue.push(target);
1081
+ const remainingInDegree = atNodeIndex(nodeInDegrees, target) - 1;
1082
+ nodeInDegrees[target] = remainingInDegree;
1083
+ if (remainingInDegree === 0) zeroInDegreeQueue.push(target);
623
1084
  }
624
1085
  }
625
1086
  if (result.length !== nodes.length) throw new ToposortCyclicalDependencyError(detectCycle(nodes, visited, outgoingEdgesMap));
@@ -1237,8 +1698,9 @@ function byId$2(projectDefinition, id) {
1237
1698
  }
1238
1699
  function getBackendApp(projectDefinition) {
1239
1700
  const backendApps = projectDefinition.apps.filter((a) => a.type === "backend");
1240
- if (backendApps.length > 1 || backendApps.length === 0) throw new Error(`Only one backend app is supported and must exist`);
1241
- return backendApps[0];
1701
+ const backendApp = backendApps[0];
1702
+ if (backendApps.length > 1 || !backendApp) throw new Error(`Only one backend app is supported and must exist`);
1703
+ return backendApp;
1242
1704
  }
1243
1705
  /**
1244
1706
  * Given an app config, get the relative directory of the app
@@ -1306,28 +1768,47 @@ function createDefinitionEntityNameResolver(entityNameResolver) {
1306
1768
  return entityNameResolver;
1307
1769
  }
1308
1770
  //#endregion
1309
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1771
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1772
+ /**
1773
+ * Checks if `value` is array-like.
1774
+ *
1775
+ * @param value The value to check.
1776
+ * @returns Returns `true` if `value` is array-like, else `false`.
1777
+ *
1778
+ * @example
1779
+ * isArrayLike([1, 2, 3]); // true
1780
+ * isArrayLike('abc'); // true
1781
+ * isArrayLike({ 0: 'a', length: 1 }); // true
1782
+ * isArrayLike({}); // false
1783
+ * isArrayLike(null); // false
1784
+ * isArrayLike(undefined); // false
1785
+ */
1310
1786
  function isArrayLike(value) {
1311
1787
  return value != null && typeof value !== "function" && isLength(value.length);
1312
1788
  }
1313
1789
  //#endregion
1314
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1315
- function isDeepKey(key) {
1316
- switch (typeof key) {
1317
- case "number":
1318
- case "symbol": return false;
1319
- case "string": return key.includes(".") || key.includes("[") || key.includes("]");
1320
- }
1790
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/toArray.mjs
1791
+ function toArray(value) {
1792
+ return Array.isArray(value) ? value : Array.from(value);
1321
1793
  }
1322
1794
  //#endregion
1323
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1324
- function toKey(value) {
1325
- if (typeof value === "string" || typeof value === "symbol") return value;
1326
- if (Object.is(value?.valueOf?.(), -0)) return "-0";
1327
- return String(value);
1328
- }
1329
- //#endregion
1330
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1795
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1796
+ /**
1797
+ * Converts `value` to a string.
1798
+ *
1799
+ * An empty string is returned for `null` and `undefined` values.
1800
+ * The sign of `-0` is preserved.
1801
+ *
1802
+ * @param value - The value to convert.
1803
+ * @returns Returns the converted string.
1804
+ *
1805
+ * @example
1806
+ * toString(null) // returns ''
1807
+ * toString(undefined) // returns ''
1808
+ * toString(-0) // returns '-0'
1809
+ * toString([1, 2, -0]) // returns '1,2,-0'
1810
+ * toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'
1811
+ */
1331
1812
  function toString$1(value) {
1332
1813
  if (value == null) return "";
1333
1814
  if (typeof value === "string") return value;
@@ -1337,7 +1818,38 @@ function toString$1(value) {
1337
1818
  return result;
1338
1819
  }
1339
1820
  //#endregion
1340
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1821
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1822
+ /**
1823
+ * Converts `value` to a string key if it's not a string or symbol.
1824
+ *
1825
+ * @private
1826
+ * @param {*} value The value to inspect.
1827
+ * @returns {string|symbol} Returns the key.
1828
+ */
1829
+ function toKey(value) {
1830
+ if (typeof value === "string" || typeof value === "symbol") return value;
1831
+ if (Object.is(value?.valueOf?.(), -0)) return "-0";
1832
+ return String(value);
1833
+ }
1834
+ //#endregion
1835
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1836
+ /**
1837
+ * Converts a deep key string into an array of path segments.
1838
+ *
1839
+ * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.
1840
+ *
1841
+ * @param deepKey - The deep key string to convert.
1842
+ * @returns An array of strings, each representing a segment of the path.
1843
+ *
1844
+ * Examples:
1845
+ *
1846
+ * toPath('a.b.c') // Returns ['a', 'b', 'c']
1847
+ * toPath('a[b][c]') // Returns ['a', 'b', 'c']
1848
+ * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
1849
+ * toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
1850
+ * toPath('') // Returns []
1851
+ * toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
1852
+ */
1341
1853
  function toPath(deepKey) {
1342
1854
  if (Array.isArray(deepKey)) return deepKey.map(toKey);
1343
1855
  if (typeof deepKey === "symbol") return [deepKey];
@@ -1349,10 +1861,7 @@ function toPath(deepKey) {
1349
1861
  let key = "";
1350
1862
  let quoteChar = "";
1351
1863
  let bracket = false;
1352
- if (deepKey.charCodeAt(0) === 46) {
1353
- result.push("");
1354
- index++;
1355
- }
1864
+ if (deepKey.charCodeAt(0) === 46) result.push("");
1356
1865
  while (index < length) {
1357
1866
  const char = deepKey[index];
1358
1867
  if (quoteChar) if (char === "\\" && index + 1 < length) {
@@ -1377,6 +1886,8 @@ function toPath(deepKey) {
1377
1886
  result.push(key);
1378
1887
  key = "";
1379
1888
  }
1889
+ const next = deepKey[index + 1];
1890
+ if (next === void 0 || next === ".") result.push("");
1380
1891
  } else key += char;
1381
1892
  index++;
1382
1893
  }
@@ -1384,14 +1895,72 @@ function toPath(deepKey) {
1384
1895
  return result;
1385
1896
  }
1386
1897
  //#endregion
1387
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1898
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1899
+ /** Matches any deep property path. Examples: `a.b`, `a[0]`, `a["b"]` */
1900
+ var regexIsDeepProp$1 = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
1901
+ /**
1902
+ * Checks if a given key is a deep key.
1903
+ *
1904
+ * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
1905
+ *
1906
+ * @param {PropertyKey} key - The key to check.
1907
+ * @returns {boolean} - Returns true if the key is a deep key, otherwise false.
1908
+ *
1909
+ * Examples:
1910
+ *
1911
+ * isDeepKey('a.b') // true
1912
+ * isDeepKey('a[b]') // true
1913
+ * isDeepKey('a') // false
1914
+ * isDeepKey(123) // false
1915
+ * isDeepKey('a.b.c') // true
1916
+ * isDeepKey('a[b][c]') // true
1917
+ * isDeepKey('a.') // false
1918
+ * isDeepKey('.a') // false
1919
+ * isDeepKey('a[b') // false
1920
+ * isDeepKey('a]b]') // false
1921
+ * isDeepKey('a][b') // false
1922
+ * isDeepKey('') // false
1923
+ * isDeepKey('a[0]') // true
1924
+ *
1925
+ */
1926
+ function isDeepKey(key) {
1927
+ switch (typeof key) {
1928
+ case "number":
1929
+ case "symbol": return false;
1930
+ case "string":
1931
+ if (key === "" || key.startsWith(".") || key.endsWith(".")) return false;
1932
+ return regexIsDeepProp$1.test(key);
1933
+ default: return false;
1934
+ }
1935
+ }
1936
+ //#endregion
1937
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1938
+ /**
1939
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
1940
+ *
1941
+ * @param object - The object to query.
1942
+ * @param path - The path of the property to get.
1943
+ * @param [defaultValue] - The value returned if the resolved value is undefined.
1944
+ * @returns Returns the resolved value.
1945
+ *
1946
+ * @example
1947
+ * const object = { a: { b: { c: 1 } } };
1948
+ * get(object, 'a.b.c');
1949
+ * // => 1
1950
+ *
1951
+ * get(object, ['a', 'b', 'c']);
1952
+ * // => 1
1953
+ *
1954
+ * get(object, 'a.b.d', 'default');
1955
+ * // => 'default'
1956
+ */
1388
1957
  function get$1(object, path, defaultValue) {
1389
1958
  if (object == null) return defaultValue;
1390
1959
  switch (typeof path) {
1391
1960
  case "string": {
1392
1961
  if (isUnsafeProperty(path)) return defaultValue;
1393
1962
  const result = object[path];
1394
- if (result === void 0) if (isDeepKey(path)) return get$1(object, toPath(path), defaultValue);
1963
+ if (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get$1(object, toPath(path), defaultValue);
1395
1964
  else return defaultValue;
1396
1965
  return result;
1397
1966
  }
@@ -1425,38 +1994,151 @@ function getWithPath(object, path, defaultValue) {
1425
1994
  return current;
1426
1995
  }
1427
1996
  //#endregion
1428
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/property.mjs
1997
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/property.mjs
1998
+ /**
1999
+ * Creates a function that returns the value at a given path of an object.
2000
+ *
2001
+ * @template T - The type of object.
2002
+ * @template R - The type of the value to return.
2003
+ * @param path - The path of the property to get.
2004
+ * @returns Returns a new function that takes an object and returns the value at the specified path.
2005
+ *
2006
+ * @example
2007
+ * const getObjectValue = property('a.b.c');
2008
+ * const result = getObjectValue({ a: { b: { c: 3 } } });
2009
+ * console.log(result); // => 3
2010
+ *
2011
+ * @example
2012
+ * const getObjectValue = property(['a', 'b', 'c']);
2013
+ * const result = getObjectValue({ a: { b: { c: 3 } } });
2014
+ * console.log(result); // => 3
2015
+ */
1429
2016
  function property(path) {
1430
2017
  return function(object) {
1431
2018
  return get$1(object, path);
1432
2019
  };
1433
2020
  }
1434
2021
  //#endregion
1435
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
2022
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
2023
+ /**
2024
+ * Checks if the given value is an object. An object is a value that is
2025
+ * not a primitive type (string, number, boolean, symbol, null, or undefined).
2026
+ *
2027
+ * This function tests whether the provided value is an object or not.
2028
+ * It returns `true` if the value is an object, and `false` otherwise.
2029
+ *
2030
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.
2031
+ *
2032
+ * @param value - The value to check if it is an object.
2033
+ * @returns `true` if the value is an object, `false` otherwise.
2034
+ *
2035
+ * @example
2036
+ * const value1 = {};
2037
+ * const value2 = [1, 2, 3];
2038
+ * const value3 = () => {};
2039
+ * const value4 = null;
2040
+ *
2041
+ * console.log(isObject(value1)); // true
2042
+ * console.log(isObject(value2)); // true
2043
+ * console.log(isObject(value3)); // true
2044
+ * console.log(isObject(value4)); // false
2045
+ */
1436
2046
  function isObject(value) {
1437
2047
  return value !== null && (typeof value === "object" || typeof value === "function");
1438
2048
  }
1439
2049
  //#endregion
1440
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs
2050
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs
2051
+ /**
2052
+ * Performs a deep comparison between a target value and a source pattern to determine if they match,
2053
+ * using a custom comparison function for fine-grained control over the matching logic.
2054
+ *
2055
+ * This function recursively traverses both values, calling the custom compare function for each
2056
+ * property/element pair. If the compare function returns a boolean, that result is used directly.
2057
+ * If it returns undefined, the default matching behavior continues recursively.
2058
+ *
2059
+ * The matching behavior varies by data type:
2060
+ * - **Objects**: Matches if all properties in the source exist in the target and match
2061
+ * - **Arrays**: Matches if all elements in the source array can be found in the target array (order-independent)
2062
+ * - **Maps**: Matches if all key-value pairs in the source Map exist and match in the target Map
2063
+ * - **Sets**: Matches if all elements in the source Set can be found in the target Set
2064
+ * - **Functions**: Matches using strict equality, or object comparison if the function has properties
2065
+ * - **Primitives**: Matches using strict equality
2066
+ *
2067
+ * Special cases:
2068
+ * - Empty objects, arrays, Maps, and Sets always match any target
2069
+ * - `null` and `undefined` source values have specific matching rules
2070
+ * - Circular references are handled using an internal stack to prevent infinite recursion
2071
+ *
2072
+ * @param target - The value to be tested for matching
2073
+ * @param source - The pattern/template to match against
2074
+ * @param [compare] - Optional custom comparison function that receives:
2075
+ * - `objValue` - The value from the target at the current path
2076
+ * - `srcValue` - The value from the source at the current path
2077
+ * - `key` - The property key or array index being compared
2078
+ * - `object` - The parent object/array from the target
2079
+ * - `source` - The parent object/array from the source
2080
+ * - `stack` - Internal Map used for circular reference detection
2081
+ * Should return `true` for a match, `false` for no match, or `undefined` to continue with default behavior
2082
+ *
2083
+ * @returns `true` if the target matches the source pattern, `false` otherwise
2084
+ *
2085
+ * @example
2086
+ * // Basic matching without custom comparator
2087
+ * isMatchWith({ a: 1, b: 2 }, { a: 1 }); // true
2088
+ * isMatchWith([1, 2, 3], [1, 3]); // true
2089
+ *
2090
+ * @example
2091
+ * // Custom comparison for case-insensitive string matching
2092
+ * const caseInsensitiveCompare = (objVal, srcVal) => {
2093
+ * if (typeof objVal === 'string' && typeof srcVal === 'string') {
2094
+ * return objVal.toLowerCase() === srcVal.toLowerCase();
2095
+ * }
2096
+ * return undefined; // Use default behavior for non-strings
2097
+ * };
2098
+ *
2099
+ * isMatchWith(
2100
+ * { name: 'JOHN', age: 30 },
2101
+ * { name: 'john' },
2102
+ * caseInsensitiveCompare
2103
+ * ); // true
2104
+ *
2105
+ * @example
2106
+ * // Custom comparison for range matching
2107
+ * const rangeCompare = (objVal, srcVal, key) => {
2108
+ * if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {
2109
+ * return objVal >= srcVal.min && objVal <= srcVal.max;
2110
+ * }
2111
+ * return undefined;
2112
+ * };
2113
+ *
2114
+ * isMatchWith(
2115
+ * { name: 'John', age: 25 },
2116
+ * { age: { min: 18, max: 30 } },
2117
+ * rangeCompare
2118
+ * ); // true
2119
+ */
1441
2120
  function isMatchWith(target, source, compare) {
1442
2121
  if (typeof compare !== "function") return isMatchWith(target, source, () => void 0);
1443
2122
  return isMatchWithInternal(target, source, function doesMatch(objValue, srcValue, key, object, source, stack) {
1444
2123
  const isEqual = compare(objValue, srcValue, key, object, source, stack);
1445
2124
  if (isEqual !== void 0) return Boolean(isEqual);
1446
- return isMatchWithInternal(objValue, srcValue, doesMatch, stack);
1447
- }, /* @__PURE__ */ new Map());
2125
+ return isMatchWithInternal(objValue, srcValue, doesMatch, stack, false);
2126
+ }, /* @__PURE__ */ new Map(), true);
1448
2127
  }
1449
- function isMatchWithInternal(target, source, compare, stack) {
2128
+ function isMatchWithInternal(target, source, compare, stack, isRoot = false) {
1450
2129
  if (source === target) return true;
1451
2130
  switch (typeof source) {
1452
2131
  case "object": return isObjectMatch(target, source, compare, stack);
1453
2132
  case "function":
1454
- if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack);
1455
- return isEqualsSameValueZero(target, source);
2133
+ if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack, isRoot);
2134
+ return eq(target, source);
1456
2135
  default:
1457
- if (!isObject(target)) return isEqualsSameValueZero(target, source);
1458
- if (typeof source === "string") return source === "";
1459
- return true;
2136
+ if (!isObject(target)) return eq(target, source);
2137
+ if (isRoot) {
2138
+ if (typeof source === "string") return source === "";
2139
+ return true;
2140
+ }
2141
+ return eq(target, source);
1460
2142
  }
1461
2143
  }
1462
2144
  function isObjectMatch(target, source, compare, stack) {
@@ -1516,12 +2198,66 @@ function isSetMatch(target, source, compare, stack) {
1516
2198
  return isArrayMatch([...target], [...source], compare, stack);
1517
2199
  }
1518
2200
  //#endregion
1519
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs
2201
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs
2202
+ /**
2203
+ * Checks if the target matches the source by comparing their structures and values.
2204
+ * This function supports deep comparison for objects, arrays, maps, and sets.
2205
+ *
2206
+ * @param target - The target value to match against.
2207
+ * @param source - The source value to match with.
2208
+ * @returns Returns `true` if the target matches the source, otherwise `false`.
2209
+ *
2210
+ * @example
2211
+ * // Basic usage
2212
+ * isMatch({ a: 1, b: 2 }, { a: 1 }); // true
2213
+ *
2214
+ * @example
2215
+ * // Matching arrays
2216
+ * isMatch([1, 2, 3], [1, 2, 3]); // true
2217
+ *
2218
+ * @example
2219
+ * // Matching maps
2220
+ * const targetMap = new Map([['key1', 'value1'], ['key2', 'value2']]);
2221
+ * const sourceMap = new Map([['key1', 'value1']]);
2222
+ * isMatch(targetMap, sourceMap); // true
2223
+ *
2224
+ * @example
2225
+ * // Matching sets
2226
+ * const targetSet = new Set([1, 2, 3]);
2227
+ * const sourceSet = new Set([1, 2]);
2228
+ * isMatch(targetSet, sourceSet); // true
2229
+ */
1520
2230
  function isMatch(target, source) {
1521
2231
  return isMatchWith(target, source, () => void 0);
1522
2232
  }
1523
2233
  //#endregion
1524
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/matches.mjs
2234
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/matches.mjs
2235
+ /**
2236
+ * Creates a function that performs a deep comparison between a given target and the source object.
2237
+ *
2238
+ * @template T
2239
+ * @template V
2240
+ * @param source - The source object to create the matcher from.
2241
+ * @returns Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.
2242
+ *
2243
+ * @example
2244
+ * // Basic usage
2245
+ * const matcher = matches({ a: 1, b: 2 });
2246
+ * matcher({ a: 1, b: 2, c: 3 }); // true
2247
+ * matcher({ a: 1, c: 3 }); // false
2248
+ *
2249
+ * @example
2250
+ * // Matching arrays
2251
+ * const arrayMatcher = matches([1, 2, 3]);
2252
+ * arrayMatcher([1, 2, 3, 4]); // true
2253
+ * arrayMatcher([4, 5, 6]); // false
2254
+ *
2255
+ * @example
2256
+ * // Matching objects with nested structures
2257
+ * const nestedMatcher = matches({ a: { b: 2 } });
2258
+ * nestedMatcher({ a: { b: 2, c: 3 } }); // true
2259
+ * nestedMatcher({ a: { c: 3 } }); // false
2260
+ */
1525
2261
  function matches(source) {
1526
2262
  source = cloneDeep$1(source);
1527
2263
  return (target) => {
@@ -1529,7 +2265,42 @@ function matches(source) {
1529
2265
  };
1530
2266
  }
1531
2267
  //#endregion
1532
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
2268
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
2269
+ /**
2270
+ * Creates a deep clone of the given object using a customizer function.
2271
+ *
2272
+ * @template T - The type of the object.
2273
+ * @param obj - The object to clone.
2274
+ * @param [cloneValue] - A function to customize the cloning process.
2275
+ * @returns A deep clone of the given object.
2276
+ *
2277
+ * @example
2278
+ * // Clone a primitive value
2279
+ * const num = 29;
2280
+ * const clonedNum = cloneDeepWith(num);
2281
+ * console.log(clonedNum); // 29
2282
+ * console.log(clonedNum === num); // true
2283
+ *
2284
+ * @example
2285
+ * // Clone an object with a customizer
2286
+ * const obj = { a: 1, b: 2 };
2287
+ * const clonedObj = cloneDeepWith(obj, (value) => {
2288
+ * if (typeof value === 'number') {
2289
+ * return value * 2; // Double the number
2290
+ * }
2291
+ * });
2292
+ * console.log(clonedObj); // { a: 2, b: 4 }
2293
+ * console.log(clonedObj === obj); // false
2294
+ *
2295
+ * @example
2296
+ * // Clone an array with a customizer
2297
+ * const arr = [1, 2, 3];
2298
+ * const clonedArr = cloneDeepWith(arr, (value) => {
2299
+ * return value + 1; // Increment each value
2300
+ * });
2301
+ * console.log(clonedArr); // [2, 3, 4]
2302
+ * console.log(clonedArr === arr); // false
2303
+ */
1533
2304
  function cloneDeepWith(obj, customizer) {
1534
2305
  return cloneDeepWith$1(obj, (value, key, object, stack) => {
1535
2306
  const cloned = customizer?.(value, key, object, stack);
@@ -1561,12 +2332,83 @@ function cloneDeepWith(obj, customizer) {
1561
2332
  });
1562
2333
  }
1563
2334
  //#endregion
1564
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
2335
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
2336
+ /**
2337
+ * Creates a deep clone of the given object.
2338
+ *
2339
+ * @template T - The type of the object.
2340
+ * @param obj - The object to clone.
2341
+ * @returns A deep clone of the given object.
2342
+ *
2343
+ * @example
2344
+ * // Clone a primitive value
2345
+ * const num = 29;
2346
+ * const clonedNum = clone(num);
2347
+ * console.log(clonedNum); // 29
2348
+ * console.log(clonedNum === num); // true
2349
+ *
2350
+ * @example
2351
+ * // Clone an array
2352
+ * const arr = [1, 2, 3];
2353
+ * const clonedArr = clone(arr);
2354
+ * console.log(clonedArr); // [1, 2, 3]
2355
+ * console.log(clonedArr === arr); // false
2356
+ *
2357
+ * @example
2358
+ * // Clone an array with nested objects
2359
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
2360
+ * const clonedArr = clone(arr);
2361
+ * arr[1].a = 2;
2362
+ * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]
2363
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
2364
+ * console.log(clonedArr === arr); // false
2365
+ *
2366
+ * @example
2367
+ * // Clone an object
2368
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
2369
+ * const clonedObj = clone(obj);
2370
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
2371
+ * console.log(clonedObj === obj); // false
2372
+ *
2373
+ * @example
2374
+ * // Clone an object with nested objects
2375
+ * const obj = { a: 1, b: { c: 1 } };
2376
+ * const clonedObj = clone(obj);
2377
+ * obj.b.c = 2;
2378
+ * console.log(obj); // { a: 1, b: { c: 2 } }
2379
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
2380
+ * console.log(clonedObj === obj); // false
2381
+ */
1565
2382
  function cloneDeep(obj) {
1566
2383
  return cloneDeepWith(obj);
1567
2384
  }
1568
2385
  //#endregion
1569
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
2386
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
2387
+ /**
2388
+ * Checks if the given value is an arguments object.
2389
+ *
2390
+ * This function tests whether the provided value is an arguments object or not.
2391
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
2392
+ *
2393
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
2394
+ *
2395
+ * @param value - The value to test if it is an arguments object.
2396
+ * @returns `true` if the value is an arguments, `false` otherwise.
2397
+ *
2398
+ * @example
2399
+ * const args = (function() { return arguments; })();
2400
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
2401
+ * const value = [1, 2, 3];
2402
+ *
2403
+ * console.log(isArguments(args)); // true
2404
+ * console.log(isArguments(strictArgs)); // true
2405
+ * console.log(isArguments(value)); // false
2406
+ */
2407
+ function isArguments(value) {
2408
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
2409
+ }
2410
+ //#endregion
2411
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
1570
2412
  var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1571
2413
  function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1572
2414
  switch (typeof value) {
@@ -1576,16 +2418,40 @@ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1576
2418
  }
1577
2419
  }
1578
2420
  //#endregion
1579
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1580
- function isArguments(value) {
1581
- return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1582
- }
1583
- //#endregion
1584
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/has.mjs
2421
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/has.mjs
2422
+ /**
2423
+ * Checks if a given path exists within an object.
2424
+ *
2425
+ * You can provide the path as a single property key, an array of property keys,
2426
+ * or a string representing a deep path.
2427
+ *
2428
+ * If the path is an index and the object is an array or an arguments object, the function will verify
2429
+ * if the index is valid and within the bounds of the array or arguments object, even if the array or
2430
+ * arguments object is sparse (i.e., not all indexes are defined).
2431
+ *
2432
+ * @param object - The object to query.
2433
+ * @param path - The path to check. This can be a single property key,
2434
+ * an array of property keys, or a string representing a deep path.
2435
+ * @returns Returns `true` if the path exists in the object, `false` otherwise.
2436
+ *
2437
+ * @example
2438
+ *
2439
+ * const obj = { a: { b: { c: 3 } } };
2440
+ *
2441
+ * has(obj, 'a'); // true
2442
+ * has(obj, ['a', 'b']); // true
2443
+ * has(obj, ['a', 'b', 'c']); // true
2444
+ * has(obj, 'a.b.c'); // true
2445
+ * has(obj, 'a.b.d'); // false
2446
+ * has(obj, ['a', 'b', 'c', 'd']); // false
2447
+ * has([], 0); // false
2448
+ * has([1, 2, 3], 2); // true
2449
+ * has([1, 2, 3], 5); // false
2450
+ */
1585
2451
  function has$1(object, path) {
1586
2452
  let resolvedPath;
1587
2453
  if (Array.isArray(path)) resolvedPath = path;
1588
- else if (typeof path === "string" && isDeepKey(path) && object?.[path] == null) resolvedPath = toPath(path);
2454
+ else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path);
1589
2455
  else resolvedPath = [path];
1590
2456
  if (resolvedPath.length === 0) return false;
1591
2457
  let current = object;
@@ -1599,7 +2465,32 @@ function has$1(object, path) {
1599
2465
  return true;
1600
2466
  }
1601
2467
  //#endregion
1602
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs
2468
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs
2469
+ /**
2470
+ * Creates a function that checks if a given target object matches a specific property value.
2471
+ *
2472
+ * The returned function takes a target object and determines if the property at the
2473
+ * specified path within the target object is equal to the given value.
2474
+ *
2475
+ * @param property - The property path to check within the target object.
2476
+ * This can be a single property key or an array of property keys.
2477
+ * @param source - The value to compare against the property value in the target object.
2478
+ *
2479
+ * @returns A function that takes a target object and returns
2480
+ * `true` if the property value at the given path in the target object matches the provided value,
2481
+ * otherwise returns `false`.
2482
+ *
2483
+ * @example
2484
+ * // Using a single property key
2485
+ * const checkName = matchesProperty('name', 'Alice');
2486
+ * console.log(checkName({ name: 'Alice' })); // true
2487
+ * console.log(checkName({ name: 'Bob' })); // false
2488
+ *
2489
+ * // Using an array of property keys
2490
+ * const checkNested = matchesProperty(['address', 'city'], 'New York');
2491
+ * console.log(checkNested({ address: { city: 'New York' } })); // true
2492
+ * console.log(checkNested({ address: { city: 'Los Angeles' } })); // false
2493
+ */
1603
2494
  function matchesProperty(property, source) {
1604
2495
  switch (typeof property) {
1605
2496
  case "object":
@@ -1618,7 +2509,37 @@ function matchesProperty(property, source) {
1618
2509
  };
1619
2510
  }
1620
2511
  //#endregion
1621
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/iteratee.mjs
2512
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/iteratee.mjs
2513
+ /**
2514
+ * Creates a function that returns a value from an element in a collection.
2515
+ *
2516
+ * You can call `iteratee` with the following types of arguments:
2517
+ *
2518
+ * - **Function**: Returns the function as-is, which will be called with the element from the collection.
2519
+ * - **Property name**: Returns the value of the specified property from the element.
2520
+ * - **Property-value pair**: Returns a boolean indicating whether the element's property matches the given value.
2521
+ * - **Partial object**: Returns a boolean indicating whether the element matches the properties of the partial object.
2522
+ *
2523
+ * If you don't provide any arguments or pass `null`, this function will return a function that simply returns its input unchanged.
2524
+ *
2525
+ * @param value - The value to convert to an iteratee.
2526
+ * @returns Returns the new iteratee function.
2527
+ * @example
2528
+ * const func = iteratee();
2529
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [{ a: 1 }, { a: 2 }, { a: 3 }]
2530
+ *
2531
+ * const func = iteratee((object) => object.a);
2532
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
2533
+ *
2534
+ * const func = iteratee('a');
2535
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
2536
+ *
2537
+ * const func = iteratee({ a: 1 });
2538
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
2539
+ *
2540
+ * const func = iteratee(['a', 1]);
2541
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
2542
+ */
1622
2543
  function iteratee(value) {
1623
2544
  if (value == null) return identity$1;
1624
2545
  switch (typeof value) {
@@ -1632,28 +2553,109 @@ function iteratee(value) {
1632
2553
  }
1633
2554
  }
1634
2555
  //#endregion
1635
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/array/groupBy.mjs
1636
- function groupBy(source, _getKeyFromItem) {
2556
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
2557
+ /**
2558
+ * Check whether a value is a symbol.
2559
+ *
2560
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
2561
+ *
2562
+ * @param value The value to check.
2563
+ * @returns Returns `true` if `value` is a symbol, else `false`.
2564
+ * @example
2565
+ * isSymbol(Symbol.iterator);
2566
+ * // => true
2567
+ *
2568
+ * isSymbol('abc');
2569
+ * // => false
2570
+ */
2571
+ function isSymbol(value) {
2572
+ return typeof value === "symbol" || value instanceof Symbol;
2573
+ }
2574
+ //#endregion
2575
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/array/groupBy.mjs
2576
+ /**
2577
+ * Groups the elements of an array or object based on a provided key-generating function.
2578
+ *
2579
+ * This function takes an array or object and a function that generates a key from each element or value.
2580
+ * It returns an object where the keys are the generated keys and the values are arrays of elements that
2581
+ * share the same key.
2582
+ *
2583
+ * @template T - The type of elements in the array or values in the object.
2584
+ * @template K - The type of keys.
2585
+ * @param source - The collection to group.
2586
+ * @param [_getKeyFromItem=identity] - The iteratee to transform keys.
2587
+ * - If a function is provided, it's invoked for each element in the collection.
2588
+ * - If a property name (string) is provided, that property of each element is used as the key.
2589
+ * - If a property-value pair (array) is provided, elements with matching property values are used.
2590
+ * - If a partial object is provided, elements with matching properties are used.
2591
+ * @returns An object where each key is associated with an array of elements that
2592
+ * share that key.
2593
+ *
2594
+ * @example
2595
+ * // Using an array
2596
+ * const array = [6.1, 4.2, 6.3];
2597
+ * const result = groupBy(array, Math.floor);
2598
+ * // => { 4: [4.2], 6: [6.1, 6.3] }
2599
+ *
2600
+ * @example
2601
+ * // Using a property name
2602
+ * const array = ['one', 'two', 'three'];
2603
+ * const result = groupBy(array, 'length');
2604
+ * // => { 3: ['one', 'two'], 5: ['three'] }
2605
+ */
2606
+ function groupBy(source, _getKeyFromItem = identity$1) {
1637
2607
  if (source == null) return {};
1638
- return groupBy$1(isArrayLike(source) ? Array.from(source) : Object.values(source), iteratee(_getKeyFromItem ?? identity$1));
2608
+ return groupBy$1(isArrayLike(source) ? toArray(source) : Object.values(source), iteratee(_getKeyFromItem));
1639
2609
  }
1640
2610
  //#endregion
1641
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
2611
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
2612
+ /** Matches any deep property path. (e.g. `a.b[0].c`)*/
1642
2613
  var regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
2614
+ /** Matches any word character (alphanumeric & underscore).*/
1643
2615
  var regexIsPlainProp = /^\w*$/;
2616
+ /**
2617
+ * Checks if `value` is a property name and not a property path. (It's ok that the `value` is not in the keys of the `object`)
2618
+ * @param {unknown} value The value to check.
2619
+ * @param {unknown} object The object to query.
2620
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2621
+ *
2622
+ * @example
2623
+ * isKey('a', { a: 1 });
2624
+ * // => true
2625
+ *
2626
+ * isKey('a.b', { a: { b: 2 } });
2627
+ * // => false
2628
+ */
1644
2629
  function isKey(value, object) {
1645
2630
  if (Array.isArray(value)) return false;
1646
2631
  if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) return true;
1647
2632
  return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
1648
2633
  }
1649
2634
  //#endregion
1650
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
2635
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
1651
2636
  var assignValue = (object, key, value) => {
1652
2637
  const objValue = object[key];
1653
- if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
2638
+ if (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
1654
2639
  };
1655
2640
  //#endregion
1656
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
2641
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
2642
+ /**
2643
+ * Updates the value at the specified path of the given object using an updater function and a customizer.
2644
+ * If any part of the path does not exist, it will be created.
2645
+ *
2646
+ * @template T - The type of the object.
2647
+ * @template R - The type of the return value.
2648
+ * @param obj - The object to modify.
2649
+ * @param path - The path of the property to update.
2650
+ * @param updater - The function to produce the updated value.
2651
+ * @param customizer - The function to customize the update process.
2652
+ * @returns The modified object.
2653
+ *
2654
+ * @example
2655
+ * const object = { 'a': [{ 'b': { 'c': 3 } }] };
2656
+ * updateWith(object, 'a[0].b.c', (n) => n * n);
2657
+ * // => { 'a': [{ 'b': { 'c': 9 } }] }
2658
+ */
1657
2659
  function updateWith(obj, path, updater, customizer) {
1658
2660
  if (obj == null && !isObject(obj)) return obj;
1659
2661
  let resolvedPath;
@@ -1678,12 +2680,50 @@ function updateWith(obj, path, updater, customizer) {
1678
2680
  return obj;
1679
2681
  }
1680
2682
  //#endregion
1681
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/set.mjs
2683
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/set.mjs
2684
+ /**
2685
+ * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
2686
+ *
2687
+ * @template T - The type of the object.
2688
+ * @param obj - The object to modify.
2689
+ * @param path - The path of the property to set.
2690
+ * @param value - The value to set.
2691
+ * @returns The modified object.
2692
+ *
2693
+ * @example
2694
+ * // Set a value in a nested object
2695
+ * const obj = { a: { b: { c: 3 } } };
2696
+ * set(obj, 'a.b.c', 4);
2697
+ * console.log(obj.a.b.c); // 4
2698
+ *
2699
+ * @example
2700
+ * // Set a value in an array
2701
+ * const arr = [1, 2, 3];
2702
+ * set(arr, 1, 4);
2703
+ * console.log(arr[1]); // 4
2704
+ *
2705
+ * @example
2706
+ * // Create non-existent path and set value
2707
+ * const obj = {};
2708
+ * set(obj, 'a.b.c', 4);
2709
+ * console.log(obj); // { a: { b: { c: 4 } } }
2710
+ */
1682
2711
  function set$1(obj, path, value) {
1683
2712
  return updateWith(obj, path, () => value, () => void 0);
1684
2713
  }
1685
2714
  //#endregion
1686
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
2715
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
2716
+ /**
2717
+ * Converts the first character of string to upper case and the remaining to lower case.
2718
+ *
2719
+ * @param string - The string to capitalize.
2720
+ * @returns The capitalized string.
2721
+ *
2722
+ * @example
2723
+ * const convertedStr1 = capitalize('fred') // returns 'Fred'
2724
+ * const convertedStr2 = capitalize('FRED') // returns 'Fred'
2725
+ * const convertedStr3 = capitalize('') // returns ''
2726
+ */
1687
2727
  function capitalize(str) {
1688
2728
  return capitalize$1(toString$1(str));
1689
2729
  }
@@ -1908,7 +2948,7 @@ function walkNode$1(schema, data, path, visitors, entityCtx) {
1908
2948
  walkNode$1(children.right, data, path, visitors, entityCtx);
1909
2949
  break;
1910
2950
  }
1911
- for (let i = cleanups.length - 1; i >= 0; i--) cleanups[i]();
2951
+ for (const cleanup of cleanups.toReversed()) cleanup();
1912
2952
  if (entityRestore) entityRestore();
1913
2953
  }
1914
2954
  //#endregion
@@ -2182,7 +3222,9 @@ function resolveZodRefPayloadNames(payload, { skipReferenceNameResolution = fals
2182
3222
  return entity.name;
2183
3223
  }
2184
3224
  for (const id of orderedEntities) {
2185
- const { nameResolver, ...rest } = entitiesById[id];
3225
+ const entity = entitiesById[id];
3226
+ if (!entity) throw new Error(`Could not find entity for id: ${id}`);
3227
+ const { nameResolver, ...rest } = entity;
2186
3228
  if (typeof nameResolver === "string") resolvedEntitiesById.set(rest.id, {
2187
3229
  ...rest,
2188
3230
  name: nameResolver
@@ -2250,7 +3292,7 @@ function resolveReferencesToIds(payload) {
2250
3292
  if (typeof data !== "object" || data === null) throw new TypeError("Data is not an object");
2251
3293
  const entitiesById = groupBy$1(entities, (entity) => entity.id);
2252
3294
  const duplicateEntityIds = Object.values(entitiesById).filter((e) => e.length > 1);
2253
- if (duplicateEntityIds.length > 0) throw new Error(`Found multiple duplicate entity IDs: ${duplicateEntityIds.map((ents) => `${ents[0].id} (${ents.map((e) => e.path.join(".")).join(",")})`).join(", ")}`);
3295
+ if (duplicateEntityIds.length > 0) throw new Error(`Found multiple duplicate entity IDs: ${duplicateEntityIds.map((ents) => `${ents[0]?.id} (${ents.map((e) => e.path.join(".")).join(",")})`).join(", ")}`);
2254
3296
  if (uniq(entities.map((e) => e.id)).length !== entities.length) throw new Error(`Found duplicate entity IDs`);
2255
3297
  const entityTypes = uniq(entities.map((e) => e.type));
2256
3298
  const entityTypeNames = uniq(entityTypes.map((t) => t.name));
@@ -2467,7 +3509,7 @@ function fixDefinitionRefs(schema, value, options) {
2467
3509
  return fixRefDeletions(schema, modified ? renamedValue : newRefPayload.data);
2468
3510
  }
2469
3511
  //#endregion
2470
- //#region ../../node_modules/.pnpm/immer@11.1.4/node_modules/immer/dist/immer.mjs
3512
+ //#region ../../node_modules/.pnpm/immer@11.1.15/node_modules/immer/dist/immer.mjs
2471
3513
  var NOTHING = Symbol.for("immer-nothing");
2472
3514
  var DRAFTABLE = Symbol.for("immer-draftable");
2473
3515
  var DRAFT_STATE = Symbol.for("immer-state");
@@ -2787,7 +3829,7 @@ var objectTraps = {
2787
3829
  const value = source[prop];
2788
3830
  if (state.finalized_ || !isDraftable(value)) return value;
2789
3831
  if (isArrayWithStringProp && state.operationMethod && arrayPlugin?.isMutatingArrayMethod(state.operationMethod) && isArrayIndex(prop)) return value;
2790
- if (value === peek(state.base_, prop)) {
3832
+ if (value === peek(state.base_, prop) || isRelocatedBaseRef(state, prop, value)) {
2791
3833
  prepareCopy(state);
2792
3834
  const childKey = state.type_ === 1 ? +prop : prop;
2793
3835
  const childDraft = createProxy(state.scope_, value, state, childKey);
@@ -2819,7 +3861,7 @@ var objectTraps = {
2819
3861
  prepareCopy(state);
2820
3862
  markChanged(state);
2821
3863
  }
2822
- if (state.copy_[prop] === value && (value !== void 0 || prop in state.copy_) || Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
3864
+ if (state.copy_[prop] === value && (value !== void 0 || has(state.copy_, prop, state.type_)) || Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
2823
3865
  state.copy_[prop] = value;
2824
3866
  state.assigned_.set(prop, true);
2825
3867
  handleCrossReference(state, prop, value);
@@ -2874,6 +3916,10 @@ function peek(draft, prop) {
2874
3916
  const state = draft[DRAFT_STATE];
2875
3917
  return (state ? latest(state) : draft)[prop];
2876
3918
  }
3919
+ function isRelocatedBaseRef(state, prop, value) {
3920
+ if (state.type_ !== 1 || !state.allIndicesReassigned_ || state.assigned_?.get(prop) || !isDraftable(value) || value[DRAFT_STATE]) return false;
3921
+ return state.baseRefs_.has(value);
3922
+ }
2877
3923
  function readPropFromProto(state, source, prop) {
2878
3924
  const desc = getDescriptorFromProto(source, prop);
2879
3925
  return desc ? VALUE in desc ? desc[VALUE] : desc.get?.call(state.draft_) : void 0;
@@ -3300,7 +4346,7 @@ var createModelAuthorizerSchema = definitionSchemaWithSlots({ modelSlot: modelEn
3300
4346
  */
3301
4347
  roles: __mf_0.array(createAuthorizerRoleSchema(ctx, { modelSlot })).default([]) }));
3302
4348
  //#endregion
3303
- //#region ../../node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
4349
+ //#region ../../node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.mjs
3304
4350
  var astralIdentifierCodes = [
3305
4351
  509,
3306
4352
  0,
@@ -3332,8 +4378,8 @@ var astralIdentifierCodes = [
3332
4378
  4,
3333
4379
  318,
3334
4380
  1,
3335
- 80,
3336
- 3,
4381
+ 78,
4382
+ 5,
3337
4383
  71,
3338
4384
  10,
3339
4385
  50,
@@ -3478,7 +4524,9 @@ var astralIdentifierCodes = [
3478
4524
  10,
3479
4525
  47,
3480
4526
  15,
3481
- 343,
4527
+ 199,
4528
+ 7,
4529
+ 137,
3482
4530
  9,
3483
4531
  54,
3484
4532
  7,
@@ -3510,7 +4558,9 @@ var astralIdentifierCodes = [
3510
4558
  4,
3511
4559
  9,
3512
4560
  9,
3513
- 330,
4561
+ 55,
4562
+ 9,
4563
+ 266,
3514
4564
  3,
3515
4565
  10,
3516
4566
  1,
@@ -3610,7 +4660,15 @@ var astralIdentifierCodes = [
3610
4660
  1,
3611
4661
  2,
3612
4662
  9,
3613
- 726,
4663
+ 233,
4664
+ 0,
4665
+ 3,
4666
+ 0,
4667
+ 8,
4668
+ 1,
4669
+ 6,
4670
+ 0,
4671
+ 475,
3614
4672
  6,
3615
4673
  110,
3616
4674
  6,
@@ -3720,7 +4778,9 @@ var astralIdentifierStartCodes = [
3720
4778
  21,
3721
4779
  11,
3722
4780
  25,
3723
- 71,
4781
+ 7,
4782
+ 25,
4783
+ 39,
3724
4784
  55,
3725
4785
  7,
3726
4786
  1,
@@ -3765,8 +4825,8 @@ var astralIdentifierStartCodes = [
3765
4825
  7,
3766
4826
  1,
3767
4827
  17,
3768
- 2,
3769
- 60,
4828
+ 5,
4829
+ 57,
3770
4830
  28,
3771
4831
  11,
3772
4832
  0,
@@ -3950,7 +5010,9 @@ var astralIdentifierStartCodes = [
3950
5010
  31,
3951
5011
  15,
3952
5012
  0,
3953
- 328,
5013
+ 24,
5014
+ 43,
5015
+ 261,
3954
5016
  18,
3955
5017
  16,
3956
5018
  0,
@@ -3998,7 +5060,11 @@ var astralIdentifierStartCodes = [
3998
5060
  44,
3999
5061
  212,
4000
5062
  63,
4001
- 129,
5063
+ 33,
5064
+ 24,
5065
+ 3,
5066
+ 24,
5067
+ 45,
4002
5068
  74,
4003
5069
  6,
4004
5070
  0,
@@ -4008,13 +5074,15 @@ var astralIdentifierStartCodes = [
4008
5074
  1,
4009
5075
  2,
4010
5076
  0,
4011
- 29,
4012
- 6135,
4013
- 9,
4014
- 1237,
5077
+ 15,
5078
+ 4,
5079
+ 10,
5080
+ 7381,
4015
5081
  42,
4016
- 9,
4017
- 8936,
5082
+ 31,
5083
+ 98,
5084
+ 114,
5085
+ 8702,
4018
5086
  3,
4019
5087
  2,
4020
5088
  6,
@@ -4122,7 +5190,19 @@ var astralIdentifierStartCodes = [
4122
5190
  29,
4123
5191
  3,
4124
5192
  0,
4125
- 496,
5193
+ 208,
5194
+ 30,
5195
+ 2,
5196
+ 2,
5197
+ 2,
5198
+ 1,
5199
+ 2,
5200
+ 6,
5201
+ 3,
5202
+ 4,
5203
+ 10,
5204
+ 1,
5205
+ 225,
4126
5206
  6,
4127
5207
  2,
4128
5208
  3,
@@ -4205,12 +5285,10 @@ var astralIdentifierStartCodes = [
4205
5285
  4421,
4206
5286
  42719,
4207
5287
  33,
4208
- 4153,
4209
- 7,
4210
- 221,
5288
+ 4381,
5289
+ 3,
5290
+ 5773,
4211
5291
  3,
4212
- 5761,
4213
- 15,
4214
5292
  7472,
4215
5293
  16,
4216
5294
  621,
@@ -4219,10 +5297,10 @@ var astralIdentifierStartCodes = [
4219
5297
  1507,
4220
5298
  4938,
4221
5299
  6,
4222
- 4191
5300
+ 8489
4223
5301
  ];
4224
- var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
4225
- var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
5302
+ var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
5303
+ var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
4226
5304
  var reservedWords = {
4227
5305
  3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
4228
5306
  5: "class enum extends super const export import",
@@ -4487,6 +5565,7 @@ function getLineInfo(input, offset) {
4487
5565
  var defaultOptions = {
4488
5566
  ecmaVersion: null,
4489
5567
  sourceType: "script",
5568
+ strict: false,
4490
5569
  onInsertedSemicolon: null,
4491
5570
  onTrailingComma: null,
4492
5571
  allowReserved: null,
@@ -4497,6 +5576,7 @@ var defaultOptions = {
4497
5576
  allowHashBang: false,
4498
5577
  checkPrivateFields: true,
4499
5578
  locations: false,
5579
+ startLocation: null,
4500
5580
  onToken: null,
4501
5581
  onComment: null,
4502
5582
  ranges: false,
@@ -4526,6 +5606,7 @@ function getOptions(opts) {
4526
5606
  };
4527
5607
  }
4528
5608
  if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
5609
+ if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
4529
5610
  return options;
4530
5611
  }
4531
5612
  function pushComment(options, array) {
@@ -4551,6 +5632,7 @@ var SCOPE_SUPER = 64;
4551
5632
  var SCOPE_DIRECT_SUPER = 128;
4552
5633
  var SCOPE_CLASS_STATIC_BLOCK = 256;
4553
5634
  var SCOPE_CLASS_FIELD_INIT = 512;
5635
+ var SCOPE_SWITCH = 1024;
4554
5636
  var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
4555
5637
  function functionFlags(async, generator) {
4556
5638
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
@@ -4576,14 +5658,15 @@ var Parser = function Parser(options, input, startPos) {
4576
5658
  this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
4577
5659
  this.input = String(input);
4578
5660
  this.containsEsc = false;
4579
- if (startPos) {
4580
- this.pos = startPos;
5661
+ this.pos = startPos || 0;
5662
+ this.curLine = 1;
5663
+ if (options.startLocation) {
5664
+ this.lineStart = this.pos - options.startLocation.column;
5665
+ this.curLine = options.startLocation.line;
5666
+ } else if (startPos) {
4581
5667
  this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
4582
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
4583
- } else {
4584
- this.pos = this.lineStart = 0;
4585
- this.curLine = 1;
4586
- }
5668
+ if (this.options.locations) this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
5669
+ } else this.lineStart = 0;
4587
5670
  this.type = types$1.eof;
4588
5671
  this.value = null;
4589
5672
  this.start = this.end = this.pos;
@@ -4593,7 +5676,7 @@ var Parser = function Parser(options, input, startPos) {
4593
5676
  this.context = this.initialContext();
4594
5677
  this.exprAllowed = true;
4595
5678
  this.inModule = options.sourceType === "module";
4596
- this.strict = this.inModule || this.strictDirective(this.pos);
5679
+ this.strict = this.inModule || options.strict === true || this.strictDirective(this.pos);
4597
5680
  this.potentialArrowAt = -1;
4598
5681
  this.potentialArrowInForAwait = false;
4599
5682
  this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
@@ -4601,7 +5684,7 @@ var Parser = function Parser(options, input, startPos) {
4601
5684
  this.undefinedExports = Object.create(null);
4602
5685
  if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
4603
5686
  this.scopeStack = [];
4604
- this.enterScope(SCOPE_TOP);
5687
+ this.enterScope(this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP);
4605
5688
  this.regexpState = null;
4606
5689
  this.privateNameStack = [];
4607
5690
  };
@@ -4610,16 +5693,21 @@ var prototypeAccessors = {
4610
5693
  inGenerator: { configurable: true },
4611
5694
  inAsync: { configurable: true },
4612
5695
  canAwait: { configurable: true },
5696
+ allowReturn: { configurable: true },
4613
5697
  allowSuper: { configurable: true },
4614
5698
  allowDirectSuper: { configurable: true },
4615
5699
  treatFunctionsAsVar: { configurable: true },
4616
5700
  allowNewDotTarget: { configurable: true },
5701
+ allowUsing: { configurable: true },
4617
5702
  inClassStaticBlock: { configurable: true }
4618
5703
  };
4619
5704
  Parser.prototype.parse = function parse() {
5705
+ var this$1$1 = this;
4620
5706
  var node = this.options.program || this.startNode();
4621
5707
  this.nextToken();
4622
- return this.parseTopLevel(node);
5708
+ return this.catchStackOverflow(function() {
5709
+ return this$1$1.parseTopLevel(node);
5710
+ });
4623
5711
  };
4624
5712
  prototypeAccessors.inFunction.get = function() {
4625
5713
  return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
@@ -4638,6 +5726,11 @@ prototypeAccessors.canAwait.get = function() {
4638
5726
  }
4639
5727
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
4640
5728
  };
5729
+ prototypeAccessors.allowReturn.get = function() {
5730
+ if (this.inFunction) return true;
5731
+ if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP) return true;
5732
+ return false;
5733
+ };
4641
5734
  prototypeAccessors.allowSuper.get = function() {
4642
5735
  return (this.currentThisScope().flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
4643
5736
  };
@@ -4654,6 +5747,12 @@ prototypeAccessors.allowNewDotTarget.get = function() {
4654
5747
  }
4655
5748
  return false;
4656
5749
  };
5750
+ prototypeAccessors.allowUsing.get = function() {
5751
+ var flags = this.currentScope().flags;
5752
+ if (flags & SCOPE_SWITCH) return false;
5753
+ if (!this.inModule && flags & SCOPE_TOP) return false;
5754
+ return true;
5755
+ };
4657
5756
  prototypeAccessors.inClassStaticBlock.get = function() {
4658
5757
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
4659
5758
  };
@@ -4711,6 +5810,14 @@ pp$9.eatContextual = function(name) {
4711
5810
  this.next();
4712
5811
  return true;
4713
5812
  };
5813
+ pp$9.catchStackOverflow = function(f) {
5814
+ try {
5815
+ return f();
5816
+ } catch (e) {
5817
+ if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) this.raise(this.start, "Not enough stack space to parse input");
5818
+ else throw e;
5819
+ }
5820
+ };
4714
5821
  pp$9.expectContextual = function(name) {
4715
5822
  if (!this.eatContextual(name)) this.unexpected();
4716
5823
  };
@@ -4766,10 +5873,10 @@ pp$9.isSimpleAssignTarget = function(expr) {
4766
5873
  };
4767
5874
  var pp$8 = Parser.prototype;
4768
5875
  pp$8.parseTopLevel = function(node) {
4769
- var exports = Object.create(null);
5876
+ var exports$1 = Object.create(null);
4770
5877
  if (!node.body) node.body = [];
4771
5878
  while (this.type !== types$1.eof) {
4772
- var stmt = this.parseStatement(null, true, exports);
5879
+ var stmt = this.parseStatement(null, true, exports$1);
4773
5880
  node.body.push(stmt);
4774
5881
  }
4775
5882
  if (this.inModule) for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) {
@@ -4778,7 +5885,7 @@ pp$8.parseTopLevel = function(node) {
4778
5885
  }
4779
5886
  this.adaptDirectivePrologue(node.body);
4780
5887
  this.next();
4781
- node.sourceType = this.options.sourceType;
5888
+ node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
4782
5889
  return this.finishNode(node, "Program");
4783
5890
  };
4784
5891
  var loopLabel = { kind: "loop" };
@@ -4787,15 +5894,17 @@ pp$8.isLet = function(context) {
4787
5894
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
4788
5895
  skipWhiteSpace.lastIndex = this.pos;
4789
5896
  var skip = skipWhiteSpace.exec(this.input);
4790
- var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
5897
+ var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
4791
5898
  if (nextCh === 91 || nextCh === 92) return true;
4792
5899
  if (context) return false;
4793
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) return true;
4794
- if (isIdentifierStart(nextCh, true)) {
4795
- var pos = next + 1;
4796
- while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) ++pos;
4797
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) return true;
4798
- var ident = this.input.slice(next, pos);
5900
+ if (nextCh === 123) return true;
5901
+ if (isIdentifierStart(nextCh)) {
5902
+ var start = next;
5903
+ do
5904
+ next += nextCh <= 65535 ? 1 : 2;
5905
+ while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
5906
+ if (nextCh === 92) return true;
5907
+ var ident = this.input.slice(start, next);
4799
5908
  if (!keywordRelationalOperator.test(ident)) return true;
4800
5909
  }
4801
5910
  return false;
@@ -4805,7 +5914,7 @@ pp$8.isAsyncFunction = function() {
4805
5914
  skipWhiteSpace.lastIndex = this.pos;
4806
5915
  var skip = skipWhiteSpace.exec(this.input);
4807
5916
  var next = this.pos + skip[0].length, after;
4808
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
5917
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
4809
5918
  };
4810
5919
  pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
4811
5920
  if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return false;
@@ -4814,20 +5923,29 @@ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
4814
5923
  var next = this.pos + skip[0].length;
4815
5924
  if (lineBreak.test(this.input.slice(this.pos, next))) return false;
4816
5925
  if (isAwaitUsing) {
4817
- var awaitEndPos = next + 5, after;
4818
- if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) return false;
4819
- skipWhiteSpace.lastIndex = awaitEndPos;
5926
+ var usingEndPos = next + 5, after;
5927
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) return false;
5928
+ skipWhiteSpace.lastIndex = usingEndPos;
4820
5929
  var skipAfterUsing = skipWhiteSpace.exec(this.input);
4821
- if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) return false;
4822
- }
4823
- if (isFor) {
4824
- var ofEndPos = next + 2, after$1;
4825
- if (this.input.slice(next, ofEndPos) === "of") {
4826
- if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) return false;
4827
- }
5930
+ next = usingEndPos + skipAfterUsing[0].length;
5931
+ if (skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return false;
5932
+ }
5933
+ var ch = this.fullCharCodeAt(next);
5934
+ if (!isIdentifierStart(ch) && ch !== 92) return false;
5935
+ var idStart = next;
5936
+ do
5937
+ next += ch <= 65535 ? 1 : 2;
5938
+ while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
5939
+ if (ch === 92) return true;
5940
+ var id = this.input.slice(idStart, next);
5941
+ if (keywordRelationalOperator.test(id)) return false;
5942
+ if (isFor && !isAwaitUsing && id === "of") {
5943
+ skipWhiteSpace.lastIndex = next;
5944
+ var skipAfterOf = skipWhiteSpace.exec(this.input);
5945
+ next = next + skipAfterOf[0].length;
5946
+ if (this.input.charCodeAt(next) !== 61 || (ch = this.input.charCodeAt(next + 1)) === 61 || ch === 62) return false;
4828
5947
  }
4829
- var ch = this.input.charCodeAt(next);
4830
- return isIdentifierStart(ch, true) || ch === 92;
5948
+ return true;
4831
5949
  };
4832
5950
  pp$8.isAwaitUsing = function(isFor) {
4833
5951
  return this.isUsingKeyword(true, isFor);
@@ -4835,7 +5953,7 @@ pp$8.isAwaitUsing = function(isFor) {
4835
5953
  pp$8.isUsing = function(isFor) {
4836
5954
  return this.isUsingKeyword(false, isFor);
4837
5955
  };
4838
- pp$8.parseStatement = function(context, topLevel, exports) {
5956
+ pp$8.parseStatement = function(context, topLevel, exports$1) {
4839
5957
  var starttype = this.type, node = this.startNode(), kind;
4840
5958
  if (this.isLet(context)) {
4841
5959
  starttype = types$1._var;
@@ -4879,7 +5997,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
4879
5997
  if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
4880
5998
  if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
4881
5999
  }
4882
- return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
6000
+ return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1);
4883
6001
  default:
4884
6002
  if (this.isAsyncFunction()) {
4885
6003
  if (context) this.unexpected();
@@ -4888,7 +6006,8 @@ pp$8.parseStatement = function(context, topLevel, exports) {
4888
6006
  }
4889
6007
  var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
4890
6008
  if (usingKind) {
4891
- if (topLevel && this.options.sourceType === "script") this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
6009
+ if (!this.allowUsing) this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
6010
+ if (context) this.raise(this.start, "Using declaration is not allowed in single-statement positions");
4892
6011
  if (usingKind === "await using") {
4893
6012
  if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
4894
6013
  this.next();
@@ -4962,7 +6081,10 @@ pp$8.parseForStatement = function(node) {
4962
6081
  if (usingKind) {
4963
6082
  var init$2 = this.startNode();
4964
6083
  this.next();
4965
- if (usingKind === "await using") this.next();
6084
+ if (usingKind === "await using") {
6085
+ if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
6086
+ this.next();
6087
+ }
4966
6088
  this.parseVar(init$2, true, usingKind);
4967
6089
  this.finishNode(init$2, "VariableDeclaration");
4968
6090
  return this.parseForAfterInit(node, init$2, awaitAt);
@@ -4989,9 +6111,10 @@ pp$8.parseForStatement = function(node) {
4989
6111
  };
4990
6112
  pp$8.parseForAfterInit = function(node, init, awaitAt) {
4991
6113
  if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
4992
- if (this.options.ecmaVersion >= 9) if (this.type === types$1._in) {
4993
- if (awaitAt > -1) this.unexpected(awaitAt);
4994
- } else node.await = awaitAt > -1;
6114
+ if (this.type === types$1._in) {
6115
+ if ((init.kind === "using" || init.kind === "await using") && !init.declarations[0].init) this.raise(this.start, "Using declaration is not allowed in for-in loops");
6116
+ if (this.options.ecmaVersion >= 9 && awaitAt > -1) this.unexpected(awaitAt);
6117
+ } else if (this.options.ecmaVersion >= 9) node.await = awaitAt > -1;
4995
6118
  return this.parseForIn(node, init);
4996
6119
  }
4997
6120
  if (awaitAt > -1) this.unexpected(awaitAt);
@@ -5009,7 +6132,7 @@ pp$8.parseIfStatement = function(node) {
5009
6132
  return this.finishNode(node, "IfStatement");
5010
6133
  };
5011
6134
  pp$8.parseReturnStatement = function(node) {
5012
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
6135
+ if (!this.allowReturn) this.raise(this.start, "'return' outside of function");
5013
6136
  this.next();
5014
6137
  if (this.eat(types$1.semi) || this.insertSemicolon()) node.argument = null;
5015
6138
  else {
@@ -5024,7 +6147,7 @@ pp$8.parseSwitchStatement = function(node) {
5024
6147
  node.cases = [];
5025
6148
  this.expect(types$1.braceL);
5026
6149
  this.labels.push(switchLabel);
5027
- this.enterScope(0);
6150
+ this.enterScope(SCOPE_SWITCH);
5028
6151
  var cur;
5029
6152
  for (var sawDefault = false; this.type !== types$1.braceR;) if (this.type === types$1._case || this.type === types$1._default) {
5030
6153
  var isCase = this.type === types$1._case;
@@ -5393,10 +6516,10 @@ function checkKeyName(node, name) {
5393
6516
  var key = node.key;
5394
6517
  return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
5395
6518
  }
5396
- pp$8.parseExportAllDeclaration = function(node, exports) {
6519
+ pp$8.parseExportAllDeclaration = function(node, exports$1) {
5397
6520
  if (this.options.ecmaVersion >= 11) if (this.eatContextual("as")) {
5398
6521
  node.exported = this.parseModuleExportName();
5399
- this.checkExport(exports, node.exported, this.lastTokStart);
6522
+ this.checkExport(exports$1, node.exported, this.lastTokStart);
5400
6523
  } else node.exported = null;
5401
6524
  this.expectContextual("from");
5402
6525
  if (this.type !== types$1.string) this.unexpected();
@@ -5405,24 +6528,24 @@ pp$8.parseExportAllDeclaration = function(node, exports) {
5405
6528
  this.semicolon();
5406
6529
  return this.finishNode(node, "ExportAllDeclaration");
5407
6530
  };
5408
- pp$8.parseExport = function(node, exports) {
6531
+ pp$8.parseExport = function(node, exports$1) {
5409
6532
  this.next();
5410
- if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports);
6533
+ if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports$1);
5411
6534
  if (this.eat(types$1._default)) {
5412
- this.checkExport(exports, "default", this.lastTokStart);
6535
+ this.checkExport(exports$1, "default", this.lastTokStart);
5413
6536
  node.declaration = this.parseExportDefaultDeclaration();
5414
6537
  return this.finishNode(node, "ExportDefaultDeclaration");
5415
6538
  }
5416
6539
  if (this.shouldParseExportStatement()) {
5417
6540
  node.declaration = this.parseExportDeclaration(node);
5418
- if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports, node.declaration.declarations);
5419
- else this.checkExport(exports, node.declaration.id, node.declaration.id.start);
6541
+ if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports$1, node.declaration.declarations);
6542
+ else this.checkExport(exports$1, node.declaration.id, node.declaration.id.start);
5420
6543
  node.specifiers = [];
5421
6544
  node.source = null;
5422
6545
  if (this.options.ecmaVersion >= 16) node.attributes = [];
5423
6546
  } else {
5424
6547
  node.declaration = null;
5425
- node.specifiers = this.parseExportSpecifiers(exports);
6548
+ node.specifiers = this.parseExportSpecifiers(exports$1);
5426
6549
  if (this.eatContextual("from")) {
5427
6550
  if (this.type !== types$1.string) this.unexpected();
5428
6551
  node.source = this.parseExprAtom();
@@ -5460,45 +6583,45 @@ pp$8.parseExportDefaultDeclaration = function() {
5460
6583
  return declaration;
5461
6584
  }
5462
6585
  };
5463
- pp$8.checkExport = function(exports, name, pos) {
5464
- if (!exports) return;
6586
+ pp$8.checkExport = function(exports$1, name, pos) {
6587
+ if (!exports$1) return;
5465
6588
  if (typeof name !== "string") name = name.type === "Identifier" ? name.name : name.value;
5466
- if (hasOwn(exports, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
5467
- exports[name] = true;
6589
+ if (hasOwn(exports$1, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
6590
+ exports$1[name] = true;
5468
6591
  };
5469
- pp$8.checkPatternExport = function(exports, pat) {
6592
+ pp$8.checkPatternExport = function(exports$1, pat) {
5470
6593
  var type = pat.type;
5471
- if (type === "Identifier") this.checkExport(exports, pat, pat.start);
6594
+ if (type === "Identifier") this.checkExport(exports$1, pat, pat.start);
5472
6595
  else if (type === "ObjectPattern") for (var i = 0, list = pat.properties; i < list.length; i += 1) {
5473
6596
  var prop = list[i];
5474
- this.checkPatternExport(exports, prop);
6597
+ this.checkPatternExport(exports$1, prop);
5475
6598
  }
5476
6599
  else if (type === "ArrayPattern") for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
5477
6600
  var elt = list$1[i$1];
5478
- if (elt) this.checkPatternExport(exports, elt);
6601
+ if (elt) this.checkPatternExport(exports$1, elt);
5479
6602
  }
5480
- else if (type === "Property") this.checkPatternExport(exports, pat.value);
5481
- else if (type === "AssignmentPattern") this.checkPatternExport(exports, pat.left);
5482
- else if (type === "RestElement") this.checkPatternExport(exports, pat.argument);
6603
+ else if (type === "Property") this.checkPatternExport(exports$1, pat.value);
6604
+ else if (type === "AssignmentPattern") this.checkPatternExport(exports$1, pat.left);
6605
+ else if (type === "RestElement") this.checkPatternExport(exports$1, pat.argument);
5483
6606
  };
5484
- pp$8.checkVariableExport = function(exports, decls) {
5485
- if (!exports) return;
6607
+ pp$8.checkVariableExport = function(exports$1, decls) {
6608
+ if (!exports$1) return;
5486
6609
  for (var i = 0, list = decls; i < list.length; i += 1) {
5487
6610
  var decl = list[i];
5488
- this.checkPatternExport(exports, decl.id);
6611
+ this.checkPatternExport(exports$1, decl.id);
5489
6612
  }
5490
6613
  };
5491
6614
  pp$8.shouldParseExportStatement = function() {
5492
6615
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
5493
6616
  };
5494
- pp$8.parseExportSpecifier = function(exports) {
6617
+ pp$8.parseExportSpecifier = function(exports$1) {
5495
6618
  var node = this.startNode();
5496
6619
  node.local = this.parseModuleExportName();
5497
6620
  node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
5498
- this.checkExport(exports, node.exported, node.exported.start);
6621
+ this.checkExport(exports$1, node.exported, node.exported.start);
5499
6622
  return this.finishNode(node, "ExportSpecifier");
5500
6623
  };
5501
- pp$8.parseExportSpecifiers = function(exports) {
6624
+ pp$8.parseExportSpecifiers = function(exports$1) {
5502
6625
  var nodes = [], first = true;
5503
6626
  this.expect(types$1.braceL);
5504
6627
  while (!this.eat(types$1.braceR)) {
@@ -5506,7 +6629,7 @@ pp$8.parseExportSpecifiers = function(exports) {
5506
6629
  this.expect(types$1.comma);
5507
6630
  if (this.afterTrailingComma(types$1.braceR)) break;
5508
6631
  } else first = false;
5509
- nodes.push(this.parseExportSpecifier(exports));
6632
+ nodes.push(this.parseExportSpecifier(exports$1));
5510
6633
  }
5511
6634
  return nodes;
5512
6635
  };
@@ -5937,15 +7060,18 @@ pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
5937
7060
  other[kind] = true;
5938
7061
  };
5939
7062
  pp$5.parseExpression = function(forInit, refDestructuringErrors) {
5940
- var startPos = this.start, startLoc = this.startLoc;
5941
- var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
5942
- if (this.type === types$1.comma) {
5943
- var node = this.startNodeAt(startPos, startLoc);
5944
- node.expressions = [expr];
5945
- while (this.eat(types$1.comma)) node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
5946
- return this.finishNode(node, "SequenceExpression");
5947
- }
5948
- return expr;
7063
+ var this$1$1 = this;
7064
+ return this.catchStackOverflow(function() {
7065
+ var startPos = this$1$1.start, startLoc = this$1$1.startLoc;
7066
+ var expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors);
7067
+ if (this$1$1.type === types$1.comma) {
7068
+ var node = this$1$1.startNodeAt(startPos, startLoc);
7069
+ node.expressions = [expr];
7070
+ while (this$1$1.eat(types$1.comma)) node.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors));
7071
+ return this$1$1.finishNode(node, "SequenceExpression");
7072
+ }
7073
+ return expr;
7074
+ });
5949
7075
  };
5950
7076
  pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
5951
7077
  if (this.isContextual("yield")) if (this.inGenerator) return this.parseYield(forInit);
@@ -5989,7 +7115,7 @@ pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
5989
7115
  var startPos = this.start, startLoc = this.startLoc;
5990
7116
  var expr = this.parseExprOps(forInit, refDestructuringErrors);
5991
7117
  if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
5992
- if (this.eat(types$1.question)) {
7118
+ if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.question)) {
5993
7119
  var node = this.startNodeAt(startPos, startLoc);
5994
7120
  node.test = expr;
5995
7121
  node.consequent = this.parseMaybeAssign();
@@ -6065,7 +7191,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
6065
7191
  expr = this.finishNode(node$1, "UpdateExpression");
6066
7192
  }
6067
7193
  }
6068
- if (!incDec && this.eat(types$1.starstar)) if (sawUnary) this.unexpected(this.lastTokStart);
7194
+ if (!incDec && !(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.starstar)) if (sawUnary) this.unexpected(this.lastTokStart);
6069
7195
  else return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
6070
7196
  else return expr;
6071
7197
  };
@@ -6368,6 +7494,7 @@ pp$5.parseNew = function() {
6368
7494
  }
6369
7495
  var startPos = this.start, startLoc = this.startLoc;
6370
7496
  node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
7497
+ if (node.callee.type === "Super") this.raiseRecoverable(startPos, "Invalid use of 'super'");
6371
7498
  if (this.eat(types$1.parenL)) node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
6372
7499
  else node.arguments = empty;
6373
7500
  return this.finishNode(node, "NewExpression");
@@ -6767,7 +7894,7 @@ pp$2.copyNode = function(node) {
6767
7894
  for (var prop in node) newNode[prop] = node[prop];
6768
7895
  return newNode;
6769
7896
  };
6770
- var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
7897
+ var scriptValuesAddedInUnicode = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz";
6771
7898
  var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
6772
7899
  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
6773
7900
  var ecma11BinaryProperties = ecma10BinaryProperties;
@@ -7770,12 +8897,15 @@ pp.readToken = function(code) {
7770
8897
  if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) return this.readWord();
7771
8898
  return this.getTokenFromCode(code);
7772
8899
  };
7773
- pp.fullCharCodeAtPos = function() {
7774
- var code = this.input.charCodeAt(this.pos);
8900
+ pp.fullCharCodeAt = function(pos) {
8901
+ var code = this.input.charCodeAt(pos);
7775
8902
  if (code <= 55295 || code >= 56320) return code;
7776
- var next = this.input.charCodeAt(this.pos + 1);
8903
+ var next = this.input.charCodeAt(pos + 1);
7777
8904
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
7778
8905
  };
8906
+ pp.fullCharCodeAtPos = function() {
8907
+ return this.fullCharCodeAt(this.pos);
8908
+ };
7779
8909
  pp.skipBlockComment = function() {
7780
8910
  var startLoc = this.options.onComment && this.curPosition();
7781
8911
  var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
@@ -8321,7 +9451,7 @@ pp.readWord = function() {
8321
9451
  };
8322
9452
  Parser.acorn = {
8323
9453
  Parser,
8324
- version: "8.15.0",
9454
+ version: "8.18.0",
8325
9455
  defaultOptions,
8326
9456
  Position,
8327
9457
  SourceLocation,
@@ -8454,7 +9584,7 @@ function parseAuthorizerExpression(input) {
8454
9584
  }
8455
9585
  if (program.body.length !== 1) throw new AuthorizerExpressionParseError("Expression must be a single expression statement, e.g. model.id === auth.userId", 0, input.length);
8456
9586
  const expressionStatement = program.body[0];
8457
- if (expressionStatement.type !== "ExpressionStatement") throw new AuthorizerExpressionParseError("Line must be an expression statement, e.g. model.id === auth.userId", expressionStatement);
9587
+ if (expressionStatement?.type !== "ExpressionStatement") throw new AuthorizerExpressionParseError("Line must be an expression statement, e.g. model.id === auth.userId", expressionStatement);
8458
9588
  const ast = convertNode(expressionStatement.expression);
8459
9589
  return {
8460
9590
  ast,
@@ -8564,7 +9694,7 @@ function parseModelRelationArg(arg, funcName) {
8564
9694
  function parseHasRoleArgs(node, funcName) {
8565
9695
  if (node.arguments.length === 1) {
8566
9696
  const arg = node.arguments[0];
8567
- if (arg.type !== "Literal" || typeof arg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} argument must be a string literal`, arg);
9697
+ if (arg?.type !== "Literal" || typeof arg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} argument must be a string literal`, arg ?? node);
8568
9698
  return {
8569
9699
  type: "hasRole",
8570
9700
  role: arg.value,
@@ -8576,7 +9706,7 @@ function parseHasRoleArgs(node, funcName) {
8576
9706
  const relationArg = node.arguments[0];
8577
9707
  const roleArg = node.arguments[1];
8578
9708
  const relation = parseModelRelationArg(relationArg, funcName);
8579
- if (roleArg.type !== "Literal" || typeof roleArg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} second argument must be a string literal (role name)`, roleArg);
9709
+ if (roleArg?.type !== "Literal" || typeof roleArg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} second argument must be a string literal (role name)`, roleArg ?? node);
8580
9710
  return {
8581
9711
  type: "nestedHasRole",
8582
9712
  relationName: relation.relationName,
@@ -8650,7 +9780,7 @@ function parseRelationFilterArgs(node, operator, funcName) {
8650
9780
  const relationArg = node.arguments[0];
8651
9781
  const conditionsArg = node.arguments[1];
8652
9782
  const relation = parseModelRelationArg(relationArg, funcName);
8653
- if (conditionsArg.type !== "ObjectExpression") throw new AuthorizerExpressionParseError(`${funcName} second argument must be an object literal (e.g., { userId: userId })`, conditionsArg);
9783
+ if (conditionsArg?.type !== "ObjectExpression") throw new AuthorizerExpressionParseError(`${funcName} second argument must be an object literal (e.g., { userId: userId })`, conditionsArg ?? node);
8654
9784
  if (conditionsArg.properties.length === 0) throw new AuthorizerExpressionParseError(`${funcName} conditions object must have at least one property`, conditionsArg);
8655
9785
  const conditions = [];
8656
9786
  for (const prop of conditionsArg.properties) {
@@ -8869,10 +9999,10 @@ function validateAuthorizerExpression(ast, modelContext, pluginStore, definition
8869
9999
  });
8870
10000
  },
8871
10001
  hasSomeRole(node) {
8872
- for (let i = 0; i < node.roles.length; i++) {
8873
- const role = node.roles[i];
10002
+ for (const [i, role] of node.roles.entries()) {
8874
10003
  const start = node.rolesStart[i];
8875
10004
  const end = node.rolesEnd[i];
10005
+ if (start === void 0 || end === void 0) continue;
8876
10006
  if (allRoleNames.has(role)) warnIfAutoAssignedRole(role, start, end);
8877
10007
  else warnings.push({
8878
10008
  message: `Role '${role}' is not defined in the project configuration. Available roles: ${[...allRoleNames].join(", ")}.`,
@@ -9204,13 +10334,15 @@ var AuthorizerExpressionParser = class extends RefExpressionParser {
9204
10334
  const foreignModel = modelById.get(relation.modelRef);
9205
10335
  if (foreignModel) {
9206
10336
  const foreignRoleByName = new Map(foreignModel.authorizer.roles.map((r) => [r.name, r]));
9207
- for (let i = 0; i < node.roles.length; i++) {
9208
- const foreignRole = foreignRoleByName.get(node.roles[i]);
9209
- if (foreignRole) deps.push({
10337
+ for (const [i, roleName] of node.roles.entries()) {
10338
+ const foreignRole = foreignRoleByName.get(roleName);
10339
+ const roleStart = node.rolesStart[i];
10340
+ const roleEnd = node.rolesEnd[i];
10341
+ if (foreignRole && roleStart !== void 0 && roleEnd !== void 0) deps.push({
9210
10342
  entityType: modelAuthorizerRoleEntityType,
9211
10343
  entityId: foreignRole.id,
9212
- start: node.rolesStart[i] + 1,
9213
- end: node.rolesEnd[i] - 1
10344
+ start: roleStart + 1,
10345
+ end: roleEnd - 1
9214
10346
  });
9215
10347
  }
9216
10348
  }
@@ -9266,9 +10398,9 @@ var AuthorizerExpressionParser = class extends RefExpressionParser {
9266
10398
  const modelPath = resolvedSlots.model;
9267
10399
  for (let len = modelPath.length; len > 0; len--) {
9268
10400
  let current = definition;
9269
- for (let i = 0; i < len; i++) {
10401
+ for (const part of modelPath.slice(0, len)) {
9270
10402
  if (current === null || current === void 0) break;
9271
- current = current[modelPath[i]];
10403
+ current = current[part];
9272
10404
  }
9273
10405
  if (current !== null && current !== void 0 && typeof current === "object" && "name" in current && typeof current.name === "string") return current;
9274
10406
  }
@@ -9556,21 +10688,7 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9556
10688
  type: modelAuthorizerRoleEntityType,
9557
10689
  onDelete: "DELETE",
9558
10690
  parentSlot: modelSlot
9559
- })), []),
9560
- /**
9561
- * Whether this field is exposed as a `where` filter operand
9562
- * when the model's list query has where filtering enabled.
9563
- * Opt-in: an author must explicitly choose which exposed
9564
- * fields are filterable.
9565
- */
9566
- filterable: ctx.withDefault(__mf_0.boolean(), false),
9567
- /**
9568
- * Whether this field is exposed as an `orderBy` sort key
9569
- * when the model's list query has sorting enabled. Opt-in:
9570
- * an author must explicitly choose which exposed fields are
9571
- * sortable.
9572
- */
9573
- sortable: ctx.withDefault(__mf_0.boolean(), false)
10691
+ })), [])
9574
10692
  })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([])),
9575
10693
  localRelations: __mf_0.array(__mf_0.object({
9576
10694
  ref: ctx.withRef({
@@ -9597,9 +10715,67 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9597
10715
  onDelete: "DELETE",
9598
10716
  parentSlot: modelSlot
9599
10717
  })), []),
9600
- paginated: ctx.withDefault(__mf_0.boolean(), false)
10718
+ paginated: ctx.withDefault(__mf_0.boolean(), false),
10719
+ orderable: ctx.withDefault(__mf_0.boolean(), false)
10720
+ })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
10721
+ }), {}),
10722
+ /**
10723
+ * Sorting configuration shared by every surface that exposes an
10724
+ * `orderBy` argument — the list and connection queries, and `orderable`
10725
+ * list relations. Each surface opts in separately (`queries.orderBy.enabled`,
10726
+ * `objectType.foreignRelations[].orderable`) but they all sort by the
10727
+ * same fields.
10728
+ */
10729
+ orderBy: ctx.withDefault(__mf_0.object({
10730
+ /** Fields exposed as `orderBy` sort keys. */
10731
+ fields: __mf_0.array(ctx.withRef({
10732
+ type: modelScalarFieldEntityType,
10733
+ onDelete: "DELETE_PARENT",
10734
+ parentSlot: modelSlot
10735
+ })).apply(withDefault([])),
10736
+ /**
10737
+ * Applied when a caller supplies no `orderBy`. Ordered, so multi-key
10738
+ * defaults sort by the first entry first. Not restricted to
10739
+ * `fields` — a model can default to a sort key it does not expose.
10740
+ */
10741
+ defaultSort: __mf_0.array(__mf_0.object({
10742
+ ref: ctx.withRef({
10743
+ type: modelScalarFieldEntityType,
10744
+ onDelete: "DELETE_PARENT",
10745
+ parentSlot: modelSlot
10746
+ }),
10747
+ direction: ctx.withDefault(__mf_0.enum(["asc", "desc"]), "asc")
9601
10748
  })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
9602
10749
  }), {}),
10750
+ /**
10751
+ * Filtering configuration for surfaces that expose a `where` argument —
10752
+ * the list and connection queries (`queries.where.enabled`). Shaped like
10753
+ * `orderBy` so relation-level filtering can reuse it.
10754
+ */
10755
+ where: ctx.withDefault(__mf_0.object({
10756
+ /** Fields exposed as `where` filter operands. */
10757
+ fields: __mf_0.array(ctx.withRef({
10758
+ type: modelScalarFieldEntityType,
10759
+ onDelete: "DELETE_PARENT",
10760
+ parentSlot: modelSlot
10761
+ })).apply(withDefault([])) }), {}),
10762
+ /**
10763
+ * Page-size limits shared by every paginated surface — the list query,
10764
+ * the connection query, and paginated list relations. Both are optional;
10765
+ * leaving them unset keeps the offset surfaces unbounded and lets the
10766
+ * connection fall back to Pothos' own defaults (20 / 100). Setting only a
10767
+ * max also applies it as the default, since the cap on an offset surface
10768
+ * would otherwise be bypassed by omitting the argument.
10769
+ */
10770
+ pagination: ctx.withDefault(__mf_0.object({
10771
+ /** Page size applied when the caller requests no explicit size. */
10772
+ defaultPageSize: __mf_0.number().int().positive().optional(),
10773
+ /** Largest page a caller may request. */
10774
+ maxPageSize: __mf_0.number().int().positive().optional()
10775
+ }).refine(({ defaultPageSize, maxPageSize }) => defaultPageSize === void 0 || maxPageSize === void 0 || defaultPageSize <= maxPageSize, {
10776
+ message: "Default page size cannot exceed max page size",
10777
+ path: ["defaultPageSize"]
10778
+ }), {}),
9603
10779
  queries: ctx.withDefault(__mf_0.object({
9604
10780
  globalRoles: createRoleArray(ctx),
9605
10781
  instanceRoles: ctx.withDefault(__mf_0.array(ctx.withRef({
@@ -9608,13 +10784,23 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9608
10784
  parentSlot: modelSlot
9609
10785
  })), []),
9610
10786
  get: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
10787
+ /** Offset pagination (`skip`/`take`). */
9611
10788
  list: ctx.withDefault(__mf_0.object({
9612
10789
  enabled: ctx.withDefault(__mf_0.boolean(), false),
9613
- count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9614
- connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9615
- where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9616
- orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
9617
- }), {})
10790
+ count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
10791
+ }), {}),
10792
+ /**
10793
+ * Cursor pagination (Relay connection). Independent of `list` — a
10794
+ * model may expose either, both, or neither.
10795
+ */
10796
+ connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
10797
+ /**
10798
+ * `where`/`orderBy` arguments, shared by the list and connection
10799
+ * queries. The fields each may operate on live in the model-level
10800
+ * `where.fields` / `orderBy.fields` lists.
10801
+ */
10802
+ where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
10803
+ orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
9618
10804
  }), {}),
9619
10805
  mutations: ctx.withDefault(__mf_0.object({
9620
10806
  create: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
@@ -10366,6 +11552,9 @@ function getWebAppPluginData(webApp, pluginKey) {
10366
11552
  return webApp.pluginData?.[pluginKey];
10367
11553
  }
10368
11554
  //#endregion
11555
+ //#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
11556
+ var libraryEntityType = createEntityType("library");
11557
+ //#endregion
10369
11558
  //#region ../../packages/project-builder-lib/dist/schema/apps/web/web-app.js
10370
11559
  var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (ctx, { appSlot }) => {
10371
11560
  const pluginKeys = ctx.plugins.getPluginKeys();
@@ -10379,14 +11568,24 @@ var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (
10379
11568
  description: __mf_0.string().default(""),
10380
11569
  enableSubscriptions: ctx.withDefault(__mf_0.boolean(), false),
10381
11570
  pluginData: pluginDataSchema.optional(),
10382
- adminApp: createAdminAppSchema(ctx, { appSlot })
11571
+ adminApp: createAdminAppSchema(ctx, { appSlot }),
11572
+ libraryRefs: __mf_0.array(ctx.withRef({
11573
+ type: libraryEntityType,
11574
+ onDelete: "RESTRICT"
11575
+ })).apply(withDefault([])),
11576
+ /**
11577
+ * Optional reference to a `react-library` package that supplies the
11578
+ * shared `react-components` UI primitive set (Button, Dialog, Toaster,
11579
+ * etc.) instead of generating them locally in this app.
11580
+ */
11581
+ componentsLibraryRef: __mf_0.optional(ctx.withRef({
11582
+ type: libraryEntityType,
11583
+ onDelete: "RESTRICT"
11584
+ }))
10383
11585
  });
10384
11586
  });
10385
11587
  var webAppEntryType = createAppEntryType("web");
10386
11588
  //#endregion
10387
- //#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
10388
- var libraryEntityType = createEntityType("library");
10389
- //#endregion
10390
11589
  //#region ../../packages/project-builder-lib/dist/schema/libraries/base.js
10391
11590
  var baseLibraryValidators = {
10392
11591
  id: __mf_0.string().default(libraryEntityType.generateNewId()),
@@ -10708,7 +11907,7 @@ var pluginMetadataSchema = __mf_0.object({
10708
11907
  function sortAndValidateMigrations(migrations, pluginKey) {
10709
11908
  const sortedMigrations = [...migrations].toSorted((a, b) => a.version - b.version);
10710
11909
  if (sortedMigrations.some((m) => m.version <= 0)) throw new Error(`All migrations for plugin ${pluginKey} must have a positive version`);
10711
- for (let i = 0; i < sortedMigrations.length - 1; i++) if (sortedMigrations[i].version === sortedMigrations[i + 1].version) throw new Error(`All migrations for plugin ${pluginKey} must have a unique version`);
11910
+ for (const [i, migration] of sortedMigrations.slice(0, -1).entries()) if (migration.version === sortedMigrations[i + 1]?.version) throw new Error(`All migrations for plugin ${pluginKey} must have a unique version`);
10712
11911
  return sortedMigrations;
10713
11912
  }
10714
11913
  /**
@@ -10828,6 +12027,13 @@ var nodeLibraryDefinitionSchemaEntry = {
10828
12027
  type: __mfDefaultExport.literal("node-library")
10829
12028
  }))
10830
12029
  };
12030
+ var reactLibraryDefinitionSchemaEntry = {
12031
+ name: "react-library",
12032
+ definitionSchema: definitionSchemaWithSlots({ librarySlot: libraryEntityType }, () => __mfDefaultExport.object({
12033
+ ...baseLibraryValidators,
12034
+ type: __mfDefaultExport.literal("react-library")
12035
+ }))
12036
+ };
10831
12037
  /**
10832
12038
  * Creates a typed library web config
10833
12039
  */
@@ -10838,7 +12044,7 @@ function createLibraryWebConfig(config) {
10838
12044
  * Package type spec for registering package schemas, compilers, and web configs.
10839
12045
  */
10840
12046
  var libraryTypeSpec = createFieldMapSpec("core/library-type", (t) => ({
10841
- schemaCreators: t.namedArrayToMap([nodeLibraryDefinitionSchemaEntry]),
12047
+ schemaCreators: t.namedArrayToMap([nodeLibraryDefinitionSchemaEntry, reactLibraryDefinitionSchemaEntry]),
10842
12048
  compilerCreators: t.namedArrayToMap(),
10843
12049
  webConfigs: t.namedArrayToMap()
10844
12050
  }));
@@ -11155,7 +12361,7 @@ var EnumUtils = {
11155
12361
  function isScalarUnique(model, fieldId) {
11156
12362
  const { primaryKeyFieldRefs } = model.model;
11157
12363
  const { uniqueConstraints } = model.model;
11158
- return primaryKeyFieldRefs.length === 1 && primaryKeyFieldRefs.includes(fieldId) || uniqueConstraints.some((c) => c.fields.length === 1 && c.fields[0].fieldRef === fieldId);
12364
+ return primaryKeyFieldRefs.length === 1 && primaryKeyFieldRefs.includes(fieldId) || uniqueConstraints.some((c) => c.fields.length === 1 && c.fields[0]?.fieldRef === fieldId);
11159
12365
  }
11160
12366
  function areScalarsUnique(model, fieldIds) {
11161
12367
  const sortedFieldIds = [...fieldIds].toSorted();
@@ -11229,9 +12435,10 @@ function byId(projectDefinition, id) {
11229
12435
  }
11230
12436
  function byUniqueTypeOrThrow(projectDefinition, type) {
11231
12437
  const config = projectDefinition.libraries.filter((lib) => lib.type === type);
11232
- if (config.length === 0) throw new Error(`Unable to find library with type ${type}`);
12438
+ const library = config[0];
12439
+ if (!library) throw new Error(`Unable to find library with type ${type}`);
11233
12440
  if (config.length > 1) throw new Error(`Multiple libraries with type ${type} found and only one is expected (${config.map((lib) => lib.name).join(", ")})`);
11234
- return config[0];
12441
+ return library;
11235
12442
  }
11236
12443
  /**
11237
12444
  * Given a library config, get the relative directory of the library
@@ -11243,10 +12450,24 @@ function byUniqueTypeOrThrow(projectDefinition, type) {
11243
12450
  function getLibraryDirectory(libraryConfig, monorepoSettings) {
11244
12451
  return `${monorepoSettings?.librariesFolder ?? "libs"}/${libraryConfig.name}`;
11245
12452
  }
12453
+ /**
12454
+ * Given a library config and the app importing it, get the path to the
12455
+ * library's `src` directory relative to the app's `src` root (where
12456
+ * `styles.css` is rendered), for use in a Tailwind `@source` directive.
12457
+ *
12458
+ * @param libraryConfig The library config being imported
12459
+ * @param appConfig The app importing the library
12460
+ * @param monorepoSettings Optional monorepo settings to determine folder locations
12461
+ * @returns The relative path from the app's `src` root to the library's `src` directory
12462
+ */
12463
+ function getLibraryRelativeSourcePath(libraryConfig, appConfig, monorepoSettings) {
12464
+ return computeRelativePath(`${AppUtils.getAppDirectory(appConfig, monorepoSettings)}/src`, `${getLibraryDirectory(libraryConfig, monorepoSettings)}/src`);
12465
+ }
11246
12466
  var LibraryUtils = {
11247
12467
  byId,
11248
12468
  byUniqueTypeOrThrow,
11249
- getLibraryDirectory
12469
+ getLibraryDirectory,
12470
+ getLibraryRelativeSourcePath
11250
12471
  };
11251
12472
  //#endregion
11252
12473
  //#region ../../packages/project-builder-lib/dist/parser/parser.js
@@ -11487,7 +12708,7 @@ function walkNode(schema, path, visitors, visited) {
11487
12708
  walkNode(children.right, path, visitors, visited);
11488
12709
  break;
11489
12710
  }
11490
- for (let i = cleanups.length - 1; i >= 0; i--) cleanups[i]();
12711
+ for (const cleanup of cleanups.toReversed()) cleanup();
11491
12712
  visited.delete(schema);
11492
12713
  }
11493
12714
  /**
@@ -11934,6 +13155,7 @@ function transformJsonPath(data, path, transformFn) {
11934
13155
  const navigateAndTransform = (current, parts) => {
11935
13156
  if (parts.length === 0) return transformFn(structuredClone(current));
11936
13157
  const [currentPart, ...remainingParts] = parts;
13158
+ if (currentPart === void 0) return transformFn(structuredClone(current));
11937
13159
  if (currentPart === "*") {
11938
13160
  if (!Array.isArray(current)) throw new TypeError(`Expected an array at ${pathParts.join(".")}`);
11939
13161
  return current.map((item) => navigateAndTransform(item, remainingParts));
@@ -11954,7 +13176,7 @@ function renameObjectKeysTransform(renames) {
11954
13176
  return (data) => {
11955
13177
  if (data === null) return null;
11956
13178
  if (typeof data !== "object") throw new TypeError(`Expected an object, got ${typeof data}`);
11957
- return Object.fromEntries(Object.entries(data).map(([key, value]) => [renames[key] || key, value]));
13179
+ return Object.fromEntries(Object.entries(data).map(([key, value]) => [renames[key] ?? key, value]));
11958
13180
  };
11959
13181
  }
11960
13182
  //#endregion
@@ -15193,10 +16415,13 @@ var migration012MigrateAuthConfig = createSchemaMigration({
15193
16415
  version: "0.1.0",
15194
16416
  config: auth0Config
15195
16417
  });
15196
- else plugins[pluginIndex] = {
15197
- ...plugins[pluginIndex],
15198
- config: auth0Config
15199
- };
16418
+ else {
16419
+ const existingPlugin = plugins[pluginIndex];
16420
+ if (existingPlugin) plugins[pluginIndex] = {
16421
+ ...existingPlugin,
16422
+ config: auth0Config
16423
+ };
16424
+ }
15200
16425
  return {
15201
16426
  ...config,
15202
16427
  auth: void 0,
@@ -15375,7 +16600,7 @@ var migration018CrudNameFieldRef = createSchemaMigration({
15375
16600
  selectedField ??= model.model.fields[0];
15376
16601
  return {
15377
16602
  ...section,
15378
- nameFieldRef: selectedField.name
16603
+ nameFieldRef: selectedField?.name ?? ""
15379
16604
  };
15380
16605
  });
15381
16606
  return {
@@ -15523,13 +16748,16 @@ var migration021MigrateBullmqToPlugin = createSchemaMigration({
15523
16748
  version: "1.0.0",
15524
16749
  config: { implementationPluginKey: "baseplate-dev_plugin-queue_bullmq" }
15525
16750
  });
15526
- else plugins[queuePluginIndex] = {
15527
- ...plugins[queuePluginIndex],
15528
- config: {
15529
- ...plugins[queuePluginIndex].config,
15530
- implementationPluginKey: "baseplate-dev_plugin-queue_bullmq"
15531
- }
15532
- };
16751
+ else {
16752
+ const existingQueuePlugin = plugins[queuePluginIndex];
16753
+ if (existingQueuePlugin) plugins[queuePluginIndex] = {
16754
+ ...existingQueuePlugin,
16755
+ config: {
16756
+ ...existingQueuePlugin.config,
16757
+ implementationPluginKey: "baseplate-dev_plugin-queue_bullmq"
16758
+ }
16759
+ };
16760
+ }
15533
16761
  if (plugins.findIndex((p) => p.id === bullmqPluginId) === -1) plugins.push({
15534
16762
  id: bullmqPluginId,
15535
16763
  name: "bullmq",
@@ -15964,6 +17192,101 @@ var migration031UuidDefaultGeneration = createSchemaMigration({
15964
17192
  //#region ../../packages/project-builder-lib/dist/migrations/migration-032-web-app-plugin-data.js
15965
17193
  var STORAGE_PLUGIN_KEY = "baseplate-dev_plugin-storage_storage";
15966
17194
  var NOTIFICATIONS_PLUGIN_KEY = "baseplate-dev_plugin-notifications_notifications";
17195
+ /**
17196
+ * Moves hardcoded per-app opt-in flags off the core web app config and into the
17197
+ * generic `pluginData[pluginKey]` bag introduced by the web app schema extension
17198
+ * point.
17199
+ *
17200
+ * - `includeUploadComponents` -> `pluginData['<storage>'].includeUploadComponents`
17201
+ * - `includeNotifications` -> `pluginData['<notifications>'].includeNotifications`
17202
+ * - `includeAuth` -> dropped (it was never read by any generator)
17203
+ *
17204
+ * Only `true` values are relocated so existing opt-ins are preserved; the flags
17205
+ * are always stripped from the core config.
17206
+ */
17207
+ var migration032WebAppPluginData = createSchemaMigration({
17208
+ version: 32,
17209
+ name: "webAppPluginData",
17210
+ description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
17211
+ migrate: (config) => {
17212
+ const apps = config.apps?.map((app) => {
17213
+ if (app.type !== "web") return app;
17214
+ const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
17215
+ const pluginData = { ...existingPluginData };
17216
+ if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
17217
+ ...pluginData[STORAGE_PLUGIN_KEY],
17218
+ includeUploadComponents: true
17219
+ };
17220
+ if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
17221
+ ...pluginData[NOTIFICATIONS_PLUGIN_KEY],
17222
+ includeNotifications: true
17223
+ };
17224
+ return Object.keys(pluginData).length > 0 ? {
17225
+ ...rest,
17226
+ pluginData
17227
+ } : rest;
17228
+ });
17229
+ return {
17230
+ ...config,
17231
+ apps: apps ?? []
17232
+ };
17233
+ }
17234
+ });
17235
+ //#endregion
17236
+ //#region ../../packages/project-builder-lib/dist/migrations/migration-033-hoist-sort-filter-config.js
17237
+ /**
17238
+ * Hoists the per-field `sortable`/`filterable` flags off
17239
+ * `graphql.objectType.fields[]` into the shared `graphql.orderBy.fields` and
17240
+ * `graphql.where.fields` lists.
17241
+ *
17242
+ * Both flags gate vocabulary used by more than one surface — the list query and
17243
+ * `orderable` list relations — so they belong beside the other shared sort and
17244
+ * filter configuration rather than under the object type. The per-surface
17245
+ * enable switches (`queries.list.orderBy.enabled`, `queries.list.where.enabled`)
17246
+ * are unaffected.
17247
+ */
17248
+ var migration033HoistSortFilterConfig = createSchemaMigration({
17249
+ version: 33,
17250
+ name: "hoistSortFilterConfig",
17251
+ description: "Hoist sortable/filterable field flags into shared graphql.orderBy and graphql.where config",
17252
+ migrate: (config) => {
17253
+ if (!config.models) return config;
17254
+ const refsWhere = (fields, key) => fields.filter((field) => field[key] === true).map((field) => field.ref).filter((ref) => ref !== void 0);
17255
+ return {
17256
+ ...config,
17257
+ models: config.models.map((model) => {
17258
+ const { graphql } = model;
17259
+ if (!graphql?.objectType?.fields) return model;
17260
+ const { fields } = graphql.objectType;
17261
+ return {
17262
+ ...model,
17263
+ graphql: {
17264
+ ...graphql,
17265
+ objectType: {
17266
+ ...graphql.objectType,
17267
+ fields: fields.map((field) => omit(field, ["sortable", "filterable"]))
17268
+ },
17269
+ orderBy: {
17270
+ ...graphql.orderBy,
17271
+ fields: refsWhere(fields, "sortable")
17272
+ },
17273
+ where: {
17274
+ ...graphql.where,
17275
+ fields: refsWhere(fields, "filterable")
17276
+ }
17277
+ }
17278
+ };
17279
+ })
17280
+ };
17281
+ }
17282
+ });
17283
+ //#endregion
17284
+ //#region ../../packages/project-builder-lib/dist/migrations/migration-034-hoist-connection-config.js
17285
+ var HOISTED_KEYS = [
17286
+ "connection",
17287
+ "where",
17288
+ "orderBy"
17289
+ ];
15967
17290
  //#endregion
15968
17291
  //#region ../../packages/project-builder-lib/dist/migrations/index.js
15969
17292
  var SCHEMA_MIGRATIONS = [
@@ -15994,31 +17317,36 @@ var SCHEMA_MIGRATIONS = [
15994
17317
  migration029AdminRoleAndAutoAssigned,
15995
17318
  migration030RemoveThemeHoverColors,
15996
17319
  migration031UuidDefaultGeneration,
17320
+ migration032WebAppPluginData,
17321
+ migration033HoistSortFilterConfig,
15997
17322
  createSchemaMigration({
15998
- version: 32,
15999
- name: "webAppPluginData",
16000
- description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
17323
+ version: 34,
17324
+ name: "hoistConnectionConfig",
17325
+ description: "Hoist connection, where, and orderBy toggles out of graphql.queries.list into graphql.queries",
16001
17326
  migrate: (config) => {
16002
- const apps = config.apps?.map((app) => {
16003
- if (app.type !== "web") return app;
16004
- const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
16005
- const pluginData = { ...existingPluginData };
16006
- if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
16007
- ...pluginData[STORAGE_PLUGIN_KEY],
16008
- includeUploadComponents: true
16009
- };
16010
- if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
16011
- ...pluginData[NOTIFICATIONS_PLUGIN_KEY],
16012
- includeNotifications: true
16013
- };
16014
- return Object.keys(pluginData).length > 0 ? {
16015
- ...rest,
16016
- pluginData
16017
- } : rest;
16018
- });
17327
+ if (!config.models) return config;
16019
17328
  return {
16020
17329
  ...config,
16021
- apps: apps ?? []
17330
+ models: config.models.map((model) => {
17331
+ const { graphql } = model;
17332
+ const list = graphql?.queries?.list;
17333
+ if (!graphql?.queries || !list) return model;
17334
+ const hoisted = Object.fromEntries(HOISTED_KEYS.filter((key) => list[key] !== void 0).map((key) => [key, key === "connection" && list.enabled !== true ? {
17335
+ ...list[key],
17336
+ enabled: false
17337
+ } : list[key]]));
17338
+ return {
17339
+ ...model,
17340
+ graphql: {
17341
+ ...graphql,
17342
+ queries: {
17343
+ ...graphql.queries,
17344
+ ...hoisted,
17345
+ list: omit(list, HOISTED_KEYS)
17346
+ }
17347
+ }
17348
+ };
17349
+ })
16022
17350
  };
16023
17351
  }
16024
17352
  })
@@ -16609,6 +17937,37 @@ function previewIssueFix(issue, container) {
16609
17937
  return diffSerializedDefinitions(schema, serializeSchema(schema, definition), serializeSchema(schema, fixedDefinition));
16610
17938
  }
16611
17939
  //#endregion
17940
+ //#region ../../packages/project-builder-lib/dist/parser/definition-issue-checkers/library-ref-type-checker.js
17941
+ /**
17942
+ * Checks that web apps only reference libraries of type `react-library`.
17943
+ *
17944
+ * `libraryRefs` and `componentsLibraryRef` accept any library entity, but
17945
+ * only a react-library package can be imported by a web app's generated code.
17946
+ */
17947
+ function checkLibraryRefType(container) {
17948
+ const { apps, libraries } = container.definition;
17949
+ const issues = [];
17950
+ const webApps = apps.filter((app) => app.type === "web");
17951
+ for (const app of webApps) {
17952
+ for (const [refIndex, libraryId] of app.libraryRefs.entries()) {
17953
+ const library = libraries.find((lib) => lib.id === libraryId);
17954
+ if (!library || library.type === "react-library") continue;
17955
+ issues.push(createEntityIssue(container, app.id, ["libraryRefs", refIndex], {
17956
+ message: `App '${app.name}' references library '${library.name}' which is not a React library and cannot be imported`,
17957
+ severity: "error"
17958
+ }));
17959
+ }
17960
+ if (app.componentsLibraryRef) {
17961
+ const library = libraries.find((lib) => lib.id === app.componentsLibraryRef);
17962
+ if (library && library.type !== "react-library") issues.push(createEntityIssue(container, app.id, ["componentsLibraryRef"], {
17963
+ message: `App '${app.name}' references library '${library.name}' as its components library, which is not a React library`,
17964
+ severity: "error"
17965
+ }));
17966
+ }
17967
+ }
17968
+ return issues;
17969
+ }
17970
+ //#endregion
16612
17971
  //#region ../../packages/project-builder-lib/dist/parser/definition-issue-checkers/mutation-roles-checker.js
16613
17972
  var MUTATION_METHODS = [
16614
17973
  "create",
@@ -16798,7 +18157,8 @@ var BUILT_IN_CHECKERS = [
16798
18157
  checkRelationTypeMismatch,
16799
18158
  checkMutationRoles,
16800
18159
  checkPluginDependencies,
16801
- checkPluginImplementations
18160
+ checkPluginImplementations,
18161
+ checkLibraryRefType
16802
18162
  ];
16803
18163
  /**
16804
18164
  * Splits issues into errors (block save) and warnings (block sync only).
@@ -17210,12 +18570,10 @@ function convertColorNameToOklch(color) {
17210
18570
  const fixedColorMapping = FIXED_COLOR_MAPPINGS[color];
17211
18571
  if (fixedColorMapping) return fixedColorMapping;
17212
18572
  const colorComponents = color.split("-");
17213
- if (colorComponents.length === 2) {
17214
- const paletteName = colorComponents[0];
17215
- if (Object.prototype.hasOwnProperty.call(COLOR_PALETTES, paletteName)) {
17216
- const shade = COLOR_PALETTES[colorComponents[0]][colorComponents[1]];
17217
- if (shade) return shade;
17218
- }
18573
+ const [paletteName, shadeName] = colorComponents;
18574
+ if (colorComponents.length === 2 && paletteName !== void 0 && shadeName !== void 0 && Object.prototype.hasOwnProperty.call(COLOR_PALETTES, paletteName)) {
18575
+ const shade = COLOR_PALETTES[paletteName][shadeName];
18576
+ if (shade) return shade;
17219
18577
  }
17220
18578
  return color;
17221
18579
  }
@@ -17305,10 +18663,12 @@ var DefinitionDiffKeyedArrayField = class extends DefinitionDiffField {
17305
18663
  case "add":
17306
18664
  items.push(item);
17307
18665
  break;
17308
- case "update":
17309
- if (index === -1) throw new Error(`Cannot apply patch. Item with key "${key}" not found.`);
17310
- items[index] = toMerged(items[index], item);
18666
+ case "update": {
18667
+ const existingItem = items[index];
18668
+ if (index === -1 || !existingItem) throw new Error(`Cannot apply patch. Item with key "${key}" not found.`);
18669
+ items[index] = toMerged(existingItem, item);
17311
18670
  break;
18671
+ }
17312
18672
  case "remove":
17313
18673
  if (index !== -1) items.splice(index, 1);
17314
18674
  break;
@@ -17334,8 +18694,9 @@ var DefinitionDiffReplacementField = class extends DefinitionDiffField {
17334
18694
  return [];
17335
18695
  }
17336
18696
  apply(current, diff) {
17337
- if (diff.length === 0) return current;
17338
- return diff[0].item;
18697
+ const firstOperation = diff[0];
18698
+ if (!firstOperation) return current;
18699
+ return firstOperation.item;
17339
18700
  }
17340
18701
  getActionVerb(isNew) {
17341
18702
  return isNew ? "set" : "replaced";
@@ -17417,215 +18778,8 @@ function applyDefinitionDiff(current, diff, configuration) {
17417
18778
  //#region ../../packages/project-builder-lib/dist/utils/theme.js
17418
18779
  var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17419
18780
  Object.defineProperty(exports, "__esModule", { value: true });
17420
- exports.transform = exports.ordinalize = exports.foreignKey = exports.classify = exports.tableize = exports.demodulize = exports.titleize = exports.dasherize = exports.capitalize = exports.humanize = exports.underscore = exports.camelize = exports.inflect = exports.singularize = exports.pluralize = void 0;
17421
- /**
17422
- * @description This is a list of nouns that use the same form for both singular and plural.
17423
- * This list should remain entirely in lower case to correctly match Strings.
17424
- */
17425
- var uncountableWords = [
17426
- "accommodation",
17427
- "adulthood",
17428
- "advertising",
17429
- "advice",
17430
- "aggression",
17431
- "aid",
17432
- "air",
17433
- "aircraft",
17434
- "alcohol",
17435
- "anger",
17436
- "applause",
17437
- "arithmetic",
17438
- "assistance",
17439
- "athletics",
17440
- "bacon",
17441
- "baggage",
17442
- "beef",
17443
- "biology",
17444
- "blood",
17445
- "botany",
17446
- "bread",
17447
- "butter",
17448
- "carbon",
17449
- "cardboard",
17450
- "cash",
17451
- "chalk",
17452
- "chaos",
17453
- "chess",
17454
- "crossroads",
17455
- "countryside",
17456
- "dancing",
17457
- "deer",
17458
- "dignity",
17459
- "dirt",
17460
- "dust",
17461
- "economics",
17462
- "education",
17463
- "electricity",
17464
- "engineering",
17465
- "enjoyment",
17466
- "envy",
17467
- "equipment",
17468
- "ethics",
17469
- "evidence",
17470
- "evolution",
17471
- "fame",
17472
- "fiction",
17473
- "flour",
17474
- "flu",
17475
- "food",
17476
- "fuel",
17477
- "fun",
17478
- "furniture",
17479
- "gallows",
17480
- "garbage",
17481
- "garlic",
17482
- "genetics",
17483
- "gold",
17484
- "golf",
17485
- "gossip",
17486
- "gratitude",
17487
- "grief",
17488
- "guilt",
17489
- "gymnastics",
17490
- "happiness",
17491
- "hardware",
17492
- "harm",
17493
- "hate",
17494
- "hatred",
17495
- "health",
17496
- "heat",
17497
- "help",
17498
- "homework",
17499
- "honesty",
17500
- "honey",
17501
- "hospitality",
17502
- "housework",
17503
- "humour",
17504
- "hunger",
17505
- "hydrogen",
17506
- "ice",
17507
- "importance",
17508
- "inflation",
17509
- "information",
17510
- "innocence",
17511
- "iron",
17512
- "irony",
17513
- "jam",
17514
- "jewelry",
17515
- "judo",
17516
- "karate",
17517
- "knowledge",
17518
- "lack",
17519
- "laughter",
17520
- "lava",
17521
- "leather",
17522
- "leisure",
17523
- "lightning",
17524
- "linguine",
17525
- "linguini",
17526
- "linguistics",
17527
- "literature",
17528
- "litter",
17529
- "livestock",
17530
- "logic",
17531
- "loneliness",
17532
- "luck",
17533
- "luggage",
17534
- "macaroni",
17535
- "machinery",
17536
- "magic",
17537
- "management",
17538
- "mankind",
17539
- "marble",
17540
- "mathematics",
17541
- "mayonnaise",
17542
- "measles",
17543
- "methane",
17544
- "milk",
17545
- "minus",
17546
- "money",
17547
- "mud",
17548
- "music",
17549
- "mumps",
17550
- "nature",
17551
- "news",
17552
- "nitrogen",
17553
- "nonsense",
17554
- "nurture",
17555
- "nutrition",
17556
- "obedience",
17557
- "obesity",
17558
- "oxygen",
17559
- "pasta",
17560
- "patience",
17561
- "physics",
17562
- "poetry",
17563
- "pollution",
17564
- "poverty",
17565
- "pride",
17566
- "psychology",
17567
- "publicity",
17568
- "punctuation",
17569
- "quartz",
17570
- "racism",
17571
- "relaxation",
17572
- "reliability",
17573
- "research",
17574
- "respect",
17575
- "revenge",
17576
- "rice",
17577
- "rubbish",
17578
- "rum",
17579
- "safety",
17580
- "scenery",
17581
- "seafood",
17582
- "seaside",
17583
- "series",
17584
- "shame",
17585
- "sheep",
17586
- "shopping",
17587
- "sleep",
17588
- "smoke",
17589
- "smoking",
17590
- "snow",
17591
- "soap",
17592
- "software",
17593
- "soil",
17594
- "spaghetti",
17595
- "species",
17596
- "steam",
17597
- "stuff",
17598
- "stupidity",
17599
- "sunshine",
17600
- "symmetry",
17601
- "tennis",
17602
- "thirst",
17603
- "thunder",
17604
- "timber",
17605
- "traffic",
17606
- "transportation",
17607
- "trust",
17608
- "underwear",
17609
- "unemployment",
17610
- "unity",
17611
- "validity",
17612
- "veal",
17613
- "vegetation",
17614
- "vegetarianism",
17615
- "vengeance",
17616
- "violence",
17617
- "vitality",
17618
- "warmth",
17619
- "wealth",
17620
- "weather",
17621
- "welfare",
17622
- "wheat",
17623
- "wildlife",
17624
- "wisdom",
17625
- "yoga",
17626
- "zinc",
17627
- "zoology"
17628
- ];
18781
+ exports.underscore = underscore;
18782
+ exports.dasherize = dasherize;
17629
18783
  /**
17630
18784
  * @description These rules translate from the singular form of a noun to its plural form.
17631
18785
  */
@@ -17683,6 +18837,7 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17683
18837
  tium: /* @__PURE__ */ new RegExp("([ti])um$", "gi"),
17684
18838
  sis: /* @__PURE__ */ new RegExp("sis$", "gi"),
17685
18839
  ffe: /* @__PURE__ */ new RegExp("(?:([^f])fe|([lr])f)$", "gi"),
18840
+ focus: /* @__PURE__ */ new RegExp("^(focus)$", "gi"),
17686
18841
  hive: /* @__PURE__ */ new RegExp("(hi|ti)ve$", "gi"),
17687
18842
  aeiouyy: /* @__PURE__ */ new RegExp("([^aeiouy]|qu)y$", "gi"),
17688
18843
  x: /* @__PURE__ */ new RegExp("(x|ch|ss|sh)$", "gi"),
@@ -17700,290 +18855,12 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17700
18855
  common: /* @__PURE__ */ new RegExp("$", "gi")
17701
18856
  }
17702
18857
  };
17703
- var pluralRules = [
17704
- [regex.plural.men],
17705
- [regex.plural.people],
17706
- [regex.plural.children],
17707
- [regex.plural.tia],
17708
- [regex.plural.analyses],
17709
- [regex.plural.databases],
17710
- [regex.plural.drives],
17711
- [regex.plural.hives],
17712
- [regex.plural.curves],
17713
- [regex.plural.lrves],
17714
- [regex.plural.foves],
17715
- [regex.plural.aeiouyies],
17716
- [regex.plural.series],
17717
- [regex.plural.movies],
17718
- [regex.plural.xes],
17719
- [regex.plural.mice],
17720
- [regex.plural.buses],
17721
- [regex.plural.oes],
17722
- [regex.plural.shoes],
17723
- [regex.plural.crises],
17724
- [regex.plural.octopuses],
17725
- [regex.plural.aliases],
17726
- [regex.plural.summonses],
17727
- [regex.plural.oxen],
17728
- [regex.plural.matrices],
17729
- [regex.plural.feet],
17730
- [regex.plural.teeth],
17731
- [regex.plural.geese],
17732
- [regex.plural.quizzes],
17733
- [regex.plural.whereases],
17734
- [regex.plural.criteria],
17735
- [regex.plural.genera],
17736
- [regex.singular.man, "$1en"],
17737
- [regex.singular.person, "$1ople"],
17738
- [regex.singular.child, "$1ren"],
17739
- [regex.singular.drive, "$1s"],
17740
- [regex.singular.ox, "$1en"],
17741
- [regex.singular.axis, "$1es"],
17742
- [regex.singular.octopus, "$1uses"],
17743
- [regex.singular.alias, "$1es"],
17744
- [regex.singular.summons, "$1es"],
17745
- [regex.singular.bus, "$1ses"],
17746
- [regex.singular.buffalo, "$1oes"],
17747
- [regex.singular.tium, "$1a"],
17748
- [regex.singular.sis, "ses"],
17749
- [regex.singular.ffe, "$1$2ves"],
17750
- [regex.singular.hive, "$1ves"],
17751
- [regex.singular.aeiouyy, "$1ies"],
17752
- [regex.singular.matrix, "$1ices"],
17753
- [regex.singular.vertex, "$1ices"],
17754
- [regex.singular.x, "$1es"],
17755
- [regex.singular.mouse, "$1ice"],
17756
- [regex.singular.foot, "feet"],
17757
- [regex.singular.tooth, "teeth"],
17758
- [regex.singular.goose, "geese"],
17759
- [regex.singular.quiz, "$1zes"],
17760
- [regex.singular.whereas, "$1es"],
17761
- [regex.singular.criterion, "$1a"],
17762
- [regex.singular.genus, "genera"],
17763
- [regex.singular.s, "s"],
17764
- [regex.singular.common, "s"]
17765
- ];
17766
- /**
17767
- * @description These rules translate from the plural form of a noun to its singular form.
17768
- */
17769
- var singularRules = [
17770
- [regex.singular.man],
17771
- [regex.singular.person],
17772
- [regex.singular.child],
17773
- [regex.singular.drive],
17774
- [regex.singular.ox],
17775
- [regex.singular.axis],
17776
- [regex.singular.octopus],
17777
- [regex.singular.alias],
17778
- [regex.singular.summons],
17779
- [regex.singular.bus],
17780
- [regex.singular.buffalo],
17781
- [regex.singular.tium],
17782
- [regex.singular.sis],
17783
- [regex.singular.ffe],
17784
- [regex.singular.hive],
17785
- [regex.singular.aeiouyy],
17786
- [regex.singular.x],
17787
- [regex.singular.matrix],
17788
- [regex.singular.mouse],
17789
- [regex.singular.foot],
17790
- [regex.singular.tooth],
17791
- [regex.singular.goose],
17792
- [regex.singular.quiz],
17793
- [regex.singular.whereas],
17794
- [regex.singular.criterion],
17795
- [regex.singular.genus],
17796
- [regex.plural.men, "$1an"],
17797
- [regex.plural.people, "$1rson"],
17798
- [regex.plural.children, "$1"],
17799
- [regex.plural.databases, "$1"],
17800
- [regex.plural.drives, "$1"],
17801
- [regex.plural.genera, "genus"],
17802
- [regex.plural.criteria, "$1on"],
17803
- [regex.plural.tia, "$1um"],
17804
- [regex.plural.analyses, "$1$2sis"],
17805
- [regex.plural.hives, "$1ve"],
17806
- [regex.plural.curves, "$1"],
17807
- [regex.plural.lrves, "$1f"],
17808
- [regex.plural.aves, "$1ve"],
17809
- [regex.plural.foves, "$1fe"],
17810
- [regex.plural.movies, "$1ovie"],
17811
- [regex.plural.aeiouyies, "$1y"],
17812
- [regex.plural.series, "$1eries"],
17813
- [regex.plural.xes, "$1"],
17814
- [regex.plural.mice, "$1ouse"],
17815
- [regex.plural.buses, "$1"],
17816
- [regex.plural.oes, "$1"],
17817
- [regex.plural.shoes, "$1"],
17818
- [regex.plural.crises, "$1is"],
17819
- [regex.plural.octopuses, "$1us"],
17820
- [regex.plural.aliases, "$1"],
17821
- [regex.plural.summonses, "$1"],
17822
- [regex.plural.oxen, "$1"],
17823
- [regex.plural.matrices, "$1ix"],
17824
- [regex.plural.vertices, "$1ex"],
17825
- [regex.plural.feet, "foot"],
17826
- [regex.plural.teeth, "tooth"],
17827
- [regex.plural.geese, "goose"],
17828
- [regex.plural.quizzes, "$1"],
17829
- [regex.plural.whereases, "$1"],
17830
- [regex.plural.ss, "ss"],
17831
- [regex.plural.s, ""]
17832
- ];
17833
- /**
17834
- * @description This is a list of words that should not be capitalized for title case.
17835
- */
17836
- var nonTitlecasedWords = [
17837
- "and",
17838
- "or",
17839
- "nor",
17840
- "a",
17841
- "an",
17842
- "the",
17843
- "so",
17844
- "but",
17845
- "to",
17846
- "of",
17847
- "at",
17848
- "by",
17849
- "from",
17850
- "into",
17851
- "on",
17852
- "onto",
17853
- "off",
17854
- "out",
17855
- "in",
17856
- "over",
17857
- "with",
17858
- "for"
17859
- ];
17860
- /**
17861
- * @description These are regular expressions used for converting between String formats.
17862
- */
17863
- var idSuffix = /* @__PURE__ */ new RegExp("(_ids|_id)$", "g");
17864
- var underbar = /* @__PURE__ */ new RegExp("_", "g");
18858
+ regex.plural.men, regex.plural.people, regex.plural.children, regex.plural.tia, regex.plural.analyses, regex.plural.databases, regex.plural.drives, regex.plural.hives, regex.plural.curves, regex.plural.lrves, regex.plural.foves, regex.plural.aeiouyies, regex.plural.series, regex.plural.movies, regex.plural.xes, regex.plural.mice, regex.plural.buses, regex.plural.oes, regex.plural.shoes, regex.plural.crises, regex.plural.octopuses, regex.plural.aliases, regex.plural.summonses, regex.plural.oxen, regex.plural.matrices, regex.plural.feet, regex.plural.teeth, regex.plural.geese, regex.plural.quizzes, regex.plural.whereases, regex.plural.criteria, regex.plural.genera, regex.singular.man, regex.singular.person, regex.singular.child, regex.singular.drive, regex.singular.ox, regex.singular.axis, regex.singular.octopus, regex.singular.alias, regex.singular.summons, regex.singular.bus, regex.singular.buffalo, regex.singular.tium, regex.singular.sis, regex.singular.ffe, regex.singular.focus, regex.singular.hive, regex.singular.aeiouyy, regex.singular.matrix, regex.singular.vertex, regex.singular.x, regex.singular.mouse, regex.singular.foot, regex.singular.tooth, regex.singular.goose, regex.singular.quiz, regex.singular.whereas, regex.singular.criterion, regex.singular.genus, regex.singular.s, regex.singular.common;
18859
+ regex.singular.man, regex.singular.person, regex.singular.child, regex.singular.drive, regex.singular.ox, regex.singular.axis, regex.singular.octopus, regex.singular.alias, regex.singular.summons, regex.singular.bus, regex.singular.buffalo, regex.singular.tium, regex.singular.sis, regex.singular.ffe, regex.singular.focus, regex.singular.hive, regex.singular.aeiouyy, regex.singular.x, regex.singular.matrix, regex.singular.mouse, regex.singular.foot, regex.singular.tooth, regex.singular.goose, regex.singular.quiz, regex.singular.whereas, regex.singular.criterion, regex.singular.genus, regex.plural.men, regex.plural.people, regex.plural.children, regex.plural.databases, regex.plural.drives, regex.plural.genera, regex.plural.criteria, regex.plural.tia, regex.plural.analyses, regex.plural.hives, regex.plural.curves, regex.plural.lrves, regex.plural.aves, regex.plural.foves, regex.plural.movies, regex.plural.aeiouyies, regex.plural.series, regex.plural.xes, regex.plural.mice, regex.plural.buses, regex.plural.oes, regex.plural.shoes, regex.plural.crises, regex.plural.octopuses, regex.plural.aliases, regex.plural.summonses, regex.plural.oxen, regex.plural.matrices, regex.plural.vertices, regex.plural.feet, regex.plural.teeth, regex.plural.geese, regex.plural.quizzes, regex.plural.whereases, regex.plural.ss, regex.plural.s;
17865
18860
  var spaceOrUnderbar = /* @__PURE__ */ new RegExp("[ _]", "g");
17866
18861
  var uppercase = /* @__PURE__ */ new RegExp("([A-Z])", "g");
17867
18862
  var underbarPrefix = /* @__PURE__ */ new RegExp("^_");
17868
18863
  /**
17869
- * A helper method that applies rules based replacement to a String.
17870
- * @param str String to modify and return based on the passed rules.
17871
- * @param rules Regexp to match paired with String to use for replacement
17872
- * @param skip Strings to skip if they match
17873
- * @param override String to return as though this method succeeded (used to conform to APIs)
17874
- * @returns Return passed String modified by passed rules.
17875
- * @example
17876
- *
17877
- * applyRules( 'cows', singular_rules ); // === 'cow'
17878
- */
17879
- function applyRules(str, rules, skip, override) {
17880
- if (override) return override;
17881
- else {
17882
- if (skip.includes(str.toLocaleLowerCase())) return str;
17883
- for (const rule of rules) if (str.match(rule[0])) {
17884
- if (rule[1] !== void 0) return str.replace(rule[0], rule[1]);
17885
- return str;
17886
- }
17887
- }
17888
- return str;
17889
- }
17890
- /**
17891
- * This function adds pluralization support to every String object.
17892
- * @param str The subject string.
17893
- * @param plural Overrides normal output with said String.(optional)
17894
- * @returns Singular English language nouns are returned in plural form.
17895
- * @example
17896
- *
17897
- * const inflection = require( 'inflection' );
17898
- *
17899
- * inflection.pluralize( 'person' ); // === 'people'
17900
- * inflection.pluralize( 'octopus' ); // === 'octopuses'
17901
- * inflection.pluralize( 'Hat' ); // === 'Hats'
17902
- * inflection.pluralize( 'person', 'guys' ); // === 'guys'
17903
- */
17904
- function pluralize(str, plural) {
17905
- return applyRules(str, pluralRules, uncountableWords, plural);
17906
- }
17907
- exports.pluralize = pluralize;
17908
- /**
17909
- * This function adds singularization support to every String object.
17910
- * @param str The subject string.
17911
- * @param singular Overrides normal output with said String.(optional)
17912
- * @returns Plural English language nouns are returned in singular form.
17913
- * @example
17914
- *
17915
- * const inflection = require( 'inflection' );
17916
- *
17917
- * inflection.singularize( 'people' ); // === 'person'
17918
- * inflection.singularize( 'octopuses' ); // === 'octopus'
17919
- * inflection.singularize( 'Hats' ); // === 'Hat'
17920
- * inflection.singularize( 'guys', 'person' ); // === 'person'
17921
- */
17922
- function singularize(str, singular) {
17923
- return applyRules(str, singularRules, uncountableWords, singular);
17924
- }
17925
- exports.singularize = singularize;
17926
- /**
17927
- * This function will pluralize or singularlize a String appropriately based on a number value
17928
- * @param str The subject string.
17929
- * @param count The number to base pluralization off of.
17930
- * @param singular Overrides normal output with said String.(optional)
17931
- * @param plural Overrides normal output with said String.(optional)
17932
- * @returns English language nouns are returned in the plural or singular form based on the count.
17933
- * @example
17934
- *
17935
- * const inflection = require( 'inflection' );
17936
- *
17937
- * inflection.inflect( 'people' 1 ); // === 'person'
17938
- * inflection.inflect( 'octopuses' 1 ); // === 'octopus'
17939
- * inflection.inflect( 'Hats' 1 ); // === 'Hat'
17940
- * inflection.inflect( 'guys', 1 , 'person' ); // === 'person'
17941
- * inflection.inflect( 'inches', 1.5 ); // === 'inches'
17942
- * inflection.inflect( 'person', 2 ); // === 'people'
17943
- * inflection.inflect( 'octopus', 2 ); // === 'octopuses'
17944
- * inflection.inflect( 'Hat', 2 ); // === 'Hats'
17945
- * inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys'
17946
- */
17947
- function inflect(str, count, singular, plural) {
17948
- if (isNaN(count)) return str;
17949
- if (count === 1) return applyRules(str, singularRules, uncountableWords, singular);
17950
- else return applyRules(str, pluralRules, uncountableWords, plural);
17951
- }
17952
- exports.inflect = inflect;
17953
- /**
17954
- * This function adds camelization support to every String object.
17955
- * @param str The subject string.
17956
- * @param lowFirstLetter Default is to capitalize the first letter of the results.(optional)
17957
- * Passing true will lowercase it.
17958
- * @returns Lower case underscored words will be returned in camel case.
17959
- * additionally '/' is translated to '::'
17960
- * @example
17961
- *
17962
- * const inflection = require( 'inflection' );
17963
- *
17964
- * inflection.camelize( 'message_properties' ); // === 'MessageProperties'
17965
- * inflection.camelize( 'message_properties', true ); // === 'messageProperties'
17966
- */
17967
- function camelize(str, lowFirstLetter) {
17968
- const strPath = str.split("/");
17969
- const j = strPath.length;
17970
- let strArr, k, l, first;
17971
- for (let i = 0; i < j; i++) {
17972
- strArr = strPath[i].split("_");
17973
- k = 0;
17974
- l = strArr.length;
17975
- for (; k < l; k++) {
17976
- if (k !== 0) strArr[k] = strArr[k].toLowerCase();
17977
- first = strArr[k].charAt(0);
17978
- first = lowFirstLetter && i === 0 && k === 0 ? first.toLowerCase() : first.toUpperCase();
17979
- strArr[k] = first + strArr[k].substring(1);
17980
- }
17981
- strPath[i] = strArr.join("");
17982
- }
17983
- return strPath.join("::");
17984
- }
17985
- exports.camelize = camelize;
17986
- /**
17987
18864
  * This function adds underscore support to every String object.
17988
18865
  * @param str The subject string.
17989
18866
  * @param allUpperCase Default is to lowercase and add underscore prefix.(optional)
@@ -18008,44 +18885,6 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
18008
18885
  }
18009
18886
  return strPath.join("/").toLowerCase();
18010
18887
  }
18011
- exports.underscore = underscore;
18012
- /**
18013
- * This function adds humanize support to every String object.
18014
- * @param str The subject string.
18015
- * @param lowFirstLetter Default is to capitalize the first letter of the results.(optional)
18016
- * Passing true will lowercase it.
18017
- * @returns Lower case underscored words will be returned in humanized form.
18018
- * @example
18019
- *
18020
- * const inflection = require( 'inflection' );
18021
- *
18022
- * inflection.humanize( 'message_properties' ); // === 'Message properties'
18023
- * inflection.humanize( 'message_properties', true ); // === 'message properties'
18024
- */
18025
- function humanize(str, lowFirstLetter) {
18026
- str = str.toLowerCase();
18027
- str = str.replace(idSuffix, "");
18028
- str = str.replace(underbar, " ");
18029
- if (!lowFirstLetter) str = capitalize(str);
18030
- return str;
18031
- }
18032
- exports.humanize = humanize;
18033
- /**
18034
- * This function adds capitalization support to every String object.
18035
- * @param str The subject string.
18036
- * @returns All characters will be lower case and the first will be upper.
18037
- * @example
18038
- *
18039
- * const inflection = require( 'inflection' );
18040
- *
18041
- * inflection.capitalize( 'message_properties' ); // === 'Message_properties'
18042
- * inflection.capitalize( 'message properties', true ); // === 'Message properties'
18043
- */
18044
- function capitalize(str) {
18045
- str = str.toLowerCase();
18046
- return str.substring(0, 1).toUpperCase() + str.substring(1);
18047
- }
18048
- exports.capitalize = capitalize;
18049
18888
  /**
18050
18889
  * This function replaces underscores with dashes in the string.
18051
18890
  * @param str The subject string.
@@ -18060,165 +18899,6 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
18060
18899
  function dasherize(str) {
18061
18900
  return str.replace(spaceOrUnderbar, "-");
18062
18901
  }
18063
- exports.dasherize = dasherize;
18064
- /**
18065
- * This function adds titleize support to every String object.
18066
- * @param str The subject string.
18067
- * @returns Capitalizes words as you would for a book title.
18068
- * @example
18069
- *
18070
- * const inflection = require( 'inflection' );
18071
- *
18072
- * inflection.titleize( 'message_properties' ); // === 'Message Properties'
18073
- * inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep'
18074
- */
18075
- function titleize(str) {
18076
- str = str.toLowerCase().replace(underbar, " ");
18077
- const strArr = str.split(" ");
18078
- const j = strArr.length;
18079
- let d, l;
18080
- for (let i = 0; i < j; i++) {
18081
- d = strArr[i].split("-");
18082
- l = d.length;
18083
- for (let k = 0; k < l; k++) if (nonTitlecasedWords.indexOf(d[k].toLowerCase()) < 0) d[k] = capitalize(d[k]);
18084
- strArr[i] = d.join("-");
18085
- }
18086
- str = strArr.join(" ");
18087
- str = str.substring(0, 1).toUpperCase() + str.substring(1);
18088
- return str;
18089
- }
18090
- exports.titleize = titleize;
18091
- /**
18092
- * This function adds demodulize support to every String object.
18093
- * @param str The subject string.
18094
- * @returns Removes module names leaving only class names.(Ruby style)
18095
- * @example
18096
- *
18097
- * const inflection = require( 'inflection' );
18098
- *
18099
- * inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties'
18100
- */
18101
- function demodulize(str) {
18102
- const strArr = str.split("::");
18103
- return strArr[strArr.length - 1];
18104
- }
18105
- exports.demodulize = demodulize;
18106
- /**
18107
- * This function adds tableize support to every String object.
18108
- * @param str The subject string.
18109
- * @returns Return camel cased words into their underscored plural form.
18110
- * @example
18111
- *
18112
- * const inflection = require( 'inflection' );
18113
- *
18114
- * inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties'
18115
- */
18116
- function tableize(str) {
18117
- str = underscore(str);
18118
- str = pluralize(str);
18119
- return str;
18120
- }
18121
- exports.tableize = tableize;
18122
- /**
18123
- * This function adds classification support to every String object.
18124
- * @param str The subject string.
18125
- * @returns Underscored plural nouns become the camel cased singular form.
18126
- * @example
18127
- *
18128
- * const inflection = require( 'inflection' );
18129
- *
18130
- * inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty'
18131
- */
18132
- function classify(str) {
18133
- str = camelize(str);
18134
- str = singularize(str);
18135
- return str;
18136
- }
18137
- exports.classify = classify;
18138
- /**
18139
- * This function adds foreign key support to every String object.
18140
- * @param str The subject string.
18141
- * @param dropIdUbar Default is to seperate id with an underbar at the end of the class name,
18142
- you can pass true to skip it.(optional)
18143
- * @returns Underscored plural nouns become the camel cased singular form.
18144
- * @example
18145
- *
18146
- * const inflection = require( 'inflection' );
18147
- *
18148
- * inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id'
18149
- * inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid'
18150
- */
18151
- function foreignKey(str, dropIdUbar) {
18152
- str = demodulize(str);
18153
- str = underscore(str) + (dropIdUbar ? "" : "_") + "id";
18154
- return str;
18155
- }
18156
- exports.foreignKey = foreignKey;
18157
- /**
18158
- * This function adds ordinalize support to every String object.
18159
- * @param str The subject string.
18160
- * @returns Return all found numbers their sequence like '22nd'.
18161
- * @example
18162
- *
18163
- * const inflection = require( 'inflection' );
18164
- *
18165
- * inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch'
18166
- */
18167
- function ordinalize(str) {
18168
- const strArr = str.split(" ");
18169
- const j = strArr.length;
18170
- for (let i = 0; i < j; i++) {
18171
- const k = parseInt(strArr[i], 10);
18172
- if (!isNaN(k)) {
18173
- const ltd = strArr[i].substring(strArr[i].length - 2);
18174
- const ld = strArr[i].substring(strArr[i].length - 1);
18175
- let suf = "th";
18176
- if (ltd != "11" && ltd != "12" && ltd != "13") {
18177
- if (ld === "1") suf = "st";
18178
- else if (ld === "2") suf = "nd";
18179
- else if (ld === "3") suf = "rd";
18180
- }
18181
- strArr[i] += suf;
18182
- }
18183
- }
18184
- return strArr.join(" ");
18185
- }
18186
- exports.ordinalize = ordinalize;
18187
- var transformFunctions = {
18188
- pluralize,
18189
- singularize,
18190
- camelize,
18191
- underscore,
18192
- humanize,
18193
- capitalize,
18194
- dasherize,
18195
- titleize,
18196
- demodulize,
18197
- tableize,
18198
- classify,
18199
- foreignKey,
18200
- ordinalize
18201
- };
18202
- /**
18203
- * This function performs multiple inflection methods on a string
18204
- * @param str The subject string.
18205
- * @param arr An array of inflection methods.
18206
- * @returns
18207
- * @example
18208
- *
18209
- * const inflection = require( 'inflection' );
18210
- *
18211
- * inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs'
18212
- */
18213
- function transform(str, arr) {
18214
- const j = arr.length;
18215
- for (let i = 0; i < j; i++) {
18216
- const methodFn = transformFunctions[arr[i]];
18217
- if (methodFn) str = methodFn(str);
18218
- }
18219
- return str;
18220
- }
18221
- exports.transform = transform;
18222
18902
  })))();
18223
18903
  function getDefaultOklch(palettes, color) {
18224
18904
  if ("color" in color) return convertColorNameToOklch(color.color);
@@ -18268,6 +18948,6 @@ function generateDefaultTheme() {
18268
18948
  };
18269
18949
  }
18270
18950
  //#endregion
18271
- export { AVAILABLE_FLAGS, AppUtils, AuthorizerExpressionParseError, AuthorizerExpressionParser, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DEFAULT_APPS_FOLDER, DEFAULT_LIBRARIES_FOLDER, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, DefinitionEntityType, EnumUtils, FIXED_COLOR_MAPPINGS, FeatureUtils, LibraryCompiler, LibraryUtils, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PackageCompiler, PluginSpecStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, RefExpressionParser, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, adminCrudActionCompilerSpec, adminCrudActionEntityType, adminCrudActionSpec, adminCrudColumnCompilerSpec, adminCrudColumnEntityType, adminCrudColumnSpec, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputEntityType, adminCrudInputSpec, adminCrudSectionColumnEntityType, adminSectionEntityType, appCompilerSpec, appEntityType, applyDefinitionDiff, applyDefinitionFixes, applyExpressionRenames, applyMergedDefinition, assignEntityIds, authConfigSpec, authModelsSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, baseLibrarySchema, baseLibraryValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, buildEnabledPluginFqnSet, buildModelExpressionContext, buildPackageName, checkUniqueField, checkUniqueFieldValue, cleanDefaultValues, collectDefinitionIssues, collectEntityArrays, collectEntityMetadata, collectExpressionIssues, collectFieldIssues, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppEntryType, createAppSchema, createAuthorizerRoleSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionDiff, createDefinitionDiffConfig, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntity, createEntityIssue, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createExpressionParserRef, createFeatureSchema, createFeaturesSchema, createFieldMapSpec, createIssueFixSetter, createLibraryWebConfig, createModelAuthorizerSchema, createModelBaseSchema, createModelGraphqlSchema, createModelIndexSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerType, createModelUniqueConstraintSchema, createPluginFieldMap, createPluginImplementationStoreWithNewPlugins, createPluginModelSyncChecker, createPluginModule, createPluginSpec, createPluginSpecStore, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createRefContextSlot, createRefContextSlotMap, createRefSchemaCollector, createRefSchemaVisitor, createSettingsSchema, createTemplateExtractorSchema, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, definitionFieldIssueRegistry, definitionFixRegistry, definitionIssueCheckerSpec, definitionRefRegistry, definitionSchema, definitionSchemaWithSlots, deleteEntity, deserializeSchemaWithTransformedReferences, diffDefinition, diffSerializedDefinitions, expressionParserCoreModule, expressionParserSpec, extractDefinitionRefs, featureEntityType, featureNameSchema, findDiscriminatedUnionMatch, findOrphanedUnionItems, fixDefinitionRefs, fixRefDeletions, formatOklch, generalSettingsSchema, generateCssBlockFromThemeColors, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getEntity, getEntityName, getLatestMigrationVersion, getManagedPluginsForPlugin, getMergeRule, getPackageDirectory, getPluginContext, getPluginDependencies, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, getUnmetPluginDependencies, getWebAppPluginData, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, libraryEntityType, libraryTypeSpec, listEntities, mergeDataWithSchema, mergeDefinition, mergeDefinitionContainer, modelAuthorizerRoleEntityType, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelIndexEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, nodeLibraryDefinitionSchemaEntry, normalizeOklch, oklchColor, paletteSchema, palettesSchema, parseAuthorizerExpression, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, partitionIssuesBySeverity, patchEntity, pluginAppCompiler, pluginConfigSpec, pluginDefaultsSpec, pluginDependencySchema, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, previewIssueFix, resolveIssuePath, rootCompilerSpec, runInPluginContext, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, sortEntityArrays, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, transformDataWithSchema, undefinedIfEmpty, undefinedIfFalsy, updateEntity, validateAuthorizerExpression, validatePluginDependencyGraph, visitAuthorizerExpression, walkDataWithSchema, walkSchemaStructure, webAppEntryType, webAppSchemaExtensionSpec, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
18951
+ export { AVAILABLE_FLAGS, AppUtils, AuthorizerExpressionParseError, AuthorizerExpressionParser, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DEFAULT_APPS_FOLDER, DEFAULT_LIBRARIES_FOLDER, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, DefinitionEntityType, EnumUtils, FIXED_COLOR_MAPPINGS, FeatureUtils, LibraryCompiler, LibraryUtils, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PackageCompiler, PluginSpecStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, RefExpressionParser, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, adminCrudActionCompilerSpec, adminCrudActionEntityType, adminCrudActionSpec, adminCrudColumnCompilerSpec, adminCrudColumnEntityType, adminCrudColumnSpec, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputEntityType, adminCrudInputSpec, adminCrudSectionColumnEntityType, adminSectionEntityType, appCompilerSpec, appEntityType, applyDefinitionDiff, applyDefinitionFixes, applyExpressionRenames, applyMergedDefinition, assignEntityIds, authConfigSpec, authModelsSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, baseLibrarySchema, baseLibraryValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, buildEnabledPluginFqnSet, buildModelExpressionContext, buildPackageName, checkUniqueField, checkUniqueFieldValue, cleanDefaultValues, collectDefinitionIssues, collectEntityArrays, collectEntityMetadata, collectExpressionIssues, collectFieldIssues, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppEntryType, createAppSchema, createAuthorizerRoleSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionDiff, createDefinitionDiffConfig, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntity, createEntityIssue, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createExpressionParserRef, createFeatureSchema, createFeaturesSchema, createFieldMapSpec, createIssueFixSetter, createLibraryWebConfig, createModelAuthorizerSchema, createModelBaseSchema, createModelGraphqlSchema, createModelIndexSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerType, createModelUniqueConstraintSchema, createPluginFieldMap, createPluginImplementationStoreWithNewPlugins, createPluginModelSyncChecker, createPluginModule, createPluginSpec, createPluginSpecStore, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createRefContextSlot, createRefContextSlotMap, createRefSchemaCollector, createRefSchemaVisitor, createSettingsSchema, createTemplateExtractorSchema, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, definitionFieldIssueRegistry, definitionFixRegistry, definitionIssueCheckerSpec, definitionRefRegistry, definitionSchema, definitionSchemaWithSlots, deleteEntity, deserializeSchemaWithTransformedReferences, diffDefinition, diffSerializedDefinitions, expressionParserCoreModule, expressionParserSpec, extractDefinitionRefs, featureEntityType, featureNameSchema, findDiscriminatedUnionMatch, findOrphanedUnionItems, fixDefinitionRefs, fixRefDeletions, formatOklch, generalSettingsSchema, generateCssBlockFromThemeColors, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getEntity, getEntityName, getLatestMigrationVersion, getManagedPluginsForPlugin, getMergeRule, getPackageDirectory, getPluginContext, getPluginDependencies, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, getUnmetPluginDependencies, getWebAppPluginData, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, libraryEntityType, libraryTypeSpec, listEntities, mergeDataWithSchema, mergeDefinition, mergeDefinitionContainer, modelAuthorizerRoleEntityType, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelIndexEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, nodeLibraryDefinitionSchemaEntry, normalizeOklch, oklchColor, paletteSchema, palettesSchema, parseAuthorizerExpression, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, partitionIssuesBySeverity, patchEntity, pluginAppCompiler, pluginConfigSpec, pluginDefaultsSpec, pluginDependencySchema, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, previewIssueFix, reactLibraryDefinitionSchemaEntry, resolveIssuePath, rootCompilerSpec, runInPluginContext, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, sortEntityArrays, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, transformDataWithSchema, undefinedIfEmpty, undefinedIfFalsy, updateEntity, validateAuthorizerExpression, validatePluginDependencyGraph, visitAuthorizerExpression, walkDataWithSchema, walkSchemaStructure, webAppEntryType, webAppSchemaExtensionSpec, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
18272
18952
 
18273
- //# sourceMappingURL=dist-D3CkiDKT.js.map
18953
+ //# sourceMappingURL=dist-BjxypexQ.js.map