import { p as proxyCustomElement, H, c as createEvent, h } from './p-C6Ye8jK5.js';
import { B as BigNumber, d as defineCustomElement$2 } from './p-BrIzAT7l.js';
import { E as ELLIPSIS } from './p-Du8rH15E.js';
import { g as getDefaultExportFromCjs } from './p-Dj2_voLF.js';
import { d as defineCustomElement$8 } from './p-Dp2Dx35R.js';
import { d as defineCustomElement$7 } from './p-DD-9v61V.js';
import { d as defineCustomElement$6 } from './p-BrB7y7_B.js';
import { d as defineCustomElement$5 } from './p-UIJctTy4.js';
import { d as defineCustomElement$4 } from './p-C3uWH4o6.js';
import { d as defineCustomElement$3 } from './p-enJS7zcE.js';
import { d as defineCustomElement$1 } from './p-CfF5eaUv.js';

/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

var lodash_inrange;
var hasRequiredLodash_inrange;

function requireLodash_inrange () {
	if (hasRequiredLodash_inrange) return lodash_inrange;
	hasRequiredLodash_inrange = 1;
	/** Used as references for various `Number` constants. */
	var INFINITY = 1 / 0,
	    MAX_INTEGER = 1.7976931348623157e+308,
	    NAN = 0 / 0;

	/** `Object#toString` result references. */
	var symbolTag = '[object Symbol]';

	/** Used to match leading and trailing whitespace. */
	var reTrim = /^\s+|\s+$/g;

	/** Used to detect bad signed hexadecimal string values. */
	var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

	/** Used to detect binary string values. */
	var reIsBinary = /^0b[01]+$/i;

	/** Used to detect octal string values. */
	var reIsOctal = /^0o[0-7]+$/i;

	/** Built-in method references without a dependency on `root`. */
	var freeParseInt = parseInt;

	/** Used for built-in method references. */
	var objectProto = Object.prototype;

	/**
	 * Used to resolve the
	 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	var objectToString = objectProto.toString;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeMax = Math.max,
	    nativeMin = Math.min;

	/**
	 * The base implementation of `_.inRange` which doesn't coerce arguments.
	 *
	 * @private
	 * @param {number} number The number to check.
	 * @param {number} start The start of the range.
	 * @param {number} end The end of the range.
	 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
	 */
	function baseInRange(number, start, end) {
	  return number >= nativeMin(start, end) && number < nativeMax(start, end);
	}

	/**
	 * Checks if `value` is the
	 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(_.noop);
	 * // => true
	 *
	 * _.isObject(null);
	 * // => false
	 */
	function isObject(value) {
	  var type = typeof value;
	  return !!value && (type == 'object' || type == 'function');
	}

	/**
	 * Checks if `value` is object-like. A value is object-like if it's not `null`
	 * and has a `typeof` result of "object".
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	 * @example
	 *
	 * _.isObjectLike({});
	 * // => true
	 *
	 * _.isObjectLike([1, 2, 3]);
	 * // => true
	 *
	 * _.isObjectLike(_.noop);
	 * // => false
	 *
	 * _.isObjectLike(null);
	 * // => false
	 */
	function isObjectLike(value) {
	  return !!value && typeof value == 'object';
	}

	/**
	 * Checks if `value` is classified as a `Symbol` primitive or object.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
	 * @example
	 *
	 * _.isSymbol(Symbol.iterator);
	 * // => true
	 *
	 * _.isSymbol('abc');
	 * // => false
	 */
	function isSymbol(value) {
	  return typeof value == 'symbol' ||
	    (isObjectLike(value) && objectToString.call(value) == symbolTag);
	}

	/**
	 * Converts `value` to a finite number.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.12.0
	 * @category Lang
	 * @param {*} value The value to convert.
	 * @returns {number} Returns the converted number.
	 * @example
	 *
	 * _.toFinite(3.2);
	 * // => 3.2
	 *
	 * _.toFinite(Number.MIN_VALUE);
	 * // => 5e-324
	 *
	 * _.toFinite(Infinity);
	 * // => 1.7976931348623157e+308
	 *
	 * _.toFinite('3.2');
	 * // => 3.2
	 */
	function toFinite(value) {
	  if (!value) {
	    return value === 0 ? value : 0;
	  }
	  value = toNumber(value);
	  if (value === INFINITY || value === -Infinity) {
	    var sign = (value < 0 ? -1 : 1);
	    return sign * MAX_INTEGER;
	  }
	  return value === value ? value : 0;
	}

	/**
	 * Converts `value` to a number.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to process.
	 * @returns {number} Returns the number.
	 * @example
	 *
	 * _.toNumber(3.2);
	 * // => 3.2
	 *
	 * _.toNumber(Number.MIN_VALUE);
	 * // => 5e-324
	 *
	 * _.toNumber(Infinity);
	 * // => Infinity
	 *
	 * _.toNumber('3.2');
	 * // => 3.2
	 */
	function toNumber(value) {
	  if (typeof value == 'number') {
	    return value;
	  }
	  if (isSymbol(value)) {
	    return NAN;
	  }
	  if (isObject(value)) {
	    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
	    value = isObject(other) ? (other + '') : other;
	  }
	  if (typeof value != 'string') {
	    return value === 0 ? value : +value;
	  }
	  value = value.replace(reTrim, '');
	  var isBinary = reIsBinary.test(value);
	  return (isBinary || reIsOctal.test(value))
	    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
	    : (reIsBadHex.test(value) ? NAN : +value);
	}

	/**
	 * Checks if `n` is between `start` and up to, but not including, `end`. If
	 * `end` is not specified, it's set to `start` with `start` then set to `0`.
	 * If `start` is greater than `end` the params are swapped to support
	 * negative ranges.
	 *
	 * @static
	 * @memberOf _
	 * @since 3.3.0
	 * @category Number
	 * @param {number} number The number to check.
	 * @param {number} [start=0] The start of the range.
	 * @param {number} end The end of the range.
	 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
	 * @see _.range, _.rangeRight
	 * @example
	 *
	 * _.inRange(3, 2, 4);
	 * // => true
	 *
	 * _.inRange(4, 8);
	 * // => true
	 *
	 * _.inRange(4, 2);
	 * // => false
	 *
	 * _.inRange(2, 2);
	 * // => false
	 *
	 * _.inRange(1.2, 2);
	 * // => true
	 *
	 * _.inRange(5.2, 4);
	 * // => false
	 *
	 * _.inRange(-3, -2, -6);
	 * // => true
	 */
	function inRange(number, start, end) {
	  start = toFinite(start);
	  if (end === undefined) {
	    end = start;
	    start = 0;
	  } else {
	    end = toFinite(end);
	  }
	  number = toNumber(number);
	  return baseInRange(number, start, end);
	}

	lodash_inrange = inRange;
	return lodash_inrange;
}

