document-model 1.1.0-experimental.1 → 1.1.0-experimental.2

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 (40) hide show
  1. package/dist/browser/cjs/document-model.js +1 -1
  2. package/dist/browser/cjs/document.js +1 -1
  3. package/dist/browser/cjs/index.js +1 -1
  4. package/dist/browser/cjs/internal/{index-DypcJuba.js → index-DLodkpOq.js} +1 -1
  5. package/dist/browser/cjs/internal/index-azT4DEce.js +1 -0
  6. package/dist/browser/cjs/internal/{object-BU2CI8g7.js → object-CMr-_AP8.js} +21 -21
  7. package/dist/browser/es/document-model.js +2 -2
  8. package/dist/browser/es/document.js +2 -2
  9. package/dist/browser/es/index.js +3 -3
  10. package/dist/browser/es/internal/index-BzNpRs2a.js +44 -0
  11. package/dist/browser/es/internal/{index-CyBZ1dJQ.js → index-CL_1ivGq.js} +1 -1
  12. package/dist/browser/es/internal/{object-CPDHmXxz.js → object-FFc9n_3I.js} +917 -840
  13. package/dist/browser/src/document/object.d.ts +35 -0
  14. package/dist/browser/src/document/types.d.ts +6 -0
  15. package/dist/browser/src/document/utils/base.d.ts +5 -4
  16. package/dist/browser/src/document/utils/document-helpers.d.ts +1 -1
  17. package/dist/browser/src/document/utils/index.d.ts +1 -1
  18. package/dist/node/cjs/document-model.js +1 -1
  19. package/dist/node/cjs/document.js +1 -1
  20. package/dist/node/cjs/index.js +1 -1
  21. package/dist/node/cjs/internal/{index-Bt4KwBzM.js → index-CPeTtUsk.js} +1 -1
  22. package/dist/node/cjs/internal/index-CTavCc1t.js +1 -0
  23. package/dist/node/cjs/internal/object-DhI24-1e.js +20 -0
  24. package/dist/node/es/document-model.js +2 -2
  25. package/dist/node/es/document.js +2 -2
  26. package/dist/node/es/index.js +3 -3
  27. package/dist/node/es/internal/index-8lUz8qED.js +44 -0
  28. package/dist/node/es/internal/{index-6nUwJlFL.js → index-A880In4b.js} +1 -1
  29. package/dist/node/es/internal/{object-DofGWMf1.js → object-C9n9Ijnt.js} +675 -598
  30. package/dist/node/src/document/object.d.ts +35 -0
  31. package/dist/node/src/document/types.d.ts +6 -0
  32. package/dist/node/src/document/utils/base.d.ts +5 -4
  33. package/dist/node/src/document/utils/document-helpers.d.ts +1 -1
  34. package/dist/node/src/document/utils/index.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/browser/cjs/internal/index-DZx9eknf.js +0 -1
  37. package/dist/browser/es/internal/index-BP3Z2ZVF.js +0 -43
  38. package/dist/node/cjs/internal/index-CwTTSCCW.js +0 -1
  39. package/dist/node/cjs/internal/object-Bc_eSRcx.js +0 -20
  40. package/dist/node/es/internal/index-CLgAZiia.js +0 -43
@@ -89,6 +89,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
89
89
  readonly hash: string;
90
90
  readonly skip: number;
91
91
  readonly error?: string | undefined;
92
+ readonly resultingState?: unknown;
92
93
  } | {
93
94
  readonly type: "PRUNE";
94
95
  readonly input: {
@@ -122,6 +123,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
122
123
  readonly hash: string;
123
124
  readonly skip: number;
124
125
  readonly error?: string | undefined;
126
+ readonly resultingState?: unknown;
125
127
  } | {
126
128
  readonly type: "REDO";
127
129
  readonly input: number;
@@ -152,6 +154,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
152
154
  readonly hash: string;
153
155
  readonly skip: number;
154
156
  readonly error?: string | undefined;
157
+ readonly resultingState?: unknown;
155
158
  } | {
156
159
  readonly type: "SET_NAME";
157
160
  readonly input: string;
@@ -182,6 +185,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
182
185
  readonly hash: string;
183
186
  readonly skip: number;
184
187
  readonly error?: string | undefined;
188
+ readonly resultingState?: unknown;
185
189
  } | {
186
190
  readonly type: "UNDO";
187
191
  readonly input: number;
@@ -212,6 +216,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
212
216
  readonly hash: string;
213
217
  readonly skip: number;
214
218
  readonly error?: string | undefined;
219
+ readonly resultingState?: unknown;
215
220
  } | {
216
221
  readonly type: "NOOP";
217
222
  readonly input: unknown;
@@ -242,12 +247,14 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
242
247
  readonly hash: string;
243
248
  readonly skip: number;
244
249
  readonly error?: string | undefined;
250
+ readonly resultingState?: unknown;
245
251
  } | import("immer").Immutable<A & {
246
252
  index: number;
247
253
  timestamp: string;
248
254
  hash: string;
249
255
  skip: number;
250
256
  error?: string | undefined;
257
+ resultingState?: unknown;
251
258
  }>)[];
252
259
  readonly local: readonly ({
253
260
  readonly type: "LOAD_STATE";
@@ -285,6 +292,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
285
292
  readonly hash: string;
286
293
  readonly skip: number;
287
294
  readonly error?: string | undefined;
295
+ readonly resultingState?: unknown;
288
296
  } | {
289
297
  readonly type: "PRUNE";
290
298
  readonly input: {
@@ -318,6 +326,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
318
326
  readonly hash: string;
319
327
  readonly skip: number;
320
328
  readonly error?: string | undefined;
329
+ readonly resultingState?: unknown;
321
330
  } | {
322
331
  readonly type: "REDO";
323
332
  readonly input: number;
@@ -348,6 +357,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
348
357
  readonly hash: string;
349
358
  readonly skip: number;
350
359
  readonly error?: string | undefined;
360
+ readonly resultingState?: unknown;
351
361
  } | {
352
362
  readonly type: "SET_NAME";
353
363
  readonly input: string;
@@ -378,6 +388,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
378
388
  readonly hash: string;
379
389
  readonly skip: number;
380
390
  readonly error?: string | undefined;
391
+ readonly resultingState?: unknown;
381
392
  } | {
382
393
  readonly type: "UNDO";
383
394
  readonly input: number;
@@ -408,6 +419,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
408
419
  readonly hash: string;
409
420
  readonly skip: number;
410
421
  readonly error?: string | undefined;
422
+ readonly resultingState?: unknown;
411
423
  } | {
412
424
  readonly type: "NOOP";
413
425
  readonly input: unknown;
@@ -438,12 +450,14 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
438
450
  readonly hash: string;
439
451
  readonly skip: number;
440
452
  readonly error?: string | undefined;
453
+ readonly resultingState?: unknown;
441
454
  } | import("immer").Immutable<A & {
442
455
  index: number;
443
456
  timestamp: string;
444
457
  hash: string;
445
458
  skip: number;
446
459
  error?: string | undefined;
460
+ resultingState?: unknown;
447
461
  }>)[];
448
462
  };
