@superdoc-dev/cli 0.3.2 → 0.4.0-next.10

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +2382 -265
  3. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -13006,27 +13006,27 @@ function executeMarkdownToFragment(adapter, input) {
13006
13006
  // ../../packages/document-api/src/comments/comments.ts
13007
13007
  function validateCreateCommentInput(input) {
13008
13008
  if (!isRecord(input)) {
13009
- throw new DocumentApiValidationError("INVALID_TARGET", "comments.create input must be a non-null object.");
13009
+ throw new DocumentApiValidationError("INVALID_INPUT", "comments.create input must be a non-null object.");
13010
13010
  }
13011
13011
  assertNoUnknownFields(input, CREATE_COMMENT_ALLOWED_KEYS, "comments.create");
13012
13012
  const { target, text, parentCommentId } = input;
13013
13013
  const hasTarget = target !== undefined;
13014
13014
  const isReply = parentCommentId !== undefined;
13015
13015
  if (typeof text !== "string") {
13016
- throw new DocumentApiValidationError("INVALID_TARGET", `text must be a string, got ${typeof text}.`, {
13016
+ throw new DocumentApiValidationError("INVALID_INPUT", `text must be a string, got ${typeof text}.`, {
13017
13017
  field: "text",
13018
13018
  value: text
13019
13019
  });
13020
13020
  }
13021
13021
  if (isReply) {
13022
13022
  if (typeof parentCommentId !== "string" || parentCommentId.length === 0) {
13023
- throw new DocumentApiValidationError("INVALID_TARGET", "parentCommentId must be a non-empty string.", {
13023
+ throw new DocumentApiValidationError("INVALID_INPUT", "parentCommentId must be a non-empty string.", {
13024
13024
  field: "parentCommentId",
13025
13025
  value: parentCommentId
13026
13026
  });
13027
13027
  }
13028
13028
  if (hasTarget) {
13029
- throw new DocumentApiValidationError("INVALID_TARGET", "Cannot combine parentCommentId with target. Replies do not take a target.", { fields: ["parentCommentId", "target"] });
13029
+ throw new DocumentApiValidationError("INVALID_INPUT", "Cannot combine parentCommentId with target. Replies do not take a target.", { fields: ["parentCommentId", "target"] });
13030
13030
  }
13031
13031
  return;
13032
13032
  }
@@ -13044,13 +13044,13 @@ function validateCreateCommentInput(input) {
13044
13044
  }
13045
13045
  function validatePatchCommentInput(input) {
13046
13046
  if (!isRecord(input)) {
13047
- throw new DocumentApiValidationError("INVALID_TARGET", "comments.patch input must be a non-null object.");
13047
+ throw new DocumentApiValidationError("INVALID_INPUT", "comments.patch input must be a non-null object.");
13048
13048
  }
13049
13049
  assertNoUnknownFields(input, PATCH_COMMENT_ALLOWED_KEYS, "comments.patch");
13050
13050
  const { commentId, target } = input;
13051
13051
  const hasTarget = target !== undefined;
13052
13052
  if (typeof commentId !== "string") {
13053
- throw new DocumentApiValidationError("INVALID_TARGET", `commentId must be a string, got ${typeof commentId}.`, {
13053
+ throw new DocumentApiValidationError("INVALID_INPUT", `commentId must be a string, got ${typeof commentId}.`, {
13054
13054
  field: "commentId",
13055
13055
  value: commentId
13056
13056
  });
@@ -13063,13 +13063,25 @@ function validatePatchCommentInput(input) {
13063
13063
  if (providedFields.length > 1) {
13064
13064
  throw new DocumentApiValidationError("INVALID_INPUT", `comments.patch accepts exactly one mutation field per call, got ${providedFields.length}: ${providedFields.join(", ")}.`, { providedFields: [...providedFields] });
13065
13065
  }
13066
- const { status } = input;
13066
+ const { text, status, isInternal } = input;
13067
+ if (text !== undefined && typeof text !== "string") {
13068
+ throw new DocumentApiValidationError("INVALID_INPUT", `text must be a string, got ${typeof text}.`, {
13069
+ field: "text",
13070
+ value: text
13071
+ });
13072
+ }
13067
13073
  if (status !== undefined && status !== "resolved") {
13068
- throw new DocumentApiValidationError("INVALID_TARGET", `status must be "resolved", got "${String(status)}".`, {
13074
+ throw new DocumentApiValidationError("INVALID_INPUT", `status must be "resolved", got "${String(status)}".`, {
13069
13075
  field: "status",
13070
13076
  value: status
13071
13077
  });
13072
13078
  }
13079
+ if (isInternal !== undefined && typeof isInternal !== "boolean") {
13080
+ throw new DocumentApiValidationError("INVALID_INPUT", `isInternal must be a boolean, got ${typeof isInternal}.`, {
13081
+ field: "isInternal",
13082
+ value: isInternal
13083
+ });
13084
+ }
13073
13085
  if (hasTarget && !isTextAddress(target)) {
13074
13086
  throw new DocumentApiValidationError("INVALID_TARGET", "target must be a text address object.", {
13075
13087
  field: "target",
@@ -13100,13 +13112,29 @@ function executeCommentsPatch(adapter, input, options) {
13100
13112
  }
13101
13113
  throw new DocumentApiValidationError("INTERNAL_ERROR", "comments.patch: no mutation field matched after validation. This is a bug.");
13102
13114
  }
13115
+ function validateCommentIdInput(input, operationName) {
13116
+ if (!isRecord(input)) {
13117
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} input must be a non-null object.`);
13118
+ }
13119
+ if (typeof input.commentId !== "string" || input.commentId.length === 0) {
13120
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} commentId must be a non-empty string.`, {
13121
+ field: "commentId",
13122
+ value: input.commentId
13123
+ });
13124
+ }
13125
+ }
13103
13126
  function executeCommentsDelete(adapter, input, options) {
13127
+ validateCommentIdInput(input, "comments.delete");
13104
13128
  return adapter.remove({ commentId: input.commentId }, options);
13105
13129
  }
13106
13130
  function executeGetComment(adapter, input) {
13131
+ validateCommentIdInput(input, "comments.get");
13107
13132
  return adapter.get(input);
13108
13133
  }
13109
13134
  function executeListComments(adapter, query2) {
13135
+ if (query2 !== undefined && !isRecord(query2)) {
13136
+ throw new DocumentApiValidationError("INVALID_INPUT", "comments.list query must be an object if provided.");
13137
+ }
13110
13138
  return adapter.list(query2);
13111
13139
  }
13112
13140
  var CREATE_COMMENT_ALLOWED_KEYS, PATCH_COMMENT_ALLOWED_KEYS;
@@ -13220,18 +13248,45 @@ function executeGet(adapter, input) {
13220
13248
 
13221
13249
  // ../../packages/document-api/src/get-text/get-text.ts
13222
13250
  function executeGetText(adapter, input) {
13251
+ if (!isRecord(input)) {
13252
+ throw new DocumentApiValidationError("INVALID_INPUT", "getText input must be a non-null object.");
13253
+ }
13254
+ validateStoryLocator(input.in, "in");
13223
13255
  return adapter.getText(input);
13224
13256
  }
13257
+ var init_get_text = __esm(() => {
13258
+ init_story_validator();
13259
+ init_errors2();
13260
+ init_validation_primitives();
13261
+ });
13225
13262
 
13226
13263
  // ../../packages/document-api/src/get-markdown/get-markdown.ts
13227
13264
  function executeGetMarkdown(adapter, input) {
13265
+ if (!isRecord(input)) {
13266
+ throw new DocumentApiValidationError("INVALID_INPUT", "getMarkdown input must be a non-null object.");
13267
+ }
13268
+ validateStoryLocator(input.in, "in");
13228
13269
  return adapter.getMarkdown(input);
13229
13270
  }
13271
+ var init_get_markdown = __esm(() => {
13272
+ init_story_validator();
13273
+ init_errors2();
13274
+ init_validation_primitives();
13275
+ });
13230
13276
 
13231
13277
  // ../../packages/document-api/src/get-html/get-html.ts
13232
13278
  function executeGetHtml(adapter, input) {
13279
+ if (!isRecord(input)) {
13280
+ throw new DocumentApiValidationError("INVALID_INPUT", "getHtml input must be a non-null object.");
13281
+ }
13282
+ validateStoryLocator(input.in, "in");
13233
13283
  return adapter.getHtml(input);
13234
13284
  }
13285
+ var init_get_html = __esm(() => {
13286
+ init_story_validator();
13287
+ init_errors2();
13288
+ init_validation_primitives();
13289
+ });
13235
13290
 
13236
13291
  // ../../packages/document-api/src/info/info.ts
13237
13292
  function executeInfo(adapter, input) {
@@ -13955,155 +14010,574 @@ var init_insert = __esm(() => {
13955
14010
  VALID_INSERT_TYPES = new Set(["text", "markdown", "html"]);
13956
14011
  });
13957
14012
 
14013
+ // ../../packages/document-api/src/lists/lists.types.ts
14014
+ var LIST_KINDS, LIST_INSERT_POSITIONS, JOIN_DIRECTIONS, MUTATION_SCOPES, LEVEL_ALIGNMENTS, TRAILING_CHARACTERS, LIST_PRESET_IDS;
14015
+ var init_lists_types = __esm(() => {
14016
+ LIST_KINDS = ["ordered", "bullet"];
14017
+ LIST_INSERT_POSITIONS = ["before", "after"];
14018
+ JOIN_DIRECTIONS = ["withPrevious", "withNext"];
14019
+ MUTATION_SCOPES = ["definition", "instance"];
14020
+ LEVEL_ALIGNMENTS = ["left", "center", "right"];
14021
+ TRAILING_CHARACTERS = ["tab", "space", "nothing"];
14022
+ LIST_PRESET_IDS = [
14023
+ "decimal",
14024
+ "decimalParenthesis",
14025
+ "lowerLetter",
14026
+ "upperLetter",
14027
+ "lowerRoman",
14028
+ "upperRoman",
14029
+ "disc",
14030
+ "circle",
14031
+ "square",
14032
+ "dash"
14033
+ ];
14034
+ });
14035
+
13958
14036
  // ../../packages/document-api/src/lists/lists.ts
13959
- function validateListTarget(input, operationName) {
13960
- if (input.target === undefined) {
13961
- throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a target.`);
14037
+ function validateListInput(input, operationName) {
14038
+ if (!isRecord(input)) {
14039
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} input must be a non-null object.`);
14040
+ }
14041
+ }
14042
+ function validateListItemAddress(value, field, operationName) {
14043
+ if (value === undefined || value === null) {
14044
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a ${field}.`);
14045
+ }
14046
+ if (!isRecord(value)) {
14047
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
14048
+ field,
14049
+ value
14050
+ });
14051
+ }
14052
+ const t = value;
14053
+ if (t.kind !== "block") {
14054
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.kind must be 'block', got "${String(t.kind)}".`, { field: `${field}.kind`, value: t.kind });
14055
+ }
14056
+ if (t.nodeType !== "listItem") {
14057
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.nodeType must be 'listItem', got "${String(t.nodeType)}".`, { field: `${field}.nodeType`, value: t.nodeType });
14058
+ }
14059
+ if (typeof t.nodeId !== "string" || t.nodeId === "") {
14060
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.nodeId must be a non-empty string.`, { field: `${field}.nodeId`, value: t.nodeId });
14061
+ }
14062
+ }
14063
+ function validateListItemTarget(input, operationName) {
14064
+ validateListItemAddress(input.target, "target", operationName);
14065
+ }
14066
+ function validateBlockAddress(value, field, operationName) {
14067
+ if (!isRecord(value)) {
14068
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
14069
+ field,
14070
+ value
14071
+ });
14072
+ }
14073
+ const v = value;
14074
+ if (v.kind !== "block") {
14075
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.kind must be 'block', got "${String(v.kind)}".`, { field: `${field}.kind`, value: v.kind });
14076
+ }
14077
+ if (v.nodeType !== "paragraph") {
14078
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.nodeType must be 'paragraph', got "${String(v.nodeType)}".`, { field: `${field}.nodeType`, value: v.nodeType });
14079
+ }
14080
+ if (typeof v.nodeId !== "string" || v.nodeId === "") {
14081
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field}.nodeId must be a non-empty string.`, { field: `${field}.nodeId`, value: v.nodeId });
14082
+ }
14083
+ }
14084
+ function validateBlockAddressOrRange(value, field, operationName) {
14085
+ if (!isRecord(value)) {
14086
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
14087
+ field,
14088
+ value
14089
+ });
14090
+ }
14091
+ const v = value;
14092
+ if (v.from !== undefined) {
14093
+ validateBlockAddress(v.from, `${field}.from`, operationName);
14094
+ validateBlockAddress(v.to, `${field}.to`, operationName);
14095
+ } else {
14096
+ validateBlockAddress(value, field, operationName);
14097
+ }
14098
+ }
14099
+ function requireLevel(value, operationName) {
14100
+ if (!isInteger(value) || value < 0) {
14101
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} level must be a non-negative integer, got ${JSON.stringify(value)}.`, { field: "level", value });
14102
+ }
14103
+ }
14104
+ function requireEnum(value, field, validSet, operationName) {
14105
+ if (!validSet.has(value)) {
14106
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be one of: ${[...validSet].join(", ")}. Got ${JSON.stringify(value)}.`, { field, value });
14107
+ }
14108
+ }
14109
+ function optionalBoolean(value, field, operationName) {
14110
+ if (value !== undefined && typeof value !== "boolean") {
14111
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be a boolean if provided, got ${typeof value}.`, { field, value });
14112
+ }
14113
+ }
14114
+ function optionalNumber(value, field, operationName) {
14115
+ if (value !== undefined && (typeof value !== "number" || !Number.isFinite(value))) {
14116
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be a number if provided, got ${typeof value}.`, { field, value });
14117
+ }
14118
+ }
14119
+ function optionalInteger(value, field, operationName) {
14120
+ if (value !== undefined && !isInteger(value)) {
14121
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be an integer if provided, got ${JSON.stringify(value)}.`, { field, value });
14122
+ }
14123
+ }
14124
+ function optionalLevelsArray(value, field, operationName) {
14125
+ if (value === undefined)
14126
+ return;
14127
+ if (!Array.isArray(value)) {
14128
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be an array if provided.`, {
14129
+ field,
14130
+ value
14131
+ });
14132
+ }
14133
+ for (let i = 0;i < value.length; i++) {
14134
+ if (!isInteger(value[i]) || value[i] < 0) {
14135
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field}[${i}] must be a non-negative integer.`, { field: `${field}[${i}]`, value: value[i] });
14136
+ }
14137
+ }
14138
+ }
14139
+ function validateListLevelTemplate(entry, path, operationName) {
14140
+ if (!isRecord(entry)) {
14141
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path} must be an object.`, {
14142
+ field: path,
14143
+ value: entry
14144
+ });
14145
+ }
14146
+ const e = entry;
14147
+ if (!isInteger(e.level) || e.level < 0) {
14148
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path}.level must be a non-negative integer.`, { field: `${path}.level`, value: e.level });
14149
+ }
14150
+ if (e.numFmt !== undefined && typeof e.numFmt !== "string") {
14151
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path}.numFmt must be a string.`, {
14152
+ field: `${path}.numFmt`,
14153
+ value: e.numFmt
14154
+ });
14155
+ }
14156
+ if (e.lvlText !== undefined && typeof e.lvlText !== "string") {
14157
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path}.lvlText must be a string.`, {
14158
+ field: `${path}.lvlText`,
14159
+ value: e.lvlText
14160
+ });
14161
+ }
14162
+ optionalInteger(e.start, `${path}.start`, operationName);
14163
+ if (e.alignment !== undefined) {
14164
+ requireEnum(e.alignment, `${path}.alignment`, VALID_LEVEL_ALIGNMENTS, operationName);
14165
+ }
14166
+ if (e.trailingCharacter !== undefined) {
14167
+ requireEnum(e.trailingCharacter, `${path}.trailingCharacter`, VALID_TRAILING_CHARACTERS, operationName);
14168
+ }
14169
+ if (e.markerFont !== undefined && typeof e.markerFont !== "string") {
14170
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path}.markerFont must be a string.`, {
14171
+ field: `${path}.markerFont`,
14172
+ value: e.markerFont
14173
+ });
14174
+ }
14175
+ optionalInteger(e.pictureBulletId, `${path}.pictureBulletId`, operationName);
14176
+ if (e.tabStopAt !== undefined && e.tabStopAt !== null) {
14177
+ optionalNumber(e.tabStopAt, `${path}.tabStopAt`, operationName);
14178
+ }
14179
+ if (e.indents !== undefined) {
14180
+ if (!isRecord(e.indents)) {
14181
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${path}.indents must be an object.`, {
14182
+ field: `${path}.indents`,
14183
+ value: e.indents
14184
+ });
14185
+ }
14186
+ const ind = e.indents;
14187
+ optionalNumber(ind.left, `${path}.indents.left`, operationName);
14188
+ optionalNumber(ind.hanging, `${path}.indents.hanging`, operationName);
14189
+ optionalNumber(ind.firstLine, `${path}.indents.firstLine`, operationName);
14190
+ }
14191
+ }
14192
+ function validateListTemplate(value, field, operationName) {
14193
+ if (!isRecord(value)) {
14194
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be an object.`, {
14195
+ field,
14196
+ value
14197
+ });
14198
+ }
14199
+ const t = value;
14200
+ if (t.version !== 1) {
14201
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field}.version must be 1, got ${JSON.stringify(t.version)}.`, { field: `${field}.version`, value: t.version });
14202
+ }
14203
+ if (!Array.isArray(t.levels)) {
14204
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field}.levels must be an array.`, {
14205
+ field: `${field}.levels`,
14206
+ value: t.levels
14207
+ });
14208
+ }
14209
+ for (let i = 0;i < t.levels.length; i++) {
14210
+ validateListLevelTemplate(t.levels[i], `${field}.levels[${i}]`, operationName);
14211
+ }
14212
+ }
14213
+ function validateListsCreateFields(raw) {
14214
+ const op = "lists.create";
14215
+ if (raw.kind !== undefined) {
14216
+ requireEnum(raw.kind, "kind", VALID_LIST_KINDS, op);
14217
+ }
14218
+ if (raw.level !== undefined) {
14219
+ if (!isInteger(raw.level) || raw.level < 0) {
14220
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} level must be a non-negative integer, got ${JSON.stringify(raw.level)}.`, { field: "level", value: raw.level });
14221
+ }
14222
+ }
14223
+ if (raw.sequence !== undefined) {
14224
+ if (!isRecord(raw.sequence)) {
14225
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} sequence must be an object.`, {
14226
+ field: "sequence",
14227
+ value: raw.sequence
14228
+ });
14229
+ }
14230
+ const seq = raw.sequence;
14231
+ requireEnum(seq.mode, "sequence.mode", VALID_SEQUENCE_MODES, op);
14232
+ if (seq.mode === "continuePrevious") {
14233
+ if (raw.preset !== undefined) {
14234
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} preset must not be provided when sequence.mode is 'continuePrevious'.`, { field: "preset" });
14235
+ }
14236
+ if (raw.style !== undefined) {
14237
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} style must not be provided when sequence.mode is 'continuePrevious'.`, { field: "style" });
14238
+ }
14239
+ if (seq.startAt !== undefined) {
14240
+ throw new DocumentApiValidationError("INVALID_INPUT", `${op} sequence.startAt must not be provided when sequence.mode is 'continuePrevious'.`, { field: "sequence.startAt" });
14241
+ }
14242
+ }
14243
+ if (seq.mode === "new") {
14244
+ optionalInteger(seq.startAt, "sequence.startAt", op);
14245
+ }
14246
+ }
14247
+ if (raw.preset !== undefined) {
14248
+ requireEnum(raw.preset, "preset", VALID_LIST_PRESETS, op);
14249
+ }
14250
+ if (raw.style !== undefined) {
14251
+ validateListTemplate(raw.style, "style", op);
13962
14252
  }
13963
14253
  }
13964
14254
  function executeListsList(adapter, query2) {
14255
+ if (query2 !== undefined) {
14256
+ if (!isRecord(query2)) {
14257
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.list query must be an object if provided.");
14258
+ }
14259
+ const q = query2;
14260
+ if (q.kind !== undefined) {
14261
+ requireEnum(q.kind, "kind", VALID_LIST_KINDS, "lists.list");
14262
+ }
14263
+ optionalInteger(q.level, "level", "lists.list");
14264
+ optionalInteger(q.limit, "limit", "lists.list");
14265
+ optionalInteger(q.offset, "offset", "lists.list");
14266
+ optionalInteger(q.ordinal, "ordinal", "lists.list");
14267
+ if (q.within !== undefined) {
14268
+ if (!isRecord(q.within)) {
14269
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.list within must be an object.", {
14270
+ field: "within",
14271
+ value: q.within
14272
+ });
14273
+ }
14274
+ const w = q.within;
14275
+ if (w.kind !== "block") {
14276
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.list within.kind must be 'block', got "${String(w.kind)}".`, { field: "within.kind", value: w.kind });
14277
+ }
14278
+ if (!VALID_BLOCK_NODE_TYPES.has(w.nodeType)) {
14279
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.list within.nodeType must be a valid BlockNodeType, got ${JSON.stringify(w.nodeType)}.`, { field: "within.nodeType", value: w.nodeType });
14280
+ }
14281
+ if (typeof w.nodeId !== "string" || w.nodeId === "") {
14282
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.list within.nodeId must be a non-empty string.", {
14283
+ field: "within.nodeId",
14284
+ value: w.nodeId
14285
+ });
14286
+ }
14287
+ }
14288
+ }
13965
14289
  return adapter.list(query2);
13966
14290
  }
13967
14291
  function executeListsGet(adapter, input) {
14292
+ validateListInput(input, "lists.get");
14293
+ validateListItemAddress(input.address, "address", "lists.get");
13968
14294
  return adapter.get(input);
13969
14295
  }
13970
14296
  function executeListsInsert(adapter, input, options) {
13971
- validateListTarget(input, "lists.insert");
14297
+ validateListItemTarget(input, "lists.insert");
14298
+ requireEnum(input.position, "position", VALID_INSERT_POSITIONS, "lists.insert");
14299
+ if (input.text !== undefined && typeof input.text !== "string") {
14300
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.insert text must be a string if provided, got ${typeof input.text}.`, {
14301
+ field: "text",
14302
+ value: input.text
14303
+ });
14304
+ }
13972
14305
  return adapter.insert(input, normalizeMutationOptions(options));
13973
14306
  }
13974
14307
  function executeListsIndent(adapter, input, options) {
13975
- validateListTarget(input, "lists.indent");
14308
+ validateListItemTarget(input, "lists.indent");
13976
14309
  return adapter.indent(input, normalizeMutationOptions(options));
13977
14310
  }
13978
14311
  function executeListsOutdent(adapter, input, options) {
13979
- validateListTarget(input, "lists.outdent");
14312
+ validateListItemTarget(input, "lists.outdent");
13980
14313
  return adapter.outdent(input, normalizeMutationOptions(options));
13981
14314
  }
13982
14315
  function executeListsCreate(adapter, input, options) {
14316
+ validateListInput(input, "lists.create");
14317
+ const raw = input;
14318
+ if (!VALID_LIST_CREATE_MODES.has(raw.mode)) {
14319
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.create mode must be "empty" or "fromParagraphs", got ${JSON.stringify(raw.mode)}.`, { field: "mode", value: raw.mode });
14320
+ }
14321
+ if (raw.mode === "empty") {
14322
+ validateBlockAddress(raw.at, "at", "lists.create");
14323
+ }
14324
+ if (raw.mode === "fromParagraphs") {
14325
+ if (raw.target === undefined || raw.target === null) {
14326
+ throw new DocumentApiValidationError("INVALID_TARGET", 'lists.create with mode "fromParagraphs" requires a target.', { field: "target" });
14327
+ }
14328
+ validateBlockAddressOrRange(raw.target, "target", "lists.create");
14329
+ }
14330
+ validateListsCreateFields(raw);
13983
14331
  return adapter.create(input, normalizeMutationOptions(options));
13984
14332
  }
13985
14333
  function executeListsAttach(adapter, input, options) {
13986
- validateListTarget(input, "lists.attach");
14334
+ validateListInput(input, "lists.attach");
14335
+ validateBlockAddressOrRange(input.target, "target", "lists.attach");
14336
+ validateListItemAddress(input.attachTo, "attachTo", "lists.attach");
14337
+ optionalInteger(input.level, "level", "lists.attach");
13987
14338
  return adapter.attach(input, normalizeMutationOptions(options));
13988
14339
  }
13989
14340
  function executeListsDetach(adapter, input, options) {
13990
- validateListTarget(input, "lists.detach");
14341
+ validateListItemTarget(input, "lists.detach");
13991
14342
  return adapter.detach(input, normalizeMutationOptions(options));
13992
14343
  }
13993
14344
  function executeListsJoin(adapter, input, options) {
13994
- validateListTarget(input, "lists.join");
14345
+ validateListItemTarget(input, "lists.join");
14346
+ requireEnum(input.direction, "direction", VALID_JOIN_DIRECTIONS, "lists.join");
13995
14347
  return adapter.join(input, normalizeMutationOptions(options));
13996
14348
  }
13997
14349
  function executeListsCanJoin(adapter, input) {
13998
- validateListTarget(input, "lists.canJoin");
14350
+ validateListItemTarget(input, "lists.canJoin");
14351
+ requireEnum(input.direction, "direction", VALID_JOIN_DIRECTIONS, "lists.canJoin");
13999
14352
  return adapter.canJoin(input);
14000
14353
  }
14001
14354
  function executeListsSeparate(adapter, input, options) {
14002
- validateListTarget(input, "lists.separate");
14355
+ validateListItemTarget(input, "lists.separate");
14356
+ optionalBoolean(input.copyOverrides, "copyOverrides", "lists.separate");
14003
14357
  return adapter.separate(input, normalizeMutationOptions(options));
14004
14358
  }
14005
14359
  function executeListsSetLevel(adapter, input, options) {
14006
- validateListTarget(input, "lists.setLevel");
14360
+ validateListItemTarget(input, "lists.setLevel");
14361
+ requireLevel(input.level, "lists.setLevel");
14007
14362
  return adapter.setLevel(input, normalizeMutationOptions(options));
14008
14363
  }
14009
14364
  function executeListsSetValue(adapter, input, options) {
14010
- validateListTarget(input, "lists.setValue");
14365
+ validateListItemTarget(input, "lists.setValue");
14366
+ if (input.value !== null && !isInteger(input.value)) {
14367
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.setValue value must be an integer or null, got ${JSON.stringify(input.value)}.`, { field: "value", value: input.value });
14368
+ }
14011
14369
  return adapter.setValue(input, normalizeMutationOptions(options));
14012
14370
  }
14013
14371
  function executeListsContinuePrevious(adapter, input, options) {
14014
- validateListTarget(input, "lists.continuePrevious");
14372
+ validateListItemTarget(input, "lists.continuePrevious");
14015
14373
  return adapter.continuePrevious(input, normalizeMutationOptions(options));
14016
14374
  }
14017
14375
  function executeListsCanContinuePrevious(adapter, input) {
14018
- validateListTarget(input, "lists.canContinuePrevious");
14376
+ validateListItemTarget(input, "lists.canContinuePrevious");
14019
14377
  return adapter.canContinuePrevious(input);
14020
14378
  }
14021
14379
  function executeListsSetLevelRestart(adapter, input, options) {
14022
- validateListTarget(input, "lists.setLevelRestart");
14380
+ validateListItemTarget(input, "lists.setLevelRestart");
14381
+ requireLevel(input.level, "lists.setLevelRestart");
14382
+ if (input.restartAfterLevel !== null && !isInteger(input.restartAfterLevel)) {
14383
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.setLevelRestart restartAfterLevel must be an integer or null.`, { field: "restartAfterLevel", value: input.restartAfterLevel });
14384
+ }
14385
+ if (input.scope !== undefined) {
14386
+ requireEnum(input.scope, "scope", VALID_MUTATION_SCOPES, "lists.setLevelRestart");
14387
+ }
14023
14388
  return adapter.setLevelRestart(input, normalizeMutationOptions(options));
14024
14389
  }
14025
14390
  function executeListsConvertToText(adapter, input, options) {
14026
- validateListTarget(input, "lists.convertToText");
14391
+ validateListItemTarget(input, "lists.convertToText");
14392
+ optionalBoolean(input.includeMarker, "includeMarker", "lists.convertToText");
14027
14393
  return adapter.convertToText(input, normalizeMutationOptions(options));
14028
14394
  }
14029
14395
  function executeListsApplyTemplate(adapter, input, options) {
14030
- validateListTarget(input, "lists.applyTemplate");
14396
+ validateListItemTarget(input, "lists.applyTemplate");
14397
+ validateListTemplate(input.template, "template", "lists.applyTemplate");
14398
+ optionalLevelsArray(input.levels, "levels", "lists.applyTemplate");
14031
14399
  return adapter.applyTemplate(input, normalizeMutationOptions(options));
14032
14400
  }
14033
14401
  function executeListsApplyPreset(adapter, input, options) {
14034
- validateListTarget(input, "lists.applyPreset");
14402
+ validateListItemTarget(input, "lists.applyPreset");
14403
+ requireEnum(input.preset, "preset", VALID_LIST_PRESETS, "lists.applyPreset");
14404
+ optionalLevelsArray(input.levels, "levels", "lists.applyPreset");
14035
14405
  return adapter.applyPreset(input, normalizeMutationOptions(options));
14036
14406
  }
14037
14407
  function executeListsCaptureTemplate(adapter, input) {
14038
- validateListTarget(input, "lists.captureTemplate");
14408
+ validateListItemTarget(input, "lists.captureTemplate");
14409
+ optionalLevelsArray(input.levels, "levels", "lists.captureTemplate");
14039
14410
  return adapter.captureTemplate(input);
14040
14411
  }
14041
14412
  function executeListsSetLevelNumbering(adapter, input, options) {
14042
- validateListTarget(input, "lists.setLevelNumbering");
14413
+ validateListItemTarget(input, "lists.setLevelNumbering");
14414
+ requireLevel(input.level, "lists.setLevelNumbering");
14415
+ if (typeof input.numFmt !== "string") {
14416
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelNumbering numFmt must be a string.", {
14417
+ field: "numFmt",
14418
+ value: input.numFmt
14419
+ });
14420
+ }
14421
+ if (typeof input.lvlText !== "string") {
14422
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelNumbering lvlText must be a string.", {
14423
+ field: "lvlText",
14424
+ value: input.lvlText
14425
+ });
14426
+ }
14427
+ optionalInteger(input.start, "start", "lists.setLevelNumbering");
14043
14428
  return adapter.setLevelNumbering(input, normalizeMutationOptions(options));
14044
14429
  }
14045
14430
  function executeListsSetLevelBullet(adapter, input, options) {
14046
- validateListTarget(input, "lists.setLevelBullet");
14431
+ validateListItemTarget(input, "lists.setLevelBullet");
14432
+ requireLevel(input.level, "lists.setLevelBullet");
14433
+ if (typeof input.markerText !== "string") {
14434
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelBullet markerText must be a string.", {
14435
+ field: "markerText",
14436
+ value: input.markerText
14437
+ });
14438
+ }
14047
14439
  return adapter.setLevelBullet(input, normalizeMutationOptions(options));
14048
14440
  }
14049
14441
  function executeListsSetLevelPictureBullet(adapter, input, options) {
14050
- validateListTarget(input, "lists.setLevelPictureBullet");
14442
+ validateListItemTarget(input, "lists.setLevelPictureBullet");
14443
+ requireLevel(input.level, "lists.setLevelPictureBullet");
14444
+ if (!isInteger(input.pictureBulletId)) {
14445
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelPictureBullet pictureBulletId must be an integer.", { field: "pictureBulletId", value: input.pictureBulletId });
14446
+ }
14051
14447
  return adapter.setLevelPictureBullet(input, normalizeMutationOptions(options));
14052
14448
  }
14053
14449
  function executeListsSetLevelAlignment(adapter, input, options) {
14054
- validateListTarget(input, "lists.setLevelAlignment");
14450
+ validateListItemTarget(input, "lists.setLevelAlignment");
14451
+ requireLevel(input.level, "lists.setLevelAlignment");
14452
+ requireEnum(input.alignment, "alignment", VALID_LEVEL_ALIGNMENTS, "lists.setLevelAlignment");
14055
14453
  return adapter.setLevelAlignment(input, normalizeMutationOptions(options));
14056
14454
  }
14057
14455
  function executeListsSetLevelIndents(adapter, input, options) {
14058
- validateListTarget(input, "lists.setLevelIndents");
14456
+ validateListItemTarget(input, "lists.setLevelIndents");
14457
+ requireLevel(input.level, "lists.setLevelIndents");
14458
+ optionalNumber(input.left, "left", "lists.setLevelIndents");
14459
+ optionalNumber(input.hanging, "hanging", "lists.setLevelIndents");
14460
+ optionalNumber(input.firstLine, "firstLine", "lists.setLevelIndents");
14059
14461
  return adapter.setLevelIndents(input, normalizeMutationOptions(options));
14060
14462
  }
14061
14463
  function executeListsSetLevelTrailingCharacter(adapter, input, options) {
14062
- validateListTarget(input, "lists.setLevelTrailingCharacter");
14464
+ validateListItemTarget(input, "lists.setLevelTrailingCharacter");
14465
+ requireLevel(input.level, "lists.setLevelTrailingCharacter");
14466
+ requireEnum(input.trailingCharacter, "trailingCharacter", VALID_TRAILING_CHARACTERS, "lists.setLevelTrailingCharacter");
14063
14467
  return adapter.setLevelTrailingCharacter(input, normalizeMutationOptions(options));
14064
14468
  }
14065
14469
  function executeListsSetLevelMarkerFont(adapter, input, options) {
14066
- validateListTarget(input, "lists.setLevelMarkerFont");
14470
+ validateListItemTarget(input, "lists.setLevelMarkerFont");
14471
+ requireLevel(input.level, "lists.setLevelMarkerFont");
14472
+ if (typeof input.fontFamily !== "string") {
14473
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelMarkerFont fontFamily must be a string.", {
14474
+ field: "fontFamily",
14475
+ value: input.fontFamily
14476
+ });
14477
+ }
14067
14478
  return adapter.setLevelMarkerFont(input, normalizeMutationOptions(options));
14068
14479
  }
14069
14480
  function executeListsClearLevelOverrides(adapter, input, options) {
14070
- validateListTarget(input, "lists.clearLevelOverrides");
14481
+ validateListItemTarget(input, "lists.clearLevelOverrides");
14482
+ requireLevel(input.level, "lists.clearLevelOverrides");
14071
14483
  return adapter.clearLevelOverrides(input, normalizeMutationOptions(options));
14072
14484
  }
14073
14485
  function executeListsSetType(adapter, input, options) {
14074
- validateListTarget(input, "lists.setType");
14486
+ validateListItemTarget(input, "lists.setType");
14487
+ requireEnum(input.kind, "kind", VALID_LIST_KINDS, "lists.setType");
14488
+ if (input.continuity !== undefined) {
14489
+ requireEnum(input.continuity, "continuity", VALID_CONTINUITY_VALUES, "lists.setType");
14490
+ }
14075
14491
  return adapter.setType(input, normalizeMutationOptions(options));
14076
14492
  }
14077
14493
  function executeListsGetStyle(adapter, input) {
14078
- validateListTarget(input, "lists.getStyle");
14494
+ validateListItemTarget(input, "lists.getStyle");
14495
+ optionalLevelsArray(input.levels, "levels", "lists.getStyle");
14079
14496
  return adapter.getStyle(input);
14080
14497
  }
14081
14498
  function executeListsApplyStyle(adapter, input, options) {
14082
- validateListTarget(input, "lists.applyStyle");
14499
+ validateListItemTarget(input, "lists.applyStyle");
14500
+ validateListTemplate(input.style, "style", "lists.applyStyle");
14501
+ optionalLevelsArray(input.levels, "levels", "lists.applyStyle");
14083
14502
  return adapter.applyStyle(input, normalizeMutationOptions(options));
14084
14503
  }
14085
14504
  function executeListsRestartAt(adapter, input, options) {
14086
- validateListTarget(input, "lists.restartAt");
14505
+ validateListItemTarget(input, "lists.restartAt");
14506
+ if (!isInteger(input.startAt)) {
14507
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.restartAt startAt must be an integer, got ${JSON.stringify(input.startAt)}.`, { field: "startAt", value: input.startAt });
14508
+ }
14087
14509
  return adapter.restartAt(input, normalizeMutationOptions(options));
