@wix/wix-data-items-common 1.0.52

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 (228) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/api/ApiClient.js +186 -0
  3. package/dist/cjs/api/ApiClient.js.map +1 -0
  4. package/dist/cjs/api/QueryBase.js +200 -0
  5. package/dist/cjs/api/QueryBase.js.map +1 -0
  6. package/dist/cjs/api/QueryValidator.js +36 -0
  7. package/dist/cjs/api/QueryValidator.js.map +1 -0
  8. package/dist/cjs/api/WixDataAggregate.js +4 -0
  9. package/dist/cjs/api/WixDataAggregate.js.map +1 -0
  10. package/dist/cjs/api/WixDataApi.js +800 -0
  11. package/dist/cjs/api/WixDataApi.js.map +1 -0
  12. package/dist/cjs/api/WixDataFilter.js +2 -0
  13. package/dist/cjs/api/WixDataFilter.js.map +1 -0
  14. package/dist/cjs/api/WixDataPatch.js +139 -0
  15. package/dist/cjs/api/WixDataPatch.js.map +1 -0
  16. package/dist/cjs/api/WixDataQuery.js +4 -0
  17. package/dist/cjs/api/WixDataQuery.js.map +1 -0
  18. package/dist/cjs/api/WixDataResult.js +4 -0
  19. package/dist/cjs/api/WixDataResult.js.map +1 -0
  20. package/dist/cjs/api/common.js +14 -0
  21. package/dist/cjs/api/common.js.map +1 -0
  22. package/dist/cjs/api/errors.js +67 -0
  23. package/dist/cjs/api/errors.js.map +1 -0
  24. package/dist/cjs/api/impl/WixDataAggregateImpl.js +193 -0
  25. package/dist/cjs/api/impl/WixDataAggregateImpl.js.map +1 -0
  26. package/dist/cjs/api/impl/WixDataQueryImpl.js +116 -0
  27. package/dist/cjs/api/impl/WixDataQueryImpl.js.map +1 -0
  28. package/dist/cjs/api/impl/WixDataResultImpl.js +111 -0
  29. package/dist/cjs/api/impl/WixDataResultImpl.js.map +1 -0
  30. package/dist/cjs/api/index.js +32 -0
  31. package/dist/cjs/api/index.js.map +1 -0
  32. package/dist/cjs/api/types.js +2 -0
  33. package/dist/cjs/api/types.js.map +1 -0
  34. package/dist/cjs/errors/base-validator.js +92 -0
  35. package/dist/cjs/errors/base-validator.js.map +1 -0
  36. package/dist/cjs/errors/errors.js +155 -0
  37. package/dist/cjs/errors/errors.js.map +1 -0
  38. package/dist/cjs/errors/index.js +15 -0
  39. package/dist/cjs/errors/index.js.map +1 -0
  40. package/dist/cjs/errors/validations.js +91 -0
  41. package/dist/cjs/errors/validations.js.map +1 -0
  42. package/dist/cjs/external-types.d.js +2 -0
  43. package/dist/cjs/external-types.d.js.map +1 -0
  44. package/dist/cjs/filter/FilterTree.js +154 -0
  45. package/dist/cjs/filter/FilterTree.js.map +1 -0
  46. package/dist/cjs/filter/WithFilter.js +2 -0
  47. package/dist/cjs/filter/WithFilter.js.map +1 -0
  48. package/dist/cjs/filter/filterBuilder.js +53 -0
  49. package/dist/cjs/filter/filterBuilder.js.map +1 -0
  50. package/dist/cjs/filter/filterMixin.js +144 -0
  51. package/dist/cjs/filter/filterMixin.js.map +1 -0
  52. package/dist/cjs/filter/index.js +16 -0
  53. package/dist/cjs/filter/index.js.map +1 -0
  54. package/dist/cjs/index.js +120 -0
  55. package/dist/cjs/index.js.map +1 -0
  56. package/dist/cjs/sort/sortMixin.js +79 -0
  57. package/dist/cjs/sort/sortMixin.js.map +1 -0
  58. package/dist/cjs/test-types.d.js +2 -0
  59. package/dist/cjs/test-types.d.js.map +1 -0
  60. package/dist/cjs/types/api.js +4 -0
  61. package/dist/cjs/types/api.js.map +1 -0
  62. package/dist/cjs/types/data-item-types.js +46 -0
  63. package/dist/cjs/types/data-item-types.js.map +1 -0
  64. package/dist/cjs/types/error.js +2 -0
  65. package/dist/cjs/types/error.js.map +1 -0
  66. package/dist/cjs/types/index.js +16 -0
  67. package/dist/cjs/types/index.js.map +1 -0
  68. package/dist/cjs/utils/base64url.js +51 -0
  69. package/dist/cjs/utils/base64url.js.map +1 -0
  70. package/dist/cjs/utils/clone.js +21 -0
  71. package/dist/cjs/utils/clone.js.map +1 -0
  72. package/dist/cjs/utils/codec.js +64 -0
  73. package/dist/cjs/utils/codec.js.map +1 -0
  74. package/dist/cjs/utils/field-key-utils.js +18 -0
  75. package/dist/cjs/utils/field-key-utils.js.map +1 -0
  76. package/dist/cjs/utils/index.js +25 -0
  77. package/dist/cjs/utils/index.js.map +1 -0
  78. package/dist/cjs/utils/type-utils.js +54 -0
  79. package/dist/cjs/utils/type-utils.js.map +1 -0
  80. package/dist/esm/api/ApiClient.js +174 -0
  81. package/dist/esm/api/ApiClient.js.map +1 -0
  82. package/dist/esm/api/QueryBase.js +117 -0
  83. package/dist/esm/api/QueryBase.js.map +1 -0
  84. package/dist/esm/api/QueryValidator.js +32 -0
  85. package/dist/esm/api/QueryValidator.js.map +1 -0
  86. package/dist/esm/api/WixDataAggregate.js +2 -0
  87. package/dist/esm/api/WixDataAggregate.js.map +1 -0
  88. package/dist/esm/api/WixDataApi.js +829 -0
  89. package/dist/esm/api/WixDataApi.js.map +1 -0
  90. package/dist/esm/api/WixDataFilter.js +2 -0
  91. package/dist/esm/api/WixDataFilter.js.map +1 -0
  92. package/dist/esm/api/WixDataPatch.js +134 -0
  93. package/dist/esm/api/WixDataPatch.js.map +1 -0
  94. package/dist/esm/api/WixDataQuery.js +2 -0
  95. package/dist/esm/api/WixDataQuery.js.map +1 -0
  96. package/dist/esm/api/WixDataResult.js +2 -0
  97. package/dist/esm/api/WixDataResult.js.map +1 -0
  98. package/dist/esm/api/common.js +10 -0
  99. package/dist/esm/api/common.js.map +1 -0
  100. package/dist/esm/api/errors.js +52 -0
  101. package/dist/esm/api/errors.js.map +1 -0
  102. package/dist/esm/api/impl/WixDataAggregateImpl.js +214 -0
  103. package/dist/esm/api/impl/WixDataAggregateImpl.js.map +1 -0
  104. package/dist/esm/api/impl/WixDataQueryImpl.js +119 -0
  105. package/dist/esm/api/impl/WixDataQueryImpl.js.map +1 -0
  106. package/dist/esm/api/impl/WixDataResultImpl.js +100 -0
  107. package/dist/esm/api/impl/WixDataResultImpl.js.map +1 -0
  108. package/dist/esm/api/index.js +5 -0
  109. package/dist/esm/api/index.js.map +1 -0
  110. package/dist/esm/api/types.js +2 -0
  111. package/dist/esm/api/types.js.map +1 -0
  112. package/dist/esm/errors/base-validator.js +71 -0
  113. package/dist/esm/errors/base-validator.js.map +1 -0
  114. package/dist/esm/errors/errors.js +147 -0
  115. package/dist/esm/errors/errors.js.map +1 -0
  116. package/dist/esm/errors/index.js +5 -0
  117. package/dist/esm/errors/index.js.map +1 -0
  118. package/dist/esm/errors/validations.js +114 -0
  119. package/dist/esm/errors/validations.js.map +1 -0
  120. package/dist/esm/filter/FilterTree.js +148 -0
  121. package/dist/esm/filter/FilterTree.js.map +1 -0
  122. package/dist/esm/filter/WithFilter.js +2 -0
  123. package/dist/esm/filter/WithFilter.js.map +1 -0
  124. package/dist/esm/filter/filterBuilder.js +43 -0
  125. package/dist/esm/filter/filterBuilder.js.map +1 -0
  126. package/dist/esm/filter/filterMixin.js +137 -0
  127. package/dist/esm/filter/filterMixin.js.map +1 -0
  128. package/dist/esm/filter/index.js +5 -0
  129. package/dist/esm/filter/index.js.map +1 -0
  130. package/dist/esm/index.js +9 -0
  131. package/dist/esm/index.js.map +1 -0
  132. package/dist/esm/sort/sortMixin.js +74 -0
  133. package/dist/esm/sort/sortMixin.js.map +1 -0
  134. package/dist/esm/types/api.js +2 -0
  135. package/dist/esm/types/api.js.map +1 -0
  136. package/dist/esm/types/data-item-types.js +35 -0
  137. package/dist/esm/types/data-item-types.js.map +1 -0
  138. package/dist/esm/types/error.js +2 -0
  139. package/dist/esm/types/error.js.map +1 -0
  140. package/dist/esm/types/index.js +3 -0
  141. package/dist/esm/types/index.js.map +1 -0
  142. package/dist/esm/utils/base64url.js +57 -0
  143. package/dist/esm/utils/base64url.js.map +1 -0
  144. package/dist/esm/utils/clone.js +18 -0
  145. package/dist/esm/utils/clone.js.map +1 -0
  146. package/dist/esm/utils/codec.js +60 -0
  147. package/dist/esm/utils/codec.js.map +1 -0
  148. package/dist/esm/utils/field-key-utils.js +14 -0
  149. package/dist/esm/utils/field-key-utils.js.map +1 -0
  150. package/dist/esm/utils/index.js +7 -0
  151. package/dist/esm/utils/index.js.map +1 -0
  152. package/dist/esm/utils/type-utils.js +40 -0
  153. package/dist/esm/utils/type-utils.js.map +1 -0
  154. package/dist/types/api/ApiClient.d.ts +30 -0
  155. package/dist/types/api/ApiClient.d.ts.map +1 -0
  156. package/dist/types/api/QueryBase.d.ts +111 -0
  157. package/dist/types/api/QueryBase.d.ts.map +1 -0
  158. package/dist/types/api/QueryValidator.d.ts +12 -0
  159. package/dist/types/api/QueryValidator.d.ts.map +1 -0
  160. package/dist/types/api/WixDataAggregate.d.ts +320 -0
  161. package/dist/types/api/WixDataAggregate.d.ts.map +1 -0
  162. package/dist/types/api/WixDataApi.d.ts +52 -0
  163. package/dist/types/api/WixDataApi.d.ts.map +1 -0
  164. package/dist/types/api/WixDataFilter.d.ts +424 -0
  165. package/dist/types/api/WixDataFilter.d.ts.map +1 -0
  166. package/dist/types/api/WixDataPatch.d.ts +80 -0
  167. package/dist/types/api/WixDataPatch.d.ts.map +1 -0
  168. package/dist/types/api/WixDataQuery.d.ts +702 -0
  169. package/dist/types/api/WixDataQuery.d.ts.map +1 -0
  170. package/dist/types/api/WixDataResult.d.ts +144 -0
  171. package/dist/types/api/WixDataResult.d.ts.map +1 -0
  172. package/dist/types/api/common.d.ts +3 -0
  173. package/dist/types/api/common.d.ts.map +1 -0
  174. package/dist/types/api/errors.d.ts +12 -0
  175. package/dist/types/api/errors.d.ts.map +1 -0
  176. package/dist/types/api/impl/WixDataAggregateImpl.d.ts +76 -0
  177. package/dist/types/api/impl/WixDataAggregateImpl.d.ts.map +1 -0
  178. package/dist/types/api/impl/WixDataQueryImpl.d.ts +72 -0
  179. package/dist/types/api/impl/WixDataQueryImpl.d.ts.map +1 -0
  180. package/dist/types/api/impl/WixDataResultImpl.d.ts +34 -0
  181. package/dist/types/api/impl/WixDataResultImpl.d.ts.map +1 -0
  182. package/dist/types/api/index.d.ts +11 -0
  183. package/dist/types/api/index.d.ts.map +1 -0
  184. package/dist/types/api/types.d.ts +163 -0
  185. package/dist/types/api/types.d.ts.map +1 -0
  186. package/dist/types/errors/base-validator.d.ts +28 -0
  187. package/dist/types/errors/base-validator.d.ts.map +1 -0
  188. package/dist/types/errors/errors.d.ts +108 -0
  189. package/dist/types/errors/errors.d.ts.map +1 -0
  190. package/dist/types/errors/index.d.ts +5 -0
  191. package/dist/types/errors/index.d.ts.map +1 -0
  192. package/dist/types/errors/validations.d.ts +25 -0
  193. package/dist/types/errors/validations.d.ts.map +1 -0
  194. package/dist/types/filter/FilterTree.d.ts +56 -0
  195. package/dist/types/filter/FilterTree.d.ts.map +1 -0
  196. package/dist/types/filter/WithFilter.d.ts +470 -0
  197. package/dist/types/filter/WithFilter.d.ts.map +1 -0
  198. package/dist/types/filter/filterBuilder.d.ts +105 -0
  199. package/dist/types/filter/filterBuilder.d.ts.map +1 -0
  200. package/dist/types/filter/filterMixin.d.ts +61 -0
  201. package/dist/types/filter/filterMixin.d.ts.map +1 -0
  202. package/dist/types/filter/index.d.ts +8 -0
  203. package/dist/types/filter/index.d.ts.map +1 -0
  204. package/dist/types/index.d.ts +13 -0
  205. package/dist/types/index.d.ts.map +1 -0
  206. package/dist/types/sort/sortMixin.d.ts +46 -0
  207. package/dist/types/sort/sortMixin.d.ts.map +1 -0
  208. package/dist/types/types/api.d.ts +36 -0
  209. package/dist/types/types/api.d.ts.map +1 -0
  210. package/dist/types/types/data-item-types.d.ts +1448 -0
  211. package/dist/types/types/data-item-types.d.ts.map +1 -0
  212. package/dist/types/types/error.d.ts +23 -0
  213. package/dist/types/types/error.d.ts.map +1 -0
  214. package/dist/types/types/index.d.ts +4 -0
  215. package/dist/types/types/index.d.ts.map +1 -0
  216. package/dist/types/utils/base64url.d.ts +2 -0
  217. package/dist/types/utils/base64url.d.ts.map +1 -0
  218. package/dist/types/utils/clone.d.ts +2 -0
  219. package/dist/types/utils/clone.d.ts.map +1 -0
  220. package/dist/types/utils/codec.d.ts +3 -0
  221. package/dist/types/utils/codec.d.ts.map +1 -0
  222. package/dist/types/utils/field-key-utils.d.ts +2 -0
  223. package/dist/types/utils/field-key-utils.d.ts.map +1 -0
  224. package/dist/types/utils/index.d.ts +7 -0
  225. package/dist/types/utils/index.d.ts.map +1 -0
  226. package/dist/types/utils/type-utils.d.ts +11 -0
  227. package/dist/types/utils/type-utils.d.ts.map +1 -0
  228. package/package.json +89 -0