var lodash_inrangeExports = requireLodash_inrange();
var inRange = /*@__PURE__*/getDefaultExportFromCjs(lodash_inrangeExports);

/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

var lodash_range;
var hasRequiredLodash_range;

function requireLodash_range () {
	if (hasRequiredLodash_range) return lodash_range;
	hasRequiredLodash_range = 1;
	/** Used as references for various `Number` constants. */
	var INFINITY = 1 / 0,
	    MAX_SAFE_INTEGER = 9007199254740991,
	    MAX_INTEGER = 1.7976931348623157e+308,
	    NAN = 0 / 0;

	/** `Object#toString` result references. */
	var funcTag = '[object Function]',
	    genTag = '[object GeneratorFunction]',
	    symbolTag = '[object Symbol]';

	/** Used to match leading and trailing whitespace. */
	var reTrim = /^\s+|\s+$/g;

	/** Used to detect bad signed hexadecimal string values. */
	var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

	/** Used to detect binary string values. */
	var reIsBinary = /^0b[01]+$/i;

	/** Used to detect octal string values. */
	var reIsOctal = /^0o[0-7]+$/i;

	/** Used to detect unsigned integer values. */
	var reIsUint = /^(?:0|[1-9]\d*)$/;

	/** Built-in method references without a dependency on `root`. */
	var freeParseInt = parseInt;

	/** Used for built-in method references. */
	var objectProto = Object.prototype;

	/**
	 * Used to resolve the
	 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	var objectToString = objectProto.toString;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeCeil = Math.ceil,
	    nativeMax = Math.max;

	/**
	 * The base implementation of `_.range` and `_.rangeRight` which doesn't
	 * coerce arguments.
	 *
	 * @private
	 * @param {number} start The start of the range.
	 * @param {number} end The end of the range.
	 * @param {number} step The value to increment or decrement by.
	 * @param {boolean} [fromRight] Specify iterating from right to left.
	 * @returns {Array} Returns the range of numbers.
	 */
	function baseRange(start, end, step, fromRight) {
	  var index = -1,
	      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
	      result = Array(length);

	  while (length--) {
	    result[++index] = start;
	    start += step;
	  }
	  return result;
	}

	/**
	 * Creates a `_.range` or `_.rangeRight` function.
	 *
	 * @private
	 * @param {boolean} [fromRight] Specify iterating from right to left.
	 * @returns {Function} Returns the new range function.
	 */
	function createRange(fromRight) {
	  return function(start, end, step) {
	    if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
	      end = step = undefined;
	    }
	    // Ensure the sign of `-0` is preserved.
	    start = toFinite(start);
	    if (end === undefined) {
	      end = start;
	      start = 0;
	    } else {
	      end = toFinite(end);
	    }
	    step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
	    return baseRange(start, end, step);
	  };
	}

	/**
	 * Checks if `value` is a valid array-like index.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
	 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
	 */
	function isIndex(value, length) {
	  length = length == null ? MAX_SAFE_INTEGER : length;
	  return !!length &&
	    (typeof value == 'number' || reIsUint.test(value)) &&
	    (value > -1 && value % 1 == 0 && value < length);
	}

	/**
	 * Checks if the given arguments are from an iteratee call.
	 *
	 * @private
	 * @param {*} value The potential iteratee value argument.
	 * @param {*} index The potential iteratee index or key argument.
	 * @param {*} object The potential iteratee object argument.
	 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
	 *  else `false`.
	 */
	function isIterateeCall(value, index, object) {
	  if (!isObject(object)) {
	    return false;
	  }
	  var type = typeof index;
	  if (type == 'number'
	        ? (isArrayLike(object) && isIndex(index, object.length))
	        : (type == 'string' && index in object)
	      ) {
	    return eq(object[index], value);
	  }
	  return false;
	}

	/**
	 * Performs a
	 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
	 * comparison between two values to determine if they are equivalent.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to compare.
	 * @param {*} other The other value to compare.
	 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
	 * @example
	 *
	 * var object = { 'a': 1 };
	 * var other = { 'a': 1 };
	 *
	 * _.eq(object, object);
	 * // => true
	 *
	 * _.eq(object, other);
	 * // => false
	 *
	 * _.eq('a', 'a');
	 * // => true
	 *
	 * _.eq('a', Object('a'));
	 * // => false
	 *
	 * _.eq(NaN, NaN);
	 * // => true
	 */
	function eq(value, other) {
	  return value === other || (value !== value && other !== other);
	}

	/**
	 * Checks if `value` is array-like. A value is considered array-like if it's
	 * not a function and has a `value.length` that's an integer greater than or
	 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
	 * @example
	 *
	 * _.isArrayLike([1, 2, 3]);
	 * // => true
	 *
	 * _.isArrayLike(document.body.children);
	 * // => true
	 *
	 * _.isArrayLike('abc');
	 * // => true
	 *
	 * _.isArrayLike(_.noop);
	 * // => false
	 */
	function isArrayLike(value) {
	  return value != null && isLength(value.length) && !isFunction(value);
	}

	/**
	 * Checks if `value` is classified as a `Function` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
	 * @example
	 *
	 * _.isFunction(_);
	 * // => true
	 *
	 * _.isFunction(/abc/);
	 * // => false
	 */
	function isFunction(value) {
	  // The use of `Object#toString` avoids issues with the `typeof` operator
	  // in Safari 8-9 which returns 'object' for typed array and other constructors.
	  var tag = isObject(value) ? objectToString.call(value) : '';
	  return tag == funcTag || tag == genTag;
	}

	/**
	 * Checks if `value` is a valid array-like length.
	 *
	 * **Note:** This method is loosely based on
	 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	 * @example
	 *
	 * _.isLength(3);
	 * // => true
	 *
	 * _.isLength(Number.MIN_VALUE);
	 * // => false
	 *
	 * _.isLength(Infinity);
	 * // => false
	 *
	 * _.isLength('3');
	 * // => false
	 */
	function isLength(value) {
	  return typeof value == 'number' &&
	    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}

	/**
	 * Checks if `value` is the
	 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(_.noop);
	 * // => true
	 *
	 * _.isObject(null);
	 * // => false
	 */
	function isObject(value) {
	  var type = typeof value;
	  return !!value && (type == 'object' || type == 'function');
	}

	/**
	 * Checks if `value` is object-like. A value is object-like if it's not `null`
	 * and has a `typeof` result of "object".
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	 * @example
	 *
	 * _.isObjectLike({});
	 * // => true
	 *
	 * _.isObjectLike([1, 2, 3]);
	 * // => true
	 *
	 * _.isObjectLike(_.noop);
	 * // => false
	 *
	 * _.isObjectLike(null);
	 * // => false
	 */
	function isObjectLike(value) {
	  return !!value && typeof value == 'object';
	}

	/**
	 * Checks if `value` is classified as a `Symbol` primitive or object.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
	 * @example
	 *
	 * _.isSymbol(Symbol.iterator);
	 * // => true
	 *
	 * _.isSymbol('abc');
	 * // => false
	 */
	function isSymbol(value) {
	  return typeof value == 'symbol' ||
	    (isObjectLike(value) && objectToString.call(value) == symbolTag);
	}

	/**
	 * Converts `value` to a finite number.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.12.0
	 * @category Lang
	 * @param {*} value The value to convert.
	 * @returns {number} Returns the converted number.
	 * @example
	 *
	 * _.toFinite(3.2);
	 * // => 3.2
	 *
	 * _.toFinite(Number.MIN_VALUE);
	 * // => 5e-324
	 *
	 * _.toFinite(Infinity);
	 * // => 1.7976931348623157e+308
	 *
	 * _.toFinite('3.2');
	 * // => 3.2
	 */
	function toFinite(value) {
	  if (!value) {
	    return value === 0 ? value : 0;
	  }
	  value = toNumber(value);
	  if (value === INFINITY || value === -Infinity) {
	    var sign = (value < 0 ? -1 : 1);
	    return sign * MAX_INTEGER;
	  }
	  return value === value ? value : 0;
	}

	/**
	 * Converts `value` to a number.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to process.
	 * @returns {number} Returns the number.
	 * @example
	 *
	 * _.toNumber(3.2);
	 * // => 3.2
	 *
	 * _.toNumber(Number.MIN_VALUE);
	 * // => 5e-324
	 *
	 * _.toNumber(Infinity);
	 * // => Infinity
	 *
	 * _.toNumber('3.2');
	 * // => 3.2
	 */
	function toNumber(value) {
	  if (typeof value == 'number') {
	    return value;
	  }
	  if (isSymbol(value)) {
	    return NAN;
	  }
	  if (isObject(value)) {
	    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
	    value = isObject(other) ? (other + '') : other;
	  }
	  if (typeof value != 'string') {
	    return value === 0 ? value : +value;
	  }
	  value = value.replace(reTrim, '');
	  var isBinary = reIsBinary.test(value);
	  return (isBinary || reIsOctal.test(value))
	    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
	    : (reIsBadHex.test(value) ? NAN : +value);
	}

	/**
	 * Creates an array of numbers (positive and/or negative) progressing from
	 * `start` up to, but not including, `end`. A step of `-1` is used if a negative
	 * `start` is specified without an `end` or `step`. If `end` is not specified,
	 * it's set to `start` with `start` then set to `0`.
	 *
	 * **Note:** JavaScript follows the IEEE-754 standard for resolving
	 * floating-point values which can produce unexpected results.
	 *
	 * @static
	 * @since 0.1.0
	 * @memberOf _
	 * @category Util
	 * @param {number} [start=0] The start of the range.
	 * @param {number} end The end of the range.
	 * @param {number} [step=1] The value to increment or decrement by.
	 * @returns {Array} Returns the range of numbers.
	 * @see _.inRange, _.rangeRight
	 * @example
	 *
	 * _.range(4);
	 * // => [0, 1, 2, 3]
	 *
	 * _.range(-4);
	 * // => [0, -1, -2, -3]
	 *
	 * _.range(1, 5);
	 * // => [1, 2, 3, 4]
	 *
	 * _.range(0, 20, 5);
	 * // => [0, 5, 10, 15]
	 *
	 * _.range(0, -4, -1);
	 * // => [0, -1, -2, -3]
	 *
	 * _.range(1, 4, 0);
	 * // => [1, 1, 1]
	 *
	 * _.range(0);
	 * // => []
	 */
	var range = createRange();

	lodash_range = range;
	return lodash_range;
}