14088
14510
  }
14089
14511
  function executeListsSetLevelNumberStyle(adapter, input, options) {
14090
- validateListTarget(input, "lists.setLevelNumberStyle");
14512
+ validateListItemTarget(input, "lists.setLevelNumberStyle");
14513
+ requireLevel(input.level, "lists.setLevelNumberStyle");
14514
+ if (typeof input.numberStyle !== "string") {
14515
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelNumberStyle numberStyle must be a string.", {
14516
+ field: "numberStyle",
14517
+ value: input.numberStyle
14518
+ });
14519
+ }
14091
14520
  return adapter.setLevelNumberStyle(input, normalizeMutationOptions(options));
14092
14521
  }
14093
14522
  function executeListsSetLevelText(adapter, input, options) {
14094
- validateListTarget(input, "lists.setLevelText");
14523
+ validateListItemTarget(input, "lists.setLevelText");
14524
+ requireLevel(input.level, "lists.setLevelText");
14525
+ if (typeof input.text !== "string") {
14526
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelText text must be a string.", {
14527
+ field: "text",
14528
+ value: input.text
14529
+ });
14530
+ }
14095
14531
  return adapter.setLevelText(input, normalizeMutationOptions(options));
14096
14532
  }
14097
14533
  function executeListsSetLevelStart(adapter, input, options) {
14098
- validateListTarget(input, "lists.setLevelStart");
14534
+ validateListItemTarget(input, "lists.setLevelStart");
14535
+ requireLevel(input.level, "lists.setLevelStart");
14536
+ if (!isInteger(input.startAt)) {
14537
+ throw new DocumentApiValidationError("INVALID_INPUT", `lists.setLevelStart startAt must be an integer, got ${JSON.stringify(input.startAt)}.`, { field: "startAt", value: input.startAt });
14538
+ }
14099
14539
  return adapter.setLevelStart(input, normalizeMutationOptions(options));
14100
14540
  }
14101
14541
  function executeListsSetLevelLayout(adapter, input, options) {
14102
- validateListTarget(input, "lists.setLevelLayout");
14542
+ validateListItemTarget(input, "lists.setLevelLayout");
14543
+ requireLevel(input.level, "lists.setLevelLayout");
14544
+ if (!isRecord(input.layout)) {
14545
+ throw new DocumentApiValidationError("INVALID_INPUT", "lists.setLevelLayout layout must be an object.", {
14546
+ field: "layout",
14547
+ value: input.layout
14548
+ });
14549
+ }
14550
+ const layout = input.layout;
14551
+ if (layout.alignment !== undefined) {
14552
+ requireEnum(layout.alignment, "layout.alignment", VALID_LEVEL_ALIGNMENTS, "lists.setLevelLayout");
14553
+ }
14554
+ if (layout.followCharacter !== undefined) {
14555
+ requireEnum(layout.followCharacter, "layout.followCharacter", VALID_TRAILING_CHARACTERS, "lists.setLevelLayout");
14556
+ }
14557
+ optionalNumber(layout.alignedAt, "layout.alignedAt", "lists.setLevelLayout");
14558
+ optionalNumber(layout.textIndentAt, "layout.textIndentAt", "lists.setLevelLayout");
14559
+ if (layout.tabStopAt !== undefined && layout.tabStopAt !== null) {
14560
+ optionalNumber(layout.tabStopAt, "layout.tabStopAt", "lists.setLevelLayout");
14561
+ }
14103
14562
  return adapter.setLevelLayout(input, normalizeMutationOptions(options));
14104
14563
  }
14564
+ var VALID_BLOCK_NODE_TYPES, VALID_LIST_KINDS, VALID_INSERT_POSITIONS, VALID_JOIN_DIRECTIONS, VALID_MUTATION_SCOPES, VALID_LEVEL_ALIGNMENTS, VALID_TRAILING_CHARACTERS, VALID_LIST_PRESETS, VALID_CONTINUITY_VALUES, VALID_SEQUENCE_MODES, VALID_LIST_CREATE_MODES;
14105
14565
  var init_lists = __esm(() => {
14106
14566
  init_errors2();
14567
+ init_validation_primitives();
14568
+ init_base();
14569
+ init_lists_types();
14570
+ VALID_BLOCK_NODE_TYPES = new Set(BLOCK_NODE_TYPES);
14571
+ VALID_LIST_KINDS = new Set(LIST_KINDS);
14572
+ VALID_INSERT_POSITIONS = new Set(LIST_INSERT_POSITIONS);
14573
+ VALID_JOIN_DIRECTIONS = new Set(JOIN_DIRECTIONS);
14574
+ VALID_MUTATION_SCOPES = new Set(MUTATION_SCOPES);
14575
+ VALID_LEVEL_ALIGNMENTS = new Set(LEVEL_ALIGNMENTS);
14576
+ VALID_TRAILING_CHARACTERS = new Set(TRAILING_CHARACTERS);
14577
+ VALID_LIST_PRESETS = new Set(LIST_PRESET_IDS);
14578
+ VALID_CONTINUITY_VALUES = new Set(["preserve", "none"]);
14579
+ VALID_SEQUENCE_MODES = new Set(["new", "continuePrevious"]);
14580
+ VALID_LIST_CREATE_MODES = new Set(["empty", "fromParagraphs"]);
14107
14581
  });
14108
14582
 
14109
14583
  // ../../packages/document-api/src/replace/replace.ts
@@ -14281,16 +14755,36 @@ function validateCreateSectionBreakInput(input) {
14281
14755
  }
14282
14756
  }
14283
14757
  function executeCreateParagraph(adapter, input, options) {
14758
+ if (!isRecord(input)) {
14759
+ throw new DocumentApiValidationError("INVALID_INPUT", "create.paragraph input must be a non-null object.");
14760
+ }
14761
+ validateStoryLocator(input.in, "in");
14284
14762
  const at = normalizeCreateLocation(input.at, (loc) => validateTargetOnlyCreateLocation(loc, "create.paragraph"));
14285
14763
  const normalized = { at, text: input.text ?? "" };
14286
14764
  return adapter.paragraph(normalized, normalizeMutationOptions(options));
14287
14765
  }
14288
14766
  function executeCreateHeading(adapter, input, options) {
14767
+ if (!isRecord(input)) {
14768
+ throw new DocumentApiValidationError("INVALID_INPUT", "create.heading input must be a non-null object.");
14769
+ }
14770
+ validateStoryLocator(input.in, "in");
14771
+ if (!isInteger(input.level) || !VALID_HEADING_LEVELS.has(input.level)) {
14772
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.heading level must be an integer 1–6, got ${JSON.stringify(input.level)}.`, { field: "level", value: input.level });
14773
+ }
14289
14774
  const at = normalizeCreateLocation(input.at, (loc) => validateTargetOnlyCreateLocation(loc, "create.heading"));
14290
14775
  const normalized = { level: input.level, at, text: input.text ?? "" };
14291
14776
  return adapter.heading(normalized, normalizeMutationOptions(options));
14292
14777
  }
14293
14778
  function executeCreateTable(adapter, input, options) {
14779
+ if (!isRecord(input)) {
14780
+ throw new DocumentApiValidationError("INVALID_INPUT", "create.table input must be a non-null object.");
14781
+ }
14782
+ if (!isInteger(input.rows) || input.rows < 1) {
14783
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.table rows must be a positive integer, got ${JSON.stringify(input.rows)}.`, { field: "rows", value: input.rows });
14784
+ }
14785
+ if (!isInteger(input.columns) || input.columns < 1) {
14786
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.table columns must be a positive integer, got ${JSON.stringify(input.columns)}.`, { field: "columns", value: input.columns });
14787
+ }
14294
14788
  const at = normalizeCreateLocation(input.at, (loc) => validateTargetOrNodeIdCreateLocation(loc, "create.table"));
14295
14789
  const normalized = { rows: input.rows, columns: input.columns, at };
14296
14790
  return adapter.table(normalized, normalizeMutationOptions(options));
@@ -14316,9 +14810,12 @@ function executeCreateTableOfContents(adapter, input, options) {
14316
14810
  const normalized = { at, config: input.config };
14317
14811
  return adapter.tableOfContents(normalized, normalizeMutationOptions(options));
14318
14812
  }
14319
- var SECTION_BREAK_TYPES;
14813
+ var VALID_HEADING_LEVELS, SECTION_BREAK_TYPES;
14320
14814
  var init_create = __esm(() => {
14321
14815
  init_errors2();
14816
+ init_validation_primitives();
14817
+ init_story_validator();
14818
+ VALID_HEADING_LEVELS = new Set([1, 2, 3, 4, 5, 6]);
14322
14819
  SECTION_BREAK_TYPES = ["continuous", "nextPage", "evenPage", "oddPage"];
14323
14820
  });
14324
14821
 
@@ -14343,7 +14840,7 @@ function validateBlocksListInput(input) {
14343
14840
  });
14344
14841
  }
14345
14842
  for (const nt of input.nodeTypes) {
14346
- if (!VALID_BLOCK_NODE_TYPES.has(nt)) {
14843
+ if (!VALID_BLOCK_NODE_TYPES2.has(nt)) {
14347
14844
  throw new DocumentApiValidationError("INVALID_INPUT", `blocks.list nodeTypes contains unknown type "${nt}".`, {
14348
14845
  fields: ["nodeTypes"],
14349
14846
  nodeType: nt
@@ -14428,13 +14925,13 @@ function executeBlocksDeleteRange(adapter, input, options) {
14428
14925
  validateBlocksDeleteRangeInput(input);
14429
14926
  return adapter.deleteRange(input, normalizeMutationOptions(options));
14430
14927
  }
14431
- var SUPPORTED_DELETE_NODE_TYPES, REJECTED_DELETE_NODE_TYPES, VALID_BLOCK_NODE_TYPES;
14928
+ var SUPPORTED_DELETE_NODE_TYPES, REJECTED_DELETE_NODE_TYPES, VALID_BLOCK_NODE_TYPES2;
14432
14929
  var init_blocks = __esm(() => {
14433
14930
  init_base();
14434
14931
  init_errors2();
14435
14932
  SUPPORTED_DELETE_NODE_TYPES = new Set(DELETABLE_BLOCK_NODE_TYPES);
14436
14933
  REJECTED_DELETE_NODE_TYPES = new Set(["tableRow", "tableCell"]);
14437
- VALID_BLOCK_NODE_TYPES = new Set(BLOCK_NODE_TYPES);
14934
+ VALID_BLOCK_NODE_TYPES2 = new Set(BLOCK_NODE_TYPES);
14438
14935
  });
14439
14936
 
14440
14937
  // ../../packages/document-api/src/track-changes/track-changes.ts
@@ -14442,6 +14939,19 @@ function executeTrackChangesList(adapter, input) {
14442
14939
  return adapter.list(input);
14443
14940
  }
14444
14941
  function executeTrackChangesGet(adapter, input) {
14942
+ const raw = input;
14943
+ if (typeof raw !== "object" || raw == null) {
14944
+ throw new DocumentApiValidationError("INVALID_INPUT", "trackChanges.get input must be a non-null object.", {
14945
+ value: raw
14946
+ });
14947
+ }
14948
+ const { id } = raw;
14949
+ if (typeof id !== "string" || id.length === 0) {
14950
+ throw new DocumentApiValidationError("INVALID_INPUT", "trackChanges.get id must be a non-empty string.", {
14951
+ field: "id",
14952
+ value: id
14953
+ });
14954
+ }
14445
14955
  return adapter.get(input);
14446
14956
  }
14447
14957
  function executeTrackChangesDecide(adapter, rawInput, options) {
@@ -15838,11 +16348,13 @@ function executeImagesRemoveCaption(adapter, input, options) {
15838
16348
  }
15839
16349
  function executeCreateImage(adapter, input, options) {
15840
16350
  requireString(input?.src, "src");
16351
+ validateStoryLocator(input?.in, "in");
15841
16352
  return adapter.image(input, options);
15842
16353
  }
15843
16354
  var VALID_WRAP_TYPES, VALID_WRAP_SIDES, VALID_IMAGE_SIZE_UNITS;
15844
16355
  var init_images = __esm(() => {
15845
16356
  init_errors2();
16357
+ init_story_validator();
15846
16358
  VALID_WRAP_TYPES = new Set(["Inline", "None", "Square", "Tight", "Through", "TopAndBottom"]);
15847
16359
  VALID_WRAP_SIDES = new Set(["bothSides", "left", "right", "largest"]);
15848
16360
  VALID_IMAGE_SIZE_UNITS = new Set(["px", "pt", "twip"]);
@@ -15882,26 +16394,39 @@ function validateInsertionTarget(target, operationName) {
15882
16394
  throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target.anchor must have nodeType 'paragraph' and a string nodeId.`, { target });
15883
16395
  }
15884
16396
  }
16397
+ function validateTocInput(input, operationName) {
16398
+ if (!isRecord(input)) {
16399
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} input must be a non-null object.`);
16400
+ }
16401
+ }
15885
16402
  function executeTocList(adapter, query2) {
15886
16403
  return adapter.list(query2);
15887
16404
  }
15888
16405
  function executeTocGet(adapter, input) {
16406
+ validateTocInput(input, "toc.get");
15889
16407
  validateTocTarget(input.target, "toc.get");
15890
16408
  return adapter.get(input);
15891
16409
  }
15892
16410
  function executeTocConfigure(adapter, input, options) {
16411
+ validateTocInput(input, "toc.configure");
15893
16412
  validateTocTarget(input.target, "toc.configure");
15894
16413
  return adapter.configure(input, normalizeMutationOptions(options));
15895
16414
  }
15896
16415
  function executeTocUpdate(adapter, input, options) {
16416
+ validateTocInput(input, "toc.update");
15897
16417
  validateTocTarget(input.target, "toc.update");
16418
+ if (input.mode !== undefined && !VALID_TOC_UPDATE_MODES.has(input.mode)) {
16419
+ throw new DocumentApiValidationError("INVALID_INPUT", `toc.update mode must be "all" or "pageNumbers", got "${String(input.mode)}".`, { field: "mode", value: input.mode });
16420
+ }
15898
16421
  return adapter.update(input, normalizeMutationOptions(options));
15899
16422
  }
15900
16423
  function executeTocRemove(adapter, input, options) {
16424
+ validateTocInput(input, "toc.remove");
15901
16425
  validateTocTarget(input.target, "toc.remove");
15902
16426
  return adapter.remove(input, normalizeMutationOptions(options));
15903
16427
  }
15904
16428
  function executeTocMarkEntry(adapter, input, options) {
16429
+ validateTocInput(input, "toc.markEntry");
15905
16430
  validateInsertionTarget(input.target, "toc.markEntry");
15906
16431
  if (!input.text || typeof input.text !== "string") {
15907
16432
  throw new DocumentApiValidationError("INVALID_INPUT", "toc.markEntry requires a non-empty text string.");
@@ -15909,6 +16434,7 @@ function executeTocMarkEntry(adapter, input, options) {
15909
16434
  return adapter.markEntry(input, normalizeMutationOptions(options));
15910
16435
  }
15911
16436
  function executeTocUnmarkEntry(adapter, input, options) {
16437
+ validateTocInput(input, "toc.unmarkEntry");
15912
16438
  validateTocEntryTarget(input.target, "toc.unmarkEntry");
15913
16439
  return adapter.unmarkEntry(input, normalizeMutationOptions(options));
15914
16440
  }
@@ -15916,15 +16442,63 @@ function executeTocListEntries(adapter, query2) {
15916
16442
  return adapter.listEntries(query2);
15917
16443
  }
15918
16444
  function executeTocGetEntry(adapter, input) {
16445
+ validateTocInput(input, "toc.getEntry");
15919
16446
  validateTocEntryTarget(input.target, "toc.getEntry");
15920
16447
  return adapter.getEntry(input);
15921
16448
  }
16449
+ function validateTocEditEntryPatch(patch, operationName) {
16450
+ if (!isRecord(patch)) {
16451
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} patch must be a non-null object.`, {
16452
+ field: "patch",
16453
+ value: patch
16454
+ });
16455
+ }
16456
+ for (const key of Object.keys(patch)) {
16457
+ if (!EDIT_ENTRY_PATCH_ALLOWED_KEYS.has(key)) {
16458
+ throw new DocumentApiValidationError("INVALID_INPUT", `Unknown field "${key}" on ${operationName} patch. Allowed fields: ${[...EDIT_ENTRY_PATCH_ALLOWED_KEYS].join(", ")}.`, { field: `patch.${key}` });
16459
+ }
16460
+ }
16461
+ if (patch.text !== undefined && typeof patch.text !== "string") {
16462
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} patch.text must be a string.`, {
16463
+ field: "patch.text",
16464
+ value: patch.text
16465
+ });
16466
+ }
16467
+ if (patch.level !== undefined) {
16468
+ if (typeof patch.level !== "number" || !Number.isInteger(patch.level) || patch.level < 1) {
16469
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} patch.level must be a positive integer.`, { field: "patch.level", value: patch.level });
16470
+ }
16471
+ }
16472
+ if (patch.tableIdentifier !== undefined && typeof patch.tableIdentifier !== "string") {
16473
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} patch.tableIdentifier must be a string.`, {
16474
+ field: "patch.tableIdentifier",
16475
+ value: patch.tableIdentifier
16476
+ });
16477
+ }
16478
+ if (patch.omitPageNumber !== undefined && typeof patch.omitPageNumber !== "boolean") {
16479
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} patch.omitPageNumber must be a boolean.`, {
16480
+ field: "patch.omitPageNumber",
16481
+ value: patch.omitPageNumber
16482
+ });
16483
+ }
16484
+ }
15922
16485
  function executeTocEditEntry(adapter, input, options) {
16486
+ validateTocInput(input, "toc.editEntry");
15923
16487
  validateTocEntryTarget(input.target, "toc.editEntry");
16488
+ validateTocEditEntryPatch(input.patch, "toc.editEntry");
15924
16489
  return adapter.editEntry(input, normalizeMutationOptions(options));
15925
16490
  }
16491
+ var VALID_TOC_UPDATE_MODES, EDIT_ENTRY_PATCH_ALLOWED_KEYS;
15926
16492
  var init_toc = __esm(() => {
15927
16493
  init_errors2();
16494
+ init_validation_primitives();
16495
+ VALID_TOC_UPDATE_MODES = new Set(["all", "pageNumbers"]);
16496
+ EDIT_ENTRY_PATCH_ALLOWED_KEYS = new Set([
16497
+ "text",
16498
+ "level",
16499
+ "tableIdentifier",
16500
+ "omitPageNumber"
16501
+ ]);
15928
16502
  });
15929
16503
 
15930
16504
  // ../../packages/document-api/src/hyperlinks/hyperlinks.ts
@@ -16037,172 +16611,480 @@ var init_hyperlinks = __esm(() => {
16037
16611
  PATCH_FIELDS = new Set(["href", "anchor", "docLocation", "tooltip", "target", "rel"]);
16038
16612
  });
16039
16613
 
16614
+ // ../../packages/document-api/src/content-controls/content-controls.types.ts
16615
+ var CONTENT_CONTROL_TYPES, LOCK_MODES, CONTENT_CONTROL_APPEARANCES;
16616
+ var init_content_controls_types = __esm(() => {
16617
+ CONTENT_CONTROL_TYPES = [
16618
+ "text",
16619
+ "date",
16620
+ "checkbox",
16621
+ "comboBox",
16622
+ "dropDownList",
16623
+ "repeatingSection",
16624
+ "repeatingSectionItem",
16625
+ "group",
16626
+ "unknown"
16627
+ ];
16628
+ LOCK_MODES = [
16629
+ "unlocked",
16630
+ "sdtLocked",
16631
+ "contentLocked",
16632
+ "sdtContentLocked"
16633
+ ];
16634
+ CONTENT_CONTROL_APPEARANCES = [
16635
+ "boundingBox",
16636
+ "tags",
16637
+ "hidden"
16638
+ ];
16639
+ });
16640
+
16040
16641
  // ../../packages/document-api/src/content-controls/content-controls.ts
16642
+ function validateCCInput(input, operationName) {
16643
+ if (!isRecord(input)) {
16644
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} input must be a non-null object.`);
16645
+ }
16646
+ }
16647
+ function validateCCTarget(target, operationName) {
16648
+ if (!isRecord(target)) {
16649
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a valid target with { kind, nodeType: 'sdt', nodeId }.`, { field: "target", value: target });
16650
+ }
16651
+ if (!VALID_NODE_KINDS.has(target.kind)) {
16652
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target.kind must be 'block' or 'inline', got "${String(target.kind)}".`, { field: "target.kind", value: target.kind });
16653
+ }
16654
+ if (target.nodeType !== "sdt") {
16655
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target.nodeType must be 'sdt', got "${String(target.nodeType)}".`, { field: "target.nodeType", value: target.nodeType });
16656
+ }
16657
+ if (typeof target.nodeId !== "string" || target.nodeId === "") {
16658
+ throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target.nodeId must be a non-empty string.`, { field: "target.nodeId", value: target.nodeId });
16659
+ }
16660
+ }
16661
+ function requireString2(value, field, operationName) {
16662
+ if (typeof value !== "string" || value.length === 0) {
16663
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be a non-empty string.`, {
16664
+ field,
16665
+ value
16666
+ });
16667
+ }
16668
+ }
16669
+ function requireBoolean(value, field, operationName) {
16670
+ if (typeof value !== "boolean") {
16671
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be a boolean, got ${typeof value}.`, { field, value });
16672
+ }
16673
+ }
16674
+ function requireIndex(value, field, operationName) {
16675
+ if (!isInteger(value) || value < 0) {
16676
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be a non-negative integer.`, {
16677
+ field,
16678
+ value
16679
+ });
16680
+ }
16681
+ }
16682
+ function requireNodeKind(value, field, operationName) {
16683
+ if (!VALID_NODE_KINDS.has(value)) {
16684
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be 'block' or 'inline', got "${String(value)}".`, { field, value });
16685
+ }
16686
+ }
16687
+ function validateContentFormat(value, field, operationName) {
16688
+ if (value !== undefined && !VALID_CONTENT_FORMATS.has(value)) {
16689
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be 'text' or 'html', got "${String(value)}".`, { field, value });
16690
+ }
16691
+ }
16692
+ function validateContentPayload(input, operationName) {
16693
+ if (typeof input.content !== "string") {
16694
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} content must be a string.`, {
16695
+ field: "content",
16696
+ value: input.content
16697
+ });
16698
+ }
16699
+ validateContentFormat(input.format, "format", operationName);
16700
+ }
16701
+ function validateSymbol(value, field, operationName) {
16702
+ if (!isRecord(value) || typeof value.font !== "string" || typeof value.char !== "string") {
16703
+ throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} ${field} must be { font: string, char: string }.`, { field, value });
16704
+ }
16705
+ }
16041
16706
  function executeContentControlsList(adapter, query2) {
16707
+ if (query2 !== undefined && !isRecord(query2)) {
16708
+ throw new DocumentApiValidationError("INVALID_INPUT", "contentControls.list query must be an object if provided.");
16709
+ }
16042
16710
  return adapter.list(query2);
16043
16711
  }
16044
16712
  function executeContentControlsGet(adapter, input) {
16713
+ validateCCInput(input, "contentControls.get");
16714
+ validateCCTarget(input.target, "contentControls.get");
16045
16715
  return adapter.get(input);
16046
16716
  }
16047
16717
  function executeContentControlsListInRange(adapter, input) {
16718
+ validateCCInput(input, "contentControls.listInRange");
16719
+ requireString2(input.startBlockId, "startBlockId", "contentControls.listInRange");
16720
+ requireString2(input.endBlockId, "endBlockId", "contentControls.listInRange");
16048
16721
  return adapter.listInRange(input);
16049
16722
  }
16050
16723
  function executeContentControlsSelectByTag(adapter, input) {
16724
+ validateCCInput(input, "contentControls.selectByTag");
16725
+ requireString2(input.tag, "tag", "contentControls.selectByTag");
16051
16726
  return adapter.selectByTag(input);
16052
16727
  }
16053
16728
  function executeContentControlsSelectByTitle(adapter, input) {
16729
+ validateCCInput(input, "contentControls.selectByTitle");
16730
+ requireString2(input.title, "title", "contentControls.selectByTitle");
16054
16731
  return adapter.selectByTitle(input);
16055
16732
  }
16056
16733
  function executeContentControlsListChildren(adapter, input) {
16734
+ validateCCInput(input, "contentControls.listChildren");
16735
+ validateCCTarget(input.target, "contentControls.listChildren");
16057
16736
  return adapter.listChildren(input);
16058
16737
  }
16059
16738
  function executeContentControlsGetParent(adapter, input) {
16739
+ validateCCInput(input, "contentControls.getParent");
16740
+ validateCCTarget(input.target, "contentControls.getParent");
16060
16741
  return adapter.getParent(input);
16061
16742
  }
16062
16743
  function executeContentControlsWrap(adapter, input, options) {
16744
+ validateCCInput(input, "contentControls.wrap");
16745
+ requireNodeKind(input.kind, "kind", "contentControls.wrap");
16746
+ validateCCTarget(input.target, "contentControls.wrap");
16063
16747
  return adapter.wrap(input, options);
16064
16748
  }
16065
16749
  function executeContentControlsUnwrap(adapter, input, options) {
16750
+ validateCCInput(input, "contentControls.unwrap");
16751
+ validateCCTarget(input.target, "contentControls.unwrap");
16066
16752
  return adapter.unwrap(input, options);
16067
16753
  }
16068
16754
  function executeContentControlsDelete(adapter, input, options) {
16755
+ validateCCInput(input, "contentControls.delete");
16756
+ validateCCTarget(input.target, "contentControls.delete");
16069
16757
  return adapter.delete(input, options);
16070
16758
  }
16071
16759
  function executeContentControlsCopy(adapter, input, options) {
16760
+ validateCCInput(input, "contentControls.copy");
16761
+ validateCCTarget(input.target, "contentControls.copy");
16762
+ validateCCTarget(input.destination, "contentControls.copy (destination)");
16072
16763
  return adapter.copy(input, options);
16073
16764
  }
16074
16765
  function executeContentControlsMove(adapter, input, options) {
16766
+ validateCCInput(input, "contentControls.move");
16767
+ validateCCTarget(input.target, "contentControls.move");
16768
+ validateCCTarget(input.destination, "contentControls.move (destination)");
16075
16769
  return adapter.move(input, options);
16076
16770
  }
16077
16771
  function executeContentControlsPatch(adapter, input, options) {
16772
+ validateCCInput(input, "contentControls.patch");
16773
+ validateCCTarget(input.target, "contentControls.patch");
16774
+ if (input.appearance !== undefined && input.appearance !== null && !VALID_CC_APPEARANCES.has(input.appearance)) {
16775
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patch appearance must be one of: ${[...VALID_CC_APPEARANCES].join(", ")}.`, { field: "appearance", value: input.appearance });
16776
+ }
16777
+ if (input.showingPlaceholder !== undefined && typeof input.showingPlaceholder !== "boolean") {
16778
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patch showingPlaceholder must be a boolean, got ${typeof input.showingPlaceholder}.`, { field: "showingPlaceholder", value: input.showingPlaceholder });
16779
+ }
16780
+ if (input.temporary !== undefined && typeof input.temporary !== "boolean") {
16781
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patch temporary must be a boolean, got ${typeof input.temporary}.`, { field: "temporary", value: input.temporary });
16782
+ }
16783
+ if (input.tabIndex !== undefined && input.tabIndex !== null && !isInteger(input.tabIndex)) {
16784
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patch tabIndex must be an integer or null, got ${typeof input.tabIndex}.`, { field: "tabIndex", value: input.tabIndex });
16785
+ }
16078
16786
  return adapter.patch(input, options);
16079
16787
  }
16080
16788
  function executeContentControlsSetLockMode(adapter, input, options) {
16789
+ validateCCInput(input, "contentControls.setLockMode");
16790
+ validateCCTarget(input.target, "contentControls.setLockMode");
16791
+ if (!VALID_LOCK_MODES.has(input.lockMode)) {
16792
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.setLockMode lockMode must be one of: ${[...VALID_LOCK_MODES].join(", ")}.`, { field: "lockMode", value: input.lockMode });
16793
+ }
16081
16794
  return adapter.setLockMode(input, options);
16082
16795
  }
16083
16796
  function executeContentControlsSetType(adapter, input, options) {
16797
+ validateCCInput(input, "contentControls.setType");
16798
+ validateCCTarget(input.target, "contentControls.setType");
16799
+ if (!VALID_CC_TYPES.has(input.controlType)) {
16800
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.setType controlType must be one of: ${[...VALID_CC_TYPES].join(", ")}.`, { field: "controlType", value: input.controlType });
16801
+ }
16084
16802
  return adapter.setType(input, options);
