"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalizeScrollYOffset=exports.normalizeShowExtensions=void 0;const dom_1=require("../../utils/dom"),helpers_1=require("../../utils/helpers");function normalizeShowExtensions(e){if(void 0===e)return!1;if(""===e)return!0;if("string"!=typeof e)return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map((e=>e.trim()))}}function normalizeScrollYOffset(e){if("string"==typeof e&&!(0,helpers_1.isNumeric)(e)){const o=(0,dom_1.querySelector)(e);o||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const r=o&&o.getBoundingClientRect().bottom||0;return()=>r}return"number"==typeof e||(0,helpers_1.isNumeric)(e)?()=>"number"==typeof e?e:parseFloat(e):"function"==typeof e?()=>{const o=e();return"number"!=typeof o&&console.warn(`scrollYOffset should return number but returned value "${o}" of type ${typeof o}`),o}:(void 0!==e&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function"),()=>0)}exports.normalizeShowExtensions=normalizeShowExtensions,exports.normalizeScrollYOffset=normalizeScrollYOffset;
//# sourceMappingURL=helpers.js.map