var lodash_rangeExports = requireLodash_range();
var range = /*@__PURE__*/getDefaultExportFromCjs(lodash_rangeExports);

const MAX_PAGINATION_SLOTS = 7;
const MIN_PAGINATION_BATCH_LENGTH = 3;
const MAX_PAGINATION_BATCH_LENGTH = 5;

const getPagination = ({ currentPage, totalPages }) => {
    const trimBatch = (batch, comparableBatch) => (batch.includes(currentPage) ? batch : batch.slice(0, MAX_PAGINATION_SLOTS - comparableBatch.length - 1));
    const previousPage = currentPage - 1;
    const nextPage = currentPage + 1;
    if (totalPages <= MAX_PAGINATION_SLOTS) {
        return range(1, totalPages + 1).map(paginationItem => String(paginationItem));
    }
    const isLeftBatchInRange = inRange(nextPage - 1, MIN_PAGINATION_BATCH_LENGTH, MAX_PAGINATION_BATCH_LENGTH);
    const isRightBatchInRange = inRange(previousPage + 1, totalPages - MIN_PAGINATION_BATCH_LENGTH, totalPages - 1);
    const leftBatch = isLeftBatchInRange ? range(1, nextPage + 1) : range(1, MAX_PAGINATION_BATCH_LENGTH - 1);
    const rightBatch = isRightBatchInRange ? range(previousPage, totalPages + 1) : range(totalPages - MIN_PAGINATION_BATCH_LENGTH + 1, totalPages + 1);
    const trimmedLeftBatch = trimBatch(leftBatch, rightBatch);
    const trimmedRightBatch = trimBatch(rightBatch.reverse(), leftBatch);
    const mergedEdgeBatches = trimmedLeftBatch.concat(trimmedRightBatch);
    const middleBatch = [ELLIPSIS, previousPage, currentPage, nextPage, ELLIPSIS];
    const [firstLeftBatchItem] = trimmedLeftBatch;
    const [firstRightBatchItem] = trimmedRightBatch;
    const paginationItems = mergedEdgeBatches.includes(currentPage)
        ? [...trimmedLeftBatch, ELLIPSIS, ...trimmedRightBatch.reverse()]
        : [firstLeftBatchItem, ...middleBatch, firstRightBatchItem];
    return paginationItems.map(paginationItem => String(paginationItem));
};