16085
16803
  }
16086
16804
  function executeContentControlsGetContent(adapter, input) {
16805
+ validateCCInput(input, "contentControls.getContent");
16806
+ validateCCTarget(input.target, "contentControls.getContent");
16087
16807
  return adapter.getContent(input);
16088
16808
  }
16089
16809
  function executeContentControlsReplaceContent(adapter, input, options) {
16810
+ validateCCInput(input, "contentControls.replaceContent");
16811
+ validateCCTarget(input.target, "contentControls.replaceContent");
16812
+ validateContentPayload(input, "contentControls.replaceContent");
16090
16813
  return adapter.replaceContent(input, options);
16091
16814
  }
16092
16815
  function executeContentControlsClearContent(adapter, input, options) {
16816
+ validateCCInput(input, "contentControls.clearContent");
16817
+ validateCCTarget(input.target, "contentControls.clearContent");
16093
16818
  return adapter.clearContent(input, options);
16094
16819
  }
16095
16820
  function executeContentControlsAppendContent(adapter, input, options) {
16821
+ validateCCInput(input, "contentControls.appendContent");
16822
+ validateCCTarget(input.target, "contentControls.appendContent");
16823
+ validateContentPayload(input, "contentControls.appendContent");
16096
16824
  return adapter.appendContent(input, options);
16097
16825
  }
16098
16826
  function executeContentControlsPrependContent(adapter, input, options) {
16827
+ validateCCInput(input, "contentControls.prependContent");
16828
+ validateCCTarget(input.target, "contentControls.prependContent");
16829
+ validateContentPayload(input, "contentControls.prependContent");
16099
16830
  return adapter.prependContent(input, options);
16100
16831
  }
16101
16832
  function executeContentControlsInsertBefore(adapter, input, options) {
16833
+ validateCCInput(input, "contentControls.insertBefore");
16834
+ validateCCTarget(input.target, "contentControls.insertBefore");
16835
+ validateContentPayload(input, "contentControls.insertBefore");
16102
16836
  return adapter.insertBefore(input, options);
16103
16837
  }
16104
16838
  function executeContentControlsInsertAfter(adapter, input, options) {
16839
+ validateCCInput(input, "contentControls.insertAfter");
16840
+ validateCCTarget(input.target, "contentControls.insertAfter");
16841
+ validateContentPayload(input, "contentControls.insertAfter");
16105
16842
  return adapter.insertAfter(input, options);
16106
16843
  }
16107
16844
  function executeContentControlsGetBinding(adapter, input) {
16845
+ validateCCInput(input, "contentControls.getBinding");
16846
+ validateCCTarget(input.target, "contentControls.getBinding");
16108
16847
  return adapter.getBinding(input);
16109
16848
  }
16110
16849
  function executeContentControlsSetBinding(adapter, input, options) {
16850
+ validateCCInput(input, "contentControls.setBinding");
16851
+ validateCCTarget(input.target, "contentControls.setBinding");
16852
+ requireString2(input.storeItemId, "storeItemId", "contentControls.setBinding");
16853
+ requireString2(input.xpath, "xpath", "contentControls.setBinding");
16111
16854
  return adapter.setBinding(input, options);
16112
16855
  }
16113
16856
  function executeContentControlsClearBinding(adapter, input, options) {
16857
+ validateCCInput(input, "contentControls.clearBinding");
16858
+ validateCCTarget(input.target, "contentControls.clearBinding");
16114
16859
  return adapter.clearBinding(input, options);
16115
16860
  }
16116
16861
  function executeContentControlsGetRawProperties(adapter, input) {
16862
+ validateCCInput(input, "contentControls.getRawProperties");
16863
+ validateCCTarget(input.target, "contentControls.getRawProperties");
16117
16864
  return adapter.getRawProperties(input);
16118
16865
  }
16119
16866
  function executeContentControlsPatchRawProperties(adapter, input, options) {
16867
+ validateCCInput(input, "contentControls.patchRawProperties");
16868
+ validateCCTarget(input.target, "contentControls.patchRawProperties");
16869
+ if (!Array.isArray(input.patches)) {
16870
+ throw new DocumentApiValidationError("INVALID_INPUT", "contentControls.patchRawProperties patches must be an array.", { field: "patches", value: input.patches });
16871
+ }
16872
+ for (let i = 0;i < input.patches.length; i++) {
16873
+ const patch = input.patches[i];
16874
+ if (!isRecord(patch)) {
16875
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patchRawProperties patches[${i}] must be an object.`, { field: `patches[${i}]`, value: patch });
16876
+ }
16877
+ if (!VALID_RAW_PATCH_OPS.has(patch.op)) {
16878
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patchRawProperties patches[${i}].op must be one of: ${[...VALID_RAW_PATCH_OPS].join(", ")}.`, { field: `patches[${i}].op`, value: patch.op });
16879
+ }
16880
+ if (typeof patch.name !== "string" || patch.name === "") {
16881
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.patchRawProperties patches[${i}].name must be a non-empty string.`, { field: `patches[${i}].name`, value: patch.name });
16882
+ }
16883
+ }
16120
16884
  return adapter.patchRawProperties(input, options);
16121
16885
  }
16122
16886
  function executeContentControlsValidateWordCompatibility(adapter, input) {
16887
+ validateCCInput(input, "contentControls.validateWordCompatibility");
16888
+ validateCCTarget(input.target, "contentControls.validateWordCompatibility");
16123
16889
  return adapter.validateWordCompatibility(input);
16124
16890
  }
16125
16891
  function executeContentControlsNormalizeWordCompatibility(adapter, input, options) {
16892
+ validateCCInput(input, "contentControls.normalizeWordCompatibility");
16893
+ validateCCTarget(input.target, "contentControls.normalizeWordCompatibility");
16126
16894
  return adapter.normalizeWordCompatibility(input, options);
16127
16895
  }
16128
16896
  function executeContentControlsNormalizeTagPayload(adapter, input, options) {
16897
+ validateCCInput(input, "contentControls.normalizeTagPayload");
16898
+ validateCCTarget(input.target, "contentControls.normalizeTagPayload");
16129
16899
  return adapter.normalizeTagPayload(input, options);
16130
16900
  }
16131
16901
  function executeContentControlsTextSetMultiline(adapter, input, options) {
16902
+ validateCCInput(input, "contentControls.text.setMultiline");
16903
+ validateCCTarget(input.target, "contentControls.text.setMultiline");
16904
+ requireBoolean(input.multiline, "multiline", "contentControls.text.setMultiline");
16132
16905
  return adapter.text.setMultiline(input, options);
16133
16906
  }
16134
16907
  function executeContentControlsTextSetValue(adapter, input, options) {
16908
+ validateCCInput(input, "contentControls.text.setValue");
16909
+ validateCCTarget(input.target, "contentControls.text.setValue");
16910
+ if (typeof input.value !== "string") {
16911
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.text.setValue value must be a string.`, {
16912
+ field: "value",
16913
+ value: input.value
16914
+ });
16915
+ }
16135
16916
  return adapter.text.setValue(input, options);
16136
16917
  }
16137
16918
  function executeContentControlsTextClearValue(adapter, input, options) {
16919
+ validateCCInput(input, "contentControls.text.clearValue");
16920
+ validateCCTarget(input.target, "contentControls.text.clearValue");
16138
16921
  return adapter.text.clearValue(input, options);
16139
16922
  }
16140
16923
  function executeContentControlsDateSetValue(adapter, input, options) {
16924
+ validateCCInput(input, "contentControls.date.setValue");
16925
+ validateCCTarget(input.target, "contentControls.date.setValue");
16926
+ if (typeof input.value !== "string") {
16927
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.date.setValue value must be a string.`, {
16928
+ field: "value",
16929
+ value: input.value
16930
+ });
16931
+ }
16141
16932
  return adapter.date.setValue(input, options);
16142
16933
  }
16143
16934
  function executeContentControlsDateClearValue(adapter, input, options) {
16935
+ validateCCInput(input, "contentControls.date.clearValue");
16936
+ validateCCTarget(input.target, "contentControls.date.clearValue");
16144
16937
  return adapter.date.clearValue(input, options);
16145
16938
  }
16146
16939
  function executeContentControlsDateSetDisplayFormat(adapter, input, options) {
16940
+ validateCCInput(input, "contentControls.date.setDisplayFormat");
16941
+ validateCCTarget(input.target, "contentControls.date.setDisplayFormat");
16942
+ requireString2(input.format, "format", "contentControls.date.setDisplayFormat");
16147
16943
  return adapter.date.setDisplayFormat(input, options);
16148
16944
  }
16149
16945
  function executeContentControlsDateSetDisplayLocale(adapter, input, options) {
16946
+ validateCCInput(input, "contentControls.date.setDisplayLocale");
16947
+ validateCCTarget(input.target, "contentControls.date.setDisplayLocale");
16948
+ requireString2(input.locale, "locale", "contentControls.date.setDisplayLocale");
16150
16949
  return adapter.date.setDisplayLocale(input, options);
16151
16950
  }
16152
16951
  function executeContentControlsDateSetStorageFormat(adapter, input, options) {
16952
+ validateCCInput(input, "contentControls.date.setStorageFormat");
16953
+ validateCCTarget(input.target, "contentControls.date.setStorageFormat");
16954
+ requireString2(input.format, "format", "contentControls.date.setStorageFormat");
16153
16955
  return adapter.date.setStorageFormat(input, options);
16154
16956
  }
16155
16957
  function executeContentControlsDateSetCalendar(adapter, input, options) {
16958
+ validateCCInput(input, "contentControls.date.setCalendar");
16959
+ validateCCTarget(input.target, "contentControls.date.setCalendar");
16960
+ requireString2(input.calendar, "calendar", "contentControls.date.setCalendar");
16156
16961
  return adapter.date.setCalendar(input, options);
16157
16962
  }
16158
16963
  function executeContentControlsCheckboxGetState(adapter, input) {
16964
+ validateCCInput(input, "contentControls.checkbox.getState");
16965
+ validateCCTarget(input.target, "contentControls.checkbox.getState");
16159
16966
  return adapter.checkbox.getState(input);
16160
16967
  }
16161
16968
  function executeContentControlsCheckboxSetState(adapter, input, options) {
16969
+ validateCCInput(input, "contentControls.checkbox.setState");
16970
+ validateCCTarget(input.target, "contentControls.checkbox.setState");
16971
+ requireBoolean(input.checked, "checked", "contentControls.checkbox.setState");
16162
16972
  return adapter.checkbox.setState(input, options);
16163
16973
  }
16164
16974
  function executeContentControlsCheckboxToggle(adapter, input, options) {
16975
+ validateCCInput(input, "contentControls.checkbox.toggle");
16976
+ validateCCTarget(input.target, "contentControls.checkbox.toggle");
16165
16977
  return adapter.checkbox.toggle(input, options);
16166
16978
  }
16167
16979
  function executeContentControlsCheckboxSetSymbolPair(adapter, input, options) {
16980
+ validateCCInput(input, "contentControls.checkbox.setSymbolPair");
16981
+ validateCCTarget(input.target, "contentControls.checkbox.setSymbolPair");
16982
+ validateSymbol(input.checkedSymbol, "checkedSymbol", "contentControls.checkbox.setSymbolPair");
16983
+ validateSymbol(input.uncheckedSymbol, "uncheckedSymbol", "contentControls.checkbox.setSymbolPair");
16168
16984
  return adapter.checkbox.setSymbolPair(input, options);
16169
16985
  }
16170
16986
  function executeContentControlsChoiceListGetItems(adapter, input) {
16987
+ validateCCInput(input, "contentControls.choiceList.getItems");
16988
+ validateCCTarget(input.target, "contentControls.choiceList.getItems");
16171
16989
  return adapter.choiceList.getItems(input);
16172
16990
  }
16173
16991
  function executeContentControlsChoiceListSetItems(adapter, input, options) {
16992
+ validateCCInput(input, "contentControls.choiceList.setItems");
16993
+ validateCCTarget(input.target, "contentControls.choiceList.setItems");
16994
+ if (!Array.isArray(input.items)) {
16995
+ throw new DocumentApiValidationError("INVALID_INPUT", "contentControls.choiceList.setItems items must be an array.", { field: "items", value: input.items });
16996
+ }
16997
+ for (let i = 0;i < input.items.length; i++) {
16998
+ const item = input.items[i];
16999
+ if (!isRecord(item) || typeof item.displayText !== "string" || typeof item.value !== "string") {
17000
+ throw new DocumentApiValidationError("INVALID_INPUT", `contentControls.choiceList.setItems items[${i}] must be { displayText: string, value: string }.`, { field: `items[${i}]`, value: item });
17001
+ }
17002
+ }
16174
17003
  return adapter.choiceList.setItems(input, options);
16175
17004
  }
16176
17005
  function executeContentControlsChoiceListSetSelected(adapter, input, options) {
17006
+ validateCCInput(input, "contentControls.choiceList.setSelected");
17007
+ validateCCTarget(input.target, "contentControls.choiceList.setSelected");
17008
+ if (typeof input.value !== "string") {
17009
+ throw new DocumentApiValidationError("INVALID_INPUT", "contentControls.choiceList.setSelected value must be a string.", { field: "value", value: input.value });
17010
+ }
16177
17011
  return adapter.choiceList.setSelected(input, options);
16178
17012
  }
16179
17013
  function executeContentControlsRepeatingSectionListItems(adapter, input) {
17014
+ validateCCInput(input, "contentControls.repeatingSection.listItems");
17015
+ validateCCTarget(input.target, "contentControls.repeatingSection.listItems");
16180
17016
  return adapter.repeatingSection.listItems(input);
16181
17017
  }
16182
17018
  function executeContentControlsRepeatingSectionInsertItemBefore(adapter, input, options) {
17019
+ validateCCInput(input, "contentControls.repeatingSection.insertItemBefore");
17020
+ validateCCTarget(input.target, "contentControls.repeatingSection.insertItemBefore");
17021
+ requireIndex(input.index, "index", "contentControls.repeatingSection.insertItemBefore");
16183
17022
  return adapter.repeatingSection.insertItemBefore(input, options);
16184
17023
  }
16185
17024
  function executeContentControlsRepeatingSectionInsertItemAfter(adapter, input, options) {
17025
+ validateCCInput(input, "contentControls.repeatingSection.insertItemAfter");
17026
+ validateCCTarget(input.target, "contentControls.repeatingSection.insertItemAfter");
17027
+ requireIndex(input.index, "index", "contentControls.repeatingSection.insertItemAfter");
16186
17028
  return adapter.repeatingSection.insertItemAfter(input, options);
16187
17029
  }
16188
17030
  function executeContentControlsRepeatingSectionCloneItem(adapter, input, options) {
17031
+ validateCCInput(input, "contentControls.repeatingSection.cloneItem");
17032
+ validateCCTarget(input.target, "contentControls.repeatingSection.cloneItem");
17033
+ requireIndex(input.index, "index", "contentControls.repeatingSection.cloneItem");
16189
17034
  return adapter.repeatingSection.cloneItem(input, options);
16190
17035
  }
16191
17036
  function executeContentControlsRepeatingSectionDeleteItem(adapter, input, options) {
17037
+ validateCCInput(input, "contentControls.repeatingSection.deleteItem");
17038
+ validateCCTarget(input.target, "contentControls.repeatingSection.deleteItem");
17039
+ requireIndex(input.index, "index", "contentControls.repeatingSection.deleteItem");
16192
17040
  return adapter.repeatingSection.deleteItem(input, options);
16193
17041
  }
16194
17042
  function executeContentControlsRepeatingSectionSetAllowInsertDelete(adapter, input, options) {
17043
+ validateCCInput(input, "contentControls.repeatingSection.setAllowInsertDelete");
17044
+ validateCCTarget(input.target, "contentControls.repeatingSection.setAllowInsertDelete");
17045
+ requireBoolean(input.allow, "allow", "contentControls.repeatingSection.setAllowInsertDelete");
16195
17046
  return adapter.repeatingSection.setAllowInsertDelete(input, options);
16196
17047
  }
16197
17048
  function executeContentControlsGroupWrap(adapter, input, options) {
17049
+ validateCCInput(input, "contentControls.group.wrap");
17050
+ validateCCTarget(input.target, "contentControls.group.wrap");
16198
17051
  return adapter.group.wrap(input, options);
16199
17052
  }
16200
17053
  function executeContentControlsGroupUngroup(adapter, input, options) {
17054
+ validateCCInput(input, "contentControls.group.ungroup");
17055
+ validateCCTarget(input.target, "contentControls.group.ungroup");
16201
17056
  return adapter.group.ungroup(input, options);
16202
17057
  }
16203
17058
  function executeCreateContentControl(adapter, input, options) {
17059
+ validateCCInput(input, "create.contentControl");
17060
+ requireNodeKind(input.kind, "kind", "create.contentControl");
17061
+ if (input.controlType !== undefined && !VALID_CC_TYPES.has(input.controlType)) {
17062
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.contentControl controlType must be one of: ${[...VALID_CC_TYPES].join(", ")}.`, { field: "controlType", value: input.controlType });
17063
+ }
17064
+ if (input.lockMode !== undefined && !VALID_LOCK_MODES.has(input.lockMode)) {
17065
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.contentControl lockMode must be one of: ${[...VALID_LOCK_MODES].join(", ")}.`, { field: "lockMode", value: input.lockMode });
17066
+ }
17067
+ if (input.target !== undefined) {
17068
+ validateCCTarget(input.target, "create.contentControl");
17069
+ }
17070
+ if (input.content !== undefined && typeof input.content !== "string") {
17071
+ throw new DocumentApiValidationError("INVALID_INPUT", `create.contentControl content must be a string, got ${typeof input.content}.`, { field: "content", value: input.content });
17072
+ }
16204
17073
  return adapter.create(input, options);
16205
17074
  }
17075
+ var VALID_NODE_KINDS, VALID_LOCK_MODES, VALID_CC_TYPES, VALID_CC_APPEARANCES, VALID_CONTENT_FORMATS, VALID_RAW_PATCH_OPS;
17076
+ var init_content_controls = __esm(() => {
17077
+ init_errors2();
17078
+ init_validation_primitives();
17079
+ init_content_controls_types();
17080
+ init_base();
17081
+ VALID_NODE_KINDS = new Set(NODE_KINDS);
17082
+ VALID_LOCK_MODES = new Set(LOCK_MODES);
17083
+ VALID_CC_TYPES = new Set(CONTENT_CONTROL_TYPES);
17084
+ VALID_CC_APPEARANCES = new Set(CONTENT_CONTROL_APPEARANCES);
17085
+ VALID_CONTENT_FORMATS = new Set(["text", "html"]);
17086
+ VALID_RAW_PATCH_OPS = new Set(["set", "remove", "setAttr", "removeAttr"]);
17087
+ });
16206
17088
 
16207
17089
  // ../../packages/document-api/src/bookmarks/bookmarks.ts
16208
17090
  function validateBookmarkTarget(target, operationName) {
@@ -16656,16 +17538,6 @@ var init_authorities = __esm(() => {
16656
17538
  init_create_location_validator();
16657
17539
  });
16658
17540
 
16659
- // ../../packages/document-api/src/content-controls/content-controls.types.ts
16660
- var init_content_controls_types = () => {};
16661
-
16662
- // ../../packages/document-api/src/lists/lists.types.ts
16663
- var LIST_KINDS, LIST_INSERT_POSITIONS;
16664
- var init_lists_types = __esm(() => {
16665
- LIST_KINDS = ["ordered", "bullet"];
16666
- LIST_INSERT_POSITIONS = ["before", "after"];
16667
- });
16668
-
16669
17541
  // ../../packages/document-api/src/index.ts
16670
17542
  function executeQueryMatch(adapter, input) {
16671
17543
  if (!input || typeof input !== "object") {
@@ -17844,6 +18716,9 @@ var init_src = __esm(() => {
17844
18716
  init_format();
17845
18717
  init_inline_run_patch();
17846
18718
  init_styles();
18719
+ init_get_text();
18720
+ init_get_markdown();
18721
+ init_get_html();
17847
18722
  init_story_validator();
17848
18723
  init_delete();
17849
18724
  init_resolve();
@@ -17863,6 +18738,7 @@ var init_src = __esm(() => {
17863
18738
  init_images();
17864
18739
  init_toc();
17865
18740
  init_hyperlinks();
18741
+ init_content_controls();
17866
18742
  init_bookmarks();
17867
18743
  init_footnotes();
17868
18744
  init_cross_refs();
@@ -24837,9 +25713,9 @@ var init_jszip_ChlR43oI_es = __esm(() => {
24837
25713
  });
24838
25714
  });
24839
25715
 
24840
- // ../../packages/superdoc/dist/chunks/xml-js-DLE8mr0n.es.js
25716
+ // ../../packages/superdoc/dist/chunks/xml-js-40FWvL78.es.js
24841
25717
  var require_events, require_inherits_browser, require_stream_browser, require_dist, require_shams$1, require_shams, require_es_object_atoms, require_es_errors, require_eval, require_range, require_ref, require_syntax, require_type, require_uri, require_abs, require_floor, require_max, require_min, require_pow, require_round, require_isNaN, require_sign, require_gOPD, require_gopd, require_es_define_property, require_has_symbols, require_Reflect_getPrototypeOf, require_Object_getPrototypeOf, require_implementation, require_function_bind, require_functionCall, require_functionApply, require_reflectApply, require_actualApply, require_call_bind_apply_helpers, require_get, require_get_proto, require_hasown, require_get_intrinsic, require_call_bound, require_is_arguments, require_is_regex, require_safe_regex_test, require_generator_function, require_is_generator_function, require_is_callable, require_for_each, require_possible_typed_array_names, require_available_typed_arrays, require_define_data_property, require_has_property_descriptors, require_set_function_length, require_applyBind, require_call_bind, require_which_typed_array, require_is_typed_array, require_types, require_isBufferBrowser, require_util, require_buffer_list, require_destroy, require_errors_browser, require_state, require_browser, require__stream_writable, require__stream_duplex, require_safe_buffer, require_string_decoder, require_end_of_stream, require_async_iterator, require_from_browser, require__stream_readable, require__stream_transform, require__stream_passthrough, require_pipeline, require_stream_browserify, require_sax, require_array_helper, require_options_helper, require_xml2js, require_xml2json, require_js2xml, require_json2xml, require_lib;
24842
- var init_xml_js_DLE8mr0n_es = __esm(() => {
25718
+ var init_xml_js_40FWvL78_es = __esm(() => {
24843
25719
  init_rolldown_runtime_B2q5OVn9_es();
24844
25720
  init_jszip_ChlR43oI_es();
24845
25721
  require_events = /* @__PURE__ */ __commonJSMin((exports, module) => {
@@ -31387,9 +32263,13 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31387
32263
  clearBuffers(parser);
31388
32264
  parser.q = parser.c = "";
31389
32265
  parser.bufferCheckPosition = sax$1.MAX_BUFFER_LENGTH;
32266
+ parser.encoding = null;
31390
32267
  parser.opt = opt || {};
31391
32268
  parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
31392
32269
  parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase";
32270
+ parser.opt.maxEntityCount = parser.opt.maxEntityCount || 512;
32271
+ parser.opt.maxEntityDepth = parser.opt.maxEntityDepth || 4;
32272
+ parser.entityCount = parser.entityDepth = 0;
31393
32273
  parser.tags = [];
31394
32274
  parser.closed = parser.closedRoot = parser.sawRoot = false;
31395
32275
  parser.tag = parser.error = null;
@@ -31492,6 +32372,24 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31492
32372
  function createStream(strict, opt) {
31493
32373
  return new SAXStream(strict, opt);
31494
32374
  }
32375
+ function determineBufferEncoding(data, isEnd) {
32376
+ if (data.length >= 2) {
32377
+ if (data[0] === 255 && data[1] === 254)
32378
+ return "utf-16le";
32379
+ if (data[0] === 254 && data[1] === 255)
32380
+ return "utf-16be";
32381
+ }
32382
+ if (data.length >= 3 && data[0] === 239 && data[1] === 187 && data[2] === 191)
32383
+ return "utf8";
32384
+ if (data.length >= 4) {
32385
+ if (data[0] === 60 && data[1] === 0 && data[2] === 63 && data[3] === 0)
32386
+ return "utf-16le";
32387
+ if (data[0] === 0 && data[1] === 60 && data[2] === 0 && data[3] === 63)
32388
+ return "utf-16be";
32389
+ return "utf8";
32390
+ }
32391
+ return isEnd ? "utf8" : null;
32392
+ }
31495
32393
  function SAXStream(strict, opt) {
31496
32394
  if (!(this instanceof SAXStream))
31497
32395
  return new SAXStream(strict, opt);
@@ -31508,6 +32406,7 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31508
32406
  me._parser.error = null;
31509
32407
  };
31510
32408
  this._decoder = null;
32409
+ this._decoderBuffer = null;
31511
32410
  streamWraps.forEach(function(ev) {
31512
32411
  Object.defineProperty(me, "on" + ev, {
31513
32412
  get: function() {
@@ -31527,11 +32426,31 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31527
32426
  });
31528
32427
  }
31529
32428
  SAXStream.prototype = Object.create(Stream$3.prototype, { constructor: { value: SAXStream } });
32429
+ SAXStream.prototype._decodeBuffer = function(data, isEnd) {
32430
+ if (this._decoderBuffer) {
32431
+ data = Buffer2.concat([this._decoderBuffer, data]);
32432
+ this._decoderBuffer = null;
32433
+ }
32434
+ if (!this._decoder) {
32435
+ var encoding = determineBufferEncoding(data, isEnd);
32436
+ if (!encoding) {
32437
+ this._decoderBuffer = data;
32438
+ return "";
32439
+ }
32440
+ this._parser.encoding = encoding;
32441
+ this._decoder = new TextDecoder(encoding);
32442
+ }
32443
+ return this._decoder.decode(data, { stream: !isEnd });
32444
+ };
31530
32445
  SAXStream.prototype.write = function(data) {
31531
- if (typeof Buffer2 === "function" && typeof Buffer2.isBuffer === "function" && Buffer2.isBuffer(data)) {
31532
- if (!this._decoder)
31533
- this._decoder = new TextDecoder("utf8");
31534
- data = this._decoder.decode(data, { stream: true });
32446
+ if (typeof Buffer2 === "function" && typeof Buffer2.isBuffer === "function" && Buffer2.isBuffer(data))
32447
+ data = this._decodeBuffer(data, false);
32448
+ else if (this._decoderBuffer) {
32449
+ var remaining = this._decodeBuffer(Buffer2.alloc(0), true);
32450
+ if (remaining) {
32451
+ this._parser.write(remaining);
32452
+ this.emit("data", remaining);
32453
+ }
31535
32454
  }
31536
32455
  this._parser.write(data.toString());
31537
32456
  this.emit("data", data);
@@ -31540,7 +32459,13 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31540
32459
  SAXStream.prototype.end = function(chunk) {
31541
32460
  if (chunk && chunk.length)
31542
32461
  this.write(chunk);
31543
- if (this._decoder) {
32462
+ if (this._decoderBuffer) {
32463
+ var finalChunk = this._decodeBuffer(Buffer2.alloc(0), true);
32464
+ if (finalChunk) {
32465
+ this._parser.write(finalChunk);
32466
+ this.emit("data", finalChunk);
32467
+ }
32468
+ } else if (this._decoder) {
31544
32469
  var remaining = this._decoder.decode();
31545
32470
  if (remaining) {
31546
32471
  this._parser.write(remaining);
@@ -31900,6 +32825,31 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
31900
32825
  function emit(parser, event, data) {
31901
32826
  parser[event] && parser[event](data);
31902
32827
  }
32828
+ function getDeclaredEncoding(body) {
32829
+ var match = body && body.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
32830
+ return match ? match[2] : null;
32831
+ }
32832
+ function normalizeEncodingName(encoding) {
32833
+ if (!encoding)
32834
+ return null;
32835
+ return encoding.toLowerCase().replace(/[^a-z0-9]/g, "");
32836
+ }
32837
+ function encodingsMatch(detectedEncoding, declaredEncoding) {
32838
+ const detected = normalizeEncodingName(detectedEncoding);
32839
+ const declared = normalizeEncodingName(declaredEncoding);
32840
+ if (!detected || !declared)
32841
+ return true;
32842
+ if (declared === "utf16")
32843
+ return detected === "utf16le" || detected === "utf16be";
32844
+ return detected === declared;
32845
+ }
32846
+ function validateXmlDeclarationEncoding(parser, data) {
32847
+ if (!parser.strict || !parser.encoding || !data || data.name !== "xml")
32848
+ return;
32849
+ var declaredEncoding = getDeclaredEncoding(data.body);
32850
+ if (declaredEncoding && !encodingsMatch(parser.encoding, declaredEncoding))
32851
+ strictFail(parser, "XML declaration encoding " + declaredEncoding + " does not match detected stream encoding " + parser.encoding.toUpperCase());
32852
+ }
31903
32853
  function emitNode(parser, nodeType, data) {
31904
32854
  if (parser.textNode)
31905
32855
  closeText(parser);
@@ -32438,10 +33388,12 @@ Actual: ` + parser.attribValue);
32438
33388
  continue;
32439
33389
  case S.PROC_INST_ENDING:
32440
33390
  if (c === ">") {
32441
- emitNode(parser, "onprocessinginstruction", {
33391
+ const procInstEndData = {
32442
33392
  name: parser.procInstName,
32443
33393
  body: parser.procInstBody
32444
- });
33394
+ };
33395
+ validateXmlDeclarationEncoding(parser, procInstEndData);
33396
+ emitNode(parser, "onprocessinginstruction", procInstEndData);
32445
33397
  parser.procInstName = parser.procInstBody = "";
32446
33398
  parser.state = S.TEXT;
32447
33399
  } else {
@@ -32638,9 +33590,14 @@ Actual: ` + parser.attribValue);
32638
33590
  if (c === ";") {
32639
33591
  var parsedEntity = parseEntity(parser);
32640
33592
  if (parser.opt.unparsedEntities && !Object.values(sax$1.XML_ENTITIES).includes(parsedEntity)) {
33593
+ if ((parser.entityCount += 1) > parser.opt.maxEntityCount)
33594
+ error(parser, "Parsed entity count exceeds max entity count");
33595
+ if ((parser.entityDepth += 1) > parser.opt.maxEntityDepth)
33596
+ error(parser, "Parsed entity depth exceeds max entity depth");
32641
33597
  parser.entity = "";
32642
33598
  parser.state = returnState;
32643
33599
  parser.write(parsedEntity);
33600
+ parser.entityDepth -= 1;
32644
33601
  } else {
32645
33602
  parser[buffer$2] += parsedEntity;
32646
33603
  parser.entity = "";
@@ -33583,7 +34540,7 @@ var init_uuid_qzgm05fK_es = __esm(() => {
33583
34540
  v5_default = v35("v5", 80, sha1);
33584
34541
  });
33585
34542
 
33586
- // ../../packages/superdoc/dist/chunks/constants-CMPtQbp7.es.js
34543
+ // ../../packages/superdoc/dist/chunks/constants-Qqwopz80.es.js
33587
34544
  function computeCrc32Hex(data) {
33588
34545
  let crc = 4294967295;
33589
34546
  for (let i2 = 0;i2 < data.length; i2++)
@@ -33975,8 +34932,8 @@ var import_lib, CRC32_TABLE, REMOTE_RESOURCE_PATTERN, DATA_URI_PATTERN, getArray
33975
34932
  return "webp";
33976
34933
  return null;
33977
34934
  }, COMMENT_FILE_BASENAMES, COMMENT_RELATIONSHIP_TYPES;
33978
- var init_constants_CMPtQbp7_es = __esm(() => {
33979
- init_xml_js_DLE8mr0n_es();
34935
+ var init_constants_Qqwopz80_es = __esm(() => {
34936
+ init_xml_js_40FWvL78_es();
33980
34937
  import_lib = require_lib();
33981
34938
  CRC32_TABLE = new Uint32Array(256);
33982
34939
  for (let i2 = 0;i2 < 256; i2++) {
@@ -40183,7 +41140,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
40183
41140
  emptyOptions2 = {};
40184
41141
  });
40185
41142
 
40186
- // ../../packages/superdoc/dist/chunks/SuperConverter-BL6WX-iN.es.js
41143
+ // ../../packages/superdoc/dist/chunks/SuperConverter-C9MZOwsC.es.js
40187
41144
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
40188
41145
  const fieldValue = extension$1.config[field];
40189
41146
  if (typeof fieldValue === "function")
@@ -42836,24 +43793,24 @@ function executeMarkdownToFragment2(adapter, input) {
42836
43793
  }
42837
43794
  function validateCreateCommentInput2(input) {
42838
43795
  if (!isRecord4(input))
42839
- throw new DocumentApiValidationError2("INVALID_TARGET", "comments.create input must be a non-null object.");
43796
+ throw new DocumentApiValidationError2("INVALID_INPUT", "comments.create input must be a non-null object.");
42840
43797
  assertNoUnknownFields3(input, CREATE_COMMENT_ALLOWED_KEYS2, "comments.create");
42841
43798
  const { target, text: text$2, parentCommentId } = input;
42842
43799
  const hasTarget = target !== undefined;
42843
43800
  const isReply = parentCommentId !== undefined;
42844
43801
  if (typeof text$2 !== "string")
42845
- throw new DocumentApiValidationError2("INVALID_TARGET", `text must be a string, got ${typeof text$2}.`, {
43802
+ throw new DocumentApiValidationError2("INVALID_INPUT", `text must be a string, got ${typeof text$2}.`, {
42846
43803
  field: "text",
42847
43804
  value: text$2
42848
43805
  });
42849
43806
  if (isReply) {
42850
43807
  if (typeof parentCommentId !== "string" || parentCommentId.length === 0)
42851
- throw new DocumentApiValidationError2("INVALID_TARGET", "parentCommentId must be a non-empty string.", {
43808
+ throw new DocumentApiValidationError2("INVALID_INPUT", "parentCommentId must be a non-empty string.", {
42852
43809
  field: "parentCommentId",
42853
43810
  value: parentCommentId
42854
43811
  });
42855
43812
  if (hasTarget)
42856
- throw new DocumentApiValidationError2("INVALID_TARGET", "Cannot combine parentCommentId with target. Replies do not take a target.", { fields: ["parentCommentId", "target"] });
43813
+ throw new DocumentApiValidationError2("INVALID_INPUT", "Cannot combine parentCommentId with target. Replies do not take a target.", { fields: ["parentCommentId", "target"] });
42857
43814
  return;
42858
43815
  }
42859
43816
  if (!hasTarget)
@@ -42866,12 +43823,12 @@ function validateCreateCommentInput2(input) {
42866
43823
  }
42867
43824
  function validatePatchCommentInput2(input) {
42868
43825
  if (!isRecord4(input))
42869
- throw new DocumentApiValidationError2("INVALID_TARGET", "comments.patch input must be a non-null object.");
43826
+ throw new DocumentApiValidationError2("INVALID_INPUT", "comments.patch input must be a non-null object.");
42870
43827
  assertNoUnknownFields3(input, PATCH_COMMENT_ALLOWED_KEYS2, "comments.patch");
42871
43828
  const { commentId, target } = input;
42872
43829
  const hasTarget = target !== undefined;
42873
43830
  if (typeof commentId !== "string")
42874
- throw new DocumentApiValidationError2("INVALID_TARGET", `commentId must be a string, got ${typeof commentId}.`, {
43831
+ throw new DocumentApiValidationError2("INVALID_INPUT", `commentId must be a string, got ${typeof commentId}.`, {
42875
43832
  field: "commentId",
42876
43833
  value: commentId
42877
43834
  });
@@ -42886,12 +43843,22 @@ function validatePatchCommentInput2(input) {
42886
43843
  throw new DocumentApiValidationError2("INVALID_INPUT", "comments.patch requires exactly one mutation field (text, target, status, or isInternal).", { allowedFields: [...mutationFields] });
42887
43844
  if (providedFields.length > 1)
42888
43845
  throw new DocumentApiValidationError2("INVALID_INPUT", `comments.patch accepts exactly one mutation field per call, got ${providedFields.length}: ${providedFields.join(", ")}.`, { providedFields: [...providedFields] });
42889
- const { status } = input;
43846
+ const { text: text$2, status, isInternal } = input;
43847
+ if (text$2 !== undefined && typeof text$2 !== "string")
43848
+ throw new DocumentApiValidationError2("INVALID_INPUT", `text must be a string, got ${typeof text$2}.`, {
43849
+ field: "text",
43850
+ value: text$2
43851
+ });
42890
43852
  if (status !== undefined && status !== "resolved")
42891
- throw new DocumentApiValidationError2("INVALID_TARGET", `status must be "resolved", got "${String(status)}".`, {
43853
+ throw new DocumentApiValidationError2("INVALID_INPUT", `status must be "resolved", got "${String(status)}".`, {
42892
43854
  field: "status",
42893
43855
  value: status
42894
43856
  });
43857
+ if (isInternal !== undefined && typeof isInternal !== "boolean")
43858
+ throw new DocumentApiValidationError2("INVALID_INPUT", `isInternal must be a boolean, got ${typeof isInternal}.`, {
43859
+ field: "isInternal",
43860
+ value: isInternal
43861
+ });
42895
43862
  if (hasTarget && !isTextAddress2(target))
42896
43863
  throw new DocumentApiValidationError2("INVALID_TARGET", "target must be a text address object.", {
42897
43864
  field: "target",
@@ -42928,13 +43895,26 @@ function executeCommentsPatch2(adapter, input, options) {
42928
43895
  }, options);
42929
43896
  throw new DocumentApiValidationError2("INTERNAL_ERROR", "comments.patch: no mutation field matched after validation. This is a bug.");
42930
43897
  }
43898
+ function validateCommentIdInput2(input, operationName) {
43899
+ if (!isRecord4(input))
43900
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
43901
+ if (typeof input.commentId !== "string" || input.commentId.length === 0)
43902
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} commentId must be a non-empty string.`, {
43903
+ field: "commentId",
43904
+ value: input.commentId
43905
+ });
43906
+ }
42931
43907
  function executeCommentsDelete2(adapter, input, options) {
43908
+ validateCommentIdInput2(input, "comments.delete");
42932
43909
  return adapter.remove({ commentId: input.commentId }, options);
42933
43910
  }
42934
43911
  function executeGetComment2(adapter, input) {
43912
+ validateCommentIdInput2(input, "comments.get");
42935
43913
  return adapter.get(input);
42936
43914
  }
42937
43915
  function executeListComments2(adapter, query2) {
43916
+ if (query2 !== undefined && !isRecord4(query2))
43917
+ throw new DocumentApiValidationError2("INVALID_INPUT", "comments.list query must be an object if provided.");
42938
43918
  return adapter.list(query2);
42939
43919
  }
42940
43920
  function executeFind2(adapter, input) {
@@ -43028,12 +44008,21 @@ function executeGet2(adapter, input) {
43028
44008
  return adapter.get(input);
43029
44009
  }
43030
44010
  function executeGetText2(adapter, input) {
44011
+ if (!isRecord4(input))
44012
+ throw new DocumentApiValidationError2("INVALID_INPUT", "getText input must be a non-null object.");
44013
+ validateStoryLocator2(input.in, "in");
43031
44014
  return adapter.getText(input);
43032
44015
  }
43033
44016
  function executeGetMarkdown2(adapter, input) {
44017
+ if (!isRecord4(input))
44018
+ throw new DocumentApiValidationError2("INVALID_INPUT", "getMarkdown input must be a non-null object.");
44019
+ validateStoryLocator2(input.in, "in");
43034
44020
  return adapter.getMarkdown(input);
43035
44021
  }
43036
44022
  function executeGetHtml2(adapter, input) {
44023
+ if (!isRecord4(input))
44024
+ throw new DocumentApiValidationError2("INVALID_INPUT", "getHtml input must be a non-null object.");
44025
+ validateStoryLocator2(input.in, "in");
43037
44026
  return adapter.getHtml(input);
43038
44027
  }
43039
44028
  function executeInfo2(adapter, input) {
@@ -43647,149 +44636,531 @@ function executeInsert2(selectionAdapter, writeAdapter, input, options) {
43647
44636
  ...storyIn ? { in: storyIn } : {}
43648
44637
  }, options));
43649
44638
  }
43650
- function validateListTarget2(input, operationName) {
43651
- if (input.target === undefined)
43652
- throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a target.`);
44639
+ function validateListInput2(input, operationName) {
44640
+ if (!isRecord4(input))
44641
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
44642
+ }
44643
+ function validateListItemAddress2(value, field, operationName) {
44644
+ if (value === undefined || value === null)
44645
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a ${field}.`);
44646
+ if (!isRecord4(value))
44647
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
44648
+ field,
44649
+ value
44650
+ });
44651
+ const t = value;
44652
+ if (t.kind !== "block")
44653
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.kind must be 'block', got "${String(t.kind)}".`, {
44654
+ field: `${field}.kind`,
44655
+ value: t.kind
44656
+ });
44657
+ if (t.nodeType !== "listItem")
44658
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.nodeType must be 'listItem', got "${String(t.nodeType)}".`, {
44659
+ field: `${field}.nodeType`,
44660
+ value: t.nodeType
44661
+ });
44662
+ if (typeof t.nodeId !== "string" || t.nodeId === "")
44663
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.nodeId must be a non-empty string.`, {
44664
+ field: `${field}.nodeId`,
44665
+ value: t.nodeId
44666
+ });
44667
+ }
44668
+ function validateListItemTarget2(input, operationName) {
44669
+ validateListItemAddress2(input.target, "target", operationName);
44670
+ }
44671
+ function validateBlockAddress2(value, field, operationName) {
44672
+ if (!isRecord4(value))
44673
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
44674
+ field,
44675
+ value
44676
+ });
44677
+ const v = value;
44678
+ if (v.kind !== "block")
44679
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.kind must be 'block', got "${String(v.kind)}".`, {
44680
+ field: `${field}.kind`,
44681
+ value: v.kind
44682
+ });
44683
+ if (v.nodeType !== "paragraph")
44684
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.nodeType must be 'paragraph', got "${String(v.nodeType)}".`, {
44685
+ field: `${field}.nodeType`,
44686
+ value: v.nodeType
44687
+ });
44688
+ if (typeof v.nodeId !== "string" || v.nodeId === "")
44689
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field}.nodeId must be a non-empty string.`, {
44690
+ field: `${field}.nodeId`,
44691
+ value: v.nodeId
44692
+ });
44693
+ }
44694
+ function validateBlockAddressOrRange2(value, field, operationName) {
44695
+ if (!isRecord4(value))
44696
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
44697
+ field,
44698
+ value
44699
+ });
44700
+ const v = value;
44701
+ if (v.from !== undefined) {
44702
+ validateBlockAddress2(v.from, `${field}.from`, operationName);
44703
+ validateBlockAddress2(v.to, `${field}.to`, operationName);
44704
+ } else
44705
+ validateBlockAddress2(value, field, operationName);
44706
+ }
44707
+ function requireLevel2(value, operationName) {
44708
+ if (!isInteger2(value) || value < 0)
44709
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} level must be a non-negative integer, got ${JSON.stringify(value)}.`, {
44710
+ field: "level",
44711
+ value
44712
+ });
44713
+ }
44714
+ function requireEnum2(value, field, validSet, operationName) {
44715
+ if (!validSet.has(value))
44716
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be one of: ${[...validSet].join(", ")}. Got ${JSON.stringify(value)}.`, {
44717
+ field,
44718
+ value
44719
+ });
44720
+ }
44721
+ function optionalBoolean2(value, field, operationName) {
44722
+ if (value !== undefined && typeof value !== "boolean")
44723
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be a boolean if provided, got ${typeof value}.`, {
44724
+ field,
44725
+ value
44726
+ });
44727
+ }
44728
+ function optionalNumber2(value, field, operationName) {
44729
+ if (value !== undefined && (typeof value !== "number" || !Number.isFinite(value)))
44730
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be a number if provided, got ${typeof value}.`, {
44731
+ field,
44732
+ value
44733
+ });
44734
+ }
44735
+ function optionalInteger2(value, field, operationName) {
44736
+ if (value !== undefined && !isInteger2(value))
44737
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be an integer if provided, got ${JSON.stringify(value)}.`, {
44738
+ field,
44739
+ value
44740
+ });
44741
+ }
44742
+ function optionalLevelsArray2(value, field, operationName) {
44743
+ if (value === undefined)
44744
+ return;
44745
+ if (!Array.isArray(value))
44746
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be an array if provided.`, {
44747
+ field,
44748
+ value
44749
+ });
44750
+ for (let i$1 = 0;i$1 < value.length; i$1++)
44751
+ if (!isInteger2(value[i$1]) || value[i$1] < 0)
44752
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field}[${i$1}] must be a non-negative integer.`, {
44753
+ field: `${field}[${i$1}]`,
44754
+ value: value[i$1]
44755
+ });
44756
+ }
44757
+ function validateListLevelTemplate2(entry, path2, operationName) {
44758
+ if (!isRecord4(entry))
44759
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2} must be an object.`, {
44760
+ field: path2,
44761
+ value: entry
44762
+ });
44763
+ const e = entry;
44764
+ if (!isInteger2(e.level) || e.level < 0)
44765
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.level must be a non-negative integer.`, {
44766
+ field: `${path2}.level`,
44767
+ value: e.level
44768
+ });
44769
+ if (e.numFmt !== undefined && typeof e.numFmt !== "string")
44770
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.numFmt must be a string.`, {
44771
+ field: `${path2}.numFmt`,
44772
+ value: e.numFmt
44773
+ });
44774
+ if (e.lvlText !== undefined && typeof e.lvlText !== "string")
44775
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.lvlText must be a string.`, {
44776
+ field: `${path2}.lvlText`,
44777
+ value: e.lvlText
44778
+ });
44779
+ optionalInteger2(e.start, `${path2}.start`, operationName);
44780
+ if (e.alignment !== undefined)
44781
+ requireEnum2(e.alignment, `${path2}.alignment`, VALID_LEVEL_ALIGNMENTS2, operationName);
44782
+ if (e.trailingCharacter !== undefined)
44783
+ requireEnum2(e.trailingCharacter, `${path2}.trailingCharacter`, VALID_TRAILING_CHARACTERS2, operationName);
44784
+ if (e.markerFont !== undefined && typeof e.markerFont !== "string")
44785
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.markerFont must be a string.`, {
44786
+ field: `${path2}.markerFont`,
44787
+ value: e.markerFont
44788
+ });
44789
+ optionalInteger2(e.pictureBulletId, `${path2}.pictureBulletId`, operationName);
44790
+ if (e.tabStopAt !== undefined && e.tabStopAt !== null)
44791
+ optionalNumber2(e.tabStopAt, `${path2}.tabStopAt`, operationName);
44792
+ if (e.indents !== undefined) {
44793
+ if (!isRecord4(e.indents))
44794
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.indents must be an object.`, {
44795
+ field: `${path2}.indents`,
44796
+ value: e.indents
44797
+ });
44798
+ const ind = e.indents;
44799
+ optionalNumber2(ind.left, `${path2}.indents.left`, operationName);
44800
+ optionalNumber2(ind.hanging, `${path2}.indents.hanging`, operationName);
44801
+ optionalNumber2(ind.firstLine, `${path2}.indents.firstLine`, operationName);
44802
+ }
44803
+ }
44804
+ function validateListTemplate2(value, field, operationName) {
44805
+ if (!isRecord4(value))
44806
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be an object.`, {
44807
+ field,
44808
+ value
44809
+ });
44810
+ const t = value;
44811
+ if (t.version !== 1)
44812
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field}.version must be 1, got ${JSON.stringify(t.version)}.`, {
44813
+ field: `${field}.version`,
44814
+ value: t.version
44815
+ });
44816
+ if (!Array.isArray(t.levels))
44817
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field}.levels must be an array.`, {
44818
+ field: `${field}.levels`,
44819
+ value: t.levels
44820
+ });
44821
+ for (let i$1 = 0;i$1 < t.levels.length; i$1++)
44822
+ validateListLevelTemplate2(t.levels[i$1], `${field}.levels[${i$1}]`, operationName);
44823
+ }
44824
+ function validateListsCreateFields2(raw) {
44825
+ const op = "lists.create";
44826
+ if (raw.kind !== undefined)
44827
+ requireEnum2(raw.kind, "kind", VALID_LIST_KINDS2, op);
44828
+ if (raw.level !== undefined) {
44829
+ if (!isInteger2(raw.level) || raw.level < 0)
44830
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} level must be a non-negative integer, got ${JSON.stringify(raw.level)}.`, {
44831
+ field: "level",
44832
+ value: raw.level
44833
+ });
44834
+ }
44835
+ if (raw.sequence !== undefined) {
44836
+ if (!isRecord4(raw.sequence))
44837
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} sequence must be an object.`, {
44838
+ field: "sequence",
44839
+ value: raw.sequence
44840
+ });
44841
+ const seq = raw.sequence;
44842
+ requireEnum2(seq.mode, "sequence.mode", VALID_SEQUENCE_MODES2, op);
44843
+ if (seq.mode === "continuePrevious") {
44844
+ if (raw.preset !== undefined)
44845
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} preset must not be provided when sequence.mode is 'continuePrevious'.`, { field: "preset" });
44846
+ if (raw.style !== undefined)
44847
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} style must not be provided when sequence.mode is 'continuePrevious'.`, { field: "style" });
44848
+ if (seq.startAt !== undefined)
44849
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${op} sequence.startAt must not be provided when sequence.mode is 'continuePrevious'.`, { field: "sequence.startAt" });
44850
+ }
44851
+ if (seq.mode === "new")
44852
+ optionalInteger2(seq.startAt, "sequence.startAt", op);
44853
+ }
44854
+ if (raw.preset !== undefined)
44855
+ requireEnum2(raw.preset, "preset", VALID_LIST_PRESETS2, op);
44856
+ if (raw.style !== undefined)
44857
+ validateListTemplate2(raw.style, "style", op);
43653
44858
  }
43654
44859
  function executeListsList2(adapter, query2) {
44860
+ if (query2 !== undefined) {
44861
+ if (!isRecord4(query2))
44862
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.list query must be an object if provided.");
44863
+ const q$1 = query2;
44864
+ if (q$1.kind !== undefined)
44865
+ requireEnum2(q$1.kind, "kind", VALID_LIST_KINDS2, "lists.list");
44866
+ optionalInteger2(q$1.level, "level", "lists.list");
44867
+ optionalInteger2(q$1.limit, "limit", "lists.list");
44868
+ optionalInteger2(q$1.offset, "offset", "lists.list");
44869
+ optionalInteger2(q$1.ordinal, "ordinal", "lists.list");
44870
+ if (q$1.within !== undefined) {
44871
+ if (!isRecord4(q$1.within))
44872
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.list within must be an object.", {
44873
+ field: "within",
44874
+ value: q$1.within
44875
+ });
44876
+ const w = q$1.within;
44877
+ if (w.kind !== "block")
44878
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.list within.kind must be 'block', got "${String(w.kind)}".`, {
44879
+ field: "within.kind",
44880
+ value: w.kind
44881
+ });
44882
+ if (!VALID_BLOCK_NODE_TYPES$1.has(w.nodeType))
44883
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.list within.nodeType must be a valid BlockNodeType, got ${JSON.stringify(w.nodeType)}.`, {
44884
+ field: "within.nodeType",
44885
+ value: w.nodeType
44886
+ });
44887
+ if (typeof w.nodeId !== "string" || w.nodeId === "")
44888
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.list within.nodeId must be a non-empty string.", {
44889
+ field: "within.nodeId",
44890
+ value: w.nodeId
44891
+ });
44892
+ }
44893
+ }
43655
44894
  return adapter.list(query2);
43656
44895
  }
43657
44896
  function executeListsGet2(adapter, input) {
44897
+ validateListInput2(input, "lists.get");
44898
+ validateListItemAddress2(input.address, "address", "lists.get");
43658
44899
  return adapter.get(input);
43659
44900
  }
43660
44901
  function executeListsInsert2(adapter, input, options) {
43661
- validateListTarget2(input, "lists.insert");
44902
+ validateListItemTarget2(input, "lists.insert");
44903
+ requireEnum2(input.position, "position", VALID_INSERT_POSITIONS2, "lists.insert");
44904
+ if (input.text !== undefined && typeof input.text !== "string")
44905
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.insert text must be a string if provided, got ${typeof input.text}.`, {
44906
+ field: "text",
44907
+ value: input.text
44908
+ });
43662
44909
  return adapter.insert(input, normalizeMutationOptions2(options));
43663
44910
  }
43664
44911
  function executeListsIndent2(adapter, input, options) {
43665
- validateListTarget2(input, "lists.indent");
44912
+ validateListItemTarget2(input, "lists.indent");
43666
44913
  return adapter.indent(input, normalizeMutationOptions2(options));
43667
44914
  }
43668
44915
  function executeListsOutdent2(adapter, input, options) {
43669
- validateListTarget2(input, "lists.outdent");
44916
+ validateListItemTarget2(input, "lists.outdent");
43670
44917
  return adapter.outdent(input, normalizeMutationOptions2(options));
43671
44918
  }
43672
44919
  function executeListsCreate2(adapter, input, options) {
44920
+ validateListInput2(input, "lists.create");
44921
+ const raw = input;
44922
+ if (!VALID_LIST_CREATE_MODES2.has(raw.mode))
44923
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.create mode must be "empty" or "fromParagraphs", got ${JSON.stringify(raw.mode)}.`, {
44924
+ field: "mode",
44925
+ value: raw.mode
44926
+ });
44927
+ if (raw.mode === "empty")
44928
+ validateBlockAddress2(raw.at, "at", "lists.create");
44929
+ if (raw.mode === "fromParagraphs") {
44930
+ if (raw.target === undefined || raw.target === null)
44931
+ throw new DocumentApiValidationError2("INVALID_TARGET", 'lists.create with mode "fromParagraphs" requires a target.', { field: "target" });
44932
+ validateBlockAddressOrRange2(raw.target, "target", "lists.create");
44933
+ }
44934
+ validateListsCreateFields2(raw);
43673
44935
  return adapter.create(input, normalizeMutationOptions2(options));
43674
44936
  }
43675
44937
  function executeListsAttach2(adapter, input, options) {
43676
- validateListTarget2(input, "lists.attach");
44938
+ validateListInput2(input, "lists.attach");
44939
+ validateBlockAddressOrRange2(input.target, "target", "lists.attach");
44940
+ validateListItemAddress2(input.attachTo, "attachTo", "lists.attach");
44941
+ optionalInteger2(input.level, "level", "lists.attach");
43677
44942
  return adapter.attach(input, normalizeMutationOptions2(options));
43678
44943
  }
43679
44944
  function executeListsDetach2(adapter, input, options) {
43680
- validateListTarget2(input, "lists.detach");
44945
+ validateListItemTarget2(input, "lists.detach");
43681
44946
  return adapter.detach(input, normalizeMutationOptions2(options));
43682
44947
  }
43683
44948
  function executeListsJoin2(adapter, input, options) {
43684
- validateListTarget2(input, "lists.join");
44949
+ validateListItemTarget2(input, "lists.join");
44950
+ requireEnum2(input.direction, "direction", VALID_JOIN_DIRECTIONS2, "lists.join");
43685
44951
  return adapter.join(input, normalizeMutationOptions2(options));
43686
44952
  }
43687
44953
  function executeListsCanJoin2(adapter, input) {
43688
- validateListTarget2(input, "lists.canJoin");
44954
+ validateListItemTarget2(input, "lists.canJoin");
44955
+ requireEnum2(input.direction, "direction", VALID_JOIN_DIRECTIONS2, "lists.canJoin");
43689
44956
  return adapter.canJoin(input);
43690
44957
  }
43691
44958
  function executeListsSeparate2(adapter, input, options) {
43692
- validateListTarget2(input, "lists.separate");
44959
+ validateListItemTarget2(input, "lists.separate");
44960
+ optionalBoolean2(input.copyOverrides, "copyOverrides", "lists.separate");
43693
44961
  return adapter.separate(input, normalizeMutationOptions2(options));
43694
44962
  }
43695
44963
  function executeListsSetLevel2(adapter, input, options) {
43696
- validateListTarget2(input, "lists.setLevel");
44964
+ validateListItemTarget2(input, "lists.setLevel");
44965
+ requireLevel2(input.level, "lists.setLevel");
43697
44966
  return adapter.setLevel(input, normalizeMutationOptions2(options));
43698
44967
  }
43699
44968
  function executeListsSetValue2(adapter, input, options) {
43700
- validateListTarget2(input, "lists.setValue");
44969
+ validateListItemTarget2(input, "lists.setValue");
44970
+ if (input.value !== null && !isInteger2(input.value))
44971
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.setValue value must be an integer or null, got ${JSON.stringify(input.value)}.`, {
44972
+ field: "value",
44973
+ value: input.value
44974
+ });
43701
44975
  return adapter.setValue(input, normalizeMutationOptions2(options));
43702
44976
  }
43703
44977
  function executeListsContinuePrevious2(adapter, input, options) {
43704
- validateListTarget2(input, "lists.continuePrevious");
44978
+ validateListItemTarget2(input, "lists.continuePrevious");
43705
44979
  return adapter.continuePrevious(input, normalizeMutationOptions2(options));
43706
44980
  }
43707
44981
  function executeListsCanContinuePrevious2(adapter, input) {
43708
- validateListTarget2(input, "lists.canContinuePrevious");
44982
+ validateListItemTarget2(input, "lists.canContinuePrevious");
43709
44983
  return adapter.canContinuePrevious(input);
43710
44984
  }
43711
44985
  function executeListsSetLevelRestart2(adapter, input, options) {
43712
- validateListTarget2(input, "lists.setLevelRestart");
44986
+ validateListItemTarget2(input, "lists.setLevelRestart");
44987
+ requireLevel2(input.level, "lists.setLevelRestart");
44988
+ if (input.restartAfterLevel !== null && !isInteger2(input.restartAfterLevel))
44989
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.setLevelRestart restartAfterLevel must be an integer or null.`, {
44990
+ field: "restartAfterLevel",
44991
+ value: input.restartAfterLevel
44992
+ });
44993
+ if (input.scope !== undefined)
44994
+ requireEnum2(input.scope, "scope", VALID_MUTATION_SCOPES2, "lists.setLevelRestart");
43713
44995
  return adapter.setLevelRestart(input, normalizeMutationOptions2(options));
43714
44996
  }
43715
44997
  function executeListsConvertToText2(adapter, input, options) {
43716
- validateListTarget2(input, "lists.convertToText");
44998
+ validateListItemTarget2(input, "lists.convertToText");
44999
+ optionalBoolean2(input.includeMarker, "includeMarker", "lists.convertToText");
43717
45000
  return adapter.convertToText(input, normalizeMutationOptions2(options));
43718
45001
  }
43719
45002
  function executeListsApplyTemplate2(adapter, input, options) {
43720
- validateListTarget2(input, "lists.applyTemplate");
45003
+ validateListItemTarget2(input, "lists.applyTemplate");
45004
+ validateListTemplate2(input.template, "template", "lists.applyTemplate");
45005
+ optionalLevelsArray2(input.levels, "levels", "lists.applyTemplate");
43721
45006
  return adapter.applyTemplate(input, normalizeMutationOptions2(options));
43722
45007
  }
43723
45008
  function executeListsApplyPreset2(adapter, input, options) {
43724
- validateListTarget2(input, "lists.applyPreset");
45009
+ validateListItemTarget2(input, "lists.applyPreset");
45010
+ requireEnum2(input.preset, "preset", VALID_LIST_PRESETS2, "lists.applyPreset");
45011
+ optionalLevelsArray2(input.levels, "levels", "lists.applyPreset");
43725
45012
  return adapter.applyPreset(input, normalizeMutationOptions2(options));
43726
45013
  }
43727
45014
  function executeListsCaptureTemplate2(adapter, input) {
43728
- validateListTarget2(input, "lists.captureTemplate");
45015
+ validateListItemTarget2(input, "lists.captureTemplate");
45016
+ optionalLevelsArray2(input.levels, "levels", "lists.captureTemplate");
43729
45017
  return adapter.captureTemplate(input);
43730
45018
  }
43731
45019
  function executeListsSetLevelNumbering2(adapter, input, options) {
43732
- validateListTarget2(input, "lists.setLevelNumbering");
45020
+ validateListItemTarget2(input, "lists.setLevelNumbering");
45021
+ requireLevel2(input.level, "lists.setLevelNumbering");
45022
+ if (typeof input.numFmt !== "string")
45023
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelNumbering numFmt must be a string.", {
45024
+ field: "numFmt",
45025
+ value: input.numFmt
45026
+ });
45027
+ if (typeof input.lvlText !== "string")
45028
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelNumbering lvlText must be a string.", {
45029
+ field: "lvlText",
45030
+ value: input.lvlText
45031
+ });
45032
+ optionalInteger2(input.start, "start", "lists.setLevelNumbering");
43733
45033
  return adapter.setLevelNumbering(input, normalizeMutationOptions2(options));
43734
45034
  }
43735
45035
  function executeListsSetLevelBullet2(adapter, input, options) {
43736
- validateListTarget2(input, "lists.setLevelBullet");
45036
+ validateListItemTarget2(input, "lists.setLevelBullet");
45037
+ requireLevel2(input.level, "lists.setLevelBullet");
45038
+ if (typeof input.markerText !== "string")
45039
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelBullet markerText must be a string.", {
45040
+ field: "markerText",
45041
+ value: input.markerText
45042
+ });
43737
45043
  return adapter.setLevelBullet(input, normalizeMutationOptions2(options));
43738
45044
  }
43739
45045
  function executeListsSetLevelPictureBullet2(adapter, input, options) {
43740
- validateListTarget2(input, "lists.setLevelPictureBullet");
45046
+ validateListItemTarget2(input, "lists.setLevelPictureBullet");
45047
+ requireLevel2(input.level, "lists.setLevelPictureBullet");
45048
+ if (!isInteger2(input.pictureBulletId))
45049
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelPictureBullet pictureBulletId must be an integer.", {
45050
+ field: "pictureBulletId",
45051
+ value: input.pictureBulletId
45052
+ });
43741
45053
  return adapter.setLevelPictureBullet(input, normalizeMutationOptions2(options));
43742
45054
  }
43743
45055
  function executeListsSetLevelAlignment2(adapter, input, options) {
43744
- validateListTarget2(input, "lists.setLevelAlignment");
45056
+ validateListItemTarget2(input, "lists.setLevelAlignment");
45057
+ requireLevel2(input.level, "lists.setLevelAlignment");
45058
+ requireEnum2(input.alignment, "alignment", VALID_LEVEL_ALIGNMENTS2, "lists.setLevelAlignment");
43745
45059
  return adapter.setLevelAlignment(input, normalizeMutationOptions2(options));
43746
45060
  }
43747
45061
  function executeListsSetLevelIndents2(adapter, input, options) {
43748
- validateListTarget2(input, "lists.setLevelIndents");
45062
+ validateListItemTarget2(input, "lists.setLevelIndents");
45063
+ requireLevel2(input.level, "lists.setLevelIndents");
45064
+ optionalNumber2(input.left, "left", "lists.setLevelIndents");
45065
+ optionalNumber2(input.hanging, "hanging", "lists.setLevelIndents");
45066
+ optionalNumber2(input.firstLine, "firstLine", "lists.setLevelIndents");
43749
45067
  return adapter.setLevelIndents(input, normalizeMutationOptions2(options));
43750
45068
  }
43751
45069
  function executeListsSetLevelTrailingCharacter2(adapter, input, options) {
43752
- validateListTarget2(input, "lists.setLevelTrailingCharacter");
45070
+ validateListItemTarget2(input, "lists.setLevelTrailingCharacter");
45071
+ requireLevel2(input.level, "lists.setLevelTrailingCharacter");
45072
+ requireEnum2(input.trailingCharacter, "trailingCharacter", VALID_TRAILING_CHARACTERS2, "lists.setLevelTrailingCharacter");
43753
45073
  return adapter.setLevelTrailingCharacter(input, normalizeMutationOptions2(options));
43754
45074
  }
43755
45075
  function executeListsSetLevelMarkerFont2(adapter, input, options) {
43756
- validateListTarget2(input, "lists.setLevelMarkerFont");
45076
+ validateListItemTarget2(input, "lists.setLevelMarkerFont");
45077
+ requireLevel2(input.level, "lists.setLevelMarkerFont");
45078
+ if (typeof input.fontFamily !== "string")
45079
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelMarkerFont fontFamily must be a string.", {
45080
+ field: "fontFamily",
45081
+ value: input.fontFamily
45082
+ });
43757
45083
  return adapter.setLevelMarkerFont(input, normalizeMutationOptions2(options));
43758
45084
  }
43759
45085
  function executeListsClearLevelOverrides2(adapter, input, options) {
43760
- validateListTarget2(input, "lists.clearLevelOverrides");
45086
+ validateListItemTarget2(input, "lists.clearLevelOverrides");
45087
+ requireLevel2(input.level, "lists.clearLevelOverrides");
43761
45088
  return adapter.clearLevelOverrides(input, normalizeMutationOptions2(options));
43762
45089
  }
43763
45090
  function executeListsSetType2(adapter, input, options) {
43764
- validateListTarget2(input, "lists.setType");
45091
+ validateListItemTarget2(input, "lists.setType");
45092
+ requireEnum2(input.kind, "kind", VALID_LIST_KINDS2, "lists.setType");
45093
+ if (input.continuity !== undefined)
45094
+ requireEnum2(input.continuity, "continuity", VALID_CONTINUITY_VALUES2, "lists.setType");
43765
45095
  return adapter.setType(input, normalizeMutationOptions2(options));
43766
45096
  }
43767
45097
  function executeListsGetStyle2(adapter, input) {
43768
- validateListTarget2(input, "lists.getStyle");
45098
+ validateListItemTarget2(input, "lists.getStyle");
45099
+ optionalLevelsArray2(input.levels, "levels", "lists.getStyle");
43769
45100
  return adapter.getStyle(input);
43770
45101
  }
43771
45102
  function executeListsApplyStyle2(adapter, input, options) {
43772
- validateListTarget2(input, "lists.applyStyle");
45103
+ validateListItemTarget2(input, "lists.applyStyle");
45104
+ validateListTemplate2(input.style, "style", "lists.applyStyle");
45105
+ optionalLevelsArray2(input.levels, "levels", "lists.applyStyle");
43773
45106
  return adapter.applyStyle(input, normalizeMutationOptions2(options));
43774
45107
  }
43775
45108
  function executeListsRestartAt2(adapter, input, options) {
43776
- validateListTarget2(input, "lists.restartAt");
45109
+ validateListItemTarget2(input, "lists.restartAt");
45110
+ if (!isInteger2(input.startAt))
45111
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.restartAt startAt must be an integer, got ${JSON.stringify(input.startAt)}.`, {
45112
+ field: "startAt",
45113
+ value: input.startAt
45114
+ });
43777
45115
  return adapter.restartAt(input, normalizeMutationOptions2(options));