449
463
  /**
@@ -553,6 +567,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
553
567
  readonly hash: string;
554
568
  readonly skip: number;
555
569
  readonly error?: string | undefined;
570
+ readonly resultingState?: unknown;
556
571
  } | {
557
572
  readonly type: "PRUNE";
558
573
  readonly input: {
@@ -586,6 +601,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
586
601
  readonly hash: string;
587
602
  readonly skip: number;
588
603
  readonly error?: string | undefined;
604
+ readonly resultingState?: unknown;
589
605
  } | {
590
606
  readonly type: "REDO";
591
607
  readonly input: number;
@@ -616,6 +632,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
616
632
  readonly hash: string;
617
633
  readonly skip: number;
618
634
  readonly error?: string | undefined;
635
+ readonly resultingState?: unknown;
619
636
  } | {
620
637
  readonly type: "SET_NAME";
621
638
  readonly input: string;
@@ -646,6 +663,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
646
663
  readonly hash: string;
647
664
  readonly skip: number;
648
665
  readonly error?: string | undefined;
666
+ readonly resultingState?: unknown;
649
667
  } | {
650
668
  readonly type: "UNDO";
651
669
  readonly input: number;
@@ -676,6 +694,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
676
694
  readonly hash: string;
677
695
  readonly skip: number;
678
696
  readonly error?: string | undefined;
697
+ readonly resultingState?: unknown;
679
698
  } | {
680
699
  readonly type: "NOOP";
681
700
  readonly input: unknown;
@@ -706,12 +725,14 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
706
725
  readonly hash: string;
707
726
  readonly skip: number;
708
727
  readonly error?: string | undefined;
728
+ readonly resultingState?: unknown;
709
729
  } | import("immer").Immutable<A & {
710
730
  index: number;
711
731
  timestamp: string;
712
732
  hash: string;
713
733
  skip: number;
714
734
  error?: string | undefined;
735
+ resultingState?: unknown;
715
736
  }>)[];
716
737
  readonly local: readonly ({
717
738
  readonly type: "LOAD_STATE";
@@ -749,6 +770,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
749
770
  readonly hash: string;
750
771
  readonly skip: number;
751
772
  readonly error?: string | undefined;
773
+ readonly resultingState?: unknown;
752
774
  } | {
753
775
  readonly type: "PRUNE";
754
776
  readonly input: {
@@ -782,6 +804,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
782
804
  readonly hash: string;
783
805
  readonly skip: number;
784
806
  readonly error?: string | undefined;
807
+ readonly resultingState?: unknown;
785
808
  } | {
786
809
  readonly type: "REDO";
787
810
  readonly input: number;
@@ -812,6 +835,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
812
835
  readonly hash: string;
813
836
  readonly skip: number;
814
837
  readonly error?: string | undefined;
838
+ readonly resultingState?: unknown;
815
839
  } | {
816
840
  readonly type: "SET_NAME";
817
841
  readonly input: string;
@@ -842,6 +866,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
842
866
  readonly hash: string;
843
867
  readonly skip: number;
844
868
  readonly error?: string | undefined;
869
+ readonly resultingState?: unknown;
845
870
  } | {
846
871
  readonly type: "UNDO";
847
872
  readonly input: number;
@@ -872,6 +897,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
872
897
  readonly hash: string;
873
898
  readonly skip: number;
874
899
  readonly error?: string | undefined;
900
+ readonly resultingState?: unknown;
875
901
  } | {
876
902
  readonly type: "NOOP";
877
903
  readonly input: unknown;
@@ -902,12 +928,14 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
902
928
  readonly hash: string;
903
929
  readonly skip: number;
904
930
  readonly error?: string | undefined;
931
+ readonly resultingState?: unknown;
905
932
  } | import("immer").Immutable<A & {
906
933
  index: number;
907
934
  timestamp: string;
908
935
  hash: string;
909
936
  skip: number;
910
937
  error?: string | undefined;
938
+ resultingState?: unknown;
911
939
  }>)[];
912
940
  };
913
941
  readonly initialState: {
@@ -968,6 +996,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
968
996
  readonly hash: string;
969
997
  readonly skip: number;
970
998
  readonly error?: string | undefined;
999
+ readonly resultingState?: unknown;
971
1000
  } | {
972
1001
  readonly type: "PRUNE";
973
1002
  readonly input: {
@@ -1001,6 +1030,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
1001
1030
  readonly hash: string;
1002
1031
  readonly skip: number;
1003
1032
  readonly error?: string | undefined;
1033
+ readonly resultingState?: unknown;
1004
1034
  } | {
1005
1035
  readonly type: "REDO";
1006
1036
  readonly input: number;
@@ -1031,6 +1061,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
1031
1061
  readonly hash: string;
1032
1062
  readonly skip: number;
1033
1063
  readonly error?: string | undefined;
1064
+ readonly resultingState?: unknown;
1034
1065
  } | {
1035
1066
  readonly type: "SET_NAME";
1036
1067
  readonly input: string;
@@ -1061,6 +1092,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
1061
1092
  readonly hash: string;
1062
1093
  readonly skip: number;
1063
1094
  readonly error?: string | undefined;
1095
+ readonly resultingState?: unknown;
1064
1096
  } | {
1065
1097
  readonly type: "UNDO";
1066
1098
  readonly input: number;
@@ -1091,6 +1123,7 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
1091
1123
  readonly hash: string;
1092
1124
  readonly skip: number;
1093
1125
  readonly error?: string | undefined;
1126
+ readonly resultingState?: unknown;
1094
1127
  } | {
1095
1128
  readonly type: "NOOP";
1096
1129
  readonly input: unknown;
@@ -1121,12 +1154,14 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
1121
1154
  readonly hash: string;
1122
1155
  readonly skip: number;
1123
1156
  readonly error?: string | undefined;
1157
+ readonly resultingState?: unknown;
1124
1158
  } | import("immer").Immutable<A & {
1125
1159
  index: number;
1126
1160
  timestamp: string;
1127
1161
  hash: string;
1128
1162
  skip: number;
1129
1163
  error?: string | undefined;
1164
+ resultingState?: unknown;
1130
1165
  }>)[];
1131
1166
  };
1132
1167
  /**
@@ -52,6 +52,10 @@ export type ReducerOptions = {
52
52
  ignoreSkipOperations?: boolean;
53
53
  /** if true reuses the provided action hash */
54
54
  reuseHash?: boolean;
55
+ /** if true reuses the provided action resulting state instead of replaying it */
56
+ reuseOperationResultingState?: boolean;
57
+ /** Optional parser for the operation resulting state, uses JSON.parse by default */
58
+ operationResultingStateParser?: (state: unknown) => object;
55
59
  };
56
60
  /**
57
61
  * A pure function that takes an action and the previous state
@@ -102,6 +106,8 @@ export type Operation<A extends Action = Action> = A & {
102
106
  skip: number;
103
107
  /** Error message for a failed action */
104
108
  error?: string;
109
+ /** The resulting state after the operation */
110
+ resultingState?: unknown;
105
111
  };
106
112
  /**
107
113
  * The base attributes of a {@link Document}.
@@ -1,5 +1,5 @@
1
1
  import { baseReducer } from '../reducer';
2
- import { Action, BaseAction, UndoRedoAction, Document, ExtendedState, ImmutableStateReducer, Reducer, Immutable, OperationScope, State, CreateState, PartialState, DocumentOperations, DocumentHeader, DocumentOperationsIgnoreMap, Operation, MappedOperation } from '../types';
2
+ import { Action, BaseAction, UndoRedoAction, Document, ExtendedState, ImmutableStateReducer, Reducer, Immutable, OperationScope, State, CreateState, PartialState, DocumentOperations, DocumentHeader, DocumentOperationsIgnoreMap, Operation, MappedOperation, ReducerOptions } from '../types';
3
3
  import { SignalDispatch } from '../signal';
4
4
  export declare function isNoopOperation(op: Partial<Operation>): boolean;
5
5
  export declare function isUndoRedo(action: Action): action is UndoRedoAction;
@@ -74,12 +74,13 @@ export declare function mapSkippedOperations<A extends Action>(operations: Opera
74
74
  export declare function calculateSkipsLeft<A extends Action>(operations: Operation<BaseAction | A>[], currentIndex: number, skip: number): number;
75
75
  export declare function sortOperations<A extends Action>(operations: DocumentOperations<A>): Operation<BaseAction | A>[];
76
76
  export declare function sortMappedOperations<A extends Action>(operations: DocumentOperationsIgnoreMap<A>): MappedOperation<A>[];
77
- export declare function replayOperations<T, A extends Action, L>(initialState: ExtendedState<T, L>, clearedOperations: DocumentOperations<A>, reducer: ImmutableStateReducer<T, A, L>, dispatch?: SignalDispatch, header?: DocumentHeader, documentReducer?: typeof baseReducer, skipHeaderOperations?: SkipHeaderOperations, options?: {
78
- checkHashes?: boolean;
79
- }): Document<T, A, L>;
77
+ export declare function replayOperations<T, A extends Action, L>(initialState: ExtendedState<T, L>, clearedOperations: DocumentOperations<A>, reducer: ImmutableStateReducer<T, A, L>, dispatch?: SignalDispatch, header?: DocumentHeader, documentReducer?: typeof baseReducer, skipHeaderOperations?: SkipHeaderOperations, options?: ReducerOptions): Document<T, A, L>;
80
78
  export type SkipHeaderOperations = Partial<Record<OperationScope, number>>;
81
79
  export type ReplayDocumentOptions = {
82
80
  checkHashes?: boolean;
81
+ reuseOperationResultingState?: boolean;
82
+ operationResultingStateParser?: (state: unknown) => object;
83
83
  };
84
84
  export declare function replayDocument<T, A extends Action, L>(initialState: ExtendedState<T, L>, operations: DocumentOperations<A>, reducer: Reducer<T, A, L>, dispatch?: SignalDispatch, header?: DocumentHeader, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): Document<T, A, L>;
85
85
  export declare function isSameDocument(documentA: Document, documentB: Document): boolean;
86
+ export declare function parseResultingState(state: unknown): object;
@@ -49,5 +49,5 @@ export type SkipHeaderOperationIndex = Partial<Pick<OperationIndex, 'index'>> &
49
49
  * @returns The remaining operations after skipping header operations.
50
50
  */
51
51
  export declare function skipHeaderOperations<A extends OperationIndex>(operations: A[], skipHeaderOperation: SkipHeaderOperationIndex): A[];
52
- export declare function grabageCollectDocumentOperations<A extends Action>(documentOperations: DocumentOperations<A>): DocumentOperations<A>;
52
+ export declare function garbageCollectDocumentOperations<A extends Action>(documentOperations: DocumentOperations<A>): DocumentOperations<A>;
53
53
  export {};
@@ -1,5 +1,5 @@
1
1
  export * from './base';
