@vmscloud/moz-ui-grid-vue 0.1.41 → 0.2.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 (196) hide show
  1. package/README.md +1 -13
  2. package/dist/MozGrid.vue.d.ts +5 -0
  3. package/dist/chunks/{index-BDQ0HlwR.js → index-2qnzL9Zm.js} +183 -32
  4. package/dist/chunks/index-BLDAzbGv.cjs +14 -0
  5. package/dist/compat/MozGridVue.vue.d.ts +33 -3
  6. package/dist/compat/MozPivotVue.vue.d.ts +33 -3
  7. package/dist/excel/ClientExcelUploadPopup.d.ts +48 -0
  8. package/dist/excel/ClientExcelUploadPopup.vue.d.ts +5 -0
  9. package/dist/excel/icons.d.ts +3 -0
  10. package/dist/{legacy/composables → excel}/useClientExcelExport.d.ts +2 -2
  11. package/dist/{legacy/composables → excel}/useClientExcelStore.d.ts +1 -1
  12. package/dist/index.cjs +76 -25
  13. package/dist/index.d.ts +27 -9
  14. package/dist/index.js +700 -89163
  15. package/dist/locale/index.d.ts +49 -0
  16. package/dist/{legacy/store → store}/index.d.ts +28 -28
  17. package/dist/store.cjs +1 -1
  18. package/dist/store.js +4 -4
  19. package/dist/stories/FieldId.stories.d.ts +1 -1
  20. package/dist/stories/FooterAggregateDiagnosis.stories.d.ts +17 -0
  21. package/dist/stories/FooterAggregatePivot.stories.d.ts +37 -0
  22. package/dist/stories/MergedCellCopy.stories.d.ts +58 -0
  23. package/dist/stories/Pivot900Rows.stories.d.ts +40 -0
  24. package/dist/stories/PivotReactiveProxy.stories.d.ts +118 -0
  25. package/dist/stories/PivotSettingsPermissions.stories.d.ts +6 -0
  26. package/dist/stories/RowGroupAggregates.stories.d.ts +57 -0
  27. package/dist/stories/RowGroupDisabled.stories.d.ts +9 -0
  28. package/dist/stories/SummaryFooter.stories.d.ts +7 -0
  29. package/dist/{legacy/stories → stories}/_helpers/localDataLoader.d.ts +1 -1
  30. package/dist/{legacy/stories → stories}/_helpers/sampleData.d.ts +11 -11
  31. package/dist/style.css +1 -1
  32. package/dist/types/injection-keys.d.ts +2 -5
  33. package/dist/types/modules.d.ts +87 -0
  34. package/dist/{legacy/types → types}/pivot-props.d.ts +1 -1
  35. package/dist/{legacy/types → types}/props.d.ts +12 -3
  36. package/dist/{legacy/types → types}/toolbar.d.ts +1 -1
  37. package/dist/utils/excel/ExcelImportUtil.cjs +1 -1
  38. package/dist/utils/excel/ExcelImportUtil.js +1 -1
  39. package/dist/utils/excel/ExcelQueueManager.cjs +1 -1
  40. package/dist/utils/excel/ExcelQueueManager.js +1 -1
  41. package/dist/utils/excel/ExcelTaskRunner.cjs +1 -1
  42. package/dist/{legacy/utils → utils}/excel/ExcelTaskRunner.d.ts +1 -1
  43. package/dist/utils/excel/ExcelTaskRunner.js +1 -1
  44. package/dist/utils/excel/ExcelTimeoutManager.cjs +1 -1
  45. package/dist/utils/excel/ExcelTimeoutManager.js +2 -4
  46. package/dist/{legacy/utils → utils}/index.d.ts +1 -1
  47. package/dist/utils/toast.d.ts +12 -0
  48. package/docs/manual/examples.md +2 -2
  49. package/docs/manual/reference.md +120 -5
  50. package/docs/manual/reference_vue.md +24 -29
  51. package/package.json +6 -7
  52. package/dist/chunks/index-D5KJLBGW.cjs +0 -14
  53. package/dist/legacy/components/common/Dragging.d.ts +0 -17
  54. package/dist/legacy/components/common/Dragging.vue.d.ts +0 -49
  55. package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +0 -256
  56. package/dist/legacy/components/common/custom-cell/FormulaInput.vue.d.ts +0 -33
  57. package/dist/legacy/components/common/custom-cell/GridCustomCell.vue.d.ts +0 -23
  58. package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +0 -44
  59. package/dist/legacy/components/common/excel/ClientExcelUploadPopup.vue.d.ts +0 -201
  60. package/dist/legacy/components/common/excel/assets/IconDropZone.vue.d.ts +0 -2
  61. package/dist/legacy/components/common/excel/assets/IconFileUpload.vue.d.ts +0 -2
  62. package/dist/legacy/components/common/filter/GridFilter.vue.d.ts +0 -23
  63. package/dist/legacy/components/common/footer/GridFooter.vue.d.ts +0 -29
  64. package/dist/legacy/components/common/sort/GridSort.vue.d.ts +0 -23
  65. package/dist/legacy/components/common/toolbar/GridSearchInput.vue.d.ts +0 -33
  66. package/dist/legacy/components/grid/MozGridVue.vue.d.ts +0 -2041
  67. package/dist/legacy/components/grid/MozGridVueCore.vue.d.ts +0 -118
  68. package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.vue.d.ts +0 -10
  69. package/dist/legacy/components/grid/column-settings/AlignPicker.vue.d.ts +0 -10
  70. package/dist/legacy/components/grid/column-settings/ColorSwatchPicker.vue.d.ts +0 -11
  71. package/dist/legacy/components/grid/column-settings/ColumnListItem.vue.d.ts +0 -17
  72. package/dist/legacy/components/grid/column-settings/ColumnOptionsPanel.vue.d.ts +0 -32
  73. package/dist/legacy/components/grid/column-settings/FontSizePicker.vue.d.ts +0 -10
  74. package/dist/legacy/components/grid/column-settings/FontStyleToggles.vue.d.ts +0 -15
  75. package/dist/legacy/components/grid/column-settings/MaskPresetPicker.vue.d.ts +0 -14
  76. package/dist/legacy/components/grid/context-menu/GridContextMenu.vue.d.ts +0 -208
  77. package/dist/legacy/components/grid/group-panel/GroupPanel.vue.d.ts +0 -18
  78. package/dist/legacy/components/grid/toolbar/ColumnPicker.vue.d.ts +0 -17
  79. package/dist/legacy/components/grid/toolbar/ColumnSettings.vue.d.ts +0 -30
  80. package/dist/legacy/components/grid/toolbar/GridOptionModal.vue.d.ts +0 -211
  81. package/dist/legacy/components/grid/toolbar/GridToolBox.vue.d.ts +0 -69
  82. package/dist/legacy/components/pivot/MozPivotVue.vue.d.ts +0 -1868
  83. package/dist/legacy/components/pivot/PivotContextMenu.vue.d.ts +0 -634
  84. package/dist/legacy/components/pivot/PivotFieldChip.vue.d.ts +0 -16
  85. package/dist/legacy/components/pivot/PivotFieldDropZone.vue.d.ts +0 -26
  86. package/dist/legacy/components/pivot/PivotFieldPanel.vue.d.ts +0 -28
  87. package/dist/legacy/components/pivot/PivotOptionModal.vue.d.ts +0 -534
  88. package/dist/legacy/components/pivot/PivotToolBox.vue.d.ts +0 -79
  89. package/dist/legacy/components/pivot/chart/EChart.vue.d.ts +0 -13
  90. package/dist/legacy/components/pivot/chart/MozPivotChart.types.d.ts +0 -16
  91. package/dist/legacy/components/pivot/chart/MozPivotChart.vue.d.ts +0 -14
  92. package/dist/legacy/components/pivot/chart/PivotChartDetail.vue.d.ts +0 -13
  93. package/dist/legacy/components/pivot/chart/PivotChartMini.vue.d.ts +0 -18
  94. package/dist/legacy/components/pivot/chart/PivotChartMultiple.vue.d.ts +0 -18
  95. package/dist/legacy/components/pivot/chart/PivotChartToolbar.vue.d.ts +0 -38
  96. package/dist/legacy/components/pivot/chart/chartUtils.d.ts +0 -45
  97. package/dist/legacy/components/pivot/chart/useChartData.d.ts +0 -35
  98. package/dist/legacy/composables/useCellTooltip.d.ts +0 -8
  99. package/dist/legacy/composables/useColumnFormatter.d.ts +0 -45
  100. package/dist/legacy/composables/useColumnSettings.d.ts +0 -35
  101. package/dist/legacy/composables/useContextMenu.d.ts +0 -71
  102. package/dist/legacy/composables/useGridBulkEditor.d.ts +0 -36
  103. package/dist/legacy/composables/useGridChanges.d.ts +0 -28
  104. package/dist/legacy/composables/useGridColumns.d.ts +0 -37
  105. package/dist/legacy/composables/useGridCustomCell.d.ts +0 -34
  106. package/dist/legacy/composables/useGridEvents.d.ts +0 -14
  107. package/dist/legacy/composables/useGridFilter.d.ts +0 -38
  108. package/dist/legacy/composables/useGridInstance.d.ts +0 -16
  109. package/dist/legacy/composables/useGridSelect.d.ts +0 -18
  110. package/dist/legacy/composables/useGridSelection.d.ts +0 -18
  111. package/dist/legacy/composables/useGridSort.d.ts +0 -38
  112. package/dist/legacy/composables/useGridUndoRedo.d.ts +0 -28
  113. package/dist/legacy/composables/useGridValidation.d.ts +0 -28
  114. package/dist/legacy/composables/useMaskPresets.d.ts +0 -38
  115. package/dist/legacy/composables/useSearchHighlight.d.ts +0 -12
  116. package/dist/legacy/icons/IconAdd.vue.d.ts +0 -11
  117. package/dist/legacy/icons/IconArrowDownWithTail.vue.d.ts +0 -11
  118. package/dist/legacy/icons/IconArrowLeft.vue.d.ts +0 -11
  119. package/dist/legacy/icons/IconArrowLeftWithTail.vue.d.ts +0 -11
  120. package/dist/legacy/icons/IconArrowRight.vue.d.ts +0 -11
  121. package/dist/legacy/icons/IconArrowUpCenter.vue.d.ts +0 -11
  122. package/dist/legacy/icons/IconArrowUpWithTail.vue.d.ts +0 -11
  123. package/dist/legacy/icons/IconChart.vue.d.ts +0 -11
  124. package/dist/legacy/icons/IconClose.vue.d.ts +0 -13
  125. package/dist/legacy/icons/IconColorPicker.vue.d.ts +0 -11
  126. package/dist/legacy/icons/IconCustomCell.vue.d.ts +0 -11
  127. package/dist/legacy/icons/IconDecide.vue.d.ts +0 -11
  128. package/dist/legacy/icons/IconDownload.vue.d.ts +0 -11
  129. package/dist/legacy/icons/IconDragHandler.vue.d.ts +0 -11
  130. package/dist/legacy/icons/IconFilter.vue.d.ts +0 -11
  131. package/dist/legacy/icons/IconInfoFilled.vue.d.ts +0 -11
  132. package/dist/legacy/icons/IconRedo.vue.d.ts +0 -9
  133. package/dist/legacy/icons/IconReset.vue.d.ts +0 -9
  134. package/dist/legacy/icons/IconResetGridToolbar.vue.d.ts +0 -11
  135. package/dist/legacy/icons/IconSearch.vue.d.ts +0 -11
  136. package/dist/legacy/icons/IconSetting.vue.d.ts +0 -11
  137. package/dist/legacy/icons/IconSettingFilled.vue.d.ts +0 -11
  138. package/dist/legacy/icons/IconSort.vue.d.ts +0 -11
  139. package/dist/legacy/icons/IconToastWarning.vue.d.ts +0 -11
  140. package/dist/legacy/icons/IconUndo.vue.d.ts +0 -9
  141. package/dist/legacy/icons/index.d.ts +0 -25
  142. package/dist/legacy/index.d.ts +0 -69
  143. package/dist/legacy/shared/colorPresets.d.ts +0 -36
  144. package/dist/legacy/stories/Autofit.stories.d.ts +0 -9
  145. package/dist/legacy/stories/CRUD.stories.d.ts +0 -9
  146. package/dist/legacy/stories/CellAttributes.stories.d.ts +0 -19
  147. package/dist/legacy/stories/CellMask.stories.d.ts +0 -19
  148. package/dist/legacy/stories/ClientExcel.stories.d.ts +0 -8
  149. package/dist/legacy/stories/Clipboard.stories.d.ts +0 -12
  150. package/dist/legacy/stories/ColumnVisibility.stories.d.ts +0 -12
  151. package/dist/legacy/stories/ColumnWidths.stories.d.ts +0 -11
  152. package/dist/legacy/stories/CustomSortFilter.stories.d.ts +0 -7
  153. package/dist/legacy/stories/DynamicRowHeight.stories.d.ts +0 -13
  154. package/dist/legacy/stories/Editors.stories.d.ts +0 -9
  155. package/dist/legacy/stories/EmptyState.stories.d.ts +0 -10
  156. package/dist/legacy/stories/FormatRow.stories.d.ts +0 -20
  157. package/dist/legacy/stories/Grouping.stories.d.ts +0 -14
  158. package/dist/legacy/stories/HeaderGroup.stories.d.ts +0 -11
  159. package/dist/legacy/stories/LargeData.stories.d.ts +0 -19
  160. package/dist/legacy/stories/MasterDetail.stories.d.ts +0 -17
  161. package/dist/legacy/stories/Merge.stories.d.ts +0 -10
  162. package/dist/legacy/stories/MultiRow.stories.d.ts +0 -12
  163. package/dist/legacy/stories/MultiRowCrud.stories.d.ts +0 -11
  164. package/dist/legacy/stories/MultiRowGroup.stories.d.ts +0 -11
  165. package/dist/legacy/stories/Pinning.stories.d.ts +0 -44
  166. package/dist/legacy/stories/Pivot.stories.d.ts +0 -23
  167. package/dist/legacy/stories/PivotAdvanced.stories.d.ts +0 -20
  168. package/dist/legacy/stories/PivotChart.stories.d.ts +0 -23
  169. package/dist/legacy/stories/PivotNonNumeric.stories.d.ts +0 -27
  170. package/dist/legacy/stories/Preset.stories.d.ts +0 -11
  171. package/dist/legacy/stories/ReactiveAPI.stories.d.ts +0 -8
  172. package/dist/legacy/stories/ReactiveSafety.stories.d.ts +0 -28
  173. package/dist/legacy/stories/Repro.stories.d.ts +0 -36
  174. package/dist/legacy/stories/RowAPI.stories.d.ts +0 -12
  175. package/dist/legacy/stories/SelectionModes.stories.d.ts +0 -35
  176. package/dist/legacy/stories/Streaming.stories.d.ts +0 -12
  177. package/dist/legacy/stories/Tree.stories.d.ts +0 -13
  178. package/dist/legacy/stories/WorkerMode.stories.d.ts +0 -15
  179. package/dist/legacy/utils/dialog/dialog.d.ts +0 -19
  180. /package/dist/{legacy/store → store}/UploadRefreshRegistry.d.ts +0 -0
  181. /package/dist/{legacy/store → store}/excelStore.d.ts +0 -0
  182. /package/dist/{legacy/stores → stores}/index.d.ts +0 -0
  183. /package/dist/{legacy/stores → stores}/projectInfo/projectInfo.contract.d.ts +0 -0
  184. /package/dist/{legacy/types → types}/FileParameter.d.ts +0 -0
  185. /package/dist/{legacy/types → types}/StreamingParameter.d.ts +0 -0
  186. /package/dist/{legacy/types → types}/excel.types.d.ts +0 -0
  187. /package/dist/{legacy/types → types}/index.d.ts +0 -0
  188. /package/dist/{legacy/utils → utils}/async/debounce.d.ts +0 -0
  189. /package/dist/{legacy/utils → utils}/crypto/crypto.d.ts +0 -0
  190. /package/dist/{legacy/utils → utils}/excel/ExcelGuard.d.ts +0 -0
  191. /package/dist/{legacy/utils → utils}/excel/ExcelImportUtil.d.ts +0 -0
  192. /package/dist/{legacy/utils → utils}/excel/ExcelQueueManager.d.ts +0 -0
  193. /package/dist/{legacy/utils → utils}/excel/ExcelTimeoutManager.d.ts +0 -0
  194. /package/dist/{legacy/utils → utils}/file.d.ts +0 -0
  195. /package/dist/{legacy/utils → utils}/http/rest.d.ts +0 -0
  196. /package/dist/{legacy/utils → utils}/id/generator.d.ts +0 -0
