@yudaocode/univer-slides 0.0.0-stage → 1.6.218

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.
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Yudao Open-Source Community (芋道源码)
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
- # Temporary Holding Version
1
+ # @yudaocode/univer-slides
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Core presentation unit model (`UniverInstanceType.UNIVER_SLIDE`), bidirectional OpenXML `.pptx` codec, `${}` / `#{}` dataset report template engine, speaker notes, transitions & animations, pure-TS vector Chart / SmartArt renderers, and direct vector PDF exporter for Univer.
4
+
5
+ ## Key Capabilities
6
+
7
+ - **Presentation Unit Model (`SlideUnitModel`)**:
8
+ - `16:9` (`960 x 540 pt`), `4:3` (`960 x 720 pt`), `A4`, and custom slide dimensions;
9
+ - Theme color & font schemes (`SLIDE_THEME_PRESETS`), slide masters, and 6 built-in placeholder layouts (`title`, `titleAndContent`, `sectionHeader`, `twoColumn`, `comparison`, `blank`);
10
+ - Collapsible slide sections (`ISlideSection`), speaker notes (`speakerNotes`), slide transitions (`fade`, `push`, `wipe`, `split`, `zoom`, `morph`), and element animations (`entrance`, `emphasis`, `exit`);
11
+ - Rich element model: `'text'` (paragraphs/runs, bullets, WordArt gradients & shadows), `'shape'` (16 vector geometries), `'connector'` (`straight`, `elbow`, `curved`), `'image'` / `'svg'`, `'table'`, `'chart'` (9 chart types with pure-TS vector SVG renderer), `'smartArt'` (5 diagram layouts with pure-TS vector SVG renderer), `'codeBlock'`, and `'sheetEmbed'`.
12
+ - **Reversible Commands & Undo/Redo**:
13
+ - Full command suite (`AddSlidePageCommand`, `DuplicateSlidePageCommand`, `DeleteSlidePageCommand`, `ReorderSlidePagesCommand`, `UpdateSlidePagePropsCommand`, `AddSlideElementCommand`, `UpdateSlideElementsCommand`, `DeleteSlideElementsCommand`, `AlignSlideElementsCommand`, `FindAndReplaceSlideTextCommand`, etc.) integrated with `IUndoRedoService`.
14
+ - **Automated Report Deck Template Engine**:
15
+ - `extractSlideDatasetCodes(snapshot)` & `compileSlidesWithDataset(snapshot, datasets, options)` supporting `${}` scalar expressions, chart dataset bindings, and `#{}` dynamic table row expansion with automatic multi-slide pagination (`(续 2/3)`).
16
+ - **Pure-TS Bidirectional `.pptx` OpenXML Codec & Vector PDF Exporter**:
17
+ - `exportPptxBytes` & `importPptxBytes`: zero Node-only dependencies, runs identically in browsers and Node.js;
18
+ - `exportSlidesToPdfBytes`: crisp vector PDF generation powered by `pdf-lib`, including widescreen slide export and A4 portrait Speaker Notes handout mode.
19
+
20
+ ## Quick Start
21
+
22
+ ```ts
23
+ import { LocaleType, Univer } from '@univerjs/core';
24
+ import { FUniver } from '@univerjs/core/facade';
25
+ import { createSampleExecutiveDeckData, UniverSlidesPlugin } from '@yudaocode/univer-slides';
26
+ import '@yudaocode/univer-slides/facade';
27
+
28
+ const univer = new Univer({ locale: LocaleType.ZH_CN });
29
+ univer.registerPlugin(UniverSlidesPlugin);
30
+
31
+ const univerAPI = FUniver.newAPI(univer);
32
+ const deck = univerAPI.createSlideDeck(createSampleExecutiveDeckData());
33
+
34
+ const pptxBytes = await univerAPI.exportPptx();
35
+ const pdfBytes = await univerAPI.exportSlidePdf(deck, { handoutNotesMode: true });
36
+ ```
@@ -0,0 +1,390 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __decorateClass = (decorators, target, key, kind) => {
20
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
21
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
22
+ if (decorator = decorators[i])
23
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
24
+ if (kind && result) __defProp(target, key, result);
25
+ return result;
26
+ };
27
+ var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
28
+
29
+ // src/facade/index.ts
30
+ var facade_exports = {};
31
+ __export(facade_exports, {
32
+ FSlideDeck: () => FSlideDeck,
33
+ FSlidePage: () => FSlidePage,
34
+ FUniverSlidesMixin: () => FUniverSlidesMixin
35
+ });
36
+ module.exports = __toCommonJS(facade_exports);
37
+
38
+ // src/facade/f-univer.ts
39
+ var import_core2 = require("@univerjs/core");
40
+ var import_facade = require("@univerjs/core/facade");
41
+ var import_univer_slides2 = require("@yudaocode/univer-slides");
42
+
43
+ // src/facade/f-slide-deck.ts
44
+ var import_core = require("@univerjs/core");
45
+ var import_univer_slides = require("@yudaocode/univer-slides");
46
+ var FSlidePage = class {
47
+ constructor(_model, _commandService, _slideId) {
48
+ this._model = _model;
49
+ this._commandService = _commandService;
50
+ this._slideId = _slideId;
51
+ }
52
+ getId() {
53
+ return this._slideId;
54
+ }
55
+ getData() {
56
+ return this._model.getSlide(this._slideId);
57
+ }
58
+ getTitle() {
59
+ return this._model.getSlide(this._slideId)?.title ?? "";
60
+ }
61
+ setTitle(title) {
62
+ return Boolean(
63
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlidePagePropsCommand.id, {
64
+ unitId: this._model.getUnitId(),
65
+ slideId: this._slideId,
66
+ patch: { title }
67
+ })
68
+ );
69
+ }
70
+ getSpeakerNotes() {
71
+ return this._model.getSlide(this._slideId)?.speakerNotes ?? "";
72
+ }
73
+ setSpeakerNotes(speakerNotes) {
74
+ return Boolean(
75
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlidePagePropsCommand.id, {
76
+ unitId: this._model.getUnitId(),
77
+ slideId: this._slideId,
78
+ patch: { speakerNotes }
79
+ })
80
+ );
81
+ }
82
+ isHidden() {
83
+ return Boolean(this._model.getSlide(this._slideId)?.hidden);
84
+ }
85
+ setHidden(hidden) {
86
+ return Boolean(
87
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlidePagePropsCommand.id, {
88
+ unitId: this._model.getUnitId(),
89
+ slideId: this._slideId,
90
+ patch: { hidden }
91
+ })
92
+ );
93
+ }
94
+ setTransition(transition) {
95
+ return Boolean(
96
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlidePagePropsCommand.id, {
97
+ unitId: this._model.getUnitId(),
98
+ slideId: this._slideId,
99
+ patch: { transition }
100
+ })
101
+ );
102
+ }
103
+ getElements() {
104
+ return this._model.getSlideElementsOrdered(this._slideId);
105
+ }
106
+ addElement(elementType, element) {
107
+ const ok = this._commandService.syncExecuteCommand(import_univer_slides.AddSlideElementCommand.id, {
108
+ unitId: this._model.getUnitId(),
109
+ slideId: this._slideId,
110
+ elementType,
111
+ element
112
+ });
113
+ if (!ok) return null;
114
+ const ordered = this._model.getSlideElementsOrdered(this._slideId);
115
+ return ordered[ordered.length - 1] ?? null;
116
+ }
117
+ updateElement(elementId, patch) {
118
+ return Boolean(
119
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlideElementsCommand.id, {
120
+ unitId: this._model.getUnitId(),
121
+ slideId: this._slideId,
122
+ updates: [{ id: elementId, patch }]
123
+ })
124
+ );
125
+ }
126
+ deleteElements(elementIds) {
127
+ return Boolean(
128
+ this._commandService.syncExecuteCommand(import_univer_slides.DeleteSlideElementsCommand.id, {
129
+ unitId: this._model.getUnitId(),
130
+ slideId: this._slideId,
131
+ elementIds
132
+ })
133
+ );
134
+ }
135
+ setAnimations(animations) {
136
+ return Boolean(
137
+ this._commandService.syncExecuteCommand(import_univer_slides.SetSlideAnimationsCommand.id, {
138
+ unitId: this._model.getUnitId(),
139
+ slideId: this._slideId,
140
+ animations
141
+ })
142
+ );
143
+ }
144
+ };
145
+ var FSlideDeck = class {
146
+ constructor(_slideModel, _injector, _commandService) {
147
+ this._slideModel = _slideModel;
148
+ this._injector = _injector;
149
+ this._commandService = _commandService;
150
+ }
151
+ getId() {
152
+ return this._slideModel.getUnitId();
153
+ }
154
+ getModel() {
155
+ return this._slideModel;
156
+ }
157
+ getName() {
158
+ return this._slideModel.getName();
159
+ }
160
+ setName(name) {
161
+ this._slideModel.setName(name);
162
+ }
163
+ getSnapshot() {
164
+ return this._slideModel.save();
165
+ }
166
+ save() {
167
+ return this._slideModel.save();
168
+ }
169
+ getSlideCount() {
170
+ return this._slideModel.getSlideOrder().length;
171
+ }
172
+ getSlides() {
173
+ return this._slideModel.getSlideOrder().map((slideId) => new FSlidePage(this._slideModel, this._commandService, slideId));
174
+ }
175
+ getSlideById(slideId) {
176
+ if (!this._slideModel.getSlide(slideId)) return null;
177
+ return new FSlidePage(this._slideModel, this._commandService, slideId);
178
+ }
179
+ getActiveSlide() {
180
+ const active = this._slideModel.getActiveSlide();
181
+ if (!active) return null;
182
+ return new FSlidePage(this._slideModel, this._commandService, active.id);
183
+ }
184
+ setActiveSlide(slideId) {
185
+ return Boolean(
186
+ this._commandService.syncExecuteCommand(import_univer_slides.SetActiveSlidePageCommand.id, {
187
+ unitId: this.getId(),
188
+ slideId
189
+ })
190
+ );
191
+ }
192
+ addSlide(options) {
193
+ const ok = this._commandService.syncExecuteCommand(import_univer_slides.AddSlidePageCommand.id, {
194
+ unitId: this.getId(),
195
+ ...options
196
+ });
197
+ if (!ok) return null;
198
+ return this.getActiveSlide();
199
+ }
200
+ duplicateSlide(slideId) {
201
+ const ok = this._commandService.syncExecuteCommand(import_univer_slides.DuplicateSlidePageCommand.id, {
202
+ unitId: this.getId(),
203
+ slideId
204
+ });
205
+ if (!ok) return null;
206
+ return this.getActiveSlide();
207
+ }
208
+ deleteSlide(slideId) {
209
+ return Boolean(
210
+ this._commandService.syncExecuteCommand(import_univer_slides.DeleteSlidePageCommand.id, {
211
+ unitId: this.getId(),
212
+ slideId
213
+ })
214
+ );
215
+ }
216
+ reorderSlides(slideOrder) {
217
+ return Boolean(
218
+ this._commandService.syncExecuteCommand(import_univer_slides.ReorderSlidePagesCommand.id, {
219
+ unitId: this.getId(),
220
+ slideOrder
221
+ })
222
+ );
223
+ }
224
+ addSection(title, slideIds) {
225
+ return Boolean(
226
+ this._commandService.syncExecuteCommand(import_univer_slides.AddSlideSectionCommand.id, {
227
+ unitId: this.getId(),
228
+ title,
229
+ slideIds
230
+ })
231
+ );
232
+ }
233
+ alignElements(mode, elementIds, slideId) {
234
+ return Boolean(
235
+ this._commandService.syncExecuteCommand(import_univer_slides.AlignSlideElementsCommand.id, {
236
+ unitId: this.getId(),
237
+ slideId,
238
+ elementIds,
239
+ mode
240
+ })
241
+ );
242
+ }
243
+ setTheme(theme) {
244
+ return Boolean(
245
+ this._commandService.syncExecuteCommand(import_univer_slides.UpdateSlideThemeCommand.id, {
246
+ unitId: this.getId(),
247
+ theme
248
+ })
249
+ );
250
+ }
251
+ setSlideSize(preset, customDimensions) {
252
+ return Boolean(
253
+ this._commandService.syncExecuteCommand(import_univer_slides.SetSlideSizeCommand.id, {
254
+ unitId: this.getId(),
255
+ preset,
256
+ widthPt: customDimensions?.widthPt,
257
+ heightPt: customDimensions?.heightPt,
258
+ scaleElements: customDimensions?.scaleElements
259
+ })
260
+ );
261
+ }
262
+ findAndReplace(findText, replaceText, options) {
263
+ const matches = (0, import_univer_slides.countSlideTextMatches)(this._slideModel.save(), findText, options);
264
+ if (matches === 0) return 0;
265
+ this._commandService.syncExecuteCommand(import_univer_slides.FindAndReplaceSlideTextCommand.id, {
266
+ unitId: this.getId(),
267
+ findText,
268
+ replaceText,
269
+ matchCase: options?.matchCase,
270
+ slideId: options?.slideId
271
+ });
272
+ return matches;
273
+ }
274
+ undo() {
275
+ if (!this._injector.has(import_core.IUndoRedoService)) return false;
276
+ this._injector.get(import_core.IUniverInstanceService).focusUnit(this.getId());
277
+ const ur = this._injector.get(import_core.IUndoRedoService);
278
+ const item = ur.pitchTopUndoElement();
279
+ if (!item) return false;
280
+ ur.popUndoToRedo();
281
+ for (const m of item.undoMutations) {
282
+ this._commandService.syncExecuteCommand(m.id, m.params);
283
+ }
284
+ return true;
285
+ }
286
+ redo() {
287
+ if (!this._injector.has(import_core.IUndoRedoService)) return false;
288
+ this._injector.get(import_core.IUniverInstanceService).focusUnit(this.getId());
289
+ const ur = this._injector.get(import_core.IUndoRedoService);
290
+ const item = ur.pitchTopRedoElement();
291
+ if (!item) return false;
292
+ ur.popRedoToUndo();
293
+ for (const m of item.redoMutations) {
294
+ this._commandService.syncExecuteCommand(m.id, m.params);
295
+ }
296
+ return true;
297
+ }
298
+ extractDatasetCodes() {
299
+ return (0, import_univer_slides.extractSlideDatasetCodes)(this._slideModel.save());
300
+ }
301
+ compileWithDataset(datasets, options) {
302
+ const compiled = (0, import_univer_slides.compileSlidesWithDataset)(this._slideModel.save(), datasets, options);
303
+ if (options?.applyInPlace !== false) {
304
+ this._commandService.syncExecuteCommand(import_univer_slides.ReplaceSlideSnapshotCommand.id, {
305
+ unitId: this.getId(),
306
+ snapshot: compiled
307
+ });
308
+ }
309
+ return compiled;
310
+ }
311
+ async exportPptx(options) {
312
+ const io = this._injector.get(import_univer_slides.ISlideIoService);
313
+ return await io.exportPptx(this._slideModel.save(), options);
314
+ }
315
+ async exportPdf(options) {
316
+ const io = this._injector.get(import_univer_slides.ISlideIoService);
317
+ return await io.exportPdf(this._slideModel.save(), options);
318
+ }
319
+ };
320
+ FSlideDeck = __decorateClass([
321
+ __decorateParam(1, (0, import_core.Inject)(import_core.Injector)),
322
+ __decorateParam(2, import_core.ICommandService)
323
+ ], FSlideDeck);
324
+
325
+ // src/facade/f-univer.ts
326
+ function isSlideSnapshotObject(val) {
327
+ return Boolean(
328
+ val && typeof val === "object" && !(val instanceof FSlideDeck) && "slideOrder" in val && "slides" in val
329
+ );
330
+ }
331
+ var FUniverSlidesMixin = class extends import_facade.FUniver {
332
+ createSlideDeck(data, options) {
333
+ const model = this._univerInstanceService.createUnit(
334
+ import_core2.UniverInstanceType.UNIVER_SLIDE,
335
+ data ?? {},
336
+ options
337
+ );
338
+ return this._injector.createInstance(FSlideDeck, model);
339
+ }
340
+ getActiveSlideDeck() {
341
+ const model = this._univerInstanceService.getCurrentUnitOfType(
342
+ import_core2.UniverInstanceType.UNIVER_SLIDE
343
+ );
344
+ if (!model) return null;
345
+ return this._injector.createInstance(FSlideDeck, model);
346
+ }
347
+ getSlideDeck(unitId) {
348
+ const model = this._univerInstanceService.getUnit(
349
+ unitId,
350
+ import_core2.UniverInstanceType.UNIVER_SLIDE
351
+ );
352
+ if (!model) return null;
353
+ return this._injector.createInstance(FSlideDeck, model);
354
+ }
355
+ async importPptx(source, options, createOptions) {
356
+ const snapshot = this._injector.has(import_univer_slides2.ISlideIoService) ? await this._injector.get(import_univer_slides2.ISlideIoService).importPptx(source, options) : await (0, import_univer_slides2.importPptxBytes)(source, options);
357
+ return this.createSlideDeck(snapshot, createOptions);
358
+ }
359
+ async exportPptx(unitIdOrDeckOrSnapshot, options) {
360
+ if (isSlideSnapshotObject(unitIdOrDeckOrSnapshot)) {
361
+ return this._injector.has(import_univer_slides2.ISlideIoService) ? await this._injector.get(import_univer_slides2.ISlideIoService).exportPptx(unitIdOrDeckOrSnapshot, options) : await (0, import_univer_slides2.exportPptxBytes)(unitIdOrDeckOrSnapshot, options);
362
+ }
363
+ const target = typeof unitIdOrDeckOrSnapshot === "string" ? this.getSlideDeck(unitIdOrDeckOrSnapshot) : unitIdOrDeckOrSnapshot ?? this.getActiveSlideDeck();
364
+ if (!target) {
365
+ throw new Error("[UniverSlides] No active or matching Slide deck found for exportPptx().");
366
+ }
367
+ return await target.exportPptx(options);
368
+ }
369
+ async exportSlidePdf(unitIdOrDeckOrSnapshot, options) {
370
+ if (isSlideSnapshotObject(unitIdOrDeckOrSnapshot)) {
371
+ return this._injector.has(import_univer_slides2.ISlideIoService) ? await this._injector.get(import_univer_slides2.ISlideIoService).exportPdf(unitIdOrDeckOrSnapshot, options) : await (0, import_univer_slides2.exportSlidesToPdfBytes)(unitIdOrDeckOrSnapshot, options);
372
+ }
373
+ const target = typeof unitIdOrDeckOrSnapshot === "string" ? this.getSlideDeck(unitIdOrDeckOrSnapshot) : unitIdOrDeckOrSnapshot ?? this.getActiveSlideDeck();
374
+ if (!target) {
375
+ throw new Error("[UniverSlides] No active or matching Slide deck found for exportSlidePdf().");
376
+ }
377
+ return await target.exportPdf(options);
378
+ }
379
+ setSlideIoAdapter(adapter) {
380
+ this._injector.get(import_univer_slides2.ISlideIoService).setAdapter(adapter);
381
+ }
382
+ };
383
+ import_facade.FUniver.extend(FUniverSlidesMixin);
384
+ // Annotate the CommonJS export names for ESM import in node:
385
+ 0 && (module.exports = {
386
+ FSlideDeck,
387
+ FSlidePage,
388
+ FUniverSlidesMixin
389
+ });
390
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/facade/index.ts","../../../src/facade/f-univer.ts","../../../src/facade/f-slide-deck.ts"],"sourcesContent":["import './f-univer';\n\nexport { FSlideDeck, FSlidePage } from './f-slide-deck';\nexport { FUniverSlidesMixin, type IFUniverSlidesMixin } from './f-univer';\n","import { type ICreateUnitOptions, UniverInstanceType } from '@univerjs/core';\nimport { FUniver } from '@univerjs/core/facade';\nimport {\n exportPptxBytes,\n exportSlidesToPdfBytes,\n importPptxBytes,\n type IPptxExportOptions,\n type IPptxImportOptions,\n type ISlideIoAdapter,\n ISlideIoService,\n type ISlidePdfExportOptions,\n type ISlideUnitData,\n type SlideUnitModel,\n} from '@yudaocode/univer-slides';\nimport { FSlideDeck } from './f-slide-deck';\n\nexport interface IFUniverSlidesMixin {\n /**\n * Creates a new `UNIVER_SLIDE` presentation unit and returns its `FSlideDeck` facade.\n */\n createSlideDeck(data?: Partial<ISlideUnitData>, options?: ICreateUnitOptions): FSlideDeck;\n\n /**\n * Returns the currently active `FSlideDeck` facade instance, or `null` if none is active.\n */\n getActiveSlideDeck(): FSlideDeck | null;\n\n /**\n * Returns the `FSlideDeck` facade instance for `unitId`, or `null` if not found.\n */\n getSlideDeck(unitId: string): FSlideDeck | null;\n\n /**\n * Imports an OpenXML `.pptx` binary (`Uint8Array | ArrayBuffer | Blob`) into a new `FSlideDeck` unit.\n */\n importPptx(\n source: Uint8Array | ArrayBuffer | Blob,\n options?: IPptxImportOptions,\n createOptions?: ICreateUnitOptions\n ): Promise<FSlideDeck>;\n\n /**\n * Exports `unitIdOrDeck` (or the active `FSlideDeck` when omitted, or an `ISlideUnitData` snapshot) to `.pptx` bytes.\n */\n exportPptx(\n unitIdOrDeckOrSnapshot?: string | FSlideDeck | ISlideUnitData,\n options?: IPptxExportOptions\n ): Promise<Uint8Array>;\n\n /**\n * Exports `unitIdOrDeck` (or the active `FSlideDeck` when omitted, or an `ISlideUnitData` snapshot) to vector PDF bytes.\n */\n exportSlidePdf(\n unitIdOrDeckOrSnapshot?: string | FSlideDeck | ISlideUnitData,\n options?: ISlidePdfExportOptions\n ): Promise<Uint8Array>;\n\n /**\n * Configures or replaces the pluggable Slide IO adapter (`importPptx`, `exportPptx`, `exportPdf`, `onSave`).\n */\n setSlideIoAdapter(adapter: ISlideIoAdapter): void;\n}\n\nfunction isSlideSnapshotObject(val: unknown): val is ISlideUnitData {\n return Boolean(\n val &&\n typeof val === 'object' &&\n !(val instanceof FSlideDeck) &&\n 'slideOrder' in val &&\n 'slides' in val\n );\n}\n\nexport class FUniverSlidesMixin extends FUniver implements IFUniverSlidesMixin {\n override createSlideDeck(\n data?: Partial<ISlideUnitData>,\n options?: ICreateUnitOptions\n ): FSlideDeck {\n const model = this._univerInstanceService.createUnit<Partial<ISlideUnitData>, SlideUnitModel>(\n UniverInstanceType.UNIVER_SLIDE,\n data ?? {},\n options\n );\n return this._injector.createInstance(FSlideDeck, model);\n }\n\n override getActiveSlideDeck(): FSlideDeck | null {\n const model = this._univerInstanceService.getCurrentUnitOfType<SlideUnitModel>(\n UniverInstanceType.UNIVER_SLIDE\n );\n if (!model) return null;\n return this._injector.createInstance(FSlideDeck, model);\n }\n\n override getSlideDeck(unitId: string): FSlideDeck | null {\n const model = this._univerInstanceService.getUnit<SlideUnitModel>(\n unitId,\n UniverInstanceType.UNIVER_SLIDE\n );\n if (!model) return null;\n return this._injector.createInstance(FSlideDeck, model);\n }\n\n override async importPptx(\n source: Uint8Array | ArrayBuffer | Blob,\n options?: IPptxImportOptions,\n createOptions?: ICreateUnitOptions\n ): Promise<FSlideDeck> {\n const snapshot = this._injector.has(ISlideIoService)\n ? await this._injector.get(ISlideIoService).importPptx(source, options)\n : await importPptxBytes(source, options);\n return this.createSlideDeck(snapshot, createOptions);\n }\n\n override async exportPptx(\n unitIdOrDeckOrSnapshot?: string | FSlideDeck | ISlideUnitData,\n options?: IPptxExportOptions\n ): Promise<Uint8Array> {\n if (isSlideSnapshotObject(unitIdOrDeckOrSnapshot)) {\n return this._injector.has(ISlideIoService)\n ? await this._injector.get(ISlideIoService).exportPptx(unitIdOrDeckOrSnapshot, options)\n : await exportPptxBytes(unitIdOrDeckOrSnapshot, options);\n }\n const target =\n typeof unitIdOrDeckOrSnapshot === 'string'\n ? this.getSlideDeck(unitIdOrDeckOrSnapshot)\n : unitIdOrDeckOrSnapshot ?? this.getActiveSlideDeck();\n if (!target) {\n throw new Error('[UniverSlides] No active or matching Slide deck found for exportPptx().');\n }\n return await target.exportPptx(options);\n }\n\n override async exportSlidePdf(\n unitIdOrDeckOrSnapshot?: string | FSlideDeck | ISlideUnitData,\n options?: ISlidePdfExportOptions\n ): Promise<Uint8Array> {\n if (isSlideSnapshotObject(unitIdOrDeckOrSnapshot)) {\n return this._injector.has(ISlideIoService)\n ? await this._injector.get(ISlideIoService).exportPdf(unitIdOrDeckOrSnapshot, options)\n : await exportSlidesToPdfBytes(unitIdOrDeckOrSnapshot, options);\n }\n const target =\n typeof unitIdOrDeckOrSnapshot === 'string'\n ? this.getSlideDeck(unitIdOrDeckOrSnapshot)\n : unitIdOrDeckOrSnapshot ?? this.getActiveSlideDeck();\n if (!target) {\n throw new Error('[UniverSlides] No active or matching Slide deck found for exportSlidePdf().');\n }\n return await target.exportPdf(options);\n }\n\n override setSlideIoAdapter(adapter: ISlideIoAdapter): void {\n this._injector.get(ISlideIoService).setAdapter(adapter);\n }\n}\n\nFUniver.extend(FUniverSlidesMixin);\n\ndeclare module '@univerjs/core/facade' {\n // eslint-disable-next-line ts/naming-convention\n interface FUniver extends IFUniverSlidesMixin {}\n}\n","import { ICommandService, Inject, Injector, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';\nimport {\n AddSlideElementCommand,\n AddSlidePageCommand,\n AddSlideSectionCommand,\n AlignSlideElementsCommand,\n compileSlidesWithDataset,\n countSlideTextMatches,\n DeleteSlideElementsCommand,\n DeleteSlidePageCommand,\n DuplicateSlidePageCommand,\n extractSlideDatasetCodes,\n FindAndReplaceSlideTextCommand,\n type ICompileSlideTemplateOptions,\n type IPptxExportOptions,\n type ISlideAnimation,\n type ISlideDatasetExtractionResult,\n type ISlideElement,\n ISlideIoService,\n type ISlidePage,\n type ISlidePdfExportOptions,\n type ISlideTheme,\n type ISlideTransition,\n type ISlideUnitData,\n ReorderSlidePagesCommand,\n ReplaceSlideSnapshotCommand,\n SetActiveSlidePageCommand,\n SetSlideAnimationsCommand,\n SetSlideSizeCommand,\n type SlideElementAlignMode,\n type SlideElementType,\n type SlideLayoutType,\n type SlideSizePreset,\n type SlideUnitModel,\n UpdateSlideElementsCommand,\n UpdateSlidePagePropsCommand,\n UpdateSlideThemeCommand,\n} from '@yudaocode/univer-slides';\n\nexport class FSlidePage {\n constructor(\n private readonly _model: SlideUnitModel,\n private readonly _commandService: ICommandService,\n private readonly _slideId: string\n ) {}\n\n getId(): string {\n return this._slideId;\n }\n\n getData(): ISlidePage | undefined {\n return this._model.getSlide(this._slideId);\n }\n\n getTitle(): string {\n return this._model.getSlide(this._slideId)?.title ?? '';\n }\n\n setTitle(title: string): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlidePagePropsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n patch: { title },\n })\n );\n }\n\n getSpeakerNotes(): string {\n return this._model.getSlide(this._slideId)?.speakerNotes ?? '';\n }\n\n setSpeakerNotes(speakerNotes: string): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlidePagePropsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n patch: { speakerNotes },\n })\n );\n }\n\n isHidden(): boolean {\n return Boolean(this._model.getSlide(this._slideId)?.hidden);\n }\n\n setHidden(hidden: boolean): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlidePagePropsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n patch: { hidden },\n })\n );\n }\n\n setTransition(transition: ISlideTransition): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlidePagePropsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n patch: { transition },\n })\n );\n }\n\n getElements(): ISlideElement[] {\n return this._model.getSlideElementsOrdered(this._slideId);\n }\n\n addElement(elementType: SlideElementType, element?: Partial<ISlideElement>): ISlideElement | null {\n const ok = this._commandService.syncExecuteCommand(AddSlideElementCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n elementType,\n element,\n });\n if (!ok) return null;\n const ordered = this._model.getSlideElementsOrdered(this._slideId);\n return ordered[ordered.length - 1] ?? null;\n }\n\n updateElement(elementId: string, patch: Partial<ISlideElement>): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlideElementsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n updates: [{ id: elementId, patch }],\n })\n );\n }\n\n deleteElements(elementIds: string[]): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(DeleteSlideElementsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n elementIds,\n })\n );\n }\n\n setAnimations(animations: ISlideAnimation[]): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(SetSlideAnimationsCommand.id, {\n unitId: this._model.getUnitId(),\n slideId: this._slideId,\n animations,\n })\n );\n }\n}\n\nexport class FSlideDeck {\n constructor(\n private readonly _slideModel: SlideUnitModel,\n @Inject(Injector) private readonly _injector: Injector,\n @ICommandService private readonly _commandService: ICommandService\n ) {}\n\n getId(): string {\n return this._slideModel.getUnitId();\n }\n\n getModel(): SlideUnitModel {\n return this._slideModel;\n }\n\n getName(): string {\n return this._slideModel.getName();\n }\n\n setName(name: string): void {\n this._slideModel.setName(name);\n }\n\n getSnapshot(): ISlideUnitData {\n return this._slideModel.save();\n }\n\n save(): ISlideUnitData {\n return this._slideModel.save();\n }\n\n getSlideCount(): number {\n return this._slideModel.getSlideOrder().length;\n }\n\n getSlides(): FSlidePage[] {\n return this._slideModel\n .getSlideOrder()\n .map((slideId) => new FSlidePage(this._slideModel, this._commandService, slideId));\n }\n\n getSlideById(slideId: string): FSlidePage | null {\n if (!this._slideModel.getSlide(slideId)) return null;\n return new FSlidePage(this._slideModel, this._commandService, slideId);\n }\n\n getActiveSlide(): FSlidePage | null {\n const active = this._slideModel.getActiveSlide();\n if (!active) return null;\n return new FSlidePage(this._slideModel, this._commandService, active.id);\n }\n\n setActiveSlide(slideId: string): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(SetActiveSlidePageCommand.id, {\n unitId: this.getId(),\n slideId,\n })\n );\n }\n\n addSlide(options?: {\n layoutId?: string | SlideLayoutType;\n title?: string;\n index?: number;\n sectionId?: string;\n }): FSlidePage | null {\n const ok = this._commandService.syncExecuteCommand(AddSlidePageCommand.id, {\n unitId: this.getId(),\n ...options,\n });\n if (!ok) return null;\n return this.getActiveSlide();\n }\n\n duplicateSlide(slideId?: string): FSlidePage | null {\n const ok = this._commandService.syncExecuteCommand(DuplicateSlidePageCommand.id, {\n unitId: this.getId(),\n slideId,\n });\n if (!ok) return null;\n return this.getActiveSlide();\n }\n\n deleteSlide(slideId?: string): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(DeleteSlidePageCommand.id, {\n unitId: this.getId(),\n slideId,\n })\n );\n }\n\n reorderSlides(slideOrder: string[]): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(ReorderSlidePagesCommand.id, {\n unitId: this.getId(),\n slideOrder,\n })\n );\n }\n\n addSection(title: string, slideIds?: string[]): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(AddSlideSectionCommand.id, {\n unitId: this.getId(),\n title,\n slideIds,\n })\n );\n }\n\n alignElements(mode: SlideElementAlignMode, elementIds: string[], slideId?: string): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(AlignSlideElementsCommand.id, {\n unitId: this.getId(),\n slideId,\n elementIds,\n mode,\n })\n );\n }\n\n setTheme(theme: ISlideTheme): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(UpdateSlideThemeCommand.id, {\n unitId: this.getId(),\n theme,\n })\n );\n }\n\n setSlideSize(\n preset: SlideSizePreset,\n customDimensions?: { widthPt: number; heightPt: number; scaleElements?: boolean }\n ): boolean {\n return Boolean(\n this._commandService.syncExecuteCommand(SetSlideSizeCommand.id, {\n unitId: this.getId(),\n preset,\n widthPt: customDimensions?.widthPt,\n heightPt: customDimensions?.heightPt,\n scaleElements: customDimensions?.scaleElements,\n })\n );\n }\n\n findAndReplace(\n findText: string,\n replaceText: string,\n options?: { matchCase?: boolean; slideId?: string }\n ): number {\n const matches = countSlideTextMatches(this._slideModel.save(), findText, options);\n if (matches === 0) return 0;\n this._commandService.syncExecuteCommand(FindAndReplaceSlideTextCommand.id, {\n unitId: this.getId(),\n findText,\n replaceText,\n matchCase: options?.matchCase,\n slideId: options?.slideId,\n });\n return matches;\n }\n\n undo(): boolean {\n if (!this._injector.has(IUndoRedoService)) return false;\n this._injector.get(IUniverInstanceService).focusUnit(this.getId());\n const ur = this._injector.get(IUndoRedoService);\n const item = ur.pitchTopUndoElement();\n if (!item) return false;\n ur.popUndoToRedo();\n for (const m of item.undoMutations) {\n this._commandService.syncExecuteCommand(m.id, m.params);\n }\n return true;\n }\n\n redo(): boolean {\n if (!this._injector.has(IUndoRedoService)) return false;\n this._injector.get(IUniverInstanceService).focusUnit(this.getId());\n const ur = this._injector.get(IUndoRedoService);\n const item = ur.pitchTopRedoElement();\n if (!item) return false;\n ur.popRedoToUndo();\n for (const m of item.redoMutations) {\n this._commandService.syncExecuteCommand(m.id, m.params);\n }\n return true;\n }\n\n extractDatasetCodes(): ISlideDatasetExtractionResult {\n return extractSlideDatasetCodes(this._slideModel.save());\n }\n\n compileWithDataset(\n datasets: Record<string, unknown>,\n options?: ICompileSlideTemplateOptions & { applyInPlace?: boolean }\n ): ISlideUnitData {\n const compiled = compileSlidesWithDataset(this._slideModel.save(), datasets, options);\n if (options?.applyInPlace !== false) {\n this._commandService.syncExecuteCommand(ReplaceSlideSnapshotCommand.id, {\n unitId: this.getId(),\n snapshot: compiled,\n });\n }\n return compiled;\n }\n\n async exportPptx(options?: IPptxExportOptions): Promise<Uint8Array> {\n const io = this._injector.get(ISlideIoService);\n return await io.exportPptx(this._slideModel.save(), options);\n }\n\n async exportPdf(options?: ISlidePdfExportOptions): Promise<Uint8Array> {\n const io = this._injector.get(ISlideIoService);\n return await io.exportPdf(this._slideModel.save(), options);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA4D;AAC5D,oBAAwB;AACxB,IAAAC,wBAWO;;;ACbP,kBAA4F;AAC5F,2BAoCO;AAEA,IAAM,aAAN,MAAiB;AAAA,EACtB,YACmB,QACA,iBACA,UACjB;AAHiB;AACA;AACA;AAAA,EAChB;AAAA,EAEH,QAAgB;AACd,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,UAAkC;AAChC,WAAO,KAAK,OAAO,SAAS,KAAK,QAAQ;AAAA,EAC3C;AAAA,EAEA,WAAmB;AACjB,WAAO,KAAK,OAAO,S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