<reponame>awslabs/collaboration-chambers-on-aws<filename>source/soca/cluster_web_ui/static/node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js<gh_stars>0/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
import { once } from '../../../../base/common/functional.js';
var charTable = {
    '0': 0,
    '1': 1,
    '2': 2,
    '3': 3,
    '4': 4,
    '5': 5,
    '6': 6,
    '7': 7,
    '8': 8,
    '9': 9,
    A: 10,
    B: 11,
    C: 12,
    D: 13,
    E: 14,
    F: 15
};
var decodeData = function (str) {
    var output = new Uint8ClampedArray(str.length / 2);
    for (var i = 0; i < str.length; i += 2) {
        output[i >> 1] = (charTable[str[i]] << 4) | (charTable[str[i + 1]] & 0xF);
    }
    return output;
};
/*
const encodeData = (data: Uint8ClampedArray, length: string) => {
    const chars = '0123456789ABCDEF';
    let output = '';
    for (let i = 0; i < data.length; i++) {
        output += chars[data[i] >> 4] + chars[data[i] & 0xf];
    }
    return output;
};
*/
/**
 * Map of minimap scales to prebaked sample data at those scales. We don't
 * sample much larger data, because then font family becomes visible, which
 * is use-configurable.
 */
export var prebakedMiniMaps = {
    1: once(function () {
        return decodeData('kgfhvu9qnh3mr6eel97y6fq2hezzol8z');
    }),
    2: once(function () {
        return decodeData('vqbpgud2ghvjgm1n5hdgjnn5818fzsf2');
    })
};