@@ -195,6 +195,7 @@ grid.on('row:click', ({ rowIndex }) => {
195
195
  | `showHeader` | `boolean` | `true` | 헤더 표시 여부 |
196
196
  | `rowHeader` | `boolean \| RowHeaderConfig` | `false` | 좌측 행 헤더 컬럼(`_rowHeader`) 표시. `true`면 빈 셀(너비 40, 체크박스 트리거 시 체크박스), 객체면 `width`/`cellRenderer`/`headerRenderer`로 커스터마이즈 (→ [RowHeaderConfig](#rowheaderconfig)). `rowSelection.trigger`가 `'rowHeader'`/`'checkbox'`면 미지정이어도 자동 ON. (구 `showRowHeader` — deprecated alias 유지) |
197
197
  | `showStatusBar` | `boolean` | `true` | 상태 바 표시 |
198
+ | `summaryRow` | `'none' \| 'pinnedTop' \| 'pinnedBottom'` | `'none'` | 집계(총합계) 행 표시 위치. `FieldDef.aggregate` 가 지정된 컬럼을 모아 core 가 행을 직접 소유하며, `getConfig()` 에 실려 레이아웃 프리셋으로 저장·복원된다 |
198
199
  | `alternatingRows` | `boolean` | `false` | 줄무늬 행 스타일 |
199
200
  | `rowStyle` | `string` | — | 행 CSS 스타일 |
200
201
  | `headerStyle` | `string` | — | 헤더 CSS 스타일 |
@@ -352,7 +353,7 @@ grid.on('row:click', ({ rowIndex }) => {
352
353
  | 속성 | 타입 | 설명 |
353
354
  |------|------|------|
354
355
  | `mask` | `MaskConfig` | 마스킹 설정 |
355
- | `aggregate` | `AggregateFunc` | 그룹/피벗 집계 함수 |
356
+ | `aggregate` | `AggregateFunc` | 그룹/피벗 집계 함수. wrapper의 `useSummaryFooter: true`에서는 컬럼 하단 집계에도 사용한다(기본 OFF). 표시를 꺼도 함수는 유지된다 |
356
357
 
357
358
  ### 그룹 행
358
359
 
@@ -669,7 +670,7 @@ interface GridConfigExport {
669
670
  | **뷰 상태** | `sorts`, `filters` |
670
671
  | **서버/수동 row-model** | `rowModel`, `endReachedThresholdRows` |
671
672
  | **트리/디테일** | `treeConfig`, `masterDetailConfig` |
672
- | **UI 옵션** | `theme`, `rowHeight`, `headerHeight`, `rowSelection`, `cellSelection`, `cellSelectionImpliesRows`, `editable`, `tooltipMode`, `alternatingRows`, `showHeader`, `resizableColumns`, `reorderableColumns`, `rowHeader`, `reorderableRows`, `showDragHandleColumn`, `autoFitColumns`, `showStatusBar`, `locale`, `translations`, `keyFields` 등 |
673
+ | **UI 옵션** | `theme`, `rowHeight`, `headerHeight`, `rowSelection`, `cellSelection`, `cellSelectionImpliesRows`, `editable`, `tooltipMode`, `alternatingRows`, `showHeader`, `resizableColumns`, `reorderableColumns`, `rowHeader`, `reorderableRows`, `showDragHandleColumn`, `autoFitColumns`, `showStatusBar`, `summaryRow`, `locale`, `translations`, `keyFields` 등 |
673
674
 
674
675
  **제외되는 항목**
675
676
 
@@ -919,7 +920,7 @@ rowSelection(선택된 행들)·cellSelection(선택된 셀 range)은 서로 다
919
920
  |--------|------|------|
920
921
  | `addPinnedTop(row \| RowConfig)` | `Row` | 새 행/설정으로 상단 고정 행 추가 |
921
922
  | `addPinnedBottom(row \| RowConfig)` | `Row` | 새 행/설정으로 하단 고정 행 추가 |
922
- | `addGrandTotal(aggregates)` | `Row` | 전체 합계 행 추가 |
923
+ | `addGrandTotal(aggregates)` | `Row` | **(deprecated)** 전체 합계 행 추가 — `grid.setSummaryRow('pinnedBottom')` 를 사용할 것. 이 API 로 꽂은 행은 `getConfig()` 에 실리지 않아 레이아웃 프리셋으로 저장·복원되지 않는다 |
923
924
  | `addFilter()` | `Row` | 필터 행 추가 |
924
925
 
925
926
  #### 고정 관리
@@ -1229,6 +1230,55 @@ await grid.changes.commit({ allowInvalid: true });
1229
1230
 
1230
1231
  ---
1231
1232
 
1233
+ #### 그룹 집계 식별자
1234
+
1235
+ `RowGroupConfig.aggregates`의 각 항목에는 선택적인 `id`를 지정할 수 있습니다.
1236
+ 기본 ID는 내장 함수의 경우 `${func}_${column}`(예: `sum_salary`), 콜백은 `column`입니다.
1237
+ `getRowGroupAggregateId(aggregate)`를 core 패키지에서 가져와 유효 ID를 조회할 수 있습니다.
1238
+ 입력과 저장 설정은 원형을 보존하므로 이 조회가 생략된 `id`를 설정 객체에 써넣지는 않습니다.
1239
+
1240
+ - 명시한 ID는 그대로 사용합니다. 이름을 분해해 컬럼·함수를 추론하지 않습니다.
1241
+ - 같은 레벨에서 실제로 적용되는 집계 ID는 유일해야 합니다. 서로 다른 레벨의 scope에서는
1242
+ 같은 ID를 사용할 수 있지만, 모든 레벨 선언과 특정 레벨 선언의 scope가 겹치면 충돌합니다.
1243
+ - `setConfig` 및 그룹 컬럼 변경 시 충돌을 검사합니다. 충돌하면 예외가 발생하며 기존 그룹
1244
+ 설정은 변경되지 않습니다. 그룹 해제 중 보관한 선언은 그룹 복원 시 다시 검사합니다.
1245
+ - 공개 ID는 내부 계산 alias와 별개입니다. ID를 지정해도 기존 집계값·서식의 alias는 바뀌지 않습니다.
1246
+ - 콜백 기본값은 함수의 영속 식별자가 아닙니다. 같은 컬럼에 여러 콜백을 쓰면 ID를 명시해야 하며,
1247
+ 콜백 자체의 JSON 직렬화를 보장하지 않습니다. 수식에서 참조 가능한 문법 역시 별도 계약입니다.
1248
+
1249
+ #### 그룹행 정렬 기준
1250
+
1251
+ core의 `RowGroupConfig.sorts`는 같은 부모 아래 그룹행을 그룹 컬럼별로 정렬합니다.
1252
+ 각 규칙은 `{ column, direction, by }`이며 `column`은 해당 그룹 레벨의 컬럼 id,
1253
+ `direction`은 `'asc' | 'desc'`입니다.
1254
+
1255
+ - `id`: 정렬할 그룹 레벨의 컬럼 ID (집계 데이터 컬럼이 아님).
1256
+ - `basis: 'groupValue'`: **그룹 이름** — 원본 scalar 값을 비교합니다. 생략해도 이 기준입니다.
1257
+ - `basis: 'rowCount'`: 하위 데이터 행 개수.
1258
+ - `basis: 'aggregate', by: 'salaryTotal'`: 해당 레벨의 공개 집계 ID를 정확히 참조합니다.
1259
+ `by`는 문자열 하나이며 객체/배열이 아닙니다. 명시 ID가 없으면 `${func}_${column}`을 사용합니다.
1260
+ 공백 제거·별칭 추측 없이 ID를 비교하며 `scope`는 전체 그룹 경로와 정확히 일치해야 합니다.
1261
+ 유효하지 않은 활성 집계 참조는 오류입니다. `by`만 제공해도 집계 기준을 추론하지 않습니다.
1262
+
1263
+ ```ts
1264
+ await grid.rowGroup.setConfig({
1265
+ columns: ['dept', 'team'],
1266
+ aggregates: [{ id: 'salaryTotal', column: 'salary', func: 'sum', scope: ['dept', 'team'] }],
1267
+ sorts: [
1268
+ { id: 'dept', direction: 'asc', basis: 'groupValue' },
1269
+ { id: 'team', direction: 'desc', basis: 'aggregate', by: 'salaryTotal' },
1270
+ ],
1271
+ });
1272
+ ```
1273
+
1274
+ 저장본 0.4 → 0.5 마이그레이션은 옛 그룹 정렬 `column`/객체 `by`를 새 모델로 변환하고,
1275
+ 피벗 `SortState.byValue`는 동일한 scalar 값 그대로 `by`로 개명합니다. 피벗 집계/정렬 의미는 변하지 않습니다.
1276
+
1277
+ 그룹 내부 데이터 행의 일반 정렬은 별도로 유지됩니다. null/undefined는 기존 정렬 규약대로
1278
+ 오름차순에서는 뒤, 내림차순에서는 앞에 위치합니다. wrapper 정렬 패널의 **그룹 정렬 → 정렬 기준**에서도
1279
+ ‘그룹 이름’을 선택할 수 있습니다. 정렬 규칙이 없을 때와 새 규칙을 추가할 때 모두
1280
+ **그룹 이름 오름차순**이 기본입니다. 기존에 저장한 하위 행 개수·집계 정렬은 그대로 유지됩니다.
1281
+
1232
1282
  ### grid.tree — 트리 API
1233
1283
 
1234
1284
  > 트리 미설정 시 `getConfig()`는 `null` 반환.
@@ -2213,7 +2263,8 @@ grid.off('cell:click', handler);
2213
2263
  | `formattedValue` | `string` | 렌더링된 텍스트 (헤더는 컬럼 라벨) |
2214
2264
  | `tooltipText?` | `string` | 컬럼 커스텀 툴팁 문구(`ColumnDef.headerTooltip`/`cellTooltip`). 있으면 `formattedValue` 대신 표시에 우선 |
2215
2265
  | `isOverflowing` | `boolean` | 셀 내용이 잘려서 표시되는지 |
2216
- | `cellRect` | `DOMRect` | 셀/헤더 DOM 영역 |
2266
+ | `cellRect` | `DOMRect` | 셀/헤더 DOM 영역 (셀 전체. 뷰포트 밖까지 포함) |
2267
+ | `anchorRect` | `DOMRect` | **툴팁을 놓을 기준 영역** — 셀에서 지금 화면에 보이는 띠. 셀이 전부 보이면 `cellRect` 와 같다. 뷰포트보다 긴 세로 병합 셀은 글자가 가시 영역 중앙에 붙어 있으므로, 이 값을 기준으로 배치해야 툴팁이 글자를 따라간다 |
2217
2268
  | `element` | `HTMLElement` | 셀/헤더 DOM 요소 |
2218
2269
  | `errors?` | `string[]` | 유효성 검사 에러 메시지 (없으면 `undefined`). **셀 전용** |
2219
2270
  | `hasError?` | `boolean` | 에러 존재 여부 빠른 플래그. **셀 전용**(헤더엔 없음) |
@@ -2987,7 +3038,7 @@ interface SortState {
2987
3038
  /** 우선순위 (낮을수록 먼저 적용) */
2988
3039
  sequence: number;
2989
3040
  /** 피벗 전용: 값 필드 기준 정렬 (레이블 대신 집계 값 기준) */
2990
- byValue?: string;
3041
+ by?: string;
2991
3042
  /** 커스텀 정렬 키 함수 — 셀 값을 정렬 가능한 키로 변환 */
2992
3043
  sortKey?: (value: CellValue) => number | string;
2993
3044
  /**
@@ -3147,6 +3198,69 @@ await grid.filter([{
3147
3198
  | `conditionFiltersToFormula(filters)` | 조건식 배열 → 수식 문자열 (`ConditionFilterConversion`) |
3148
3199
  | `conditionFiltersToFormulaState(...)` | 조건식 배열 → `FormulaFilterState` |
3149
3200
 
3201
+ #### FilterGroupMap — 일반 행과 그룹 결과 필터
3202
+
3203
+ `grid.filter(map)`의 최상위 키는 **필터 UI 소유권**이다. 컬럼 ID가 아니다.
3204
+ `scope` 생략 또는 `'row'`는 일반 행 필터, `'group'`은 행 그룹 결과 필터다.
3205
+ 그룹 **조건식**의 `states[].id`는 그룹 기준 컬럼 ID이며, 각 조건이 자신의 `basis`를 지정한다.
3206
+ **수식**은 일반 필터처럼 `operator: 'formula'`와 `expression` 하나로 저장한다.
3207
+ wrapper는 수식의 `id`를 `'__formula__'`로 쓰며, 대상 그룹은 수식 안의 참조로 정한다.
3208
+
3209
+ ```typescript
3210
+ await grid.rowGroup.setConfig({
3211
+ columns: ['dept', 'team'],
3212
+ aggregates: [{ id: 'total', column: 'amount', func: 'sum' }],
3213
+ sorts: [{ id: 'dept', basis: 'aggregate', by: 'total', direction: 'desc' }],
3214
+ });
3215
+ await grid.filter({
3216
+ rowEditor: {
3217
+ type: 'conditional', priority: 0, applied: true,
3218
+ states: [{ id: 'amount', operator: 'gte', filterValue: 0, sequence: 0 }],
3219
+ },
3220
+ groupEditor: {
3221
+ scope: 'group', type: 'conditional', priority: 1, applied: true,
3222
+ states: [
3223
+ { id: 'dept', basis: 'aggregate', by: 'total', operator: 'gt', filterValue: 50, sequence: 0 },
3224
+ { id: 'team', basis: 'groupValue', operator: 'eq', filterValue: 'X', logical: 'and', sequence: 1 },
3225
+ ],
3226
+ },
3227
+ });
3228
+ ```
3229
+
3230
+ - `basis: 'groupValue'`: 해당 그룹의 원본 값. 표시 문자열이나 마스크 변환 결과가 아니다.
3231
+ - `basis: 'rowCount'`: 해당 그룹의 데이터 행 개수.
3232
+ - `basis: 'aggregate'`: 해당 레벨 집계의 공개 ID를 `by`로 정확히 참조한다.
3233
+ ID 문자열을 분해해 컬럼·함수를 추측하지 않는다.
3234
+ - 수식 참조는 `GROUP("id", "groupValue")`, `GROUP("id", "rowCount")`,
3235
+ `GROUP("id", "aggregate", "by")`다. 인자는 정확한 ID와 basis 문자열 리터럴이며 기본 레벨은 없다.
3236
+ 예: `{ id: '__formula__', operator: 'formula', expression: 'GROUP("dept", "aggregate", "total") > 50 AND GROUP("team", "groupValue") = "X"', sequence: 0 }`.
3237
+ 한 수식에서 같은 최하위 경로의 여러 레벨·집계·그룹 값·행 개수를 비교하거나 계산할 수 있다.
3238
+ `GROUP`은 그룹 수식 컨텍스트의 참조이며 일반 행 수식/조건부 서식의 함수가 아니다.
3239
+ 기존 `id: 'dept', expression: '$total > 50'` 로컬 집계 수식도 읽을 수 있다.
3240
+ - wrapper 고급 필터의 일반/그룹 탭은 동일한 textarea와 조건 트리 편집기를 공유한다.
3241
+ 그룹 자동완성은 `[현재 그룹 라벨 · 대상 라벨]`을 제안하며 저장 직전에 명시적인 `GROUP(...)` 참조로 변환한다.
3242
+ 트리에서 표현할 수 없는 계산식은 원문을 보존하고 수식 모드에서 편집한다.
3243
+ 기존 조건 목록은 열기만 해서는 재저장하지 않으며, 실제 편집 시 기존 좌결합을 보존한 수식 하나로 저장한다.
3244
+ - `sequence` 순서로 `logical`을 좌→우 결합한다. 묶음 간에는 AND를 적용한다.
3245
+ 부모와 자식 조건은 **같은 최하위 그룹 경로**에서 평가하므로 부모가 false여도 OR 자식 조건을 평가한다.
3246
+ - 일반 행 필터 후 **A 집계로 한 번 판정 → 생존 데이터로 B 재집계·정렬**한다.
3247
+ 예를 들어 부모 A 합계가 100이라 통과한 뒤 팀 필터로 B 합계가 10이 되어도 다시 탈락시키지 않는다.
3248
+ - `applied: false`는 저장하되 실행하지 않는다. 묶음의 대상 그룹 레벨 중 하나라도 없으면
3249
+ **묶음 전체**가 실행에서 제외되며 원본 상태는 유지된다. 활성 묶음의 잘못된 집계 참조·수식은 오류다.
3250
+ - `getFilterGroups()` 및 `getViewState().filterGroups`가 원본 맵을 반환한다.
3251
+ `getViewState().filters`는 실행 가능한 일반 행 필터의 평탄화 결과다.
3252
+ `getConfig()`/`applyConfig()`와 `getViewState()`/`setViewState()` 왕복은 소유 맵을 보존한다.
3253
+ - 피벗에서는 행 그룹 결과 필터를 실행하지 않고 보존한다. 서버 row-model도 상태만 보존하며
3254
+ 서버가 준 행을 로컬에서 탈락시키지 않는다.
3255
+ - Worker는 조건식·수식을 지원한다. 실행 대상 그룹의 함수형 `custom` predicate는 직렬화할 수 없어
3256
+ 명시적으로 거부한다. 비활성·대상 레벨 부재 묶음은 Worker 전송에서 제외하되 원본에서 삭제하지 않는다.
3257
+ - 집계 `id`는 선택적이며 생략 시 `getRowGroupAggregateId()`의 결정적 계산 alias를 사용한다.
3258
+ 같은 레벨에서 ID가 충돌하면 core는 거부한다. wrapper는 동일 컬럼·함수의 중복 추가·변경을 막으며,
3259
+ 같은 컬럼의 다른 함수 집계는 허용한다. 자동 접미사나 UUID를 붙이지 않는다.
3260
+
3261
+ 저장본 버전 `0.5`는 wrapper migrator에서 기존 그룹 정렬과 피벗 `byValue`를 새 정렬 구조로 변환한다.
3262
+ 새 그룹 필터 편집 UI는 제공하지 않으며, 위 core 설정으로 적용한다.
3263
+
3150
3264
  #### ChangesSummary
3151
3265
 
3152
3266
  `grid.changes.getAll()` 반환 타입:
@@ -3784,6 +3898,7 @@ interface GridConfigSnapshot {
3784
3898
  showDragHandleColumn?: boolean;
3785
3899
  autoFitColumns?: boolean;
3786
3900
  showStatusBar?: boolean;
3901
+ summaryRow?: 'none' | 'pinnedTop' | 'pinnedBottom';
3787
3902
  locale?: string;
3788
3903
  translations?: PartialTranslationMap;
3789
3904
  keyFields?: string[];
@@ -36,7 +36,7 @@
36
36
  - [Notification Contract](#notification-contract)
37
37
  - [User Layout Contract](#user-layout-contract)
38
38
  - [compat 래퍼 (MozGridVue / MozPivotVue)](#compat-래퍼-mozgridvue--mozpivotvue)
39
- - [Legacy 익스포트](#legacy-익스포트)
39
+ - [추가 익스포트 (엑셀·locale·타입·Injection 키)](#추가-익스포트-엑셀locale타입injection-키)
40
40
  - [관련 문서](#관련-문서)
41
41
 
42
42
  ---
@@ -74,25 +74,14 @@ npm install @vmscloud/moz-ui-grid-vue
74
74
  npmjs에 공개 패키지로 게시됩니다. 레지스트리 매핑이나 토큰 없이 설치되며,
75
75
  예전에 `.npmrc`에 넣어 둔 `@vmscloud:registry=https://npm.pkg.github.com` 매핑은 제거하세요.
76
76
 
77
- 단, 필수 peerDependency인 `@vmscloud/moz-ui-components`는 아직 GitHub Packages(private)에만 있습니다.
78
- 같은 스코프를 두 레지스트리에 동시에 매핑할 수 없으므로, 이 패키지만 tarball URL로 지정해 설치하세요.
79
-
80
- ```bash
81
- npm view @vmscloud/moz-ui-components@<version> dist.tarball --@vmscloud:registry=https://npm.pkg.github.com
82
- pnpm add "@vmscloud/moz-ui-components@<위에서 얻은 tarball URL>"
83
- ```
84
-
85
- ```ini
86
- # .npmrc — 인증은 호스트별로만 남깁니다
87
- //npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
88
- ```
77
+ 의존하는 `@vmscloud/moz-ui-grid-core`·`@vmscloud/moz-ui-grid-wrapper` 도 npmjs 에 있으므로 GitHub Packages 인증이 필요 없습니다.
78
+ 예전에 GitHub Packages 에서 따로 받아야 하던 레거시 UI 컴포넌트 패키지는 0.2.0 부터 쓰지 않습니다(엑셀 가져오기 팝업·토스트·문자열을 이 패키지 안에 내장).
89
79
 
90
80
  ### peerDependencies
91
81
 
92
82
  | 의존성 | 버전 | 필수 여부 |
93
83
  |--------|------|-----------|
94
84
  | `vue` | `>=3.4.0` | **필수** |
95
- | `@vmscloud/moz-ui-components` | `workspace:^` | **필수** |
96
85
  | `pinia` | `>=2.1.0` | 선택 (`peerDependenciesMeta`) |
97
86
  | `axios` | `>=1.6.0` | 선택 |
98
87
  | `file-saver` | `>=2.0.0` | 선택 (Excel 기능 사용 시) |
@@ -242,8 +231,13 @@ type MozGridCoreProps =
242
231
  | `useToolBox` | `boolean` | `true` | 툴박스 표시 |
243
232
  | `useToolBoxSetting` | `boolean` | `true` | 툴박스 설정(기어) 버튼 표시 |
244
233
  | `useExtendFooter` | `boolean` | `true` | 확장 푸터 표시 |
245
- | `useSummaryFooter` | `boolean` | `false` | 푸터 집계(요약) 표시 |
234
+ | `useSummaryFooter` | `boolean` | `false` | 플랫 컬럼 하단 집계 행. 켰을 때 `fields[].aggregate`가 있는 컬럼만 현재 필터 결과로 계산한다. OFF는 footer 전용 계산도 하지 않는다. 컬럼 옵션 → 집계에서 표시·함수 편집 가능 |
246
235
  | `useSort` | `boolean` | `true` | 정렬 기능 활성화 |
236
+ | `useRowGroupSettings` | `boolean` | `true` | 그룹 설정 변경 허용. `false`이면 보기 설정의 그룹 패널 토글을 비활성화하고 정보 아이콘에 안내 툴팁 표시. 컨텍스트 메뉴 진입점은 숨기고 그리드 설정의 그룹핑 탭은 읽기 전용. 기존 그룹·그룹별 집계 보존. 런타임 변경 지원 |
237
+ | `useFieldSettings` | `boolean` | `true` | 플랫 왼쪽 컬럼 목록의 표시·순서 변경 허용. false이면 피벗 필드 탭 본문 전체(검색·선택·드롭존·집계 편집)와 옵션 바 드래그를 차단. 옵션 바에는 별도 안내 표시 없이 정렬·필터·닫기는 유지. 고정·너비는 오른쪽 서식 영역에 속하므로 `useFormatSettings`로 제어. 런타임 변경 지원 |
238
+ | `useFormatSettings` | `boolean` | `true` | 헤더명·헤더/셀 서식·표시형식 변경 허용. 플랫·피벗 서식 영역에 적용. `false`이면 툴박스의 값 필드 설정 항목 전체를 비활성화하고 정보 아이콘·안내 툴팁 표시. 피벗에서는 서식 탭 본문 전체(왼쪽 목록·검색·선택·값 필드 설정 포함)를 단일 덮개로 차단. 기존 집계 결과·계산은 유지하며 레이아웃 탭은 `useLayoutSettings`로 별도 제어. 플랫에서 두 필드 권한 중 하나만 false이면 일부 설정 안내와 영역별 차단(검색·선택 유지), 둘 다 false이면 본문 전체 차단. 두 영역을 함께 바꾸는 컬럼 초기화는 둘 다 true일 때만 허용. 기존 설정·계산 보존, 런타임 변경 지원 |
239
+ | `useLayoutSettings` | `boolean` | `true` | 피벗 레이아웃(합계 표시·위치, 소계 기준, 0값 표시, 접기, 요약 모드) 변경 허용. `false`이면 레이아웃 탭은 안내·덮개로 본문 조작 차단, 툴박스 레이아웃 항목은 정보 아이콘·툴팁과 함께 비활성화. 기존 설정·계산 유지, 런타임 변경 지원. 플랫에는 영향 없음 |
240
+ | `useAggregateSettings` | `boolean` | `true` | 집계 탭의 함수·푸터 표시 설정 변경 허용. `false`여도 기존 집계·푸터 표시·계산 유지. 탭 진입은 유지하고 본문 검색·조작은 차단. 런타임 변경 지원 |
247
241
  | `useCustomCell` | `boolean` | `true` | 조건부 서식(커스텀 셀) 활성화 |
248
242
  | `useContextMenu` | `boolean` | `true` | 컨텍스트 메뉴 활성화 |
249
243
  | `useBuiltinTooltip` | `boolean` | `true` | 내장 셀/헤더 툴팁 렌더러 사용. `false`면 wrapper가 툴팁을 그리지 않음 — 코어 `cell:tooltip` 이벤트는 그대로 발행되므로 소비처가 `@ready`의 `grid.on('cell:tooltip', …)`로 직접 렌더 가능(발행은 `tooltipMode`로 제어) |
@@ -298,7 +292,6 @@ type MozGridCoreProps =
298
292
  |------|------|------|
299
293
  | `useViewSelectColumn` | `boolean?` | 컬럼 표시 선택 항목 토글 |
300
294
  | `useFixedColumn` | `boolean?` | 컬럼 고정 항목 토글 |
301
- | `useGroupColumn` | `boolean?` | 컬럼 그룹화 항목 토글 |
302
295
  | `useContextMenu` | `boolean?` | 컨텍스트 메뉴 마스터 토글(주: `WrapperUIOptions.useContextMenu`와 별개) |
303
296
  | `useSort` | `boolean?` | 정렬 항목 토글 |
304
297
  | `useFilter` | `boolean?` | 필터 항목 토글 |
@@ -672,7 +665,7 @@ provideGridNotification(myNotificationStore); // GridNotificationContract 구현
672
665
 
673
666
  ## compat 래퍼 (MozGridVue / MozPivotVue)
674
667
 
675
- > ⛔ **DEPRECATED.** `MozGridVue`/`MozPivotVue`(compat)는 레거시 컴포넌트의 정확한 공개 표면(props/emits/slots/defineExpose)을 보존하는 **얇은 하위 호환 어댑터**입니다. 신규 코드는 `MozGrid`(피벗은 `mode="pivot"`)를 사용하세요. 패키지 엔트리의 명시적 export가 `legacy` 배럴의 동명 export를 **shadow**합니다.
668
+ > ⛔ **DEPRECATED.** `MozGridVue`/`MozPivotVue`(compat)는 레거시 컴포넌트의 정확한 공개 표면(props/emits/slots/defineExpose)을 보존하는 **얇은 하위 호환 어댑터**입니다. 신규 코드는 `MozGrid`(피벗은 `mode="pivot"`)를 사용하세요. 두 컴포넌트는 `src/compat/` 에 있으며 옛 `legacy` 배럴은 0.2.0 에서 제거되었습니다.
676
669
 
677
670
  두 compat 파일은 그리드 로직을 소유하지 않고 `<MozGrid>`를 얇게 감쌉니다. props를 `coreConfig` computed(WRAPPER_EXTRA_KEYS + name + locale 분리)와 `wrapperConfig` computed(WRAPPER_EXTRA_KEYS + locale만)로 분리하여 `coreConfig` + `v-bind="wrapperConfig"` + `:name`을 `MozGrid`에 바인딩합니다.
678
671
 
@@ -685,21 +678,23 @@ provideGridNotification(myNotificationStore); // GridNotificationContract 구현
685
678
 
686
679
  ---
687
680
 
688
- ## Legacy 익스포트
681
+ ## 추가 익스포트 (엑셀·locale·타입·Injection 키)
689
682
 
690
- `export * from './legacy'`로 패키지 소비자에 도달하는 **레거시 표면**입니다. (legacy 폴더는 pre-`MozGrid` 컴포넌트 셋. 신규 작업에는 사용하지 마세요.) 나열만 하며 상세 문서화는 생략합니다. 부작용으로 `legacy/index.ts`가 코어 CSS(`default.css`)를 import합니다.
683
+ 0.2.0 에서 옛 `legacy` 배럴(pre-`MozGrid` Vue 컴포넌트 21종, `useGrid*` composable 17종, 아이콘 20종)을 **제거**했습니다. 같은 기능은 `MozGrid` 가 GridChrome(`@vmscloud/moz-ui-grid-wrapper`)으로 제공합니다. 아래는 패키지 엔트리(`src/index.ts`)가 `MozGrid`·템플릿·compat·계약 외에 추가로 내보내는 표면입니다. 패키지 엔트리는 코어 CSS(`default.css`)를 side-effect 로 import 합니다.
691
684
 
692
- | 분류 | 익스포트 (legacy) |
693
- |------|-------------------|
694
- | Vue 컴포넌트 (21) | `MozGridVue`, `MozGridVueCore`, `GridToolBox`, `GridOptionModal`, `ColumnPicker`(@deprecated), `ColumnSettings`, `GridBulkEditor`, `GridSearchInput`, `GridFilter`, `GridSort`, `GridCustomCell`, `GridContextMenu`, `GridFooter`, `MozPivotVue`, `PivotToolBox`, `PivotOptionModal`, `PivotFieldPanel`, `PivotContextMenu`, `PivotGrid`(@deprecated, `MozPivotVue` 별칭), `Dragging`, `ClientExcelUploadPopup` |
695
- | 값/스토어/유틸 | `draggingEventBus`, `useExcelStore`, `useExcelDownloadStore`, `useExcelUploadStore`, `useClientExcelStore`, `runClientExport`, `exportCsv`, `generateSessionId`, `pickFile`, `downloadBlob`, `VueRenderer`, `UndoStack` |
696
- | Composables (17) | `useGridInstance`, `useGridSelect`, `useGridEvents`, `useGridSelection`, `useGridChanges`, `useGridFilter`, `useGridSort`, `useGridCustomCell`, `useGridBulkEditor`, `useContextMenu`, `useGridUndoRedo`, `useGridValidation`, `useGridColumns`, `useColumnSettings`, `useColumnFormatter`, `useMaskPresets`, `matchPreset` |
697
- | 아이콘 (20) | `IconAdd`, `IconArrowDownWithTail`, `IconArrowLeft`, `IconArrowLeftWithTail`, `IconArrowRight`, `IconArrowUpCenter`, `IconArrowUpWithTail`, `IconChart`, `IconClose`, `IconCustomCell`, `IconDownload`, `IconDragHandler`, `IconFilter`, `IconInfoFilled`, `IconReset`, `IconResetGridToolbar`, `IconSearch`, `IconSetting`, `IconSort`, `IconToastWarning` |
698
- | 레거시 타입(로컬) | `ColumnFormatterOptions`, `UserCellFormat`(@deprecated), `UserHeaderFormat`(@deprecated), `IColumnCellFormat`, `IColumnHeaderFormat`, `IColumnFormatConfig`, `MaskPreset`, `MaskPresetGroup`, `MozGridVueCoreProps`, `MozGridVueProps`, `MozGridVueEmits`, `CellSlotProps`, `HeaderSlotProps`, `EditorSlotProps`, `DetailSlotProps`, `GroupSlotProps`, `TemplateRegistry`, `TemplateEntry`, `ComparisonOperator`, `LogicalOperator`, `IFilterDef`, `ISortDef`, `ICustomCellDef`, `ICustomCellRuleSet`, `ICustomCellConfig`, `IContextMenuItem`, `IContextMenuConfig`, `IContextMenuExcelEventArgs`, `AggregateType`, `IAggregateValues`, `UseGrid*Return` 류, `ClientExcelExportConfig`, `PivotGridProps`, `PivotFieldItem`, `AvailableField`, `PivotFieldPanelConfig`, `PivotGridSettings` |
699
- | Injection 키 (7/8) | `GRID_INSTANCE_KEY`, `GRID_RENDERER_KEY`, `GRID_TEMPLATE_REGISTRY_KEY`, `GRID_FILTER_MODULE_KEY`, `GRID_SORT_MODULE_KEY`, `GRID_CUSTOM_CELL_MODULE_KEY`, `GRID_BULK_EDITOR_MODULE_KEY` (`GRID_CONTAINER_KEY` 제외) |
700
- | 코어 타입 재-export | `PureSheetConfig`, `FieldDef`, `SortState`, `FilterState`, `Row`, `ColumnDef`, `GroupConfig`, `TreeConfig`, `MasterDetailConfig`, `PivotConfig`, `PivotRowField`, `PivotColumnField`, `PivotValueField`, `PivotResult`, `IPivotAPI`, `IRowsAPI` 외 다수(편의 패스스루) → 의미는 [reference.md](reference.md) |
685
+ | 분류 | 익스포트 |
686
+ |------|----------|
687
+ | 엑셀 (서버사이드 스토어) | `useExcelStore`, `useExcelDownloadStore`, `useExcelUploadStore` (서브패스 `@vmscloud/moz-ui-grid-vue/store` 와 동일), `ExcelDataType`, `FileParameter`, `StreamingParameter`, 타입 `IExcelInfo`, `IExcelAPI`, `AdditionalColumn`, `SystemType` |
688
+ | 엑셀 (클라이언트사이드 grid.io) | `ClientExcelUploadPopup`(Vue, `MozGrid` 가 내부에서 사용), `ClientExcelUploadController`(wrapper Popup 기반 컨트롤러), `useClientExcelStore`, `runClientExport`, `exportCsv`, `generateSessionId`, `pickFile`, `downloadBlob`, 타입 `ClientExcelExportConfig`, `ClientExcelImportMode`, `ClientExcelConflictStrategy`, `ClientExcelImportOptions` |
689
+ | 서브패스 | `./store`, `./utils/excel/ExcelGuard`, `./utils/excel/ExcelQueueManager`, `./utils/excel/ExcelTaskRunner`, `./utils/excel/ExcelTimeoutManager`, `./utils/excel/ExcelImportUtil`, `./style.css` |
690
+ | 토스트 | `showMessage(message, result)`, `openToast(message, type, options)`, 타입 `ToastType`, `ToastOptions` — body 에 `.mzc-toast` 로 표시, 같은 메시지는 300ms debounce |
691
+ | locale | `setGridVueLocale(code)`, `getGridVueLocale()`, `getGridVueLocaleCode()`, `normalizeGridVueLocale()`, 사전 `koKR`/`enUS`/`jaJP`/`zhCN`, 타입 `GridVueLocaleCode`, `GridVueLocaleMessages` — 엑셀 팝업·토스트 문자열. `MozGrid` 의 `locale` prop 이 자동으로 설정하며 기본은 ko |
692
+ | Bridge | `VueRenderer`, `UndoStack`, `getRowHeaderCell`, `getCornerCell`, `ROW_HEADER_COLUMN_ID` |
693
+ | 타입 | `MozGridVueCoreProps`, `MozGridVueProps`, `MozGridVueEmits`, `CellSlotProps`, `HeaderSlotProps`, `EditorSlotProps`, `DetailSlotProps`, `GroupSlotProps`, `TemplateRegistry`, `TemplateEntry`, `ComparisonOperator`, `LogicalOperator`, `IFilterDef`, `ISortDef`, `ICustomCellDef`, `ICustomCellRuleSet`, `ICustomCellConfig`, `IContextMenuItem`, `IContextMenuConfig`, `IContextMenuExcelEventArgs`, `AggregateType`, `IAggregateValues`, `IColumnCellFormat`, `IColumnHeaderFormat`, `IColumnFormatConfig`, `PivotGridProps`, `PivotFieldItem`, `AvailableField`, `PivotFieldPanelConfig`, `PivotGridSettings`, `UseGridFilterReturn`, `UseGridSortReturn`, `UseGridCustomCellReturn`(모듈 계약 — 옛 useGrid* 반환 타입을 독립 인터페이스로 유지), `GridModuleContract` |
694
+ | Injection 키 (7/8) | `GRID_INSTANCE_KEY`, `GRID_RENDERER_KEY`, `GRID_TEMPLATE_REGISTRY_KEY`, `GRID_FILTER_MODULE_KEY`, `GRID_SORT_MODULE_KEY`, `GRID_CUSTOM_CELL_MODULE_KEY`, `GRID_BULK_EDITOR_MODULE_KEY` (`GRID_CONTAINER_KEY` 제외). 필터·정렬·조건부 스타일 키의 값 타입은 각각 `UseGridFilterReturn`/`UseGridSortReturn`/`UseGridCustomCellReturn`, 일괄 편집 키는 `GridModuleContract`(호스트 임의 모듈) |
695
+ | 코어 타입 재-export | `PureSheetConfig`, `FieldDef`, `SortState`, `FilterState`, `Row`, `ColumnDef`, `GroupConfig`, `TreeConfig`, `MasterDetailConfig`, `PivotConfig`, `PivotRowField`, `PivotColumnField`, `PivotValueField`, `PivotResult`, `IPivotAPI`, `IRowsAPI` 외 다수(편의 패스스루), `FormatHeaderRowCallback`/`FormatHeaderRowContext`(구명 alias) → 의미는 [reference.md](reference.md) |
701
696
 
702
- > Injection 키 8종은 모두 `Symbol('moz-grid-…')`(번들 로컬, `Symbol.for` 아님)로 생성됩니다. `MozGrid`는 그중 4개(`GRID_INSTANCE_KEY`/`GRID_RENDERER_KEY`/`GRID_TEMPLATE_REGISTRY_KEY`/`GRID_CONTAINER_KEY`)를 provide하며, `GRID_CONTAINER_KEY`는 legacy 재-export 목록에서 제외됩니다. 슬롯 prop 타입(`CellSlotProps` 등)은 `types/slots.ts` 정의가 legacy 배럴로 노출됩니다.
697
+ > Injection 키 8종은 모두 `Symbol('moz-grid-…')`(번들 로컬, `Symbol.for` 아님)로 생성됩니다. `MozGrid`는 그중 4개(`GRID_INSTANCE_KEY`/`GRID_RENDERER_KEY`/`GRID_TEMPLATE_REGISTRY_KEY`/`GRID_CONTAINER_KEY`)를 provide합니다.
703
698
 
704
699
  ---
705
700
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmscloud/moz-ui-grid-vue",
3
- "version": "0.1.41",
3
+ "version": "0.2.1",
4
4
  "description": "MozGrid - Vue 3 wrapping library for @vmscloud/moz-ui-grid-core",
5
5
  "license": "ISC",
6
6
  "type": "module",
@@ -68,16 +68,16 @@
68
68
  "crypto-js": "^4.2.0",
69
69
  "echarts": "^5.5.0",
70
70
  "es-toolkit": "^1.0.0",
71
- "@vmscloud/moz-ui-grid-core": "^0.1.42",
72
- "@vmscloud/moz-ui-grid-wrapper": "^0.1.13"
71
+ "lit-html": "^3.2.0",
72
+ "@vmscloud/moz-ui-grid-core": "^0.1.43",
73
+ "@vmscloud/moz-ui-grid-wrapper": "^0.1.14"
73
74
  },
74
75
  "peerDependencies": {
75
76
  "vue": ">=3.4.0",
76
77
  "pinia": ">=2.1.0",
77
78
  "axios": ">=1.6.0",
78
79
  "file-saver": ">=2.0.0",
79
- "dayjs": ">=1.11.0",
80
- "@vmscloud/moz-ui-components": "^1.2.22"
80
+ "dayjs": ">=1.11.0"
81
81
  },
82
82
  "peerDependenciesMeta": {
83
83
  "pinia": {
@@ -111,8 +111,7 @@
111
111
  "pinia": "^2.3.0",
112
112
  "axios": "^1.6.0",
113
113
  "file-saver": "^2.0.5",
114
- "dayjs": "^1.11.0",
115
- "@vmscloud/moz-ui-components": "^1.2.22"
114
+ "dayjs": "^1.11.0"
116
115
  },
117
116
  "scripts": {
118
117
  "build": "vue-tsc --noEmit && vite build --config vite.config.lib.ts",
@@ -1,14 +0,0 @@
1
- "use strict";var t=Object.defineProperty,e=(e,i,r)=>((e,i,r)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r)(e,"symbol"!=typeof i?i+"":i,r);const i=require("pinia"),r=require("file-saver"),n=require("@vmscloud/moz-ui-components"),s=require("vue"),o=require("axios"),f=1,h=2,a=3,l=4;class u{constructor(t,i){e(this,"sessionId"),e(this,"name",""),e(this,"path",""),e(this,"saveDir",""),e(this,"size",0),e(this,"file"),e(this,"info"),e(this,"type","Upload"),e(this,"offset",0),e(this,"isComplete",!1),e(this,"isCancelable",!1),e(this,"isCanceled",!1),e(this,"blobInfo"),e(this,"onCompleted"),e(this,"onCancelClick"),this.type=t,this.sessionId=i}get ipcObject(){return{sessionId:this.sessionId,name:this.name,path:this.path,saveDir:this.saveDir,size:this.size,info:this.info}}get totalSize(){var t,e;return"Upload"===this.type?+((null==(t=this.file)?void 0:t.size)||this.size):+((null==(e=this.info)?void 0:e.length)||0)}get percent(){return 0===this.offset||0===this.totalSize?0:Math.round(this.offset/this.totalSize*100)}get progressValue(){return+this.offset}get status(){return`${this.percent}% (${this.formatSizeUnits(this.offset)}/${this.formatSizeUnits(this.totalSize)})`}completed(t){this.isCancelable=!1,this.isComplete=!0,this.blobInfo=t,this.onCompleted&&this.onCompleted(this)}formatSizeUnits(t){let e="";return e=t>=1073741824?(t/1073741824).toFixed(2)+" GB":t>=1048576?(t/1048576).toFixed(2)+" MB":t>=1024?(t/1024).toFixed(2)+" KB":t>1?`${t} bytes`:1===t?`${t} byte`:"0 bytes",e}}const g=()=>{const t=()=>(65536*(1+Math.random())|0).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`.toUpperCase()};function v(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c,d,w,b,y,p={exports:{}},m={exports:{}},E=m.exports;const I=v((d||(d=1,
2
- /**
3
- * @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
4
- * Backing buffer: ArrayBuffer, Accessor: Uint8Array
5
- * Released under the Apache License, Version 2.0
6
- * see: https://github.com/dcodeIO/bytebuffer.js for details
7
- */
8
- b=p.exports,y=function(t){var e=function(t,i,n){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===i&&(i=e.DEFAULT_ENDIAN),void 0===n&&(n=e.DEFAULT_NOASSERT),!n){if((t|=0)<0)throw RangeError("Illegal capacity");i=!!i,n=!!n}this.buffer=0===t?r:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=i,this.noAssert=n};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var i=e.prototype;i.__isByteBuffer__,Object.defineProperty(i,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var r=new ArrayBuffer(0),n=String.fromCharCode;function s(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function o(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+n.apply(String,t);t.length+arguments.length>1024&&(e.push(n.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function f(t,e,i,r,n){var s,o,f=8*n-r-1,h=(1<<f)-1,a=h>>1,l=-7,u=i?n-1:0,g=i?-1:1,v=t[e+u];for(u+=g,s=v&(1<<-l)-1,v>>=-l,l+=f;l>0;s=256*s+t[e+u],u+=g,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+t[e+u],u+=g,l-=8);if(0===s)s=1-a;else{if(s===h)return o?NaN:1/0*(v?-1:1);o+=Math.pow(2,r),s-=a}return(v?-1:1)*o*Math.pow(2,s-r)}function h(t,e,i,r,n,s){var o,f,h,a=8*s-n-1,l=(1<<a)-1,u=l>>1,g=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:s-1,c=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),(e+=o+u>=1?g/h:g*Math.pow(2,1-u))*h>=2&&(o++,h/=2),o+u>=l?(f=0,o=l):o+u>=1?(f=(e*h-1)*Math.pow(2,n),o+=u):(f=e*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;t[i+v]=255&f,v+=c,f/=256,n-=8);for(o=o<<n|f,a+=n;a>0;t[i+v]=255&o,v+=c,o/=256,a-=8);t[i+v-c]|=128*d}e.accessor=function(){return Uint8Array},e.allocate=function(t,i,r){return new e(t,i,r)},e.concat=function(t,i,r,n){"boolean"!=typeof i&&"string"==typeof i||(n=r,r=i,i=void 0);for(var s,o=0,f=0,h=t.length;f<h;++f)e.isByteBuffer(t[f])||(t[f]=e.wrap(t[f],i)),(s=t[f].limit-t[f].offset)>0&&(o+=s);if(0===o)return new e(0,r,n);var a,l=new e(o,r,n);for(f=0;f<h;)(s=(a=t[f++]).limit-a.offset)<=0||(l.view.set(a.view.subarray(a.offset,a.limit),l.offset),l.offset+=s);return l.limit=l.offset,l.offset=0,l},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,r,n,s){if("string"!=typeof r&&(s=n,n=r,r=void 0),"string"==typeof t)switch(void 0===r&&(r="utf8"),r){case"base64":return e.fromBase64(t,n);case"hex":return e.fromHex(t,n);case"binary":return e.fromBinary(t,n);case"utf8":return e.fromUTF8(t,n);case"debug":return e.fromDebug(t,n);default:throw Error("Unsupported encoding: "+r)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var o;if(e.isByteBuffer(t))return(o=i.clone.call(t)).markedOffset=-1,o;if(t instanceof Uint8Array)o=new e(0,n,s),t.length>0&&(o.buffer=t.buffer,o.offset=t.byteOffset,o.limit=t.byteOffset+t.byteLength,o.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)o=new e(0,n,s),t.byteLength>0&&(o.buffer=t,o.offset=0,o.limit=t.byteLength,o.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(o=new e(t.length,n,s)).limit=t.length;for(var f=0;f<t.length;++f)o.view[f]=t[f]}return o},i.writeBitSet=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e,s=t.length,o=s>>3,f=0;for(e+=this.writeVarint32(s,e);o--;)r=1&!!t[f++]|(1&!!t[f++])<<1|(1&!!t[f++])<<2|(1&!!t[f++])<<3|(1&!!t[f++])<<4|(1&!!t[f++])<<5|(1&!!t[f++])<<6|(1&!!t[f++])<<7,this.writeByte(r,e++);if(f<s){var h=0;for(r=0;f<s;)r|=(1&!!t[f++])<<h++;this.writeByte(r,e++)}return i?(this.offset=e,this):e-n},i.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var i,r=this.readVarint32(t),n=r.value,s=n>>3,o=0,f=[];for(t+=r.length;s--;)i=this.readByte(t++),f[o++]=!!(1&i),f[o++]=!!(2&i),f[o++]=!!(4&i),f[o++]=!!(8&i),f[o++]=!!(16&i),f[o++]=!!(32&i),f[o++]=!!(64&i),f[o++]=!!(128&i);if(o<n){var h=0;for(i=this.readByte(t++);o<n;)f[o++]=!!(i>>h++&1)}return e&&(this.offset=t),f},i.readBytes=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return i&&(this.offset+=t),r},i.writeBytes=i.append,i.writeInt8=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},i.writeByte=i.writeInt8,i.readInt8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return 128&~i||(i=-(255-i+1)),e&&(this.offset+=1),i},i.readByte=i.readInt8,i.writeUint8=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},i.writeUInt8=i.writeUint8,i.readUint8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return e&&(this.offset+=1),i},i.readUInt8=i.readUint8,i.writeInt16=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},i.writeShort=i.writeInt16,i.readInt16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),32768&~i||(i=-(65535-i+1)),e&&(this.offset+=2),i},i.readShort=i.readInt16,i.writeUint16=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},i.writeUInt16=i.writeUint16,i.readUint16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),e&&(this.offset+=2),i},i.readUInt16=i.readUint16,i.writeInt32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},i.writeInt=i.writeInt32,i.readInt32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),i|=0,e&&(this.offset+=4),i},i.readInt=i.readInt32,i.writeUint32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},i.writeUInt32=i.writeUint32,i.readUint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),e&&(this.offset+=4),i},i.readUInt32=i.readUint32,t&&(i.writeInt64=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,o=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeLong=i.writeInt64,i.readInt64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!1);return i&&(this.offset+=8),s},i.readLong=i.readInt64,i.writeUint64=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,o=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeUInt64=i.writeUint64,i.readUint64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!0);return i&&(this.offset+=8),s},i.readUInt64=i.readUint64),i.writeFloat32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,h(this.view,t,e,this.littleEndian,23,4),i&&(this.offset+=4),this},i.writeFloat=i.writeFloat32,i.readFloat32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=f(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),i},i.readFloat=i.readFloat32,i.writeFloat64=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=8,h(this.view,t,e,this.littleEndian,52,8),i&&(this.offset+=8),this},i.writeDouble=i.writeFloat64,i.readFloat64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=f(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),i},i.readDouble=i.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)},i.writeVarint32=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=e.calculateVarint32(t);i+=s;var o=this.buffer.byteLength;for(i>o&&this.resize((o*=2)>i?o:i),i-=s,t>>>=0;t>=128;)n=127&t|128,this.view[i++]=n,t>>>=7;return this.view[i++]=t,r?(this.offset=i,this):s},i.writeVarint32ZigZag=function(t,i){return this.writeVarint32(e.zigZagEncode32(t),i)},i.readVarint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=0,n=0;do{if(!this.noAssert&&t>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[t++],r<5&&(n|=(127&i)<<7*r),++r}while(128&i);return n|=0,e?(this.offset=t,n):{value:n,length:r}},i.readVarint32ZigZag=function(t){var i=this.readVarint32(t);return"object"==typeof i?i.value=e.zigZagDecode32(i.value):i=e.zigZagDecode32(i),i},t&&(e.MAX_VARINT64_BYTES=10,e.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var i=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==r?i<16384?i<128?1:2:i<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:n<128?9:10},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},i.writeVarint64=function(i,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof i)i=t.fromNumber(i);else if("string"==typeof i)i=t.fromString(i);else if(!(i&&i instanceof t))throw TypeError("Illegal value: "+i+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof i?i=t.fromNumber(i,!1):"string"==typeof i?i=t.fromString(i,!1):!1!==i.unsigned&&(i=i.toSigned());var s=e.calculateVarint64(i),o=i.toInt()>>>0,f=i.shiftRightUnsigned(28).toInt()>>>0,h=i.shiftRightUnsigned(56).toInt()>>>0;r+=s;var a=this.buffer.byteLength;switch(r>a&&this.resize((a*=2)>r?a:r),r-=s,s){case 10:this.view[r+9]=h>>>7&1;case 9:this.view[r+8]=9!==s?128|h:127&h;case 8:this.view[r+7]=8!==s?f>>>21|128:f>>>21&127;case 7:this.view[r+6]=7!==s?f>>>14|128:f>>>14&127;case 6:this.view[r+5]=6!==s?f>>>7|128:f>>>7&127;case 5:this.view[r+4]=5!==s?128|f:127&f;case 4:this.view[r+3]=4!==s?o>>>21|128:o>>>21&127;case 3:this.view[r+2]=3!==s?o>>>14|128:o>>>14&127;case 2:this.view[r+1]=2!==s?o>>>7|128:o>>>7&127;case 1:this.view[r]=1!==s?128|o:127&o}return n?(this.offset+=s,this):s},i.writeVarint64ZigZag=function(t,i){return this.writeVarint64(e.zigZagEncode64(t),i)},i.readVarint64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,n=0,s=0,o=0,f=0;if(n=127&(f=this.view[e++]),128&f&&(n|=(127&(f=this.view[e++]))<<7,(128&f||this.noAssert&&void 0===f)&&(n|=(127&(f=this.view[e++]))<<14,(128&f||this.noAssert&&void 0===f)&&(n|=(127&(f=this.view[e++]))<<21,(128&f||this.noAssert&&void 0===f)&&(s=127&(f=this.view[e++]),(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<7,(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<14,(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<21,(128&f||this.noAssert&&void 0===f)&&(o=127&(f=this.view[e++]),(128&f||this.noAssert&&void 0===f)&&(o|=(127&(f=this.view[e++]))<<7,128&f||this.noAssert&&void 0===f))))))))))throw Error("Buffer overrun");var h=t.fromBits(n|s<<28,s>>>4|o<<24,!1);return i?(this.offset=e,h):{value:h,length:e-r}},i.readVarint64ZigZag=function(i){var r=this.readVarint64(i);return r&&r.value instanceof t?r.value=e.zigZagDecode64(r.value):r=e.zigZagDecode64(r),r}),i.writeCString=function(t,e){var i=void 0===e;i&&(e=this.offset);var r,n=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(r=0;r<n;++r)if(0===t.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}n=u.calculateUTF16asUTF8(s(t))[1],e+=n+1;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=n+1,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,i?(this.offset=e,this):n},i.readCString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=t,n=-1;return u.decodeUTF8toUTF16(function(){if(0===n)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(n=this.view[t++])?null:n}.bind(this),i=o(),!0),e?(this.offset=t,i()):{string:i(),length:t-r}},i.writeIString=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e;r=u.calculateUTF16asUTF8(s(t),this.noAssert)[1],e+=4+r;var o=this.buffer.byteLength;if(e>o&&this.resize((o*=2)>e?o:e),e-=4+r,this.littleEndian?(this.view[e+3]=r>>>24&255,this.view[e+2]=r>>>16&255,this.view[e+1]=r>>>8&255,this.view[e]=255&r):(this.view[e]=r>>>24&255,this.view[e+1]=r>>>16&255,this.view[e+2]=r>>>8&255,this.view[e+3]=255&r),e+=4,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),e!==n+4+r)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+r));return i?(this.offset=e,this):e-n},i.readIString=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),s=this.readUTF8String(n,e.METRICS_BYTES,t+=4);return t+=s.length,i?(this.offset=t,s.string):{string:s.string,length:t-r}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",i.writeUTF8String=function(t,e){var i,r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n=e;i=u.calculateUTF16asUTF8(s(t))[1],e+=i;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=i,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),r?(this.offset=e,this):e-n},i.writeString=i.writeUTF8String,e.calculateUTF8Chars=function(t){return u.calculateUTF16asUTF8(s(t))[0]},e.calculateUTF8Bytes=function(t){return u.calculateUTF16asUTF8(s(t))[1]},e.calculateString=e.calculateUTF8Bytes,i.readUTF8String=function(t,i,r){"number"==typeof i&&(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),void 0===i&&(i=e.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var s,f=0,h=r;if(i===e.METRICS_CHARS){if(s=o(),u.decodeUTF8(function(){return f<t&&r<this.limit?this.view[r++]:null}.bind(this),function(t){++f,u.UTF8toUTF16(t,s)}),f!==t)throw RangeError("Illegal range: Truncated data, "+f+" == "+t);return n?(this.offset=r,s()):{string:s(),length:r-h}}if(i===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var a=r+t;if(u.decodeUTF8toUTF16(function(){return r<a?this.view[r++]:null}.bind(this),s=o(),this.noAssert),r!==a)throw RangeError("Illegal range: Truncated data, "+r+" == "+a);return n?(this.offset=r,s()):{string:s(),length:r-h}}throw TypeError("Unsupported metrics: "+i)},i.readString=i.readUTF8String,i.writeVString=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,o,f=i;n=u.calculateUTF16asUTF8(s(t),this.noAssert)[1],o=e.calculateVarint32(n),i+=o+n;var h=this.buffer.byteLength;if(i>h&&this.resize((h*=2)>i?h:i),i-=o+n,i+=this.writeVarint32(n,i),u.encodeUTF16toUTF8(s(t),function(t){this.view[i++]=t}.bind(this)),i!==f+n+o)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+n+o));return r?(this.offset=i,this):i-f},i.readVString=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),s=this.readUTF8String(n.value,e.METRICS_BYTES,t+=n.length);return t+=s.length,i?(this.offset=t,s.string):{string:s.string,length:t-r}},i.append=function(t,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,i));var s=t.limit-t.offset;if(s<=0)return this;r+=s;var o=this.buffer.byteLength;return r>o&&this.resize((o*=2)>r?o:r),r-=s,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=s,n&&(this.offset+=s),this},i.appendTo=function(t,e){return t.append(this,e),this},i.assert=function(t){return this.noAssert=!t,this},i.capacity=function(){return this.buffer.byteLength},i.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},i.clone=function(t){var i=new e(0,this.littleEndian,this.noAssert);return t?(i.buffer=new ArrayBuffer(this.buffer.byteLength),i.view=new Uint8Array(i.buffer)):(i.buffer=this.buffer,i.view=this.view),i.offset=this.offset,i.markedOffset=this.markedOffset,i.limit=this.limit,i},i.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var i=e-t;if(0===i)return this.buffer=r,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),s=new Uint8Array(n);return s.set(this.view.subarray(t,e)),this.buffer=n,this.view=s,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=i,this},i.copy=function(t,i){if(void 0===t&&(t=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t===i)return new e(0,this.littleEndian,this.noAssert);var r=i-t,n=new e(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,i),n},i.copyTo=function(t,i,r,n){var s,o;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(i=(o=void 0===i)?t.offset:0|i,r=(s=void 0===r)?this.offset:0|r,n=void 0===n?this.limit:0|n,i<0||i>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+i+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var f=n-r;return 0===f?t:(t.ensureCapacity(i+f),t.view.set(this.view.subarray(r,n),i),s&&(this.offset+=f),o&&(t.offset+=f),this)},i.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},i.fill=function(t,e,i){var r=void 0===e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(e>=i)return this;for(;e<i;)this.view[e++]=t;return r&&(this.offset=e),this},i.flip=function(){return this.limit=this.offset,this.offset=0,this},i.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},i.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},i.LE=function(t){return this.littleEndian=void 0===t||!!t,this},i.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},i.prepend=function(t,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,i));var s=t.limit-t.offset;if(s<=0)return this;var o=s-r;if(o>0){var f=new ArrayBuffer(this.buffer.byteLength+o),h=new Uint8Array(f);h.set(this.view.subarray(r,this.buffer.byteLength),s),this.buffer=f,this.view=h,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,r+=o}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),r-s),t.offset=t.limit,n&&(this.offset-=s),this},i.prependTo=function(t,e){return t.prepend(this,e),this},i.printDebug=function(t){"function"!=typeof t&&(t=function(){}.bind()),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},i.remaining=function(){return this.limit-this.offset},i.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},i.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),i=new Uint8Array(e);i.set(this.view),this.buffer=e,this.view=i}return this},i.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e||Array.prototype.reverse.call(this.view.subarray(t,e)),this},i.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},i.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=t,i.limit=e,i},i.toBuffer=function(t){var e=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(!t&&0===e&&i===this.buffer.byteLength)return this.buffer;if(e===i)return r;var n=new ArrayBuffer(i-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,i),0),n},i.toArrayBuffer=i.toBuffer,i.toString=function(t,e,i){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(i=e=t="utf8"),t){case"utf8":return this.toUTF8(e,i);case"base64":return this.toBase64(e,i);case"hex":return this.toHex(e,i);case"binary":return this.toBinary(e,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var a=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],r=0,n=e.length;r<n;++r)i[e[r]]=r;return t.encode=function(t,i){for(var r,n;null!==(r=t());)i(e[r>>2&63]),n=(3&r)<<4,null!==(r=t())?(i(e[63&((n|=r>>4&15)|r>>4&15)]),n=(15&r)<<2,null!==(r=t())?(i(e[63&(n|r>>6&3)]),i(e[63&r])):(i(e[63&n]),i(61))):(i(e[63&n]),i(61),i(61))},t.decode=function(t,e){var r,n,s;function o(t){throw Error("Illegal character code: "+t)}for(;null!==(r=t());)if(void 0===(n=i[r])&&o(r),null!==(r=t())&&(void 0===(s=i[r])&&o(r),e(n<<2>>>0|(48&s)>>4),null!==(r=t()))){if(void 0===(n=i[r])){if(61===r)break;o(r)}if(e((15&s)<<4>>>0|(60&n)>>2),null!==(r=t())){if(void 0===(s=i[r])){if(61===r)break;o(r)}e((3&n)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();i.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var i;return a.encode(function(){return t<e?this.view[t++]:null}.bind(this),i=o()),i()},e.fromBase64=function(t,i){if("string"!=typeof t)throw TypeError("str");var r=new e(t.length/4*3,i),n=0;return a.decode(s(t),function(t){r.view[n++]=t}),r.limit=n,r},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},i.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var i=[],r=[];t<e;)i.push(this.view[t++]),i.length>=1024&&(r.push(String.fromCharCode.apply(String,i)),i=[]);return r.join("")+String.fromCharCode.apply(String,i)},e.fromBinary=function(t,i){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,s=t.length,o=new e(s,i);n<s;){if((r=t.charCodeAt(n))>255)throw RangeError("illegal char code: "+r);o.view[n++]=r}return o.limit=s,o},i.toDebug=function(t){for(var e,i=-1,r=this.buffer.byteLength,n="",s="",o="";i<r;){if(-1!==i&&(n+=(e=this.view[i])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(s+=e>32&&e<127?String.fromCharCode(e):".")),++i,t&&i>0&&i%16==0&&i!==r){for(;n.length<51;)n+=" ";o+=n+s+"\n",n=s=""}i===this.offset&&i===this.limit?n+=i===this.markedOffset?"!":"|":i===this.offset?n+=i===this.markedOffset?"[":"<":i===this.limit?n+=i===this.markedOffset?"]":">":n+=i===this.markedOffset?"'":t||0!==i&&i!==r?" ":""}if(t&&" "!==n){for(;n.length<51;)n+=" ";o+=n+s+"\n"}return t?o:n},e.fromDebug=function(t,i,r){for(var n,s,o=t.length,f=new e((o+1)/3|0,i,r),h=0,a=0,l=!1,u=!1,g=!1,v=!1,c=!1;h<o;){switch(n=t.charAt(h++)){case"!":if(!r){if(u||g||v){c=!0;break}u=g=v=!0}f.offset=f.markedOffset=f.limit=a,l=!1;break;case"|":if(!r){if(u||v){c=!0;break}u=v=!0}f.offset=f.limit=a,l=!1;break;case"[":if(!r){if(u||g){c=!0;break}u=g=!0}f.offset=f.markedOffset=a,l=!1;break;case"<":if(!r){if(u){c=!0;break}u=!0}f.offset=a,l=!1;break;case"]":if(!r){if(v||g){c=!0;break}v=g=!0}f.limit=f.markedOffset=a,l=!1;break;case">":if(!r){if(v){c=!0;break}v=!0}f.limit=a,l=!1;break;case"'":if(!r){if(g){c=!0;break}g=!0}f.markedOffset=a,l=!1;break;case" ":l=!1;break;default:if(!r&&l){c=!0;break}if(s=parseInt(n+t.charAt(h++),16),!r&&(isNaN(s)||s<0||s>255))throw TypeError("Illegal str: Not a debug encoded string");f.view[a++]=s,l=!0}if(c)throw TypeError("Illegal str: Invalid symbol at "+h)}if(!r){if(!u||!v)throw TypeError("Illegal str: Missing offset or limit");if(a<f.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+a+" < "+o)}return f},i.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var i,r=new Array(e-t);t<e;)(i=this.view[t++])<16?r.push("0",i.toString(16)):r.push(i.toString(16));return r.join("")},e.fromHex=function(t,i,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,s=t.length,o=new e(s/2|0,i),f=0,h=0;f<s;f+=2){if(n=parseInt(t.substring(f,f+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[h++]=n}return o.limit=h,o};var l,u=l={MAX_CODEPOINT:1114111,encodeUTF8:function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<128?e(127&i):i<2048?(e(i>>6&31|192),e(63&i|128)):i<65536?(e(i>>12&15|224),e(i>>6&63|128),e(63&i|128)):(e(i>>18&7|240),e(i>>12&63|128),e(i>>6&63|128),e(63&i|128)),i=null},decodeUTF8:function(t,e){for(var i,r,n,s,o=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(i=t());)if(128&i)if(192==(224&i))null===(r=t())&&o([i,r]),e((31&i)<<6|63&r);else if(224==(240&i))(null===(r=t())||null===(n=t()))&&o([i,r,n]),e((15&i)<<12|(63&r)<<6|63&n);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(r=t())||null===(n=t())||null===(s=t()))&&o([i,r,n,s]),e((7&i)<<18|(63&r)<<12|(63&n)<<6|63&s)}else e(i)},UTF16toUTF8:function(t,e){for(var i,r=null;null!==(i=null!==r?r:t());)i>=55296&&i<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(i-55296)+r-56320+65536),r=null):e(i);null!==r&&e(r)},UTF8toUTF16:function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<=65535?e(i):(e(55296+((i-=65536)>>10)),e(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,e){l.UTF16toUTF8(t,function(t){l.encodeUTF8(t,e)})},decodeUTF8toUTF16:function(t,e){l.decodeUTF8(t,function(t){l.UTF8toUTF16(t,e)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,i=0;null!==(e=t());)i+=e<128?1:e<2048?2:e<65536?3:4;return i},calculateUTF16asUTF8:function(t){var e=0,i=0;return l.UTF16toUTF8(t,function(t){++e,i+=t<128?1:t<2048?2:t<65536?3:4}),[e,i]}};return i.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i;try{u.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),i=o())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return i()},e.fromUTF8=function(t,i,r){if(!r&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var n=new e(u.calculateUTF16asUTF8(s(t),!0)[1],i,r),o=0;return u.encodeUTF16toUTF8(s(t),function(t){n.view[o++]=t}),n.limit=o,n},e},(w=p)&&w.exports?w.exports=function(){var t;try{t=function(){return c||(c=1,
9
- /**
10
- * @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
11
- * Released under the Apache License, Version 2.0
12
- * see: https://github.com/dcodeIO/long.js for details
13
- */
14
- e=E,i=function(){function t(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var i={},r={};function n(t,e){var n,s,f;return e?(f=0<=(t>>>=0)&&t<256)&&(s=r[t])?s:(n=o(t,(0|t)<0?-1:0,!0),f&&(r[t]=n),n):(f=-128<=(t|=0)&&t<128)&&(s=i[t])?s:(n=o(t,t<0?-1:0,!1),f&&(i[t]=n),n)}function s(t,e){if(isNaN(t)||!isFinite(t))return e?d:c;if(e){if(t<0)return d;if(t>=u)return m}else{if(t<=-g)return E;if(t+1>=g)return p}return t<0?s(-t,e).neg():o(t%l|0,t/l|0,e)}function o(e,i,r){return new t(e,i,r)}t.fromInt=n,t.fromNumber=s,t.fromBits=o;var f=Math.pow;function h(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return c;if("number"==typeof e?(i=e,e=!1):e=!!e,(i=i||10)<2||36<i)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return h(t.substring(1),e,i).neg();for(var n=s(f(i,8)),o=c,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),i);if(l<8){var g=s(f(i,l));o=o.mul(g).add(s(u))}else o=(o=o.mul(n)).add(s(u))}return o.unsigned=e,o}function a(e){return e instanceof t?e:"number"==typeof e?s(e):"string"==typeof e?h(e):o(e.low,e.high,e.unsigned)}t.fromString=h,t.fromValue=a;var l=4294967296,u=l*l,g=u/2,v=n(1<<24),c=n(0);t.ZERO=c;var d=n(0,!0);t.UZERO=d;var w=n(1);t.ONE=w;var b=n(1,!0);t.UONE=b;var y=n(-1);t.NEG_ONE=y;var p=o(-1,2147483647,!1);t.MAX_VALUE=p;var m=o(-1,-1,!0);t.MAX_UNSIGNED_VALUE=m;var E=o(0,-2147483648,!1);t.MIN_VALUE=E;var I=t.prototype;return I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},I.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=s(t),i=this.div(e),r=i.mul(e).sub(this);return i.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var n=s(f(t,6),this.unsigned),o=this,h="";;){var a=o.div(n),l=(o.sub(a.mul(n)).toInt()>>>0).toString(t);if((o=a).isZero())return l+h;for(;l.length<6;)l="0"+l;h=""+l+h}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},I.isZero=function(){return 0===this.high&&0===this.low},I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(t){return e(t)||(t=a(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},I.eq=I.equals,I.notEquals=function(t){return!this.eq(t)},I.neq=I.notEquals,I.lessThan=function(t){return this.comp(t)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(t){return this.comp(t)<=0},I.lte=I.lessThanOrEqual,I.greaterThan=function(t){return this.comp(t)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(t){return this.comp(t)>=0},I.gte=I.greaterThanOrEqual,I.compare=function(t){if(e(t)||(t=a(t)),this.eq(t))return 0;var i=this.isNegative(),r=t.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(w)},I.neg=I.negate,I.add=function(t){e(t)||(t=a(t));var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,s=65535&this.low,f=t.high>>>16,h=65535&t.high,l=t.low>>>16,u=0,g=0,v=0,c=0;return v+=(c+=s+(65535&t.low))>>>16,g+=(v+=n+l)>>>16,u+=(g+=r+h)>>>16,u+=i+f,o((v&=65535)<<16|(c&=65535),(u&=65535)<<16|(g&=65535),this.unsigned)},I.subtract=function(t){return e(t)||(t=a(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return c;if(e(t)||(t=a(t)),t.isZero())return c;if(this.eq(E))return t.isOdd()?E:c;if(t.eq(E))return this.isOdd()?E:c;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return s(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,f=65535&this.low,h=t.high>>>16,l=65535&t.high,u=t.low>>>16,g=65535&t.low,d=0,w=0,b=0,y=0;return b+=(y+=f*g)>>>16,w+=(b+=n*g)>>>16,b&=65535,w+=(b+=f*u)>>>16,d+=(w+=r*g)>>>16,w&=65535,d+=(w+=n*u)>>>16,w&=65535,d+=(w+=f*l)>>>16,d+=i*g+r*u+n*l+f*h,o((b&=65535)<<16|(y&=65535),(d&=65535)<<16|(w&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(e(t)||(t=a(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?d:c;var i,r,n;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return d;if(t.gt(this.shru(1)))return b;n=d}else{if(this.eq(E))return t.eq(w)||t.eq(y)?E:t.eq(E)?w:(i=this.shr(1).div(t).shl(1)).eq(c)?t.isNegative()?w:y:(r=this.sub(t.mul(i)),n=i.add(r.div(t)));if(t.eq(E))return this.unsigned?d:c;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=c}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),h=o<=48?1:f(2,o-48),l=s(i),u=l.mul(t);u.isNegative()||u.gt(r);)u=(l=s(i-=h,this.unsigned)).mul(t);l.isZero()&&(l=w),n=n.add(l),r=r.sub(u)}return n},I.div=I.divide,I.modulo=function(t){return e(t)||(t=a(t)),this.sub(this.div(t).mul(t))},I.mod=I.modulo,I.not=function(){return o(~this.low,~this.high,this.unsigned)},I.and=function(t){return e(t)||(t=a(t)),o(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return e(t)||(t=a(t)),o(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return e(t)||(t=a(t)),o(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?o(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):o(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?o(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):o(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var i=this.high;return t<32?o(this.low>>>t|i<<32-t,i>>>t,this.unsigned):o(32===t?i:i>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},I.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t},(t=m)&&t.exports?t.exports=i():(e.dcodeIO=e.dcodeIO||{}).Long=i()),m.exports;var t,e,i}()}catch(e){}return y(t)}():(b.dcodeIO=b.dcodeIO||{}).ByteBuffer=y(b.dcodeIO.Long)),p.exports));async function T(t,e="get",i,r){try{const n="get"===e.toLowerCase()?"params":"data",s={"Content-Type":"application/json",...null==r?void 0:r.headers},f=await o({method:e,url:t,headers:s,[n]:i,...r});if(200!==f.status)throw f;return f}catch(n){return o.isCancel(n)||process.env.NODE_ENV,Promise.reject(n)}}const L={},U=(t,e,i={})=>{var r,s,o;r=t.toString(),s=()=>{let r;r="boolean"==typeof e?e?"success":"error":e,n.useToast().open(Object.assign({},{message:t,type:r},i))},o=300,L[r]&&clearTimeout(L[r]),L[r]=window.setTimeout(()=>{s(),delete L[r]},o)},A=s.reactive(new Map),S=s.reactive(new Map),N=(t,e)=>{t&&e&&A.set(t,e)},R=t=>{t&&A.delete(t)},F=(t,e)=>{t&&e&&S.set(t,e)},B=t=>{t&&S.delete(t)},_=["_RID","createDatetime","createUser","updateDatetime","updateUser"],C=()=>({currentValue:s.ref(0),totalValue:s.ref(0),progressTime:s.ref(0),remainTime:s.ref(0)}),O=t=>{switch(t){case f:return"System.String";case h:return"System.Decimal";case a:return"System.Boolean";case l:return"System.DateTime";default:return"System.String"}},k=t=>decodeURIComponent(t).replace(/\+/g," "),x=i.defineStore("excelPopup",()=>{const t=n.useMozLocale(),i=s.ref(!1),o=s.ref(!1),v=s.ref(void 0),c=s.ref("excel"),d=s.ref({keyColumns:[],columnLayout:"",columnMap:{},apiKey:"",apiParams:{},targetTable:"",refreshKey:"",useDataPreclear:!1,disableMasterProperty:!1,targetStorage:"postgresql"}),w=s.ref({onUpload:t=>{},onAdd:t=>{},onTruncate:()=>{},onValidation:(t,e,i)=>{},onRefresh:()=>{},onDownload:()=>{},onNotify:t=>{}}),b=s.ref(null),y=s.reactive(new Map),p=s.ref("init"),m=s.ref(null),E=async(e={})=>{if(b.value)return U(t.value.Grid.alreadyExcelProgress,!1);const i=g();b.value=new u("Download",i),m.value={current:0,total:100,remainTime:-1,sessionID:i,fileName:""},e.session_id=i;try{const t="/excel/download/"+(e.sample_data?"sample":"fetch");await async function(t,e,i={}){const r=new AbortController,{signal:n}=r,s=await fetch(t,{method:"post",signal:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.body)return;const o=s.body.getReader(),f=new I,h=decodeURI(s.headers.get("content-disposition").split("=")[1]).replaceAll("+"," "),a=new ReadableStream({start(t){!function i(){o.read().then(({done:r,value:n})=>{if(r){f.flip();const i=new Blob([f.toArrayBuffer()]);return t.close(),void e.completed(i?{fileName:h,blob:i}:void 0)}n&&(t.enqueue(n),f.append(n),e.offset+=n.byteLength,i())})}()},cancel(t){f.clear(),r.abort()}});e.isCancelable=!0,e.onCancelClick=async()=>{e.isCanceled=!0,a.cancel(""),e.completed()}}(t,b.value,e),b.value.onCompleted=L,b.value.onCancelClick=C}catch{return b.value=null,U(t.value.Grid.downloadFail,!1)}},L=t=>{t.blobInfo&&(r.saveAs(t.blobInfo.blob,t.blobInfo.fileName),b.value=null,m.value=null)},C=t=>{b.value=null,m.value=null},x=t=>{const e=null==t?void 0:t.columns;if(!e)return[];if("function"==typeof e.getAll){const t={number:h,boolean:a,date:l,string:f};return e.getAll().map(e=>({binding:e.id,header:e.header??e.label??e.id,dataType:t[e.type]??f,visible:!1!==e.visible,format:void 0,isRequired:e.required??!1}))}return"function"==typeof e.filter?Array.from(e):[]},D=(t,e)=>{const i={};return t?(x(t).filter(t=>!_.includes(t.binding)).forEach(t=>{t.header&&t.binding&&(i[t.header]={column_name:t.binding,column_type:O(t.dataType||f),is_required:t.isRequired,is_key:!!t.binding&&(null==e?void 0:e.includes(t.binding))})}),i):i},M=(t,e)=>{const i={};if(!t)return i;const{visibleOnly:r=!1}=e??{};return x(t).filter(t=>!_.includes(t.binding)).filter(t=>!r||!1!==t.visible).forEach(t=>{t.binding&&(i[t.binding]={column_name:t.header,column_type:O(t.dataType||f),column_format:t.format})}),i};class z{constructor(t,i){e(this,"keyColumns"),e(this,"columnLayout"),e(this,"columnMap"),this.keyColumns=t,this.columnLayout=i.columnLayout,this.columnMap=D(i,t)}}return{showPopup:i,isOverwrite:o,exportFormat:c,excelInfo:d,excelAPI:w,file:b,excelFileMap:y,downloadInfo:m,initialize:(t={},e={})=>{d.value={...d.value,...t},w.value={...w.value,...e},p.value="init"},setInfo:t=>{d.value={...d.value,...t}},newExcelInfo:(t,e)=>new z(t,e),setAPI:t=>{w.value={...w.value,...t}},newExcelApi:(e,r,n,s,o,f,h)=>(F(e,o),{onUpload:t=>f(t),onAdd:async t=>{try{return p.value="success",await h({url:e,param:t,method:"POST"})}catch(i){p.value="error"}},onTruncate:async()=>{try{return p.value="success",await h({url:e,param:[],method:"DELETE"})}catch(t){p.value="error"}},onDownload:()=>E({sample_data:n,file_name:s,column_map:M(r)}),onRefresh:()=>{switch(F(e,o),p.value){case"init":break;case"success":U(t.value.Grid.toastSaveSuccess,!0);break;case"error":U(t.value.Grid.toastSaveError,!1)}p.value="init",o()},onNotify:t=>{i.value&&U(t.message,t.type)}}),setExportFormat:t=>{c.value=t},setUploadSuccess:t=>{p.value=t},show:(t=!0)=>{o.value=t,i.value=!0},hide:()=>{i.value=!1},download:E,createColumnMapForImport:D,createColumnMapForExport:M,createFieldMapForExport:t=>{const e={};return t?(t.engine.fields.filter(t=>!_.includes(t.binding)).forEach(t=>{t.binding&&(e[t.binding]={column_name:t.header,column_type:O(t.dataType||f)})}),e):e},updateDownloadStatus:t=>{var e;null!=m.value&&(null==(e=m.value)?void 0:e.sessionID)===t.sessionID&&(m.value.current=t.current,m.value.total=t.total,m.value.remainTime=t.remainTime,m.value.notiDatetime=t.notiDatetime,m.value.isDone=t.isDone)},downloadFromS3:t=>{if(t)try{const e=document.createElement("a");e.setAttribute("href",t),document.body.appendChild(e),e.click(),document.body.removeChild(e),m.value=null}catch(e){throw e}},requestGenerateExcel:async(t={},e={})=>{const i=`/api/module/data-transfer/${t.project_id??"none"}/excel/generate-download-url`,r=await T(i,"post",t,e),n=t.client_id,s=r.data.data.file_name,o=k(s);return y.set(n,o),r},targetTable:v,registerUploadOwner:N,clearUploadOwner:R,registerRefresh:F,unregisterRefresh:B,triggerRefreshBySession:t=>{var e,i;const r=(t=>{const e=A.get(t);return e?S.get(e):void 0})(t);return!!r&&(r(),null==(i=(e=w.value).onRefresh)||i.call(e),!0)}}}),D=i.defineStore("excelDownload",C),M=i.defineStore("excelUpload",C);exports.dataTypeToString=O,exports.generateGUID=g,exports.useExcelDownloadStore=D,exports.useExcelStore=x,exports.useExcelUploadStore=M;
@@ -1,17 +0,0 @@
1
- type DragEventData = {
2
- name: string;
3
- sourceComponentId: string;
4
- itemKey: string;
5
- item: any;
6
- };
7
- type EventCallback = (data: DragEventData) => void;
8
- declare class DraggingEventBus {
9
- private static instance;
10
- private listeners;
11
- private constructor();
12
- static getInstance(): DraggingEventBus;
13
- subscribe(groupName: string, eventName: string, callback: EventCallback): () => void;
14
- emit(eventName: string, data: DragEventData): void;
15
- }
16
- export declare const draggingEventBus: DraggingEventBus;
17
- export {};
@@ -1,49 +0,0 @@
1
- interface Props {
2
- name: string;
3
- copy?: boolean;
4
- sortable?: boolean;
5
- itemKey: string;
6
- direction?: 'vertical' | 'horizontal';
7
- /** CSS 셀렉터 — 지정 시 해당 요소에서만 드래그 시작 (나머지 영역은 텍스트 선택 가능) */
8
- dragHandle?: string;
9
- onBeforeItemDrop?: (item: any) => boolean;
10
- onItemDrop?: (item: any) => any;
11
- }
12
- type __VLS_Props = Props;
13
- type __VLS_PublicProps = {
14
- modelValue: any[];
15
- } & __VLS_Props;
16
- declare function __VLS_template(): {
17
- attrs: Partial<{}>;
18
- slots: {
19
- default?(_: {
20
- item: any;
21
- index: number;
22
- }): any;
23
- };
24
- refs: {};
25
- rootEl: any;
26
- };
27
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
- drag: (...args: any[]) => void;
30
- "update:modelValue": (value: any[]) => void;
31
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
32
- onDrag?: ((...args: any[]) => any) | undefined;
33
- "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
34
- }>, {
35
- copy: boolean;
36
- direction: "vertical" | "horizontal";
37
- sortable: boolean;
38
- itemKey: string;
39
- dragHandle: string;
40
- onBeforeItemDrop: (item: any) => boolean;
41
- onItemDrop: (item: any) => any;
42
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
- export default _default;
45
- type __VLS_WithTemplateSlots<T, S> = T & {
46
- new (): {
47
- $slots: S;
48
- };
49
- };