const paginationCss = "/*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--mvx-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--mvx-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--mvx-default-font-family:var(--mvx-font-sans);--mvx-default-mono-font-family:var(--mvx-font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--mvx-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--mvx-default-font-feature-settings,normal);font-variation-settings:var(--mvx-default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--mvx-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--mvx-default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--mvx-default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities;.pagination{align-items:center;display:flex;font-size:16px;gap:8px;justify-content:center;line-height:1;max-width:480px;-webkit-user-select:none;user-select:none}.pagination .pagination-angle{cursor:pointer;display:none;transition:all .2s}.pagination .pagination-angle.disabled{pointer-events:none}.pagination .pagination-angle.disabled .pagination-angle-icon{fill:#737373}.pagination .pagination-angle:hover{color:#23f7dd}.pagination .pagination-angle:hover .pagination-angle-icon{fill:#23f7dd}.pagination .pagination-angle .pagination-angle-icon{fill:#e5e5e5;font-size:12px}.pagination .pagination-edge-button{align-items:center;cursor:pointer;display:none;gap:8px;transition:all .2s}.pagination .pagination-edge-button.inactive{pointer-events:none}.pagination .pagination-edge-button.inactive .pagination-edge-button-icon{fill:#737373}.pagination .pagination-edge-button:hover{color:#23f7dd}.pagination .pagination-edge-button:hover .pagination-edge-button-icon{fill:#23f7dd}.pagination .pagination-edge-button .pagination-edge-button-icon{fill:#e5e5e5;font-size:12px;transition:all .2s}.pagination .pagination-items{align-items:center;display:flex;gap:8px;margin:0 4px}.pagination .pagination-items .pagination-item-wrapper{align-items:center;cursor:pointer;display:flex;height:28px;justify-content:center;text-align:center;width:28px}.pagination .pagination-items .pagination-item-wrapper .pagination-item{align-items:center;border-radius:4px;color:#e5e5e5;display:flex;font-size:12px;height:28px;justify-content:center;padding:8px 0;position:relative;text-align:center;transition:color .2s ease-out;width:28px}.pagination .pagination-items .pagination-item-wrapper .pagination-item:before{background-color:#353535;border-radius:50%;content:\"\";height:28px;left:50%;opacity:.3;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);transition:all .2s;width:28px;z-index:1}.pagination .pagination-items .pagination-item-wrapper .pagination-item:hover{color:#23f7dd}.pagination .pagination-items .pagination-item-wrapper .pagination-item:hover:before{background-color:#143736;opacity:1}.pagination .pagination-items .pagination-item-wrapper .pagination-item.hundreds{font-size:8px}.pagination .pagination-items .pagination-item-wrapper .pagination-item.active{color:#23f7dd}.pagination .pagination-items .pagination-item-wrapper .pagination-item.active:before{background-color:#143736}.pagination .pagination-items .pagination-item-wrapper .pagination-item.disabled{pointer-events:none}.pagination .pagination-items .pagination-item-wrapper .pagination-item .pagination-item-text{position:relative;z-index:2}@media (min-width:576px){.pagination .pagination-angle{display:flex}.pagination .pagination-edge-button{display:flex;margin:0 4px;padding:0}}@media (min-width:375px){.pagination .pagination-angle .pagination-angle-icon,.pagination .pagination-edge-button .pagination-edge-button-icon{font-size:16px}}@media (min-width:768px){.pagination .pagination-items .pagination-item-wrapper{height:32px;width:32px}.pagination .pagination-items .pagination-item-wrapper .pagination-item{font-size:16px;height:32px;width:32px}.pagination .pagination-items .pagination-item-wrapper .pagination-item:before{height:32px;width:32px}.pagination .pagination-items .pagination-item-wrapper .pagination-item.hundreds{font-size:10px}}";