2
- export { createAction, createDocument, createExtendedState, createReducer, hashDocument, hashKey, isBaseAction, mapSkippedOperations, readOnly, replayDocument, replayOperations, sortMappedOperations, sortOperations, } from './base';
2
+ export { createAction, createDocument, createExtendedState, createReducer, hashDocument, hashKey, isBaseAction, mapSkippedOperations, parseResultingState, readOnly, replayDocument, replayOperations, sortMappedOperations, sortOperations, } from './base';
3
3
  export * from './file';
4
4
  export * from './validation';
5
5
  export * as documentHelpers from './document-helpers';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./internal/object-Bc_eSRcx.js");require("immer");require("jszip");require("crypto");require("fs");require("https");require("path");const e=require("./internal/index-Bt4KwBzM.js");require("zod");exports.Document=e.Document;exports.DocumentModel=e.DocumentModel$1;exports.actions=e.actions;exports.documentModel=e.documentModel;exports.module=e.module;exports.reducer=e.reducer;exports.utils=e.utils;exports.validateInitialState=e.validateInitialState;exports.validateModule=e.validateModule;exports.validateModuleOperation=e.validateModuleOperation;exports.validateModules=e.validateModules;exports.validateStateSchemaName=e.validateStateSchemaName;exports.z=e.zod;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./internal/object-DhI24-1e.js");require("immer");require("jszip");require("crypto");require("fs");require("https");require("path");const e=require("./internal/index-CPeTtUsk.js");require("zod");exports.Document=e.Document;exports.DocumentModel=e.DocumentModel$1;exports.actions=e.actions;exports.documentModel=e.documentModel;exports.module=e.module;exports.reducer=e.reducer;exports.utils=e.utils;exports.validateInitialState=e.validateInitialState;exports.validateModule=e.validateModule;exports.validateModuleOperation=e.validateModuleOperation;exports.validateModules=e.validateModules;exports.validateStateSchemaName=e.validateStateSchemaName;exports.z=e.zod;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./internal/object-Bc_eSRcx.js"),r=require("./internal/index-CwTTSCCW.js");require("immer");require("zod");require("jszip");require("crypto");require("fs");require("https");require("path");exports.BaseDocument=e.BaseDocument;exports.actions=e.BaseActions;exports.applyMixins=e.applyMixins;exports.baseReducer=e.baseReducer;exports.processUndoRedo=e.processUndoRedo;exports.z=e.zod;exports.utils=r.index;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./internal/object-DhI24-1e.js"),r=require("./internal/index-CTavCc1t.js");require("immer");require("zod");require("jszip");require("crypto");require("fs");require("https");require("path");exports.BaseDocument=e.BaseDocument;exports.actions=e.BaseActions;exports.applyMixins=e.applyMixins;exports.baseReducer=e.baseReducer;exports.processUndoRedo=e.processUndoRedo;exports.z=e.zod;exports.utils=r.index;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./internal/index-CwTTSCCW.js"),o=require("./internal/index-Bt4KwBzM.js");require("./internal/object-Bc_eSRcx.js");require("immer");require("zod");require("jszip");require("crypto");require("fs");require("https");require("path");const u={"powerhouse/document":e.Document,"powerhouse/document-model":o.DocumentModel},t={Document:e.Document,DocumentModel:o.DocumentModel};exports.Document=e.Document;exports.DocumentModel=o.DocumentModel;exports.DocumentModels=u;exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./internal/index-CTavCc1t.js"),o=require("./internal/index-CPeTtUsk.js");require("./internal/object-DhI24-1e.js");require("immer");require("zod");require("jszip");require("crypto");require("fs");require("https");require("path");const u={"powerhouse/document":e.Document,"powerhouse/document-model":o.DocumentModel},t={Document:e.Document,DocumentModel:o.DocumentModel};exports.Document=e.Document;exports.DocumentModel=o.DocumentModel;exports.DocumentModels=u;exports.default=t;