43778
45116
  }
43779
45117
  function executeListsSetLevelNumberStyle2(adapter, input, options) {
43780
- validateListTarget2(input, "lists.setLevelNumberStyle");
45118
+ validateListItemTarget2(input, "lists.setLevelNumberStyle");
45119
+ requireLevel2(input.level, "lists.setLevelNumberStyle");
45120
+ if (typeof input.numberStyle !== "string")
45121
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelNumberStyle numberStyle must be a string.", {
45122
+ field: "numberStyle",
45123
+ value: input.numberStyle
45124
+ });
43781
45125
  return adapter.setLevelNumberStyle(input, normalizeMutationOptions2(options));
43782
45126
  }
43783
45127
  function executeListsSetLevelText2(adapter, input, options) {
43784
- validateListTarget2(input, "lists.setLevelText");
45128
+ validateListItemTarget2(input, "lists.setLevelText");
45129
+ requireLevel2(input.level, "lists.setLevelText");
45130
+ if (typeof input.text !== "string")
45131
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelText text must be a string.", {
45132
+ field: "text",
45133
+ value: input.text
45134
+ });
43785
45135
  return adapter.setLevelText(input, normalizeMutationOptions2(options));
43786
45136
  }
43787
45137
  function executeListsSetLevelStart2(adapter, input, options) {
43788
- validateListTarget2(input, "lists.setLevelStart");
45138
+ validateListItemTarget2(input, "lists.setLevelStart");
45139
+ requireLevel2(input.level, "lists.setLevelStart");
45140
+ if (!isInteger2(input.startAt))
45141
+ throw new DocumentApiValidationError2("INVALID_INPUT", `lists.setLevelStart startAt must be an integer, got ${JSON.stringify(input.startAt)}.`, {
45142
+ field: "startAt",
45143
+ value: input.startAt
45144
+ });
43789
45145
  return adapter.setLevelStart(input, normalizeMutationOptions2(options));
43790
45146
  }
43791
45147
  function executeListsSetLevelLayout2(adapter, input, options) {
43792
- validateListTarget2(input, "lists.setLevelLayout");
45148
+ validateListItemTarget2(input, "lists.setLevelLayout");
45149
+ requireLevel2(input.level, "lists.setLevelLayout");
45150
+ if (!isRecord4(input.layout))
45151
+ throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelLayout layout must be an object.", {
45152
+ field: "layout",
45153
+ value: input.layout
45154
+ });
45155
+ const layout = input.layout;
45156
+ if (layout.alignment !== undefined)
45157
+ requireEnum2(layout.alignment, "layout.alignment", VALID_LEVEL_ALIGNMENTS2, "lists.setLevelLayout");
45158
+ if (layout.followCharacter !== undefined)
45159
+ requireEnum2(layout.followCharacter, "layout.followCharacter", VALID_TRAILING_CHARACTERS2, "lists.setLevelLayout");
45160
+ optionalNumber2(layout.alignedAt, "layout.alignedAt", "lists.setLevelLayout");
45161
+ optionalNumber2(layout.textIndentAt, "layout.textIndentAt", "lists.setLevelLayout");
45162
+ if (layout.tabStopAt !== undefined && layout.tabStopAt !== null)
45163
+ optionalNumber2(layout.tabStopAt, "layout.tabStopAt", "lists.setLevelLayout");
43793
45164
  return adapter.setLevelLayout(input, normalizeMutationOptions2(options));
43794
45165
  }
43795
45166
  function isStructuralReplaceInput2(input) {
@@ -43939,6 +45310,9 @@ function validateCreateSectionBreakInput2(input) {
43939
45310
  }
43940
45311
  }
43941
45312
  function executeCreateParagraph2(adapter, input, options) {
45313
+ if (!isRecord4(input))
45314
+ throw new DocumentApiValidationError2("INVALID_INPUT", "create.paragraph input must be a non-null object.");
45315
+ validateStoryLocator2(input.in, "in");
43942
45316
  const normalized = {
43943
45317
  at: normalizeCreateLocation2(input.at, (loc) => validateTargetOnlyCreateLocation2(loc, "create.paragraph")),
43944
45318
  text: input.text ?? ""
@@ -43946,6 +45320,14 @@ function executeCreateParagraph2(adapter, input, options) {
43946
45320
  return adapter.paragraph(normalized, normalizeMutationOptions2(options));
43947
45321
  }
43948
45322
  function executeCreateHeading2(adapter, input, options) {
45323
+ if (!isRecord4(input))
45324
+ throw new DocumentApiValidationError2("INVALID_INPUT", "create.heading input must be a non-null object.");
45325
+ validateStoryLocator2(input.in, "in");
45326
+ if (!isInteger2(input.level) || !VALID_HEADING_LEVELS2.has(input.level))
45327
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.heading level must be an integer 1–6, got ${JSON.stringify(input.level)}.`, {
45328
+ field: "level",
45329
+ value: input.level
45330
+ });
43949
45331
  const at = normalizeCreateLocation2(input.at, (loc) => validateTargetOnlyCreateLocation2(loc, "create.heading"));
43950
45332
  const normalized = {
43951
45333
  level: input.level,
@@ -43955,6 +45337,18 @@ function executeCreateHeading2(adapter, input, options) {
43955
45337
  return adapter.heading(normalized, normalizeMutationOptions2(options));
43956
45338
  }
43957
45339
  function executeCreateTable2(adapter, input, options) {
45340
+ if (!isRecord4(input))
45341
+ throw new DocumentApiValidationError2("INVALID_INPUT", "create.table input must be a non-null object.");
45342
+ if (!isInteger2(input.rows) || input.rows < 1)
45343
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.table rows must be a positive integer, got ${JSON.stringify(input.rows)}.`, {
45344
+ field: "rows",
45345
+ value: input.rows
45346
+ });
45347
+ if (!isInteger2(input.columns) || input.columns < 1)
45348
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.table columns must be a positive integer, got ${JSON.stringify(input.columns)}.`, {
45349
+ field: "columns",
45350
+ value: input.columns
45351
+ });
43958
45352
  const at = normalizeCreateLocation2(input.at, (loc) => validateTargetOrNodeIdCreateLocation2(loc, "create.table"));
43959
45353
  const normalized = {
43960
45354
  rows: input.rows,
@@ -43995,7 +45389,7 @@ function validateBlocksListInput2(input) {
43995
45389
  if (!Array.isArray(input.nodeTypes) || input.nodeTypes.length === 0)
43996
45390
  throw new DocumentApiValidationError2("INVALID_INPUT", "blocks.list nodeTypes must be a non-empty array.", { fields: ["nodeTypes"] });
43997
45391
  for (const nt of input.nodeTypes)
43998
- if (!VALID_BLOCK_NODE_TYPES2.has(nt))
45392
+ if (!VALID_BLOCK_NODE_TYPES3.has(nt))
43999
45393
  throw new DocumentApiValidationError2("INVALID_INPUT", `blocks.list nodeTypes contains unknown type "${nt}".`, {
44000
45394
  fields: ["nodeTypes"],
44001
45395
  nodeType: nt
@@ -44056,6 +45450,15 @@ function executeTrackChangesList2(adapter, input) {
44056
45450
  return adapter.list(input);
44057
45451
  }
44058
45452
  function executeTrackChangesGet2(adapter, input) {
45453
+ const raw = input;
45454
+ if (typeof raw !== "object" || raw == null)
45455
+ throw new DocumentApiValidationError2("INVALID_INPUT", "trackChanges.get input must be a non-null object.", { value: raw });
45456
+ const { id } = raw;
45457
+ if (typeof id !== "string" || id.length === 0)
45458
+ throw new DocumentApiValidationError2("INVALID_INPUT", "trackChanges.get id must be a non-empty string.", {
45459
+ field: "id",
45460
+ value: id
45461
+ });
44059
45462
  return adapter.get(input);
44060
45463
  }
44061
45464
  function executeTrackChangesDecide2(adapter, rawInput, options) {
@@ -45058,12 +46461,12 @@ function executeSectionsClearPageBorders2(adapter, input, options) {
45058
46461
  assertSectionTarget2(input, "sections.clearPageBorders");
45059
46462
  return adapter.clearPageBorders(input, normalizeMutationOptions2(options));
45060
46463
  }
45061
- function requireString2(value, field) {
46464
+ function requireString$1(value, field) {
45062
46465
  if (typeof value !== "string" || value.length === 0)
45063
46466
  throw new DocumentApiValidationError2("INVALID_INPUT", `${field} must be a non-empty string.`, { field });
45064
46467
  }
45065
46468
  function requireImageId2(input) {
45066
- requireString2(input?.imageId, "imageId");
46469
+ requireString$1(input?.imageId, "imageId");
45067
46470
  }
45068
46471
  function requireFinitePositiveNumber2(value, field) {
45069
46472
  if (typeof value !== "number" || !Number.isFinite(value) || value <= 0)
@@ -45224,7 +46627,7 @@ function executeImagesResetCrop2(adapter, input, options) {
45224
46627
  }
45225
46628
  function executeImagesReplaceSource2(adapter, input, options) {
45226
46629
  requireImageId2(input);
45227
- requireString2(input.src, "src");
46630
+ requireString$1(input.src, "src");
45228
46631
  return adapter.replaceSource(input, options);
45229
46632
  }
45230
46633
  function executeImagesSetAltText2(adapter, input, options) {
@@ -45255,12 +46658,12 @@ function executeImagesSetHyperlink2(adapter, input, options) {
45255
46658
  }
45256
46659
  function executeImagesInsertCaption2(adapter, input, options) {
45257
46660
  requireImageId2(input);
45258
- requireString2(input.text, "text");
46661
+ requireString$1(input.text, "text");
45259
46662
  return adapter.insertCaption(input, options);
45260
46663
  }
45261
46664
  function executeImagesUpdateCaption2(adapter, input, options) {
45262
46665
  requireImageId2(input);
45263
- requireString2(input.text, "text");
46666
+ requireString$1(input.text, "text");
45264
46667
  return adapter.updateCaption(input, options);
45265
46668
  }
45266
46669
  function executeImagesRemoveCaption2(adapter, input, options) {
@@ -45268,7 +46671,8 @@ function executeImagesRemoveCaption2(adapter, input, options) {
45268
46671
  return adapter.removeCaption(input, options);
45269
46672
  }
45270
46673
  function executeCreateImage2(adapter, input, options) {
45271
- requireString2(input?.src, "src");
46674
+ requireString$1(input?.src, "src");
46675
+ validateStoryLocator2(input?.in, "in");
45272
46676
  return adapter.image(input, options);
45273
46677
  }
45274
46678
  function validateTocTarget2(target, operationName) {
@@ -45295,32 +46699,47 @@ function validateInsertionTarget2(target, operationName) {
45295
46699
  if (!anchor || anchor.nodeType !== "paragraph" || typeof anchor.nodeId !== "string")
45296
46700
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target.anchor must have nodeType 'paragraph' and a string nodeId.`, { target });
45297
46701
  }
46702
+ function validateTocInput2(input, operationName) {
46703
+ if (!isRecord4(input))
46704
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
46705
+ }
45298
46706
  function executeTocList2(adapter, query2) {
45299
46707
  return adapter.list(query2);
45300
46708
  }
45301
46709
  function executeTocGet2(adapter, input) {
46710
+ validateTocInput2(input, "toc.get");
45302
46711
  validateTocTarget2(input.target, "toc.get");
45303
46712
  return adapter.get(input);
45304
46713
  }
45305
46714
  function executeTocConfigure2(adapter, input, options) {
46715
+ validateTocInput2(input, "toc.configure");
45306
46716
  validateTocTarget2(input.target, "toc.configure");
45307
46717
  return adapter.configure(input, normalizeMutationOptions2(options));
45308
46718
  }
45309
46719
  function executeTocUpdate2(adapter, input, options) {
46720
+ validateTocInput2(input, "toc.update");
45310
46721
  validateTocTarget2(input.target, "toc.update");
46722
+ if (input.mode !== undefined && !VALID_TOC_UPDATE_MODES2.has(input.mode))
46723
+ throw new DocumentApiValidationError2("INVALID_INPUT", `toc.update mode must be "all" or "pageNumbers", got "${String(input.mode)}".`, {
46724
+ field: "mode",
46725
+ value: input.mode
46726
+ });
45311
46727
  return adapter.update(input, normalizeMutationOptions2(options));
45312
46728
  }
45313
46729
  function executeTocRemove2(adapter, input, options) {
46730
+ validateTocInput2(input, "toc.remove");
45314
46731
  validateTocTarget2(input.target, "toc.remove");
45315
46732
  return adapter.remove(input, normalizeMutationOptions2(options));
45316
46733
  }
45317
46734
  function executeTocMarkEntry2(adapter, input, options) {
46735
+ validateTocInput2(input, "toc.markEntry");
45318
46736
  validateInsertionTarget2(input.target, "toc.markEntry");
45319
46737
  if (!input.text || typeof input.text !== "string")
45320
46738
  throw new DocumentApiValidationError2("INVALID_INPUT", "toc.markEntry requires a non-empty text string.");
45321
46739
  return adapter.markEntry(input, normalizeMutationOptions2(options));
45322
46740
  }
45323
46741
  function executeTocUnmarkEntry2(adapter, input, options) {
46742
+ validateTocInput2(input, "toc.unmarkEntry");
45324
46743
  validateTocEntryTarget2(input.target, "toc.unmarkEntry");
45325
46744
  return adapter.unmarkEntry(input, normalizeMutationOptions2(options));
45326
46745
  }
@@ -45328,11 +46747,46 @@ function executeTocListEntries2(adapter, query2) {
45328
46747
  return adapter.listEntries(query2);
45329
46748
  }
45330
46749
  function executeTocGetEntry2(adapter, input) {
46750
+ validateTocInput2(input, "toc.getEntry");
45331
46751
  validateTocEntryTarget2(input.target, "toc.getEntry");
45332
46752
  return adapter.getEntry(input);
45333
46753
  }
46754
+ function validateTocEditEntryPatch2(patch, operationName) {
46755
+ if (!isRecord4(patch))
46756
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch must be a non-null object.`, {
46757
+ field: "patch",
46758
+ value: patch
46759
+ });
46760
+ for (const key of Object.keys(patch))
46761
+ if (!EDIT_ENTRY_PATCH_ALLOWED_KEYS2.has(key))
46762
+ throw new DocumentApiValidationError2("INVALID_INPUT", `Unknown field "${key}" on ${operationName} patch. Allowed fields: ${[...EDIT_ENTRY_PATCH_ALLOWED_KEYS2].join(", ")}.`, { field: `patch.${key}` });
46763
+ if (patch.text !== undefined && typeof patch.text !== "string")
46764
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch.text must be a string.`, {
46765
+ field: "patch.text",
46766
+ value: patch.text
46767
+ });
46768
+ if (patch.level !== undefined) {
46769
+ if (typeof patch.level !== "number" || !Number.isInteger(patch.level) || patch.level < 1)
46770
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch.level must be a positive integer.`, {
46771
+ field: "patch.level",
46772
+ value: patch.level
46773
+ });
46774
+ }
46775
+ if (patch.tableIdentifier !== undefined && typeof patch.tableIdentifier !== "string")
46776
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch.tableIdentifier must be a string.`, {
46777
+ field: "patch.tableIdentifier",
46778
+ value: patch.tableIdentifier
46779
+ });
46780
+ if (patch.omitPageNumber !== undefined && typeof patch.omitPageNumber !== "boolean")
46781
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch.omitPageNumber must be a boolean.`, {
46782
+ field: "patch.omitPageNumber",
46783
+ value: patch.omitPageNumber
46784
+ });
46785
+ }
45334
46786
  function executeTocEditEntry2(adapter, input, options) {
46787
+ validateTocInput2(input, "toc.editEntry");
45335
46788
  validateTocEntryTarget2(input.target, "toc.editEntry");
46789
+ validateTocEditEntryPatch2(input.patch, "toc.editEntry");
45336
46790
  return adapter.editEntry(input, normalizeMutationOptions2(options));
45337
46791
  }
45338
46792
  function isHyperlinkTarget2(value) {
@@ -45420,169 +46874,477 @@ function executeHyperlinksRemove2(adapter, input, options) {
45420
46874
  throw new DocumentApiValidationError2("INVALID_INPUT", `hyperlinks.remove mode must be 'unwrap' or 'deleteText', got '${String(input.mode)}'.`);
45421
46875
  return adapter.remove(input, normalizeMutationOptions2(options));
45422
46876
  }
46877
+ function validateCCInput2(input, operationName) {
46878
+ if (!isRecord4(input))
46879
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
46880
+ }
46881
+ function validateCCTarget2(target, operationName) {
46882
+ if (!isRecord4(target))
46883
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a valid target with { kind, nodeType: 'sdt', nodeId }.`, {
46884
+ field: "target",
46885
+ value: target
46886
+ });
46887
+ if (!VALID_NODE_KINDS2.has(target.kind))
46888
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target.kind must be 'block' or 'inline', got "${String(target.kind)}".`, {
46889
+ field: "target.kind",
46890
+ value: target.kind
46891
+ });
46892
+ if (target.nodeType !== "sdt")
46893
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target.nodeType must be 'sdt', got "${String(target.nodeType)}".`, {
46894
+ field: "target.nodeType",
46895
+ value: target.nodeType
46896
+ });
46897
+ if (typeof target.nodeId !== "string" || target.nodeId === "")
46898
+ throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target.nodeId must be a non-empty string.`, {
46899
+ field: "target.nodeId",
46900
+ value: target.nodeId
46901
+ });
46902
+ }
46903
+ function requireString3(value, field, operationName) {
46904
+ if (typeof value !== "string" || value.length === 0)
46905
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be a non-empty string.`, {
46906
+ field,
46907
+ value
46908
+ });
46909
+ }
46910
+ function requireBoolean2(value, field, operationName) {
46911
+ if (typeof value !== "boolean")
46912
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be a boolean, got ${typeof value}.`, {
46913
+ field,
46914
+ value
46915
+ });
46916
+ }
46917
+ function requireIndex2(value, field, operationName) {
46918
+ if (!isInteger2(value) || value < 0)
46919
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be a non-negative integer.`, {
46920
+ field,
46921
+ value
46922
+ });
46923
+ }
46924
+ function requireNodeKind2(value, field, operationName) {
46925
+ if (!VALID_NODE_KINDS2.has(value))
46926
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be 'block' or 'inline', got "${String(value)}".`, {
46927
+ field,
46928
+ value
46929
+ });
46930
+ }
46931
+ function validateContentFormat2(value, field, operationName) {
46932
+ if (value !== undefined && !VALID_CONTENT_FORMATS2.has(value))
46933
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be 'text' or 'html', got "${String(value)}".`, {
46934
+ field,
46935
+ value
46936
+ });
46937
+ }
46938
+ function validateContentPayload2(input, operationName) {
46939
+ if (typeof input.content !== "string")
46940
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} content must be a string.`, {
46941
+ field: "content",
46942
+ value: input.content
46943
+ });
46944
+ validateContentFormat2(input.format, "format", operationName);
46945
+ }
46946
+ function validateSymbol2(value, field, operationName) {
46947
+ if (!isRecord4(value) || typeof value.font !== "string" || typeof value.char !== "string")
46948
+ throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be { font: string, char: string }.`, {
46949
+ field,
46950
+ value
46951
+ });
46952
+ }
45423
46953
  function executeContentControlsList2(adapter, query2) {
46954
+ if (query2 !== undefined && !isRecord4(query2))
46955
+ throw new DocumentApiValidationError2("INVALID_INPUT", "contentControls.list query must be an object if provided.");
45424
46956
  return adapter.list(query2);
45425
46957
  }
45426
46958
  function executeContentControlsGet2(adapter, input) {
46959
+ validateCCInput2(input, "contentControls.get");
46960
+ validateCCTarget2(input.target, "contentControls.get");
45427
46961
  return adapter.get(input);
45428
46962
  }
45429
46963
  function executeContentControlsListInRange2(adapter, input) {
46964
+ validateCCInput2(input, "contentControls.listInRange");
46965
+ requireString3(input.startBlockId, "startBlockId", "contentControls.listInRange");
46966
+ requireString3(input.endBlockId, "endBlockId", "contentControls.listInRange");
45430
46967
  return adapter.listInRange(input);
45431
46968
  }
45432
46969
  function executeContentControlsSelectByTag2(adapter, input) {
46970
+ validateCCInput2(input, "contentControls.selectByTag");
46971
+ requireString3(input.tag, "tag", "contentControls.selectByTag");
45433
46972
  return adapter.selectByTag(input);
45434
46973
  }
45435
46974
  function executeContentControlsSelectByTitle2(adapter, input) {
46975
+ validateCCInput2(input, "contentControls.selectByTitle");
46976
+ requireString3(input.title, "title", "contentControls.selectByTitle");
45436
46977
  return adapter.selectByTitle(input);
45437
46978
  }
45438
46979
  function executeContentControlsListChildren2(adapter, input) {
46980
+ validateCCInput2(input, "contentControls.listChildren");
46981
+ validateCCTarget2(input.target, "contentControls.listChildren");
45439
46982
  return adapter.listChildren(input);
45440
46983
  }
45441
46984
  function executeContentControlsGetParent2(adapter, input) {
46985
+ validateCCInput2(input, "contentControls.getParent");
46986
+ validateCCTarget2(input.target, "contentControls.getParent");
45442
46987
  return adapter.getParent(input);
45443
46988
  }
45444
46989
  function executeContentControlsWrap2(adapter, input, options) {
46990
+ validateCCInput2(input, "contentControls.wrap");
46991
+ requireNodeKind2(input.kind, "kind", "contentControls.wrap");
46992
+ validateCCTarget2(input.target, "contentControls.wrap");
45445
46993
  return adapter.wrap(input, options);
45446
46994
  }
45447
46995
  function executeContentControlsUnwrap2(adapter, input, options) {
46996
+ validateCCInput2(input, "contentControls.unwrap");
46997
+ validateCCTarget2(input.target, "contentControls.unwrap");
45448
46998
  return adapter.unwrap(input, options);
45449
46999
  }
45450
47000
  function executeContentControlsDelete2(adapter, input, options) {
47001
+ validateCCInput2(input, "contentControls.delete");
47002
+ validateCCTarget2(input.target, "contentControls.delete");
45451
47003
  return adapter.delete(input, options);
45452
47004
  }
45453
47005
  function executeContentControlsCopy2(adapter, input, options) {
47006
+ validateCCInput2(input, "contentControls.copy");
47007
+ validateCCTarget2(input.target, "contentControls.copy");
47008
+ validateCCTarget2(input.destination, "contentControls.copy (destination)");
45454
47009
  return adapter.copy(input, options);
45455
47010
  }
45456
47011
  function executeContentControlsMove2(adapter, input, options) {
47012
+ validateCCInput2(input, "contentControls.move");
47013
+ validateCCTarget2(input.target, "contentControls.move");
47014
+ validateCCTarget2(input.destination, "contentControls.move (destination)");
45457
47015
  return adapter.move(input, options);
45458
47016
  }
45459
47017
  function executeContentControlsPatch2(adapter, input, options) {
47018
+ validateCCInput2(input, "contentControls.patch");
47019
+ validateCCTarget2(input.target, "contentControls.patch");
47020
+ if (input.appearance !== undefined && input.appearance !== null && !VALID_CC_APPEARANCES2.has(input.appearance))
47021
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patch appearance must be one of: ${[...VALID_CC_APPEARANCES2].join(", ")}.`, {
47022
+ field: "appearance",
47023
+ value: input.appearance
47024
+ });
47025
+ if (input.showingPlaceholder !== undefined && typeof input.showingPlaceholder !== "boolean")
47026
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patch showingPlaceholder must be a boolean, got ${typeof input.showingPlaceholder}.`, {
47027
+ field: "showingPlaceholder",
47028
+ value: input.showingPlaceholder
47029
+ });
47030
+ if (input.temporary !== undefined && typeof input.temporary !== "boolean")
47031
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patch temporary must be a boolean, got ${typeof input.temporary}.`, {
47032
+ field: "temporary",
47033
+ value: input.temporary
47034
+ });
47035
+ if (input.tabIndex !== undefined && input.tabIndex !== null && !isInteger2(input.tabIndex))
47036
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patch tabIndex must be an integer or null, got ${typeof input.tabIndex}.`, {
47037
+ field: "tabIndex",
47038
+ value: input.tabIndex
47039
+ });
45460
47040
  return adapter.patch(input, options);
45461
47041
  }
45462
47042
  function executeContentControlsSetLockMode2(adapter, input, options) {
47043
+ validateCCInput2(input, "contentControls.setLockMode");
47044
+ validateCCTarget2(input.target, "contentControls.setLockMode");
47045
+ if (!VALID_LOCK_MODES$1.has(input.lockMode))
47046
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.setLockMode lockMode must be one of: ${[...VALID_LOCK_MODES$1].join(", ")}.`, {
47047
+ field: "lockMode",
47048
+ value: input.lockMode
47049
+ });
45463
47050
  return adapter.setLockMode(input, options);
45464
47051
  }
45465
47052
  function executeContentControlsSetType2(adapter, input, options) {
47053
+ validateCCInput2(input, "contentControls.setType");
47054
+ validateCCTarget2(input.target, "contentControls.setType");
47055
+ if (!VALID_CC_TYPES2.has(input.controlType))
47056
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.setType controlType must be one of: ${[...VALID_CC_TYPES2].join(", ")}.`, {
47057
+ field: "controlType",
47058
+ value: input.controlType
47059
+ });
45466
47060
  return adapter.setType(input, options);
45467
47061
  }
45468
47062
  function executeContentControlsGetContent2(adapter, input) {
47063
+ validateCCInput2(input, "contentControls.getContent");
47064
+ validateCCTarget2(input.target, "contentControls.getContent");
45469
47065
  return adapter.getContent(input);
45470
47066
  }
45471
47067
  function executeContentControlsReplaceContent2(adapter, input, options) {
47068
+ validateCCInput2(input, "contentControls.replaceContent");
47069
+ validateCCTarget2(input.target, "contentControls.replaceContent");
47070
+ validateContentPayload2(input, "contentControls.replaceContent");
45472
47071
  return adapter.replaceContent(input, options);
45473
47072
  }
45474
47073
  function executeContentControlsClearContent2(adapter, input, options) {
47074
+ validateCCInput2(input, "contentControls.clearContent");
47075
+ validateCCTarget2(input.target, "contentControls.clearContent");
45475
47076
  return adapter.clearContent(input, options);
45476
47077
  }
45477
47078
  function executeContentControlsAppendContent2(adapter, input, options) {
47079
+ validateCCInput2(input, "contentControls.appendContent");
47080
+ validateCCTarget2(input.target, "contentControls.appendContent");
47081
+ validateContentPayload2(input, "contentControls.appendContent");
45478
47082
  return adapter.appendContent(input, options);
45479
47083
  }
45480
47084
  function executeContentControlsPrependContent2(adapter, input, options) {
47085
+ validateCCInput2(input, "contentControls.prependContent");
47086
+ validateCCTarget2(input.target, "contentControls.prependContent");
47087
+ validateContentPayload2(input, "contentControls.prependContent");
45481
47088
  return adapter.prependContent(input, options);
45482
47089
  }
45483
47090
  function executeContentControlsInsertBefore2(adapter, input, options) {
47091
+ validateCCInput2(input, "contentControls.insertBefore");
47092
+ validateCCTarget2(input.target, "contentControls.insertBefore");
47093
+ validateContentPayload2(input, "contentControls.insertBefore");
45484
47094
  return adapter.insertBefore(input, options);
45485
47095
  }
45486
47096
  function executeContentControlsInsertAfter2(adapter, input, options) {
47097
+ validateCCInput2(input, "contentControls.insertAfter");
47098
+ validateCCTarget2(input.target, "contentControls.insertAfter");
47099
+ validateContentPayload2(input, "contentControls.insertAfter");
45487
47100
  return adapter.insertAfter(input, options);
45488
47101
  }
45489
47102
  function executeContentControlsGetBinding2(adapter, input) {
47103
+ validateCCInput2(input, "contentControls.getBinding");
47104
+ validateCCTarget2(input.target, "contentControls.getBinding");
45490
47105
  return adapter.getBinding(input);
45491
47106
  }
45492
47107
  function executeContentControlsSetBinding2(adapter, input, options) {
47108
+ validateCCInput2(input, "contentControls.setBinding");
47109
+ validateCCTarget2(input.target, "contentControls.setBinding");
47110
+ requireString3(input.storeItemId, "storeItemId", "contentControls.setBinding");
47111
+ requireString3(input.xpath, "xpath", "contentControls.setBinding");
45493
47112
  return adapter.setBinding(input, options);
45494
47113
  }
45495
47114
  function executeContentControlsClearBinding2(adapter, input, options) {
47115
+ validateCCInput2(input, "contentControls.clearBinding");
47116
+ validateCCTarget2(input.target, "contentControls.clearBinding");
45496
47117
  return adapter.clearBinding(input, options);
45497
47118
  }
45498
47119
  function executeContentControlsGetRawProperties2(adapter, input) {
47120
+ validateCCInput2(input, "contentControls.getRawProperties");
47121
+ validateCCTarget2(input.target, "contentControls.getRawProperties");
45499
47122
  return adapter.getRawProperties(input);
45500
47123
  }