const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.pageChange = createEvent(this, "pageChange", 7);
        this.currentPage = 1;
        this.isDisabled = false;
        this.isTooltipOpen = false;
    }
    watchCurrentPage(newValue) {
        if (newValue !== this.currentPageIndex) {
            this.currentPageIndex = newValue;
        }
    }
    handleTooltipStatus(isOpen) {
        this.isTooltipOpen = isOpen;
    }
    handlePageClick(newPageIndex) {
        if (newPageIndex === this.currentPageIndex) {
            return;
        }
        this.currentPageIndex = newPageIndex;
        this.pageChange.emit(newPageIndex);
    }
    handleEdgePageClick(pageToNavigateTo) {
        return (event) => {
            event.preventDefault();
            this.handlePageClick(pageToNavigateTo);
        };
    }
    isCurrentPageActive(paginationItem) {
        return new BigNumber(paginationItem).isEqualTo(this.currentPageIndex);
    }
    isInTheHundreds(paginationItem) {
        return parseFloat(paginationItem) && new BigNumber(paginationItem).isGreaterThanOrEqualTo(100);
    }
    componentWillLoad() {
        this.currentPageIndex = this.currentPage;
    }
    render() {
        const isLeftToggleDisabled = this.currentPageIndex === 1;
        const isRightToggleDisabled = this.currentPageIndex === this.totalPages;
        const paginationItems = getPagination({ currentPage: this.currentPageIndex, totalPages: this.totalPages });
        return (h("div", { key: '605609fe4dd0a47e68325ed22308341edde6bee1', class: { pagination: true, [this.class]: Boolean(this.class) } }, h("span", { key: '2d254a7fa7ae7c4187dc66da4dbf0baf1c882854', onClick: this.handleEdgePageClick(1), class: { 'pagination-angle': true, 'disabled': isLeftToggleDisabled } }, h("mvx-angles-left-icon", { key: 'faec3cacefc281b3b5ba2867635a80993ef0d6ac', class: "pagination-angle-icon" })), h("div", { key: '352df696b76b9cd66a1a6ee06e39fce41a95b554', onClick: this.handleEdgePageClick(this.currentPageIndex - 1), class: { 'pagination-edge-button': true, 'disabled': this.isDisabled, 'inactive': isLeftToggleDisabled } }, h("mvx-angle-left-icon", { key: 'e58d208d575fe998721ded7fe5b4740033ea9f58', class: "pagination-edge-button-icon" })), h("div", { key: '9082bc0b092dbdab4db048d8789e1c9f6a1f0515', class: "pagination-items" }, paginationItems.map(paginationItem => (h("div", { class: "pagination-item-wrapper" }, parseFloat(paginationItem) ? (h("div", { onClick: () => this.handlePageClick(Number(paginationItem)), class: {
                'pagination-item': true,
                'disabled': this.isDisabled,
                'active': this.isCurrentPageActive(paginationItem),
                'hundreds': this.isInTheHundreds(paginationItem),
            } }, h("span", { class: "pagination-item-text" }, paginationItem))) : (h("mvx-tooltip", { triggerOnClick: true, onTriggerRender: (event) => this.handleTooltipStatus(event.detail), trigger: h("mvx-pagination-ellipsis", { isActive: this.isTooltipOpen }) }, h("mvx-pagination-ellipsis-form", { isVisible: this.isTooltipOpen, maxPageToSearchFor: this.totalPages, onSearch: (event) => this.handlePageClick(event.detail) }))))))), h("div", { key: '778e18739f82d98ac0314027457e85738f0df289', onClick: this.handleEdgePageClick(this.currentPageIndex + 1), class: { 'pagination-edge-button': true, 'disabled': this.isDisabled, 'inactive': isRightToggleDisabled } }, h("mvx-angle-right-icon", { key: '943a88b3a391a925321c69bb51620e2039b6f953', class: "pagination-edge-button-icon" })), h("span", { key: '814463ff9451bc82801291b672efac9fd6e6e481', onClick: this.handleEdgePageClick(this.totalPages), class: { 'pagination-angle': true, 'disabled': isRightToggleDisabled } }, h("mvx-angles-right-icon", { key: '4de0b351beff8b36327b5b2dba3d8997a05e50d8', class: "pagination-angle-icon" }))));
    }
    static get watchers() { return {
        "currentPage": ["watchCurrentPage"]
    }; }
    static get style() { return paginationCss; }
}, [1, "mvx-pagination", {
        "currentPage": [2, "current-page"],
        "totalPages": [2, "total-pages"],
        "isDisabled": [4, "is-disabled"],
        "class": [1],
        "currentPageIndex": [32],
        "isTooltipOpen": [32]
    }, undefined, {
        "currentPage": ["watchCurrentPage"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["mvx-pagination", "mvx-angle-left-icon", "mvx-angle-right-icon", "mvx-angles-left-icon", "mvx-angles-right-icon", "mvx-magnifying-glass-icon", "mvx-pagination-ellipsis", "mvx-pagination-ellipsis-form", "mvx-tooltip"];
    components.forEach(tagName => { switch (tagName) {
        case "mvx-pagination":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, Pagination);
            }
            break;
        case "mvx-angle-left-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$8();
            }
            break;
        case "mvx-angle-right-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "mvx-angles-left-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "mvx-angles-right-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "mvx-magnifying-glass-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "mvx-pagination-ellipsis":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "mvx-pagination-ellipsis-form":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "mvx-tooltip":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { Pagination as P, defineCustomElement as d };
//# sourceMappingURL=p-BQsPwFfM.js.map

//# sourceMappingURL=p-BQsPwFfM.js.map