Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1'use strict';2 3Object.defineProperty(exports, Symbol.toStringTag, {4 value: 'Module'5});6 7/**8 * Concatenates two arrays faster than the array spread operator.9 */10const concatArrays = (array1, array2) => {11 // Pre-allocate for better V8 optimization12 const combinedArray = new Array(array1.length + array2.length);13 for (let i = 0; i < array1.length; i++) {14 combinedArray[i] = array1[i];15 }16 for (let i = 0; i < array2.length; i++) {17 combinedArray[array1.length + i] = array2[i];18 }19 return combinedArray;20};21 22// Factory function ensures consistent object shapes23const createClassValidatorObject = (classGroupId, validator) => ({24 classGroupId,25 validator26});27// Factory ensures consistent ClassPartObject shape28const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({29 nextPart,30 validators,31 classGroupId32});33const CLASS_PART_SEPARATOR = '-';34const EMPTY_CONFLICTS = [];35// I use two dots here because one dot is used as prefix for class groups in plugins36const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';37const createClassGroupUtils = config => {38 const classMap = createClassMap(config);39 const {40 conflictingClassGroups,41 conflictingClassGroupModifiers42 } = config;43 const getClassGroupId = className => {44 if (className.startsWith('[') && className.endsWith(']')) {45 return getGroupIdForArbitraryProperty(className);46 }47 const classParts = className.split(CLASS_PART_SEPARATOR);48 // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.49 const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;50 return getGroupRecursive(classParts, startIndex, classMap);51 };52 const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {53 if (hasPostfixModifier) {54 const modifierConflicts = conflictingClassGroupModifiers[classGroupId];55 const baseConflicts = conflictingClassGroups[classGroupId];56 if (modifierConflicts) {57 if (baseConflicts) {58 // Merge base conflicts with modifier conflicts59 return concatArrays(baseConflicts, modifierConflicts);60 }61 // Only modifier conflicts62 return modifierConflicts;63 }64 // Fall back to without postfix if no modifier conflicts65 return baseConflicts || EMPTY_CONFLICTS;66 }67 return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;68 };69 return {70 getClassGroupId,71 getConflictingClassGroupIds72 };73};74const getGroupRecursive = (classParts, startIndex, classPartObject) => {75 const classPathsLength = classParts.length - startIndex;76 if (classPathsLength === 0) {77 return classPartObject.classGroupId;78 }79 const currentClassPart = classParts[startIndex];80 const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);81 if (nextClassPartObject) {82 const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);83 if (result) return result;84 }85 const validators = classPartObject.validators;86 if (validators === null) {87 return undefined;88 }89 // Build classRest string efficiently by joining from startIndex onwards90 const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);91 const validatorsLength = validators.length;92 for (let i = 0; i < validatorsLength; i++) {93 const validatorObj = validators[i];94 if (validatorObj.validator(classRest)) {95 return validatorObj.classGroupId;96 }97 }98 return undefined;99};100/**101 * Get the class group ID for an arbitrary property.102 *103 * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.104 */105const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {106 const content = className.slice(1, -1);107 const colonIndex = content.indexOf(':');108 const property = content.slice(0, colonIndex);109 return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;110})();111/**112 * Exported for testing only113 */114const createClassMap = config => {115 const {116 theme,117 classGroups118 } = config;119 return processClassGroups(classGroups, theme);120};121// Split into separate functions to maintain monomorphic call sites122const processClassGroups = (classGroups, theme) => {123 const classMap = createClassPartObject();124 for (const classGroupId in classGroups) {125 const group = classGroups[classGroupId];126 processClassesRecursively(group, classMap, classGroupId, theme);127 }128 return classMap;129};130const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {131 const len = classGroup.length;132 for (let i = 0; i < len; i++) {133 const classDefinition = classGroup[i];134 processClassDefinition(classDefinition, classPartObject, classGroupId, theme);135 }136};137// Split into separate functions for each type to maintain monomorphic call sites138const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {139 if (typeof classDefinition === 'string') {140 processStringDefinition(classDefinition, classPartObject, classGroupId);141 return;142 }143 if (typeof classDefinition === 'function') {144 processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);145 return;146 }147 processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);148};149const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {150 const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);151 classPartObjectToEdit.classGroupId = classGroupId;152};153const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {154 if (isThemeGetter(classDefinition)) {155 processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);156 return;157 }158 if (classPartObject.validators === null) {159 classPartObject.validators = [];160 }161 classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));162};163const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {164 const entries = Object.entries(classDefinition);165 const len = entries.length;166 for (let i = 0; i < len; i++) {167 const [key, value] = entries[i];168 processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);169 }170};171const getPart = (classPartObject, path) => {172 let current = classPartObject;173 const parts = path.split(CLASS_PART_SEPARATOR);174 const len = parts.length;175 for (let i = 0; i < len; i++) {176 const part = parts[i];177 let next = current.nextPart.get(part);178 if (!next) {179 next = createClassPartObject();180 current.nextPart.set(part, next);181 }182 current = next;183 }184 return current;185};186// Type guard maintains monomorphic check187const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;188 189// LRU cache implementation using plain objects for simplicity190const createLruCache = maxCacheSize => {191 if (maxCacheSize < 1) {192 return {193 get: () => undefined,194 set: () => {}195 };196 }197 let cacheSize = 0;198 let cache = Object.create(null);199 let previousCache = Object.create(null);200 const update = (key, value) => {201 cache[key] = value;202 cacheSize++;203 if (cacheSize > maxCacheSize) {204 cacheSize = 0;205 previousCache = cache;206 cache = Object.create(null);207 }208 };209 return {210 get(key) {211 let value = cache[key];212 if (value !== undefined) {213 return value;214 }215 if ((value = previousCache[key]) !== undefined) {216 update(key, value);217 return value;218 }219 },220 set(key, value) {221 if (key in cache) {222 cache[key] = value;223 } else {224 update(key, value);225 }226 }227 };228};229const IMPORTANT_MODIFIER = '!';230const MODIFIER_SEPARATOR = ':';231const EMPTY_MODIFIERS = [];232// Pre-allocated result object shape for consistency233const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({234 modifiers,235 hasImportantModifier,236 baseClassName,237 maybePostfixModifierPosition,238 isExternal239});240const createParseClassName = config => {241 const {242 prefix,243 experimentalParseClassName244 } = config;245 /**246 * Parse class name into parts.247 *248 * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS249 * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js250 */251 let parseClassName = className => {252 // Use simple array with push for better performance253 const modifiers = [];254 let bracketDepth = 0;255 let parenDepth = 0;256 let modifierStart = 0;257 let postfixModifierPosition;258 const len = className.length;259 for (let index = 0; index < len; index++) {260 const currentCharacter = className[index];261 if (bracketDepth === 0 && parenDepth === 0) {262 if (currentCharacter === MODIFIER_SEPARATOR) {263 modifiers.push(className.slice(modifierStart, index));264 modifierStart = index + 1;265 continue;266 }267 if (currentCharacter === '/') {268 postfixModifierPosition = index;269 continue;270 }271 }272 if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;273 }274 const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);275 // Inline important modifier check276 let baseClassName = baseClassNameWithImportantModifier;277 let hasImportantModifier = false;278 if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {279 baseClassName = baseClassNameWithImportantModifier.slice(0, -1);280 hasImportantModifier = true;281 } else if (282 /**283 * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.284 * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864285 */286 baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {287 baseClassName = baseClassNameWithImportantModifier.slice(1);288 hasImportantModifier = true;289 }290 const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;291 return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);292 };293 if (prefix) {294 const fullPrefix = prefix + MODIFIER_SEPARATOR;295 const parseClassNameOriginal = parseClassName;296 parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);297 }298 if (experimentalParseClassName) {299 const parseClassNameOriginal = parseClassName;300 parseClassName = className => experimentalParseClassName({301 className,302 parseClassName: parseClassNameOriginal303 });304 }305 return parseClassName;306};307 308/**309 * Sorts modifiers according to following schema:310 * - Predefined modifiers are sorted alphabetically311 * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it312 */313const createSortModifiers = config => {314 // Pre-compute weights for all known modifiers for O(1) comparison315 const modifierWeights = new Map();316 // Assign weights to sensitive modifiers (highest priority, but preserve order)317 config.orderSensitiveModifiers.forEach((mod, index) => {318 modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods319 });320 return modifiers => {321 const result = [];322 let currentSegment = [];323 // Process modifiers in one pass324 for (let i = 0; i < modifiers.length; i++) {325 const modifier = modifiers[i];326 // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)327 const isArbitrary = modifier[0] === '[';328 const isOrderSensitive = modifierWeights.has(modifier);329 if (isArbitrary || isOrderSensitive) {330 // Sort and flush current segment alphabetically331 if (currentSegment.length > 0) {332 currentSegment.sort();333 result.push(...currentSegment);334 currentSegment = [];335 }336 result.push(modifier);337 } else {338 // Regular modifier - add to current segment for batch sorting339 currentSegment.push(modifier);340 }341 }342 // Sort and add any remaining segment items343 if (currentSegment.length > 0) {344 currentSegment.sort();345 result.push(...currentSegment);346 }347 return result;348 };349};350const createConfigUtils = config => ({351 cache: createLruCache(config.cacheSize),352 parseClassName: createParseClassName(config),353 sortModifiers: createSortModifiers(config),354 postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),355 ...createClassGroupUtils(config)356});357const createPostfixLookupClassGroupIds = config => {358 const lookup = Object.create(null);359 const classGroupIds = config.postfixLookupClassGroups;360 if (classGroupIds) {361 for (let i = 0; i < classGroupIds.length; i++) {362 lookup[classGroupIds[i]] = true;363 }364 }365 return lookup;366};367const SPLIT_CLASSES_REGEX = /\s+/;368const mergeClassList = (classList, configUtils) => {369 const {370 parseClassName,371 getClassGroupId,372 getConflictingClassGroupIds,373 sortModifiers,374 postfixLookupClassGroupIds375 } = configUtils;376 /**377 * Set of classGroupIds in following format:378 * `{importantModifier}{variantModifiers}{classGroupId}`379 * @example 'float'380 * @example 'hover:focus:bg-color'381 * @example 'md:!pr'382 */383 const classGroupsInConflict = [];384 const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);385 let result = '';386 for (let index = classNames.length - 1; index >= 0; index -= 1) {387 const originalClassName = classNames[index];388 const {389 isExternal,390 modifiers,391 hasImportantModifier,392 baseClassName,393 maybePostfixModifierPosition394 } = parseClassName(originalClassName);395 if (isExternal) {396 result = originalClassName + (result.length > 0 ? ' ' + result : result);397 continue;398 }399 let hasPostfixModifier = !!maybePostfixModifierPosition;400 let classGroupId;401 if (hasPostfixModifier) {402 const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);403 classGroupId = getClassGroupId(baseClassNameWithoutPostfix);404 const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : undefined;405 if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {406 classGroupId = classGroupIdWithPostfix;407 hasPostfixModifier = false;408 }409 } else {410 classGroupId = getClassGroupId(baseClassName);411 }412 if (!classGroupId) {413 if (!hasPostfixModifier) {414 // Not a Tailwind class415 result = originalClassName + (result.length > 0 ? ' ' + result : result);416 continue;417 }418 classGroupId = getClassGroupId(baseClassName);419 if (!classGroupId) {420 // Not a Tailwind class421 result = originalClassName + (result.length > 0 ? ' ' + result : result);422 continue;423 }424 hasPostfixModifier = false;425 }426 // Fast path: skip sorting for empty or single modifier427 const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');428 const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;429 const classId = modifierId + classGroupId;430 if (classGroupsInConflict.indexOf(classId) > -1) {431 // Tailwind class omitted due to conflict432 continue;433 }434 classGroupsInConflict.push(classId);435 const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);436 for (let i = 0; i < conflictGroups.length; ++i) {437 const group = conflictGroups[i];438 classGroupsInConflict.push(modifierId + group);439 }440 // Tailwind class not in conflict441 result = originalClassName + (result.length > 0 ? ' ' + result : result);442 }443 return result;444};445 446/**447 * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.448 *449 * Specifically:450 * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js451 * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts452 *453 * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)454 */455const twJoin = (...classLists) => {456 let index = 0;457 let argument;458 let resolvedValue;459 let string = '';460 while (index < classLists.length) {461 if (argument = classLists[index++]) {462 if (resolvedValue = toValue(argument)) {463 string && (string += ' ');464 string += resolvedValue;465 }466 }467 }468 return string;469};470const toValue = mix => {471 // Fast path for strings472 if (typeof mix === 'string') {473 return mix;474 }475 let resolvedValue;476 let string = '';477 for (let k = 0; k < mix.length; k++) {478 if (mix[k]) {479 if (resolvedValue = toValue(mix[k])) {480 string && (string += ' ');481 string += resolvedValue;482 }483 }484 }485 return string;486};487const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {488 let configUtils;489 let cacheGet;490 let cacheSet;491 let functionToCall;492 const initTailwindMerge = classList => {493 const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());494 configUtils = createConfigUtils(config);495 cacheGet = configUtils.cache.get;496 cacheSet = configUtils.cache.set;497 functionToCall = tailwindMerge;498 return tailwindMerge(classList);499 };500 const tailwindMerge = classList => {501 const cachedResult = cacheGet(classList);502 if (cachedResult) {503 return cachedResult;504 }505 const result = mergeClassList(classList, configUtils);506 cacheSet(classList, result);507 return result;508 };509 functionToCall = initTailwindMerge;510 return (...args) => functionToCall(twJoin(...args));511};512const fallbackThemeArr = [];513const fromTheme = key => {514 const themeGetter = theme => theme[key] || fallbackThemeArr;515 themeGetter.isThemeGetter = true;516 return themeGetter;517};518const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;519const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;520const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;521const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;522const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;523const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;524// Shadow always begins with x and y offset separated by underscore optionally prepended by inset525const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;526const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;527const isFraction = value => fractionRegex.test(value);528const isNumber = value => !!value && !Number.isNaN(Number(value));529const isInteger = value => !!value && Number.isInteger(Number(value));530const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));531const isTshirtSize = value => tshirtUnitRegex.test(value);532const isAny = () => true;533const isLengthOnly = value =>534// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.535// For example, `hsl(0 0% 0%)` would be classified as a length without this check.536// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.537lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);538const isNever = () => false;539const isShadow = value => shadowRegex.test(value);540const isImage = value => imageRegex.test(value);541const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);542const isNamedContainerQuery = value => value.startsWith('@container') && (value[10] === '/' && value[11] !== undefined || value[11] === 's' && value[16] !== undefined && value.startsWith('-size/', 10) || value[11] === 'n' && value[18] !== undefined && value.startsWith('-normal/', 10));543const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);544const isArbitraryValue = value => arbitraryValueRegex.test(value);545const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);546const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);547const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);548const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);549const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);550const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);551const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);552const isArbitraryVariable = value => arbitraryVariableRegex.test(value);553const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);554const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);555const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);556const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);557const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);558const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);559const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);560// Helpers561const getIsArbitraryValue = (value, testLabel, testValue) => {562 const result = arbitraryValueRegex.exec(value);563 if (result) {564 if (result[1]) {565 return testLabel(result[1]);566 }567 return testValue(result[2]);568 }569 return false;570};571const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {572 const result = arbitraryVariableRegex.exec(value);573 if (result) {574 if (result[1]) {575 return testLabel(result[1]);576 }577 return shouldMatchNoLabel;578 }579 return false;580};581// Labels582const isLabelPosition = label => label === 'position' || label === 'percentage';583const isLabelImage = label => label === 'image' || label === 'url';584const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';585const isLabelLength = label => label === 'length';586const isLabelNumber = label => label === 'number';587const isLabelFamilyName = label => label === 'family-name';588const isLabelWeight = label => label === 'number' || label === 'weight';589const isLabelShadow = label => label === 'shadow';590const validators = /*#__PURE__*/Object.defineProperty({591 __proto__: null,592 isAny,593 isAnyNonArbitrary,594 isArbitraryFamilyName,595 isArbitraryImage,596 isArbitraryLength,597 isArbitraryNumber,598 isArbitraryPosition,599 isArbitraryShadow,600 isArbitrarySize,601 isArbitraryValue,602 isArbitraryVariable,603 isArbitraryVariableFamilyName,604 isArbitraryVariableImage,605 isArbitraryVariableLength,606 isArbitraryVariablePosition,607 isArbitraryVariableShadow,608 isArbitraryVariableSize,609 isArbitraryVariableWeight,610 isArbitraryWeight,611 isFraction,612 isInteger,613 isNamedContainerQuery,614 isNumber,615 isPercent,616 isTshirtSize617}, Symbol.toStringTag, {618 value: 'Module'619});620const getDefaultConfig = () => {621 /**622 * Theme getters for theme variable namespaces623 * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces624 */625 /***/626 const themeColor = fromTheme('color');627 const themeFont = fromTheme('font');628 const themeText = fromTheme('text');629 const themeFontWeight = fromTheme('font-weight');630 const themeTracking = fromTheme('tracking');631 const themeLeading = fromTheme('leading');632 const themeBreakpoint = fromTheme('breakpoint');633 const themeContainer = fromTheme('container');634 const themeSpacing = fromTheme('spacing');635 const themeRadius = fromTheme('radius');636 const themeShadow = fromTheme('shadow');637 const themeInsetShadow = fromTheme('inset-shadow');638 const themeTextShadow = fromTheme('text-shadow');639 const themeDropShadow = fromTheme('drop-shadow');640 const themeBlur = fromTheme('blur');641 const themePerspective = fromTheme('perspective');642 const themeAspect = fromTheme('aspect');643 const themeEase = fromTheme('ease');644 const themeAnimate = fromTheme('animate');645 /**646 * Helpers to avoid repeating the same scales647 *648 * We use functions that create a new array every time they're called instead of static arrays.649 * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.650 */651 /***/652 const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];653 const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',654 // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378655 'left-top', 'top-right',656 // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378657 'right-top', 'bottom-right',658 // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378659 'right-bottom', 'bottom-left',660 // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378661 'left-bottom'];662 const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];663 const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];664 const scaleOverscroll = () => ['auto', 'contain', 'none'];665 const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];666 const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];667 const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];668 const scaleGridColRowStartAndEnd = () => ['auto', {669 span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]670 }, isInteger, isArbitraryVariable, isArbitraryValue];671 const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];672 const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];673 const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];674 const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];675 const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];676 const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];677 const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];678 const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];679 const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];680 const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {681 position: [isArbitraryVariable, isArbitraryValue]682 }];683 const scaleBgRepeat = () => ['no-repeat', {684 repeat: ['', 'x', 'y', 'space', 'round']685 }];686 const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {687 size: [isArbitraryVariable, isArbitraryValue]688 }];689 const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];690 const scaleRadius = () => [691 // Deprecated since Tailwind CSS v4.0.0692 '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];693 const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];694 const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];695 const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];696 const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];697 const scaleBlur = () => [698 // Deprecated since Tailwind CSS v4.0.0699 '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];700 const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];701 const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];702 const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];703 const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];704 return {705 cacheSize: 500,706 theme: {707 animate: ['spin', 'ping', 'pulse', 'bounce'],708 aspect: ['video'],709 blur: [isTshirtSize],710 breakpoint: [isTshirtSize],711 color: [isAny],712 container: [isTshirtSize],713 'drop-shadow': [isTshirtSize],714 ease: ['in', 'out', 'in-out'],715 font: [isAnyNonArbitrary],716 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],717 'inset-shadow': [isTshirtSize],718 leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],719 perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],720 radius: [isTshirtSize],721 shadow: [isTshirtSize],722 spacing: ['px', isNumber],723 text: [isTshirtSize],724 'text-shadow': [isTshirtSize],725 tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']726 },727 classGroups: {728 // --------------729 // --- Layout ---730 // --------------731 /**732 * Aspect Ratio733 * @see https://tailwindcss.com/docs/aspect-ratio734 */735 aspect: [{736 aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]737 }],738 /**739 * Container740 * @see https://tailwindcss.com/docs/container741 * @deprecated since Tailwind CSS v4.0.0742 */743 container: ['container'],744 /**745 * Container Type746 * @see https://tailwindcss.com/docs/responsive-design#container-queries747 */748 'container-type': [{749 '@container': ['', 'normal', 'size', isArbitraryVariable, isArbitraryValue]750 }],751 /**752 * Container Name753 * @see https://tailwindcss.com/docs/responsive-design#named-containers754 */755 'container-named': [isNamedContainerQuery],756 /**757 * Columns758 * @see https://tailwindcss.com/docs/columns759 */760 columns: [{761 columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]762 }],763 /**764 * Break After765 * @see https://tailwindcss.com/docs/break-after766 */767 'break-after': [{768 'break-after': scaleBreak()769 }],770 /**771 * Break Before772 * @see https://tailwindcss.com/docs/break-before773 */774 'break-before': [{775 'break-before': scaleBreak()776 }],777 /**778 * Break Inside779 * @see https://tailwindcss.com/docs/break-inside780 */781 'break-inside': [{782 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']783 }],784 /**785 * Box Decoration Break786 * @see https://tailwindcss.com/docs/box-decoration-break787 */788 'box-decoration': [{789 'box-decoration': ['slice', 'clone']790 }],791 /**792 * Box Sizing793 * @see https://tailwindcss.com/docs/box-sizing794 */795 box: [{796 box: ['border', 'content']797 }],798 /**799 * Display800 * @see https://tailwindcss.com/docs/display801 */802 display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],803 /**804 * Screen Reader Only805 * @see https://tailwindcss.com/docs/display#screen-reader-only806 */807 sr: ['sr-only', 'not-sr-only'],808 /**809 * Floats810 * @see https://tailwindcss.com/docs/float811 */812 float: [{813 float: ['right', 'left', 'none', 'start', 'end']814 }],815 /**816 * Clear817 * @see https://tailwindcss.com/docs/clear818 */819 clear: [{820 clear: ['left', 'right', 'both', 'none', 'start', 'end']821 }],822 /**823 * Isolation824 * @see https://tailwindcss.com/docs/isolation825 */826 isolation: ['isolate', 'isolation-auto'],827 /**828 * Object Fit829 * @see https://tailwindcss.com/docs/object-fit830 */831 'object-fit': [{832 object: ['contain', 'cover', 'fill', 'none', 'scale-down']833 }],834 /**835 * Object Position836 * @see https://tailwindcss.com/docs/object-position837 */838 'object-position': [{839 object: scalePositionWithArbitrary()840 }],841 /**842 * Overflow843 * @see https://tailwindcss.com/docs/overflow844 */845 overflow: [{846 overflow: scaleOverflow()847 }],848 /**849 * Overflow X850 * @see https://tailwindcss.com/docs/overflow851 */852 'overflow-x': [{853 'overflow-x': scaleOverflow()854 }],855 /**856 * Overflow Y857 * @see https://tailwindcss.com/docs/overflow858 */859 'overflow-y': [{860 'overflow-y': scaleOverflow()861 }],862 /**863 * Overscroll Behavior864 * @see https://tailwindcss.com/docs/overscroll-behavior865 */866 overscroll: [{867 overscroll: scaleOverscroll()868 }],869 /**870 * Overscroll Behavior X871 * @see https://tailwindcss.com/docs/overscroll-behavior872 */873 'overscroll-x': [{874 'overscroll-x': scaleOverscroll()875 }],876 /**877 * Overscroll Behavior Y878 * @see https://tailwindcss.com/docs/overscroll-behavior879 */880 'overscroll-y': [{881 'overscroll-y': scaleOverscroll()882 }],883 /**884 * Position885 * @see https://tailwindcss.com/docs/position886 */887 position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],888 /**889 * Inset890 * @see https://tailwindcss.com/docs/top-right-bottom-left891 */892 inset: [{893 inset: scaleInset()894 }],895 /**896 * Inset Inline897 * @see https://tailwindcss.com/docs/top-right-bottom-left898 */899 'inset-x': [{900 'inset-x': scaleInset()901 }],902 /**903 * Inset Block904 * @see https://tailwindcss.com/docs/top-right-bottom-left905 */906 'inset-y': [{907 'inset-y': scaleInset()908 }],909 /**910 * Inset Inline Start911 * @see https://tailwindcss.com/docs/top-right-bottom-left912 * @todo class group will be renamed to `inset-s` in next major release913 */914 start: [{915 'inset-s': scaleInset(),916 /**917 * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.918 * @see https://github.com/tailwindlabs/tailwindcss/pull/19613919 */920 start: scaleInset()921 }],922 /**923 * Inset Inline End924 * @see https://tailwindcss.com/docs/top-right-bottom-left925 * @todo class group will be renamed to `inset-e` in next major release926 */927 end: [{928 'inset-e': scaleInset(),929 /**930 * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.931 * @see https://github.com/tailwindlabs/tailwindcss/pull/19613932 */933 end: scaleInset()934 }],935 /**936 * Inset Block Start937 * @see https://tailwindcss.com/docs/top-right-bottom-left938 */939 'inset-bs': [{940 'inset-bs': scaleInset()941 }],942 /**943 * Inset Block End944 * @see https://tailwindcss.com/docs/top-right-bottom-left945 */946 'inset-be': [{947 'inset-be': scaleInset()948 }],949 /**950 * Top951 * @see https://tailwindcss.com/docs/top-right-bottom-left952 */953 top: [{954 top: scaleInset()955 }],956 /**957 * Right958 * @see https://tailwindcss.com/docs/top-right-bottom-left959 */960 right: [{961 right: scaleInset()962 }],963 /**964 * Bottom965 * @see https://tailwindcss.com/docs/top-right-bottom-left966 */967 bottom: [{968 bottom: scaleInset()969 }],970 /**971 * Left972 * @see https://tailwindcss.com/docs/top-right-bottom-left973 */974 left: [{975 left: scaleInset()976 }],977 /**978 * Visibility979 * @see https://tailwindcss.com/docs/visibility980 */981 visibility: ['visible', 'invisible', 'collapse'],982 /**983 * Z-Index984 * @see https://tailwindcss.com/docs/z-index985 */986 z: [{987 z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]988 }],989 // ------------------------990 // --- Flexbox and Grid ---991 // ------------------------992 /**993 * Flex Basis994 * @see https://tailwindcss.com/docs/flex-basis995 */996 basis: [{997 basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]998 }],999 /**1000 * Flex Direction1001 * @see https://tailwindcss.com/docs/flex-direction1002 */1003 'flex-direction': [{1004 flex: ['row', 'row-reverse', 'col', 'col-reverse']1005 }],1006 /**1007 * Flex Wrap1008 * @see https://tailwindcss.com/docs/flex-wrap1009 */1010 'flex-wrap': [{1011 flex: ['nowrap', 'wrap', 'wrap-reverse']1012 }],1013 /**1014 * Flex1015 * @see https://tailwindcss.com/docs/flex1016 */1017 flex: [{1018 flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]1019 }],1020 /**1021 * Flex Grow1022 * @see https://tailwindcss.com/docs/flex-grow1023 */1024 grow: [{1025 grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]1026 }],1027 /**1028 * Flex Shrink1029 * @see https://tailwindcss.com/docs/flex-shrink1030 */1031 shrink: [{1032 shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]1033 }],1034 /**1035 * Order1036 * @see https://tailwindcss.com/docs/order1037 */1038 order: [{1039 order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]1040 }],1041 /**1042 * Grid Template Columns1043 * @see https://tailwindcss.com/docs/grid-template-columns1044 */1045 'grid-cols': [{1046 'grid-cols': scaleGridTemplateColsRows()1047 }],1048 /**1049 * Grid Column Start / End1050 * @see https://tailwindcss.com/docs/grid-column1051 */1052 'col-start-end': [{1053 col: scaleGridColRowStartAndEnd()1054 }],1055 /**1056 * Grid Column Start1057 * @see https://tailwindcss.com/docs/grid-column1058 */1059 'col-start': [{1060 'col-start': scaleGridColRowStartOrEnd()1061 }],1062 /**1063 * Grid Column End1064 * @see https://tailwindcss.com/docs/grid-column1065 */1066 'col-end': [{1067 'col-end': scaleGridColRowStartOrEnd()1068 }],1069 /**1070 * Grid Template Rows1071 * @see https://tailwindcss.com/docs/grid-template-rows1072 */1073 'grid-rows': [{1074 'grid-rows': scaleGridTemplateColsRows()1075 }],1076 /**1077 * Grid Row Start / End1078 * @see https://tailwindcss.com/docs/grid-row1079 */1080 'row-start-end': [{1081 row: scaleGridColRowStartAndEnd()1082 }],1083 /**1084 * Grid Row Start1085 * @see https://tailwindcss.com/docs/grid-row1086 */1087 'row-start': [{1088 'row-start': scaleGridColRowStartOrEnd()1089 }],1090 /**1091 * Grid Row End1092 * @see https://tailwindcss.com/docs/grid-row1093 */1094 'row-end': [{1095 'row-end': scaleGridColRowStartOrEnd()1096 }],1097 /**1098 * Grid Auto Flow1099 * @see https://tailwindcss.com/docs/grid-auto-flow1100 */1101 'grid-flow': [{1102 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']1103 }],1104 /**1105 * Grid Auto Columns1106 * @see https://tailwindcss.com/docs/grid-auto-columns1107 */1108 'auto-cols': [{1109 'auto-cols': scaleGridAutoColsRows()1110 }],1111 /**1112 * Grid Auto Rows1113 * @see https://tailwindcss.com/docs/grid-auto-rows1114 */1115 'auto-rows': [{1116 'auto-rows': scaleGridAutoColsRows()1117 }],1118 /**1119 * Gap1120 * @see https://tailwindcss.com/docs/gap1121 */1122 gap: [{1123 gap: scaleUnambiguousSpacing()1124 }],1125 /**1126 * Gap X1127 * @see https://tailwindcss.com/docs/gap1128 */1129 'gap-x': [{1130 'gap-x': scaleUnambiguousSpacing()1131 }],1132 /**1133 * Gap Y1134 * @see https://tailwindcss.com/docs/gap1135 */1136 'gap-y': [{1137 'gap-y': scaleUnambiguousSpacing()1138 }],1139 /**1140 * Justify Content1141 * @see https://tailwindcss.com/docs/justify-content1142 */1143 'justify-content': [{1144 justify: [...scaleAlignPrimaryAxis(), 'normal']1145 }],1146 /**1147 * Justify Items1148 * @see https://tailwindcss.com/docs/justify-items1149 */1150 'justify-items': [{1151 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']1152 }],1153 /**1154 * Justify Self1155 * @see https://tailwindcss.com/docs/justify-self1156 */1157 'justify-self': [{1158 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]1159 }],1160 /**1161 * Align Content1162 * @see https://tailwindcss.com/docs/align-content1163 */1164 'align-content': [{1165 content: ['normal', ...scaleAlignPrimaryAxis()]1166 }],1167 /**1168 * Align Items1169 * @see https://tailwindcss.com/docs/align-items1170 */1171 'align-items': [{1172 items: [...scaleAlignSecondaryAxis(), {1173 baseline: ['', 'last']1174 }]1175 }],1176 /**1177 * Align Self1178 * @see https://tailwindcss.com/docs/align-self1179 */1180 'align-self': [{1181 self: ['auto', ...scaleAlignSecondaryAxis(), {1182 baseline: ['', 'last']1183 }]1184 }],1185 /**1186 * Place Content1187 * @see https://tailwindcss.com/docs/place-content1188 */1189 'place-content': [{1190 'place-content': scaleAlignPrimaryAxis()1191 }],1192 /**1193 * Place Items1194 * @see https://tailwindcss.com/docs/place-items1195 */1196 'place-items': [{1197 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']1198 }],1199 /**1200 * Place Self