function prettyPrint(input, options, pad) {
    if (pad === void 0) { pad = ''; }
    // sensible option defaults
    var defaultOptions = {
        indent: '\t',
        singleQuotes: true
    };
    var combinedOptions = __assign(__assign({}, defaultOptions), options);
    var tokens;
    if (combinedOptions.inlineCharacterLimit === undefined) {
        tokens = {
            newLine: '\n',
            newLineOrSpace: '\n',
            pad: pad,
            indent: pad + combinedOptions.indent
        };
    }
    else {
        tokens = {
            newLine: '@@__PRETTY_PRINT_NEW_LINE__@@',
            newLineOrSpace: '@@__PRETTY_PRINT_NEW_LINE_OR_SPACE__@@',
            pad: '@@__PRETTY_PRINT_PAD__@@',
            indent: '@@__PRETTY_PRINT_INDENT__@@'
        };
    }
    var expandWhiteSpace = function (string) {
        if (combinedOptions.inlineCharacterLimit === undefined) {
            return string;
        }
        var oneLined = string
            .replace(new RegExp(tokens.newLine, 'g'), '')
            .replace(new RegExp(tokens.newLineOrSpace, 'g'), ' ')
            .replace(new RegExp(tokens.pad + '|' + tokens.indent, 'g'), '');
        if (oneLined.length <= combinedOptions.inlineCharacterLimit) {
            return oneLined;
        }
        return string
            .replace(new RegExp(tokens.newLine + '|' + tokens.newLineOrSpace, 'g'), '\n')
            .replace(new RegExp(tokens.pad, 'g'), pad)
            .replace(new RegExp(tokens.indent, 'g'), pad + combinedOptions.indent);
    };
    if (seen.indexOf(input) !== -1) {
        return '"[Circular]"';
    }
    if (input === null ||
        input === undefined ||
        typeof input === 'number' ||
        typeof input === 'boolean' ||
        typeof input === 'function' ||
        typeof input === 'symbol' ||
        isRegexp(input)) {
        return String(input);
    }
    if (input instanceof Date) {
        return "new Date('" + input.toISOString() + "')";
    }
    if (Array.isArray(input)) {
        if (input.length === 0) {
            return '[]';
        }
        seen.push(input);
        var ret = '[' + tokens.newLine + input.map(function (el, i) {
            var eol = input.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
            var value = prettyPrint(el, combinedOptions, pad + combinedOptions.indent);
            if (combinedOptions.transform) {
                value = combinedOptions.transform(input, i, value);
            }
            return tokens.indent + value + eol;
        }).join('') + tokens.pad + ']';
        seen.pop();
        return expandWhiteSpace(ret);
    }
    if (isObj(input)) {
        var objKeys_1 = __spreadArrays(Object.keys(input), (getOwnEnumPropSymbols(input)));
        if (combinedOptions.filter) {
            objKeys_1 = objKeys_1.filter(function (el) { return combinedOptions.filter && combinedOptions.filter(input, el); });
        }
        if (objKeys_1.length === 0) {
            return '{}';
        }
        seen.push(input);
        var ret = '{' + tokens.newLine + objKeys_1.map(function (el, i) {
            var eol = objKeys_1.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
            var isSymbol = typeof el === 'symbol';
            var isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el.toString());
            var key = isSymbol || isClassic ? el : prettyPrint(el, combinedOptions);
            var value = prettyPrint(input[el], combinedOptions, pad + combinedOptions.indent);
            if (combinedOptions.transform) {
                value = combinedOptions.transform(input, el, value);
            }
            return tokens.indent + String(key) + ': ' + value + eol;
        }).join('') + tokens.pad + '}';
        seen.pop();
        return expandWhiteSpace(ret);
    }
    input = String(input).replace(/[\r\n]/g, function (x) { return x === '\n' ? '\\n' : '\\r'; });
    if (!combinedOptions.singleQuotes) {
        input = input.replace(/"/g, '\\"');
        return "\"" + input + "\"";
    }
    input = input.replace(/\\?'/g, '\\\'');
    return "'" + input + "'";
}
pretty print an object

@param input the object to pretty print
@param options the formatting options, transforms, and filters
@param pad the padding string