45501
47124
  function executeContentControlsPatchRawProperties2(adapter, input, options) {
47125
+ validateCCInput2(input, "contentControls.patchRawProperties");
47126
+ validateCCTarget2(input.target, "contentControls.patchRawProperties");
47127
+ if (!Array.isArray(input.patches))
47128
+ throw new DocumentApiValidationError2("INVALID_INPUT", "contentControls.patchRawProperties patches must be an array.", {
47129
+ field: "patches",
47130
+ value: input.patches
47131
+ });
47132
+ for (let i$1 = 0;i$1 < input.patches.length; i$1++) {
47133
+ const patch = input.patches[i$1];
47134
+ if (!isRecord4(patch))
47135
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patchRawProperties patches[${i$1}] must be an object.`, {
47136
+ field: `patches[${i$1}]`,
47137
+ value: patch
47138
+ });
47139
+ if (!VALID_RAW_PATCH_OPS2.has(patch.op))
47140
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patchRawProperties patches[${i$1}].op must be one of: ${[...VALID_RAW_PATCH_OPS2].join(", ")}.`, {
47141
+ field: `patches[${i$1}].op`,
47142
+ value: patch.op
47143
+ });
47144
+ if (typeof patch.name !== "string" || patch.name === "")
47145
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patchRawProperties patches[${i$1}].name must be a non-empty string.`, {
47146
+ field: `patches[${i$1}].name`,
47147
+ value: patch.name
47148
+ });
47149
+ }
45502
47150
  return adapter.patchRawProperties(input, options);
45503
47151
  }
45504
47152
  function executeContentControlsValidateWordCompatibility2(adapter, input) {
47153
+ validateCCInput2(input, "contentControls.validateWordCompatibility");
47154
+ validateCCTarget2(input.target, "contentControls.validateWordCompatibility");
45505
47155
  return adapter.validateWordCompatibility(input);
45506
47156
  }
45507
47157
  function executeContentControlsNormalizeWordCompatibility2(adapter, input, options) {
47158
+ validateCCInput2(input, "contentControls.normalizeWordCompatibility");
47159
+ validateCCTarget2(input.target, "contentControls.normalizeWordCompatibility");
45508
47160
  return adapter.normalizeWordCompatibility(input, options);
45509
47161
  }
45510
47162
  function executeContentControlsNormalizeTagPayload2(adapter, input, options) {
47163
+ validateCCInput2(input, "contentControls.normalizeTagPayload");
47164
+ validateCCTarget2(input.target, "contentControls.normalizeTagPayload");
45511
47165
  return adapter.normalizeTagPayload(input, options);
45512
47166
  }
45513
47167
  function executeContentControlsTextSetMultiline2(adapter, input, options) {
47168
+ validateCCInput2(input, "contentControls.text.setMultiline");
47169
+ validateCCTarget2(input.target, "contentControls.text.setMultiline");
47170
+ requireBoolean2(input.multiline, "multiline", "contentControls.text.setMultiline");
45514
47171
  return adapter.text.setMultiline(input, options);
45515
47172
  }
45516
47173
  function executeContentControlsTextSetValue2(adapter, input, options) {
47174
+ validateCCInput2(input, "contentControls.text.setValue");
47175
+ validateCCTarget2(input.target, "contentControls.text.setValue");
47176
+ if (typeof input.value !== "string")
47177
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.text.setValue value must be a string.`, {
47178
+ field: "value",
47179
+ value: input.value
47180
+ });
45517
47181
  return adapter.text.setValue(input, options);
45518
47182
  }
45519
47183
  function executeContentControlsTextClearValue2(adapter, input, options) {
47184
+ validateCCInput2(input, "contentControls.text.clearValue");
47185
+ validateCCTarget2(input.target, "contentControls.text.clearValue");
45520
47186
  return adapter.text.clearValue(input, options);
45521
47187
  }
45522
47188
  function executeContentControlsDateSetValue2(adapter, input, options) {
47189
+ validateCCInput2(input, "contentControls.date.setValue");
47190
+ validateCCTarget2(input.target, "contentControls.date.setValue");
47191
+ if (typeof input.value !== "string")
47192
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.date.setValue value must be a string.`, {
47193
+ field: "value",
47194
+ value: input.value
47195
+ });
45523
47196
  return adapter.date.setValue(input, options);
45524
47197
  }
45525
47198
  function executeContentControlsDateClearValue2(adapter, input, options) {
47199
+ validateCCInput2(input, "contentControls.date.clearValue");
47200
+ validateCCTarget2(input.target, "contentControls.date.clearValue");
45526
47201
  return adapter.date.clearValue(input, options);
45527
47202
  }
45528
47203
  function executeContentControlsDateSetDisplayFormat2(adapter, input, options) {
47204
+ validateCCInput2(input, "contentControls.date.setDisplayFormat");
47205
+ validateCCTarget2(input.target, "contentControls.date.setDisplayFormat");
47206
+ requireString3(input.format, "format", "contentControls.date.setDisplayFormat");
45529
47207
  return adapter.date.setDisplayFormat(input, options);
45530
47208
  }
45531
47209
  function executeContentControlsDateSetDisplayLocale2(adapter, input, options) {
47210
+ validateCCInput2(input, "contentControls.date.setDisplayLocale");
47211
+ validateCCTarget2(input.target, "contentControls.date.setDisplayLocale");
47212
+ requireString3(input.locale, "locale", "contentControls.date.setDisplayLocale");
45532
47213
  return adapter.date.setDisplayLocale(input, options);
45533
47214
  }
45534
47215
  function executeContentControlsDateSetStorageFormat2(adapter, input, options) {
47216
+ validateCCInput2(input, "contentControls.date.setStorageFormat");
47217
+ validateCCTarget2(input.target, "contentControls.date.setStorageFormat");
47218
+ requireString3(input.format, "format", "contentControls.date.setStorageFormat");
45535
47219
  return adapter.date.setStorageFormat(input, options);
45536
47220
  }
45537
47221
  function executeContentControlsDateSetCalendar2(adapter, input, options) {
47222
+ validateCCInput2(input, "contentControls.date.setCalendar");
47223
+ validateCCTarget2(input.target, "contentControls.date.setCalendar");
47224
+ requireString3(input.calendar, "calendar", "contentControls.date.setCalendar");
45538
47225
  return adapter.date.setCalendar(input, options);
45539
47226
  }
45540
47227
  function executeContentControlsCheckboxGetState2(adapter, input) {
47228
+ validateCCInput2(input, "contentControls.checkbox.getState");
47229
+ validateCCTarget2(input.target, "contentControls.checkbox.getState");
45541
47230
  return adapter.checkbox.getState(input);
45542
47231
  }
45543
47232
  function executeContentControlsCheckboxSetState2(adapter, input, options) {
47233
+ validateCCInput2(input, "contentControls.checkbox.setState");
47234
+ validateCCTarget2(input.target, "contentControls.checkbox.setState");
47235
+ requireBoolean2(input.checked, "checked", "contentControls.checkbox.setState");
45544
47236
  return adapter.checkbox.setState(input, options);
45545
47237
  }
45546
47238
  function executeContentControlsCheckboxToggle2(adapter, input, options) {
47239
+ validateCCInput2(input, "contentControls.checkbox.toggle");
47240
+ validateCCTarget2(input.target, "contentControls.checkbox.toggle");
45547
47241
  return adapter.checkbox.toggle(input, options);
45548
47242
  }
45549
47243
  function executeContentControlsCheckboxSetSymbolPair2(adapter, input, options) {
47244
+ validateCCInput2(input, "contentControls.checkbox.setSymbolPair");
47245
+ validateCCTarget2(input.target, "contentControls.checkbox.setSymbolPair");
47246
+ validateSymbol2(input.checkedSymbol, "checkedSymbol", "contentControls.checkbox.setSymbolPair");
47247
+ validateSymbol2(input.uncheckedSymbol, "uncheckedSymbol", "contentControls.checkbox.setSymbolPair");
45550
47248
  return adapter.checkbox.setSymbolPair(input, options);
45551
47249
  }
45552
47250
  function executeContentControlsChoiceListGetItems2(adapter, input) {
47251
+ validateCCInput2(input, "contentControls.choiceList.getItems");
47252
+ validateCCTarget2(input.target, "contentControls.choiceList.getItems");
45553
47253
  return adapter.choiceList.getItems(input);
45554
47254
  }
45555
47255
  function executeContentControlsChoiceListSetItems2(adapter, input, options) {
47256
+ validateCCInput2(input, "contentControls.choiceList.setItems");
47257
+ validateCCTarget2(input.target, "contentControls.choiceList.setItems");
47258
+ if (!Array.isArray(input.items))
47259
+ throw new DocumentApiValidationError2("INVALID_INPUT", "contentControls.choiceList.setItems items must be an array.", {
47260
+ field: "items",
47261
+ value: input.items
47262
+ });
47263
+ for (let i$1 = 0;i$1 < input.items.length; i$1++) {
47264
+ const item = input.items[i$1];
47265
+ if (!isRecord4(item) || typeof item.displayText !== "string" || typeof item.value !== "string")
47266
+ throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.choiceList.setItems items[${i$1}] must be { displayText: string, value: string }.`, {
47267
+ field: `items[${i$1}]`,
47268
+ value: item
47269
+ });
47270
+ }
45556
47271
  return adapter.choiceList.setItems(input, options);
45557
47272
  }
45558
47273
  function executeContentControlsChoiceListSetSelected2(adapter, input, options) {
47274
+ validateCCInput2(input, "contentControls.choiceList.setSelected");
47275
+ validateCCTarget2(input.target, "contentControls.choiceList.setSelected");
47276
+ if (typeof input.value !== "string")
47277
+ throw new DocumentApiValidationError2("INVALID_INPUT", "contentControls.choiceList.setSelected value must be a string.", {
47278
+ field: "value",
47279
+ value: input.value
47280
+ });
45559
47281
  return adapter.choiceList.setSelected(input, options);
45560
47282
  }
45561
47283
  function executeContentControlsRepeatingSectionListItems2(adapter, input) {
47284
+ validateCCInput2(input, "contentControls.repeatingSection.listItems");
47285
+ validateCCTarget2(input.target, "contentControls.repeatingSection.listItems");
45562
47286
  return adapter.repeatingSection.listItems(input);
45563
47287
  }
45564
47288
  function executeContentControlsRepeatingSectionInsertItemBefore2(adapter, input, options) {
47289
+ validateCCInput2(input, "contentControls.repeatingSection.insertItemBefore");
47290
+ validateCCTarget2(input.target, "contentControls.repeatingSection.insertItemBefore");
47291
+ requireIndex2(input.index, "index", "contentControls.repeatingSection.insertItemBefore");
45565
47292
  return adapter.repeatingSection.insertItemBefore(input, options);
45566
47293
  }
45567
47294
  function executeContentControlsRepeatingSectionInsertItemAfter2(adapter, input, options) {
47295
+ validateCCInput2(input, "contentControls.repeatingSection.insertItemAfter");
47296
+ validateCCTarget2(input.target, "contentControls.repeatingSection.insertItemAfter");
47297
+ requireIndex2(input.index, "index", "contentControls.repeatingSection.insertItemAfter");
45568
47298
  return adapter.repeatingSection.insertItemAfter(input, options);
45569
47299
  }
45570
47300
  function executeContentControlsRepeatingSectionCloneItem2(adapter, input, options) {
47301
+ validateCCInput2(input, "contentControls.repeatingSection.cloneItem");
47302
+ validateCCTarget2(input.target, "contentControls.repeatingSection.cloneItem");
47303
+ requireIndex2(input.index, "index", "contentControls.repeatingSection.cloneItem");
45571
47304
  return adapter.repeatingSection.cloneItem(input, options);
45572
47305
  }
45573
47306
  function executeContentControlsRepeatingSectionDeleteItem2(adapter, input, options) {
47307
+ validateCCInput2(input, "contentControls.repeatingSection.deleteItem");
47308
+ validateCCTarget2(input.target, "contentControls.repeatingSection.deleteItem");
47309
+ requireIndex2(input.index, "index", "contentControls.repeatingSection.deleteItem");
45574
47310
  return adapter.repeatingSection.deleteItem(input, options);
45575
47311
  }
45576
47312
  function executeContentControlsRepeatingSectionSetAllowInsertDelete2(adapter, input, options) {
47313
+ validateCCInput2(input, "contentControls.repeatingSection.setAllowInsertDelete");
47314
+ validateCCTarget2(input.target, "contentControls.repeatingSection.setAllowInsertDelete");
47315
+ requireBoolean2(input.allow, "allow", "contentControls.repeatingSection.setAllowInsertDelete");
45577
47316
  return adapter.repeatingSection.setAllowInsertDelete(input, options);
45578
47317
  }
45579
47318
  function executeContentControlsGroupWrap2(adapter, input, options) {
47319
+ validateCCInput2(input, "contentControls.group.wrap");
47320
+ validateCCTarget2(input.target, "contentControls.group.wrap");
45580
47321
  return adapter.group.wrap(input, options);
45581
47322
  }
45582
47323
  function executeContentControlsGroupUngroup2(adapter, input, options) {
47324
+ validateCCInput2(input, "contentControls.group.ungroup");
47325
+ validateCCTarget2(input.target, "contentControls.group.ungroup");
45583
47326
  return adapter.group.ungroup(input, options);
45584
47327
  }
45585
47328
  function executeCreateContentControl2(adapter, input, options) {
47329
+ validateCCInput2(input, "create.contentControl");
47330
+ requireNodeKind2(input.kind, "kind", "create.contentControl");
47331
+ if (input.controlType !== undefined && !VALID_CC_TYPES2.has(input.controlType))
47332
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.contentControl controlType must be one of: ${[...VALID_CC_TYPES2].join(", ")}.`, {
47333
+ field: "controlType",
47334
+ value: input.controlType
47335
+ });
47336
+ if (input.lockMode !== undefined && !VALID_LOCK_MODES$1.has(input.lockMode))
47337
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.contentControl lockMode must be one of: ${[...VALID_LOCK_MODES$1].join(", ")}.`, {
47338
+ field: "lockMode",
47339
+ value: input.lockMode
47340
+ });
47341
+ if (input.target !== undefined)
47342
+ validateCCTarget2(input.target, "create.contentControl");
47343
+ if (input.content !== undefined && typeof input.content !== "string")
47344
+ throw new DocumentApiValidationError2("INVALID_INPUT", `create.contentControl content must be a string, got ${typeof input.content}.`, {
47345
+ field: "content",
47346
+ value: input.content
47347
+ });
45586
47348
  return adapter.create(input, options);
45587
47349
  }
