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AAS,WACxB,MAAO,CAAE,aAAc,EAAO,eAAgB,GAAK,kBAAkB,EAAM,qBAAsB,IACnG,IAEC,CACH,QAAS,EACT,QAAS,CACL,CAAC,GAAa,eAAe,EAAM,WAEvC,OAAQ,IACD,EAAO,cACP,EAAO,QACP,EAAO,QACP,EAAO,QAGtB,CACA,SAAS,eAAe,GACpB,MAAM,EAAa,eACnB,MAAO,CACH,QAAS,EACT,QAAS,CACL,CAAC,GAAa,eAAe,EAAM,WAEvC,OAAQ,CAAC,CACD,GAAI,SACJ,KAAM,SACN,OAAQ,IAGxB,CACA,SAAS,eAAe,EAAM,GAC1B,MAAM,EAAS,CAAE,MAAO,EAAK,MAAO,QASpC,OARoB,MAAhB,EAAK,UACL,EAAO,QAAU,EAAK,SACN,MAAhB,EAAK,UACL,EAAO,QAAU,EAAK,SACF,MAApB,EAAK,cACL,EAAO,YAAc,EAAK,aACX,MAAf,EAAK,SACL,EAAO,OAAS,EAAK,QAClB,CACX,CAjQA,gBAAgB,OAoVhB,MAAM,OAAS,CACX,kBACA,gBACA,oBACA,cACA,0BAGK,MAAO,SAAU,QAAS,UAAW,WAAY,SAAU,OAAQ","file":"/npm/@versatiles/style@5.8.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@versatiles/style@5.8.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * The abstract `Color` class provides a blueprint for color manipulation and conversion.\n * It includes methods for converting between different color models ({@link HSL}, {@link HSV}, {@link RGB}),\n * as well as various color transformations such as inversion, rotation, saturation, and blending.\n *\n * @abstract\n */\n/**\n * Abstract class representing a color.\n */\nclass Color {\n    /**\n     * Parses a color from a string or another Color instance.\n     * @param input - The input color as a string or Color instance.\n     * @returns The parsed Color instance.\n     */\n    static parse;\n    /**\n     * The HSL color model.\n     */\n    static HSL;\n    /**\n     * The HSV color model.\n     */\n    static HSV;\n    /**\n     * The RGB color model.\n     */\n    static RGB;\n    /**\n     * Converts the color to a hexadecimal string.\n     * @returns The hexadecimal representation of the color.\n     */\n    asHex() {\n        return this.asRGB().asHex();\n    }\n    /**\n     * Inverts the luminosity of the color.\n     * @returns A new HSL color with inverted luminosity.\n     */\n    invertLuminosity() {\n        return this.asHSL().invertLuminosity();\n    }\n    /**\n     * Rotates the hue of the color by a given offset.\n     * @param offset - The amount to rotate the hue.\n     * @returns A new HSL color with the hue rotated.\n     */\n    rotateHue(offset) {\n        return this.asHSL().rotateHue(offset);\n    }\n    /**\n     * Saturates the color by a given ratio.\n     * @param ratio - The ratio to saturate the color.\n     * @returns A new HSL color with increased saturation.\n     */\n    saturate(ratio) {\n        return this.asHSL().saturate(ratio);\n    }\n    /**\n     * Applies gamma correction to the color.\n     * @param value - The gamma correction value.\n     * @returns A new RGB color with gamma correction applied.\n     */\n    gamma(value) {\n        return this.asRGB().gamma(value);\n    }\n    /**\n     * Inverts the color.\n     * @returns A new RGB color with inverted values.\n     */\n    invert() {\n        return this.asRGB().invert();\n    }\n    /**\n     * Adjusts the contrast of the color.\n     * @param value - The contrast adjustment value.\n     * @returns A new RGB color with adjusted contrast.\n     */\n    contrast(value) {\n        return this.asRGB().contrast(value);\n    }\n    /**\n     * Adjusts the brightness of the color.\n     * @param value - The brightness adjustment value.\n     * @returns A new RGB color with adjusted brightness.\n     */\n    brightness(value) {\n        return this.asRGB().brightness(value);\n    }\n    /**\n     * Lightens the color by a given value.\n     * @param value - The amount to lighten the color.\n     * @returns A new RGB color that is lightened.\n     */\n    lighten(value) {\n        return this.asRGB().lighten(value);\n    }\n    /**\n     * Darkens the color by a given value.\n     * @param value - The amount to darken the color.\n     * @returns A new RGB color that is darkened.\n     */\n    darken(value) {\n        return this.asRGB().darken(value);\n    }\n    /**\n     * Tints the color by blending it with another color.\n     * @param value - The blend ratio.\n     * @param tintColor - The color to blend with.\n     * @returns A new RGB color that is tinted.\n     */\n    tint(value, tintColor) {\n        return this.asRGB().tint(value, tintColor);\n    }\n    /**\n     * Blends the color with another color.\n     * @param value - The blend ratio.\n     * @param blendColor - The color to blend with.\n     * @returns A new RGB color that is blended.\n     */\n    blend(value, blendColor) {\n        return this.asRGB().blend(value, blendColor);\n    }\n    /**\n     * Sets the hue of the color.\n     * @param value - The new hue value.\n     * @returns A new HSV color with the hue set.\n     */\n    setHue(value) {\n        return this.asHSV().setHue(value);\n    }\n}\n\nfunction clamp(value, min, max) {\n    if (value == null || isNaN(value))\n        return min;\n    if (value < min)\n        return min;\n    if (value > max)\n        return max;\n    return value;\n}\nfunction mod(value, max) {\n    value = value % max;\n    if (value < 0)\n        value += max;\n    if (value == 0)\n        return 0;\n    return value;\n}\nfunction formatFloat(num, precision) {\n    return num.toFixed(precision).replace(/0+$/, '').replace(/\\.$/, '');\n}\n\nlet colorDictionary = new Map();\nfunction randomColor(options) {\n    if (colorDictionary.size === 0)\n        colorDictionary = initColorDictionary();\n    options ??= {};\n    let seed = inputToSeed(options.seed);\n    const H = pickHue(options);\n    const S = pickSaturation(H, options);\n    const V = pickBrightness(H, S, options);\n    return new HSV(H, S, V, options.opacity ?? 1);\n    function pickHue(options) {\n        return mod(randomWithin(getHueRange(options.hue)), 360);\n        function getHueRange(hue) {\n            if (typeof hue === 'number') {\n                hue = mod(hue, 360);\n                return [hue, hue];\n            }\n            if (typeof hue === 'string') {\n                const color = colorDictionary.get(hue);\n                if (color?.hueRange)\n                    return color.hueRange;\n            }\n            return [0, 360];\n        }\n    }\n    function pickSaturation(hue, options) {\n        if (options.hue === 'monochrome')\n            return 0;\n        if (options.luminosity === 'random')\n            return randomWithin([0, 100]);\n        let [sMin, sMax] = getColorInfo(hue).saturationRange;\n        if (options.saturation === 'strong')\n            return sMax;\n        switch (options.luminosity) {\n            case 'bright':\n                sMin = 55;\n                break;\n            case 'dark':\n                sMin = sMax - 10;\n                break;\n            case 'light':\n                sMax = 55;\n                break;\n        }\n        return randomWithin([sMin, sMax]);\n    }\n    function pickBrightness(h, s, options) {\n        let bMin = getMinimumBrightness(h, s), bMax = 100;\n        if (typeof options.luminosity === 'number') {\n            bMin = options.luminosity;\n            bMax = options.luminosity;\n        }\n        else {\n            switch (options.luminosity) {\n                case 'dark':\n                    bMax = Math.min(100, bMin + 20);\n                    break;\n                case 'light':\n                    bMin = (bMax + bMin) / 2;\n                    break;\n                case 'random':\n                    bMin = 0;\n                    bMax = 100;\n                    break;\n            }\n        }\n        return randomWithin([bMin, bMax]);\n        function getMinimumBrightness(h, s) {\n            const { lowerBounds } = getColorInfo(h);\n            for (let i = 0; i < lowerBounds.length - 1; i++) {\n                const [s1, v1] = lowerBounds[i];\n                const [s2, v2] = lowerBounds[i + 1];\n                if (s >= s1 && s <= s2) {\n                    const m = (v2 - v1) / (s2 - s1), b = v1 - m * s1;\n                    return m * s + b;\n                }\n            }\n            return 0;\n        }\n    }\n    function randomWithin(range) {\n        //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n        seed = (seed * 9301 + 49297) % 233280;\n        return Math.floor(range[0] + seed / 233280.0 * (range[1] - range[0]));\n    }\n}\nfunction inputToSeed(input) {\n    if (input == null)\n        return 0;\n    if (typeof input === 'number')\n        return input;\n    let i = 0;\n    for (let p = 0; p < input.length; p++)\n        i = (i * 0x101 + input.charCodeAt(p)) % 0x100000000;\n    return i;\n}\nfunction initColorDictionary() {\n    const dict = new Map();\n    const defineColor = (name, hueRange, lowerBounds) => {\n        const [greyest] = lowerBounds;\n        const colorful = lowerBounds[lowerBounds.length - 1];\n        dict.set(name, {\n            hueRange,\n            lowerBounds,\n            saturationRange: [greyest[0], colorful[0]],\n            brightnessRange: [colorful[1], greyest[1]],\n        });\n    };\n    defineColor('monochrome', null, [[0, 0], [100, 0]]);\n    defineColor('red', [-26, 18], [[20, 100], [30, 92], [40, 89], [50, 85], [60, 78], [70, 70], [80, 60], [90, 55], [100, 50]]);\n    defineColor('orange', [18, 46], [[20, 100], [30, 93], [40, 88], [50, 86], [60, 85], [70, 70], [100, 70]]);\n    defineColor('yellow', [46, 62], [[25, 100], [40, 94], [50, 89], [60, 86], [70, 84], [80, 82], [90, 80], [100, 75]]);\n    defineColor('green', [62, 178], [[30, 100], [40, 90], [50, 85], [60, 81], [70, 74], [80, 64], [90, 50], [100, 40]]);\n    defineColor('blue', [178, 257], [[20, 100], [30, 86], [40, 80], [50, 74], [60, 60], [70, 52], [80, 44], [90, 39], [100, 35]]);\n    defineColor('purple', [257, 282], [[20, 100], [30, 87], [40, 79], [50, 70], [60, 65], [70, 59], [80, 52], [90, 45], [100, 42]]);\n    defineColor('pink', [282, 334], [[20, 100], [30, 90], [40, 86], [60, 84], [80, 80], [90, 75], [100, 73]]);\n    return dict;\n}\nfunction getColorInfo(hue) {\n    hue = mod(hue, 360);\n    if (hue >= 334)\n        hue -= 360;\n    for (const color of colorDictionary.values()) {\n        if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) {\n            return color;\n        }\n    }\n    throw Error('Color hue value not found');\n}\n\n/**\n * Represents an RGB color with optional alpha transparency.\n *\n * @extends Color\n */\nclass RGB extends Color {\n    /**\n     * Red component (0-255).\n     */\n    r;\n    /**\n     * Green component (0-255).\n     */\n    g;\n    /**\n     * Blue component (0-255).\n     */\n    b;\n    /**\n     * Alpha component (0-1).\n     */\n    a;\n    /**\n     * Creates an instance of RGB.\n     *\n     * @param r - Red component (0-255).\n     * @param g - Green component (0-255).\n     * @param b - Blue component (0-255).\n     * @param a - Alpha component (0-1), defaults to 1.\n     */\n    constructor(r, g, b, a = 1) {\n        super();\n        this.r = clamp(r, 0, 255);\n        this.g = clamp(g, 0, 255);\n        this.b = clamp(b, 0, 255);\n        this.a = clamp(a, 0, 1);\n    }\n    /**\n     * Creates a clone of the current RGB color.\n     *\n     * @returns A new RGB instance with the same color values.\n     */\n    clone() {\n        return new RGB(this.r, this.g, this.b, this.a);\n    }\n    /**\n     * Returns the RGB color as an array.\n     *\n     * @returns An array containing the red, green, blue, and alpha components.\n     */\n    asArray() {\n        return [this.r, this.g, this.b, this.a];\n    }\n    /**\n     * Rounds the RGB color components to the nearest integer.\n     *\n     * @returns A new RGB instance with rounded color values.\n     */\n    round() {\n        return new RGB(Math.round(this.r), Math.round(this.g), Math.round(this.b), Math.round(this.a * 1000) / 1000);\n    }\n    /**\n     * Returns the RGB color as a string.\n     *\n     * @returns A string representation of the RGB color in either `rgb` or `rgba` format.\n     */\n    asString() {\n        if (this.a === 1) {\n            return `rgb(${this.r.toFixed(0)},${this.g.toFixed(0)},${this.b.toFixed(0)})`;\n        }\n        else {\n            return `rgba(${this.r.toFixed(0)},${this.g.toFixed(0)},${this.b.toFixed(0)},${formatFloat(this.a, 3)})`;\n        }\n    }\n    /**\n     * Returns the RGB color as a hexadecimal string.\n     *\n     * @returns A string representation of the RGB color in hexadecimal format.\n     */\n    asHex() {\n        const r = Math.round(this.r).toString(16).padStart(2, '0');\n        const g = Math.round(this.g).toString(16).padStart(2, '0');\n        const b = Math.round(this.b).toString(16).padStart(2, '0');\n        if (this.a === 1) {\n            return `#${r}${g}${b}`.toUpperCase();\n        }\n        else {\n            const a = Math.round(this.a * 255).toString(16).padStart(2, '0');\n            return `#${r}${g}${b}${a}`.toUpperCase();\n        }\n    }\n    /**\n     * Converts the RGB color to an HSL color.\n     *\n     * @returns An HSL instance representing the same color.\n     */\n    asHSL() {\n        const r = this.r / 255;\n        const g = this.g / 255;\n        const b = this.b / 255;\n        const min = Math.min(r, g, b);\n        const max = Math.max(r, g, b);\n        const delta = max - min;\n        let h = 0;\n        let s = 0;\n        if (max === min)\n            h = 0;\n        else if (r === max)\n            h = (g - b) / delta;\n        else if (g === max)\n            h = 2 + (b - r) / delta;\n        else if (b === max)\n            h = 4 + (r - g) / delta;\n        h = Math.min(h * 60, 360);\n        if (h < 0)\n            h += 360;\n        const l = (min + max) / 2;\n        if (max === min)\n            s = 0;\n        else if (l <= 0.5)\n            s = delta / (max + min);\n        else\n            s = delta / (2 - max - min);\n        return new HSL(h, s * 100, l * 100, this.a);\n    }\n    ;\n    /**\n     * Converts the RGB color to an HSV color.\n     *\n     * @returns An HSV instance representing the same color.\n     */\n    asHSV() {\n        const r = this.r / 255;\n        const g = this.g / 255;\n        const b = this.b / 255;\n        const v = Math.max(r, g, b);\n        const diff = v - Math.min(r, g, b);\n        let h = 0;\n        let s = 0;\n        if (diff !== 0) {\n            function diffc(c) {\n                return (v - c) / 6 / diff + 1 / 2;\n            }\n            s = diff / v;\n            const rdif = diffc(r);\n            const gdif = diffc(g);\n            const bdif = diffc(b);\n            if (r === v)\n                h = bdif - gdif;\n            else if (g === v)\n                h = (1 / 3) + rdif - bdif;\n            else if (b === v)\n                h = (2 / 3) + gdif - rdif;\n            if (h < 0)\n                h += 1;\n            else if (h > 1)\n                h -= 1;\n        }\n        return new HSV(h * 360, s * 100, v * 100, this.a);\n    }\n    /**\n     * Returns the RGB color.\n     *\n     * @returns The current RGB instance.\n     */\n    asRGB() {\n        return this.clone();\n    }\n    /**\n     * Returns the RGB color.\n     *\n     * @returns The current RGB instance.\n     */\n    toRGB() {\n        return this;\n    }\n    /**\n     * Parses a string or Color instance into an RGB color.\n     *\n     * @param input - The input string or Color instance to parse.\n     * @returns A new RGB instance representing the parsed color.\n     * @throws Will throw an error if the input string is not a valid RGB color string.\n     */\n    static parse(input) {\n        if (input instanceof Color)\n            return input.asRGB();\n        input = input.toLowerCase().replaceAll(/[^0-9a-z.#,()]/g, '');\n        let match;\n        match = input.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/);\n        if (match) {\n            const r = parseInt(match[1], 16);\n            const g = parseInt(match[2], 16);\n            const b = parseInt(match[3], 16);\n            const a = match[4] ? parseInt(match[4], 16) / 255 : 1;\n            return new RGB(r, g, b, a);\n        }\n        match = input.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/);\n        if (match) {\n            const r = parseInt(match[1], 16) * 17;\n            const g = parseInt(match[2], 16) * 17;\n            const b = parseInt(match[3], 16) * 17;\n            const a = match[4] ? parseInt(match[4], 16) / 15 : 1;\n            return new RGB(r, g, b, a);\n        }\n        input = input.trim().toLowerCase().replaceAll(' ', '');\n        match = input.match(/^rgb\\((\\d+),(\\d+),(\\d+)\\)$/);\n        if (match) {\n            const r = parseInt(match[1]);\n            const g = parseInt(match[2]);\n            const b = parseInt(match[3]);\n            return new RGB(r, g, b);\n        }\n        match = input.match(/^rgba\\((\\d+),(\\d+),(\\d+),([.\\d]+)\\)$/);\n        if (match) {\n            const r = parseInt(match[1]);\n            const g = parseInt(match[2]);\n            const b = parseInt(match[3]);\n            const a = parseFloat(match[4]);\n            return new RGB(r, g, b, a);\n        }\n        throw new Error(`Invalid RGB color string: \"${input}\"`);\n    }\n    /**\n     * Adjusts the gamma of the RGB color.\n     *\n     * @param value - The gamma value to apply.\n     * @returns A new RGB instance with the adjusted gamma.\n     */\n    gamma(value) {\n        if (value < 1e-3)\n            value = 1e-3;\n        if (value > 1e3)\n            value = 1e3;\n        return new RGB(Math.pow(this.r / 255, value) * 255, Math.pow(this.g / 255, value) * 255, Math.pow(this.b / 255, value) * 255, this.a);\n    }\n    /**\n     * Inverts the RGB color.\n     *\n     * @returns A new RGB instance with the inverted color values.\n     */\n    invert() {\n        return new RGB(255 - this.r, 255 - this.g, 255 - this.b, this.a);\n    }\n    /**\n     * Adjusts the contrast of the RGB color.\n     *\n     * @param value - The contrast value to apply.\n     * @returns A new RGB instance with the adjusted contrast.\n     */\n    contrast(value) {\n        if (value < 0)\n            value = 0;\n        if (value > 1e6)\n            value = 1e6;\n        return new RGB(clamp((this.r - 127.5) * value + 127.5, 0, 255), clamp((this.g - 127.5) * value + 127.5, 0, 255), clamp((this.b - 127.5) * value + 127.5, 0, 255), this.a);\n    }\n    /**\n     * Adjusts the brightness of the RGB color.\n     *\n     * @param value - The brightness value to apply.\n     * @returns A new RGB instance with the adjusted brightness.\n     */\n    brightness(value) {\n        if (value < -1)\n            value = -1;\n        if (value > 1)\n            value = 1;\n        const a = 1 - Math.abs(value);\n        const b = (value < 0) ? 0 : 255 * value;\n        return new RGB(this.r * a + b, this.g * a + b, this.b * a + b, this.a);\n    }\n    /**\n     * Tints the RGB color with another color.\n     *\n     * @param value - The tint value to apply.\n     * @param tintColor - The color to use for tinting.\n     * @returns A new RGB instance with the applied tint.\n     */\n    tint(value, tintColor) {\n        if (value < 0)\n            value = 0;\n        if (value > 1)\n            value = 1;\n        const rgbNew = this.setHue(tintColor.asHSV().h).asRGB();\n        return new RGB(this.r * (1 - value) + value * rgbNew.r, this.g * (1 - value) + value * rgbNew.g, this.b * (1 - value) + value * rgbNew.b, this.a);\n    }\n    /**\n     * Blends the RGB color with another color.\n     *\n     * @param value - The blend value to apply.\n     * @param blendColor - The color to blend with.\n     * @returns A new RGB instance with the blended color.\n     */\n    blend(value, blendColor) {\n        value = clamp(value ?? 0, 0, 1);\n        const rgbNew = blendColor.asRGB();\n        return new RGB(this.r * (1 - value) + value * rgbNew.r, this.g * (1 - value) + value * rgbNew.g, this.b * (1 - value) + value * rgbNew.b, this.a);\n    }\n    /**\n     * Lightens the RGB color.\n     *\n     * @param ratio - The ratio to lighten the color by.\n     * @returns A new RGB instance with the lightened color.\n     */\n    lighten(ratio) {\n        return new RGB(clamp(255 - (255 - this.r) * (1 - ratio), 0, 255), clamp(255 - (255 - this.g) * (1 - ratio), 0, 255), clamp(255 - (255 - this.b) * (1 - ratio), 0, 255), this.a);\n    }\n    /**\n     * Darkens the RGB color.\n     *\n     * @param ratio - The ratio to darken the color by.\n     * @returns A new RGB instance with the darkened color.\n     */\n    darken(ratio) {\n        return new RGB(clamp(this.r * (1 - ratio), 0, 255), clamp(this.g * (1 - ratio), 0, 255), clamp(this.b * (1 - ratio), 0, 255), this.a);\n    }\n    /**\n     * Fades the RGB color by reducing its alpha value.\n     *\n     * @param value - The fade value to apply.\n     * @returns A new RGB instance with the faded color.\n     */\n    fade(value) {\n        return new RGB(this.r, this.g, this.b, this.a * (1 - value));\n    }\n}\n\n/**\n * Represents a color in the HSV (Hue, Saturation, Value) color space.\n * Extends the base `Color` class.\n */\nclass HSV extends Color {\n    /**\n     * The hue component of the color, in the range [0, 360].\n     */\n    h;\n    /**\n     * The saturation component of the color, in the range [0, 100].\n     */\n    s;\n    /**\n     * The value (brightness) component of the color, in the range [0, 100].\n     */\n    v;\n    /**\n     * The alpha (opacity) component of the color, in the range [0, 1].\n     */\n    a;\n    /**\n     * Constructs a new HSV color.\n     * @param h - The hue component, in the range [0, 360].\n     * @param s - The saturation component, in the range [0, 100].\n     * @param v - The value (brightness) component, in the range [0, 100].\n     * @param a - The alpha (opacity) component, in the range [0, 1]. Defaults to 1.\n     */\n    constructor(h, s, v, a = 1) {\n        super();\n        this.h = mod(h, 360);\n        this.s = clamp(s, 0, 100);\n        this.v = clamp(v, 0, 100);\n        this.a = clamp(a, 0, 1);\n    }\n    /**\n     * Returns the HSV color as an array of numbers.\n     * @returns An array containing the hue, saturation, value, and alpha components.\n     */\n    asArray() {\n        return [this.h, this.s, this.v, this.a];\n    }\n    /**\n     * Returns a new HSV color with the components rounded to the nearest integer.\n     * @returns A new HSV color with rounded components.\n     */\n    round() {\n        return new HSV(Math.round(this.h), Math.round(this.s), Math.round(this.v), Math.round(this.a * 1000) / 1000);\n    }\n    /**\n     * Returns the color as a string representation.\n     * @returns A string representation of the color.\n     */\n    asString() {\n        return this.asHSL().asString();\n    }\n    /**\n     * Creates a new HSV color that is a copy of the current color.\n     * @returns A new HSV color that is a clone of the current color.\n     */\n    clone() {\n        return new HSV(this.h, this.s, this.v, this.a);\n    }\n    /**\n     * Converts the HSV color to an HSL color.\n     * @returns An HSL representation of the color.\n     */\n    asHSL() {\n        const s = this.s / 100;\n        const v = this.v / 100;\n        const k = (2 - s) * v;\n        const q = k < 1 ? k : 2 - k;\n        return new HSL(this.h, q == 0 ? 0 : 100 * s * v / q, 100 * k / 2, this.a);\n    }\n    /**\n     * Returns the current HSV color.\n     * @returns The current HSV color.\n     */\n    asHSV() {\n        return this.clone();\n    }\n    /**\n     * Returns the current HSV color.\n     * @returns The current HSV color.\n     */\n    toHSV() {\n        return this;\n    }\n    /**\n     * Converts the HSV color to an RGB color.\n     * @returns An RGB representation of the color.\n     */\n    asRGB() {\n        const h = this.h / 360; // Normalize h to range [0, 1]\n        const s = this.s / 100; // Normalize s to range [0, 1]\n        const v = this.v / 100; // Normalize v to range [0, 1]\n        let r = 0, g = 0, b = 0;\n        if (s === 0) {\n            // Achromatic (grey)\n            r = g = b = v;\n        }\n        else {\n            const i = Math.floor(h * 6); // Determine the sector of the color wheel\n            const f = h * 6 - i; // Fractional part of h * 6\n            const p = v * (1 - s);\n            const q = v * (1 - s * f);\n            const t = v * (1 - s * (1 - f));\n            switch (i % 6) {\n                case 0:\n                    r = v;\n                    g = t;\n                    b = p;\n                    break;\n                case 1:\n                    r = q;\n                    g = v;\n                    b = p;\n                    break;\n                case 2:\n                    r = p;\n                    g = v;\n                    b = t;\n                    break;\n                case 3:\n                    r = p;\n                    g = q;\n                    b = v;\n                    break;\n                case 4:\n                    r = t;\n                    g = p;\n                    b = v;\n                    break;\n                case 5:\n                    r = v;\n                    g = p;\n                    b = q;\n                    break;\n            }\n        }\n        // Convert to RGB in the 0-255 range and return\n        return new RGB(r * 255, g * 255, b * 255, this.a);\n    }\n    /**\n     * Fades the color by a given value.\n     * @param value - The amount to fade the color by, in the range [0, 1].\n     * @returns A new HSV color with the alpha component faded by the given value.\n     */\n    fade(value) {\n        return new HSV(this.h, this.s, this.v, this.a * (1 - value));\n    }\n    /**\n     * Sets the hue component of the color.\n     * @param value - The new hue value, in the range [0, 360].\n     * @returns A new HSV color with the updated hue component.\n     */\n    setHue(value) {\n        return new HSV(value, this.s, this.v, this.a);\n    }\n    static randomColor(options) {\n        return randomColor(options);\n    }\n}\n\n/**\n * Represents a color in the HSL (Hue, Saturation, Lightness) color space.\n * Extends the base `Color` class.\n */\nclass HSL extends Color {\n    /**\n     * The hue component of the color, in the range [0, 360].\n     */\n    h;\n    /**\n     * The saturation component of the color, in the range [0, 100].\n     */\n    s;\n    /**\n     * The lightness component of the color, in the range [0, 100].\n     */\n    l;\n    /**\n     * The alpha (opacity) component of the color, in the range [0, 1].\n     */\n    a;\n    /**\n     * Creates a new HSL color.\n     * @param h - The hue component, in the range [0, 360].\n     * @param s - The saturation component, in the range [0, 100].\n     * @param l - The lightness component, in the range [0, 100].\n     * @param a - The alpha (opacity) component, in the range [0, 1]. Defaults to 1.\n     */\n    constructor(h, s, l, a = 1) {\n        super();\n        this.h = mod(h, 360);\n        this.s = clamp(s, 0, 100);\n        this.l = clamp(l, 0, 100);\n        this.a = clamp(a, 0, 1);\n    }\n    /**\n     * Returns the HSL color as an array of numbers.\n     * @returns An array containing the hue, saturation, lightness, and alpha components.\n     */\n    asArray() {\n        return [this.h, this.s, this.l, this.a];\n    }\n    /**\n     * Returns a new HSL color with rounded components.\n     * @returns A new HSL color with rounded hue, saturation, lightness, and alpha components.\n     */\n    round() {\n        return new HSL(Math.round(this.h), Math.round(this.s), Math.round(this.l), Math.round(this.a * 1000) / 1000);\n    }\n    /**\n     * Creates a copy of the current HSL color.\n     * @returns A new HSL color with the same components as the current color.\n     */\n    clone() {\n        return new HSL(this.h, this.s, this.l, this.a);\n    }\n    /**\n     * Returns the HSL color as a CSS-compatible string.\n     * @returns A string representing the HSL color in CSS format.\n     */\n    asString() {\n        if (this.a === 1) {\n            return `hsl(${this.h.toFixed(0)},${this.s.toFixed(0)}%,${this.l.toFixed(0)}%)`;\n        }\n        else {\n            return `hsla(${this.h.toFixed(0)},${this.s.toFixed(0)}%,${this.l.toFixed(0)}%,${formatFloat(this.a, 3)})`;\n        }\n    }\n    /**\n     * Returns the current HSL color.\n     * @returns The current HSL color.\n     */\n    asHSL() {\n        return this.clone();\n    }\n    /**\n     * Returns the current HSL color.\n     * @returns The current HSL color.\n     */\n    toHSL() {\n        return this;\n    }\n    /**\n     * Converts the HSL color to an HSV color.\n     * @returns A new HSV color representing the same color.\n     */\n    asHSV() {\n        const s = this.s / 100, l = this.l / 100;\n        const v = l + s * Math.min(l, 1 - l);\n        const sv = v === 0 ? 0 : 2 * (1 - l / v);\n        return new HSV(this.h, sv * 100, v * 100, this.a);\n    }\n    /**\n     * Converts the HSL color to an RGB color.\n     * @returns A new RGB color representing the same color.\n     */\n    asRGB() {\n        const h = this.h / 360;\n        const s = this.s / 100;\n        const l = this.l / 100;\n        // Achromatic (grey)\n        if (s === 0)\n            return new RGB(l * 255, l * 255, l * 255, this.a);\n        const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n        const p = 2 * l - q;\n        const hueToRgb = (t) => {\n            if (t < 0)\n                t += 1;\n            if (t > 1)\n                t -= 1;\n            if (t < 1 / 6)\n                return p + (q - p) * 6 * t;\n            if (t < 1 / 2)\n                return q;\n            if (t < 2 / 3)\n                return p + (q - p) * (2 / 3 - t) * 6;\n            return p;\n        };\n        // Convert to RGB in the 0-255 range and return\n        return new RGB(255 * hueToRgb(h + 1 / 3), 255 * hueToRgb(h), 255 * hueToRgb(h - 1 / 3), this.a);\n    }\n    /**\n     * Parses a string or Color object into an HSL color.\n     * @param input - The input string or Color object to parse.\n     * @returns A new HSL color parsed from the input.\n     * @throws Will throw an error if the input string is not a valid HSL color string.\n     */\n    static parse(input) {\n        if (input instanceof Color)\n            return input.asHSL();\n        input = input.replace(/\\s+/g, '').toLowerCase();\n        let match = input.match(/^hsl\\((?<h>[-+0-9.]+)(?:deg)?,(?<s>[-+0-9.]+)%,(?<l>[-+0-9.]+)%\\)$/);\n        if (match) {\n            return new HSL(parseFloat(match.groups.h), parseFloat(match.groups.s), parseFloat(match.groups.l));\n        }\n        match = input.match(/^hsla\\((?<h>[-+0-9.]+)(?:deg)?,(?<s>[-+0-9.]+)%,(?<l>[-+0-9.]+)%,(?<a>[-+0-9.]+)\\)$/);\n        if (match) {\n            return new HSL(parseFloat(match.groups.h), parseFloat(match.groups.s), parseFloat(match.groups.l), parseFloat(match.groups.a));\n        }\n        throw new Error(`Invalid HSL color string: \"${input}\"`);\n    }\n    /**\n     * Inverts the lightness component of the HSL color.\n     * @returns A new HSL color with the lightness component inverted.\n     */\n    invertLuminosity() {\n        return new HSL(this.h, this.s, 100 - this.l, this.a);\n    }\n    /**\n     * Rotates the hue component of the HSL color by a given offset.\n     * @param offset - The amount to rotate the hue by, in degrees.\n     * @returns A new HSL color with the hue rotated by the given offset.\n     */\n    rotateHue(offset) {\n        return new HSL(mod(this.h + offset, 360), this.s, this.l, this.a);\n    }\n    /**\n     * Increases the saturation of the HSL color by a given ratio.\n     * @param ratio - The ratio by which to increase the saturation.\n     * @returns A new HSL color with increased saturation.\n     */\n    saturate(ratio) {\n        return new HSL(this.h, clamp(this.s * (1 + ratio), 0, 100), this.l, this.a);\n    }\n    /**\n     * Decreases the alpha (opacity) of the HSL color by a given value.\n     * @param value - The value by which to decrease the alpha.\n     * @returns A new HSL color with decreased alpha.\n     */\n    fade(value) {\n        return new HSL(this.h, this.s, this.l, this.a * (1 - value));\n    }\n}\n\nColor.parse = function (input) {\n    if (input instanceof Color)\n        return input;\n    input = input.trim().toLowerCase();\n    if (input.startsWith('#'))\n        return RGB.parse(input);\n    const prefix = input.replace(/\\d.*/, '').trim().toLowerCase();\n    switch (prefix) {\n        case 'rgb(':\n        case 'rgba(':\n            return RGB.parse(input);\n        case 'hsl(':\n        case 'hsla(':\n            return HSL.parse(input);\n        default:\n            throw Error('Unknown color format: ' + input);\n    }\n};\nColor.HSL = HSL;\nColor.HSV = HSV;\nColor.RGB = RGB;\n\nconst maxzoom = 14;\nfunction getShortbreadTemplate() {\n    return {\n        version: 8,\n        name: 'versatiles',\n        metadata: {\n            license: 'https://creativecommons.org/publicdomain/zero/1.0/',\n        },\n        glyphs: 'https://tiles.versatiles.org/assets/glyphs/{fontstack}/{range}.pbf',\n        sprite: [{ id: 'basics', url: 'https://tiles.versatiles.org/assets/sprites/basics/sprites' }],\n        sources: {\n            'versatiles-shortbread': {\n                attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',\n                tiles: [\n                    'https://tiles.versatiles.org/tiles/osm/{z}/{x}/{y}',\n                ],\n                type: 'vector',\n                scheme: 'xyz',\n                bounds: [\n                    -180,\n                    -85.0511287798066,\n                    180,\n                    85.0511287798066,\n                ],\n                minzoom: 0,\n                maxzoom\n            },\n        },\n        layers: [],\n    };\n}\n\nfunction getShortbreadLayers(option) {\n    const { language } = option;\n    let nameField = ['get', 'name'];\n    if (language) {\n        nameField = ['coalesce', ['get', 'name_' + language], ['get', 'name']];\n    }\n    return [\n        // background\n        { id: 'background', type: 'background' },\n        // ocean\n        { id: 'water-ocean', type: 'fill', 'source-layer': 'ocean' },\n        // land\n        {\n            id: 'land-glacier',\n            type: 'fill', 'source-layer': 'water_polygons',\n            filter: ['all', ['==', 'kind', 'glacier']],\n        },\n        ...[\n            { id: 'commercial', kinds: ['commercial', 'retail'] },\n            { id: 'industrial', kinds: ['industrial', 'quarry', 'railway'] },\n            { id: 'residential', kinds: ['garages', 'residential'] },\n            { id: 'agriculture', kinds: ['brownfield', 'farmland', 'farmyard', 'greenfield', 'greenhouse_horticulture', 'orchard', 'plant_nursery', 'vineyard'] },\n            { id: 'waste', kinds: ['landfill'] },\n            { id: 'park', kinds: ['park', 'village_green', 'recreation_ground'] },\n            { id: 'garden', kinds: ['allotments', 'garden'] },\n            { id: 'burial', kinds: ['cemetery', 'grave_yard'] },\n            { id: 'leisure', kinds: ['miniature_golf', 'playground', 'golf_course'] },\n            { id: 'rock', kinds: ['bare_rock', 'scree', 'shingle'] },\n            { id: 'forest', kinds: ['forest'] },\n            { id: 'grass', kinds: ['grass', 'grassland', 'meadow', 'wet_meadow'] },\n            { id: 'vegetation', kinds: ['heath', 'scrub'] },\n            { id: 'sand', kinds: ['beach', 'sand'] },\n            { id: 'wetland', kinds: ['bog', 'marsh', 'string_bog', 'swamp'] },\n        ].map(({ id, kinds }) => ({\n            id: 'land-' + id,\n            type: 'fill',\n            'source-layer': 'land',\n            filter: ['all',\n                ['in', 'kind', ...kinds],\n            ],\n        })),\n        // water-lines\n        ...['river', 'canal', 'stream', 'ditch'].map((t) => ({\n            id: 'water-' + t,\n            type: 'line',\n            'source-layer': 'water_lines',\n            filter: ['all',\n                ['in', 'kind', t],\n                ['!=', 'tunnel', true],\n                ['!=', 'bridge', true],\n            ],\n        })),\n        // water polygons\n        {\n            id: 'water-area',\n            type: 'fill', 'source-layer': 'water_polygons',\n            filter: ['==', 'kind', 'water'],\n        },\n        {\n            id: 'water-area-river',\n            type: 'fill', 'source-layer': 'water_polygons',\n            filter: ['==', 'kind', 'river'],\n        },\n        {\n            id: 'water-area-small',\n            type: 'fill', 'source-layer': 'water_polygons',\n            filter: ['in', 'kind', 'reservoir', 'basin', 'dock'],\n        },\n        // dam\n        { id: 'water-dam-area', type: 'fill', 'source-layer': 'dam_polygons', filter: ['==', 'kind', 'dam'] },\n        { id: 'water-dam', type: 'line', 'source-layer': 'dam_lines', filter: ['==', 'kind', 'dam'] },\n        // pier\n        { id: 'water-pier-area', type: 'fill', 'source-layer': 'pier_polygons', filter: ['in', 'kind', 'pier', 'breakwater', 'groyne'] },\n        { id: 'water-pier', type: 'line', 'source-layer': 'pier_lines', filter: ['in', 'kind', 'pier', 'breakwater', 'groyne'] },\n        // site\n        ...['danger_area', 'sports_center', 'university', 'college', 'school', 'hospital', 'prison', 'parking', 'bicycle_parking', 'construction'].map((t) => ({\n            id: 'site-' + t.replace(/_/g, ''),\n            type: 'fill',\n            'source-layer': 'sites',\n            filter: ['in', 'kind', t],\n        })),\n        // airport\n        {\n            id: 'airport-area',\n            type: 'fill', 'source-layer': 'street_polygons', filter: ['in', 'kind', 'runway', 'taxiway'],\n        },\n        {\n            id: 'airport-taxiway:outline',\n            type: 'line', 'source-layer': 'streets', filter: ['==', 'kind', 'taxiway'],\n        },\n        {\n            id: 'airport-runway:outline',\n            type: 'line', 'source-layer': 'streets', filter: ['==', 'kind', 'runway'],\n        },\n        {\n            id: 'airport-taxiway',\n            type: 'line', 'source-layer': 'streets', filter: ['==', 'kind', 'taxiway'],\n        },\n        {\n            id: 'airport-runway',\n            type: 'line', 'source-layer': 'streets', filter: ['==', 'kind', 'runway'],\n        },\n        // building\n        {\n            id: 'building:outline',\n            type: 'fill', 'source-layer': 'buildings',\n        },\n        {\n            id: 'building',\n            type: 'fill', 'source-layer': 'buildings',\n        },\n        // tunnel-, street-, bridges-bridge\n        ...['tunnel', 'street', 'bridge'].flatMap((c) => {\n            let filter;\n            let prefix;\n            let suffixes = [];\n            const results = [];\n            switch (c) {\n                case 'tunnel':\n                    filter = [['==', 'tunnel', true]];\n                    prefix = 'tunnel-';\n                    suffixes = [':outline', ''];\n                    break;\n                case 'street':\n                    filter = [['!=', 'bridge', true], ['!=', 'tunnel', true]];\n                    prefix = '';\n                    suffixes = [':outline', ''];\n                    break;\n                case 'bridge':\n                    filter = [['==', 'bridge', true]];\n                    prefix = 'bridge-';\n                    suffixes = [':bridge', ':outline', ''];\n                    break;\n            }\n            // in osm data streets on bridges are often not tagged as such\n            // to be able to have multiple levels of bridges cross over each\n            // other in the right order without using a secondary property.\n            // this results in bridge-polygons being rendered above streets.\n            // therefore bridge polygons are *under* surface streets here.\n            // this workaround is also wrong, but everyone is using it since\n            // it's simpler than removing all these tagging hacks from osm.\n            // bridges, above tunnel, below street\n            if (c === 'street')\n                results.push({\n                    id: 'bridge',\n                    type: 'fill',\n                    'source-layer': 'bridges',\n                });\n            suffixes.forEach(suffix => {\n                // pedestrian zone — no outline\n                if (suffix === ':outline')\n                    results.push({\n                        id: prefix + 'street-pedestrian-zone',\n                        type: 'fill',\n                        'source-layer': 'street_polygons',\n                        filter: ['all',\n                            ...filter,\n                            ['==', 'kind', 'pedestrian'],\n                        ],\n                    });\n                // non-car streets\n                ['footway', 'steps', 'path', 'cycleway'].forEach(t => {\n                    results.push({\n                        id: prefix + 'way-' + t.replace(/_/g, '') + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ...filter,\n                            ['in', 'kind', t],\n                        ],\n                    });\n                });\n                // no links\n                ['track', 'pedestrian', 'service', 'living_street', 'residential', 'unclassified'].forEach(t => {\n                    results.push({\n                        id: prefix + 'street-' + t.replace(/_/g, '') + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ['==', 'kind', t],\n                            ...filter,\n                        ],\n                    });\n                });\n                // no links, bicycle=designated\n                if (suffix === '')\n                    ['track', 'pedestrian', 'service', 'living_street', 'residential', 'unclassified'].forEach(t => {\n                        results.push({\n                            id: prefix + 'street-' + t.replace(/_/g, '') + '-bicycle',\n                            type: 'line',\n                            'source-layer': 'streets',\n                            filter: ['all',\n                                ['==', 'kind', t],\n                                ['==', 'bicycle', 'designated'],\n                                ...filter,\n                            ],\n                        });\n                    });\n                // links\n                ['tertiary', 'secondary', 'primary', 'trunk', 'motorway'].forEach(t => {\n                    results.push({\n                        id: prefix + 'street-' + t.replace(/_/g, '') + '-link' + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ...filter,\n                            ['in', 'kind', t],\n                            ['==', 'link', true],\n                        ],\n                    });\n                });\n                // main\n                ['tertiary', 'secondary', 'primary', 'trunk', 'motorway'].forEach(t => {\n                    results.push({\n                        id: prefix + 'street-' + t.replace(/_/g, '') + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ...filter,\n                            ['in', 'kind', t],\n                            ['!=', 'link', true],\n                        ],\n                    });\n                });\n            });\n            // separate outline for trains\n            [':outline', ''].forEach(suffix => {\n                // with service distinction\n                ['rail', 'light_rail', 'subway', 'narrow_gauge', 'tram'].reverse().forEach((t) => {\n                    // main rail\n                    results.push({\n                        id: prefix + 'transport-' + t.replace(/_/g, '') + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ['in', 'kind', t],\n                            ['!has', 'service'],\n                            ...filter,\n                        ],\n                    });\n                    // service rail (crossover, siding, spur, yard)\n                    results.push({\n                        id: prefix + 'transport-' + t.replace(/_/g, '') + '-service' + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ['in', 'kind', t],\n                            ['has', 'service'],\n                            ...filter,\n                        ],\n                    });\n                });\n                // other transport\n                ['funicular', 'monorail', 'bus_guideway', 'busway'].reverse().forEach((t) => {\n                    results.push({\n                        id: prefix + 'transport-' + t.replace(/_/g, '') + suffix,\n                        type: 'line',\n                        'source-layer': 'streets',\n                        filter: ['all',\n                            ['in', 'kind', t],\n                            ...filter,\n                        ],\n                    });\n                });\n                if (c === 'street') {\n                    // aerialway, no bridges, above street evel\n                    ['cable_car', 'gondola', 'goods', 'chair_lift', 'drag_lift', 't-bar', 'j-bar', 'platter', 'rope-tow'].reverse().forEach((t) => {\n                        results.push({\n                            id: 'aerialway-' + t.replace(/[_-]+/g, '') + suffix,\n                            type: 'line',\n                            'source-layer': 'aerialways',\n                            filter: ['all',\n                                ...filter,\n                                ['in', 'kind', t],\n                            ],\n                        });\n                    });\n                    // ferry — only on street level\n                    results.push({\n                        id: 'transport-ferry' + suffix,\n                        type: 'line',\n                        'source-layer': 'ferries',\n                    });\n                }\n            });\n            return results;\n        }),\n        // poi, one layer per type\n        ...['amenity', 'leisure', 'tourism', 'shop', 'man_made', 'historic', 'emergency', 'highway', 'office'].map((key) => ({\n            id: 'poi-' + key,\n            type: 'symbol',\n            'source-layer': 'pois',\n            filter: ['to-boolean', ['get', key]],\n        })),\n        // boundary\n        ...[':outline', ''].flatMap((suffix) => [\n            {\n                id: 'boundary-country' + suffix,\n                type: 'line',\n                'source-layer': 'boundaries',\n                filter: ['all',\n                    ['==', 'admin_level', 2],\n                    ['!=', 'maritime', true],\n                    ['!=', 'disputed', true],\n                    ['!=', 'coastline', true],\n                ],\n            },\n            {\n                id: 'boundary-country-disputed' + suffix,\n                type: 'line',\n                'source-layer': 'boundaries',\n                filter: ['all',\n                    ['==', 'admin_level', 2],\n                    ['==', 'disputed', true],\n                    ['!=', 'maritime', true],\n                    ['!=', 'coastline', true],\n                ],\n            },\n            {\n                id: 'boundary-country-maritime' + suffix,\n                type: 'line',\n                'source-layer': 'boundaries',\n                filter: ['all',\n                    ['==', 'admin_level', 2],\n                    ['==', 'maritime', true],\n                    ['!=', 'disputed', true],\n                    ['!=', 'coastline', true],\n                ],\n            },\n            {\n                id: 'boundary-state' + suffix,\n                type: 'line',\n                'source-layer': 'boundaries',\n                filter: ['all',\n                    ['==', 'admin_level', 4],\n                    ['!=', 'maritime', true],\n                    ['!=', 'disputed', true],\n                    ['!=', 'coastline', true],\n                ],\n            },\n        ]),\n        // label-address\n        {\n            id: 'label-address-housenumber',\n            type: 'symbol',\n            'source-layer': 'addresses',\n            filter: ['has', 'housenumber'],\n            layout: { 'text-field': '{housenumber}' },\n        },\n        // label-motorway\n        {\n            id: 'label-motorway-exit',\n            type: 'symbol',\n            'source-layer': 'street_labels_points', // docs say `streets_labels_points`, but layer is actually called `street_labels_points`\n            filter: ['==', 'kind', 'motorway_junction'],\n            layout: { 'text-field': '{ref}' },\n            // FIXME shield\n        },\n        {\n            id: 'label-motorway-shield',\n            type: 'symbol',\n            'source-layer': 'street_labels',\n            filter: ['==', 'kind', 'motorway'],\n            layout: { 'text-field': '{ref}' },\n            // FIXME shield\n        },\n        // label-street\n        ...['pedestrian', 'living_street', 'residential', 'unclassified', 'tertiary', 'secondary', 'primary', 'trunk'].map((t) => ({\n            id: 'label-street-' + t.replace(/_/g, ''),\n            type: 'symbol',\n            'source-layer': 'street_labels',\n            filter: ['==', 'kind', t],\n            layout: { 'text-field': nameField },\n        })),\n        // label-place of small places\n        ...[/*'locality', 'island', 'farm', 'dwelling',*/ 'neighbourhood', 'quarter', 'suburb', 'hamlet', 'village', 'town'].map((id) => ({\n            id: 'label-place-' + id.replace(/_/g, ''),\n            type: 'symbol',\n            'source-layer': 'place_labels',\n            filter: ['==', 'kind', id],\n            layout: { 'text-field': nameField },\n        })),\n        // label-boundary\n        {\n            id: 'label-boundary-state',\n            type: 'symbol',\n            'source-layer': 'boundary_labels',\n            filter: ['in', 'admin_level', 4, '4'],\n            layout: { 'text-field': nameField },\n        },\n        // label-place-* of large places\n        ...['city', 'state_capital', 'capital'].map((id) => ({\n            id: 'label-place-' + id.replace(/_/g, ''),\n            type: 'symbol',\n            'source-layer': 'place_labels',\n            filter: ['==', 'kind', id],\n            layout: { 'text-field': nameField },\n        })),\n        {\n            id: 'label-boundary-country-small',\n            type: 'symbol',\n            'source-layer': 'boundary_labels',\n            filter: ['all',\n                ['in', 'admin_level', 2, '2'],\n                ['<=', 'way_area', 10000000],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'label-boundary-country-medium',\n            type: 'symbol',\n            'source-layer': 'boundary_labels',\n            filter: ['all',\n                ['in', 'admin_level', 2, '2'],\n                ['<', 'way_area', 90000000],\n                ['>', 'way_area', 10000000],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'label-boundary-country-large',\n            type: 'symbol',\n            'source-layer': 'boundary_labels',\n            filter: ['all',\n                ['in', 'admin_level', 2, '2'],\n                ['>=', 'way_area', 90000000],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        // marking\n        {\n            id: 'marking-oneway', // streets → oneway\n            type: 'symbol',\n            'source-layer': 'streets',\n            filter: ['all',\n                ['==', 'oneway', true],\n                ['in', 'kind', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'living_street'],\n            ],\n            layout: {\n                'symbol-placement': 'line',\n                'symbol-spacing': 175,\n                'icon-rotate': 90,\n                'icon-rotation-alignment': 'map',\n                'icon-padding': 5,\n                'symbol-avoid-edges': true,\n            },\n        },\n        {\n            id: 'marking-oneway-reverse', // oneway_reverse\n            type: 'symbol',\n            'source-layer': 'streets',\n            filter: ['all',\n                ['==', 'oneway_reverse', true],\n                ['in', 'kind', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'living_street'],\n            ],\n            layout: {\n                'symbol-placement': 'line',\n                'symbol-spacing': 75,\n                'icon-rotate': -90,\n                'icon-rotation-alignment': 'map',\n                'icon-padding': 5,\n                'symbol-avoid-edges': true,\n            },\n        },\n        {\n            id: 'marking-bicycle', // bicycle=designated or kind=cycleway\n            type: 'symbol',\n            'source-layer': 'streets',\n            filter: ['all',\n                ['==', 'bicycle', 'designated'],\n                ['==', 'kind', 'cycleway'],\n            ],\n            layout: {\n                'symbol-placement': 'line',\n                'symbol-spacing': 50,\n            },\n        },\n        // symbol\n        {\n            id: 'symbol-transit-bus',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['==', 'kind', 'bus_stop'],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-tram',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['==', 'kind', 'tram_stop'],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-subway',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['all',\n                ['in', 'kind', 'station', 'halt'],\n                ['==', 'station', 'subway'],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-lightrail',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['all',\n                ['in', 'kind', 'station', 'halt'],\n                ['==', 'station', 'light_rail'],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-station',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['all',\n                ['in', 'kind', 'station', 'halt'],\n                ['!in', 'station', 'light_rail', 'subway'],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-airfield',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['all',\n                ['==', 'kind', 'aerodrome'],\n                ['!has', 'iata'],\n            ],\n            layout: { 'text-field': nameField },\n        },\n        {\n            id: 'symbol-transit-airport',\n            type: 'symbol',\n            'source-layer': 'public_transport',\n            filter: ['all',\n                ['==', 'kind', 'aerodrome'],\n                ['has', 'iata'],\n            ],\n            layout: { 'text-field': nameField },\n        },\n    ];\n}\n\n/**\n * @param {string | RegExp} a\n * @param {string | RegExp} b\n * @param {string} str\n */\nfunction balanced (a, b, str) {\n  if (a instanceof RegExp) a = maybeMatch(a, str);\n  if (b instanceof RegExp) b = maybeMatch(b, str);\n\n  const r = range(a, b, str);\n\n  return (\n    r && {\n      start: r[0],\n      end: r[1],\n      pre: str.slice(0, r[0]),\n      body: str.slice(r[0] + a.length, r[1]),\n      post: str.slice(r[1] + b.length)\n    }\n  )\n}\n\n/**\n * @param {RegExp} reg\n * @param {string} str\n */\nfunction maybeMatch (reg, str) {\n  const m = str.match(reg);\n  return m ? m[0] : null\n}\n\n/**\n * @param {string} a\n * @param {string} b\n * @param {string} str\n */\nfunction range (a, b, str) {\n  let begs, beg, left, right, result;\n  let ai = str.indexOf(a);\n  let bi = str.indexOf(b, ai + 1);\n  let i = ai;\n\n  if (ai >= 0 && bi > 0) {\n    if (a === b) {\n      return [ai, bi]\n    }\n    begs = [];\n    left = str.length;\n\n    while (i >= 0 && !result) {\n      if (i === ai) {\n        begs.push(i);\n        ai = str.indexOf(a, i + 1);\n      } else if (begs.length === 1) {\n        result = [begs.pop(), bi];\n      } else {\n        beg = begs.pop();\n        if (beg < left) {\n          left = beg;\n          right = bi;\n        }\n\n        bi = str.indexOf(b, i + 1);\n      }\n\n      i = ai < bi && ai >= 0 ? ai : bi;\n    }\n\n    if (begs.length) {\n      result = [left, right];\n    }\n  }\n\n  return result\n}\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0';\nconst escOpen = '\\0OPEN' + Math.random() + '\\0';\nconst escClose = '\\0CLOSE' + Math.random() + '\\0';\nconst escComma = '\\0COMMA' + Math.random() + '\\0';\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0';\nconst escSlashPattern = new RegExp(escSlash, 'g');\nconst escOpenPattern = new RegExp(escOpen, 'g');\nconst escClosePattern = new RegExp(escClose, 'g');\nconst escCommaPattern = new RegExp(escComma, 'g');\nconst escPeriodPattern = new RegExp(escPeriod, 'g');\nconst slashPattern = /\\\\\\\\/g;\nconst openPattern = /\\\\{/g;\nconst closePattern = /\\\\}/g;\nconst commaPattern = /\\\\,/g;\nconst periodPattern = /\\\\./g;\n\n/**\n * @return {number}\n */\nfunction numeric (str) {\n  return !isNaN(str)\n    ? parseInt(str, 10)\n    : str.charCodeAt(0)\n}\n\n/**\n * @param {string} str\n */\nfunction escapeBraces (str) {\n  return str.replace(slashPattern, escSlash)\n    .replace(openPattern, escOpen)\n    .replace(closePattern, escClose)\n    .replace(commaPattern, escComma)\n    .replace(periodPattern, escPeriod)\n}\n\n/**\n * @param {string} str\n */\nfunction unescapeBraces (str) {\n  return str.replace(escSlashPattern, '\\\\')\n    .replace(escOpenPattern, '{')\n    .replace(escClosePattern, '}')\n    .replace(escCommaPattern, ',')\n    .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n * @param {string} str\n */\nfunction parseCommaParts (str) {\n  if (!str) { return [''] }\n\n  const parts = [];\n  const m = balanced('{', '}', str);\n\n  if (!m) { return str.split(',') }\n\n  const { pre, body, post } = m;\n  const p = pre.split(',');\n\n  p[p.length - 1] += '{' + body + '}';\n  const postParts = parseCommaParts(post);\n  if (post.length) {\n    p[p.length - 1] += postParts.shift();\n    p.push.apply(p, postParts);\n  }\n\n  parts.push.apply(parts, p);\n\n  return parts\n}\n\n/**\n * @param {string} str\n */\nfunction expandTop (str) {\n  if (!str) { return [] }\n\n  // I don't know why Bash 4.3 does this, but it does.\n  // Anything starting with {} will have the first two bytes preserved\n  // but *only* at the top level, so {},a}b will not expand to anything,\n  // but a{},b}c will be expanded to [a}c,abc].\n  // One could argue that this is a bug in Bash, but since the goal of\n  // this module is to match Bash's rules, we escape a leading {}\n  if (str.slice(0, 2) === '{}') {\n    str = '\\\\{\\\\}' + str.slice(2);\n  }\n\n  return expand(escapeBraces(str), true).map(unescapeBraces)\n}\n\n/**\n * @param {string} str\n */\nfunction embrace (str) {\n  return '{' + str + '}'\n}\n\n/**\n * @param {string} el\n */\nfunction isPadded (el) {\n  return /^-?0\\d/.test(el)\n}\n\n/**\n * @param {number} i\n * @param {number} y\n */\nfunction lte (i, y) {\n  return i <= y\n}\n\n/**\n * @param {number} i\n * @param {number} y\n */\nfunction gte (i, y) {\n  return i >= y\n}\n\n/**\n * @param {string} str\n * @param {boolean} [isTop]\n */\nfunction expand (str, isTop) {\n  /** @type {string[]} */\n  const expansions = [];\n\n  const m = balanced('{', '}', str);\n  if (!m) return [str]\n\n  // no need to expand pre, since it is guaranteed to be free of brace-sets\n  const pre = m.pre;\n  const post = m.post.length\n    ? expand(m.post, false)\n    : [''];\n\n  if (/\\$$/.test(m.pre)) {\n    for (let k = 0; k < post.length; k++) {\n      const expansion = pre + '{' + m.body + '}' + post[k];\n      expansions.push(expansion);\n    }\n  } else {\n    const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n    const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n    const isSequence = isNumericSequence || isAlphaSequence;\n    const isOptions = m.body.indexOf(',') >= 0;\n    if (!isSequence && !isOptions) {\n      // {a},b}\n      if (m.post.match(/,(?!,).*\\}/)) {\n        str = m.pre + '{' + m.body + escClose + m.post;\n        return expand(str)\n      }\n      return [str]\n    }\n\n    let n;\n    if (isSequence) {\n      n = m.body.split(/\\.\\./);\n    } else {\n      n = parseCommaParts(m.body);\n      if (n.length === 1) {\n        // x{{a,b}}y ==> x{a}y x{b}y\n        n = expand(n[0], false).map(embrace);\n        if (n.length === 1) {\n          return post.map(function (p) {\n            return m.pre + n[0] + p\n          })\n        }\n      }\n    }\n\n    // at this point, n is the parts, and we know it's not a comma set\n    // with a single entry.\n    let N;\n\n    if (isSequence) {\n      const x = numeric(n[0]);\n      const y = numeric(n[1]);\n      const width = Math.max(n[0].length, n[1].length);\n      let incr = n.length === 3\n        ? Math.abs(numeric(n[2]))\n        : 1;\n      let test = lte;\n      const reverse = y < x;\n      if (reverse) {\n        incr *= -1;\n        test = gte;\n      }\n      const pad = n.some(isPadded);\n\n      N = [];\n\n      for (let i = x; test(i, y); i += incr) {\n        let c;\n        if (isAlphaSequence) {\n          c = String.fromCharCode(i);\n          if (c === '\\\\') { c = ''; }\n        } else {\n          c = String(i);\n          if (pad) {\n            const need = width - c.length;\n            if (need > 0) {\n              const z = new Array(need + 1).join('0');\n              if (i < 0) { c = '-' + z + c.slice(1); } else { c = z + c; }\n            }\n          }\n        }\n        N.push(c);\n      }\n    } else {\n      N = [];\n\n      for (let j = 0; j < n.length; j++) {\n        N.push.apply(N, expand(n[j], false));\n      }\n    }\n\n    for (let j = 0; j < N.length; j++) {\n      for (let k = 0; k < post.length; k++) {\n        const expansion = pre + N[j] + post[k];\n        if (!isTop || isSequence || expansion) { expansions.push(expansion); }\n      }\n    }\n  }\n\n  return expansions\n}\n\nconst propertyLookup = new Map();\nconst propertyDefs = [\n    { parent: 'layer', types: 'background,fill,line,symbol', key: 'filter', valueType: 'filter' },\n    { parent: 'layer', types: 'background,fill,line,symbol', key: 'maxzoom', valueType: 'number' },\n    { parent: 'layer', types: 'background,fill,line,symbol', key: 'minzoom', valueType: 'number' },\n    { parent: 'layout', types: 'background,fill,line,symbol', key: 'visibility', valueType: 'enum' },\n    { parent: 'layout', types: 'fill', key: 'fill-sort-key', valueType: 'number' },\n    { parent: 'layout', types: 'line', key: 'line-cap', valueType: 'enum' },\n    { parent: 'layout', types: 'line', key: 'line-join', valueType: 'enum' },\n    { parent: 'layout', types: 'line', key: 'line-miter-limit', valueType: 'number' },\n    { parent: 'layout', types: 'line', key: 'line-round-limit', valueType: 'number' },\n    { parent: 'layout', types: 'line', key: 'line-sort-key', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'icon-allow-overlap', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'icon-anchor', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'icon-ignore-placement', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'icon-image', short: 'image', valueType: 'resolvedImage' },\n    { parent: 'layout', types: 'symbol', key: 'icon-keep-upright', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'icon-offset', valueType: 'array' },\n    { parent: 'layout', types: 'symbol', key: 'icon-optional', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'icon-overlap', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'icon-padding', valueType: 'padding' },\n    { parent: 'layout', types: 'symbol', key: 'icon-pitch-alignment', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'icon-rotate', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'icon-rotation-alignment', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'icon-size', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'icon-text-fit-padding', valueType: 'array' },\n    { parent: 'layout', types: 'symbol', key: 'icon-text-fit', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'symbol-avoid-edges', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'symbol-placement', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'symbol-sort-key', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'symbol-spacing', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'symbol-z-order', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-allow-overlap', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'text-anchor', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-field', short: 'text', valueType: 'formatted' },\n    { parent: 'layout', types: 'symbol', key: 'text-font', short: 'font', valueType: 'fonts' },\n    { parent: 'layout', types: 'symbol', key: 'text-ignore-placement', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'text-justify', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-keep-upright', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'text-letter-spacing', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-line-height', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-max-angle', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-max-width', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-offset', valueType: 'array' },\n    { parent: 'layout', types: 'symbol', key: 'text-optional', valueType: 'boolean' },\n    { parent: 'layout', types: 'symbol', key: 'text-overlap', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-padding', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-pitch-alignment', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-radial-offset', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-rotate', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-rotation-alignment', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-size', short: 'size', valueType: 'number' },\n    { parent: 'layout', types: 'symbol', key: 'text-transform', valueType: 'enum' },\n    { parent: 'layout', types: 'symbol', key: 'text-variable-anchor-offset', valueType: 'variableAnchorOffsetCollection' },\n    { parent: 'layout', types: 'symbol', key: 'text-variable-anchor', valueType: 'array' },\n    { parent: 'layout', types: 'symbol', key: 'text-writing-mode', valueType: 'array' },\n    { parent: 'paint', types: 'background', key: 'background-color', short: 'color', valueType: 'color' },\n    { parent: 'paint', types: 'background', key: 'background-opacity', short: 'opacity', valueType: 'number' },\n    { parent: 'paint', types: 'background', key: 'background-pattern', short: 'image', valueType: 'resolvedImage' },\n    { parent: 'paint', types: 'fill', key: 'fill-antialias', valueType: 'boolean' },\n    { parent: 'paint', types: 'fill', key: 'fill-color', short: 'color', valueType: 'color' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-base', valueType: 'number' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-color', valueType: 'color' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-height', valueType: 'number' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-opacity', valueType: 'number' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-pattern', valueType: 'resolvedImage' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-translate-anchor', valueType: 'enum' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-translate', valueType: 'array' },\n    { parent: 'paint', types: 'fill', key: 'fill-extrusion-vertical-gradient', valueType: 'boolean' },\n    { parent: 'paint', types: 'fill', key: 'fill-opacity', short: 'opacity', valueType: 'number' },\n    { parent: 'paint', types: 'fill', key: 'fill-outline-color', valueType: 'color' },\n    { parent: 'paint', types: 'fill', key: 'fill-pattern', short: 'image', valueType: 'resolvedImage' },\n    { parent: 'paint', types: 'fill', key: 'fill-translate-anchor', valueType: 'enum' },\n    { parent: 'paint', types: 'fill', key: 'fill-translate', valueType: 'array' },\n    { parent: 'paint', types: 'line', key: 'line-blur', valueType: 'number' },\n    { parent: 'paint', types: 'line', key: 'line-color', short: 'color', valueType: 'color' },\n    { parent: 'paint', types: 'line', key: 'line-dasharray', valueType: 'array' },\n    { parent: 'paint', types: 'line', key: 'line-gap-width', valueType: 'number' },\n    { parent: 'paint', types: 'line', key: 'line-gradient', valueType: 'color' },\n    { parent: 'paint', types: 'line', key: 'line-offset', valueType: 'number' },\n    { parent: 'paint', types: 'line', key: 'line-opacity', short: 'opacity', valueType: 'number' },\n    { parent: 'paint', types: 'line', key: 'line-pattern', short: 'image', valueType: 'resolvedImage' },\n    { parent: 'paint', types: 'line', key: 'line-translate-anchor', valueType: 'enum' },\n    { parent: 'paint', types: 'line', key: 'line-translate', valueType: 'array' },\n    { parent: 'paint', types: 'line', key: 'line-width', short: 'size', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'icon-color', short: 'color', valueType: 'color' },\n    { parent: 'paint', types: 'symbol', key: 'icon-halo-blur', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'icon-halo-color', valueType: 'color' },\n    { parent: 'paint', types: 'symbol', key: 'icon-halo-width', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'icon-opacity', short: 'opacity', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'icon-translate-anchor', valueType: 'enum' },\n    { parent: 'paint', types: 'symbol', key: 'icon-translate', valueType: 'array' },\n    { parent: 'paint', types: 'symbol', key: 'text-color', short: 'color', valueType: 'color' },\n    { parent: 'paint', types: 'symbol', key: 'text-halo-blur', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'text-halo-color', valueType: 'color' },\n    { parent: 'paint', types: 'symbol', key: 'text-halo-width', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'text-opacity', short: 'opacity', valueType: 'number' },\n    { parent: 'paint', types: 'symbol', key: 'text-translate-anchor', valueType: 'enum' },\n    { parent: 'paint', types: 'symbol', key: 'text-translate', valueType: 'array' },\n];\npropertyDefs.forEach((propertyDef) => {\n    const types = propertyDef.types;\n    types.split(',').forEach((type) => {\n        function add(propertyKey) {\n            const key = type + '/' + propertyKey;\n            const property = {\n                key: propertyDef.key,\n                parent: propertyDef.parent,\n                valueType: propertyDef.valueType,\n            };\n            const propertyList = propertyLookup.get(key);\n            if (propertyList) {\n                propertyList.push(property);\n            }\n            else {\n                propertyLookup.set(key, [property]);\n            }\n        }\n        add(propertyDef.key);\n        if (propertyDef.short != null)\n            add(propertyDef.short);\n    });\n});\n\n// Utility function to deep clone an object\nfunction deepClone(obj) {\n    const type = typeof obj;\n    if (type !== 'object') {\n        switch (type) {\n            case 'boolean':\n            case 'number':\n            case 'string':\n            case 'undefined':\n                return obj;\n            default: throw new Error(`Not implemented yet: \"${type}\" case`);\n        }\n    }\n    if (isSimpleObject(obj)) {\n        return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, deepClone(value)]));\n    }\n    if (obj instanceof Array) {\n        return obj.map((e) => deepClone(e));\n    }\n    if (obj instanceof Color) {\n        return obj.clone();\n    }\n    if (obj == null)\n        return obj;\n    console.log('obj', obj);\n    console.log('obj.prototype', Object.getPrototypeOf(obj));\n    throw Error();\n}\nfunction isSimpleObject(item) {\n    if (item === null)\n        return false;\n    if (typeof item !== 'object')\n        return false;\n    if (Array.isArray(item))\n        return false;\n    const prototypeKeyCount = Object.keys(Object.getPrototypeOf(item)).length;\n    if (prototypeKeyCount !== 0)\n        return false;\n    if (item.constructor.name !== 'Object')\n        return false;\n    return true;\n}\nfunction isBasicType(item) {\n    switch (typeof item) {\n        case 'boolean':\n        case 'number':\n        case 'string':\n        case 'undefined':\n            return true;\n        case 'object':\n            return false;\n        default:\n            throw Error('unknown type: ' + typeof item);\n    }\n}\nfunction deepMerge(source0, ...sources) {\n    const target = deepClone(source0);\n    for (const source of sources) {\n        if (typeof source !== 'object')\n            continue;\n        for (const key in source) {\n            if (!(key in source))\n                continue;\n            const sourceValue = source[key];\n            // *********\n            // overwrite\n            // *********\n            switch (typeof sourceValue) {\n                case 'number':\n                case 'string':\n                case 'boolean':\n                    target[key] = sourceValue;\n                    continue;\n            }\n            if (isBasicType(target[key])) {\n                target[key] = deepClone(sourceValue);\n                continue;\n            }\n            if (sourceValue instanceof Color) {\n                target[key] = sourceValue.clone();\n                continue;\n            }\n            if (isSimpleObject(target[key]) && isSimpleObject(sourceValue)) {\n                target[key] = deepMerge(target[key], sourceValue);\n                continue;\n            }\n            // *********\n            // merge\n            // *********\n            if (isSimpleObject(target[key]) && isSimpleObject(sourceValue)) {\n                target[key] = deepMerge(target[key], sourceValue);\n                continue;\n            }\n            console.log('target[key]:', target[key]);\n            console.log('source[key]:', source[key]);\n            throw Error('unpredicted case');\n        }\n    }\n    return target;\n}\nfunction resolveUrl(base, url) {\n    if (!base)\n        return url;\n    url = new URL(url, base).href;\n    url = url.replace(/%7B/gi, '{');\n    url = url.replace(/%7D/gi, '}');\n    return url;\n}\nfunction basename(url) {\n    if (!url)\n        return '';\n    try {\n        url = new URL(url, 'http://example.org').pathname;\n    }\n    catch (_) {\n        // ignore\n    }\n    url = url.replace(/\\/+$/, '');\n    return url.split('/').pop() ?? '';\n}\n\nfunction decorate(layers, rules, recolor) {\n    const layerIds = layers.map(l => l.id);\n    const layerIdSet = new Set(layerIds);\n    // Initialize a new map to hold final styles for layers\n    const layerStyles = new Map();\n    // Iterate through the generated layer style rules\n    Object.entries(rules).forEach(([idDef, layerStyle]) => {\n        if (layerStyle == null)\n            return;\n        // Expand any braces in IDs and filter them through a RegExp if necessary\n        const ids = expandTop(idDef).flatMap(id => {\n            if (!id.includes('*'))\n                return id;\n            const regExpString = id.replace(/[^a-z_:-]/g, c => {\n                if (c === '*')\n                    return '[a-z_-]*';\n                throw new Error('unknown char to process. Do not know how to make a RegExp from: ' + JSON.stringify(c));\n            });\n            const regExp = new RegExp(`^${regExpString}$`, 'i');\n            return layerIds.filter(layerId => regExp.test(layerId));\n        });\n        ids.forEach(id => {\n            if (!layerIdSet.has(id))\n                return;\n            layerStyles.set(id, deepMerge(layerStyles.get(id) ?? {}, layerStyle));\n        });\n    });\n    // Deep clone the original layers and apply styles\n    return layers.flatMap(layer => {\n        // Get the id and style of the layer\n        const layerStyle = layerStyles.get(layer.id);\n        // Don't export layers that have no style\n        if (!layerStyle)\n            return [];\n        processStyling(layer, layerStyle);\n        return [layer];\n    });\n    // Function to process each style attribute for the layer\n    function processStyling(layer, styleRule) {\n        for (const [ruleKeyCamelCase, ruleValue] of Object.entries(styleRule)) {\n            if (ruleValue == null)\n                continue;\n            // CamelCase to not-camel-case\n            const ruleKey = ruleKeyCamelCase.replace(/[A-Z]/g, c => '-' + c.toLowerCase());\n            const propertyDefs = propertyLookup.get(layer.type + '/' + ruleKey);\n            if (!propertyDefs)\n                continue;\n            propertyDefs.forEach(propertyDef => {\n                const { key } = propertyDef;\n                let value = ruleValue;\n                switch (propertyDef.valueType) {\n                    case 'color':\n                        value = processExpression(value, processColor);\n                        break;\n                    case 'fonts':\n                        value = processExpression(value, processFont);\n                        break;\n                    case 'resolvedImage':\n                    case 'formatted':\n                    case 'array':\n                    case 'boolean':\n                    case 'enum':\n                    case 'number':\n                        value = processExpression(value);\n                        break;\n                    default: throw new Error(`unknown propertyDef.valueType \"${propertyDef.valueType}\" for key \"${key}\"`);\n                }\n                switch (propertyDef.parent) {\n                    case 'layer':\n                        // @ts-expect-error: too complex to handle\n                        layer[key] = value;\n                        break;\n                    case 'layout':\n                        if (!layer.layout)\n                            layer.layout = {};\n                        // @ts-expect-error: too complex to handle\n                        layer.layout[key] = value;\n                        break;\n                    case 'paint':\n                        if (!layer.paint)\n                            layer.paint = {};\n                        // @ts-expect-error: too complex to handle\n                        layer.paint[key] = value;\n                        break;\n                    default:\n                        throw new Error(`unknown parent \"${propertyDef.parent}\" for key \"${key}\"`);\n                }\n            });\n        }\n        function processColor(value) {\n            if (typeof value === 'string')\n                value = Color.parse(value);\n            if (value instanceof Color) {\n                const color = recolor.do(value);\n                return color.asString();\n            }\n            throw new Error(`unknown color type \"${typeof value}\"`);\n        }\n        function processFont(value) {\n            if (typeof value === 'string')\n                return [value];\n            throw new Error(`unknown font type \"${typeof value}\"`);\n        }\n        function processExpression(value, cbValue) {\n            if (typeof value === 'object') {\n                if (value instanceof Color)\n                    return processColor(value);\n                if (!Array.isArray(value)) {\n                    return processZoomStops(value, cbValue);\n                }\n            }\n            return cbValue ? cbValue(value) : value;\n        }\n        function processZoomStops(obj, cbValue) {\n            return {\n                stops: Object.entries(obj)\n                    .map(([z, v]) => [parseInt(z, 10), cbValue ? cbValue(v) : v])\n                    .sort((a, b) => a[0] - b[0]),\n            };\n        }\n    }\n}\n\n/**\n * Module for applying various color transformations such as hue rotation, saturation, contrast, brightness,\n * tinting, and blending. These transformations are defined through the `RecolorOptions` interface.\n */\n/**\n * Returns the default recolor settings.\n */\nfunction getDefaultRecolorFlags() {\n    return {\n        invertBrightness: false,\n        rotate: 0,\n        saturate: 0,\n        gamma: 1,\n        contrast: 1,\n        brightness: 0,\n        tint: 0,\n        tintColor: '#FF0000',\n        blend: 0,\n        blendColor: '#000000',\n    };\n}\n/**\n * Checks if the given options object contains any active recolor transformations.\n * @param opt The recolor options to validate.\n */\nfunction isValidRecolorOptions(opt) {\n    if (!opt)\n        return false;\n    return (opt.invertBrightness ||\n        (opt.rotate != null && opt.rotate !== 0) ||\n        (opt.saturate != null && opt.saturate !== 0) ||\n        (opt.gamma != null && opt.gamma !== 1) ||\n        (opt.contrast != null && opt.contrast !== 1) ||\n        (opt.brightness != null && opt.brightness !== 0) ||\n        (opt.tint != null && opt.tint !== 0) ||\n        (opt.tintColor != null && opt.tintColor !== '#FF0000') ||\n        (opt.blend != null && opt.blend !== 0) ||\n        (opt.blendColor != null && opt.blendColor !== '#000000'));\n}\n/**\n * Caches recolored colors to optimize performance.\n */\nclass CachedRecolor {\n    skip;\n    opt;\n    cache;\n    /**\n     * Creates a cached recolor instance.\n     * @param opt Optional recolor options.\n     */\n    constructor(opt) {\n        this.skip = !isValidRecolorOptions(opt);\n        this.cache = new Map();\n        this.opt = opt;\n    }\n    /**\n     * Applies cached recoloring to a given color.\n     * @param color The color to recolor.\n     * @returns The recolored color, either from cache or newly computed.\n     */\n    do(color) {\n        if (this.skip)\n            return color;\n        const key = color.asHex();\n        if (this.cache.has(key))\n            return this.cache.get(key);\n        const recolored = recolor(color, this.opt);\n        this.cache.set(key, recolored);\n        return recolored;\n    }\n}\n/**\n * Applies the specified recoloring transformations to a single color.\n * @param color The original color.\n * @param opt Optional recolor options.\n * @returns A new `Color` instance with applied transformations.\n */\nfunction recolor(color, opt) {\n    if (!isValidRecolorOptions(opt))\n        return color;\n    if (opt.invertBrightness)\n        color = color.invertLuminosity();\n    if (opt.rotate)\n        color = color.rotateHue(opt.rotate);\n    if (opt.saturate)\n        color = color.saturate(opt.saturate);\n    if (opt.gamma != null && opt.gamma != 1)\n        color = color.gamma(opt.gamma);\n    if (opt.contrast != null && opt.contrast != 1)\n        color = color.contrast(opt.contrast);\n    if (opt.brightness)\n        color = color.brightness(opt.brightness);\n    if (opt.tint && opt.tintColor != null)\n        color = color.tint(opt.tint, Color.parse(opt.tintColor));\n    if (opt.blend && opt.blendColor != null)\n        color = color.blend(opt.blend, Color.parse(opt.blendColor));\n    return color;\n}\n\nconst styleBuilderColorKeys = ['agriculture', 'boundary', 'building', 'buildingbg', 'burial', 'commercial', 'construction', 'cycle', 'danger', 'disputed', 'education', 'foot', 'glacier', 'grass', 'hospital', 'industrial', 'label', 'labelHalo', 'land', 'leisure', 'motorway', 'motorwaybg', 'park', 'parking', 'poi', 'prison', 'rail', 'residential', 'rock', 'sand', 'shield', 'street', 'streetbg', 'subway', 'symbol', 'trunk', 'trunkbg', 'waste', 'water', 'wetland', 'wood'];\n\n// StyleBuilder class definition\nclass StyleBuilder {\n    #sourceName = 'versatiles-shortbread';\n    build(options) {\n        options ??= {};\n        // @ts-expect-error globalThis may be undefined in some environments\n        const baseUrl = options.baseUrl ?? globalThis?.document?.location?.origin ?? 'https://tiles.versatiles.org';\n        const glyphs = options.glyphs ?? '/assets/glyphs/{fontstack}/{range}.pbf';\n        const sprite = options.sprite ?? [{ id: 'basics', url: '/assets/sprites/basics/sprites' }];\n        const tiles = options.tiles ?? ['/tiles/osm/{z}/{x}/{y}'];\n        const bounds = options.bounds ?? [-180, -85.0511287798066, 180, 85.0511287798066];\n        const hideLabels = options.hideLabels ?? false;\n        const language = options.language ?? null;\n        const recolorOptions = options.recolor ?? getDefaultRecolorFlags();\n        const colors = this.getColors(this.defaultColors);\n        if (options.colors) {\n            let key;\n            for (key in options.colors) {\n                const value = options.colors[key];\n                if (value != null)\n                    colors[key] = Color.parse(value);\n            }\n        }\n        const fonts = deepClone(this.defaultFonts);\n        if (options.fonts) {\n            let key;\n            for (key in options.fonts) {\n                const fontName = options.fonts[key];\n                if (fontName != null)\n                    fonts[key] = fontName;\n            }\n        }\n        // get empty shortbread style\n        const style = getShortbreadTemplate();\n        const styleRuleOptions = {\n            colors,\n            fonts,\n            language,\n        };\n        // get layer style rules from child class\n        const layerStyleRules = this.getStyleRules(styleRuleOptions);\n        // get shortbread layers\n        const layerDefinitions = getShortbreadLayers({ language });\n        let layers = layerDefinitions.map(layer => {\n            switch (layer.type) {\n                case 'background':\n                    return layer;\n                case 'fill':\n                case 'line':\n                case 'symbol':\n                    return {\n                        source: this.#sourceName,\n                        ...layer,\n                    };\n            }\n            throw Error('unknown layer type');\n        });\n        // apply layer rules\n        layers = decorate(layers, layerStyleRules, new CachedRecolor(recolorOptions));\n        // hide labels, if wanted\n        if (hideLabels)\n            layers = layers.filter(l => l.type !== 'symbol');\n        style.layers = layers;\n        style.name = 'versatiles-' + this.name.toLowerCase();\n        style.glyphs = resolveUrl(baseUrl, glyphs);\n        if (typeof sprite == 'string') {\n            style.sprite = [{ id: basename(sprite), url: resolveUrl(baseUrl, sprite) }];\n        }\n        else {\n            style.sprite = sprite.map(({ id, url }) => ({ id, url: resolveUrl(baseUrl, url) }));\n        }\n        const source = style.sources[this.#sourceName];\n        if ('tiles' in source)\n            source.tiles = tiles.map(url => resolveUrl(baseUrl, url));\n        if ('bounds' in source)\n            source.bounds = bounds;\n        return style;\n    }\n    getColors(colors) {\n        const entriesString = Object.entries(colors);\n        const result = Object.fromEntries(entriesString.map(([key, value]) => [key, Color.parse(value)]));\n        return result;\n    }\n    getDefaultOptions() {\n        return {\n            baseUrl: '',\n            bounds: [\n                -180,\n                -85.0511287798066,\n                180,\n                85.0511287798066\n            ],\n            glyphs: '',\n            sprite: '',\n            tiles: [],\n            hideLabels: false,\n            language: undefined,\n            colors: deepClone(this.defaultColors),\n            fonts: deepClone(this.defaultFonts),\n            recolor: getDefaultRecolorFlags(),\n        };\n    }\n    transformDefaultColors(callback) {\n        const colors = this.getColors(this.defaultColors);\n        for (const key of styleBuilderColorKeys) {\n            this.defaultColors[key] = callback(colors[key]);\n        }\n    }\n}\n\nclass Colorful extends StyleBuilder {\n    name = 'Colorful';\n    defaultFonts = {\n        regular: 'noto_sans_regular',\n        bold: 'noto_sans_bold',\n    };\n    defaultColors = {\n        /** Color for land areas on the map. */\n        land: '#F9F4EE',\n        /** Color for water bodies like lakes and rivers. */\n        water: '#BEDDF3',\n        /** Color for glacier areas, usually shown as white. */\n        glacier: '#FFFFFF',\n        /** Color for wooded or forested areas. */\n        wood: '#66AA44',\n        /** Color for grasslands or open fields. */\n        grass: '#D8E8C8',\n        /** Color for parks and recreational areas. */\n        park: '#D9D9A5',\n        /** Color for streets and roads on the map. */\n        street: '#FFFFFF',\n        /** Background color for streets. */\n        streetbg: '#CFCDCA',\n        /** Color for major highways or motorways. */\n        motorway: '#FFCC88',\n        /** Background color for motorways. */\n        motorwaybg: '#E9AC77',\n        /** Color for trunk roads. */\n        trunk: '#FFEEAA',\n        /** Background color for trunk roads. */\n        trunkbg: '#E9AC77',\n        /** Background color for buildings. */\n        buildingbg: '#DFDBD7',\n        /** Primary color for buildings. */\n        building: '#F2EAE2',\n        /** Color used for boundaries. */\n        boundary: '#A6A6C8',\n        /** Color used for disputed boundaries. */\n        disputed: '#BEBCCF',\n        /** Color used for residential areas. */\n        residential: '#EAE6E133',\n        /** Color used for commercial areas. */\n        commercial: '#F7DEED40',\n        /** Color used for industrial areas. */\n        industrial: '#FFF4C255',\n        /** Color used for footpaths and pedestrian areas. */\n        foot: '#FBEBFF',\n        /** Primary color used for labels. */\n        label: '#333344',\n        /** Color used for label halos. */\n        labelHalo: '#FFFFFFCC',\n        /** Color used for shields on maps. */\n        shield: '#FFFFFF',\n        /** Color used for agriculture areas. */\n        agriculture: '#F0E7D1',\n        /** Color used for railways. */\n        rail: '#B1BBC4',\n        /** Color used for subways and underground systems. */\n        subway: '#A6B8C7',\n        /** Color used for cycle paths. */\n        cycle: '#EFF9FF',\n        /** Color used for waste areas. */\n        waste: '#DBD6BD',\n        /** Color used for burial and cemetery areas. */\n        burial: '#DDDBCA',\n        /** Color used for sand areas like beaches. */\n        sand: '#FAFAED',\n        /** Color used for rocky terrain. */\n        rock: '#E0E4E5',\n        /** Color used for leisure areas like parks and gardens. */\n        leisure: '#E7EDDE',\n        /** Color used for wetland areas like marshes. */\n        wetland: '#D3E6DB',\n        /** Color used for various symbols on the map. */\n        symbol: '#66626A',\n        /** Color indicating danger or warning areas. */\n        danger: '#FF0000',\n        /** Color used for prison areas. */\n        prison: '#FDF2FC',\n        /** Color used for parking areas. */\n        parking: '#EBE8E6',\n        /** Color used for construction sites. */\n        construction: '#A9A9A9',\n        /** Color used for educational facilities. */\n        education: '#FFFF80',\n        /** Color used for hospitals and medical facilities. */\n        hospital: '#FF6666',\n        /** Color used for points of interest. */\n        poi: '#555555',\n    };\n    getStyleRules(options) {\n        const { colors, fonts } = options;\n        return {\n            // background\n            'background': {\n                color: colors.land,\n            },\n            // boundary\n            'boundary-{country,state}:outline': {\n                color: colors.land.lighten(0.1),\n                lineBlur: 1,\n                lineCap: 'round',\n                lineJoin: 'round',\n            },\n            'boundary-{country,state}': {\n                color: colors.boundary,\n                lineCap: 'round',\n                lineJoin: 'round',\n            },\n            'boundary-country{-disputed,}:outline': {\n                size: { 2: 0, 3: 2, 10: 8 },\n                opacity: 0.75,\n                color: colors.land.lighten(0.05),\n            },\n            'boundary-country{-disputed,}': {\n                size: { 2: 0, 3: 1, 10: 4 },\n            },\n            'boundary-country-disputed': {\n                color: colors.disputed,\n                lineDasharray: [2, 1],\n                lineCap: 'square',\n            },\n            'boundary-state:outline': {\n                size: { 7: 0, 8: 2, 10: 4 },\n                opacity: 0.75,\n            },\n            'boundary-state': {\n                size: { 7: 0, 8: 1, 10: 2 },\n            },\n            // water\n            'water-*': {\n                color: colors.water,\n                lineCap: 'round',\n                lineJoin: 'round',\n            },\n            'water-area': {\n                opacity: { 4: 0, 6: 1 },\n            },\n            'water-area-*': {\n                opacity: { 4: 0, 6: 1 },\n            },\n            'water-{pier,dam}-area': {\n                color: colors.land,\n                opacity: { 12: 0, 13: 1 },\n            },\n            'water-pier': {\n                color: colors.land,\n            },\n            'water-river': {\n                lineWidth: { 9: 0, 10: 3, 15: 5, 17: 9, 18: 20, 20: 60 },\n            },\n            'water-canal': {\n                lineWidth: { 9: 0, 10: 2, 15: 4, 17: 8, 18: 17, 20: 50 },\n            },\n            'water-stream': {\n                lineWidth: { 13: 0, 14: 1, 15: 2, 17: 6, 18: 12, 20: 30 },\n            },\n            'water-ditch': {\n                lineWidth: { 14: 0, 15: 1, 17: 4, 18: 8, 20: 20 },\n            },\n            // land\n            'land-*': {\n                color: colors.land,\n            },\n            'land-glacier': {\n                color: colors.glacier,\n            },\n            'land-forest': {\n                color: colors.wood,\n                opacity: { 7: 0, 8: 0.1 },\n            },\n            'land-grass': {\n                color: colors.grass,\n                opacity: { 11: 0, 12: 1 },\n            },\n            'land-{park,garden,vegetation}': {\n                color: colors.park,\n                opacity: { 11: 0, 12: 1 },\n            },\n            'land-agriculture': {\n                color: colors.agriculture,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-residential': {\n                color: colors.residential,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-commercial': {\n                color: colors.commercial,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-industrial': {\n                color: colors.industrial,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-waste': {\n                color: colors.waste,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-burial': {\n                color: colors.burial,\n                opacity: { 13: 0, 14: 1 },\n            },\n            'land-leisure': {\n                color: colors.leisure,\n            },\n            'land-rock': {\n                color: colors.rock,\n            },\n            'land-sand': {\n                color: colors.sand,\n            },\n            'land-wetland': {\n                color: colors.wetland,\n            },\n            // site\n            'site-dangerarea': {\n                color: colors.danger,\n                fillOutlineColor: colors.danger,\n                opacity: 0.3,\n                image: 'basics:pattern-warning',\n            },\n            'site-hospital': {\n                color: colors.hospital,\n                opacity: 0.1,\n            },\n            'site-prison': {\n                color: colors.prison,\n                image: 'basics:pattern-striped',\n                opacity: 0.1,\n            },\n            'site-construction': {\n                color: colors.construction,\n                image: 'basics:pattern-hatched_thin',\n                opacity: 0.1,\n            },\n            'site-{university,college,school}': {\n                color: colors.education,\n                opacity: 0.1,\n            },\n            'site-{bicycleparking,parking}': {\n                color: colors.parking,\n            },\n            // building\n            'building:outline': {\n                color: colors.buildingbg,\n                opacity: { 14: 0, 15: 1 },\n            },\n            'building': {\n                color: colors.building,\n                opacity: { 14: 0, 15: 1 },\n                fillTranslate: [-2, -2],\n            },\n            // airport\n            'airport-area': {\n                color: colors.street,\n                opacity: 0.5,\n            },\n            'airport-{runway,taxiway}:outline': {\n                color: colors.streetbg,\n                lineJoin: 'round',\n            },\n            'airport-{runway,taxiway}': {\n                color: colors.street,\n                lineJoin: 'round',\n            },\n            'airport-runway:outline': {\n                size: { 11: 0, 12: 6, 13: 9, 14: 16, 15: 24, 16: 40, 17: 100, 18: 160, 20: 300 },\n            },\n            'airport-runway': {\n                size: { 11: 0, 12: 5, 13: 8, 14: 14, 15: 22, 16: 38, 17: 98, 18: 158, 20: 298 },\n                opacity: { 11: 0, 12: 1 },\n            },\n            'airport-taxiway:outline': {\n                size: { 13: 0, 14: 2, 15: 10, 16: 14, 18: 20, 20: 40 },\n            },\n            'airport-taxiway': {\n                size: { 13: 0, 14: 1, 15: 8, 16: 12, 18: 18, 20: 36 },\n                opacity: { 13: 0, 14: 1 },\n            },\n            // bridge\n            'bridge': {\n                color: colors.land.darken(0.02),\n                fillAntialias: true,\n                opacity: 0.8,\n            },\n            // street\n            // colors and joins\n            '{tunnel-,bridge-,}street-*:outline': {\n                color: colors.streetbg,\n                lineJoin: 'round',\n            },\n            '{tunnel-,bridge-,}street-*': {\n                color: colors.street,\n                lineJoin: 'round',\n            },\n            'tunnel-street-*:outline': {\n                color: colors.street.darken(0.13),\n            },\n            'tunnel-street-*': {\n                color: colors.street.darken(0.03),\n            },\n            'bridge-street-*:outline': {\n                color: colors.street.darken(0.15),\n            },\n            // streets and ways, line caps\n            '{tunnel-,}{street,way}-*': {\n                lineCap: 'round',\n            },\n            '{tunnel-,}{street,way}-*:outline': {\n                lineCap: 'round',\n            },\n            'bridge-{street,way}-*': {\n                lineCap: 'butt',\n            },\n            'bridge-{street,way}-*:outline': {\n                lineCap: 'butt',\n            },\n            // faux bridges\n            'bridge-{street,way}-*:bridge': {\n                lineCap: 'butt',\n                lineJoin: 'round',\n                color: colors.land.darken(0.02),\n                fillAntialias: true,\n                opacity: 0.5,\n            },\n            'bridge-street-motorway:bridge': {\n                size: { '5': 0, '6': 3, '10': 7, '14': 7, '16': 20, '18': 53, '19': 118, '20': 235 }\n            },\n            'bridge-street-trunk:bridge': {\n                size: { '7': 0, '8': 3, '10': 6, '14': 8, '16': 17, '18': 50, '19': 104, '20': 202 }\n            },\n            'bridge-street-primary:bridge': {\n                size: { '8': 0, '9': 1, '10': 6, '14': 8, '16': 17, '18': 50, '19': 104, '20': 202 }\n            },\n            'bridge-street-secondary:bridge': {\n                size: { '11': 3, '14': 7, '16': 11, '18': 42, '19': 95, '20': 193 },\n                opacity: { '11': 0, '12': 1 }\n            },\n            'bridge-street-motorway-link:bridge': {\n                minzoom: 12,\n                size: { '12': 3, '14': 4, '16': 10, '18': 20, '20': 56 }\n            },\n            'bridge-street-{trunk,primary,secondary}-link:bridge': {\n                minzoom: 13,\n                size: { '12': 3, '14': 4, '16': 10, '18': 20, '20': 56 }\n            },\n            'bridge-street-{tertiary,tertiary-link,unclassified,residential,livingstreet,pedestrian}*:bridge': {\n                size: { '12': 3, '14': 4, '16': 8, '18': 36, '19': 90, '20': 179 },\n                opacity: { '12': 0, '13': 1 }\n            },\n            'bridge-street-{service,track}:bridge': {\n                size: { '14': 3, '16': 6, '18': 25, '19': 67, '20': 134 },\n                opacity: { '14': 0, '15': 1 }\n            },\n            'bridge-way-*:bridge': {\n                size: { '15': 0, '16': 7, '18': 10, '19': 17, '20': 31 },\n                minzoom: 15\n            },\n            // special color: motorway\n            '{bridge-,}street-motorway{-link,}:outline': {\n                color: colors.motorwaybg,\n            },\n            '{bridge-,}street-motorway{-link,}': {\n                color: colors.motorway,\n            },\n            '{bridge-,}street-{trunk,primary,secondary}{-link,}:outline': {\n                color: colors.trunkbg,\n            },\n            '{bridge-,}street-{trunk,primary,secondary}{-link,}': {\n                color: colors.trunk,\n            },\n            'tunnel-street-motorway{-link,}:outline': {\n                color: colors.motorwaybg.lighten(0.05),\n                lineDasharray: [1, 0.3],\n            },\n            'tunnel-street-motorway{-link,}': {\n                color: colors.motorway.lighten(0.1),\n                lineCap: 'butt',\n            },\n            'tunnel-street-{trunk,primary,secondary}{-link,}:outline': {\n                color: colors.trunkbg.lighten(0.05),\n                lineDasharray: [1, 0.3],\n            },\n            'tunnel-street-{trunk,primary,secondary}{-link,}': {\n                color: colors.trunk.lighten(0.1),\n                lineCap: 'butt',\n            },\n            // motorway\n            '{bridge-,tunnel-,}street-motorway:outline': {\n                size: { 5: 0, 6: 2, 10: 5, 14: 5, 16: 14, 18: 38, 19: 84, 20: 168 },\n            },\n            '{bridge-,tunnel-,}street-motorway': {\n                size: { 5: 0, 6: 1, 10: 4, 14: 4, 16: 12, 18: 36, 19: 80, 20: 160 },\n                opacity: { 5: 0, 6: 1 },\n            },\n            // trunk\n            '{bridge-,tunnel-,}street-trunk:outline': {\n                size: { 7: 0, 8: 2, 10: 4, 14: 6, 16: 12, 18: 36, 19: 74, 20: 144 },\n            },\n            '{bridge-,tunnel-,}street-trunk': {\n                size: { 7: 0, 8: 1, 10: 3, 14: 5, 16: 10, 18: 34, 19: 70, 20: 140 },\n                opacity: { 7: 0, 8: 1 },\n            },\n            // primary\n            '{bridge-,tunnel-,}street-primary:outline': {\n                size: { 8: 0, 9: 1, 10: 4, 14: 6, 16: 12, 18: 36, 19: 74, 20: 144 },\n            },\n            '{bridge-,tunnel-,}street-primary': {\n                size: { 8: 0, 9: 2, 10: 3, 14: 5, 16: 10, 18: 34, 19: 70, 20: 140 },\n                opacity: { 8: 0, 9: 1 },\n            },\n            // secondary\n            '{bridge-,tunnel-,}street-secondary:outline': {\n                size: { 11: 2, 14: 5, 16: 8, 18: 30, 19: 68, 20: 138 },\n                opacity: { 11: 0, 12: 1 },\n            },\n            '{bridge-,tunnel-,}street-secondary': {\n                size: { 11: 1, 14: 4, 16: 6, 18: 28, 19: 64, 20: 130 },\n                opacity: { 11: 0, 12: 1 },\n            },\n            // links\n            '{bridge-,tunnel-,}street-motorway-link:outline': {\n                minzoom: 12,\n                size: { 12: 2, 14: 3, 16: 7, 18: 14, 20: 40 },\n                //\t\topacity: { 12: 0, 13: 1 }, // no fade-in because those are merged in lower zooms\n            },\n            '{bridge-,tunnel-,}street-motorway-link': {\n                minzoom: 12,\n                size: { 12: 1, 14: 2, 16: 5, 18: 12, 20: 38 },\n                //\t\topacity: { 12: 0, 13: 1 }, // no fade-in because those are merged in lower zooms\n            },\n            '{bridge-,tunnel-,}street-{trunk,primary,secondary}-link:outline': {\n                minzoom: 13,\n                size: { 12: 2, 14: 3, 16: 7, 18: 14, 20: 40 },\n                //\t\topacity: { 13: 0, 14: 1 }, // no fade-in because those are merged in lower zooms\n            },\n            '{bridge-,tunnel-,}street-{trunk,primary,secondary}-link': {\n                minzoom: 13,\n                size: { 12: 1, 14: 2, 16: 5, 18: 12, 20: 38 },\n                //\t\topacity: { 13: 0, 14: 1 }, // no fade-in because those are merged in lower zooms\n            },\n            // minor streets\n            '{bridge-,tunnel-,}street-{tertiary,tertiary-link,unclassified,residential,livingstreet,pedestrian}*:outline': {\n                size: { 12: 2, 14: 3, 16: 6, 18: 26, 19: 64, 20: 128 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            '{bridge-,tunnel-,}street-{tertiary,tertiary-link,unclassified,residential,livingstreet,pedestrian}*': {\n                size: { 12: 1, 14: 2, 16: 5, 18: 24, 19: 60, 20: 120 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            // tracks\n            '{bridge-,tunnel-,}street-track:outline': {\n                size: { 14: 2, 16: 4, 18: 18, 19: 48, 20: 96 },\n                opacity: { 14: 0, 15: 1 },\n            },\n            '{bridge-,tunnel-,}street-track': {\n                size: { 14: 1, 16: 3, 18: 16, 19: 44, 20: 88 },\n                opacity: { 14: 0, 15: 1 },\n            },\n            // service\n            '{bridge-,tunnel-,}street-service:outline': {\n                size: { 14: 1, 16: 3, 18: 12, 19: 32, 20: 48 },\n                opacity: { 15: 0, 16: 1 },\n                color: colors.streetbg.lighten(0.3),\n            },\n            '{bridge-,tunnel-,}street-service': {\n                size: { 14: 1, 16: 2, 18: 10, 19: 28, 20: 40 },\n                opacity: { 15: 0, 16: 1 },\n                color: colors.street.darken(0.03),\n            },\n            // ways\n            '{bridge-,tunnel-,}way-*:outline': {\n                size: { 15: 0, 16: 5, 18: 7, 19: 12, 20: 22 },\n                minzoom: 15,\n            },\n            '{bridge-,tunnel-,}way-*': {\n                size: { 15: 0, 16: 4, 18: 6, 19: 10, 20: 20 },\n                minzoom: 15,\n            },\n            // foot\n            '{bridge-,}way-{footway,path,steps}:outline': {\n                color: colors.foot.darken(0.1),\n            },\n            '{bridge-,}way-{footway,path,steps}': {\n                color: colors.foot.lighten(0.02),\n            },\n            'tunnel-way-{footway,path,steps}:outline': {\n                color: colors.foot.darken(0.1).saturate(-0.5),\n            },\n            'tunnel-way-{footway,path,steps}': {\n                color: colors.foot.darken(0.02).saturate(-0.5),\n                lineDasharray: [1, 0.2],\n            },\n            // cycleway\n            '{bridge-,}way-cycleway:outline': {\n                color: colors.cycle.darken(0.1),\n            },\n            '{bridge-,}way-cycleway': {\n                color: colors.cycle,\n            },\n            'tunnel-way-cycleway:outline': {\n                color: colors.cycle.darken(0.1).saturate(-0.5),\n            },\n            'tunnel-way-cycleway': {\n                color: colors.cycle.darken(0.02).saturate(-0.5),\n                lineDasharray: [1, 0.2],\n            },\n            // cycle streets overlay\n            '{bridge-,tunnel-,}street-{tertiary,tertiary-link,unclassified,residential,livingstreet,pedestrian}-bicycle': {\n                lineJoin: 'round',\n                lineCap: 'round',\n                color: colors.cycle,\n            },\n            // pedestrian\n            'street-pedestrian': {\n                size: { 12: 1, 14: 2, 16: 5, 18: 24, 19: 60, 20: 120 },\n                opacity: { 13: 0, 14: 1 },\n                color: colors.foot,\n            },\n            'street-pedestrian-zone': {\n                color: colors.foot.lighten(0.02).fade(0.75),\n                opacity: { 14: 0, 15: 1 },\n            },\n            // rail, lightrail\n            '{tunnel-,bridge-,}transport-{rail,lightrail}:outline': {\n                color: colors.rail,\n                minzoom: 8,\n                size: { 8: 1, 13: 1, 15: 1, 20: 14 },\n            },\n            '{tunnel-,bridge-,}transport-{rail,lightrail}': {\n                color: colors.rail.lighten(0.25),\n                minzoom: 14,\n                size: { 14: 0, 15: 1, 20: 10 },\n                lineDasharray: [2, 2],\n            },\n            // rail-service, lightrail-service\n            '{tunnel-,bridge-,}transport-{rail,lightrail}-service:outline': {\n                color: colors.rail,\n                minzoom: 14,\n                size: { 14: 0, 15: 1, 16: 1, 20: 14 },\n            },\n            '{tunnel-,bridge-,}transport-{rail,lightrail}-service': {\n                color: colors.rail.lighten(0.25),\n                minzoom: 15,\n                size: { 15: 0, 16: 1, 20: 10 },\n                lineDasharray: [2, 2],\n            },\n            // subway\n            '{tunnel-,bridge-,}transport-subway:outline': {\n                color: colors.subway,\n                size: { 11: 0, 12: 1, 15: 3, 16: 3, 18: 6, 19: 8, 20: 10 },\n            },\n            '{tunnel-,bridge-,}transport-subway': {\n                color: colors.subway.lighten(0.25),\n                size: { 11: 0, 12: 1, 15: 2, 16: 2, 18: 5, 19: 6, 20: 8 },\n                lineDasharray: [2, 2],\n            },\n            // monorail\n            '{tunnel-,bridge-,}transport-{tram,narrowgauge,funicular,monorail}:outline': {\n                minzoom: 15,\n                color: colors.rail,\n                size: { 15: 0, 16: 5, 18: 7, 20: 20 },\n                lineDasharray: [0.1, 0.5],\n            },\n            '{tunnel-,bridge-,}transport-{tram,narrowgauge,funicular,monorail}': {\n                minzoom: 13,\n                size: { 13: 0, 16: 1, 17: 2, 18: 3, 20: 5 },\n                color: colors.rail,\n            },\n            // bridge\n            '{bridge-,}transport-rail:outline': {\n                opacity: { 8: 0, 9: 1 },\n            },\n            '{bridge-,}transport-rail': {\n                opacity: { 14: 0, 15: 1 },\n            },\n            '{bridge-,}transport-{lightrail,subway}:outline': {\n                opacity: { 11: 0, 12: 1 },\n            },\n            '{bridge-,}transport-{lightrail,subway}': {\n                opacity: { 14: 0, 15: 1 },\n            },\n            // tunnel\n            'tunnel-transport-rail:outline': {\n                opacity: { 8: 0, 9: 0.3 },\n            },\n            'tunnel-transport-rail': {\n                opacity: { 14: 0, 15: 0.3 },\n            },\n            'tunnel-transport-{lightrail,subway}:outline': {\n                opacity: { 11: 0, 12: 0.5 },\n            },\n            'tunnel-transport-{lightrail,subway}': {\n                opacity: { 14: 0, 15: 1 },\n            },\n            // ferry\n            'transport-ferry': {\n                minzoom: 10,\n                color: colors.water.darken(0.1),\n                size: { 10: 1, 13: 2, 14: 3, 16: 4, 17: 6 },\n                opacity: { 10: 0, 11: 1 },\n                lineDasharray: [1, 1],\n            },\n            // labels\n            'label-boundary-*': {\n                color: colors.label,\n                font: fonts.regular,\n                textTransform: 'uppercase',\n                textHaloColor: colors.labelHalo,\n                textHaloWidth: 2,\n                textHaloBlur: 1,\n                textAnchor: 'top',\n                textOffset: [0, 0.2],\n                textPadding: 0,\n                textOptional: true,\n            },\n            'label-boundary-country-large': {\n                minzoom: 2,\n                size: { 2: 8, 5: 13 },\n            },\n            'label-boundary-country-medium': {\n                minzoom: 3,\n                size: { 3: 8, 5: 12 },\n            },\n            'label-boundary-country-small': {\n                minzoom: 4,\n                size: { 4: 8, 5: 11 },\n            },\n            'label-boundary-state': {\n                minzoom: 5,\n                color: colors.label.lighten(0.05),\n                size: { 5: 8, 8: 12 },\n            },\n            'label-place-*': {\n                color: colors.label.rotateHue(-15).saturate(1).darken(0.05),\n                font: fonts.regular,\n                textHaloColor: colors.labelHalo,\n                textHaloWidth: 2,\n                textHaloBlur: 1,\n            },\n            'label-place-capital': {\n                minzoom: 5,\n                size: { 5: 12, 10: 16 },\n            },\n            'label-place-statecapital': {\n                minzoom: 6,\n                size: { 6: 11, 10: 15 },\n            },\n            'label-place-city': {\n                minzoom: 7,\n                size: { 7: 11, 10: 14 },\n            },\n            'label-place-town': {\n                minzoom: 9,\n                size: { 8: 11, 12: 14 },\n            },\n            'label-place-village': {\n                minzoom: 11,\n                size: { 9: 11, 12: 14 },\n            },\n            'label-place-hamlet': {\n                minzoom: 13,\n                size: { 10: 11, 12: 14 },\n            },\n            // all the city things\n            'label-place-suburb': {\n                minzoom: 11,\n                size: { 11: 11, 13: 14 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-30).saturate(1).darken(0.05),\n            },\n            'label-place-quarter': {\n                minzoom: 13,\n                size: { 13: 13 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-40).saturate(1).darken(0.05),\n            },\n            'label-place-neighbourhood': {\n                minzoom: 14,\n                size: { 14: 12 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-50).saturate(1).darken(0.05),\n            },\n            'label-motorway-shield': {\n                color: colors.shield,\n                font: fonts.bold,\n                textHaloColor: colors.motorway,\n                textHaloWidth: 0.1,\n                textHaloBlur: 1,\n                symbolPlacement: 'line',\n                textAnchor: 'center',\n                minzoom: 14,\n                size: { 14: 10, 18: 12, 20: 16 },\n            },\n            'label-street-*': {\n                color: colors.label,\n                font: fonts.regular,\n                textHaloColor: colors.labelHalo,\n                textHaloWidth: 2,\n                textHaloBlur: 1,\n                symbolPlacement: 'line',\n                textAnchor: 'center',\n                minzoom: 12,\n                size: { 12: 10, 15: 13 },\n            },\n            'label-address-housenumber': {\n                font: fonts.regular,\n                textHaloColor: colors.building.lighten(0.05),\n                textHaloWidth: 2,\n                textHaloBlur: 1,\n                symbolPlacement: 'point',\n                textAnchor: 'center',\n                minzoom: 17,\n                size: { 17: 8, 19: 10 },\n                color: colors.building.darken(0.3),\n            },\n            // markings\n            'marking-oneway{-reverse,}': {\n                minzoom: 16,\n                image: 'basics:marking-arrow',\n                opacity: { 16: 0, 17: 0.4, 20: 0.4 },\n                font: fonts.regular,\n            },\n            // TODO: bicycle and pedestrian\n            // transit\n            'symbol-*': {\n                iconSize: 1,\n                symbolPlacement: 'point',\n                iconOpacity: 0.7,\n                iconKeepUpright: true,\n                font: fonts.regular,\n                size: 10,\n                color: colors.symbol,\n                iconAnchor: 'bottom',\n                textAnchor: 'top',\n                textHaloColor: colors.labelHalo,\n                textHaloWidth: 2,\n                textHaloBlur: 1,\n            },\n            'symbol-transit-airport': {\n                minzoom: 12,\n                image: 'basics:icon-airport',\n                iconSize: { 12: 0.5, 14: 1 },\n            },\n            'symbol-transit-airfield': {\n                minzoom: 13,\n                image: 'basics:icon-airfield',\n                iconSize: { 13: 0.5, 15: 1 },\n            },\n            'symbol-transit-station': {\n                minzoom: 13,\n                image: 'basics:icon-rail',\n                iconSize: { 13: 0.5, 15: 1 },\n            },\n            'symbol-transit-lightrail': {\n                minzoom: 14,\n                image: 'basics:icon-rail_light',\n                iconSize: { 14: 0.5, 16: 1 },\n            },\n            'symbol-transit-subway': {\n                minzoom: 14,\n                image: 'basics:icon-rail_metro',\n                iconSize: { 14: 0.5, 16: 1 },\n            },\n            'symbol-transit-tram': {\n                minzoom: 15,\n                image: 'basics:transport-tram',\n                iconSize: { 15: 0.5, 17: 1 },\n            },\n            'symbol-transit-bus': {\n                minzoom: 16,\n                image: 'basics:icon-bus',\n                iconSize: { 16: 0.5, 18: 1 },\n            },\n            // TODO: localized symbols? depends on shortbread\n            // pois\n            'poi-*': {\n                minzoom: 16,\n                iconSize: { 16: 0.5, 19: 0.5, 20: 1 },\n                opacity: { 16: 0, 17: 0.4 },\n                symbolPlacement: 'point',\n                iconOptional: true,\n                font: fonts.regular,\n                color: colors.poi,\n            },\n            'poi-amenity': {\n                image: ['match',\n                    ['get', 'amenity'],\n                    'arts_centre', 'basics:icon-art_gallery',\n                    'atm', 'basics:icon-atm',\n                    'bank', 'basics:icon-bank',\n                    'bar', 'basics:icon-bar',\n                    'bench', 'basics:icon-bench',\n                    'bicycle_rental', 'basics:icon-bicycle_share',\n                    'biergarten', 'basics:icon-beergarden',\n                    'cafe', 'basics:icon-cafe',\n                    'car_rental', 'basics:icon-car_rental',\n                    'car_sharing', 'basics:icon-car_rental',\n                    'car_wash', 'basics:icon-car_wash',\n                    'cinema', 'basics:icon-cinema',\n                    //'clinic', 'basics:icon-clinic',\n                    'college', 'basics:icon-college',\n                    'community_centre', 'basics:icon-community',\n                    //'courthouse', 'basics:icon-courthouse',\n                    'dentist', 'basics:icon-dentist',\n                    'doctors', 'basics:icon-doctor',\n                    'dog_park', 'basics:icon-dog_park',\n                    'drinking_water', 'basics:icon-drinking_water',\n                    'embassy', 'basics:icon-embassy',\n                    'fast_food', 'basics:icon-fast_food',\n                    'fire_station', 'basics:icon-fire_station',\n                    //'food_court', 'basics:icon-food_court',\n                    'fountain', 'basics:icon-fountain',\n                    'grave_yard', 'basics:icon-cemetery',\n                    'hospital', 'basics:icon-hospital',\n                    'hunting_stand', 'basics:icon-huntingstand',\n                    'library', 'basics:icon-library',\n                    'marketplace', 'basics:icon-marketplace',\n                    'nightclub', 'basics:icon-nightclub',\n                    'nursing_home', 'basics:icon-nursinghome',\n                    'pharmacy', 'basics:icon-pharmacy',\n                    'place_of_worship', 'basics:icon-place_of_worship',\n                    'playground', 'basics:icon-playground',\n                    'police', 'basics:icon-police',\n                    'post_box', 'basics:icon-postbox',\n                    'post_office', 'basics:icon-post',\n                    'prison', 'basics:icon-prison',\n                    'pub', 'basics:icon-beer',\n                    //'public_building', 'basics:icon-public_building',\n                    'recycling', 'basics:icon-recycling',\n                    'restaurant', 'basics:icon-restaurant',\n                    'school', 'basics:icon-school',\n                    'shelter', 'basics:icon-shelter',\n                    'telephone', 'basics:icon-telephone',\n                    'theatre', 'basics:icon-theatre',\n                    'toilets', 'basics:icon-toilet',\n                    'townhall', 'basics:icon-town_hall',\n                    //'university', 'basics:icon-university',\n                    'vending_machine', 'basics:icon-vendingmachine',\n                    'veterinary', 'basics:icon-veterinary',\n                    'waste_basket', 'basics:icon-waste_basket',\n                    '',\n                ],\n            },\n            'poi-leisure': {\n                image: ['match',\n                    ['get', 'leisure'],\n                    'golf_course', 'basics:icon-golf',\n                    'ice_rink', 'basics:icon-icerink',\n                    'pitch', 'basics:icon-pitch',\n                    //'sports_centre', 'basics:icon-sports_centre',\n                    'stadium', 'basics:icon-stadium',\n                    'swimming_pool', 'basics:icon-swimming',\n                    'water_park', 'basics:icon-waterpark',\n                    'basics:icon-sports',\n                ],\n            },\n            'poi-tourism': {\n                image: ['match',\n                    ['get', 'tourism'],\n                    //'alpine_hut', 'basics:icon-alpine_hut',\n                    //'bed_and_breakfast', 'basics:icon-bed_and_breakfast',\n                    //'camp_site', 'basics:icon-camp_site',\n                    //'caravan_site', 'basics:icon-caravan_site',\n                    'chalet', 'basics:icon-chalet',\n                    //'guest_house', 'basics:icon-guest_house',\n                    //'hostel', 'basics:icon-hostel',\n                    //'hotel', 'basics:icon-hotel',\n                    'information', 'basics:transport-information',\n                    //'motel', 'basics:icon-motel',\n                    'picnic_site', 'basics:icon-picnic_site',\n                    //'theme_park', 'basics:icon-theme_park',\n                    'viewpoint', 'basics:icon-viewpoint',\n                    'zoo', 'basics:icon-zoo',\n                    '',\n                ],\n            },\n            'poi-shop': {\n                image: ['match',\n                    ['get', 'shop'],\n                    'alcohol', 'basics:icon-alcohol_shop',\n                    'bakery', 'basics:icon-bakery',\n                    'beauty', 'basics:icon-beauty',\n                    'beverages', 'basics:icon-beverages',\n                    //'bicycle', 'basics:icon-bicycle',\n                    'books', 'basics:icon-books',\n                    'butcher', 'basics:icon-butcher',\n                    //'car', 'basics:icon-car',\n                    'chemist', 'basics:icon-chemist',\n                    'clothes', 'basics:icon-clothes',\n                    //'computer', 'basics:icon-computer',\n                    //'convinience', 'basics:icon-convinience',\n                    //'department_store', 'basics:icon-department_store',\n                    'doityourself', 'basics:icon-doityourself',\n                    'dry_cleaning', 'basics:icon-drycleaning',\n                    'florist', 'basics:icon-florist',\n                    'furniture', 'basics:icon-furniture',\n                    'garden_centre', 'basics:icon-garden_centre',\n                    'general', 'basics:icon-shop',\n                    'gift', 'basics:icon-gift',\n                    'greengrocer', 'basics:icon-greengrocer',\n                    'hairdresser', 'basics:icon-hairdresser',\n                    'hardware', 'basics:icon-hardware',\n                    'jewelry', 'basics:icon-jewelry_store',\n                    'kiosk', 'basics:icon-kiosk',\n                    'laundry', 'basics:icon-laundry',\n                    //'mall', 'basics:icon-mall',\n                    //'mobile_phone', 'basics:icon-mobile_phone',\n                    'newsagent', 'basics:icon-newsagent',\n                    'optican', 'basics:icon-optician',\n                    'outdoor', 'basics:icon-outdoor',\n                    'shoes', 'basics:icon-shoes',\n                    'sports', 'basics:icon-sports',\n                    'stationery', 'basics:icon-stationery',\n                    //'supermarket', 'basics:icon-supermarket',\n                    'toys', 'basics:icon-toys',\n                    'travel_agency', 'basics:icon-travel_agent',\n                    'video', 'basics:icon-video',\n                    'basics:icon-shop',\n                ],\n            },\n            'poi-man_made': {\n                image: ['match',\n                    ['get', 'man_made'],\n                    'lighthouse', 'basics:icon-lighthouse',\n                    'surveillance', 'basics:icon-surveillance',\n                    'tower', 'basics:icon-observation_tower',\n                    //'wastewater_plant', 'basics:icon-wastewater_plant',\n                    //'water_well', 'basics:icon-water_well',\n                    //'water_works', 'basics:icon-water_works',\n                    'watermill', 'basics:icon-watermill',\n                    'windmill', 'basics:icon-windmill',\n                    '',\n                ],\n            },\n            'poi-historic': {\n                image: ['match',\n                    ['get', 'historic'],\n                    //'archaelogical_site', 'basics:icon-archaelogical_site',\n                    'artwork', 'basics:icon-artwork',\n                    //'battlefield', 'basics:icon-battlefield',\n                    'castle', 'basics:icon-castle',\n                    //'fort', 'basics:icon-fort',\n                    //'memorial', 'basics:icon-memorial',\n                    'monument', 'basics:icon-monument',\n                    //'ruins', 'basics:icon-ruins',\n                    //'wayside_cross', 'basics:icon-wayside_cross',\n                    'wayside_shrine', 'basics:icon-shrine',\n                    'basics:icon-historic',\n                ],\n            },\n            'poi-emergency': {\n                image: ['match',\n                    ['get', 'emergency'],\n                    'defibrillator', 'basics:icon-defibrillator',\n                    'fire_hydrant', 'basics:icon-hydrant',\n                    'phone', 'basics:icon-emergency_phone',\n                    '',\n                ],\n            },\n            /*\n            'poi-highway': {\n                image: ['match',\n                    ['get', 'highway'],\n                    //'emergency_access_point', 'basics:icon-emergency_access_point',\n                    ''\n                ]\n            },\n            'poi-office': {\n                image: ['match',\n                    ['get', 'office'],\n                    //'diplomatic', 'basics:icon-diplomatic',\n                    ''\n                ]\n            },\n            */\n        };\n    }\n}\n\nclass Eclipse extends Colorful {\n    name = 'Eclipse';\n    constructor() {\n        super();\n        this.transformDefaultColors(color => color.invertLuminosity());\n    }\n}\n\nclass Graybeard extends Colorful {\n    name = 'Graybeard';\n    constructor() {\n        super();\n        this.transformDefaultColors(color => color.saturate(-1));\n    }\n}\n\nclass Shadow extends Colorful {\n    name = 'Shadow';\n    constructor() {\n        super();\n        this.transformDefaultColors(color => color.saturate(-1).invert().brightness(0.2));\n    }\n}\n\nclass Neutrino extends Colorful {\n    name = 'Neutrino';\n    defaultFonts = {\n        regular: 'noto_sans_regular',\n        bold: 'noto_sans_bold',\n    };\n    defaultColors = {\n        /** Color representing land areas. */\n        land: '#f6f0f6',\n        /** Color representing bodies of water such as lakes and rivers. */\n        water: '#cbd2df',\n        /** Color for grassy areas and fields. */\n        grass: '#e7e9e5',\n        /** Color for wooded or forested areas. */\n        wood: '#d9e3d9',\n        /** Color used for agricultural land. */\n        agriculture: '#f8eeee',\n        /** Color for site areas such as parks or recreational facilities. */\n        commercial: '#ebe8e6',\n        /** Primary color for buildings. */\n        building: '#e0d1d9',\n        /** Color for streets and roads. */\n        street: '#ffffff',\n        /** Color used for boundaries, such as national or state lines. */\n        boundary: '#e6ccd8',\n        /** Color for footpaths and pedestrian areas. */\n        foot: '#fef8ff',\n        /** Color used for railways. */\n        rail: '#e8d5e0',\n        /** Primary color used for text labels. */\n        label: '#cbb7b7',\n        // Don't need these colors:\n        buildingbg: '#000',\n        burial: '#000',\n        construction: '#000',\n        cycle: '#000',\n        danger: '#000',\n        disputed: '#000',\n        education: '#000',\n        glacier: '#000',\n        hospital: '#000',\n        industrial: '#000',\n        labelHalo: '#000',\n        leisure: '#000',\n        motorway: '#000',\n        motorwaybg: '#000',\n        park: '#000',\n        parking: '#000',\n        poi: '#000',\n        prison: '#000',\n        residential: '#000',\n        rock: '#000',\n        sand: '#000',\n        shield: '#000',\n        streetbg: '#000',\n        subway: '#000',\n        symbol: '#000',\n        trunk: '#000',\n        trunkbg: '#000',\n        waste: '#000',\n        wetland: '#000',\n    };\n    getStyleRules(options) {\n        const { colors, fonts } = options;\n        return {\n            'background': {\n                color: colors.land,\n            },\n            'boundary-{country,state}': {\n                color: colors.boundary,\n            },\n            'boundary-country:outline': {\n                size: { 2: 2, 10: 6 },\n                opacity: { 2: 0, 4: 0.3 },\n                color: colors.land.lighten(0.05),\n                lineBlur: 1,\n            },\n            'boundary-country': {\n                size: { 2: 1, 10: 4 },\n                opacity: { 2: 0, 4: 1 },\n            },\n            'boundary-state:outline': {\n                size: { 7: 3, 10: 5 },\n                opacity: { 7: 0, 8: 0.3 },\n                color: colors.land.lighten(0.05),\n                lineBlur: 1,\n            },\n            'boundary-state': {\n                size: { 7: 2, 10: 3 },\n                opacity: { 7: 0, 8: 1 },\n                lineDasharray: [0, 1.5, 1, 1.5],\n                lineCap: 'round',\n                lineJoin: 'round',\n            },\n            'water-*': {\n                color: colors.water,\n            },\n            'water-area': {\n                opacity: { 4: 0, 6: 1 },\n            },\n            'water-area-*': {\n                opacity: { 4: 0, 6: 1 },\n            },\n            'water-{pier,dam}-area': {\n                color: colors.land,\n                opacity: { 12: 0, 13: 1 },\n            },\n            'water-pier': {\n                color: colors.land,\n            },\n            'land-*': {\n                color: colors.land,\n            },\n            'land-forest': {\n                color: colors.wood,\n                opacity: { 7: 0, 8: 1 },\n            },\n            'land-grass': {\n                color: colors.grass,\n                opacity: { 11: 0, 12: 1 },\n            },\n            'land-{park,garden,vegetation}': {\n                color: colors.grass.darken(0.05).saturate(0.05),\n                opacity: { 11: 0, 12: 1 },\n            },\n            'land-agriculture': {\n                color: colors.agriculture,\n                opacity: { 10: 0, 11: 1 },\n            },\n            'land-{commercial,industrial,residential}': {\n                color: colors.land.darken(0.03),\n                opacity: { 10: 0, 11: 1 },\n            },\n            'site-{bicycleparking,parking}': {\n                color: colors.commercial,\n            },\n            'building': {\n                color: colors.building,\n                opacity: { 14: 0, 15: 1 },\n            },\n            'bridge': {\n                color: colors.land.darken(0.01),\n            },\n            '{tunnel-,bridge-,}street-*': {\n                color: colors.street,\n                size: 1,\n                lineJoin: 'round',\n                lineCap: 'round',\n            },\n            '{tunnel-,}street-*:outline': {\n                color: colors.street.darken(0.1),\n                lineJoin: 'round',\n                lineCap: 'round',\n            },\n            'tunnel-street-*': {\n                color: colors.street.darken(0.03),\n            },\n            'tunnel-street-*:outline': {\n                color: colors.street.darken(0.13),\n                lineDasharray: [1, 2],\n            },\n            'bridge-street-*:outline': {\n                color: colors.street.darken(0.15),\n            },\n            // motorway\n            '{bridge-street,tunnel-street,street}-motorway:outline': {\n                size: { 5: 2, 10: 5, 14: 5, 16: 14, 18: 38, 19: 84, 20: 168 },\n                opacity: { 5: 0, 6: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-motorway': {\n                size: { 5: 1, 10: 4, 14: 4, 16: 12, 18: 36, 19: 80, 20: 160 },\n                opacity: { 5: 0, 6: 1 },\n            },\n            // trunk\n            '{bridge-street,tunnel-street,street}-trunk:outline': {\n                size: { 7: 2, 10: 4, 14: 6, 16: 12, 18: 36, 19: 74, 20: 144 },\n                opacity: { 7: 0, 8: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-trunk': {\n                size: { 7: 1, 10: 3, 14: 5, 16: 10, 18: 34, 19: 70, 20: 140 },\n                opacity: { 7: 0, 8: 1 },\n            },\n            // primary\n            '{bridge-street,tunnel-street,street}-primary:outline': {\n                size: { 7: 2, 10: 4, 14: 6, 16: 12, 18: 36, 19: 74, 20: 144 },\n                opacity: { 7: 0, 8: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-primary': {\n                size: { 7: 1, 10: 3, 14: 5, 16: 10, 18: 34, 19: 70, 20: 140 },\n                opacity: { 7: 0, 8: 1 },\n            },\n            // secondary\n            '{bridge-street,tunnel-street,street}-secondary:outline': {\n                size: { 11: 2, 14: 5, 16: 8, 18: 30, 19: 68, 20: 138 },\n                opacity: { 11: 0, 12: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-secondary': {\n                size: { 11: 1, 14: 4, 16: 6, 18: 28, 19: 64, 20: 130 },\n                opacity: { 11: 0, 12: 1 },\n            },\n            // links\n            '{bridge-street,tunnel-street,street}-motorway-link:outline': {\n                minzoom: 12,\n                size: { 12: 2, 14: 3, 16: 7, 18: 14, 20: 40 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-motorway-link': {\n                minzoom: 12,\n                size: { 12: 1, 14: 2, 16: 5, 18: 12, 20: 38 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-{trunk,primary,secondary}-link:outline': {\n                minzoom: 13,\n                size: { 12: 2, 14: 3, 16: 7, 18: 14, 20: 40 },\n                opacity: { 13: 0, 14: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-{trunk,primary,secondary}-link': {\n                minzoom: 13,\n                size: { 12: 1, 14: 2, 16: 5, 18: 12, 20: 38 },\n                opacity: { 13: 0, 14: 1 },\n            },\n            // minor streets\n            '{bridge-street,tunnel-street,street}-{tertiary,tertiary-link,unclassified,residential,living_street,pedestrian}:outline': {\n                size: { 12: 2, 14: 3, 16: 6, 18: 26, 19: 64, 20: 128 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-{tertiary,tertiary-link,unclassified,residential,living_street,pedestrian}': {\n                size: { 12: 1, 14: 2, 16: 5, 18: 24, 19: 60, 20: 120 },\n                opacity: { 12: 0, 13: 1 },\n            },\n            // service and tracks\n            '{bridge-street,tunnel-street,street}-{service,track}:outline': {\n                size: { 14: 2, 16: 4, 18: 18, 19: 48, 20: 96 },\n                opacity: { 14: 0, 15: 1 },\n            },\n            '{bridge-street,tunnel-street,street}-{service,track}': {\n                size: { 14: 1, 16: 3, 18: 16, 19: 44, 20: 88 },\n                opacity: { 14: 0, 15: 1 },\n            },\n            // ways, surface only\n            'way-{footway,path,steps}:outline': {\n                size: { 17: 0, 18: 3 },\n                opacity: { 17: 0, 18: 1 },\n                minzoom: 17,\n                color: colors.foot.darken(0.05),\n            },\n            'way-{footway,path,steps}': {\n                size: { 17: 0, 18: 2 },\n                opacity: { 17: 0, 18: 1 },\n                minzoom: 17,\n                color: colors.foot,\n            },\n            'street-pedestrian': {\n                size: { 13: 1, 15: 3 },\n                opacity: { 13: 0, 14: 1 },\n                color: colors.foot,\n            },\n            'street-pedestrian-zone': {\n                color: colors.foot,\n                opacity: { 14: 0, 15: 1 },\n            },\n            // rail\n            '{tunnel-,bridge-,}transport-{rail,lightrail}:outline': {\n                color: colors.rail,\n                size: { 8: 1, 12: 1, 15: 3 },\n            },\n            '{tunnel-,bridge-,}transport-{rail,lightrail}': {\n                color: colors.rail.lighten(0.1),\n                size: { 8: 1, 12: 1, 15: 2 },\n                lineDasharray: [2, 2],\n            },\n            // bridge\n            '{bridge-,}transport-rail:outline': {\n                opacity: { 8: 0, 9: 1 },\n            },\n            '{bridge-,}transport-rail': {\n                opacity: { 14: 0, 15: 1 },\n            },\n            '{bridge-,}transport-lightrail:outline': {\n                opacity: { 11: 0, 12: 1 },\n            },\n            '{bridge-,}transport-lightrail': {\n                opacity: { 14: 0, 15: 1 },\n            },\n            // tunnel\n            'tunnel-transport-rail:outline': {\n                opacity: { 8: 0, 9: 0.3 },\n            },\n            'tunnel-transport-rail': {\n                opacity: { 14: 0, 15: 0.3 },\n            },\n            'tunnel-transport-lightrail:outline': {\n                opacity: { 11: 0, 12: 0.3 },\n            },\n            'tunnel-transport-lightrail': {\n                opacity: { 14: 0, 15: 0.3 },\n            },\n            // labels\n            'label-boundary-*': {\n                color: colors.label,\n                font: fonts.bold,\n                textTransform: 'uppercase',\n                textHaloColor: colors.label.lighten(0.5),\n                textHaloWidth: 0.1,\n                textHaloBlur: 1,\n            },\n            'label-boundary-country-large': {\n                minzoom: 2,\n                size: { 2: 11, 5: 16 },\n            },\n            'label-boundary-country-medium': {\n                minzoom: 3,\n                size: { 3: 11, 5: 15 },\n            },\n            'label-boundary-country-small': {\n                minzoom: 4,\n                size: { 4: 11, 5: 14 },\n            },\n            'label-boundary-state': {\n                minzoom: 5,\n                color: colors.label.lighten(0.05),\n                size: { 5: 8, 8: 12 },\n            },\n            'label-place-*': {\n                color: colors.label.rotateHue(-15).saturate(1).darken(0.05),\n                font: fonts.regular,\n                textHaloColor: colors.label.lighten(0.5),\n                textHaloWidth: 0.1,\n                textHaloBlur: 1,\n                size: 1,\n            },\n            'label-place-capital': {\n                minzoom: 5,\n                size: { 5: 12, 10: 16 },\n            },\n            'label-place-statecapital': {\n                minzoom: 6,\n                size: { 6: 11, 10: 15 },\n            },\n            'label-place-city': {\n                minzoom: 7,\n                size: { 7: 11, 10: 14 },\n            },\n            'label-place-town': {\n                minzoom: 8,\n                size: { 8: 11, 12: 14 },\n            },\n            'label-place-village': {\n                minzoom: 9,\n                size: { 9: 11, 12: 14 },\n            },\n            'label-place-hamlet': {\n                minzoom: 10,\n                size: { 10: 11, 12: 14 },\n            },\n            // all the city things\n            'label-place-suburb': {\n                minzoom: 11,\n                size: { 11: 11, 13: 14 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-30).saturate(1).darken(0.05),\n            },\n            'label-place-quarter': {\n                minzoom: 13,\n                size: { 13: 13 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-40).saturate(1).darken(0.05),\n            },\n            'label-place-neighbourhood': {\n                minzoom: 14,\n                size: { 14: 12 },\n                textTransform: 'uppercase',\n                color: colors.label.rotateHue(-50).saturate(1).darken(0.05),\n            },\n            'label-motorway-shield': {\n                color: colors.label,\n                font: fonts.regular,\n                textHaloColor: colors.label.saturate(-0.5).lighten(0.1),\n                textHaloWidth: 0.1,\n                textHaloBlur: 1,\n                symbolPlacement: 'line',\n                textAnchor: 'center',\n                minzoom: 14,\n                size: { 14: 8, 18: 10, 20: 16 },\n            },\n            'label-street-*': {\n                color: colors.label,\n                font: fonts.regular,\n                textHaloColor: colors.label.saturate(-0.5).lighten(0.1),\n                textHaloWidth: 0.1,\n                textHaloBlur: 1,\n                symbolPlacement: 'line',\n                textAnchor: 'center',\n                minzoom: 12,\n                size: { 12: 10, 15: 13 },\n            },\n        };\n    }\n}\n\nclass Empty extends Colorful {\n    name = 'Empty';\n    getStyleRules(_options) {\n        return {};\n    }\n}\n\n// import styles\nfunction getStyleBuilder(styleBuilder) {\n    const fn = function (options) {\n        return new styleBuilder().build(options);\n    };\n    fn.getOptions = () => new styleBuilder().getDefaultOptions();\n    return fn;\n}\n// generate style builders\nconst colorful = getStyleBuilder(Colorful);\nconst eclipse = getStyleBuilder(Eclipse);\nconst graybeard = getStyleBuilder(Graybeard);\nconst shadow = getStyleBuilder(Shadow);\nconst neutrino = getStyleBuilder(Neutrino);\ngetStyleBuilder(Empty);\n\n/**\n* Checks if an object adheres to the TileJSON specification.\n* Throws errors if the object does not conform to the expected structure or types.\n*/\nfunction isTileJSONSpecification(spec) {\n    if (typeof spec !== 'object' || spec === null) {\n        throw Error('spec must be an object');\n    }\n    const obj = spec;\n    // Common property validation\n    if (obj.data != null && obj.tilejson !== '3.0.0') {\n        throw Error('spec.tilejson must be \"3.0.0\"');\n    }\n    if (obj.attribution != null && typeof obj.attribution !== 'string') {\n        throw Error('spec.attribution must be a string if present');\n    }\n    if (obj.bounds != null) {\n        if (!Array.isArray(obj.bounds) || obj.bounds.length !== 4 || obj.bounds.some(num => typeof num !== 'number')) {\n            throw Error('spec.bounds must be an array of four numbers if present');\n        }\n        const a = obj.bounds;\n        if (a[0] < -180 || a[0] > 180)\n            throw Error('spec.bounds[0] must be between -180 and 180');\n        if (a[1] < -90 || a[1] > 90)\n            throw Error('spec.bounds[1] must be between -90 and 90');\n        if (a[2] < -180 || a[2] > 180)\n            throw Error('spec.bounds[2] must be between -180 and 180');\n        if (a[3] < -90 || a[3] > 90)\n            throw Error('spec.bounds[3] must be between -90 and 90');\n        if (a[0] > a[2])\n            throw Error('spec.bounds[0] must be smaller than spec.bounds[2]');\n        if (a[1] > a[3])\n            throw Error('spec.bounds[1] must be smaller than spec.bounds[3]');\n    }\n    if (obj.center != null) {\n        if (!Array.isArray(obj.center) || obj.center.length !== 2 || obj.center.some(num => typeof num !== 'number')) {\n            throw Error('spec.center must be an array of two numbers if present');\n        }\n        const a = obj.center;\n        if (a[0] < -180 || a[0] > 180)\n            throw Error('spec.center[0] must be between -180 and 180');\n        if (a[1] < -90 || a[1] > 90)\n            throw Error('spec.center[1] must be between -90 and 90');\n    }\n    if (obj.data != null && (!Array.isArray(obj.data) || obj.data.some(url => typeof url !== 'string'))) {\n        throw Error('spec.data must be an array of strings if present');\n    }\n    if (obj.description != null && typeof obj.description !== 'string') {\n        throw Error('spec.description must be a string if present');\n    }\n    if (obj.fillzoom != null && (typeof obj.fillzoom !== 'number' || (obj.fillzoom < 0))) {\n        throw Error('spec.fillzoom must be a positive integer if present');\n    }\n    if (obj.grids != null && (!Array.isArray(obj.grids) || obj.grids.some(url => typeof url !== 'string'))) {\n        throw Error('spec.grids must be an array of strings if present');\n    }\n    if (obj.legend != null && typeof obj.legend !== 'string') {\n        throw Error('spec.legend must be a string if present');\n    }\n    if (obj.minzoom != null && (typeof obj.minzoom !== 'number' || (obj.minzoom < 0))) {\n        throw Error('spec.minzoom must be a positive integer if present');\n    }\n    if (obj.maxzoom != null && (typeof obj.maxzoom !== 'number' || (obj.maxzoom < 0))) {\n        throw Error('spec.maxzoom must be a positive integer if present');\n    }\n    if (obj.name != null && typeof obj.name !== 'string') {\n        throw Error('spec.name must be a string if present');\n    }\n    if (obj.scheme != null && obj.scheme !== 'xyz' && obj.scheme !== 'tms') {\n        throw Error('spec.scheme must be \"tms\" or \"xyz\" if present');\n    }\n    if (obj.template != null && typeof obj.template !== 'string') {\n        throw Error('spec.template must be a string if present');\n    }\n    if (!Array.isArray(obj.tiles) || obj.tiles.length === 0 || obj.tiles.some(url => typeof url !== 'string')) {\n        throw Error('spec.tiles must be an array of strings');\n    }\n    return true;\n}\nfunction isRasterTileJSONSpecification(spec) {\n    if (!isTileJSONSpecification(spec))\n        ;\n    if (('vector_layers' in spec) && (spec.vector_layers != null))\n        return false;\n    return true;\n}\n\n/**\n * Generates a style specification based on the provided TileJSON specification and optional parameters.\n *\n * @param {TileJSONSpecification} tileJSON - The TileJSON specification to generate the style from.\n * @param {GuessStyleOptions} [options] - Optional parameters to customize the style generation.\n * @param {string} [options.baseUrl] - Base URL to resolve tile URLs.\n * @param {string} [options.glyphs] - URL template for glyphs.\n * @param {string} [options.sprite] - URL template for sprites.\n * @returns {StyleSpecification} The generated style specification.\n * @throws {Error} If the provided TileJSON specification is invalid.\n */\nfunction guessStyle(tileJSON, options) {\n    tileJSON = deepClone(tileJSON);\n    if (options && options.baseUrl) {\n        const { baseUrl } = options;\n        tileJSON.tiles = tileJSON.tiles.map(url => resolveUrl(baseUrl, url));\n    }\n    if (!isTileJSONSpecification(tileJSON))\n        ;\n    let style;\n    if (isRasterTileJSONSpecification(tileJSON)) {\n        style = getRasterStyle(tileJSON);\n    }\n    else {\n        if (isShortbread(tileJSON)) {\n            style = getShortbreadStyle(tileJSON, {\n                baseUrl: options?.baseUrl,\n                glyphs: options?.glyphs,\n                sprite: options?.sprite,\n            });\n        }\n        else {\n            style = getInspectorStyle(tileJSON);\n        }\n    }\n    return style;\n}\nfunction isShortbread(spec) {\n    if (typeof spec !== 'object')\n        return false;\n    if (!('vector_layers' in spec))\n        return false;\n    if (!Array.isArray(spec.vector_layers))\n        return false;\n    const layerIds = new Set(spec.vector_layers.map(l => String(l.id)));\n    const shortbreadIds = ['place_labels', 'boundaries', 'boundary_labels', 'addresses', 'water_lines', 'water_lines_labels', 'dam_lines', 'dam_polygons', 'pier_lines', 'pier_polygons', 'bridges', 'street_polygons', 'streets_polygons_labels', 'ferries', 'streets', 'street_labels', 'street_labels_points', 'aerialways', 'public_transport', 'buildings', 'water_polygons', 'ocean', 'water_polygons_labels', 'land', 'sites', 'pois'];\n    return shortbreadIds.every(id => layerIds.has(id));\n}\nfunction getShortbreadStyle(spec, builderOption) {\n    return colorful({\n        tiles: spec.tiles,\n        baseUrl: builderOption.baseUrl,\n        glyphs: builderOption.glyphs,\n        sprite: builderOption.sprite,\n    });\n}\n/**\n * Generates a Mapbox GL style specification based on the provided TileJSON vector specification.\n *\n * @param {TileJSONSpecificationVector} spec - The TileJSON vector specification containing vector layers.\n * @returns {StyleSpecification} The generated Mapbox GL style specification.\n *\n * This function creates a style specification with background, circle, line, and fill layers.\n * It assigns colors to the layers based on the vector layer IDs using predefined rules for hue, luminosity, and saturation.\n *\n * The resulting style specification includes:\n * - A white background layer.\n * - Circle layers for point features.\n * - Line layers for line features.\n * - Fill layers for polygon features.\n *\n * The source for the layers is created using the `sourceFromSpec` function with the provided vector specification.\n */\nfunction getInspectorStyle(spec) {\n    const sourceName = 'vectorSource';\n    const layers = { background: [], circle: [], line: [], fill: [] };\n    layers.background.push({ 'id': 'background', 'type': 'background', 'paint': { 'background-color': '#fff' } });\n    spec.vector_layers.forEach((vector_layer) => {\n        let luminosity = 'bright', saturation, hue;\n        if (/water|ocean|lake|sea|river/.test(vector_layer.id))\n            hue = 'blue';\n        if (/state|country|place/.test(vector_layer.id))\n            hue = 'pink';\n        if (/road|highway|transport|streets/.test(vector_layer.id))\n            hue = 'orange';\n        if (/contour|building/.test(vector_layer.id))\n            hue = 'monochrome';\n        if (vector_layer.id.includes('building'))\n            luminosity = 'dark';\n        if (/contour|landuse/.test(vector_layer.id))\n            hue = 'yellow';\n        if (/wood|forest|park|landcover|land/.test(vector_layer.id))\n            hue = 'green';\n        if (vector_layer.id.includes('point')) {\n            saturation = 'strong';\n            luminosity = 'light';\n        }\n        const color = randomColor({\n            hue,\n            luminosity,\n            saturation,\n            seed: vector_layer.id,\n            opacity: 0.6,\n        }).asString();\n        layers.circle.push({\n            id: `${sourceName}-${vector_layer.id}-circle`,\n            'source-layer': vector_layer.id,\n            source: sourceName,\n            type: 'circle',\n            filter: ['==', '$type', 'Point'],\n            paint: { 'circle-color': color, 'circle-radius': 2 },\n        });\n        layers.line.push({\n            id: `${sourceName}-${vector_layer.id}-line`,\n            'source-layer': vector_layer.id,\n            source: sourceName,\n            type: 'line',\n            filter: ['==', '$type', 'LineString'],\n            layout: { 'line-join': 'round', 'line-cap': 'round' },\n            paint: { 'line-color': color },\n        });\n        layers.fill.push({\n            id: `${sourceName}-${vector_layer.id}-fill`,\n            'source-layer': vector_layer.id,\n            source: sourceName,\n            type: 'fill',\n            filter: ['==', '$type', 'Polygon'],\n            paint: { 'fill-color': color, 'fill-opacity': 0.3, 'fill-antialias': true, 'fill-outline-color': color },\n        });\n    });\n    return {\n        version: 8,\n        sources: {\n            [sourceName]: sourceFromSpec(spec, 'vector'),\n        },\n        layers: [\n            ...layers.background,\n            ...layers.fill,\n            ...layers.line,\n            ...layers.circle,\n        ],\n    };\n}\nfunction getRasterStyle(spec) {\n    const sourceName = 'rasterSource';\n    return {\n        version: 8,\n        sources: {\n            [sourceName]: sourceFromSpec(spec, 'raster'),\n        },\n        layers: [{\n                id: 'raster',\n                type: 'raster',\n                source: sourceName,\n            }],\n    };\n}\nfunction sourceFromSpec(spec, type) {\n    const source = { tiles: spec.tiles, type };\n    if (spec.minzoom != null)\n        source.minzoom = spec.minzoom;\n    if (spec.maxzoom != null)\n        source.maxzoom = spec.maxzoom;\n    if (spec.attribution != null)\n        source.attribution = spec.attribution;\n    if (spec.scheme != null)\n        source.scheme = spec.scheme;\n    return source;\n}\n\n/**\n * This library provides everything you need to build a map style.\n *\n * You can use it in the browser:\n * ```html\n * <html>\n *   <head>\n *     <script src=\"https://tiles.versatiles.org/assets/lib/versatiles-style/versatiles-style.js\"></script>\n *   </head>\n *   <body>\n *     <!-- ... -->\n *     <script>\n *       const style = VersaTilesStyle.colorful();\n *       // ...\n *     </script>\n *   </body>\n * </html>\n * ```\n *\n * or in Node.js:\n * ```shell\n * npm i @versatiles/style\n * ```\n * ```\n * import { colorful } from '@versatiles/style';\n * // OR: const { colorful } = require('@versatiles/style');\n * const style = colorful();\n * ```\n *\n * You probably want to use one of the following functions:\n *\n * ---\n *\n * ## Generate a style for OpenStreetMap data:\n *\n * To generate a style from scratch you can use on of the prepared style functions:\n * - {@link colorful}\n * - {@link eclipse}\n * - {@link graybeard}\n * - {@link neutrino}\n * - {@link shadow}\n *\n * Each function accepts optional {@link StyleBuilderOptions} as argument to customize the style.\n *\n * Example:\n * ```\n * import { colorful } from 'versatiles-style';\n * const style = colorful({\n *   baseUrl: 'https://tiles.example.org',\n *   recolor: {\n *     blend: 0.5,\n *     blendColor: '#FFF', // make all colors lighter\n *   }\n * });\n * ```\n *\n * ---\n *\n * ## Guess a style based on a TileJSON:\n *\n * To guess a style from a TileJSON you can use {@link guessStyle}.\n * This function needs a {@link TileJSONSpecification} and an optional {@link GuessStyleOptions} object.\n * Example:\n * ```\n * import { guessStyle } from 'versatiles-style';\n * const style = guessStyle(tilejson);\n * ```\n *\n * ---\n *\n * ## Please help us to improve this library:\n *\n * This library is used in quite some projects of the VersaTiles ecosystem but it is still in an early stage.\n * We are always looking for feedback, contributions, ideas, bug reports and help with the documentation.\n *\n * If you have any suggestions, please [open an issue](https://github.com/versatiles-org/versatiles-style/issues) or a pull request on [GitHub](https://github.com/versatiles-org/versatiles-style).\n *\n * If you want to know more about the VersaTiles project, please visit [versatiles.org](https://versatiles.org).\n *\n * @module\n */\nconst styles = {\n    colorful,\n    eclipse,\n    graybeard,\n    shadow,\n    neutrino,\n};\n\nexport { Color, colorful, eclipse, graybeard, guessStyle, neutrino, shadow, styles };\n\n"]}