@@ -1,4 +1,4 @@
1
- "use strict";var Tt=Object.defineProperty;var Rt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var be=(t,e,r)=>(Rt(t,typeof e!="symbol"?e+"":e,r),r);const s=require("./object-Bc_eSRcx.js");require("immer");require("jszip");require("crypto");require("fs");require("https");require("path");const o=require("zod"),xt=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Mt=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Dt=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Nt=/[^\p{L}\d]+/giu,_e="$1\0$2",Ae="";function ze(t){let e=t.trim();e=e.replace(xt,_e).replace(Mt,_e),e=e.replace(Nt,"\0");let r=0,n=e.length;for(;e.charAt(r)==="\0";)r++;if(r===n)return[];for(;e.charAt(n-1)==="\0";)n--;return e.slice(r,n).split(/\0/g)}function Lt(t){const e=ze(t);for(let r=0;r<e.length;r++){const n=e[r],i=Dt.exec(n);if(i){const a=i.index+(i[1]??i[2]).length;e.splice(r,1,n.slice(0,a),n.slice(a))}}return e}function Ie(t,e){const[r,n,i]=wt(t,e),a=Pt(e==null?void 0:e.locale),l=jt(e==null?void 0:e.locale),d=e!=null&&e.mergeAmbiguousCharacters?Ct(a,l):yt(a,l);return r+n.map(d).join((e==null?void 0:e.delimiter)??"")+i}function Pt(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function jt(t){return t===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t)}function Ct(t,e){return r=>`${e(r[0])}${t(r.slice(1))}`}function yt(t,e){return(r,n)=>{const i=r[0];return(n>0&&i>="0"&&i<="9"?"_"+i:e(i))+t(r.slice(1))}}function wt(t,e={}){const r=e.split??(e.separateNumbers?Lt:ze),n=e.prefixCharacters??Ae,i=e.suffixCharacters??Ae;let a=0,l=t.length;for(;a<t.length;){const d=t.charAt(a);if(!n.includes(d))break;a++}for(;l>a;){const d=l-1,zt=t.charAt(d);if(!i.includes(zt))break;l=d}return[t.slice(0,a),r(t.slice(a,l)),t.slice(l)]}function T(t,e=!1){const r=[];if(e&&t==="")return r;try{const n=JSON.parse(t);!e&&!Object.keys(n).length&&r.push({message:"Initial state cannot be empty",details:{initialState:t}})}catch{r.push({message:"Invalid initial state",details:{initialState:t}})}return r}function R(t,e,r="",n=!0){const i=[];if(!n&&!t)return i.push({message:"State schema is required",details:{schema:t}}),i;if(n&&!t)return i;const a=`type ${Ie(e)}${Ie(r)}State`;return t.includes(a)||i.push({message:`Invalid state schema name. Expected ${a}`,details:{schema:t}}),i}function x(t){const e=[];t.length||e.push({message:"Modules are required",details:{modules:t}});const r=t.reduce((n,i)=>[...n,...b(i)],[]);return[...e,...r]}function b(t){const e=[];t.name||e.push({message:"Module name is required",details:{module:t}}),t.operations.length||e.push({message:"Module operations are required",details:{module:t}});const r=t.operations.reduce((n,i)=>[...n,..._(i)],[]);return[...e,...r]}function _(t){const e=[];return t.name||e.push({message:"Operation name is required",details:{operation:t}}),t.schema||e.push({message:"Operation schema is required",details:{operation:t}}),e}const kt=Object.freeze(Object.defineProperty({__proto__:null,validateInitialState:T,validateModule:b,validateModuleOperation:_,validateModules:x,validateStateSchemaName:R},Symbol.toStringTag,{value:"Module"})),M={id:"powerhouse/document-model",name:"DocumentModel",extension:"phdm",description:"The Powerhouse Document Model describes the state and operations of a document type.",author:{name:"Powerhouse",website:"https://www.powerhouse.inc/"},specifications:[{version:1,changeLog:[],modules:[{name:"header",operations:[{name:"SetModelName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelId",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelExtension",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorWebsite",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"versioning",operations:[{name:"AddChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderChangeLogItems",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReleaseNewVersion",schema:null,id:"",description:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"module",operations:[{name:"AddModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModules",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-error",operations:[{name:"AddOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorCode",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationErrors",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-example",operations:[{name:"AddOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation",operations:[{name:"AddOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationReducer",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"MoveOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModuleOperations",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"state",operations:[{name:"SetStateSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetInitialState",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"AddStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderStateExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""}],state:{global:{schema:"",initialValue:`{
1
+ "use strict";var Tt=Object.defineProperty;var Rt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var be=(t,e,r)=>(Rt(t,typeof e!="symbol"?e+"":e,r),r);const s=require("./object-DhI24-1e.js");require("immer");require("jszip");require("crypto");require("fs");require("https");require("path");const o=require("zod"),xt=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Mt=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Dt=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Nt=/[^\p{L}\d]+/giu,_e="$1\0$2",Ae="";function ze(t){let e=t.trim();e=e.replace(xt,_e).replace(Mt,_e),e=e.replace(Nt,"\0");let r=0,n=e.length;for(;e.charAt(r)==="\0";)r++;if(r===n)return[];for(;e.charAt(n-1)==="\0";)n--;return e.slice(r,n).split(/\0/g)}function Lt(t){const e=ze(t);for(let r=0;r<e.length;r++){const n=e[r],i=Dt.exec(n);if(i){const a=i.index+(i[1]??i[2]).length;e.splice(r,1,n.slice(0,a),n.slice(a))}}return e}function Ie(t,e){const[r,n,i]=wt(t,e),a=Pt(e==null?void 0:e.locale),l=jt(e==null?void 0:e.locale),d=e!=null&&e.mergeAmbiguousCharacters?Ct(a,l):yt(a,l);return r+n.map(d).join((e==null?void 0:e.delimiter)??"")+i}function Pt(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function jt(t){return t===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t)}function Ct(t,e){return r=>`${e(r[0])}${t(r.slice(1))}`}function yt(t,e){return(r,n)=>{const i=r[0];return(n>0&&i>="0"&&i<="9"?"_"+i:e(i))+t(r.slice(1))}}function wt(t,e={}){const r=e.split??(e.separateNumbers?Lt:ze),n=e.prefixCharacters??Ae,i=e.suffixCharacters??Ae;let a=0,l=t.length;for(;a<t.length;){const d=t.charAt(a);if(!n.includes(d))break;a++}for(;l>a;){const d=l-1,zt=t.charAt(d);if(!i.includes(zt))break;l=d}return[t.slice(0,a),r(t.slice(a,l)),t.slice(l)]}function T(t,e=!1){const r=[];if(e&&t==="")return r;try{const n=JSON.parse(t);!e&&!Object.keys(n).length&&r.push({message:"Initial state cannot be empty",details:{initialState:t}})}catch{r.push({message:"Invalid initial state",details:{initialState:t}})}return r}function R(t,e,r="",n=!0){const i=[];if(!n&&!t)return i.push({message:"State schema is required",details:{schema:t}}),i;if(n&&!t)return i;const a=`type ${Ie(e)}${Ie(r)}State`;return t.includes(a)||i.push({message:`Invalid state schema name. Expected ${a}`,details:{schema:t}}),i}function x(t){const e=[];t.length||e.push({message:"Modules are required",details:{modules:t}});const r=t.reduce((n,i)=>[...n,...b(i)],[]);return[...e,...r]}function b(t){const e=[];t.name||e.push({message:"Module name is required",details:{module:t}}),t.operations.length||e.push({message:"Module operations are required",details:{module:t}});const r=t.operations.reduce((n,i)=>[...n,..._(i)],[]);return[...e,...r]}function _(t){const e=[];return t.name||e.push({message:"Operation name is required",details:{operation:t}}),t.schema||e.push({message:"Operation schema is required",details:{operation:t}}),e}const kt=Object.freeze(Object.defineProperty({__proto__:null,validateInitialState:T,validateModule:b,validateModuleOperation:_,validateModules:x,validateStateSchemaName:R},Symbol.toStringTag,{value:"Module"})),M={id:"powerhouse/document-model",name:"DocumentModel",extension:"phdm",description:"The Powerhouse Document Model describes the state and operations of a document type.",author:{name:"Powerhouse",website:"https://www.powerhouse.inc/"},specifications:[{version:1,changeLog:[],modules:[{name:"header",operations:[{name:"SetModelName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelId",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelExtension",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorWebsite",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"versioning",operations:[{name:"AddChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderChangeLogItems",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReleaseNewVersion",schema:null,id:"",description:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"module",operations:[{name:"AddModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModules",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-error",operations:[{name:"AddOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorCode",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationErrors",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-example",operations:[{name:"AddOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation",operations:[{name:"AddOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationReducer",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"MoveOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModuleOperations",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"state",operations:[{name:"SetStateSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetInitialState",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"AddStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderStateExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""}],state:{global:{schema:"",initialValue:`{
2
2
  "id": "",
3
3
  "name": "",
4
4
  "extension": "",
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./object-DhI24-1e.js"),t=Object.freeze(Object.defineProperty({__proto__:null,calculateSkipsLeft:e.calculateSkipsLeft,createAction:e.createAction,createDocument:e.createDocument,createExtendedState:e.createExtendedState,createReducer:e.createReducer,createZip:e.createZip,documentHelpers:e.documentHelpers,getLocalFile:e.getLocalFile,getRemoteFile:e.getRemoteFile,hashDocument:e.hashDocument,hashKey:e.hashKey,isBaseAction:e.isBaseAction,isNoopOperation:e.isNoopOperation,isSameDocument:e.isSameDocument,isUndoRedo:e.isUndoRedo,loadFromFile:e.loadFromFile,loadFromInput:e.loadFromInput,mapSkippedOperations:e.mapSkippedOperations,parseResultingState:e.parseResultingState,readOnly:e.readOnly,replayDocument:e.replayDocument,replayOperations:e.replayOperations,saveToFile:e.saveToFile,saveToFileHandle:e.saveToFileHandle,sortMappedOperations:e.sortMappedOperations,sortOperations:e.sortOperations,validateOperations:e.validateOperations},Symbol.toStringTag,{value:"Module"})),o=Object.freeze(Object.defineProperty({__proto__:null,BaseDocument:e.BaseDocument,actions:e.BaseActions,applyMixins:e.applyMixins,baseReducer:e.baseReducer,processUndoRedo:e.processUndoRedo,utils:t,z:e.zod},Symbol.toStringTag,{value:"Module"}));exports.Document=o;exports.index=t;
@@ -0,0 +1,20 @@
1
+ "use strict";var fe=Object.defineProperty;var de=(t,e,n)=>e in t?fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var at=(t,e,n)=>(de(t,typeof e!="symbol"?e+"":e,n),n);const H=require("immer"),f=require("zod"),_t=require("jszip"),ge=require("crypto"),ft=require("fs"),he=require("https"),xe=require("path"),vt=t=>t!=null,ye=f.z.any().refine(t=>vt(t)),Nt=f.z.enum(["LOAD_STATE"]),It=f.z.enum(["PRUNE"]),At=f.z.enum(["REDO"]),Pt=f.z.enum(["SET_NAME"]),Mt=f.z.enum(["UNDO"]);function be(){return f.z.object({__typename:f.z.literal("Action").optional(),type:f.z.string()})}function et(){return f.z.literal("global").or(f.z.literal("local"))}function Ft(){return f.z.union([Rt(),qt(),Ct(),Ut(),Jt()])}function we(){return f.z.object({__typename:f.z.literal("DocumentFile").optional(),data:f.z.string(),extension:f.z.string().nullable(),fileName:f.z.string().nullable(),mimeType:f.z.string()})}function Rt(){return f.z.object({input:f.z.lazy(()=>yt()),type:Nt,scope:et()})}function yt(){return f.z.object({operations:f.z.number(),state:f.z.lazy(()=>Lt())})}function Lt(){return f.z.object({data:f.z.unknown().nullish(),name:f.z.string()})}function Oe(){return f.z.object({__typename:f.z.literal("Operation").optional(),hash:f.z.string(),index:f.z.number(),timestamp:f.z.string().datetime(),type:f.z.string()})}function qt(){return f.z.object({input:f.z.lazy(()=>bt()),type:It,scope:et()})}function bt(){return f.z.object({end:f.z.number().nullish(),start:f.z.number().nullish()})}const wt=f.z.number;function Ct(){return f.z.object({input:wt(),type:At,scope:et()})}const Ot=f.z.string;function Ut(){return f.z.object({input:Ot(),type:Pt,scope:f.z.literal("global")})}function Se(){return f.z.object({__typename:f.z.literal("SetNameOperation").optional(),hash:f.z.string(),index:f.z.number(),input:f.z.string(),timestamp:f.z.string().datetime(),type:f.z.string()})}const St=f.z.number;function Jt(){return f.z.object({input:St(),type:Mt,scope:et()})}const je=Object.freeze(Object.defineProperty({__proto__:null,ActionSchema:be,BaseActionSchema:Ft,DocumentFileSchema:we,LoadStateActionInputSchema:yt,LoadStateActionSchema:Rt,LoadStateActionStateInputSchema:Lt,Load_StateSchema:Nt,OperationSchema:Oe,OperationScopeSchema:et,PruneActionInputSchema:bt,PruneActionSchema:qt,PruneSchema:It,RedoActionInputSchema:wt,RedoActionSchema:Ct,RedoSchema:At,SetNameActionInputSchema:Ot,SetNameActionSchema:Ut,SetNameOperationSchema:Se,Set_NameSchema:Pt,UndoActionInputSchema:St,UndoActionSchema:Jt,UndoSchema:Mt,definedNonNullAnySchema:ye,isDefinedNonNullAny:vt},Symbol.toStringTag,{value:"Module"}));function Ee(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dt={exports:{}};(function(t,e){const{hasOwnProperty:n}=Object.prototype,i=R();i.configure=R,i.stringify=i,i.default=i,e.stringify=i,e.configure=R,t.exports=i;const o=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function a(c){return c.length<5e3&&!o.test(c)?`"${c}"`:JSON.stringify(c)}function r(c){if(c.length>200)return c.sort();for(let l=1;l<c.length;l++){const u=c[l];let T=l;for(;T!==0&&c[T-1]>u;)c[T]=c[T-1],T--;c[T]=u}return c}const p=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function m(c){return p.call(c)!==void 0&&c.length!==0}function d(c,l,u){c.length<u&&(u=c.length);const T=l===","?"":" ";let L=`"0":${T}${c[0]}`;for(let P=1;P<u;P++)L+=`${l}"${P}":${T}${c[P]}`;return L}function h(c){if(n.call(c,"circularValue")){const l=c.circularValue;if(typeof l=="string")return`"${l}"`;if(l==null)return l;if(l===Error||l===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function b(c,l){let u;if(n.call(c,l)&&(u=c[l],typeof u!="boolean"))throw new TypeError(`The "${l}" argument must be of type boolean`);return u===void 0?!0:u}function O(c,l){let u;if(n.call(c,l)){if(u=c[l],typeof u!="number")throw new TypeError(`The "${l}" argument must be of type number`);if(!Number.isInteger(u))throw new TypeError(`The "${l}" argument must be an integer`);if(u<1)throw new RangeError(`The "${l}" argument must be >= 1`)}return u===void 0?1/0:u}function v(c){return c===1?"1 item":`${c} items`}function z(c){const l=new Set;for(const u of c)(typeof u=="string"||typeof u=="number")&&l.add(String(u));return l}function A(c){if(n.call(c,"strict")){const l=c.strict;if(typeof l!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(l)return u=>{let T=`Object can not safely be stringified. Received type ${typeof u}`;throw typeof u!="function"&&(T+=` (${u.toString()})`),new Error(T)}}}function R(c){c={...c};const l=A(c);l&&(c.bigint===void 0&&(c.bigint=!1),"circularValue"in c||(c.circularValue=Error));const u=h(c),T=b(c,"bigint"),L=b(c,"deterministic"),P=O(c,"maximumDepth"),D=O(c,"maximumBreadth");function ot(I,s,g,w,y,j){let x=s[I];switch(typeof x=="object"&&x!==null&&typeof x.toJSON=="function"&&(x=x.toJSON(I)),x=w.call(s,I,x),typeof x){case"string":return a(x);case"object":{if(x===null)return"null";if(g.indexOf(x)!==-1)return u;let S="",$=",";const k=j;if(Array.isArray(x)){if(x.length===0)return"[]";if(P<g.length+1)return'"[Array]"';g.push(x),y!==""&&(j+=y,S+=`
2
+ ${j}`,$=`,
3
+ ${j}`);const F=Math.min(x.length,D);let U=0;for(;U<F-1;U++){const rt=ot(String(U),x,g,w,y,j);S+=rt!==void 0?rt:"null",S+=$}const J=ot(String(U),x,g,w,y,j);if(S+=J!==void 0?J:"null",x.length-1>D){const rt=x.length-D-1;S+=`${$}"... ${v(rt)} not stringified"`}return y!==""&&(S+=`
4
+ ${k}`),g.pop(),`[${S}]`}let _=Object.keys(x);const N=_.length;if(N===0)return"{}";if(P<g.length+1)return'"[Object]"';let E="",M="";y!==""&&(j+=y,$=`,
5
+ ${j}`,E=" ");const C=Math.min(N,D);L&&!m(x)&&(_=r(_)),g.push(x);for(let F=0;F<C;F++){const U=_[F],J=ot(U,x,g,w,y,j);J!==void 0&&(S+=`${M}${a(U)}:${E}${J}`,M=$)}if(N>D){const F=N-D;S+=`${M}"...":${E}"${v(F)} not stringified"`,M=$}return y!==""&&M.length>1&&(S=`
6
+ ${j}${S}
7
+ ${k}`),g.pop(),`{${S}}`}case"number":return isFinite(x)?String(x):l?l(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(T)return String(x);default:return l?l(x):void 0}}function st(I,s,g,w,y,j){switch(typeof s=="object"&&s!==null&&typeof s.toJSON=="function"&&(s=s.toJSON(I)),typeof s){case"string":return a(s);case"object":{if(s===null)return"null";if(g.indexOf(s)!==-1)return u;const x=j;let S="",$=",";if(Array.isArray(s)){if(s.length===0)return"[]";if(P<g.length+1)return'"[Array]"';g.push(s),y!==""&&(j+=y,S+=`
8
+ ${j}`,$=`,
9
+ ${j}`);const N=Math.min(s.length,D);let E=0;for(;E<N-1;E++){const C=st(String(E),s[E],g,w,y,j);S+=C!==void 0?C:"null",S+=$}const M=st(String(E),s[E],g,w,y,j);if(S+=M!==void 0?M:"null",s.length-1>D){const C=s.length-D-1;S+=`${$}"... ${v(C)} not stringified"`}return y!==""&&(S+=`
10
+ ${x}`),g.pop(),`[${S}]`}g.push(s);let k="";y!==""&&(j+=y,$=`,
11
+ ${j}`,k=" ");let _="";for(const N of w){const E=st(N,s[N],g,w,y,j);E!==void 0&&(S+=`${_}${a(N)}:${k}${E}`,_=$)}return y!==""&&_.length>1&&(S=`
12
+ ${j}${S}
13
+ ${x}`),g.pop(),`{${S}}`}case"number":return isFinite(s)?String(s):l?l(s):"null";case"boolean":return s===!0?"true":"false";case"undefined":return;case"bigint":if(T)return String(s);default:return l?l(s):void 0}}function Z(I,s,g,w,y){switch(typeof s){case"string":return a(s);case"object":{if(s===null)return"null";if(typeof s.toJSON=="function"){if(s=s.toJSON(I),typeof s!="object")return Z(I,s,g,w,y);if(s===null)return"null"}if(g.indexOf(s)!==-1)return u;const j=y;if(Array.isArray(s)){if(s.length===0)return"[]";if(P<g.length+1)return'"[Array]"';g.push(s),y+=w;let E=`
14
+ ${y}`;const M=`,
15
+ ${y}`,C=Math.min(s.length,D);let F=0;for(;F<C-1;F++){const J=Z(String(F),s[F],g,w,y);E+=J!==void 0?J:"null",E+=M}const U=Z(String(F),s[F],g,w,y);if(E+=U!==void 0?U:"null",s.length-1>D){const J=s.length-D-1;E+=`${M}"... ${v(J)} not stringified"`}return E+=`
16
+ ${j}`,g.pop(),`[${E}]`}let x=Object.keys(s);const S=x.length;if(S===0)return"{}";if(P<g.length+1)return'"[Object]"';y+=w;const $=`,
17
+ ${y}`;let k="",_="",N=Math.min(S,D);m(s)&&(k+=d(s,$,D),x=x.slice(s.length),N-=s.length,_=$),L&&(x=r(x)),g.push(s);for(let E=0;E<N;E++){const M=x[E],C=Z(M,s[M],g,w,y);C!==void 0&&(k+=`${_}${a(M)}: ${C}`,_=$)}if(S>D){const E=S-D;k+=`${_}"...": "${v(E)} not stringified"`,_=$}return _!==""&&(k=`
18
+ ${y}${k}
19
+ ${j}`),g.pop(),`{${k}}`}case"number":return isFinite(s)?String(s):l?l(s):"null";case"boolean":return s===!0?"true":"false";case"undefined":return;case"bigint":if(T)return String(s);default:return l?l(s):void 0}}function Q(I,s,g){switch(typeof s){case"string":return a(s);case"object":{if(s===null)return"null";if(typeof s.toJSON=="function"){if(s=s.toJSON(I),typeof s!="object")return Q(I,s,g);if(s===null)return"null"}if(g.indexOf(s)!==-1)return u;let w="";if(Array.isArray(s)){if(s.length===0)return"[]";if(P<g.length+1)return'"[Array]"';g.push(s);const $=Math.min(s.length,D);let k=0;for(;k<$-1;k++){const N=Q(String(k),s[k],g);w+=N!==void 0?N:"null",w+=","}const _=Q(String(k),s[k],g);if(w+=_!==void 0?_:"null",s.length-1>D){const N=s.length-D-1;w+=`,"... ${v(N)} not stringified"`}return g.pop(),`[${w}]`}let y=Object.keys(s);const j=y.length;if(j===0)return"{}";if(P<g.length+1)return'"[Object]"';let x="",S=Math.min(j,D);m(s)&&(w+=d(s,",",D),y=y.slice(s.length),S-=s.length,x=","),L&&(y=r(y)),g.push(s);for(let $=0;$<S;$++){const k=y[$],_=Q(k,s[k],g);_!==void 0&&(w+=`${x}${a(k)}:${_}`,x=",")}if(j>D){const $=j-D;w+=`${x}"...":"${v($)} not stringified"`}return g.pop(),`{${w}}`}case"number":return isFinite(s)?String(s):l?l(s):"null";case"boolean":return s===!0?"true":"false";case"undefined":return;case"bigint":if(T)return String(s);default:return l?l(s):void 0}}function ue(I,s,g){if(arguments.length>1){let w="";if(typeof g=="number"?w=" ".repeat(Math.min(g,10)):typeof g=="string"&&(w=g.slice(0,10)),s!=null){if(typeof s=="function")return ot("",{"":I},[],s,w,"");if(Array.isArray(s))return st("",I,[],z(s),w,"")}if(w.length!==0)return Z("",I,[],w,"")}return Q("",I,[])}return ue}})(dt,dt.exports);var $e=dt.exports;const G=Ee($e);G.configure;function De(t,e){return{...t,name:e}}function ke(t,e,n){const{scope:i,input:o}=e,a={document:t,action:e,skip:n};return H.produce(a,r=>{if(r.document.operations[i].length<1)throw new Error(`Cannot undo: no operations in history for scope "${i}"`);if(o<1)throw new Error("Invalid UNDO action: input value must be greater than 0");if(r.skip>0)throw new Error("Cannot undo: skip value from reducer cannot be used with UNDO action");const p=r.document.operations[i].at(-1),m=p&&p.type==="NOOP"&&p.skip>0;if(r.skip+=o,m){r.skip+=p.skip;const O=r.document.operations[i][r.document.operations[i].length-2];O&&p.index-O.index===1&&r.document.operations[i].pop()}if(r.document.operations[i].length<r.skip)throw new Error("Cannot undo: you can't undo more operations than the ones in the scope history");const d=r.document.operations[i].length-1;let h=o,b=m?d-p.skip:d;for(;h>0&&b>=0;){const O=r.document.operations[i][b];if(!O){h--,b--;continue}O.type==="NOOP"&&O.skip>0?(b=b-(O.skip+1),r.skip+=O.skip+1):(r.document.clipboard.push({...O}),h--,b--)}r.action=me(i)})}function ze(t,e,n){const{scope:i,input:o}=e,a={document:t,action:e,skip:n};return H.produce(a,r=>{if(r.skip>0)throw new Error("Cannot redo: skip value from reducer cannot be used with REDO action");if(o>1)throw new Error("Cannot redo: you can only redo one operation at a time");if(o<1)throw new Error("Invalid REDO action: invalid redo input value");if(r.document.clipboard.length<1)throw new Error("Cannot redo: no operations in the clipboard");const p=r.document.clipboard.findLastIndex(d=>d.scope===i);if(p<0)throw new Error(`Cannot redo: no operations in clipboard for scope "${i}"`);const m=r.document.clipboard.splice(p,1)[0];r.action=H.castDraft({type:m.type,scope:m.scope,input:m.input})})}function Te(t,e,n){const{scope:i}=e,o=t.operations[i];let{input:{start:a,end:r}}=e;a=a||0,r=r||o.length;const p=o.slice(a,r),m=o.slice(0,a),d=o.slice(r),h=pt(t.initialState,{...t.operations,[i]:m.concat(p)},n),{name:b,state:O}=h,v=m.length,z=m.length?m[m.length-1].timestamp:d.length?d[0].timestamp:new Date().toISOString();return pt(t.initialState,{...t.operations,[i]:[...m,{...Tt({name:b,state:O},p.length),timestamp:z,index:v,hash:mt({state:O},"global")},...d.map((A,R)=>({...A,index:v+R+1}))]},n)}function _e(t,e){return{...t,name:e.name,state:e.state??{global:{},local:{}}}}const Ht="SET_NAME",nt="UNDO",it="REDO",ct="PRUNE",Vt="LOAD_STATE",ve="NOOP",Bt={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(Bt);var q=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},W,Y,X;class Ne{constructor(...e){W.set(this,new Map),Y.set(this,new Map),X.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[i,o]of Object.entries(e)){i=i.toLowerCase(),o=o.map(p=>p.toLowerCase()),q(this,X,"f").has(i)||q(this,X,"f").set(i,new Set);const a=q(this,X,"f").get(i);let r=!0;for(let p of o){const m=p.startsWith("*");if(p=m?p.slice(1):p,a==null||a.add(p),r&&q(this,Y,"f").set(i,p),r=!1,m)continue;const d=q(this,W,"f").get(p);if(d&&d!=i&&!n)throw new Error(`"${i} -> ${p}" conflicts with "${d} -> ${p}". Pass \`force=true\` to override this definition.`);q(this,W,"f").set(p,i)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/,"").toLowerCase(),i=n.replace(/^.*\./,"").toLowerCase(),o=n.length<e.length;return!(i.length<n.length-1)&&o?null:q(this,W,"f").get(i)??null}getExtension(e){var n;return typeof e!="string"?null:(e=(n=e==null?void 0:e.split)==null?void 0:n.call(e,";")[0],(e&&q(this,Y,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:q(this,X,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of q(this,X,"f").values())Object.freeze(e);return this}_getTestState(){return{types:q(this,W,"f"),extensions:q(this,Y,"f")}}}W=new WeakMap,Y=new WeakMap,X=new WeakMap;const Ie=new Ne(Bt)._freeze();function Ae(t,e,n){const i=xe.join(t,e);return ft.mkdirSync(t,{recursive:!0}),new Promise((o,a)=>{try{ft.writeFile(i,n,{},r=>{r?a(r):o(i)})}catch(r){a(r)}})}function Xt(t){return ft.readFileSync(t)}function Pe(t){return new Promise((e,n)=>{he.get(t,i=>{const o=[],a=i.headers["content-type"];i.on("data",r=>{o.push(r)}),i.on("end",()=>{e({buffer:Buffer.concat(o),mimeType:a})})}).on("error",i=>{n(i)})})}const Me=async t=>Xt(t),lt=(t,e="sha1")=>ge.createHash(e).update(t).digest("base64");function Kt(t){const e=[],n=Object.keys(t);for(const i of n){const o=t[i].sort((a,r)=>a.index-r.index);for(let a=0;a<o.length;a++)o[a].index!==a&&e.push({message:`Invalid operation index ${o[a].index} at position ${a}`,details:{position:a,operation:o[a],scope:o[a].scope}})}return e}const jt=async t=>{const e=new _t,{name:n,revision:i,documentType:o,created:a,lastModified:r}=t,p={name:n,revision:i,documentType:o,created:a,lastModified:r};return e.file("header.json",JSON.stringify(p,null,2)),e.file("state.json",JSON.stringify(t.initialState||{},null,2)),e.file("operations.json",JSON.stringify(t.operations,null,2)),Object.keys(t.attachments).forEach(d=>{const{data:h,...b}=t.attachments[d];e.file(d,h,{base64:!0,createFolders:!0,comment:JSON.stringify(b)})}),e},Wt=async(t,e,n,i)=>{const a=await(await jt(t)).generateAsync({type:"uint8array",streamFiles:!0}),r=i??t.name,p=`.${n}.zip`;return Ae(e,r.endsWith(p)?r:`${r}${p}`,a)},Fe=async(t,e)=>{const i=await(await jt(t)).generateAsync({type:"blob"}),o=await e.createWritable();await o.write(i),await o.close()},gt=async(t,e,n)=>{const i=Xt(t);return Gt(i,e,n)},Gt=async(t,e,n)=>{const i=new _t;return await i.loadAsync(t),Re(i,e,n)};async function Re(t,e,n){const i=t.file("state.json");if(!i)throw new Error("Initial state not found");const o=await i.async("string"),a=JSON.parse(o),r=t.file("header.json");let p;r&&(p=JSON.parse(await r.async("string")));const m=t.file("operations.json");if(!m)throw new Error("Operations history not found");const d=JSON.parse(await m.async("string")),h=Kt(d);if(h.length){const O=h.map(v=>v.message);throw new Error(O.join(`
20
+ `))}let b=kt(a,d,e,void 0,p,{},n);return p&&(b={...b,...p}),b}function Zt(t){const e=t.replace(/^.*\./,"")||void 0,n=t.replace(/^.*[/\\]/,"")||void 0;return{extension:e,fileName:n}}async function Le(t){const{buffer:e,mimeType:n="application/octet-stream"}=await Pe(t),i=Zt(t),o=e.toString("base64");return{data:o,hash:lt(o),mimeType:n,...i}}async function qe(t){const e=await Me(t),n=Ie.getType(t)||"application/octet-stream",i=Zt(t),o=e.toString("base64");return{data:o,hash:lt(o),mimeType:n,...i}}var Qt=(t=>(t.UNEXPECTED_INDEX="UNEXPECTED_INDEX",t))(Qt||{}),Yt=(t=>(t.DUPLICATED_INDEX="DUPLICATED_INDEX",t.MISSING_INDEX="MISSING_INDEX",t))(Yt||{});function Et(t){const e=[];let n=-1;for(const i of t){const o=i.index-i.skip;o!==n+1&&e.push({operation:{index:i.index,skip:i.skip},issue:"UNEXPECTED_INDEX",category:o>n+1?"MISSING_INDEX":"DUPLICATED_INDEX",message:`Expected index ${n+1} with skip 0 or equivalent, got index ${i.index} with skip ${i.skip}`}),n=i.index}return e}function V(t){var i,o,a;const e=[];let n=t.length-1;for(;n>-1;){e.unshift(t[n]);const r=(((i=t[n])==null?void 0:i.index)||0)-(((o=t[n])==null?void 0:o.skip)||0)-1;let p=n-1;for(;p>-1&&(((a=t[p])==null?void 0:a.index)||0)>r;)p--;n=p}return e}function Ce(t){const e=[...t],n=e[e.length-1];return n&&(n.type==="NOOP"?e.push({...n,index:n.index,type:"NOOP",skip:ne(t)}):e.push({type:"NOOP",index:n.index+1,timestamp:new Date().toISOString(),input:{},skip:1,scope:n.scope,hash:n.hash})),e}function B(t){return t.slice().sort((e,n)=>e.skip-n.skip).sort((e,n)=>e.index-n.index)}const Ue=(t,e,n)=>[...e,...n].sort((i,o)=>new Date(i.timestamp).getTime()-new Date(o.timestamp).getTime()).map((i,o)=>({...i,index:t.index+o,skip:o===0?t.skip:0})),Je=(t,e,n)=>[...e,...n].sort((i,o)=>new Date(i.timestamp).getTime()-new Date(o.timestamp).getTime()).sort((i,o)=>i.index-o.index).map((i,o)=>({...i,index:t.index+o,skip:o===0?t.skip:0}));function $t(t,e){return G(t)===G(e)}function He(t,e){const n=V(B(t.slice())),i=V(B(e.slice()));if(n.length<1)return[i,[]];const o=[];let a=!1;for(;i.length>0;){const r=i[0];let p=n.shift();for(;p&&te(p,r);)o.push(p),p=n.shift();if(p?a||($t(p,r)?(i.shift(),o.push(p)):(n.unshift(p),a=!0)):a=!0,a){let m=i.shift();for(;m;)o.push(m),m=i.shift()}}if(!a){let r=n.shift();for(;r;)o.push(r),r=n.shift()}return[V(o),n]}function te(t,e){return t.index<e.index||t.index===e.index&&t.skip<e.skip}function ee(t,e){const n=[],i=[],o=[],a=Math.max(t.length,e.length);let r=!1;for(let p=0;p<a;p++){const m=t[p],d=e[p];m&&d?!r&&$t(m,d)?n.push(m):(r=!0,i.push(m),o.push(d)):m?i.push(m):d&&o.push(d)}return[n,i,o]}function Ve(t,e,n){const[i,o,a]=ee(V(t),V(e)),r=ut(i),p=1+Math.max(r,ut(o),ut(a)),m=n({index:p,skip:p-(r+1)},o,a);return i.concat(m)}function ut(t){const e=t[t.length-1];return e?e.index:-1}function ne(t){var i,o,a;if(t.length<1)return-1;const e=V(t);let n=(((i=e[e.length-1])==null?void 0:i.skip)||0)+1;return e.length>1&&(n+=((o=e[e.length-2])==null?void 0:o.skip)||0),(((a=e[e.length-1])==null?void 0:a.index)||-1)<n?-1:n}const Be=t=>Et(V(B(t))),Xe=t=>t.reduce((n,i)=>{var o;return n[i.scope]||(n[i.scope]=[]),(o=n[i.scope])==null||o.push(i),n},{}),Ke=(t,e)=>{var m;const n={integrityIssues:[],validOperations:[],invalidOperations:[],duplicatedOperations:[]},i=B(t),o=B(e),a=Et([...i,...o]),p=(m=[...a.filter(d=>d.category==="MISSING_INDEX")].sort((d,h)=>h.operation.index-d.operation.index).pop())==null?void 0:m.operation;for(const d of o){if(p&&d.index>=p.index){n.invalidOperations.push(d);continue}if(a.some(b=>b.operation.index===d.index&&b.operation.skip===d.skip&&b.category==="DUPLICATED_INDEX")){n.duplicatedOperations.push(d);continue}n.validOperations.push(d)}return n.integrityIssues.push(...a),n};function We(t,e){return t.filter(n=>!e.some(i=>n.type==="NOOP"&&n.skip===0&&n.index===i.index||n.index===i.index&&n.skip===i.skip&&n.scope===i.scope&&n.hash===i.hash&&n.type===i.type))}function ie(t,e){const[n]=B(t).slice(-1),i=(n==null?void 0:n.index)??-1,o=i+1,a={...e,index:e.index??o};if(a.index<i)throw new Error(`The skip header operation index must be greater than or equal to ${i}`);return(V(B([...t,a]))||[]).slice(0,-1)}function ht(t){return{...Object.entries(t).reduce((n,i)=>{const[o,a]=i;return{...n,[o]:V(B(a))}},{})}}const Ge=Object.freeze(Object.defineProperty({__proto__:null,IntegrityIssueSubType:Yt,IntegrityIssueType:Qt,addUndo:Ce,attachBranch:He,checkCleanedOperationsIntegrity:Et,checkOperationsIntegrity:Be,garbageCollect:V,garbageCollectDocumentOperations:ht,groupOperationsByScope:Xe,merge:Ve,nextSkipNumber:ne,operationsAreEqual:$t,precedes:te,prepareOperations:Ke,removeExistingOperations:We,reshuffleByTimestamp:Ue,reshuffleByTimestampAndIndex:Je,skipHeaderOperations:ie,sortOperations:B,split:ee},Symbol.toStringTag,{value:"Module"}));function Ze(t,e){let n;return"index"in e?n={...e}:n=t.operations[e.scope].at(-1),((n==null?void 0:n.index)??-1)+1}function Qe(t,e){return{...t,revision:{...t.revision,[e.scope]:Ze(t,e)},lastModified:new Date().toISOString()}}function Ye(t,e,n=0){if([nt,it,ct].includes(e.type))return t;const{scope:i}=e,o=t.operations[i].slice(),a=o.at(-1);let r=((a==null?void 0:a.index)??-1)+1;if("index"in e){if(e.index-n>r)throw new Error(`Missing operations: expected ${r} with skip 0 or equivalent, got index ${e.index} with skip ${n}`);r=e.index}return o.push({...e,index:r,timestamp:new Date().toISOString(),hash:"",scope:i,skip:n,error:void 0}),{...t,operations:{...t.operations,[i]:o}}}function tn(t,e,n=0){let i=Ye(t,e,n);return i=Qe(i,e),i}function en(t,e,n){switch(Ft().parse(e),e.type){case Ht:return De(t,e.input);case ct:return Te(t,e,n);case Vt:return _e(t,e.input.state);default:return t}}function nn(t,e,n){switch(e.type){case nt:return ke(t,e,n);case it:return ze(t,e,n);default:return{document:t,action:e,skip:n}}}function on(t,e,n,i,o=!1,a=zt){const r=e.scope,p=t.operations[r].at(-1);if(!p)return t;const m=ht({...t.operations,[r]:ie(t.operations[r],p)});let d;const h=m[r].at(-1);if(o&&(h!=null&&h.resultingState))d=a(h.resultingState);else{const{state:b}=pt(t.initialState,m,n,void 0,void 0,void 0,void 0,{reuseHash:!0,reuseOperationResultingState:o,operationResultingStateParser:a});d=b[r]}return{...t,state:{...t.state,[r]:d},operations:ht({...t.operations})}}function Dt(t,e,n,i,o={}){const{skip:a,ignoreSkipOperations:r=!1,reuseHash:p=!1,reuseOperationResultingState:m=!1,operationResultingStateParser:d}=o,h={...e},b=a||0;let O={...t};const v=!r&&(b>0||"index"in h&&h.skip>0);return xt(h)&&(O=en(O,h,n)),O=tn(O,h,b),v&&(O=on(O,h,n,b,m,d)),O=H.produce(O,z=>{try{const A=n(z.state,h,i);if(A)return H.castDraft({...O,state:A})}catch(A){const R=O.operations[h.scope].length-1;z.operations[h.scope][R].error=A.message,z.operations[h.scope][R].skip=0,v&&(z.state=H.castDraft({...t.state}),z.operations=H.castDraft({...t.operations,[h.scope]:[...t.operations[h.scope],{...z.operations[h.scope][R]}]}))}}),H.produce(O,z=>{if([nt,it,ct].includes(h.type))return z;const A=h.scope||"global",R=p&&Object.prototype.hasOwnProperty.call(h,"hash")?h.hash:mt(z,A);z.operations[A][z.operations[A].length-1].hash=R,!xt(h)&&h.attachments&&h.attachments.forEach(c=>{const{hash:l,...u}=c;z.attachments[l]={...u}})})}function sn(t){return t.type===ve&&t.skip!==void 0&&t.skip>0&&t.hash!==void 0}function rn(t){return[nt,it].includes(t.type)}function xt(t){return[Ht,nt,it,ct,Vt].includes(t.type)}function K(t,e,n,i,o="global"){if(!t)throw new Error("Empty action type");if(typeof t!="string")throw new Error(`Invalid action type: ${JSON.stringify(t)}`);const a={type:t,input:e,scope:o};n&&(a.attachments=n);try{i==null||i().parse(a.input)}catch(r){throw new Error(`Invalid action input: ${r}`)}return a}function oe(t,e=Dt){return(n,i,o,a)=>e(n,i,t,o,a)}const se=(t,e)=>({name:"",documentType:"",revision:{global:0,local:0},created:new Date().toISOString(),lastModified:new Date().toISOString(),attachments:{},...t,state:(e==null?void 0:e(t==null?void 0:t.state))??(t==null?void 0:t.state)??{global:{},local:{}}}),re=(t,e)=>{const n=se(t,e);return{...n,initialState:n,operations:{global:[],local:[]},clipboard:[]}},mt=(t,e="global")=>lt(G(t.state[e]||"")),an=(t,e=1e3)=>{const n=Math.random()*e;return lt(`${(t??new Date).toISOString()}${n}`)};function tt(t){return H.castImmutable(H.freeze(t,!0))}function pn(t,e){const n=[...t];let i=e||0,o=n.length>0?n[n.length-1].index:0;const a=[];for(const r of n.reverse()){if(i>0){const d=o-r.index;i-=d}if(i<0)throw new Error("Invalid operation index, missing operations");const p={ignore:i>0,operation:r},m=r.skip>0?r.skip+1:0;if(m>0&&m>i){const d=m-i;i=i+d}o=r.index,a.push(p)}return a.reverse()}function cn(t,e,n){const i=t.slice().sort((p,m)=>p.skip-m.skip).sort((p,m)=>p.index-m.index);let o=n,a=0,r=e;for(const p of i.reverse()){const m=r-p.index;if(o=o-m,o>-1)a++,r=p.index;else break}return a}function ln(t){return Object.values(t).flatMap(e=>e).sort((e,n)=>new Date(e.timestamp).getTime()-new Date(n.timestamp).getTime())}function mn(t){return Object.values(t).flatMap(e=>e).sort((e,n)=>new Date(e.operation.timestamp).getTime()-new Date(n.operation.timestamp).getTime())}function pt(t,e,n,i,o,a=Dt,r={},p){const m=oe(n,a);return kt(t,e,m,i,o,r,p)}function kt(t,e,n,i,o,a={},r){const{checkHashes:p=!0,reuseOperationResultingState:m,operationResultingStateParser:d=zt}=r||{};let h=t;const b=[],O={global:[],local:[]};if(m)for(const[c,l]of Object.entries(e)){const u=l.findLastIndex(L=>!!L.resultingState);if(u<0){b.push(...l);continue}const T=l[u];try{const L=d(T.resultingState);h={...h,state:{...h.state,[c]:L}},O[c].push(...l.slice(0,u+1)),b.push(...l.slice(u+1))}catch{b.push(...l)}}else b.push(...Object.values(e).flat());const v=re(h);v.initialState=t,v.operations=O;const z=b.reduce((c,l)=>n(c,l,i,{skip:l.skip,ignoreSkipOperations:!0,reuseHash:!p}),v);if(!p)for(const c of Object.keys(z.state))for(let l=b.length-1;l>=0;l--){const u=b[l];if(u.scope===c){if(u.hash!==mt(z,c))throw new Error(`Hash mismatch for scope ${c}`);break}}const A=Object.keys(z.operations).reduce((c,l)=>{const u=l;return{...c,[u]:[...z.operations[u].map((T,L)=>{var P;return{...T,timestamp:((P=e[u][L])==null?void 0:P.timestamp)??T.timestamp}})]}},{global:[],local:[]}),R=Object.values(A).reduce((c,l)=>{const u=l[l.length-1];return(u==null?void 0:u.timestamp)>c&&(c=u.timestamp),c},t.lastModified);return{...z,operations:A,lastModified:R}}function un(t,e){return G(t)===G(e)}function zt(t){const e=typeof t;if(e==="string")return JSON.parse(t);if(e==="object")return t;throw new Error(`Providing resulting state is of type: ${e}`)}const ae=t=>K("SET_NAME",t,void 0,Ot,void 0),pe=(t=1,e="global")=>K("UNDO",t,void 0,St,e),ce=(t=1,e="global")=>K("REDO",t,void 0,wt,e),le=(t,e,n="global")=>K("PRUNE",{start:t,end:e},void 0,bt,n),Tt=(t,e)=>K("LOAD_STATE",{state:t,operations:e},void 0,yt),me=(t="global")=>K("NOOP",{},void 0,void 0,t),fn=Object.freeze(Object.defineProperty({__proto__:null,loadState:Tt,noop:me,prune:le,redo:ce,setName:ae,undo:pe},Symbol.toStringTag,{value:"Module"}));class dn{constructor(e,n,i){at(this,"_document");at(this,"_reducer");at(this,"_signalDispatch");this._reducer=e,this._document=n,this._signalDispatch=i}dispatch(e,n){return this._document=this._reducer(this._document,e,this._signalDispatch,n),this}saveToFile(e,n,i){return Wt(this._document,e,n,i)}async loadFromFile(e){this._document=await gt(e,this._reducer)}static async stateFromFile(e,n){return await gt(e,n)}get state(){return tt(this._document.state)}get operations(){return tt(this._document.operations)}get name(){return this._document.name}get documentType(){return this._document.documentType}get created(){return this._document.created}get lastModified(){return this._document.lastModified}get revision(){return this._document.revision.global}getRevision(e){return this._document.revision[e]}get initialState(){return tt(this._document.initialState)}toDocument(){return tt(this._document)}getAttachment(e){return this._document.attachments[e]}setName(e){return this.dispatch(ae(e)),this}undo(e){return this.dispatch(pe(e)),this}redo(e){return this.dispatch(ce(e)),this}prune(e,n){return this.dispatch(le(e,n)),this}loadState(e,n){return this.dispatch(Tt(e,n)),this}}function gn(t,e){e.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)||Object.create(null))})})}exports.BaseActions=fn;exports.BaseDocument=dn;exports.applyMixins=gn;exports.baseReducer=Dt;exports.calculateSkipsLeft=cn;exports.createAction=K;exports.createDocument=re;exports.createExtendedState=se;exports.createReducer=oe;exports.createZip=jt;exports.documentHelpers=Ge;exports.getLocalFile=qe;exports.getRemoteFile=Le;exports.hashDocument=mt;exports.hashKey=an;exports.isBaseAction=xt;exports.isNoopOperation=sn;exports.isSameDocument=un;exports.isUndoRedo=rn;exports.loadFromFile=gt;exports.loadFromInput=Gt;exports.mapSkippedOperations=pn;exports.parseResultingState=zt;exports.processUndoRedo=nn;exports.readOnly=tt;exports.replayDocument=kt;exports.replayOperations=pt;exports.saveToFile=Wt;exports.saveToFileHandle=Fe;exports.sortMappedOperations=mn;exports.sortOperations=ln;exports.validateOperations=Kt;exports.zod=je;
@@ -1,11 +1,11 @@
1
- import "./internal/object-DofGWMf1.js";
1
+ import "./internal/object-C9n9Ijnt.js";
2
2
  import "immer";
3
3
  import "jszip";
4
4
  import "crypto";
5
5
  import "fs";
6
6
  import "https";
7
7
  import "path";
8
- import { b as p, a as u, c, d as n, m as v, r as M, u as S, v as f, g as h, h as D, f as b, e as g, z as x } from "./internal/index-6nUwJlFL.js";
8
+ import { b as p, a as u, c, d as n, m as v, r as M, u as S, v as f, g as h, h as D, f as b, e as g, z as x } from "./internal/index-A880In4b.js";
9
9
  import "zod";
10
10
  export {
11
11
  p as Document,
@@ -1,5 +1,5 @@
1
- import { B as c, h as n, g as d, D as u, E as x, F as f } from "./internal/object-DofGWMf1.js";
2
- import { i as B } from "./internal/index-CLgAZiia.js";
1
+ import { B as c, h as n, g as d, E as u, F as x, G as f } from "./internal/object-C9n9Ijnt.js";
2
+ import { i as B } from "./internal/index-8lUz8qED.js";
3
3
  import "immer";
4
4
  import "zod";
5
5
  import "jszip";
@@ -1,6 +1,6 @@
1
- import { D as o } from "./internal/index-CLgAZiia.js";
2
- import { D as t } from "./internal/index-6nUwJlFL.js";
3
- import "./internal/object-DofGWMf1.js";
1
+ import { D as o } from "./internal/index-8lUz8qED.js";
2
+ import { D as t } from "./internal/index-A880In4b.js";
3
+ import "./internal/object-C9n9Ijnt.js";
4
4
  import "immer";
5
5
  import "zod";
6
6
  import "jszip";