45588
47350
  function validateBookmarkTarget2(target, operationName) {
@@ -49007,6 +50769,18 @@ function buildPath(existingPath = [], node3, branch) {
49007
50769
  path2.push(branch);
49008
50770
  return path2;
49009
50771
  }
50772
+ function isInlineNode(node3, schema) {
50773
+ if (!node3 || typeof node3 !== "object" || typeof node3.type !== "string")
50774
+ return false;
50775
+ const nodeType = schema?.nodes?.[node3.type];
50776
+ if (nodeType) {
50777
+ if (typeof nodeType.isInline === "boolean")
50778
+ return nodeType.isInline;
50779
+ if (nodeType.spec?.group && typeof nodeType.spec.group === "string")
50780
+ return nodeType.spec.group.split(" ").includes("inline");
50781
+ }
50782
+ return INLINE_FALLBACK_TYPES.has(node3.type);
50783
+ }
49010
50784
  function getTableStyleId(path2) {
49011
50785
  const tbl = path2.find((ancestor) => ancestor.name === "w:tbl");
49012
50786
  if (!tbl)
@@ -49019,6 +50793,76 @@ function getTableStyleId(path2) {
49019
50793
  return;
49020
50794
  return tblStyle.attributes?.["w:val"];
49021
50795
  }
50796
+ function cloneParagraphAttrsForFragment(attrs, { keepSectPr = false } = {}) {
50797
+ if (!attrs)
50798
+ return {};
50799
+ const nextAttrs = { ...attrs };
50800
+ if (attrs.paragraphProperties && typeof attrs.paragraphProperties === "object") {
50801
+ nextAttrs.paragraphProperties = { ...attrs.paragraphProperties };
50802
+ if (!keepSectPr)
50803
+ delete nextAttrs.paragraphProperties.sectPr;
50804
+ }
50805
+ if (!keepSectPr)
50806
+ delete nextAttrs.pageBreakSource;
50807
+ return nextAttrs;
50808
+ }
50809
+ function hasSectionBreakAttrs(attrs) {
50810
+ return Boolean(attrs?.paragraphProperties?.sectPr);
50811
+ }
50812
+ function cloneWrapperParagraphAttrs(attrs) {
50813
+ return cloneParagraphAttrsForFragment(attrs, { keepSectPr: true });
50814
+ }
50815
+ function normalizeParagraphChildren(children, schema, textblockAttrs) {
50816
+ const normalized = [];
50817
+ let pendingInline = [];
50818
+ const flushInline = () => {
50819
+ if (!pendingInline.length)
50820
+ return;
50821
+ normalized.push({
50822
+ type: "paragraph",
50823
+ attrs: null,
50824
+ content: pendingInline,
50825
+ marks: []
50826
+ });
50827
+ pendingInline = [];
50828
+ };
50829
+ for (const child of children || []) {
50830
+ if (isInlineNode(child, schema)) {
50831
+ pendingInline.push(child);
50832
+ continue;
50833
+ }
50834
+ flushInline();
50835
+ if (child != null)
50836
+ normalized.push(child);
50837
+ }
50838
+ flushInline();
50839
+ const lastNodeIndex = normalized.length - 1;
50840
+ const isSingleBlockResult = normalized.length === 1 && normalized[0] != null && normalized[0]?.type !== "paragraph";
50841
+ const paragraphIndexes = normalized.reduce((indexes, node3, index2) => {
50842
+ if (node3?.type === "paragraph")
50843
+ indexes.push(index2);
50844
+ return indexes;
50845
+ }, []);
50846
+ const lastParagraphIndex = paragraphIndexes.length ? paragraphIndexes[paragraphIndexes.length - 1] : -1;
50847
+ const shouldAttachWrapperParagraph = isSingleBlockResult || hasSectionBreakAttrs(textblockAttrs) && lastNodeIndex !== lastParagraphIndex;
50848
+ paragraphIndexes.forEach((index2) => {
50849
+ normalized[index2] = {
50850
+ ...normalized[index2],
50851
+ attrs: cloneParagraphAttrsForFragment(textblockAttrs, { keepSectPr: !shouldAttachWrapperParagraph && index2 === lastParagraphIndex })
50852
+ };
50853
+ });
50854
+ if (shouldAttachWrapperParagraph) {
50855
+ const lastNode = normalized[lastNodeIndex];
50856
+ normalized[lastNodeIndex] = {
50857
+ ...lastNode,
50858
+ attrs: {
50859
+ ...lastNode?.attrs || {},
50860
+ wrapperParagraph: cloneWrapperParagraphAttrs(textblockAttrs)
50861
+ }
50862
+ };
50863
+ }
50864
+ return normalized;
50865
+ }
49022
50866
  function generateParagraphProperties(params) {
49023
50867
  const { node: node3 } = params;
49024
50868
  const { attrs = {} } = node3;
@@ -49103,6 +50947,21 @@ function translateParagraphNode(params) {
49103
50947
  attributes
49104
50948
  };
49105
50949
  }
50950
+ function partitionEncodedParagraphAttrs(encodedAttrs = {}) {
50951
+ const identityAttrs = {};
50952
+ const shareableAttrs = {};
50953
+ Object.entries(encodedAttrs).forEach(([key, value]) => {
50954
+ if (IDENTITY_ATTR_NAMES.has(key)) {
50955
+ identityAttrs[key] = value;
50956
+ return;
50957
+ }
50958
+ shareableAttrs[key] = value;
50959
+ });
50960
+ return {
50961
+ identityAttrs,
50962
+ shareableAttrs
50963
+ };
50964
+ }
49106
50965
  function generateDocxRandomId(length = 8) {
49107
50966
  return Math.floor(Math.random() * 2147483648).toString(16).toUpperCase().padStart(length, "0").slice(0, length);
49108
50967
  }
@@ -49253,7 +51112,6 @@ function normalizeTableCellContent(content$2, editor) {
49253
51112
  return content$2;
49254
51113
  const normalized = [];
49255
51114
  const pendingForNextBlock = [];
49256
- const schema = editor?.schema;
49257
51115
  const cloneBlock = (node3) => {
49258
51116
  if (!node3)
49259
51117
  return node3;
@@ -49268,28 +51126,12 @@ function normalizeTableCellContent(content$2, editor) {
49268
51126
  node3.content = [];
49269
51127
  return node3.content;
49270
51128
  };
49271
- const isInlineNode = (node3) => {
49272
- if (!node3 || typeof node3.type !== "string")
49273
- return false;
49274
- if (node3.type === "text")
49275
- return true;
49276
- if (node3.type === "bookmarkStart" || node3.type === "bookmarkEnd")
49277
- return true;
49278
- const nodeType = schema?.nodes?.[node3.type];
49279
- if (nodeType) {
49280
- if (typeof nodeType.isInline === "boolean")
49281
- return nodeType.isInline;
49282
- if (nodeType.spec?.group && typeof nodeType.spec.group === "string")
49283
- return nodeType.spec.group.split(" ").includes("inline");
49284
- }
49285
- return false;
49286
- };
49287
51129
  for (const node3 of content$2) {
49288
51130
  if (!node3 || typeof node3.type !== "string") {
49289
51131
  normalized.push(node3);
49290
51132
  continue;
49291
51133
  }
49292
- if (!isInlineNode(node3)) {
51134
+ if (!isInlineNode(node3, editor?.schema)) {
49293
51135
  const blockNode = cloneBlock(node3);
49294
51136
  if (pendingForNextBlock.length) {
49295
51137
  const blockContent = ensureArray(blockNode);
@@ -49303,7 +51145,7 @@ function normalizeTableCellContent(content$2, editor) {
49303
51145
  pendingForNextBlock.push(node3);
49304
51146
  else {
49305
51147
  const lastNode = normalized[normalized.length - 1];
49306
- if (!lastNode || typeof lastNode.type !== "string" || isInlineNode(lastNode)) {
51148
+ if (!lastNode || typeof lastNode.type !== "string" || isInlineNode(lastNode, editor?.schema)) {
49307
51149
  pendingForNextBlock.push(node3);
49308
51150
  continue;
49309
51151
  }
@@ -49316,7 +51158,7 @@ function normalizeTableCellContent(content$2, editor) {
49316
51158
  if (pendingForNextBlock.length) {
49317
51159
  if (normalized.length) {
49318
51160
  const lastNode = normalized[normalized.length - 1];
49319
- if (lastNode && typeof lastNode.type === "string" && !isInlineNode(lastNode)) {
51161
+ if (lastNode && typeof lastNode.type === "string" && !isInlineNode(lastNode, editor?.schema)) {
49320
51162
  ensureArray(lastNode).push(...pendingForNextBlock);
49321
51163
  pendingForNextBlock.length = 0;
49322
51164
  }
@@ -51439,11 +53281,16 @@ function preProcessCitationInstruction(nodesToCombine, instrText, _docx, instruc
51439
53281
  }];
51440
53282
  }
51441
53283
  function preProcessBibliographyInstruction(nodesToCombine, instrText) {
53284
+ const contentNodes = Array.isArray(nodesToCombine) && nodesToCombine.length > 0 ? nodesToCombine : [{
53285
+ name: "w:p",
53286
+ type: "element",
53287
+ elements: []
53288
+ }];
51442
53289
  return [{
51443
53290
  name: "sd:bibliography",
51444
53291
  type: "element",
51445
53292
  attributes: { instruction: instrText },
51446
- elements: nodesToCombine
53293
+ elements: contentNodes
51447
53294
  }];
51448
53295
  }
51449
53296
  function preProcessTaInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
@@ -59370,7 +61217,7 @@ function handleHtmlPaste(html2, editor, source) {
59370
61217
  cleanedHtml = htmlHandler(html2, editor);
59371
61218
  if (cleanedHtml?.dataset)
59372
61219
  cleanedHtml.dataset.superdocImport = "true";
59373
- let doc$2 = DOMParser$1.fromSchema(editor.schema).parse(cleanedHtml);
61220
+ let doc$2 = DOMParser$1.fromSchema(editor.schema).parse(cleanedHtml, { preserveWhitespace: true });
59374
61221
  doc$2 = mergeAdjacentTableFragments(doc$2);
59375
61222
  doc$2 = wrapTextsInRuns(doc$2);
59376
61223
  const { dispatch, state } = editor.view;
@@ -65162,13 +67009,38 @@ function translateDocumentPartObj(params) {
65162
67009
  ...params,
65163
67010
  nodes: node3.content
65164
67011
  });
65165
- return {
67012
+ const result = {
65166
67013
  name: "w:sdt",
65167
67014
  elements: [generateSdtPrForDocPartObj(attrs), {
65168
67015
  name: "w:sdtContent",
65169
67016
  elements: childContent
65170
67017
  }]
65171
67018
  };
67019
+ if (!attrs.wrapperParagraph)
67020
+ return result;
67021
+ return wrapDocumentPartInParagraph(result, attrs.wrapperParagraph);
67022
+ }
67023
+ function wrapDocumentPartInParagraph(sdtNode, wrapperParagraphAttrs) {
67024
+ const elements = [];
67025
+ const pPr = generateParagraphProperties({ node: {
67026
+ type: "paragraph",
67027
+ attrs: wrapperParagraphAttrs
67028
+ } });
67029
+ if (pPr)
67030
+ elements.push(pPr);
67031
+ elements.push(sdtNode);
67032
+ const attributes = {
67033
+ ...extractRawParagraphXmlAttributes(wrapperParagraphAttrs),
67034
+ ...translator.decodeAttributes({ node: { attrs: wrapperParagraphAttrs } })
67035
+ };
67036
+ return {
67037
+ name: "w:p",
67038
+ elements,
67039
+ ...Object.keys(attributes).length ? { attributes } : {}
67040
+ };
67041
+ }
67042
+ function extractRawParagraphXmlAttributes(attrs = {}) {
67043
+ return Object.fromEntries(Object.entries(attrs).filter(([key]) => key.includes(":")));
65172
67044
  }
65173
67045
  function sanitizeId(id) {
65174
67046
  if (typeof id === "string" && id.trim() !== "")
@@ -72069,7 +73941,7 @@ function resolveControlType(attrs) {
72069
73941
  }
72070
73942
  function resolveLockMode(attrs) {
72071
73943
  const raw = attrs.lockMode;
72072
- if (typeof raw === "string" && VALID_LOCK_MODES.includes(raw))
73944
+ if (typeof raw === "string" && VALID_LOCK_MODES2.includes(raw))
72073
73945
  return raw;
72074
73946
  return "unlocked";
72075
73947
  }
@@ -75221,7 +77093,7 @@ var isRegExp = (value) => {
75221
77093
  }, decode$73 = (attrs) => {
75222
77094
  const { pos } = attrs || {};
75223
77095
  return pos?.toString();
75224
- }, attributes_default$6, DocumentApiValidationError2, NODE_TYPES2, BLOCK_NODE_TYPES2, DELETABLE_BLOCK_NODE_TYPES2, INLINE_NODE_TYPES2, SELECTION_EDGE_NODE_TYPES2, MARK_KEYS, INLINE_DIRECTIVES2, SD_CONTENT_NODE_KINDS2, SD_INLINE_NODE_KINDS2, PLACEMENT_VALUES2, TABLE_NESTING_POLICY_VALUES2, DEFAULT_NESTING_POLICY2, STORY_TYPES2, STORY_HEADER_FOOTER_KINDS2, STORY_HEADER_FOOTER_VARIANTS2, STORY_HEADER_FOOTER_RESOLUTIONS2, STORY_HEADER_FOOTER_ON_WRITE_VALUES2, BLOCK_NODE_TYPES_SET2, NESTING_POLICY_ALLOWED_KEYS2, schemaBooleanOrNull2 = () => ({ oneOf: [{ type: "boolean" }, { type: "null" }] }), schemaStringOrNull2 = () => ({ oneOf: [{
77096
+ }, attributes_default$6, DocumentApiValidationError2, NODE_KINDS2, NODE_TYPES2, BLOCK_NODE_TYPES2, DELETABLE_BLOCK_NODE_TYPES2, INLINE_NODE_TYPES2, SELECTION_EDGE_NODE_TYPES2, MARK_KEYS, INLINE_DIRECTIVES2, SD_CONTENT_NODE_KINDS2, SD_INLINE_NODE_KINDS2, PLACEMENT_VALUES2, TABLE_NESTING_POLICY_VALUES2, DEFAULT_NESTING_POLICY2, STORY_TYPES2, STORY_HEADER_FOOTER_KINDS2, STORY_HEADER_FOOTER_VARIANTS2, STORY_HEADER_FOOTER_RESOLUTIONS2, STORY_HEADER_FOOTER_ON_WRITE_VALUES2, BLOCK_NODE_TYPES_SET2, NESTING_POLICY_ALLOWED_KEYS2, schemaBooleanOrNull2 = () => ({ oneOf: [{ type: "boolean" }, { type: "null" }] }), schemaStringOrNull2 = () => ({ oneOf: [{
75225
77097
  type: "string",
75226
77098
  minLength: 1
75227
77099
  }, { type: "null" }] }), schemaNumberOrNull2 = () => ({ oneOf: [{ type: "number" }, { type: "null" }] }), schemaObjectOrNull2 = (properties) => ({ oneOf: [{
@@ -75261,7 +77133,7 @@ var isRegExp = (value) => {
75261
77133
  tracked: false,
75262
77134
  carrier: runAttributeCarrier2(runPropertyKey ?? key),
75263
77135
  schema
75264
- }), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES2, SNAPSHOT_VERSION2 = "sd-diff-snapshot/v1", PAYLOAD_VERSION2 = "sd-diff-payload/v1", VALID_STYLE_OPTION_FLAGS2, TABLE_BORDER_COLOR_PATTERN2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, PATCH_FIELDS2, VALID_CREATE_LOCATION_KINDS2, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$216) => ({
77136
+ }), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, SNAPSHOT_VERSION2 = "sd-diff-snapshot/v1", PAYLOAD_VERSION2 = "sd-diff-payload/v1", VALID_STYLE_OPTION_FLAGS2, TABLE_BORDER_COLOR_PATTERN2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_CREATE_LOCATION_KINDS2, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$216) => ({
75265
77137
  handlerName,
75266
77138
  handler: (params) => {
75267
77139
  const { nodes } = params;
@@ -75509,8 +77381,8 @@ var isRegExp = (value) => {
75509
77381
  }
75510
77382
  }
75511
77383
  return css;
75512
- }, SUPPORTED_ALTERNATE_CONTENT_REQUIRES, XML_NODE_NAME$36 = "mc:AlternateContent", SD_NODE_NAME$32, validXmlAttributes$12, config$35, translator$31, translator$37, translator$39, translator$40, translator$208, translator$51, translator$54, translator$57, translator$65, translator$80, translator$85, translator$86, translator$87, translator$89, translator$102, translator$78, translator$111, propertyTranslators$16, translator$113, translator$118, translator$119, translator$45, translator$209, translator$48, translator$201, translator$103, translator$203, translator$133, translator$204, translator$169, translator$206, propertyTranslators$15, translator$121, translator$127, translator$120, translator$144, translator$145, translator$146, translator$147, propertyTranslators$14, translator$151, translator$190, translator$183, translator$191, translator$192, translator$195, translator$196, propertyTranslators$13, translator$126, handleParagraphNode$1 = (params) => {
75513
- const { nodes, nodeListHandler, filename } = params;
77384
+ }, SUPPORTED_ALTERNATE_CONTENT_REQUIRES, XML_NODE_NAME$36 = "mc:AlternateContent", SD_NODE_NAME$32, validXmlAttributes$12, config$35, translator$31, translator$37, translator$39, translator$40, translator$208, translator$51, translator$54, translator$57, translator$65, translator$80, translator$85, translator$86, translator$87, translator$89, translator$102, translator$78, translator$111, propertyTranslators$16, translator$113, translator$118, translator$119, translator$45, translator$209, translator$48, translator$201, translator$103, translator$203, translator$133, translator$204, translator$169, translator$206, propertyTranslators$15, translator$121, translator$127, translator$120, translator$144, translator$145, translator$146, translator$147, propertyTranslators$14, translator$151, translator$190, translator$183, translator$191, translator$192, translator$195, translator$196, propertyTranslators$13, translator$126, INLINE_FALLBACK_TYPES, handleParagraphNode$1 = (params) => {
77385
+ const { nodes, nodeListHandler, filename, editor } = params;
75514
77386
  const node3 = carbonCopy(nodes[0]);
75515
77387
  let schemaNode;
75516
77388
  const pPr = node3.elements?.find((el) => el.name === "w:pPr");
@@ -75554,17 +77426,27 @@ var isRegExp = (value) => {
75554
77426
  schemaNode.attrs.paragraphProperties = inlineParagraphProperties;
75555
77427
  schemaNode.attrs.rsidRDefault = node3.attributes?.["w:rsidRDefault"];
75556
77428
  schemaNode.attrs.filename = filename;
75557
- if (schemaNode && schemaNode.content)
75558
- schemaNode = {
75559
- ...schemaNode,
75560
- content: mergeTextNodes(schemaNode.content)
75561
- };
75562
77429
  const sectPr = pPr?.elements?.find((el) => el.name === "w:sectPr");
75563
77430
  if (sectPr) {
75564
77431
  schemaNode.attrs.paragraphProperties.sectPr = sectPr;
75565
77432
  schemaNode.attrs.pageBreakSource = "sectPr";
75566
77433
  }
75567
- return schemaNode;
77434
+ const normalizedNodes = normalizeParagraphChildren(schemaNode.content, editor?.schema, schemaNode.attrs).map((node$1) => {
77435
+ if (node$1?.type !== "paragraph" || !Array.isArray(node$1.content))
77436
+ return node$1;
77437
+ return {
77438
+ ...node$1,
77439
+ content: mergeTextNodes(node$1.content)
77440
+ };
77441
+ });
77442
+ if (!normalizedNodes.length)
77443
+ return {
77444
+ ...schemaNode,
77445
+ content: mergeTextNodes(schemaNode.content || [])
77446
+ };
77447
+ if (normalizedNodes.length === 1 && normalizedNodes[0]?.type === "paragraph")
77448
+ return normalizedNodes[0];
77449
+ return normalizedNodes;
75568
77450
  }, encode$62 = (attributes) => {
75569
77451
  return attributes["w:rsidDel"];
75570
77452
  }, decode$64 = (attrs) => {
@@ -75593,15 +77475,36 @@ var isRegExp = (value) => {
75593
77475
  return attributes["w14:textId"];
75594
77476
  }, decode$58 = (attrs) => {
75595
77477
  return attrs.textId;
75596
- }, attributes_default$5, XML_NODE_NAME$35 = "w:p", SD_NODE_NAME$31 = "paragraph", encode$55 = (params, encodedAttrs = {}) => {
77478
+ }, attributes_default$5, XML_NODE_NAME$35 = "w:p", SD_NODE_NAME$31 = "paragraph", IDENTITY_ATTR_NAMES, encode$55 = (params, encodedAttrs = {}) => {
75597
77479
  const node3 = handleParagraphNode$1(params);
75598
77480
  if (!node3)
75599
77481
  return;
75600
- if (encodedAttrs && Object.keys(encodedAttrs).length)
77482
+ if (encodedAttrs && Object.keys(encodedAttrs).length) {
77483
+ if (Array.isArray(node3)) {
77484
+ const { identityAttrs, shareableAttrs } = partitionEncodedParagraphAttrs(encodedAttrs);
77485
+ let appliedIdentityAttrs = false;
77486
+ return node3.map((child) => {
77487
+ if (child?.type !== "paragraph")
77488
+ return child;
77489
+ const attrs = {
77490
+ ...child.attrs || {},
77491
+ ...shareableAttrs
77492
+ };
77493
+ if (!appliedIdentityAttrs) {
77494
+ Object.assign(attrs, identityAttrs);
77495
+ appliedIdentityAttrs = true;
77496
+ }
77497
+ return {
77498
+ ...child,
77499
+ attrs
77500
+ };
77501
+ });
77502
+ }
75601
77503
  node3.attrs = {
75602
77504
  ...node3.attrs,
75603
77505
  ...encodedAttrs
75604
77506
  };
77507
+ }
75605
77508
  return node3;
75606
77509
  }, decode$57 = (params, decodedAttrs = {}) => {
75607
77510
  const translated = translateParagraphNode(params);
@@ -76508,10 +78411,10 @@ var isRegExp = (value) => {
76508
78411
  sdtPr
76509
78412
  }
76510
78413
  };
76511
- }, validGalleryTypeMap, inlineNodeTypes, SD_TOC_XML_NAME = "sd:tableOfContents", PARAGRAPH_XML_NAME = "w:p", PARAGRAPH_PROPERTIES_XML_NAME = "w:pPr", wrapInlineNode = (node3) => ({
78414
+ }, validGalleryTypeMap, inlineNodeTypes, SD_TOC_XML_NAME = "sd:tableOfContents", PARAGRAPH_XML_NAME = "w:p", PARAGRAPH_PROPERTIES_XML_NAME$1 = "w:pPr", wrapInlineNode = (node3) => ({
76512
78415
  type: "paragraph",
76513
78416
  content: [node3]
76514
- }), hasMeaningfulParagraphContent = (elements = []) => elements.some((element) => element?.name && element.name !== PARAGRAPH_PROPERTIES_XML_NAME), translateNodes = (params, nodes, pathTail = []) => params.nodeListHandler.handler({
78417
+ }), hasMeaningfulParagraphContent$1 = (elements = []) => elements.some((element) => element?.name && element.name !== PARAGRAPH_PROPERTIES_XML_NAME$1), translateNodes = (params, nodes, pathTail = []) => params.nodeListHandler.handler({
76515
78418
  ...params,
76516
78419
  nodes,
76517
78420
  path: [...params.path || [], ...pathTail]
@@ -76526,7 +78429,7 @@ var isRegExp = (value) => {
76526
78429
  return;
76527
78430
  }
76528
78431
  const remainingElements = childElements.filter((el) => el?.name !== SD_TOC_XML_NAME);
76529
- if (hasMeaningfulParagraphContent(remainingElements))
78432
+ if (hasMeaningfulParagraphContent$1(remainingElements))
76530
78433
  translatedContent.push(...translateNodes(params, [{
76531
78434
  ...child,
76532
78435
  elements: remainingElements
@@ -87262,16 +89165,48 @@ var isRegExp = (value) => {
87262
89165
  nodes: [resultNode],
87263
89166
  consumed: 1
87264
89167
  };
87265
- }, textNodeHandlerEntity, handleParagraphNode = (params) => {
89168
+ }, textNodeHandlerEntity, PARAGRAPH_PROPERTIES_XML_NAME = "w:pPr", BLOCK_FIELD_XML_NAMES, hasMeaningfulParagraphContent = (elements = []) => elements.some((element) => element?.name && element.name !== PARAGRAPH_PROPERTIES_XML_NAME), hoistBlockFieldNodes = (params, paragraphNode) => {
89169
+ const paragraphElements = Array.isArray(paragraphNode?.elements) ? paragraphNode.elements : [];
89170
+ const blockFieldElements = paragraphElements.filter((element) => BLOCK_FIELD_XML_NAMES.has(element?.name));
89171
+ if (blockFieldElements.length === 0)
89172
+ return null;
89173
+ const nodes = [];
89174
+ const remainingElements = paragraphElements.filter((element) => !BLOCK_FIELD_XML_NAMES.has(element?.name));
89175
+ if (hasMeaningfulParagraphContent(remainingElements)) {
89176
+ const paragraph2 = translator.encode({
89177
+ ...params,
89178
+ nodes: [{
89179
+ ...paragraphNode,
89180
+ elements: remainingElements
89181
+ }]
89182
+ });
89183
+ if (paragraph2)
89184
+ nodes.push(paragraph2);
89185
+ }
89186
+ blockFieldElements.forEach((blockFieldElement) => {
89187
+ nodes.push(...params.nodeListHandler.handler({
89188
+ ...params,
89189
+ nodes: [blockFieldElement],
89190
+ path: [...params.path || [], paragraphNode]
89191
+ }));
89192
+ });
89193
+ return nodes;
89194
+ }, handleParagraphNode = (params) => {
87266
89195
  const { nodes } = params;
87267
89196
  if (nodes.length === 0 || nodes[0].name !== "w:p")
87268
89197
  return {
87269
89198
  nodes: [],
87270
89199
  consumed: 0
87271
89200
  };
89201
+ const hoistedNodes = hoistBlockFieldNodes(params, nodes[0]);
89202
+ if (hoistedNodes)
89203
+ return {
89204
+ nodes: hoistedNodes,
89205
+ consumed: 1
89206
+ };
87272
89207
  const schemaNode = translator.encode(params);
87273
89208
  return {
87274
- nodes: schemaNode ? [schemaNode] : [],
89209
+ nodes: Array.isArray(schemaNode) ? schemaNode : schemaNode ? [schemaNode] : [],
87275
89210
  consumed: 1
87276
89211
  };
87277
89212
  }, paragraphNodeHandlerEntity, handleSdtNode = (params) => {
@@ -88222,7 +90157,7 @@ var isRegExp = (value) => {
88222
90157
  nodes: [translator$3.encode(params)],
88223
90158
  consumed: 1
88224
90159
  };
88225
- }, tabNodeEntityHandler, footnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, PARAGRAPH_IDENTITY_ATTRS, TABLE_IDENTITY_ATTRS, DEFAULT_BLOCK_IDENTITY_ATTRS, SYNTHETIC_PARA_ID_TYPES, DOCX_ID_LENGTH = 8, MAX_DOCX_ID = 4294967295, BLOCK_IDENTITY_ATTRS, WORD_2012_NAMESPACE = "http://schemas.microsoft.com/office/word/2012/wordml", deepClone = (value) => JSON.parse(JSON.stringify(value)), getNumberingRoot = (numberingXml) => {
90160
+ }, tabNodeEntityHandler, footnoteReferenceHandlerEntity, tableNodeHandlerEntity, tableOfContentsHandlerEntity, indexHandlerEntity, indexEntryHandlerEntity, bibliographyHandlerEntity, commentRangeStartHandlerEntity, commentRangeEndHandlerEntity, permStartHandlerEntity, permEndHandlerEntity, PARAGRAPH_IDENTITY_ATTRS, TABLE_IDENTITY_ATTRS, DEFAULT_BLOCK_IDENTITY_ATTRS, SYNTHETIC_PARA_ID_TYPES, DOCX_ID_LENGTH = 8, MAX_DOCX_ID = 4294967295, BLOCK_IDENTITY_ATTRS, WORD_2012_NAMESPACE = "http://schemas.microsoft.com/office/word/2012/wordml", deepClone = (value) => JSON.parse(JSON.stringify(value)), getNumberingRoot = (numberingXml) => {
88226
90161
  if (!numberingXml?.elements?.length)
88227
90162
  return null;
88228
90163
  return numberingXml.elements.find((el) => el?.name === "w:numbering") || numberingXml.elements[0] || null;
@@ -88374,6 +90309,7 @@ var isRegExp = (value) => {
88374
90309
  tabNodeEntityHandler,
88375
90310
  tableOfContentsHandlerEntity,
88376
90311
  indexHandlerEntity,
90312
+ bibliographyHandlerEntity,
88377
90313
  indexEntryHandlerEntity,
88378
90314
  autoPageHandlerEntity,
88379
90315
  autoTotalPageCountEntity,
@@ -89401,7 +91337,7 @@ var isRegExp = (value) => {
89401
91337
  if (id)
89402
91338
  return trackedChanges.filter(({ mark }) => mark.attrs.id === id);
89403
91339
  return trackedChanges;
89404
- }, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, SETTINGS_PART_PATH = "word/settings.xml", BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", DEFAULT_XML_DECLARATION, API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.21.1", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
91340
+ }, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES2, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, SETTINGS_PART_PATH = "word/settings.xml", BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", DEFAULT_XML_DECLARATION, API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.21.0", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
89405
91341
  if (!runProps?.elements?.length || !state)
89406
91342
  return;
89407
91343
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -89435,12 +91371,12 @@ var isRegExp = (value) => {
89435
91371
  state.kern = kernNode.attributes["w:val"];
89436
91372
  }
89437
91373
  }, SuperConverter;
89438
- var init_SuperConverter_BL6WX_iN_es = __esm(() => {
91374
+ var init_SuperConverter_C9MZOwsC_es = __esm(() => {
89439
91375
  init_rolldown_runtime_B2q5OVn9_es();
89440
91376
  init_jszip_ChlR43oI_es();
89441
- init_xml_js_DLE8mr0n_es();
91377
+ init_xml_js_40FWvL78_es();
89442
91378
  init_uuid_qzgm05fK_es();
89443
- init_constants_CMPtQbp7_es();
91379
+ init_constants_Qqwopz80_es();
89444
91380
  init_unified_BRHLwnjP_es();
89445
91381
  init_lib_HnbxUP96_es();
89446
91382
  init_lib_DAB30bX1_es();
@@ -91855,6 +93791,7 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
91855
93791
  Object.setPrototypeOf(this, DocumentApiValidationError3.prototype);
91856
93792
  }
91857
93793
  };
93794
+ NODE_KINDS2 = ["block", "inline"];
91858
93795
  NODE_TYPES2 = [
91859
93796
  "paragraph",
91860
93797
  "heading",
@@ -103621,6 +105558,43 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
103621
105558
  "markdown",
103622
105559
  "html"
103623
105560
  ]);
105561
+ LIST_KINDS2 = ["ordered", "bullet"];
105562
+ LIST_INSERT_POSITIONS2 = ["before", "after"];
105563
+ JOIN_DIRECTIONS2 = ["withPrevious", "withNext"];
105564
+ MUTATION_SCOPES2 = ["definition", "instance"];
105565
+ LEVEL_ALIGNMENTS2 = [
105566
+ "left",
105567
+ "center",
105568
+ "right"
105569
+ ];
105570
+ TRAILING_CHARACTERS2 = [
105571
+ "tab",
105572
+ "space",
105573
+ "nothing"
105574
+ ];
105575
+ LIST_PRESET_IDS2 = [
105576
+ "decimal",
105577
+ "decimalParenthesis",
105578
+ "lowerLetter",
105579
+ "upperLetter",
105580
+ "lowerRoman",
105581
+ "upperRoman",
105582
+ "disc",
105583
+ "circle",
105584
+ "square",
105585
+ "dash"
105586
+ ];
105587
+ VALID_BLOCK_NODE_TYPES$1 = new Set(BLOCK_NODE_TYPES2);
105588
+ VALID_LIST_KINDS2 = new Set(LIST_KINDS2);
105589
+ VALID_INSERT_POSITIONS2 = new Set(LIST_INSERT_POSITIONS2);
105590
+ VALID_JOIN_DIRECTIONS2 = new Set(JOIN_DIRECTIONS2);
105591
+ VALID_MUTATION_SCOPES2 = new Set(MUTATION_SCOPES2);
105592
+ VALID_LEVEL_ALIGNMENTS2 = new Set(LEVEL_ALIGNMENTS2);
105593
+ VALID_TRAILING_CHARACTERS2 = new Set(TRAILING_CHARACTERS2);
105594
+ VALID_LIST_PRESETS2 = new Set(LIST_PRESET_IDS2);
105595
+ VALID_CONTINUITY_VALUES2 = new Set(["preserve", "none"]);
105596
+ VALID_SEQUENCE_MODES2 = new Set(["new", "continuePrevious"]);
105597
+ VALID_LIST_CREATE_MODES2 = new Set(["empty", "fromParagraphs"]);
103624
105598
  TEXT_REPLACE_ALLOWED_KEYS2 = new Set([
103625
105599
  "text",
103626
105600
  "target",
@@ -103634,6 +105608,14 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
103634
105608
  "nestingPolicy",
103635
105609
  "in"
103636
105610
  ]);
105611
+ VALID_HEADING_LEVELS2 = new Set([
105612
+ 1,
105613
+ 2,
105614
+ 3,
105615
+ 4,
105616
+ 5,
105617
+ 6
105618
+ ]);
103637
105619
  SECTION_BREAK_TYPES$1 = [
103638
105620
  "continuous",
103639
105621
  "nextPage",
@@ -103642,7 +105624,7 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
103642
105624
  ];
103643
105625
  SUPPORTED_DELETE_NODE_TYPES2 = new Set(DELETABLE_BLOCK_NODE_TYPES2);
103644
105626
  REJECTED_DELETE_NODE_TYPES2 = new Set(["tableRow", "tableCell"]);
103645
- VALID_BLOCK_NODE_TYPES2 = new Set(BLOCK_NODE_TYPES2);
105627
+ VALID_BLOCK_NODE_TYPES3 = new Set(BLOCK_NODE_TYPES2);
103646
105628
  VALID_STYLE_OPTION_FLAGS2 = new Set([
103647
105629
  "headerRow",
103648
105630
  "lastRow",
@@ -103737,6 +105719,13 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
103737
105719
  "pt",
103738
105720
  "twip"
103739
105721
  ]);
105722
+ VALID_TOC_UPDATE_MODES2 = new Set(["all", "pageNumbers"]);
105723
+ EDIT_ENTRY_PATCH_ALLOWED_KEYS2 = new Set([
105724
+ "text",
105725
+ "level",
105726
+ "tableIdentifier",
105727
+ "omitPageNumber"
105728
+ ]);
103740
105729
  PATCH_FIELDS2 = new Set([
103741
105730
  "href",
103742
105731
  "anchor",
@@ -103745,6 +105734,39 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
103745
105734
  "target",
103746
105735
  "rel"
103747
105736
  ]);
105737
+ CONTENT_CONTROL_TYPES2 = [
105738
+ "text",
105739
+ "date",
105740
+ "checkbox",
105741
+ "comboBox",
105742
+ "dropDownList",
105743
+ "repeatingSection",
105744
+ "repeatingSectionItem",
105745
+ "group",
105746
+ "unknown"
105747
+ ];
105748
+ LOCK_MODES2 = [
105749
+ "unlocked",
105750
+ "sdtLocked",
105751
+ "contentLocked",
105752
+ "sdtContentLocked"
105753
+ ];
105754
+ CONTENT_CONTROL_APPEARANCES2 = [
105755
+ "boundingBox",
105756
+ "tags",
105757
+ "hidden"
105758
+ ];
105759
+ VALID_NODE_KINDS2 = new Set(NODE_KINDS2);
105760
+ VALID_LOCK_MODES$1 = new Set(LOCK_MODES2);
105761
+ VALID_CC_TYPES2 = new Set(CONTENT_CONTROL_TYPES2);
105762
+ VALID_CC_APPEARANCES2 = new Set(CONTENT_CONTROL_APPEARANCES2);
105763
+ VALID_CONTENT_FORMATS2 = new Set(["text", "html"]);
105764
+ VALID_RAW_PATCH_OPS2 = new Set([
105765
+ "set",
105766
+ "remove",
105767
+ "setAttr",
105768
+ "removeAttr"
105769
+ ]);
103748
105770
  VALID_CREATE_LOCATION_KINDS2 = new Set([
103749
105771
  "documentStart",
103750
105772
  "documentEnd",
@@ -104420,6 +106442,34 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
104420
106442
  translator$129
104421
106443
  ];
104422
106444
  translator$126 = NodeTranslator.from(createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$13));
106445
+ INLINE_FALLBACK_TYPES = new Set([
106446
+ "text",
106447
+ "run",
106448
+ "bookmarkStart",
106449
+ "bookmarkEnd",
106450
+ "tab",
106451
+ "lineBreak",
106452
+ "hardBreak",
106453
+ "commentRangeStart",
106454
+ "commentRangeEnd",
106455
+ "commentReference",
106456
+ "permStart",
106457
+ "permEnd",
106458
+ "footnoteReference",
106459
+ "endnoteReference",
106460
+ "fieldAnnotation",
106461
+ "structuredContent",
106462
+ "passthroughInline",
106463
+ "page-number",
106464
+ "total-page-number",
106465
+ "pageReference",
106466
+ "crossReference",
106467
+ "citation",
106468
+ "authorityEntry",
106469
+ "sequenceField",
106470
+ "indexEntry",
106471
+ "tableOfContentsEntry"
106472
+ ]);
104423
106473
  attrConfig$22 = Object.freeze({
104424
106474
  xmlName: "w:rsidDel",
104425
106475
  sdName: "rsidDel",
@@ -104470,6 +106520,7 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
104470
106520
  attrConfig$25,
104471
106521
  attrConfig$22
104472
106522
  ];
106523
+ IDENTITY_ATTR_NAMES = new Set(["paraId", "textId"]);
104473
106524
  config$34 = {
104474
106525
  xmlName: XML_NODE_NAME$35,
104475
106526
  sdNodeOrKeyName: SD_NODE_NAME$31,
@@ -124118,6 +126169,12 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
124118
126169
  handlerName: "textNodeHandler",
124119
126170
  handler: handleTextNode
124120
126171
  };
126172
+ BLOCK_FIELD_XML_NAMES = new Set([
126173
+ "sd:tableOfContents",
126174
+ "sd:index",
126175
+ "sd:bibliography",
126176
+ "sd:tableOfAuthorities"
126177
+ ]);
124121
126178
  paragraphNodeHandlerEntity = {
124122
126179
  handlerName: "paragraphNodeHandler",
124123
126180
  handler: handleParagraphNode
@@ -124741,6 +126798,7 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
124741
126798
  tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$22);
124742
126799
  indexHandlerEntity = generateV2HandlerEntity("indexHandler", translator$23);
124743
126800
  indexEntryHandlerEntity = generateV2HandlerEntity("indexEntryHandler", translator$24);
126801
+ bibliographyHandlerEntity = generateV2HandlerEntity("bibliographyHandler", translator$18);
124744
126802
  commentRangeStartHandlerEntity = generateV2HandlerEntity("commentRangeStartHandler", commentRangeStartTranslator);
124745
126803
  commentRangeEndHandlerEntity = generateV2HandlerEntity("commentRangeEndHandler", commentRangeEndTranslator);
124746
126804
  permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$13);
@@ -124966,7 +127024,7 @@ var init_SuperConverter_BL6WX_iN_es = __esm(() => {
124966
127024
  "repeatingSectionItem",
124967
127025
  "group"
124968
127026
  ];
124969
- VALID_LOCK_MODES = [
127027
+ VALID_LOCK_MODES2 = [
124970
127028
  "unlocked",
124971
127029
  "sdtLocked",
124972
127030
  "contentLocked",
@@ -126686,7 +128744,7 @@ var init_remark_stringify_D8vxv_XI_es = __esm(() => {
126686
128744
  eol = /\r?\n|\r/g;
126687
128745
  });
126688
128746
 
126689
- // ../../packages/superdoc/dist/chunks/DocxZipper-BBJ5zSyW.es.js
128747
+ // ../../packages/superdoc/dist/chunks/DocxZipper-gWkmvJfR.es.js
126690
128748
  function getLens2(b64) {
126691
128749
  var len$1 = b64.length;
126692
128750
  if (len$1 % 4 > 0)
@@ -127381,11 +129439,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
127381
129439
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
127382
129440
  }
127383
129441
  }, DocxZipper_default;
127384
- var init_DocxZipper_BBJ5zSyW_es = __esm(() => {
129442
+ var init_DocxZipper_gWkmvJfR_es = __esm(() => {
127385
129443
  init_rolldown_runtime_B2q5OVn9_es();
127386
129444
  init_jszip_ChlR43oI_es();
127387
- init_xml_js_DLE8mr0n_es();
127388
- init_constants_CMPtQbp7_es();
129445
+ init_xml_js_40FWvL78_es();
129446
+ init_constants_Qqwopz80_es();
127389
129447
  buffer2 = {};
127390
129448
  base64Js2 = {};
127391
129449
  base64Js2.byteLength = byteLength2;
@@ -152539,7 +154597,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
152539
154597
  init_remark_gfm_z_sDF4ss_es();
152540
154598
  });
152541
154599
 
152542
- // ../../packages/superdoc/dist/chunks/src-rbevhPXm.es.js
154600
+ // ../../packages/superdoc/dist/chunks/src-8sGn3qa5.es.js
152543
154601
  function deleteProps(obj, propOrProps) {
152544
154602
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
152545
154603
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -152619,7 +154677,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
152619
154677
  }
152620
154678
  function getSuperdocVersion() {
152621
154679
  try {
152622
- return "1.21.1";
154680
+ return "1.21.0";
152623
154681
  } catch {
152624
154682
  return "unknown";
152625
154683
  }
@@ -154297,6 +156355,8 @@ function createStructuredContentLockPlugin() {
154297
156355
  filterTransaction(tr, state) {
154298
156356
  if (!tr.docChanged)
154299
156357
  return true;
156358
+ if (tr.getMeta?.(ySyncPluginKey))
156359
+ return true;
154300
156360
  const sdtNodes = STRUCTURED_CONTENT_LOCK_KEY.getState(state);
154301
156361
  if (sdtNodes.length === 0)
154302
156362
  return true;
@@ -158303,13 +160363,20 @@ function createChartImmutabilityPlugin() {
158303
160363
  init(_$1, state) {
158304
160364
  return countChartNodes(state.doc);
158305
160365
  },
158306
- apply(_tr, oldCount) {
160366
+ apply(tr, oldCount, _oldState, newState) {
160367
+ if (tr.docChanged && tr.getMeta?.(ySyncPluginKey)) {
160368
+ if (oldCount === 0 && !transactionInsertsChart(tr))
160369
+ return 0;
160370
+ return countChartNodes(newState.doc);
160371
+ }
158307
160372
  return oldCount;
158308
160373
  }
158309
160374
  },
158310
160375
  filterTransaction(tr, state) {
158311
160376
  if (!tr.docChanged)
158312
160377
  return true;
160378
+ if (tr.getMeta?.(ySyncPluginKey))
160379
+ return true;
158313
160380
  if ((CHART_IMMUTABILITY_KEY.getState(state) ?? 0) === 0)
158314
160381
  return !transactionInsertsChart(tr);
158315
160382
  return !isChartMutation(tr, state.doc);
@@ -162941,6 +165008,7 @@ async function measureParagraphBlock(block, maxWidth) {
162941
165008
  let hasSeenTextRun = false;
162942
165009
  let tabStopCursor = 0;
162943
165010
  let pendingTabAlignment = null;
165011
+ let pendingLeader = null;
162944
165012
  let pendingRunSpacing = 0;
162945
165013
  let lastAppliedTabAlign = null;
162946
165014
  const warnedTabVals = /* @__PURE__ */ new Set;
@@ -162973,12 +165041,17 @@ async function measureParagraphBlock(block, maxWidth) {
162973
165041
  startX = Math.max(0, target - segmentWidth / 2);
162974
165042
  else
162975
165043
  startX = Math.max(0, target);
165044
+ if (pendingLeader) {
165045
+ const effectiveIndent = lines.length === 0 ? indentLeft + rawFirstLineOffset : indentLeft;
165046
+ pendingLeader.to = startX + effectiveIndent;
165047
+ }
162976
165048
  currentLine.width = roundValue(startX);
162977
165049
  lastAppliedTabAlign = {
162978
165050
  target,
162979
165051
  val
162980
165052
  };
162981
165053
  pendingTabAlignment = null;
165054
+ pendingLeader = null;
162982
165055
  return startX;
162983
165056
  };
162984
165057
  const alignSegmentAtTab = (segmentText, font, runContext, segmentStartChar) => {
@@ -163081,6 +165154,7 @@ async function measureParagraphBlock(block, maxWidth) {
163081
165154
  }
163082
165155
  tabStopCursor = 0;
163083
165156
  pendingTabAlignment = null;
165157
+ pendingLeader = null;
163084
165158
  lastAppliedTabAlign = null;
163085
165159
  pendingRunSpacing = 0;
163086
165160
  continue;
@@ -163125,12 +165199,14 @@ async function measureParagraphBlock(block, maxWidth) {
163125
165199
  };
163126
165200
  tabStopCursor = 0;
163127
165201
  pendingTabAlignment = null;
165202
+ pendingLeader = null;
163128
165203
  lastAppliedTabAlign = null;
163129
165204
  pendingRunSpacing = 0;
163130
165205
  continue;
163131
165206
  }
163132
165207
  if (isTabRun$1(run2)) {
163133
165208
  activeTabGroup = null;
165209
+ pendingLeader = null;
163134
165210
  if (!currentLine)
163135
165211
  currentLine = {
163136
165212
  fromRun: runIndex,
@@ -163156,18 +165232,19 @@ async function measureParagraphBlock(block, maxWidth) {
163156
165232
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, 12);
163157
165233
  currentLine.toRun = runIndex;
163158
165234
  currentLine.toChar = 1;
165235
+ let currentLeader = null;
163159
165236
  if (stop && stop.leader && stop.leader !== "none") {
163160
165237
  const leaderStyle = stop.leader;
163161
- const relativeTarget = clampedTarget - effectiveIndent;
163162
- const from$1 = Math.min(originX, relativeTarget);
163163
- const to = Math.max(originX, relativeTarget);
165238
+ const from$1 = Math.min(originX + effectiveIndent, clampedTarget);
165239
+ const to = Math.max(originX + effectiveIndent, clampedTarget);
163164
165240
  if (!currentLine.leaders)
163165
165241
  currentLine.leaders = [];
163166
- currentLine.leaders.push({
165242
+ currentLeader = {
163167
165243
  from: from$1,
163168
165244
  to,
163169
165245
  style: leaderStyle
163170
- });
165246
+ };
165247
+ currentLine.leaders.push(currentLeader);
163171
165248
  }
163172
165249
  if (stop) {
163173
165250
  validateTabStopVal(stop);
@@ -163184,6 +165261,8 @@ async function measureParagraphBlock(block, maxWidth) {
163184
165261
  const beforeDecimal = groupMeasure.beforeDecimalWidth ?? groupMeasure.totalWidth;
163185
165262
  groupStartX = Math.max(0, relativeTarget - beforeDecimal);
163186
165263
  }
165264
+ if (currentLeader)
165265
+ currentLeader.to = groupStartX + effectiveIndent;
163187
165266
  activeTabGroup = {
163188
165267
  measure: groupMeasure,
163189
165268
  startX: groupStartX,
@@ -163194,13 +165273,16 @@ async function measureParagraphBlock(block, maxWidth) {
163194
165273
  currentLine.width = roundValue(groupStartX);
163195
165274
  }
163196
165275
  pendingTabAlignment = null;
165276
+ pendingLeader = null;
163197
165277
  } else
163198
165278
  pendingTabAlignment = {
163199
165279
  target: clampedTarget - effectiveIndent,
163200
165280
  val: stop.val
163201
165281
  };
163202
- } else
165282
+ } else {
163203
165283
  pendingTabAlignment = null;
165284
+ pendingLeader = null;
165285
+ }
163204
165286
  pendingRunSpacing = 0;
163205
165287
  continue;
163206
165288
  }
@@ -163253,6 +165335,7 @@ async function measureParagraphBlock(block, maxWidth) {
163253
165335
  lines.push(completedLine);
163254
165336
  tabStopCursor = 0;
163255
165337
  pendingTabAlignment = null;
165338
+ pendingLeader = null;
163256
165339
  lastAppliedTabAlign = null;
163257
165340
  activeTabGroup = null;
163258
165341
  currentLine = {
@@ -163352,6 +165435,7 @@ async function measureParagraphBlock(block, maxWidth) {
163352
165435
  lines.push(completedLine);
163353
165436
  tabStopCursor = 0;
163354
165437
  pendingTabAlignment = null;
165438
+ pendingLeader = null;
163355
165439
  lastAppliedTabAlign = null;
163356
165440
  currentLine = {
163357
165441
  fromRun: runIndex,
@@ -163440,6 +165524,7 @@ async function measureParagraphBlock(block, maxWidth) {
163440
165524
  lines.push(completedLine);
163441
165525
  tabStopCursor = 0;
163442
165526
  pendingTabAlignment = null;
165527
+ pendingLeader = null;
163443
165528
  lastAppliedTabAlign = null;
163444
165529
  currentLine = {
163445
165530
  fromRun: runIndex,
@@ -163526,6 +165611,7 @@ async function measureParagraphBlock(block, maxWidth) {
163526
165611
  lines.push(completedLine);
163527
165612
  tabStopCursor = 0;
163528
165613
  pendingTabAlignment = null;
165614
+ pendingLeader = null;
163529
165615
  lastAppliedTabAlign = null;
163530
165616
  activeTabGroup = null;
163531
165617
  currentLine = {
@@ -163582,6 +165668,7 @@ async function measureParagraphBlock(block, maxWidth) {
163582
165668
  lines.push(completedLine);
163583
165669
  tabStopCursor = 0;
163584
165670
  pendingTabAlignment = null;
165671
+ pendingLeader = null;
163585
165672
  currentLine = null;
163586
165673
  }
163587
165674
  const lineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
@@ -163626,6 +165713,7 @@ async function measureParagraphBlock(block, maxWidth) {
163626
165713
  lines.push(completedLine);
163627
165714
  tabStopCursor = 0;
163628
165715
  pendingTabAlignment = null;
165716
+ pendingLeader = null;
163629
165717
  currentLine = null;
163630
165718
  }
163631
165719
  } else if (isLastChunk) {
@@ -163745,6 +165833,7 @@ async function measureParagraphBlock(block, maxWidth) {
163745
165833
  lines.push(completedLine);
163746
165834
  tabStopCursor = 0;
163747
165835
  pendingTabAlignment = null;
165836
+ pendingLeader = null;
163748
165837
  currentLine = {
163749
165838
  fromRun: runIndex,
163750
165839
  fromChar: wordStartChar,
@@ -163797,6 +165886,7 @@ async function measureParagraphBlock(block, maxWidth) {
163797
165886
  lines.push(completedLine);
163798
165887
  tabStopCursor = 0;
163799
165888
  pendingTabAlignment = null;
165889
+ pendingLeader = null;
163800
165890
  currentLine = null;
163801
165891
  charPosInRun = wordEndNoSpace + 1;
163802
165892
  continue;
@@ -163834,6 +165924,7 @@ async function measureParagraphBlock(block, maxWidth) {
163834
165924
  }
163835
165925
  if (!isLastSegment) {
163836
165926
  pendingTabAlignment = null;
165927
+ pendingLeader = null;
163837
165928
  if (!currentLine)
163838
165929
  currentLine = {
163839
165930
  fromRun: runIndex,
@@ -163867,20 +165958,23 @@ async function measureParagraphBlock(block, maxWidth) {
163867
165958
  target: clampedTarget - effectiveIndent,
163868
165959
  val: stop.val
163869
165960
  };
163870
- } else
165961
+ } else {
163871
165962
  pendingTabAlignment = null;
165963
+ pendingLeader = null;
165964
+ }
163872
165965
  if (stop && stop.leader && stop.leader !== "none" && stop.leader !== "middleDot") {
163873
165966
  const leaderStyle = stop.leader;
163874
- const relativeTarget = clampedTarget - effectiveIndent;
163875
- const from$1 = Math.min(originX, relativeTarget);
163876
- const to = Math.max(originX, relativeTarget);
165967
+ const from$1 = Math.min(originX + effectiveIndent, clampedTarget);
165968
+ const to = Math.max(originX + effectiveIndent, clampedTarget);
163877
165969
  if (!currentLine.leaders)
163878
165970
  currentLine.leaders = [];
163879
- currentLine.leaders.push({
165971
+ const leader = {
163880
165972
  from: from$1,
163881
165973
  to,
163882
165974
  style: leaderStyle
163883
- });
165975
+ };
165976
+ currentLine.leaders.push(leader);
165977
+ pendingLeader = leader;
163884
165978
  }
163885
165979
  }
163886
165980
  }
@@ -182235,7 +184329,7 @@ function extractBlockFormatting(node3) {
182235
184329
  ...fontFamily ? { fontFamily } : {},
182236
184330
  ...fontSize !== undefined ? { fontSize } : {},
182237
184331
  ...bold ? { bold } : {},
182238
- ...pProps?.alignment ? { alignment: pProps.alignment } : {},
184332
+ ...pProps?.justification ? { alignment: pProps.justification } : {},
182239
184333
  ...headingLevel ? { headingLevel } : {}
182240
184334
  };
182241
184335
  }
@@ -182307,7 +184401,7 @@ function blocksListWrapper(editor, input2) {
182307
184401
  ordinal: offset$1 + i4,
182308
184402
  nodeId: candidate.nodeId,
182309
184403
  nodeType: candidate.nodeType,
182310
- textPreview: candidate.node.isTextblock ? candidate.node.textContent || null : null,
184404
+ textPreview: extractTextPreview(candidate.node),
182311
184405
  isEmpty: candidate.node.textContent.length === 0,
182312
184406
  ...extractBlockFormatting(candidate.node)
182313
184407
  })),
@@ -194673,21 +196767,20 @@ function toReferenceBlockType(node3) {
194673
196767
  return;
194674
196768
  }
194675
196769
  }
194676
- function resolvePublicReferenceBlockNodeId(node3, pos) {
194677
- const sdBlockId = toId(node3.attrs?.sdBlockId);
194678
- if (sdBlockId)
194679
- return sdBlockId;
196770
+ function resolvePublicReferenceBlockNodeId(node3, occurrenceIndex) {
194680
196771
  const blockType = toReferenceBlockType(node3);
194681
196772
  if (!blockType)
194682
196773
  throw new Error(`Unsupported reference block node type: ${node3.type.name}`);
194683
- return `${REFERENCE_BLOCK_PREFIX[blockType]}-${stableHash2(`${blockType}:${pos}`)}`;
196774
+ return `${REFERENCE_BLOCK_PREFIX[blockType]}-${stableHash2(`${blockType}:${occurrenceIndex}`)}`;
194684
196775
  }
194685
196776
  function findAllIndexNodes(doc$12) {
194686
196777
  const results = [];
196778
+ let occurrenceIndex = 0;
194687
196779
  doc$12.descendants((node3, pos) => {
194688
196780
  if (node3.type.name === "documentIndex" || node3.type.name === "index") {
194689
196781
  const commandNodeId = node3.attrs?.sdBlockId;
194690
- const nodeId = resolvePublicReferenceBlockNodeId(node3, pos);
196782
+ const nodeId = resolvePublicReferenceBlockNodeId(node3, occurrenceIndex);
196783
+ occurrenceIndex += 1;
194691
196784
  results.push({
194692
196785
  node: node3,
194693
196786
  pos,
@@ -195906,10 +197999,13 @@ function buildCitationDiscoveryItem(doc$12, resolved, evaluatedRevision) {
195906
197999
  }
195907
198000
  function findAllBibliographies(doc$12) {
195908
198001
  const results = [];
198002
+ let occurrenceIndex = 0;
195909
198003
  doc$12.descendants((node3, pos) => {
195910
198004
  if (node3.type.name === "bibliography") {
195911
- const commandNodeId = node3.attrs?.sdBlockId;
195912
- const nodeId = resolvePublicReferenceBlockNodeId(node3, pos);
198005
+ const rawBlockId = node3.attrs?.sdBlockId;
198006
+ const commandNodeId = rawBlockId != null ? String(rawBlockId) : undefined;
198007
+ const nodeId = resolvePublicReferenceBlockNodeId(node3, occurrenceIndex);
198008
+ occurrenceIndex += 1;
195913
198009
  results.push({
195914
198010
  node: node3,
195915
198011
  pos,
@@ -195980,9 +198076,9 @@ function resolveSourceTarget(editor, target) {
195980
198076
  function resolveParentBlockId$1(doc$12, pos) {
195981
198077
  const resolved = doc$12.resolve(pos);
195982
198078
  for (let depth = resolved.depth;depth >= 0; depth--) {
195983
- const blockId = resolved.node(depth).attrs?.sdBlockId;
195984
- if (blockId)
195985
- return blockId;
198079
+ const rawBlockId = resolved.node(depth).attrs?.sdBlockId;
198080
+ if (rawBlockId != null)
198081
+ return String(rawBlockId);
195986
198082
  }
195987
198083
  return "";
195988
198084
  }
@@ -196330,10 +198426,11 @@ function bibliographyInsertWrapper(editor, input2, options) {
196330
198426
  function bibliographyConfigureWrapper(editor, input2, options) {
196331
198427
  rejectTrackedMode("citations.bibliography.configure", options);
196332
198428
  const resolved = resolveBibliographyTarget(editor.state.doc, input2.target);
198429
+ const stableNodeId = resolved.commandNodeId ?? resolved.nodeId;
196333
198430
  const address2 = {
196334
198431
  kind: "block",
196335
198432
  nodeType: "bibliography",
196336
- nodeId: resolved.nodeId
198433
+ nodeId: stableNodeId
196337
198434
  };
196338
198435
  if (options?.dryRun)
196339
198436
  return bibSuccess(address2);
@@ -196351,7 +198448,12 @@ function bibliographyConfigureWrapper(editor, input2, options) {
196351
198448
  }, { expectedRevision: options?.expectedRevision })))
196352
198449
  return bibFailure("NO_OP", "Configure produced no change.");
196353
198450
  syncBibliographyStyleToConverter(editor, input2.style);
196354
- return bibSuccess(address2);
198451
+ const bibliographies = findAllBibliographies(editor.state.doc);
198452
+ return bibSuccess({
198453
+ kind: "block",
198454
+ nodeType: "bibliography",
198455
+ nodeId: (bibliographies.find((bibliography) => bibliography.pos === resolved.pos) ?? bibliographies.find((bibliography) => bibliography.commandNodeId === stableNodeId))?.nodeId ?? resolvePostMutationBibliographyId(editor.state.doc, stableNodeId)
198456
+ });
196355
198457
  }
196356
198458
  function bibliographyRebuildWrapper(editor, input2, options) {
196357
198459
  rejectTrackedMode("citations.bibliography.rebuild", options);
@@ -196465,10 +198567,12 @@ function buildCitationInstruction(sourceIds) {
196465
198567
  }
196466
198568
  function findAllAuthorities(doc$12) {
196467
198569
  const results = [];
198570
+ let occurrenceIndex = 0;
196468
198571
  doc$12.descendants((node3, pos) => {
196469
198572
  if (node3.type.name === "tableOfAuthorities") {
196470
198573
  const commandNodeId = node3.attrs?.sdBlockId;
196471
- const nodeId = resolvePublicReferenceBlockNodeId(node3, pos);
198574
+ const nodeId = resolvePublicReferenceBlockNodeId(node3, occurrenceIndex);
198575
+ occurrenceIndex += 1;
196472
198576
  results.push({
196473
198577
  node: node3,
196474
198578
  pos,
@@ -219600,7 +221704,25 @@ var Node$13 = class Node$14 {
219600
221704
  this.onMouseLeave = null;
219601
221705
  this.hoveredSdtId = null;
219602
221706
  }
219603
- }, cssToken = (varName, fallback) => ({
221707
+ }, isRtlParagraph = (attrs) => attrs?.direction === "rtl" || attrs?.rtl === true, resolveTextAlign = (alignment$1, isRtl) => {
221708
+ switch (alignment$1) {
221709
+ case "center":
221710
+ case "right":
221711
+ case "left":
221712
+ return alignment$1;
221713
+ case "justify":
221714
+ default:
221715
+ return isRtl ? "right" : "left";
221716
+ }
221717
+ }, applyRtlStyles = (element3, attrs) => {
221718
+ const rtl = isRtlParagraph(attrs);
221719
+ if (rtl) {
221720
+ element3.setAttribute("dir", "rtl");
221721
+ element3.style.direction = "rtl";
221722
+ }
221723
+ element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
221724
+ return rtl;
221725
+ }, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, cssToken = (varName, fallback) => ({
219604
221726
  css: `var(${varName}, ${fallback})`,
219605
221727
  fallback
219606
221728
  }), LIST_MARKER_GAP = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, COMMENT_HIGHLIGHT_EXTERNAL, COMMENT_HIGHLIGHT_EXTERNAL_ACTIVE, COMMENT_HIGHLIGHT_EXTERNAL_FADED, COMMENT_HIGHLIGHT_INTERNAL, COMMENT_HIGHLIGHT_INTERNAL_ACTIVE, COMMENT_HIGHLIGHT_INTERNAL_FADED, COMMENT_HIGHLIGHT_EXTERNAL_NESTED_BORDER, COMMENT_HIGHLIGHT_INTERNAL_NESTED_BORDER, LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_FOCUSED_CLASS = "track-change-focused", TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor$1 = (value) => {
@@ -220267,27 +222389,12 @@ var Node$13 = class Node$14 {
220267
222389
  console.warn(`[DomPainter] Failed to set data attribute "${key$1}":`, error);
220268
222390
  }
220269
222391
  });
220270
- }, resolveParagraphDirection = (attrs) => {
220271
- if (attrs?.direction)
220272
- return attrs.direction;
220273
- if (attrs?.rtl === true)
220274
- return "rtl";
220275
- if (attrs?.rtl === false)
220276
- return "ltr";
220277
- }, applyParagraphDirection = (element3, attrs) => {
220278
- const direction = resolveParagraphDirection(attrs);
220279
- if (!direction)
220280
- return;
220281
- element3.setAttribute("dir", direction);
220282
- element3.style.direction = direction;
220283
222392
  }, applyParagraphBlockStyles = (element3, attrs) => {
220284
222393
  if (!attrs)
220285
222394
  return;
220286
222395
  if (attrs.styleId)
220287
222396
  element3.setAttribute("styleid", attrs.styleId);
220288
- applyParagraphDirection(element3, attrs);
220289
- if (attrs.alignment)
220290
- element3.style.textAlign = attrs.alignment === "justify" ? "left" : attrs.alignment;
222397
+ applyRtlStyles(element3, attrs);
220291
222398
  if (attrs.dropCap)
220292
222399
  element3.classList.add("sd-editor-dropcap");
220293
222400
  const indent2 = attrs.indent;
@@ -222725,7 +224832,7 @@ var Node$13 = class Node$14 {
222725
224832
  domAvailabilityCache = false;
222726
224833
  return false;
222727
224834
  }
222728
- }, summaryVersion = "1.21.1", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
224835
+ }, summaryVersion = "1.21.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
222729
224836
  const container = document.createElement("div");
222730
224837
  container.innerHTML = html3;
222731
224838
  const result = [];
@@ -223030,7 +225137,7 @@ var Node$13 = class Node$14 {
223030
225137
  console.warn("Failed to initialize developer tools:", error);
223031
225138
  }
223032
225139
  }
223033
- }, BLANK_DOCX_BASE64 = `UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz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AABQSwECHgMUAAAACAAAACEAvn52YlYBAADQAwAAFAAYAAAAAAABAAAApIG2FQAAd29yZC93ZWJTZXR0aW5ncy54bWxVVAUAAzDQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAP6/hZl8PAAANpgAADwAYAAAAAAABAAAApIFaFwAAd29yZC9zdHlsZXMueG1sVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsBAh4DCgAAAAAAk2RNWwAAAAAAAAAAAAAAAAsAGAAAAAAAAAAQAO1BAicAAHdvcmQvdGhlbWUvVVQFAAOGHO1odXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAAAAhAGeA/LSbBgAAzSAAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==`, BLANK_DOCX_DATA_URI, TAB_LEADER_TO_SEPARATOR, SEPARATOR_TO_TAB_LEADER, DEFAULT_TOC_CONFIG, SWITCH_PATTERN$1, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, V3_PREFIX = "text:", V4_PREFIX = "text:v4:", HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, HEADING_STYLE_PATTERN, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, BODY_LOCATOR2, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, TEXT_STYLE_CHARACTER_STYLE_ATTR = "styleId", DIRECT_FORMATTING_MARK_NAMES, ALIGNMENT_TO_JUSTIFICATION, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, SNAPSHOT_VERSION3 = "sd-diff-snapshot/v1", PAYLOAD_VERSION3 = "sd-diff-payload/v1", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.21.1", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, EXCLUDED_PLUGIN_KEY_REF_LIST, EXCLUDED_PLUGIN_KEY_REFS, EXCLUDED_PLUGIN_KEY_PREFIXES, TEXT_RANGE_BLOCK_SEP = `
225140
+ }, BLANK_DOCX_BASE64 = `UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW0hsPLq9GU63AVJGapdKtkAMj5wnuQArUuEDOKpUPlqBdIxzHoT8EnPgd/3+PZfeITjMsfZgo+EzVG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DQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAP6/hZl8PAAANpgAADwAYAAAAAAABAAAApIFaFwAAd29yZC9zdHlsZXMueG1sVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsBAh4DCgAAAAAAk2RNWwAAAAAAAAAAAAAAAAsAGAAAAAAAAAAQAO1BAicAAHdvcmQvdGhlbWUvVVQFAAOGHO1odXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAAAAhAGeA/LSbBgAAzSAAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==`, BLANK_DOCX_DATA_URI, TAB_LEADER_TO_SEPARATOR, SEPARATOR_TO_TAB_LEADER, DEFAULT_TOC_CONFIG, SWITCH_PATTERN$1, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, V3_PREFIX = "text:", V4_PREFIX = "text:v4:", HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, HEADING_STYLE_PATTERN, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, BODY_LOCATOR2, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, TEXT_STYLE_CHARACTER_STYLE_ATTR = "styleId", DIRECT_FORMATTING_MARK_NAMES, ALIGNMENT_TO_JUSTIFICATION, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, SNAPSHOT_VERSION3 = "sd-diff-snapshot/v1", PAYLOAD_VERSION3 = "sd-diff-payload/v1", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.21.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, EXCLUDED_PLUGIN_KEY_REF_LIST, EXCLUDED_PLUGIN_KEY_REFS, EXCLUDED_PLUGIN_KEY_PREFIXES, TEXT_RANGE_BLOCK_SEP = `
223034
225141
  `, TEXT_RANGE_LEAF_SEP = `
223035
225142
  `, DecorationBridge = class DecorationBridge2 {
223036
225143
  #applied = /* @__PURE__ */ new WeakMap;
@@ -224154,7 +226261,7 @@ var Node$13 = class Node$14 {
224154
226261
  return;
224155
226262
  const trimmed = value.trim();
224156
226263
  return trimmed ? trimmed : undefined;
224157
- }, AUTO_SPACING_DEFAULT_MULTIPLIER = 1.15, AUTO_SPACING_LINE_DEFAULT = 240, normalizeAlignment = (value) => {
226264
+ }, AUTO_SPACING_DEFAULT_MULTIPLIER = 1.15, AUTO_SPACING_LINE_DEFAULT = 240, normalizeAlignment = (value, isRtl = false) => {
224158
226265
  switch (value) {
224159
226266
  case "center":
224160
226267
  case "right":
@@ -224165,11 +226272,14 @@ var Node$13 = class Node$14 {
224165
226272
  case "distribute":
224166
226273
  case "numTab":
224167
226274
  case "thaiDistribute":
226275
+ case "lowKashida":
226276
+ case "mediumKashida":
226277
+ case "highKashida":
224168
226278
  return "justify";
224169
226279
  case "end":
224170
- return "right";
226280
+ return isRtl ? "left" : "right";
224171
226281
  case "start":
224172
- return "left";
226282
+ return isRtl ? "right" : "left";
224173
226283
  default:
224174
226284
  return;
224175
226285
  }
@@ -224429,10 +226539,11 @@ var Node$13 = class Node$14 {
224429
226539
  resolvedParagraphProperties = paragraphProperties;
224430
226540
  else
224431
226541
  resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
226542
+ const isRtl = resolvedParagraphProperties.rightToLeft === true;
224432
226543
  const normalizedSpacing = normalizeParagraphSpacing(resolvedParagraphProperties.spacing, Boolean(resolvedParagraphProperties.numberingProperties));
224433
226544
  const normalizedIndent = normalizeIndentTwipsToPx(resolvedParagraphProperties.indent);
224434
226545
  const normalizedTabStops = normalizeOoxmlTabs(resolvedParagraphProperties.tabStops);
224435
- const normalizedAlignment = normalizeAlignment(resolvedParagraphProperties.justification);
226546
+ const normalizedAlignment = normalizeAlignment(resolvedParagraphProperties.justification, isRtl);
224436
226547
  const normalizedBorders = normalizeParagraphBorders(resolvedParagraphProperties.borders);
224437
226548
  const normalizedShading = normalizeParagraphShading(resolvedParagraphProperties.shading);
224438
226549
  const paragraphDecimalSeparator = DEFAULT_DECIMAL_SEPARATOR;
@@ -224461,8 +226572,10 @@ var Node$13 = class Node$14 {
224461
226572
  keepLines: resolvedParagraphProperties.keepLines,
224462
226573
  floatAlignment,
224463
226574
  pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
224464
- direction: normalizedDirection,
224465
- rtl: normalizedDirection === "rtl" ? true : normalizedDirection === "ltr" ? false : undefined
226575
+ ...normalizedDirection ? {
226576
+ direction: normalizedDirection,
226577
+ rtl: isRtl
226578
+ } : {}
224466
226579
  };
224467
226580
  if (normalizedNumberingProperties && normalizedListRendering) {
224468
226581
  const markerRunAttrs = computeRunAttrs(resolveRunProperties(converterContext, resolvedParagraphProperties.runProperties, resolvedParagraphProperties, converterContext.tableInfo, true, Boolean(paragraphProperties.numberingProperties)), converterContext);
@@ -226981,16 +229094,17 @@ var Node$13 = class Node$14 {
226981
229094
  const originX = cursorX;
226982
229095
  const { target, nextIndex, stop } = getNextTabStopPx(cursorX + effectiveIndent, tabStops, tabStopCursor);
226983
229096
  tabStopCursor = nextIndex;
226984
- const relativeTarget = (Number.isFinite(maxAbsWidth) ? Math.min(target, maxAbsWidth) : target) - effectiveIndent;
229097
+ const clampedTarget = Number.isFinite(maxAbsWidth) ? Math.min(target, maxAbsWidth) : target;
229098
+ const relativeTarget = clampedTarget - effectiveIndent;
226985
229099
  lineWidth = Math.max(lineWidth, relativeTarget);
229100
+ let currentLeader = null;
226986
229101
  if (stop?.leader && stop.leader !== "none") {
226987
- const from$1 = Math.min(originX, relativeTarget);
226988
- const to = Math.max(originX, relativeTarget);
226989
- leaders.push({
226990
- from: from$1,
226991
- to,
229102
+ currentLeader = {
229103
+ from: Math.min(originX + effectiveIndent, clampedTarget),
229104
+ to: Math.max(originX + effectiveIndent, clampedTarget),
226992
229105
  style: stop.leader
226993
- });
229106
+ };
229107
+ leaders.push(currentLeader);
226994
229108
  }
226995
229109
  const stopVal = stop?.val ?? "start";
226996
229110
  if (stopVal === "end" || stopVal === "center" || stopVal === "decimal") {
@@ -227005,6 +229119,8 @@ var Node$13 = class Node$14 {
227005
229119
  const beforeDecimal = groupMeasure.beforeDecimalWidth ?? groupMeasure.totalWidth;
227006
229120
  groupStartX = Math.max(0, relativeTarget - beforeDecimal);
227007
229121
  }
229122
+ if (currentLeader)
229123
+ currentLeader.to = groupStartX + effectiveIndent;
227008
229124
  pendingTabAlignStartX = groupStartX;
227009
229125
  } else
227010
229126
  cursorX = Math.max(cursorX, relativeTarget);
@@ -232089,16 +234205,16 @@ var Node$13 = class Node$14 {
232089
234205
  return;
232090
234206
  console.log(...args$1);
232091
234207
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
232092
- var init_src_rbevhPXm_es = __esm(() => {
234208
+ var init_src_8sGn3qa5_es = __esm(() => {
232093
234209
  init_rolldown_runtime_B2q5OVn9_es();
232094
- init_SuperConverter_BL6WX_iN_es();
234210
+ init_SuperConverter_C9MZOwsC_es();
232095
234211
  init_jszip_ChlR43oI_es();
232096
234212
  init_uuid_qzgm05fK_es();
232097
- init_constants_CMPtQbp7_es();
234213
+ init_constants_Qqwopz80_es();
232098
234214
  init_unified_BRHLwnjP_es();
232099
234215
  init_remark_gfm_z_sDF4ss_es();
232100
234216
  init_remark_stringify_D8vxv_XI_es();
232101
- init_DocxZipper_BBJ5zSyW_es();
234217
+ init_DocxZipper_gWkmvJfR_es();
232102
234218
  init_vue_LcaAh_pz_es();
232103
234219
  init__plugin_vue_export_helper_DBsdbQXw_es();
232104
234220
  init_eventemitter3_C8I7im8Y_es();
@@ -234585,7 +236701,8 @@ ${err.toString()}`);
234585
236701
  },
234586
236702
  id: {},
234587
236703
  docPartGallery: {},
234588
- docPartUnique: { default: true }
236704
+ docPartUnique: { default: false },
236705
+ wrapperParagraph: { default: null }
234589
236706
  };
234590
236707
  }
234591
236708
  });
@@ -249612,6 +251729,8 @@ function print() { __p += __j.call(arguments, '') }
249612
251729
  appendTransaction(transactions, oldState, newState) {
249613
251730
  if (!transactions.some((tr$1) => tr$1.docChanged))
249614
251731
  return null;
251732
+ if (transactions.some((tr$1) => tr$1.getMeta?.(ySyncPluginKey)))
251733
+ return null;
249615
251734
  const permTypes = getPermissionTypeInfo(newState.schema);
249616
251735
  if (!permTypes.startTypes.length || !permTypes.endTypes.length)
249617
251736
  return null;
@@ -249667,6 +251786,8 @@ function print() { __p += __j.call(arguments, '') }
249667
251786
  filterTransaction(tr, state) {
249668
251787
  if (!tr.docChanged)
249669
251788
  return true;
251789
+ if (tr.getMeta?.(ySyncPluginKey))
251790
+ return true;
249670
251791
  if (!editor || editor.options.documentMode !== "viewing")
249671
251792
  return true;
249672
251793
  const pluginState = PERMISSION_PLUGIN_KEY.getState(state);
@@ -252719,16 +254840,11 @@ function print() { __p += __j.call(arguments, '') }
252719
254840
  el.classList.add(CLASS_NAMES$1.line);
252720
254841
  applyStyles(el, lineStyles(line.lineHeight));
252721
254842
  el.dataset.layoutEpoch = String(this.layoutEpoch);
252722
- const paragraphAttrs = block.attrs ?? {};
252723
- const styleId = paragraphAttrs.styleId;
254843
+ const styleId = (block.attrs ?? {}).styleId;
252724
254844
  if (styleId)
252725
254845
  el.setAttribute("styleid", styleId);
252726
- applyParagraphDirection(el, paragraphAttrs);
252727
- const alignment$1 = paragraphAttrs.alignment;
252728
- if (alignment$1 === "center" || alignment$1 === "right")
252729
- el.style.textAlign = alignment$1;
252730
- else
252731
- el.style.textAlign = "left";
254846
+ const pAttrs = block.attrs;
254847
+ const isRtl = applyRtlStyles(el, pAttrs);
252732
254848
  if (lineRange.pmStart != null)
252733
254849
  el.dataset.pmStart = String(lineRange.pmStart);
252734
254850
  if (lineRange.pmEnd != null)
@@ -252926,7 +255042,7 @@ function print() { __p += __j.call(arguments, '') }
252926
255042
  });
252927
255043
  if (spacingPerSpace !== 0)
252928
255044
  el.style.wordSpacing = `${spacingPerSpace}px`;
252929
- if (hasExplicitPositioning && line.segments) {
255045
+ if (shouldUseSegmentPositioning(hasExplicitPositioning ?? false, Boolean(line.segments), isRtl)) {
252930
255046
  const paraIndent = block.attrs?.indent;
252931
255047
  const indentLeft = paraIndent?.left ?? 0;
252932
255048
  const firstLine = paraIndent?.firstLine ?? 0;
@@ -252939,8 +255055,9 @@ function print() { __p += __j.call(arguments, '') }
252939
255055
  const fallbackListTextStartPx = typeof wordLayout?.marker?.textStartX === "number" && Number.isFinite(wordLayout.marker.textStartX) ? wordLayout.marker.textStartX : typeof wordLayout?.textStartPx === "number" && Number.isFinite(wordLayout.textStartPx) ? wordLayout.textStartPx : undefined;
252940
255056
  const indentOffset = isListParagraph ? isFirstLineOfPara ? resolvedListTextStartPx ?? fallbackListTextStartPx ?? indentLeft : indentLeft : indentLeft + firstLineOffsetForCumX;
252941
255057
  let cumulativeX = 0;
255058
+ const segments = line.segments;
252942
255059
  const segmentsByRun = /* @__PURE__ */ new Map;
252943
- line.segments.forEach((segment) => {
255060
+ segments.forEach((segment) => {
252944
255061
  const list5 = segmentsByRun.get(segment.runIndex);
252945
255062
  if (list5)
252946
255063
  list5.push(segment);
@@ -265407,13 +267524,13 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
265407
267524
 
265408
267525
  // ../../packages/superdoc/dist/super-editor.es.js
265409
267526
  var init_super_editor_es = __esm(() => {
265410
- init_src_rbevhPXm_es();
265411
- init_SuperConverter_BL6WX_iN_es();
267527
+ init_src_8sGn3qa5_es();
267528
+ init_SuperConverter_C9MZOwsC_es();
265412
267529
  init_jszip_ChlR43oI_es();
265413
- init_xml_js_DLE8mr0n_es();
265414
- init_constants_CMPtQbp7_es();
267530
+ init_xml_js_40FWvL78_es();
267531
+ init_constants_Qqwopz80_es();
265415
267532
  init_unified_BRHLwnjP_es();
265416
- init_DocxZipper_BBJ5zSyW_es();
267533
+ init_DocxZipper_gWkmvJfR_es();
265417
267534
  init_vue_LcaAh_pz_es();
265418
267535
  init_eventemitter3_C8I7im8Y_es();
265419
267536
  init_zipper_DqXT7uTa_es();
@@ -319922,7 +322039,7 @@ function validateNodeAddress(value2, path2 = "address") {
319922
322039
  }
319923
322040
  throw new CliError("VALIDATION_ERROR", `${path2}.kind must be one of: block, inline.`);
319924
322041
  }
319925
- function validateListItemAddress(value2, path2 = "target") {
322042
+ function validateListItemAddress3(value2, path2 = "target") {
319926
322043
  const address2 = validateNodeAddress(value2, path2);
319927
322044
  if (address2.kind !== "block" || address2.nodeType !== "listItem") {
319928
322045
  throw new CliError("VALIDATION_ERROR", `${path2} must be a block listItem address.`);
@@ -319947,7 +322064,7 @@ function validateListsListQuery(value2, path2 = "query") {
319947
322064
  }
319948
322065
  if (obj.kind != null) {
319949
322066
  const kind2 = expectString(obj.kind, `${path2}.kind`);
319950
- if (!LIST_KINDS2.has(kind2)) {
322067
+ if (!LIST_KINDS3.has(kind2)) {
319951
322068
  throw new CliError("VALIDATION_ERROR", `${path2}.kind must be "ordered" or "bullet".`);
319952
322069
  }
319953
322070
  query3.kind = kind2;
@@ -320024,7 +322141,7 @@ function validateQuerySelect(value2, path2) {
320024
322141
  if (type2 === "node") {
320025
322142
  expectOnlyKeys(obj, ["type", "nodeType", "kind"], path2);
320026
322143
  const nodeType2 = obj.nodeType != null ? String(obj.nodeType) : undefined;
320027
- if (obj.kind != null && !NODE_KINDS2.has(obj.kind)) {
322144
+ if (obj.kind != null && !NODE_KINDS3.has(obj.kind)) {
320028
322145
  throw new CliError("VALIDATION_ERROR", `${path2}.kind must be "block" or "inline".`);
320029
322146
  }
320030
322147
  return {
@@ -320063,16 +322180,16 @@ function validateQuery(value2, path2 = "query") {
320063
322180
  }
320064
322181
  return query3;
320065
322182
  }
320066
- var NODE_TYPES3, BLOCK_NODE_TYPES3, NODE_KINDS2, LIST_KINDS2, LIST_INSERT_POSITIONS2;
322183
+ var NODE_TYPES3, BLOCK_NODE_TYPES3, NODE_KINDS3, LIST_KINDS3, LIST_INSERT_POSITIONS3;
320067
322184
  var init_validate = __esm(() => {
320068
322185
  init_errors();
320069
322186
  init_guards();
320070
322187
  init_src();
320071
322188
  NODE_TYPES3 = new Set(NODE_TYPES);
320072
322189
  BLOCK_NODE_TYPES3 = new Set(BLOCK_NODE_TYPES);
320073
- NODE_KINDS2 = new Set(NODE_KINDS);
320074
- LIST_KINDS2 = new Set(LIST_KINDS);
320075
- LIST_INSERT_POSITIONS2 = new Set(LIST_INSERT_POSITIONS);
322190
+ NODE_KINDS3 = new Set(NODE_KINDS);
322191
+ LIST_KINDS3 = new Set(LIST_KINDS);
322192
+ LIST_INSERT_POSITIONS3 = new Set(LIST_INSERT_POSITIONS);
320076
322193
  });
320077
322194
 
320078
322195
  // src/lib/find-query.ts
@@ -323670,7 +325787,7 @@ async function resolveListItemAddressPayload(parsed, baseName = "target") {
323670
325787
  const payload = await resolveJsonInput(parsed, baseName);
323671
325788
  if (!payload)
323672
325789
  return;
323673
- return validateListItemAddress(payload, baseName);
325790
+ return validateListItemAddress3(payload, baseName);
323674
325791
  }
323675
325792
  async function requireListItemAddressPayload(parsed, commandName, baseName = "target") {
323676
325793
  const payload = await resolveListItemAddressPayload(parsed, baseName);