"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.resolveOrder = void 0;
// resolve "order" to a safe, 0+ integer, otherwise return undefined
// Note: Any changes to this function should also be made to "resolveStart"
// in packages/editor/adf-schema/src/schema/nodes/ordered-list.ts
var resolveOrder = exports.resolveOrder = function resolveOrder(order) {
  var num = Number(order);
  if (Number.isNaN(num)) {
    return;
  }
  if (num < 0) {
    return;
  }
  return Math.floor(Math.max(num, 0));
};