@macrostrat/data-sheet 4.0.0-dev3 → 4.0.1

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 (212) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +44 -0
  3. package/dist/actions/builtin.cjs +36 -5
  4. package/dist/actions/builtin.cjs.map +1 -1
  5. package/dist/actions/builtin.d.ts +3 -2
  6. package/dist/actions/builtin.js +36 -5
  7. package/dist/actions/builtin.js.map +1 -1
  8. package/dist/actions/column-controls.cjs +149 -0
  9. package/dist/actions/column-controls.cjs.map +1 -0
  10. package/dist/actions/column-controls.d.ts +11 -0
  11. package/dist/actions/column-controls.js +147 -0
  12. package/dist/actions/column-controls.js.map +1 -0
  13. package/dist/actions/column-filter.cjs +68 -0
  14. package/dist/actions/column-filter.cjs.map +1 -0
  15. package/dist/actions/column-filter.d.ts +11 -0
  16. package/dist/actions/column-filter.js +66 -0
  17. package/dist/actions/column-filter.js.map +1 -0
  18. package/dist/actions/edit-actions.cjs +42 -0
  19. package/dist/actions/edit-actions.cjs.map +1 -0
  20. package/dist/actions/edit-actions.d.ts +14 -0
  21. package/dist/actions/edit-actions.js +42 -0
  22. package/dist/actions/edit-actions.js.map +1 -0
  23. package/dist/actions/filters.cjs +39 -23
  24. package/dist/actions/filters.cjs.map +1 -1
  25. package/dist/actions/filters.d.ts +6 -3
  26. package/dist/actions/filters.js +41 -25
  27. package/dist/actions/filters.js.map +1 -1
  28. package/dist/actions/index.d.ts +4 -0
  29. package/dist/actions/selection.cjs +51 -32
  30. package/dist/actions/selection.cjs.map +1 -1
  31. package/dist/actions/selection.d.ts +3 -7
  32. package/dist/actions/selection.js +51 -32
  33. package/dist/actions/selection.js.map +1 -1
  34. package/dist/actions/table-controls.cjs +41 -0
  35. package/dist/actions/table-controls.cjs.map +1 -0
  36. package/dist/actions/table-controls.d.ts +4 -0
  37. package/dist/actions/table-controls.js +39 -0
  38. package/dist/actions/table-controls.js.map +1 -0
  39. package/dist/actions/toolbar.cjs +69 -10
  40. package/dist/actions/toolbar.cjs.map +1 -1
  41. package/dist/actions/toolbar.d.ts +9 -6
  42. package/dist/actions/toolbar.js +69 -10
  43. package/dist/actions/toolbar.js.map +1 -1
  44. package/dist/actions/toolbar.module.sass.cjs +12 -7
  45. package/dist/actions/toolbar.module.sass.cjs.map +1 -1
  46. package/dist/actions/toolbar.module.sass.js +12 -7
  47. package/dist/actions/toolbar.module.sass.js.map +1 -1
  48. package/dist/actions/types.d.ts +49 -4
  49. package/dist/cell-renderer.cjs +150 -14
  50. package/dist/cell-renderer.cjs.map +1 -1
  51. package/dist/cell-renderer.d.ts +1 -1
  52. package/dist/cell-renderer.js +151 -15
  53. package/dist/cell-renderer.js.map +1 -1
  54. package/dist/components/cell-detail.cjs +24 -0
  55. package/dist/components/cell-detail.cjs.map +1 -0
  56. package/dist/components/cell-detail.d.ts +12 -0
  57. package/dist/components/cell-detail.js +24 -0
  58. package/dist/components/cell-detail.js.map +1 -0
  59. package/dist/components/editor-popup.cjs +28 -24
  60. package/dist/components/editor-popup.cjs.map +1 -1
  61. package/dist/components/editor-popup.js +29 -25
  62. package/dist/components/editor-popup.js.map +1 -1
  63. package/dist/components/index.d.ts +2 -2
  64. package/dist/components/text-areas.cjs +51 -7
  65. package/dist/components/text-areas.cjs.map +1 -1
  66. package/dist/components/text-areas.d.ts +4 -1
  67. package/dist/components/text-areas.js +51 -7
  68. package/dist/components/text-areas.js.map +1 -1
  69. package/dist/components/view-info.cjs +46 -9
  70. package/dist/components/view-info.cjs.map +1 -1
  71. package/dist/components/view-info.d.ts +5 -1
  72. package/dist/components/view-info.js +47 -10
  73. package/dist/components/view-info.js.map +1 -1
  74. package/dist/core.cjs +167 -73
  75. package/dist/core.cjs.map +1 -1
  76. package/dist/core.d.ts +53 -6
  77. package/dist/core.js +169 -75
  78. package/dist/core.js.map +1 -1
  79. package/dist/data-sheet.css +72 -123
  80. package/dist/filters/operators.cjs +91 -0
  81. package/dist/filters/operators.cjs.map +1 -0
  82. package/dist/filters/operators.d.ts +17 -0
  83. package/dist/filters/operators.js +91 -0
  84. package/dist/filters/operators.js.map +1 -0
  85. package/dist/index.cjs +38 -10
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.d.ts +2 -0
  88. package/dist/index.js +44 -16
  89. package/dist/index.js.map +1 -1
  90. package/dist/main.module.sass.cjs +13 -12
  91. package/dist/main.module.sass.cjs.map +1 -1
  92. package/dist/main.module.sass.js +13 -12
  93. package/dist/main.module.sass.js.map +1 -1
  94. package/dist/postgrest-table/data-loaders.cjs +255 -146
  95. package/dist/postgrest-table/data-loaders.cjs.map +1 -1
  96. package/dist/postgrest-table/data-loaders.d.ts +144 -46
  97. package/dist/postgrest-table/data-loaders.js +259 -150
  98. package/dist/postgrest-table/data-loaders.js.map +1 -1
  99. package/dist/postgrest-table/index.cjs +58 -169
  100. package/dist/postgrest-table/index.cjs.map +1 -1
  101. package/dist/postgrest-table/index.d.ts +5 -2
  102. package/dist/postgrest-table/index.js +63 -174
  103. package/dist/postgrest-table/index.js.map +1 -1
  104. package/dist/postgrest-table/loading-utils.cjs +0 -4
  105. package/dist/postgrest-table/loading-utils.cjs.map +1 -1
  106. package/dist/postgrest-table/loading-utils.js +1 -5
  107. package/dist/postgrest-table/loading-utils.js.map +1 -1
  108. package/dist/postgrest-table/main.module.sass.cjs +14 -13
  109. package/dist/postgrest-table/main.module.sass.cjs.map +1 -1
  110. package/dist/postgrest-table/main.module.sass.js +14 -13
  111. package/dist/postgrest-table/main.module.sass.js.map +1 -1
  112. package/dist/provider.cjs +68 -11
  113. package/dist/provider.cjs.map +1 -1
  114. package/dist/provider.d.ts +25 -0
  115. package/dist/provider.js +68 -11
  116. package/dist/provider.js.map +1 -1
  117. package/dist/renderers/column-header-cell.cjs +95 -75
  118. package/dist/renderers/column-header-cell.cjs.map +1 -1
  119. package/dist/renderers/column-header-cell.d.ts +3 -18
  120. package/dist/renderers/column-header-cell.js +98 -78
  121. package/dist/renderers/column-header-cell.js.map +1 -1
  122. package/dist/renderers/index.d.ts +0 -1
  123. package/dist/types.cjs +2 -0
  124. package/dist/types.cjs.map +1 -1
  125. package/dist/types.d.ts +84 -1
  126. package/dist/types.js +2 -0
  127. package/dist/types.js.map +1 -1
  128. package/dist/utils/column-spec.cjs.map +1 -1
  129. package/dist/utils/column-spec.d.ts +101 -1
  130. package/dist/utils/column-spec.js.map +1 -1
  131. package/dist/utils/debug-overlay.cjs +24 -0
  132. package/dist/utils/debug-overlay.cjs.map +1 -0
  133. package/dist/utils/debug-overlay.d.ts +4 -0
  134. package/dist/utils/debug-overlay.js +24 -0
  135. package/dist/utils/debug-overlay.js.map +1 -0
  136. package/dist/utils/index.cjs.map +1 -1
  137. package/dist/utils/index.d.ts +2 -0
  138. package/dist/utils/index.js.map +1 -1
  139. package/dist/utils/key-handling.cjs +52 -6
  140. package/dist/utils/key-handling.cjs.map +1 -1
  141. package/dist/utils/key-handling.js +52 -6
  142. package/dist/utils/key-handling.js.map +1 -1
  143. package/dist/utils/validation.cjs +41 -0
  144. package/dist/utils/validation.cjs.map +1 -0
  145. package/dist/utils/validation.d.ts +26 -0
  146. package/dist/utils/validation.js +41 -0
  147. package/dist/utils/validation.js.map +1 -0
  148. package/dist/zustand-store.cjs +119 -61
  149. package/dist/zustand-store.cjs.map +1 -1
  150. package/dist/zustand-store.js +121 -63
  151. package/dist/zustand-store.js.map +1 -1
  152. package/package.json +3 -3
  153. package/src/actions/builtin.ts +62 -7
  154. package/src/actions/column-controls.ts +185 -0
  155. package/src/actions/column-filter.ts +104 -0
  156. package/src/actions/edit-actions.ts +67 -0
  157. package/src/actions/filters.ts +54 -28
  158. package/src/actions/index.ts +4 -0
  159. package/src/actions/selection.ts +73 -54
  160. package/src/actions/table-controls.ts +46 -0
  161. package/src/actions/toolbar.module.sass +22 -2
  162. package/src/actions/toolbar.ts +113 -16
  163. package/src/actions/types.ts +49 -4
  164. package/src/cell-renderer.ts +211 -16
  165. package/src/components/cell-detail.ts +30 -0
  166. package/src/components/editor-popup.ts +39 -25
  167. package/src/components/index.ts +2 -2
  168. package/src/components/text-areas.ts +80 -16
  169. package/src/components/view-info.ts +63 -4
  170. package/src/core.ts +321 -103
  171. package/src/filters/operators.ts +127 -0
  172. package/src/index.ts +2 -0
  173. package/src/main.module.sass +6 -0
  174. package/src/postgrest-table/data-loaders.ts +459 -209
  175. package/src/postgrest-table/index.ts +81 -254
  176. package/src/postgrest-table/main.module.sass +11 -0
  177. package/src/provider.ts +109 -12
  178. package/src/renderers/column-header-cell.ts +60 -272
  179. package/src/renderers/index.ts +0 -1
  180. package/src/types.ts +76 -2
  181. package/src/utils/column-spec.ts +112 -1
  182. package/src/utils/debug-overlay.ts +22 -0
  183. package/src/utils/index.ts +2 -0
  184. package/src/utils/key-handling.ts +70 -6
  185. package/src/utils/validation.ts +72 -0
  186. package/src/zustand-store.ts +167 -60
  187. package/dist/components/actions.cjs +0 -12
  188. package/dist/components/actions.cjs.map +0 -1
  189. package/dist/components/actions.d.ts +0 -2
  190. package/dist/components/actions.js +0 -12
  191. package/dist/components/actions.js.map +0 -1
  192. package/dist/components/actions.module.sass.cjs +0 -12
  193. package/dist/components/actions.module.sass.cjs.map +0 -1
  194. package/dist/components/actions.module.sass.js +0 -11
  195. package/dist/components/actions.module.sass.js.map +0 -1
  196. package/dist/postgrest-table/lazy-loader-table.cjs +0 -27
  197. package/dist/postgrest-table/lazy-loader-table.cjs.map +0 -1
  198. package/dist/postgrest-table/lazy-loader-table.d.ts +0 -3
  199. package/dist/postgrest-table/lazy-loader-table.js +0 -27
  200. package/dist/postgrest-table/lazy-loader-table.js.map +0 -1
  201. package/dist/renderers/column-header-cell-postgrest.cjs +0 -216
  202. package/dist/renderers/column-header-cell-postgrest.cjs.map +0 -1
  203. package/dist/renderers/column-header-cell-postgrest.d.ts +0 -13
  204. package/dist/renderers/column-header-cell-postgrest.js +0 -216
  205. package/dist/renderers/column-header-cell-postgrest.js.map +0 -1
  206. package/dist/renderers/column-header-cell-postgrest.module.sass.cjs +0 -23
  207. package/dist/renderers/column-header-cell-postgrest.module.sass.cjs.map +0 -1
  208. package/dist/renderers/column-header-cell-postgrest.module.sass.js +0 -22
  209. package/dist/renderers/column-header-cell-postgrest.module.sass.js.map +0 -1
  210. package/src/components/actions.ts +0 -9
  211. package/src/postgrest-table/lazy-loader-table.ts +0 -25
  212. package/src/renderers/column-header-cell-postgrest.ts +0 -282
