/* Metro module 5441; source: unknown; dependencies: [5439, 5442] */ import * as Module05442Module from './module-05442.js'; /* Metro dependency 5442 */ function _fun47940(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:6, offset: 0x011d41ec, size: 339 bytes, params: 8, frame: 24 var r5; var propertyName; var propertyName2; var call; const env0_0 = require; const clamp_47941 = function(a0, a1, a2) { var Math = global.Math; var Math2 = global.Math; return Math.min(Math2.max(a1, a0), a2); }; const hexDouble = function(a0) { var Math = global.Math; var value = Math.round(a0); value = value.toString(16); value = value.toUpperCase(); return value.length < 2 ? '0' + value : value; }; let Object = global.Object; const hasOwnProperty = Object.hasOwnProperty; Object = global.Object; for (propertyName in require(5439) /* metro dependency 5439 */) { call = hasOwnProperty.call; if (!Reflect.apply(call, hasOwnProperty, [require(5439) /* metro dependency 5439 */, propertyName])) { r5 = propertyName2; continue; } Object.create(null)[(require(5439) /* metro dependency 5439 */)[propertyName]] = propertyName; r5 = propertyName2; } const object = {to: {}, get: {}}; module.exports = object; object.get = get_47943; let get = object.get; get.rgb = rgb_47944; get = object.get; get.hsl = hsl_47945; get = object.get; get.hwb = hwb_47946; object.to.hex = hex_47947; object.to.rgb = rgb_47948; object.to.rgb.percent = percent; object.to.hsl = hsl_47950; object.to.hwb = hwb_47951; object.to.keyword = keyword_47952; function get_47943(a0) { // fn#47943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:332, offset: 0x011d43b5, size: 150 bytes, params: 2, frame: 16 var r2; var r3; var value3; var value4; let value = a0.substring(0, 3); value = value.toLowerCase(); const value2 = 'hsl'; if (value2 === value) { r2 = env0_4.get.hsl(a0); r3 = value2; } else { value3 = 'hwb'; if (value3 === value) { r2 = env0_4.get.hwb(a0); r3 = value3; } else { value = env0_4.get.rgb(a0); value4 = 'rgb'; r2 = value; r3 = value4; } } return r2 ? {model: r3, value: r2} : null; } function rgb_47944(a0) { // fn#47944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:543, offset: 0x011d444b, size: 796 bytes, params: 2, frame: 31 var r13; var r12; var r3; var r5; var r9; var r8; var items2; var value; var value2; var value3; var value4; var hasOwnPropertyBinding; var call; var moduleValue; var moduleValue2; var property; var Math; var round; var parseFloat; var value5; var parseInt; var value6; var property2; var property3; var value7; var int; var property4; var value8; var slice; var value9; var int2; var value10; if (a0) { items2 = [0, 0, 0, 1]; value = a0.match(RegExp('^#([a-f0-9]{6})([a-f0-9]{2})?$', 'i')); if (value) { property = value[2]; property4 = value[1]; value = 0; r8 = value; reducibleLoop29: while (true) { value8 = 2 * r8; parseInt = global.parseInt; slice = property4.slice; items2[r8] = parseInt(Reflect.apply(slice, property4, [value8, value8 + 2]), 16); value9 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1; if (value9 < 3) { r8 = value9; continue reducibleLoop29; } break reducibleLoop29; } reducibleJoin32: while (true) { if (property) { parseInt = global.parseInt; int2 = parseInt(property, 16); items2[3] = int2 / 255; r3 = value; break reducibleJoin32; } r3 = value; break reducibleJoin32; } } else { value = a0.match(RegExp('^#([a-f0-9]{3,4})$', 'i')); if (value) { property = value[1]; property2 = property[3]; value = 0; r9 = value; reducibleLoop25: while (true) { parseInt = global.parseInt; property3 = property[r9]; items2[r9] = parseInt(property3 + property[r9], 16); value7 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1; if (value7 < 3) { r9 = value7; continue reducibleLoop25; } break reducibleLoop25; } reducibleJoin32: while (true) { if (property2) { parseInt = global.parseInt; int = parseInt(property2 + property2, 16); items2[3] = int / 255; r3 = value; break reducibleJoin32; } r3 = value; break reducibleJoin32; } } else { value = a0.match(RegExp('^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$', '')); value2 = 0; if (value) { r5 = value2; reducibleLoop19: while (true) { parseInt = global.parseInt; items2[r5] = parseInt(value[r5 + 1], value2); value6 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1; if (value6 < 3) { r5 = value6; continue reducibleLoop19; } break reducibleLoop19; } reducibleJoin32: while (true) { if (value[4]) { property = value[5]; parseFloat = global.parseFloat; value = parseFloat(value[4]); if (property) { items2[3] = 0.01 * value; r3 = value2; break reducibleJoin32; } items2[3] = value; r3 = value2; break reducibleJoin32; } r3 = value2; break reducibleJoin32; } } else { value = a0.match(RegExp('^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$', '')); if (!value) { value = a0.match(RegExp('^(\\w+)$', '')); value3 = null; reducibleJoin13: while (true) { if (value) { if (value[1] === 'transparent') { r13 = [0, 0, 0, 0]; } else { value4 = environment; hasOwnPropertyBinding = hasOwnProperty; call = hasOwnPropertyBinding.call; moduleValue = require(dependencyMap[value2]); reducibleJoin10: while (true) { if (Reflect.apply(call, hasOwnPropertyBinding, [moduleValue, value[1]])) { moduleValue2 = require(dependencyMap[value2]); property = moduleValue2[value[1]]; property[3] = 1; r13 = property; break reducibleJoin10; } r13 = value3; break reducibleJoin10; } } r12 = r13; break reducibleJoin13; } r12 = value3; break reducibleJoin13; } return r12; } r3 = value2; reducibleLoop14: while (true) { Math = global.Math; round = Math.round; parseFloat = global.parseFloat; items2[r3] = Reflect.apply(round, Math, [2.55 * parseFloat(value[r3 + 1])]); value5 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; if (value5 < 3) { r3 = value5; continue reducibleLoop14; } break reducibleLoop14; } reducibleJoin32: while (true) { if (value[4]) { property = value[5]; parseFloat = global.parseFloat; value = parseFloat(value[4]); if (property) { items2[3] = 0.01 * value; r3 = value2; break reducibleJoin32; } items2[3] = value; r3 = value2; break reducibleJoin32; } r3 = value2; break reducibleJoin32; } } } } reducibleLoop32: while (true) { value = environment; items2[r3] = clamp_47941(items2[r3], 0, 255); value10 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; if (value10 < 3) { r3 = value10; continue reducibleLoop32; } break reducibleLoop32; } items2[3] = clamp_47941(items2[3], 0, 1); return items2; } return null; } function hsl_47945(a0) { // fn#47945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:1585, offset: 0x011d4767, size: 211 bytes, params: 2, frame: 21 var value; var parseFloat; var float; var value2; var items2; var clamp_47941Binding; if (a0) { value = a0.match(RegExp('^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$', '')); if (value) { parseFloat = global.parseFloat; float = parseFloat(value[4]); parseFloat = global.parseFloat; value2 = 1; items2 = [(parseFloat(value[value2]) % 360 + 360) % 360]; clamp_47941Binding = clamp_47941; parseFloat = global.parseFloat; items2[1] = clamp_47941Binding(parseFloat(value[2]), 0, 100); parseFloat = global.parseFloat; items2[2] = clamp_47941Binding(parseFloat(value[3]), 0, 100); items2[3] = clamp_47941Binding(global.isNaN(float) ? value2 : float, 0, value2); return items2; } } return null; } function hwb_47946(a0) { // fn#47946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:1980, offset: 0x011d483a, size: 211 bytes, params: 2, frame: 21 var value; var parseFloat; var float; var value2; var items2; var clamp_47941Binding; if (a0) { value = a0.match(RegExp('^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$', '')); if (value) { parseFloat = global.parseFloat; float = parseFloat(value[4]); parseFloat = global.parseFloat; value2 = 1; items2 = [(parseFloat(value[value2]) % 360 + 360) % 360]; clamp_47941Binding = clamp_47941; parseFloat = global.parseFloat; items2[1] = clamp_47941Binding(parseFloat(value[2]), 0, 100); parseFloat = global.parseFloat; items2[2] = clamp_47941Binding(parseFloat(value[3]), 0, 100); items2[3] = clamp_47941Binding(global.isNaN(float) ? value2 : float, 0, value2); return items2; } } return null; } function hex_47947() { // fn#47947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:2365, offset: 0x011d490d, size: 148 bytes, params: 1, frame: 16 const value2 = (Module05442Module)(arguments); const hexDoubleBinding = hexDouble; return '#' + hexDoubleBinding(value2[0]) + hexDoubleBinding(value2[1]) + hexDoubleBinding(value2[2]) + (value2[3] < 1 ? hexDouble(global.Math.round(255 * value2[3])) : ''); } function rgb_47948() { // fn#47948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:2514, offset: 0x011d49a1, size: 297 bytes, params: 1, frame: 16 var r0; var Math; var value3; var value5; var value9; var value11; let value = Module05442Module; value = value(arguments); if (value.length < 4) { Math = global.Math; value9 = 'rgb(' + Math.round(value[0]); Math = global.Math; value11 = value9 + ', ' + Math.round(value[1]); Math = global.Math; value = Math.round(value[2]); value = value11 + ', ' + value + ')'; r0 = value; } else if (value[3] === 1) { Math = global.Math; value9 = 'rgb(' + Math.round(value[0]); Math = global.Math; value11 = value9 + ', ' + Math.round(value[1]); Math = global.Math; value = Math.round(value[2]); value = value11 + ', ' + value + ')'; r0 = value; } else { Math = global.Math; value3 = 'rgba(' + Math.round(value[0]); Math = global.Math; value5 = value3 + ', ' + Math.round(value[1]); Math = global.Math; value = value5 + ', ' + Math.round(value[2]) + ', ' + value[3] + ')'; r0 = value; } return r0; } function percent() { // fn#47949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:2752, offset: 0x011d4aca, size: 254 bytes, params: 1, frame: 17 let value = Module05442Module; value = value(arguments); let Math = global.Math; const value2 = Math.round(value[0] / 255 * 100); Math = global.Math; const value3 = Math.round(value[1] / 255 * 100); Math = global.Math; const value4 = Math.round(value[2] / 255 * 100); return value.length < 4 || value[3] === 1 ? 'rgb(' + value2 + '%, ' + value3 + '%, ' + value4 + '%)' : 'rgba(' + value2 + '%, ' + value3 + '%, ' + value4 + '%, ' + value[3] + ')'; } function hsl_47950() { // fn#47950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:2979, offset: 0x011d4bc8, size: 203 bytes, params: 1, frame: 14 var r0; var value2; var property; var value3; var value4; var value5; var value6; let value = Module05442Module; value = value(arguments); if (value.length < 4) { value5 = 'hsl(' + value[0]; property = value[1]; value6 = value5 + ', ' + property; property = value[2]; value = value6 + '%, ' + property + '%)'; r0 = value; } else if (value[3] === 1) { value5 = 'hsl(' + value[0]; property = value[1]; value6 = value5 + ', ' + property; property = value[2]; value = value6 + '%, ' + property + '%)'; r0 = value; } else { value2 = 'hsla(' + value[0]; property = value[1]; value3 = value2 + ', ' + property; property = value[2]; value4 = value3 + '%, ' + property; property = value[3]; value = value4 + '%, ' + property + ')'; r0 = value; } return r0; } function hwb_47951() { // fn#47951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:3141, offset: 0x011d4c93, size: 163 bytes, params: 1, frame: 13 let value = Module05442Module; value = value(arguments); return 'hwb(' + value[0] + ', ' + value[1] + '%, ' + value[2] + '%' + (value.length >= 4 && value[3] !== 1 ? ', ' + value[3] : '') + ')'; } function keyword_47952(a0) { // fn#47952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5619:3284, offset: 0x011d4d36, size: 32 bytes, params: 2, frame: 14 return env0_3[a0.slice(0, 3)]; } } global.__d(_fun47940, 5441, [5439, 5442]) /* metro module 5441, dependencies: [5439, 5442] */;