"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    STICKY_NOTE_COLORS: ()=>STICKY_NOTE_COLORS,
    withAlpha: ()=>withAlpha
});
const STICKY_NOTE_COLORS = {
    blue: '#42A1FF',
    green: '#6EB84A',
    yellow: '#FFB40E',
    pink: '#ED145B',
    white: 'var(--canvas-border)'
};
const STICKY_NOTE_BG_ALPHA = 0.08;
function withAlpha(hex, alpha = STICKY_NOTE_BG_ALPHA) {
    const clampedAlpha = Math.max(0, Math.min(1, alpha));
    if (hex.startsWith('var(')) return `color-mix(in srgb, ${hex} ${Math.round(100 * clampedAlpha)}%, transparent)`;
    let normalized = hex.startsWith('#') ? hex : `#${hex}`;
    if (/^#([a-fA-F0-9]{3})$/.test(normalized)) normalized = `#${normalized.slice(1).split('').map((c)=>c + c).join('')}`;
    const r = parseInt(normalized.slice(1, 3), 16);
    const g = parseInt(normalized.slice(3, 5), 16);
    const b = parseInt(normalized.slice(5, 7), 16);
    return `rgba(${r}, ${g}, ${b}, ${clampedAlpha})`;
}
exports.STICKY_NOTE_COLORS = __webpack_exports__.STICKY_NOTE_COLORS;
exports.withAlpha = __webpack_exports__.withAlpha;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "STICKY_NOTE_COLORS",
    "withAlpha"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