@@ -0,0 +1,470 @@
1
+ type Comparable = string | number | Date;
2
+ /**
3
+ * Type that allow filter construction.
4
+ * All construction methods return copy of self
5
+ */
6
+ export default interface WithFilter<Self extends WithFilter<Self>> {
7
+ /**
8
+ * Filter JSON, possibly invalid
9
+ * @internal
10
+ */
11
+ readonly filterTree: Record<string, any>;
12
+ /**
13
+ * Validation errors, if empty filterTree is valid
14
+ * @internal
15
+ */
16
+ readonly invalidArguments: string[];
17
+ /**
18
+ * Refines a query or filter to match items whose specified property value equals the specified value.
19
+ *
20
+ * The `eq()` function refines this filter to only
21
+ * match items where the value of the specified property equals the specified `value`.
22
+ *
23
+ * It only matches values of the same type. For example, a number value stored
24
+ * as a String type does not match the same number stored as a Number type.
25
+ *
26
+ * Matching strings with `eq()` is case sensitive, so `"text"` is not equal to `"Text"`.
27
+ *
28
+ * If `field` points to a collection field of type Array, `eq()` includes the item
29
+ * as long as at least one Array element matches the specified `value`.
30
+ * @public
31
+ * @documentationMaturity preview
32
+ * @param field - The property whose value will be compared with `value`.
33
+ * @requiredField field
34
+ * @param value - The value to match against.
35
+ * @requiredField value
36
+ * @returns An object representing the refined query.
37
+ */
38
+ eq(field: string, value: any): Self;
39
+ /**
40
+ * Refines a query or filter to match items whose specified property value does not equal the specified value.
41
+ *
42
+ * The `ne()` function refines this filter to only
43
+ * match items where the value of the specified property does not equal the specified `value`.
44
+ *
45
+ * It only matches values of the same type. For example, a number value stored
46
+ * as a String type is considered not equal to the same number stored as a Number type.
47
+ *
48
+ * Matching strings with `ne()` is case sensitive, so `"text"` is not equal to `"Text"`.
49
+ *
50
+ * If the value of the `field` property is an Array, `ne()` includes items
51
+ * in which none of the elements of the Array match the specified `value`.
52
+ * @public
53
+ * @documentationMaturity preview
54
+ * @param field - The property whose value will be compared with `value`.
55
+ * @requiredField field
56
+ * @param value - The value to match against.
57
+ * @requiredField value
58
+ * @returns An object representing the refined query.
59
+ */
60
+ ne(field: string, value: any): Self;
61
+ /**
62
+ * Refines a query or filter to match items whose specified property value is greater than or equal to the specified
63
+ * value.
64
+ *
65
+ * The `ge()` function refines this filter to only
66
+ * match items where the value of the specified property is greater than or
67
+ * equal to the specified `value`.
68
+ *
69
+ * It only matches values of the same type. For example, a number value stored
70
+ * as a String type does not match the same number stored as a Number type.
71
+ *
72
+ * If a property contains a number as a String, that value will be compared
73
+ * alphabetically and not numerically. Items that do not have a value for the
74
+ * specified property are ranked lowest.
75
+ *
76
+ * The following types of properties can be compared:
77
+ * - Number: Compares numerically.
78
+ * - Date: Compares JavaScript Date objects.
79
+ * - String: Compares lexicographically,
80
+ * so `"abc"` is greater than or equal to `"ABC"` (because of the greater than),
81
+ * but `"ABC"` is not greater than or equal to `"abc"`.
82
+ * - Reference: Compares by the ID of the referenced item as a String.
83
+ * @public
84
+ * @documentationMaturity preview
85
+ * @param field - The property whose value will be compared with `value`.
86
+ * @requiredField field
87
+ * @param value - The value to match against.
88
+ * @requiredField value
89
+ * @returns An object representing the refined query.
90
+ */
91
+ ge(field: string, value: Comparable): Self;
92
+ /**
93
+ * Alias for `ge()`
94
+ * @internal
95
+ */
96
+ gte(field: string, value: Comparable): Self;
97
+ /**
98
+ * Refines a query or filter to match items whose specified property value is greater than the specified value.
99
+ *
100
+ * The `gt()` function refines this filter to only match
101
+ * items where the value of the specified property is greater than the specified `value`.
102
+ *
103
+ * It only matches values of the same type. For example, a number value stored
104
+ * as a String type does not match the same number stored as a Number type.
105
+ *
106
+ * If a property contains a number as a String, that value will be compared
107
+ * alphabetically and not numerically. Items that do not have a value for the
108
+ * specified property are ranked lowest.
109
+ *
110
+ * The following types of properties can be compared:
111
+ * - Number: Compares numerically.
112
+ * - Date: Compares JavaScript Date objects.
113
+ * - String: Compares lexicographically, so `"text"` is greater than `"Text"`.
114
+ * - Reference: Compares by the ID of the referenced item as a String.
115
+ * @public
116
+ * @documentationMaturity preview
117
+ * @param field - The property whose value will be compared with `value`.
118
+ * @requiredField field
119
+ * @param value - The value to match against.
120
+ * @requiredField value
121
+ * @returns An object with the query definition, based on the supplied parameters.
122
+ */
123
+ gt(field: string, value: Comparable): Self;
124
+ /**
125
+ * Refines a query or filter to match items whose specified property value is less than or equal to the specified
126
+ * value.
127
+ *
128
+ * The `le()` function refines this filter to only match
129
+ * items where the value of the specified property is less than or equal to the
130
+ * specified `value`.
131
+ *
132
+ * It only matches values of the same type. For example, a number value stored
133
+ * as a String type does not match the same number stored as a Number type.
134
+ *
135
+ * If a property contains a number as a String, that value will be compared
136
+ * alphabetically and not numerically. Items that do not have a value for the
137
+ * specified property are ranked lowest.
138
+ *
139
+ * The following types of properties can be compared:
140
+ * - Number: Compares numerically.
141
+ * - Date: Compares JavaScript Date objects.
142
+ * - String: Compares lexicographically,
143
+ * so `"ABC"` is less than or equal to `"abc"` (because of the less than),
144
+ * but `"abc"` is not less than or equal to `"ABC"`.
145
+ * - Reference: Compares by the ID of the referenced item as a String.
146
+ * @public
147
+ * @documentationMaturity preview
148
+ * @param field - The property whose value will be compared with `value`.
149
+ * @requiredField field
150
+ * @param value - The value to match against.
151
+ * @requiredField value
152
+ * @returns An object representing the refined query.
153
+ */
154
+ le(field: string, value: Comparable): Self;
155
+ /**
156
+ * Alias for `le()`
157
+ * @internal
158
+ */
159
+ lte(field: string, value: Comparable): Self;
160
+ /**
161
+ * Refines a query or filter to match items whose specified property value is less than the specified value.
162
+ *
163
+ * The `lt()` function refines this filter to only match
164
+ * items where the value of the specified property is less than the specified `value`.
165
+ *
166
+ * It only matches values of the same type. For example, a number value stored
167
+ * as a String type does not match the same number stored as a Number type.
168
+ *
169
+ * If a property contains a number as a String, that value will be compared
170
+ * alphabetically and not numerically. Items that do not have a value for the
171
+ * specified property are ranked lowest.
172
+ *
173
+ * The following types of properties can be compared:
174
+ * - Number: Compares numerically.
175
+ * - Date: Compares JavaScript Date objects.
176
+ * - String: Compares lexicographically, so `"Text"` is less than `"text"`.
177
+ * - Reference: Compares by the ID of the referenced item as a String.
178
+ * @public
179
+ * @documentationMaturity preview
180
+ * @param field - The property whose value will be compared with `value`.
181
+ * @requiredField field
182
+ * @param value - The value to match against.
183
+ * @requiredField value
184
+ * @returns An object with the query definition, based on the supplied parameters.
185
+ */
186
+ lt(field: string, value: Comparable): Self;
187
+ /**
188
+ * Refines a query or filter to match items whose specified property has any value.
189
+ *
190
+ * The `isNotEmpty()` function refines this filter to only match items where the
191
+ * value of the specified property is not `null` or `undefined`.
192
+ *
193
+ * If the property contains any value at all for a given item, including the
194
+ * empty string or an invalid value, that item will match the query.
195
+ * @public
196
+ * @documentationMaturity preview
197
+ * @param field - The property in which to check for a value.
198
+ * @requiredField field
199
+ * @returns An object representing the refined query.
200
+ */
201
+ isNotEmpty(field: string): Self;
202
+ /**
203
+ * Refines a query or filter to match items whose specified property does not exist or does not have any value.
204
+ *
205
+ * The `isEmpty()` function refines this filter to only match items where the
206
+ * value of the specified property is `null` or `undefined` or the property does
207
+ * not exist.
208
+ *
209
+ * If the property contains any value at all for a given item, including the
210
+ * empty string or an invalid value, that item will match the query.
211
+ * @public
212
+ * @documentationMaturity preview
213
+ * @param field - The property in which to check for a value.
214
+ * @requiredField field
215
+ * @returns An object representing the refined query.
216
+ */
217
+ isEmpty(field: string): Self;
218
+ /**
219
+ * Refines a query or filter to match items whose specified property value starts with a specified string.
220
+ *
221
+ * The `startsWith()` function refines this filter to
222
+ * only match items where the value of the specified property starts with the
223
+ * defined `string`. Matching with `startsWith()` is not case sensitive, so `"TEXT"` starts
224
+ * with `"tex"`.
225
+ *
226
+ * You can only use `startsWith()` with a property whose value is a String or Reference.
227
+ * When using a Reference, `startsWith()` matches by the ID of the referenced item as Strings.
228
+ * @public
229
+ * @documentationMaturity preview
230
+ * @param field - The property whose value will be compared with the `value` parameter.
231
+ * @requiredField field
232
+ * @param value - The string to look for at the beginning of the specified property value.
233
+ * @requiredField value
234
+ * @returns A `WixDataQuery` object representing the refined query.
235
+ */
236
+ startsWith(field: string, value: string): Self;
237
+ /**
238
+ * Refines a query or filter to match items whose specified property value ends with a specified string.
239
+ *
240
+ * The `endsWith()` function refines this filter to only
241
+ * match items where the value of the specified property ends with the specified
242
+ * `string`. Matching with `endsWith()` is not case sensitive, so `"TEXT"` ends
243
+ * with `"ext"`.
244
+ *
245
+ * You can only use `endsWith()` with a property whose value is a String or Reference.
246
+ * When using a Reference, `endsWith()` matches by the ID of the referenced item as Strings.
247
+ * @public
248
+ * @documentationMaturity preview
249
+ * @param field - The property whose value will be compared with the string.
250
+ * @requiredField field
251
+ * @param value - The string to look for at the end of the specified property value.
252
+ * @requiredField value
253
+ * @returns A `WixDataQuery` object representing the refined query.
254
+ */
255
+ endsWith(field: string, value: string): Self;
256
+ /**
257
+ * Refines a query or filter to match items whose specified property value contains a specified string.
258
+ *
259
+ * The `contains()` function refines this filter to
260
+ * only match items where the value of the specified property contains the
261
+ * specified `string`. Matching with `contains()` is not case sensitive, so
262
+ * `"text"` does contain `"Tex"`.
263
+ *
264
+ * You can use `contains()` with a property whose value is a String or a Reference.
265
+ * For properties of type reference it is recommended that you use the [`eq()`](#eq)
266
+ * function instead of `contains()`. With properties that are References, `contains()`
267
+ * matches by the ID of the referenced item as a String.
268
+ * @public
269
+ * @documentationMaturity preview
270
+ * @param field - The property whose value will be compared with the string.
271
+ * @requiredField field
272
+ * @param value - The string to look for inside the specified property value.
273
+ * @requiredField value
274
+ * @returns An object representing the refined query.
275
+ */
276
+ contains(field: string, value: string): Self;
277
+ /**
278
+ * Refines a query or filter to match items whose specified property value equals any of the specified `values`
279
+ * parameters.
280
+ *
281
+ * The `hasSome()` function refines this filter to
282
+ * only match items where the value of the specified property equals any of
283
+ * the specified values.
284
+ *
285
+ * Matching strings with `hasSome()` is case sensitive, so `"text"` is not equal to `"Text"`.
286
+ *
287
+ * If the value of the specified property is an array, `hasSome()` will match
288
+ * if any of the elements of that array match any of the specified values.
289
+ *
290
+ * If the specified property contains multiple references, pass item IDs in the
291
+ * `value` property. In such a case, `hasSome()` will match if any of the
292
+ * multiple references match any of the specified ID values.
293
+ *
294
+ * You can specify a list of values to match by providing an array of
295
+ * String, Number, or Date types as the `value` parameters.
296
+ * @public
297
+ * @documentationMaturity preview
298
+ * @param field - The property whose value will be compared with `value`.
299
+ * @requiredField field
300
+ * @param values - The values to match against.
301
+ * @requiredField values
302
+ * @returns An object representing the refined query.
303
+ */
304
+ hasSome(field: string, ...values: Comparable[]): Self;
305
+ /**
306
+ * Overload for `hasSome()`
307
+ * @public
308
+ * @documentationMaturity preview
309
+ */
310
+ hasSome(field: string, values: Comparable[]): Self;
311
+ /**
312
+ * Alias for `hasSome()`
313
+ * @internal
314
+ */
315
+ in(field: string, ...values: Comparable[]): Self;
316
+ /**
317
+ * Alias for `hasSome()`
318
+ * @internal
319
+ */
320
+ in(field: string, values: Comparable[]): Self;
321
+ /**
322
+ * Refines a query or filter to match items whose specified property values equals all of the specified `value`
323
+ * parameters.
324
+ *
325
+ * The `hasAll()` function refines this filter to
326
+ * only match items where the value of the specified property equals all of
327
+ * the specified values.
328
+ *
329
+ * Matching strings with `hasAll()` is case sensitive, so `"text"` is not equal to `"Text"`.
330
+ *
331
+ * If the value of the specified property is an array, `hasAll()` will match
332
+ * if there is a match in the elements of that array for all of the specified
333
+ * values.
334
+ *
335
+ * You can specify a list of values to match by providing an array of
336
+ * String, Number, or Date types as the `value` parameters.
337
+ * @public
338
+ * @documentationMaturity preview
339
+ * @param field - The property whose value will be compared with `value`.
340
+ * @requiredField field
341
+ * @param values - The values to match against.
342
+ * @requiredField values
343
+ * @returns An object representing the refined query.
344
+ */
345
+ hasAll(field: string, ...values: Comparable[]): Self;
346
+ /**
347
+ * Overload for `hasAll()`
348
+ * @public
349
+ * @documentationMaturity preview
350
+ */
351
+ hasAll(field: string, values: Comparable[]): Self;
352
+ /**
353
+ * Exists filter.
354
+ * @returns `current $and (field $exists value)`
355
+ * @internal
356
+ */
357
+ exists(field: string, value: boolean): Self;
358
+ /**
359
+ * Adds an `or` condition to the query or filter.
360
+ *
361
+ * The `or()` function adds an inclusive `or` condition to this filter. A query or filter
362
+ * with an `or` returns all the items that match the query or filter as defined up to
363
+ * the `or` function, the items that match the query or filter passed to the `or`
364
+ * function, and the items that match both.
365
+ *
366
+ * The collections used by both the initial query and the query passed
367
+ * to the `or` function must be the same.
368
+ *
369
+ * The 'or()' function is designed to work with 2 or more queries or filters.
370
+ * If you use it on its own, it will return all the items in a collection.
371
+ * @public
372
+ * @documentationMaturity preview
373
+ * @param filter - A filter to add to the initial filter as an `or` condition.
374
+ * @requiredField filter
375
+ * @returns An object representing the refined query.
376
+ */
377
+ or(filter: WithFilter<any>): Self;
378
+ /**
379
+ * Adds an `and` condition to the query or filter.
380
+ *
381
+ * The `and()` function adds an and condition to this query. A query or filter with an `and` returns all the items
382
+ * that match the query or filter as defined up to the `and` function and also match the query or filter passed to
383
+ * the `and` function.
384
+ *
385
+ * Note that when chaining multiple `WixDataFilter` functions to a query an and condition is assumed. In such cases,
386
+ * you do not need to add a call to the `and()` function. For example, this query returns results where status is
387
+ * active **and** age is greater than 25.
388
+ * ```js
389
+ * wixData.query("myCollection").eq("status", "active").gt("age", 25);
390
+ * ```
391
+ *
392
+ * The `and()` function is needed when performing compound queries. For example, the final query in this set of
393
+ * queries returns results where status is either pending or rejected **and** age is either less than 25 or greater
394
+ * than 65.
395
+ * ```js
396
+ * let statusQuery = wixData
397
+ * .query("myCollection")
398
+ * .eq("status", "pending")
399
+ * .or(wixData.query("myCollection").eq("status", "rejected"));
400
+ *
401
+ * let ageQuery = wixData
402
+ * .query("myCollection")
403
+ * .lt("age", 25)
404
+ * .or(wixData.query("myCollection").gt("age", 65));
405
+ *
406
+ * let statusAndAgeQuery = statusQuery.and(ageQuery);
407
+ * ```
408
+ *
409
+ * The collections referenced by both the initial query and the query passed to the `and` function must be the same.
410
+ *
411
+ * The `and()` function is designed to work with 2 or more queries or filters. If you use it on its own, it will
412
+ * return all the items in a collection.
413
+ * @public
414
+ * @documentationMaturity preview
415
+ * @param filter - A filter to add to the initial query as an `and` condition.
416
+ * @requiredField filter
417
+ * @returns An object representing the refined query.
418
+ */
419
+ and(filter: WithFilter<any>): Self;
420
+ /**
421
+ * Adds a `not` condition to the query or filter.
422
+ *
423
+ * The `not()` function adds a `not` condition to this filter. A query or filter with a `not`
424
+ * returns all the items that match the query or filter as defined up to the `not`
425
+ * function, but don't match the query or filter passed to the `not` function.
426
+ *
427
+ * If the query or filter only contains a `not()` function, it returns all the items
428
+ * that don't match the query defined by the `not` method.
429
+ *
430
+ * The collections referenced by both the initial query and the query passed
431
+ * to the `not` function must be the same.
432
+ * @public
433
+ * @documentationMaturity preview
434
+ * @param filter - A filter to add to the initial filter as a `not` condition.
435
+ * @requiredField filter
436
+ * @returns An object representing the refined query.
437
+ */
438
+ not(filter: WithFilter<any>): Self;
439
+ /**
440
+ * Refines a query or filter to match items whose specified property value is within a specified range.
441
+ *
442
+ * The `between()` function refines this query to only match items where the value of the specified property is
443
+ * greater than or equal to `rangeStart` and less than `rangeEnd`.
444
+ *
445
+ * It only matches values of the same type. For example, a number value stored as a String type does not match the
446
+ * same number stored as a Number type.
447
+ *
448
+ * If a property contains a number as a String, that value will be compared alphabetically and not numerically. Items
449
+ * that do not have a value for the specified property are ranked lowest.
450
+ *
451
+ * The following types of properties can be compared:
452
+ * - Number: Compares numerically.
453
+ * - Date: Compares JavaScript Date objects.
454
+ * - String: Compares lexicographically, so
455
+ * - `"A"` and `"M"` are between `"A"` and `"Z"`, but `"a"`, `"m"`, `"z"` and `"Z"` are not.
456
+ * - `"A"`, `"M"`, `"Z"`, and `"a"` are between `"A"` and `"z"`, but `"z"` is not.
457
+ * @public
458
+ * @documentationMaturity preview
459
+ * @param field - The property whose value will be compared with rangeStart and rangeEnd.
460
+ * @requiredField field
461
+ * @param rangeStart - The beginning value of the range to match against.
462
+ * @requiredField rangeStart
463
+ * @param rangeEnd - The ending value of the range to match against.
464
+ * @requiredField rangeEnd
465
+ * @returns An object representing the refined query.
466
+ */
467
+ between<T extends Comparable>(field: string, rangeStart: T, rangeEnd: T): Self;
468
+ }
469
+ export {};
470
+ //# sourceMappingURL=WithFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithFilter.d.ts","sourceRoot":"","sources":["../../../src/filter/WithFilter.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,105 @@
1
+ import WithFilter from './WithFilter';
2
+ declare const FilterBuilder_base: {
3
+ new (origin?: {
4
+ validateCollectionName?: boolean | undefined;
5
+ filterTree?: object | undefined;
6
+ invalidArguments?: string[] | undefined;
7
+ encoder?: Function | undefined;
8
+ } | undefined): {
9
+ [x: string]: any;
10
+ readonly validateCollectionName: boolean;
11
+ or(otherQuery: any): any;
12
+ and(otherQuery: any): any;
13
+ not(otherQuery: any): any;
14
+ _validateCollectionName(query: any, originalQuery: any, operationName: string): any;
15
+ _matchesUrlized(field: any, operand: any): any;
16
+ getFilterModel(): any;
17
+ _filterValidator(filterOperatorName: string): import("@wix/filter-builder").Validator;
18
+ filterTree: any;
19
+ invalidArguments: any;
20
+ encoder: any;
21
+ eq(...args: any[]): any;
22
+ ne(...args: any[]): any;
23
+ ge(...args: any[]): any;
24
+ gt(...args: any[]): any;
25
+ le(...args: any[]): any;
26
+ lt(...args: any[]): any;
27
+ isNotEmpty(field: any): any;
28
+ isEmpty(field: any): any;
29
+ startsWith(...args: any[]): any;
30
+ endsWith(...args: any[]): any;
31
+ contains(...args: any[]): any;
32
+ hasSome(...args: any[]): any;
33
+ hasAll(...args: any[]): any;
34
+ between(field: any, rangeStart: any, rangeEnd: any): any;
35
+ setFilterModel(filterModel: any): any;
36
+ _binaryAnd(filterOperatorSymbol: any, operatorName: any, args: any): any;
37
+ _AndLogicalEquivalence(filterOperatorSymbol: any, operatorName: any, args: any): any;
38
+ _AndStringOperand(filterOperatorName: any, operatorName: any, args: any): any;
39
+ _AndSetOperand(filterOperatorName: any, operatorName: any, args: any): any;
40
+ _makeNewFilter(field: any, filterOperatorName: any, operand: any): any;
41
+ _buildFilter(field: any, filterOperatorName: any, operand: any): {};
42
+ _encode(operand: any): any;
43
+ _copy(filterTree: any, invalidArguments: any): any;
44
+ };
45
+ };
46
+ export declare class FilterBuilder extends FilterBuilder_base {
47
+ get constructorName(): string;
48
+ _build(): any;
49
+ }
50
+ declare const PlatformizedFilterBuilder_base: {
51
+ new (origin?: {
52
+ validateCollectionName?: boolean | undefined;
53
+ filterTree?: object | undefined;
54
+ invalidArguments?: string[] | undefined;
55
+ encoder?: Function | undefined;
56
+ } | undefined): {
57
+ [x: string]: any;
58
+ readonly validateCollectionName: boolean;
59
+ or(otherQuery: any): any;
60
+ and(otherQuery: any): any;
61
+ not(otherQuery: any): any;
62
+ _validateCollectionName(query: any, originalQuery: any, operationName: string): any;
63
+ _matchesUrlized(field: any, operand: any): any;
64
+ getFilterModel(): any;
65
+ _filterValidator(filterOperatorName: string): import("@wix/filter-builder").Validator;
66
+ filterTree: any;
67
+ invalidArguments: any;
68
+ encoder: any;
69
+ eq(...args: any[]): any;
70
+ ne(...args: any[]): any;
71
+ ge(...args: any[]): any;
72
+ gt(...args: any[]): any;
73
+ le(...args: any[]): any;
74
+ lt(...args: any[]): any;
75
+ isNotEmpty(field: any): any;
76
+ isEmpty(field: any): any;
77
+ startsWith(...args: any[]): any;
78
+ endsWith(...args: any[]): any;
79
+ contains(...args: any[]): any;
80
+ hasSome(...args: any[]): any;
81
+ hasAll(...args: any[]): any;
82
+ between(field: any, rangeStart: any, rangeEnd: any): any;
83
+ setFilterModel(filterModel: any): any;
84
+ _binaryAnd(filterOperatorSymbol: any, operatorName: any, args: any): any;
85
+ _AndLogicalEquivalence(filterOperatorSymbol: any, operatorName: any, args: any): any;
86
+ _AndStringOperand(filterOperatorName: any, operatorName: any, args: any): any;
87
+ _AndSetOperand(filterOperatorName: any, operatorName: any, args: any): any;
88
+ _makeNewFilter(field: any, filterOperatorName: any, operand: any): any;
89
+ _buildFilter(field: any, filterOperatorName: any, operand: any): {};
90
+ _encode(operand: any): any;
91
+ _copy(filterTree: any, invalidArguments: any): any;
92
+ };
93
+ };
94
+ export declare class PlatformizedFilterBuilder extends PlatformizedFilterBuilder_base implements WithFilter<PlatformizedFilterBuilder> {
95
+ in(...args: any[]): any;
96
+ exists(...args: any[]): any;
97
+ gte(field: any, value: any): any;
98
+ lte(field: any, value: any): any;
99
+ build(): any;
100
+ hasAnyFilter(): boolean;
101
+ }
102
+ export declare function platformizedFilterBuilder(options?: {}): PlatformizedFilterBuilder;
103
+ export declare function filterBuilderFactory(): FilterBuilder;
104
+ export default filterBuilderFactory;
105
+ //# sourceMappingURL=filterBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterBuilder.d.ts","sourceRoot":"","sources":["../../../src/filter/filterBuilder.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErC,qBAAa,aAAc,SAAQ,kBAAa;IAC9C,IAAI,eAAe,WAElB;IAED,MAAM;CAGP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,yBACX,SAAQ,8BACR,YAAW,UAAU,CAAC,yBAAyB,CAAC;IAEhD,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIjB,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIrB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAI1B,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAI1B,KAAK;IAIL,YAAY,IAAI,OAAO;CASxB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,KAAK,6BAErD;AAED,wBAAgB,oBAAoB,kBAEnC;AAED,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,61 @@
1
+ import { AggregatingValidator } from '../errors/base-validator';
2
+ import { Validator } from '@wix/filter-builder';
3
+ declare const filterMixin: (Base?: any) => {
4
+ new (origin?: {
5
+ validateCollectionName?: boolean;
6
+ filterTree?: object;
7
+ invalidArguments?: string[];
8
+ encoder?: Function;
9
+ }): {
10
+ [x: string]: any;
11
+ readonly validateCollectionName: boolean;
12
+ or(otherQuery: any): any;
13
+ and(otherQuery: any): any;
14
+ not(otherQuery: any): any;
15
+ _validateCollectionName(query: any, originalQuery: any, operationName: string): any;
16
+ _matchesUrlized(field: any, operand: any): any;
17
+ getFilterModel(): any;
18
+ _filterValidator(filterOperatorName: string): Validator;
19
+ filterTree: any;
20
+ invalidArguments: any;
21
+ encoder: any;
22
+ eq(...args: any[]): any;
23
+ ne(...args: any[]): any;
24
+ ge(...args: any[]): any;
25
+ gt(...args: any[]): any;
26
+ le(...args: any[]): any;
27
+ lt(...args: any[]): any;
28
+ isNotEmpty(field: any): any;
29
+ isEmpty(field: any): any;
30
+ startsWith(...args: any[]): any;
31
+ endsWith(...args: any[]): any;
32
+ contains(...args: any[]): any;
33
+ hasSome(...args: any[]): any;
34
+ hasAll(...args: any[]): any;
35
+ between(field: any, rangeStart: any, rangeEnd: any): any;
36
+ setFilterModel(filterModel: any): any;
37
+ _binaryAnd(filterOperatorSymbol: any, operatorName: any, args: any): any;
38
+ _AndLogicalEquivalence(filterOperatorSymbol: any, operatorName: any, args: any): any;
39
+ _AndStringOperand(filterOperatorName: any, operatorName: any, args: any): any;
40
+ _AndSetOperand(filterOperatorName: any, operatorName: any, args: any): any;
41
+ _makeNewFilter(field: any, filterOperatorName: any, operand: any): any;
42
+ _buildFilter(field: any, filterOperatorName: any, operand: any): {};
43
+ _encode(operand: any): any;
44
+ _copy(filterTree: any, invalidArguments: any): any;
45
+ };
46
+ };
47
+ export declare class FilterValidator extends AggregatingValidator {
48
+ operatorName: string;
49
+ private ctor;
50
+ private constructorName;
51
+ constructor(operatorName: string, previousInvalidArguments: string[], ctor: any, constructorName: string);
52
+ typeIsString(value: any): this;
53
+ typeIsStringNumberOrDate(value: any): this;
54
+ sameType(first: any, second: any): this;
55
+ typeIsStringNumberOrDateForAll(values: any): this;
56
+ validFieldName(field: any): this;
57
+ isInstanceOfSameClass(obj: any): this;
58
+ isForCollection(otherFilterBuilder: any, expectedCollectionName: any): this;
59
+ }
60
+ export default filterMixin;
61
+ //# sourceMappingURL=filterMixin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterMixin.d.ts","sourceRoot":"","sources":["../../../src/filter/filterMixin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAE/D,OAAO,EAEL,SAAS,EACV,MAAM,qBAAqB,CAAA;AAE5B,QAAA,MAAM,WAAW,UAAU,GAAG;kBAIL;QACnB,sBAAsB,CAAC,EAAE,OAAO,CAAA;QAChC,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QAC3B,OAAO,CAAC,EAAE,QAAQ,CAAA;KACnB;;yCAPgC,OAAO;uBAYzB,GAAG;wBAKF,GAAG;wBAKH,GAAG;uCAMV,GAAG,iBACK,GAAG,iBACH,MAAM;+BAyBA,GAAG,WAAW,GAAG;;6CA8BH,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQxD,CAAA;AAgDH,qBAAa,eAAgB,SAAQ,oBAAoB;IAE9C,YAAY,EAAE,MAAM;IAE3B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,eAAe;gBAHhB,YAAY,EAAE,MAAM,EAC3B,wBAAwB,EAAE,MAAM,EAAE,EAC1B,IAAI,EAAE,GAAG,EACT,eAAe,EAAE,MAAM;IAKjC,YAAY,CAAC,KAAK,EAAE,GAAG;IAOvB,wBAAwB,CAAC,KAAK,EAAE,GAAG;IAWnC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG;IAQhC,8BAA8B,CAAC,MAAM,EAAE,GAAG;IAU1C,cAAc,CAAC,KAAK,EAAE,GAAG;IAOzB,qBAAqB,CAAC,GAAG,EAAE,GAAG;IAY9B,eAAe,CAAC,kBAAkB,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG;CAWrE;AAgBD,eAAe,WAAW,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { validateFilterTree, validateFilterOrThrow } from './FilterTree';
2
+ import type { FilterTree } from './FilterTree';
3
+ import WithFilter from './WithFilter';
4
+ import { filterBuilderFactory, platformizedFilterBuilder, PlatformizedFilterBuilder } from './filterBuilder';
5
+ import filterMixin from './filterMixin';
6
+ export type { FilterTree };
7
+ export { validateFilterTree, validateFilterOrThrow, WithFilter, filterBuilderFactory, platformizedFilterBuilder, PlatformizedFilterBuilder, filterMixin, };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,YAAY,EAAE,UAAU,EAAE,CAAA;AAC1B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,WAAW,GACZ,CAAA"}