@@ -1094,31 +1094,31 @@
1094
1094
  .bp6-table-no-layout{
1095
1095
  display:inline-block;
1096
1096
  position:absolute;
1097
- }._data-sheet-container_11hm8_1, ._data-sheet-holder_11hm8_1 {
1097
+ }._data-sheet-container_13hbc_1, ._data-sheet-holder_13hbc_1 {
1098
1098
  flex: 1;
1099
1099
  min-height: 0;
1100
1100
  font-size: var(--data-sheet-font-size, 12px);
1101
1101
  line-height: var(--data-sheet-row-height, 20px);
1102
1102
  --data-sheet-cell-padding: 0px 8px;
1103
1103
  }
1104
- ._data-sheet-container_11hm8_1 .bp6-table-cell, ._data-sheet-holder_11hm8_1 .bp6-table-cell {
1104
+ ._data-sheet-container_13hbc_1 .bp6-table-cell, ._data-sheet-holder_13hbc_1 .bp6-table-cell {
1105
1105
  padding: var(--data-sheet-cell-padding);
1106
1106
  }
1107
- ._data-sheet-container_11hm8_1 .bp6-table-cell:not([class*=bp6-intent-]):not(.bp6-loading), ._data-sheet-holder_11hm8_1 .bp6-table-cell:not([class*=bp6-intent-]):not(.bp6-loading) {
1107
+ ._data-sheet-container_13hbc_1 .bp6-table-cell:not([class*=bp6-intent-]):not(.bp6-loading), ._data-sheet-holder_13hbc_1 .bp6-table-cell:not([class*=bp6-intent-]):not(.bp6-loading) {
1108
1108
  color: var(--text-color);
1109
1109
  }
1110
- ._data-sheet-container_11hm8_1 .bp6-table-cell, ._data-sheet-container_11hm8_1 .bp6-table-row-name, ._data-sheet-holder_11hm8_1 .bp6-table-cell, ._data-sheet-holder_11hm8_1 .bp6-table-row-name {
1110
+ ._data-sheet-container_13hbc_1 .bp6-table-cell, ._data-sheet-container_13hbc_1 .bp6-table-row-name, ._data-sheet-holder_13hbc_1 .bp6-table-cell, ._data-sheet-holder_13hbc_1 .bp6-table-row-name {
1111
1111
  font-size: var(--data-sheet-font-size);
1112
1112
  line-height: var(--data-sheet-row-height);
1113
1113
  }
1114
- ._data-sheet-container_11hm8_1 .bp6-table-row-name, ._data-sheet-holder_11hm8_1 .bp6-table-row-name {
1114
+ ._data-sheet-container_13hbc_1 .bp6-table-row-name, ._data-sheet-holder_13hbc_1 .bp6-table-row-name {
1115
1115
  color: var(--secondary-color);
1116
1116
  }
1117
- ._data-sheet-container_11hm8_1 .bp6-table-column-name, ._data-sheet-holder_11hm8_1 .bp6-table-column-name {
1117
+ ._data-sheet-container_13hbc_1 .bp6-table-column-name, ._data-sheet-holder_13hbc_1 .bp6-table-column-name {
1118
1118
  font-size: 1.2em;
1119
1119
  }
1120
1120
 
1121
- ._data-sheet-container_11hm8_1 {
1121
+ ._data-sheet-container_13hbc_1 {
1122
1122
  display: flex;
1123
1123
  position: relative;
1124
1124
  height: 100%;
@@ -1127,14 +1127,14 @@
1127
1127
  max-width: 100%;
1128
1128
  }
1129
1129
 
1130
- ._data-sheet_11hm8_1 {
1130
+ ._data-sheet_13hbc_1 {
1131
1131
  height: 100%;
1132
1132
  }
1133
- ._data-sheet_11hm8_1 .bp6-table-quadrant {
1133
+ ._data-sheet_13hbc_1 .bp6-table-quadrant {
1134
1134
  background-color: var(--panel-secondary-background-color);
1135
1135
  }
1136
1136
 
1137
- ._input-cell_11hm8_41 input {
1137
+ ._input-cell_13hbc_41 input {
1138
1138
  width: 100%;
1139
1139
  height: 100%;
1140
1140
  padding: 0;
@@ -1147,11 +1147,11 @@
1147
1147
  font-family: inherit;
1148
1148
  font-size: inherit;
1149
1149
  }
1150
- ._input-cell_11hm8_41 input:focus {
1150
+ ._input-cell_13hbc_41 input:focus {
1151
1151
  outline: none;
1152
1152
  }
1153
1153
 
1154
- ._value-viewer-cell_11hm8_58 .bp6-popover-target {
1154
+ ._value-viewer-cell_13hbc_58 .bp6-popover-target {
1155
1155
  width: 100%;
1156
1156
  height: var(--data-sheet-row-height);
1157
1157
  position: relative;
@@ -1159,7 +1159,7 @@
1159
1159
  margin: calc(var(--data-sheet-cell-padding) * -1);
1160
1160
  }
1161
1161
 
1162
- ._editor-cell_11hm8_66 .bp6-popover-target {
1162
+ ._editor-cell_13hbc_66 .bp6-popover-target {
1163
1163
  position: absolute;
1164
1164
  top: 0;
1165
1165
  left: 0;
@@ -1167,20 +1167,20 @@
1167
1167
  height: 100%;
1168
1168
  }
1169
1169
 
1170
- ._hidden-input_11hm8_74 {
1170
+ ._hidden-input_13hbc_74 {
1171
1171
  opacity: 0;
1172
1172
  position: absolute;
1173
1173
  width: 0;
1174
1174
  }
1175
1175
 
1176
- ._data-editor-anchor_11hm8_80 {
1176
+ ._data-editor-anchor_13hbc_80 {
1177
1177
  width: 100%;
1178
1178
  height: 100%;
1179
1179
  margin: 0;
1180
1180
  pointer-events: none;
1181
1181
  }
1182
1182
 
1183
- ._corner-drag-handle_11hm8_87 {
1183
+ ._corner-drag-handle_13hbc_87 {
1184
1184
  position: absolute;
1185
1185
  bottom: 0;
1186
1186
  right: 0;
@@ -1190,20 +1190,28 @@
1190
1190
  background-color: dodgerblue;
1191
1191
  }
1192
1192
 
1193
- ._data-sheet-toolbar_11hm8_97 {
1193
+ ._data-sheet-toolbar_13hbc_97 {
1194
1194
  display: flex;
1195
1195
  flex-direction: row;
1196
1196
  margin-bottom: 4px;
1197
1197
  }
1198
1198
 
1199
- ._spacer_11hm8_103 {
1199
+ ._spacer_13hbc_103 {
1200
1200
  flex-grow: 1;
1201
1201
  }
1202
1202
 
1203
- ._table-control_11hm8_107 {
1203
+ ._table-control_13hbc_107 {
1204
1204
  display: flex;
1205
1205
  flex-direction: row;
1206
1206
  margin-bottom: 0.25em;
1207
+ }
1208
+
1209
+ ._status-bar_13hbc_113 {
1210
+ display: flex;
1211
+ flex-direction: row;
1212
+ padding: 0.2em 0.5em;
1213
+ gap: 0.5em;
1214
+ background-color: var(--panel-secondary-background-color);
1207
1215
  }._interaction-barrier_19ibd_1 {
1208
1216
  pointer-events: all;
1209
1217
  }
@@ -1269,67 +1277,77 @@
1269
1277
  position: relative;
1270
1278
  flex-grow: 1;
1271
1279
  display: block;
1272
- }._actions-toolbar_ja9qu_1 {
1280
+ }._actions-toolbar_hs7ht_1 {
1273
1281
  display: flex;
1274
1282
  flex-direction: row;
1275
- gap: 4px;
1276
- margin-bottom: 4px;
1283
+ gap: 8px;
1277
1284
  align-items: center;
1285
+ min-height: 32px;
1286
+ padding: 4px 8px;
1287
+ background-color: var(--panel-secondary-background-color);
1278
1288
  }
1279
1289
 
1280
- ._spacer_ja9qu_9 {
1290
+ ._toolbar-title_hs7ht_11 {
1291
+ font-weight: 600;
1292
+ white-space: nowrap;
1293
+ min-width: 100px;
1294
+ }
1295
+
1296
+ ._spacer_hs7ht_17 {
1281
1297
  flex-grow: 1;
1282
1298
  }
1283
1299
 
1284
- ._action-popover-content_ja9qu_13, ._filter-config_ja9qu_13 {
1300
+ ._action-popover-content_hs7ht_21, ._filter-config_hs7ht_21 {
1285
1301
  padding: 12px;
1286
1302
  max-width: 300px;
1287
1303
  }
1288
- ._action-popover-content_ja9qu_13 p._description_ja9qu_17, ._filter-config_ja9qu_13 p._description_ja9qu_17 {
1304
+ ._action-popover-content_hs7ht_21 p._description_hs7ht_25, ._filter-config_hs7ht_21 p._description_hs7ht_25 {
1289
1305
  margin: 0 0 8px 0;
1290
1306
  color: var(--secondary-color);
1291
1307
  font-size: 0.9em;
1292
1308
  }
1293
1309
 
1294
- ._run-button_ja9qu_23 {
1310
+ ._run-button_hs7ht_31 {
1295
1311
  margin-top: 8px;
1296
1312
  width: 100%;
1297
1313
  }
1298
1314
 
1299
- ._filter-bar_ja9qu_28 {
1315
+ ._filter-bar_hs7ht_36 {
1300
1316
  display: flex;
1301
1317
  flex-direction: row;
1302
1318
  flex-wrap: wrap;
1303
1319
  gap: 4px;
1304
1320
  margin-bottom: 4px;
1305
1321
  align-items: center;
1306
- }._table-actions_1xz9a_1, ._table-action_1xz9a_1 {
1322
+ justify-content: flex-start;
1323
+ }
1324
+ ._filter-bar_hs7ht_36 > ._group_hs7ht_45 {
1307
1325
  display: flex;
1308
1326
  flex-direction: row;
1309
- gap: 0.5em;
1327
+ gap: 4px;
1310
1328
  }
1311
1329
 
1312
- ._table-actions_1xz9a_1 {
1313
- margin-bottom: 0.5em;
1314
- gap: 1em;
1315
- }._lithology_1w24u_1 {
1330
+ ._filter-window_hs7ht_51 {
1331
+ opacity: 0.8;
1332
+ font-variant-numeric: tabular-nums;
1333
+ }._lithology_xp6ib_1 {
1316
1334
  font-weight: bold;
1317
1335
  display: inline-block;
1318
1336
  padding: 0 0.5em;
1319
1337
  border-radius: 0.5em;
1320
1338
  }
1321
1339
 
1322
- ._inline-lithology_1w24u_8 ._lithology_1w24u_1 {
1340
+ ._inline-lithology_xp6ib_8 ._lithology_xp6ib_1 {
1323
1341
  line-height: 1em;
1324
1342
  }
1325
1343
 
1326
- ._basis-panel_1w24u_12 .bp6-tag {
1344
+ ._basis-panel_xp6ib_12 .bp6-tag {
1327
1345
  margin: 0 0.5em 0.5em 0;
1328
1346
  }
1329
- ._basis-panel_1w24u_12 td {
1347
+ ._basis-panel_xp6ib_12 td {
1330
1348
  vertical-align: top;
1331
1349
  }
1332
- ._basis-panel_1w24u_12 th {
1350
+ ._basis-panel_xp6ib_12 th {
1333
1351
  text-align: left;
1334
1352
  font-weight: 400;
1335
1353
  font-size: 0.9em;
@@ -1337,7 +1355,7 @@
1337
1355
  color: var(--secondary-color);
1338
1356
  }
1339
1357
 
1340
- ._basis-panel_1w24u_12, ._long-text_1w24u_26 {
1358
+ ._basis-panel_xp6ib_12, ._long-text_xp6ib_26 {
1341
1359
  max-width: 20em;
1342
1360
  padding: 8px;
1343
1361
  max-height: 30em;
@@ -1345,26 +1363,26 @@
1345
1363
  pointer-events: all;
1346
1364
  }
1347
1365
 
1348
- ._description_1w24u_34 {
1366
+ ._description_xp6ib_34 {
1349
1367
  font-style: italic;
1350
1368
  }
1351
1369
 
1352
- ._tag-header_1w24u_38 {
1370
+ ._tag-header_xp6ib_38 {
1353
1371
  font-weight: bold;
1354
1372
  text-transform: small-caps;
1355
1373
  font-size: 0.8em;
1356
1374
  color: var(--secondary-color);
1357
1375
  }
1358
1376
 
1359
- ._basis-col_1w24u_45 {
1377
+ ._basis-col_xp6ib_45 {
1360
1378
  max-width: 15em;
1361
1379
  }
1362
1380
 
1363
- ._liths_1w24u_49 > * {
1381
+ ._liths_xp6ib_49 > * {
1364
1382
  margin-right: 0.5em;
1365
1383
  }
1366
1384
 
1367
- ._data-sheet-outer_1w24u_53 {
1385
+ ._data-sheet-outer_xp6ib_53 {
1368
1386
  position: relative;
1369
1387
  flex: 1;
1370
1388
  display: flex;
@@ -1372,7 +1390,7 @@
1372
1390
  min-height: 0;
1373
1391
  }
1374
1392
 
1375
- ._toolbar_1w24u_61, ._info-bar_1w24u_61, ._server-filter-bar_1w24u_61 {
1393
+ ._toolbar_xp6ib_61, ._info-bar_xp6ib_61, ._server-filter-bar_xp6ib_61 {
1376
1394
  display: flex;
1377
1395
  flex-direction: row;
1378
1396
  flex-wrap: wrap;
@@ -1380,91 +1398,22 @@
1380
1398
  padding: var(--data-sheet-toolbar-gap, 4px) 0;
1381
1399
  }
1382
1400
 
1383
- ._info-bar_1w24u_61 {
1401
+ ._info-bar_xp6ib_61 {
1384
1402
  order: 10;
1385
1403
  }
1386
1404
 
1387
- ._tag-cell-content_1w24u_73 {
1388
- line-height: 1;
1389
- }._column-header-cell_it1ds_1 {
1390
- display: flex;
1391
- align-items: center;
1392
- width: 100%;
1393
- }
1394
-
1395
- ._column-name_it1ds_7 {
1396
- flex: 1;
1397
- overflow: hidden;
1398
- text-overflow: ellipsis;
1399
- white-space: nowrap;
1400
- }
1401
-
1402
- ._column-indicators_it1ds_14 {
1405
+ ._load-progress_xp6ib_73 {
1406
+ order: 11;
1403
1407
  display: flex;
1408
+ flex-direction: row;
1404
1409
  align-items: center;
1405
- gap: 2px;
1406
- margin-left: 4px;
1407
- flex-shrink: 0;
1408
- }
1409
- ._column-indicators_it1ds_14 .bp6-icon {
1410
- opacity: 0.7;
1411
- color: var(--text-color);
1412
- }
1413
-
1414
- ._sort-indicator_it1ds_26 .bp6-icon {
1415
- color: var(--intent-primary, #2965cc);
1416
- opacity: 1;
1417
- }
1418
-
1419
- ._filter-indicator_it1ds_31 .bp6-icon {
1420
- color: var(--intent-warning, #d99e0b);
1421
- opacity: 1;
1422
- }
1423
-
1424
- ._column-actions-popover_it1ds_36 {
1425
- padding: 12px;
1426
- min-width: 220px;
1427
- }
1428
-
1429
- ._popover-section_it1ds_41 {
1430
- margin-bottom: 12px;
1431
- }
1432
- ._popover-section_it1ds_41:last-child {
1433
- margin-bottom: 0;
1434
- }
1435
-
1436
- ._popover-section-title_it1ds_48 {
1437
- font-weight: 600;
1410
+ gap: 0.4em;
1411
+ padding: 2px 4px;
1438
1412
  font-size: 11px;
1439
- text-transform: uppercase;
1440
- letter-spacing: 0.5px;
1441
- color: var(--secondary-color, #5c7080);
1442
- margin-bottom: 6px;
1413
+ opacity: 0.75;
1414
+ font-variant-numeric: tabular-nums;
1443
1415
  }
1444
1416
 
1445
- ._sort-buttons_it1ds_57 {
1446
- display: flex;
1447
- gap: 4px;
1448
- }
1449
-
1450
- ._filter-row_it1ds_62 {
1451
- display: flex;
1452
- gap: 4px;
1453
- align-items: center;
1454
- }
1455
-
1456
- ._filter-operator-select_it1ds_68 {
1457
- flex-shrink: 0;
1458
- width: 80px;
1459
- }
1460
-
1461
- ._filter-value-input_it1ds_73 {
1462
- flex: 1;
1463
- }
1464
-
1465
- ._clear-section_it1ds_77 {
1466
- display: flex;
1467
- justify-content: flex-end;
1468
- padding-top: 4px;
1469
- border-top: 1px solid var(--divider-color, rgba(16, 22, 26, 0.15));
1417
+ ._tag-cell-content_xp6ib_85 {
1418
+ line-height: 1;
1470
1419
  }
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const OPERATOR_LABELS = {
4
+ eq: "=",
5
+ neq: "≠",
6
+ like: "like",
7
+ ilike: "contains",
8
+ gt: ">",
9
+ lt: "<",
10
+ gte: "≥",
11
+ lte: "≤",
12
+ is: "is"
13
+ };
14
+ const STRING_OPERATORS = ["eq", "neq", "ilike"];
15
+ const NUMERIC_OPERATORS = [
16
+ "eq",
17
+ "neq",
18
+ "gt",
19
+ "lt",
20
+ "gte",
21
+ "lte"
22
+ ];
23
+ const BOOLEAN_OPERATORS = ["eq", "neq"];
24
+ const DEFAULT_FILTER_OPERATORS = [
25
+ "eq",
26
+ "neq",
27
+ "ilike",
28
+ "gt",
29
+ "lt",
30
+ "gte",
31
+ "lte"
32
+ ];
33
+ const OPERATORS_BY_TYPE = {
34
+ string: STRING_OPERATORS,
35
+ number: NUMERIC_OPERATORS,
36
+ integer: NUMERIC_OPERATORS,
37
+ boolean: BOOLEAN_OPERATORS
38
+ };
39
+ function getOperatorsForColumn(col) {
40
+ if (typeof col.filterable === "object" && col.filterable.operators?.length) {
41
+ return col.filterable.operators;
42
+ }
43
+ if (col.dataType != null) {
44
+ return OPERATORS_BY_TYPE[col.dataType] ?? DEFAULT_FILTER_OPERATORS;
45
+ }
46
+ return DEFAULT_FILTER_OPERATORS;
47
+ }
48
+ function looseEq(a, b) {
49
+ if (a == null) return b == null || b === "";
50
+ const an = Number(a);
51
+ const bn = Number(b);
52
+ if (!Number.isNaN(an) && !Number.isNaN(bn) && String(a).trim() !== "") {
53
+ return an === bn;
54
+ }
55
+ return String(a).toLowerCase() === String(b).toLowerCase();
56
+ }
57
+ function testFilterOperator(cellValue, operator, filterValue) {
58
+ if (filterValue === "" || filterValue == null) return true;
59
+ switch (operator) {
60
+ case "eq":
61
+ return looseEq(cellValue, filterValue);
62
+ case "neq":
63
+ return !looseEq(cellValue, filterValue);
64
+ case "gt":
65
+ return Number(cellValue) > Number(filterValue);
66
+ case "lt":
67
+ return Number(cellValue) < Number(filterValue);
68
+ case "gte":
69
+ return Number(cellValue) >= Number(filterValue);
70
+ case "lte":
71
+ return Number(cellValue) <= Number(filterValue);
72
+ case "like":
73
+ return String(cellValue ?? "").includes(String(filterValue));
74
+ case "ilike":
75
+ return String(cellValue ?? "").toLowerCase().includes(String(filterValue).toLowerCase());
76
+ case "is": {
77
+ const v = String(filterValue).toLowerCase();
78
+ if (v === "null") return cellValue == null;
79
+ if (v === "true") return cellValue === true;
80
+ if (v === "false") return cellValue === false;
81
+ return looseEq(cellValue, filterValue);
82
+ }
83
+ default:
84
+ return true;
85
+ }
86
+ }
87
+ exports.DEFAULT_FILTER_OPERATORS = DEFAULT_FILTER_OPERATORS;
88
+ exports.OPERATOR_LABELS = OPERATOR_LABELS;
89
+ exports.getOperatorsForColumn = getOperatorsForColumn;
90
+ exports.testFilterOperator = testFilterOperator;
91
+ //# sourceMappingURL=operators.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operators.cjs","sources":["../../src/filters/operators.ts"],"sourcesContent":["/**\n * The canonical column-filter operator vocabulary, shared by the client-side\n * predicate (in-memory tables) and the server-side descriptor (a provider\n * translates it to a query). Promoted to core from the PostgREST column header,\n * so there is one operator model, not two.\n */\nimport type { ColumnSpec } from \"../utils/column-spec\";\n\n/** Column-filter operators. A superset that covers both in-memory comparison\n * and common backend query operators (PostgREST maps onto these names). */\nexport type FilterOperator =\n | \"eq\"\n | \"neq\"\n | \"like\"\n | \"ilike\"\n | \"gt\"\n | \"lt\"\n | \"gte\"\n | \"lte\"\n | \"is\";\n\n/** Human-readable operator labels for menus and active-filter tags. */\nexport const OPERATOR_LABELS: Record<FilterOperator, string> = {\n eq: \"=\",\n neq: \"≠\",\n like: \"like\",\n ilike: \"contains\",\n gt: \">\",\n lt: \"<\",\n gte: \"≥\",\n lte: \"≤\",\n is: \"is\",\n};\n\nconst STRING_OPERATORS: FilterOperator[] = [\"eq\", \"neq\", \"ilike\"];\nconst NUMERIC_OPERATORS: FilterOperator[] = [\n \"eq\",\n \"neq\",\n \"gt\",\n \"lt\",\n \"gte\",\n \"lte\",\n];\nconst BOOLEAN_OPERATORS: FilterOperator[] = [\"eq\", \"neq\"];\n\n/** Fallback when the column has no type information. */\nexport const DEFAULT_FILTER_OPERATORS: FilterOperator[] = [\n \"eq\",\n \"neq\",\n \"ilike\",\n \"gt\",\n \"lt\",\n \"gte\",\n \"lte\",\n];\n\nconst OPERATORS_BY_TYPE: Record<string, FilterOperator[]> = {\n string: STRING_OPERATORS,\n number: NUMERIC_OPERATORS,\n integer: NUMERIC_OPERATORS,\n boolean: BOOLEAN_OPERATORS,\n};\n\n/** Resolve the operators offered for a column: explicit `filterable.operators`\n * first, else inferred from `dataType`, else the defaults. */\nexport function getOperatorsForColumn(col: ColumnSpec): FilterOperator[] {\n if (typeof col.filterable === \"object\" && col.filterable.operators?.length) {\n return col.filterable.operators as FilterOperator[];\n }\n if (col.dataType != null) {\n return OPERATORS_BY_TYPE[col.dataType] ?? DEFAULT_FILTER_OPERATORS;\n }\n return DEFAULT_FILTER_OPERATORS;\n}\n\nfunction looseEq(a: any, b: any): boolean {\n if (a == null) return b == null || b === \"\";\n // Compare numerically when both look numeric, else as strings.\n const an = Number(a);\n const bn = Number(b);\n if (!Number.isNaN(an) && !Number.isNaN(bn) && String(a).trim() !== \"\") {\n return an === bn;\n }\n return String(a).toLowerCase() === String(b).toLowerCase();\n}\n\n/**\n * The client-side predicate for a `{ operator, value }` column filter — the\n * in-memory equivalent of what a backend applies server-side. An empty filter\n * value is treated as \"no constraint\" (matches everything).\n */\nexport function testFilterOperator(\n cellValue: any,\n operator: FilterOperator,\n filterValue: any,\n): boolean {\n if (filterValue === \"\" || filterValue == null) return true;\n switch (operator) {\n case \"eq\":\n return looseEq(cellValue, filterValue);\n case \"neq\":\n return !looseEq(cellValue, filterValue);\n case \"gt\":\n return Number(cellValue) > Number(filterValue);\n case \"lt\":\n return Number(cellValue) < Number(filterValue);\n case \"gte\":\n return Number(cellValue) >= Number(filterValue);\n case \"lte\":\n return Number(cellValue) <= Number(filterValue);\n case \"like\":\n return String(cellValue ?? \"\").includes(String(filterValue));\n case \"ilike\":\n return String(cellValue ?? \"\")\n .toLowerCase()\n .includes(String(filterValue).toLowerCase());\n case \"is\": {\n const v = String(filterValue).toLowerCase();\n if (v === \"null\") return cellValue == null;\n if (v === \"true\") return cellValue === true;\n if (v === \"false\") return cellValue === false;\n return looseEq(cellValue, filterValue);\n }\n default:\n return true;\n }\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,kBAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,IAAI;AACN;AAEA,MAAM,mBAAqC,CAAC,MAAM,OAAO,OAAO;AAChE,MAAM,oBAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,oBAAsC,CAAC,MAAM,KAAK;AAGjD,MAAM,2BAA6C;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,oBAAsD;AAAA,EAC1D,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AACX;AAIO,SAAS,sBAAsB,KAAmC;AACvE,MAAI,OAAO,IAAI,eAAe,YAAY,IAAI,WAAW,WAAW,QAAQ;AAC1E,WAAO,IAAI,WAAW;AAAA,EACxB;AACA,MAAI,IAAI,YAAY,MAAM;AACxB,WAAO,kBAAkB,IAAI,QAAQ,KAAK;AAAA,EAC5C;AACA,SAAO;AACT;AAEA,SAAS,QAAQ,GAAQ,GAAiB;A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ec } from '../utils/column-spec';
2
+ /** Column-filter operators. A superset that covers both in-memory comparison
3
+ * and common backend query operators (PostgREST maps onto these names). */
4
+ export type FilterOperator = "eq" | "neq" | "like" | "ilike" | "gt" | "lt" | "gte" | "lte" | "is";
5
+ /** Human-readable operator labels for menus and active-filter tags. */
6
+ export declare const OPERATOR_LABELS: Record<FilterOperator, string>;
7
+ /** Fallback when the column has no type information. */
8
+ export declare const DEFAULT_FILTER_OPERATORS: FilterOperator[];
9
+ /** Resolve the operators offered for a column: explicit `filterable.operators`
10
+ * first, else inferred from `dataType`, else the defaults. */
11
+ export declare function getOperatorsForColumn(col: ColumnSpec): FilterOperator[];
12
+ /**
13
+ * The client-side predicate for a `{ operator, value }` column filter — the
14
+ * in-memory equivalent of what a backend applies server-side. An empty filter
15
+ * value is treated as "no constraint" (matches everything).
16
+ */
17
+ export declare function testFilterOperator(cellValue: any, operator: FilterOperator, filterValue: any): boolean;
@@ -0,0 +1,91 @@
1
+ const OPERATOR_LABELS = {
2
+ eq: "=",
3
+ neq: "≠",
4
+ like: "like",
5
+ ilike: "contains",
6
+ gt: ">",
7
+ lt: "<",
8
+ gte: "≥",
9
+ lte: "≤",
10
+ is: "is"
11
+ };
12
+ const STRING_OPERATORS = ["eq", "neq", "ilike"];
13
+ const NUMERIC_OPERATORS = [
14
+ "eq",
15
+ "neq",
16
+ "gt",
17
+ "lt",
18
+ "gte",
19
+ "lte"
20
+ ];
21
+ const BOOLEAN_OPERATORS = ["eq", "neq"];
22
+ const DEFAULT_FILTER_OPERATORS = [
23
+ "eq",
24
+ "neq",
25
+ "ilike",
26
+ "gt",
27
+ "lt",
28
+ "gte",
29
+ "lte"
30
+ ];
31
+ const OPERATORS_BY_TYPE = {
32
+ string: STRING_OPERATORS,
33
+ number: NUMERIC_OPERATORS,
34
+ integer: NUMERIC_OPERATORS,
35
+ boolean: BOOLEAN_OPERATORS
36
+ };
37
+ function getOperatorsForColumn(col) {
38
+ if (typeof col.filterable === "object" && col.filterable.operators?.length) {
39
+ return col.filterable.operators;
40
+ }
41
+ if (col.dataType != null) {
42
+ return OPERATORS_BY_TYPE[col.dataType] ?? DEFAULT_FILTER_OPERATORS;
43
+ }
44
+ return DEFAULT_FILTER_OPERATORS;
45
+ }
46
+ function looseEq(a, b) {
47
+ if (a == null) return b == null || b === "";
48
+ const an = Number(a);
49
+ const bn = Number(b);
50
+ if (!Number.isNaN(an) && !Number.isNaN(bn) && String(a).trim() !== "") {
51
+ return an === bn;
52
+ }
53
+ return String(a).toLowerCase() === String(b).toLowerCase();
54
+ }
55
+ function testFilterOperator(cellValue, operator, filterValue) {
56
+ if (filterValue === "" || filterValue == null) return true;
57
+ switch (operator) {
58
+ case "eq":
59
+ return looseEq(cellValue, filterValue);
60
+ case "neq":
61
+ return !looseEq(cellValue, filterValue);
62
+ case "gt":
63
+ return Number(cellValue) > Number(filterValue);
64
+ case "lt":
65
+ return Number(cellValue) < Number(filterValue);
66
+ case "gte":
67
+ return Number(cellValue) >= Number(filterValue);
68
+ case "lte":
69
+ return Number(cellValue) <= Number(filterValue);
70
+ case "like":
71
+ return String(cellValue ?? "").includes(String(filterValue));
72
+ case "ilike":
73
+ return String(cellValue ?? "").toLowerCase().includes(String(filterValue).toLowerCase());
74
+ case "is": {
75
+ const v = String(filterValue).toLowerCase();
76
+ if (v === "null") return cellValue == null;
77
+ if (v === "true") return cellValue === true;
78
+ if (v === "false") return cellValue === false;
79
+ return looseEq(cellValue, filterValue);
80
+ }
81
+ default:
82
+ return true;
83
+ }
84
+ }
85
+ export {
86
+ DEFAULT_FILTER_OPERATORS,
87
+ OPERATOR_LABELS,
88
+ getOperatorsForColumn,
89
+ testFilterOperator
90
+ };
91
+ //# sourceMappingURL=operators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operators.js","sources":["../../src/filters/operators.ts"],"sourcesContent":["/**\n * The canonical column-filter operator vocabulary, shared by the client-side\n * predicate (in-memory tables) and the server-side descriptor (a provider\n * translates it to a query). Promoted to core from the PostgREST column header,\n * so there is one operator model, not two.\n */\nimport type { ColumnSpec } from \"../utils/column-spec\";\n\n/** Column-filter operators. A superset that covers both in-memory comparison\n * and common backend query operators (PostgREST maps onto these names). */\nexport type FilterOperator =\n | \"eq\"\n | \"neq\"\n | \"like\"\n | \"ilike\"\n | \"gt\"\n | \"lt\"\n | \"gte\"\n | \"lte\"\n | \"is\";\n\n/** Human-readable operator labels for menus and active-filter tags. */\nexport const OPERATOR_LABELS: Record<FilterOperator, string> = {\n eq: \"=\",\n neq: \"≠\",\n like: \"like\",\n ilike: \"contains\",\n gt: \">\",\n lt: \"<\",\n gte: \"≥\",\n lte: \"≤\",\n is: \"is\",\n};\n\nconst STRING_OPERATORS: FilterOperator[] = [\"eq\", \"neq\", \"ilike\"];\nconst NUMERIC_OPERATORS: FilterOperator[] = [\n \"eq\",\n \"neq\",\n \"gt\",\n \"lt\",\n \"gte\",\n \"lte\",\n];\nconst BOOLEAN_OPERATORS: FilterOperator[] = [\"eq\", \"neq\"];\n\n/** Fallback when the column has no type information. */\nexport const DEFAULT_FILTER_OPERATORS: FilterOperator[] = [\n \"eq\",\n \"neq\",\n \"ilike\",\n \"gt\",\n \"lt\",\n \"gte\",\n \"lte\",\n];\n\nconst OPERATORS_BY_TYPE: Record<string, FilterOperator[]> = {\n string: STRING_OPERATORS,\n number: NUMERIC_OPERATORS,\n integer: NUMERIC_OPERATORS,\n boolean: BOOLEAN_OPERATORS,\n};\n\n/** Resolve the operators offered for a column: explicit `filterable.operators`\n * first, else inferred from `dataType`, else the defaults. */\nexport function getOperatorsForColumn(col: ColumnSpec): FilterOperator[] {\n if (typeof col.filterable === \"object\" && col.filterable.operators?.length) {\n return col.filterable.operators as FilterOperator[];\n }\n if (col.dataType != null) {\n return OPERATORS_BY_TYPE[col.dataType] ?? DEFAULT_FILTER_OPERATORS;\n }\n return DEFAULT_FILTER_OPERATORS;\n}\n\nfunction looseEq(a: any, b: any): boolean {\n if (a == null) return b == null || b === \"\";\n // Compare numerically when both look numeric, else as strings.\n const an = Number(a);\n const bn = Number(b);\n if (!Number.isNaN(an) && !Number.isNaN(bn) && String(a).trim() !== \"\") {\n return an === bn;\n }\n return String(a).toLowerCase() === String(b).toLowerCase();\n}\n\n/**\n * The client-side predicate for a `{ operator, value }` column filter — the\n * in-memory equivalent of what a backend applies server-side. An empty filter\n * value is treated as \"no constraint\" (matches everything).\n */\nexport function testFilterOperator(\n cellValue: any,\n operator: FilterOperator,\n filterValue: any,\n): boolean {\n if (filterValue === \"\" || filterValue == null) return true;\n switch (operator) {\n case \"eq\":\n return looseEq(cellValue, filterValue);\n case \"neq\":\n return !looseEq(cellValue, filterValue);\n case \"gt\":\n return Number(cellValue) > Number(filterValue);\n case \"lt\":\n return Number(cellValue) < Number(filterValue);\n case \"gte\":\n return Number(cellValue) >= Number(filterValue);\n case \"lte\":\n return Number(cellValue) <= Number(filterValue);\n case \"like\":\n return String(cellValue ?? \"\").includes(String(filterValue));\n case \"ilike\":\n return String(cellValue ?? \"\")\n .toLowerCase()\n .includes(String(filterValue).toLowerCase());\n case \"is\": {\n const v = String(filterValue).toLowerCase();\n if (v === \"null\") return cellValue == null;\n if (v === \"true\") return cellValue === true;\n if (v === \"false\") return cellValue === false;\n return looseEq(cellValue, filterValue);\n }\n default:\n return true;\n }\n}\n"],"names":[],"mappings":"AAsBO,MAAM,kBAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,IAAI;AACN;AAEA,MAAM,mBAAqC,CAAC,MAAM,OAAO,OAAO;AAChE,MAAM,oBAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,oBAAsC,CAAC,MAAM,KAAK;AAGjD,MAAM,2BAA6C;AAAA,EACxD;AAAA,EACA;AAAA,EACA;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