{"version":3,"file":"conditions.mjs","names":[],"sources":["../../src/css/conditions.js"],"sourcesContent":["import { withoutSpace } from '../helpers.js';\n\nconst conditionsStr = \"_chinese,_ariaInvalid,_on,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,mobile,mobileOnly,mobileDown,mobileWide,mobileWideOnly,mobileWideDown,tablet,tabletOnly,tabletDown,tabletWide,tabletWideOnly,tabletWideDown,desktop,desktopOnly,desktopDown,wide,wideOnly,wideDown,ultraWide,ultraWideOnly,ultraWideDown,mobileToMobileWide,mobileToTablet,mobileToTabletWide,mobileToDesktop,mobileToWide,mobileToUltraWide,mobileWideToTablet,mobileWideToTabletWide,mobileWideToDesktop,mobileWideToWide,mobileWideToUltraWide,tabletToTabletWide,tabletToDesktop,tabletToWide,tabletToUltraWide,tabletWideToDesktop,tabletWideToWide,tabletWideToUltraWide,desktopToWide,desktopToUltraWide,wideToUltraWide,@/mobile,@/mobileWide,@/tablet,@/tabletWide,@/desktop,@/wide,@/ultraWide,base\"\nconst conditions = new Set(conditionsStr.split(','))\n\nconst conditionRegex = /^@|&|&$/\n\nexport function isCondition(value){\n  return conditions.has(value) || conditionRegex.test(value)\n}\n\nconst underscoreRegex = /^_/\nconst conditionsSelectorRegex = /&|@/\n\nexport function finalizeConditions(paths){\n  return paths.map((path) => {\n    if (conditions.has(path)){\n      return path.replace(underscoreRegex, '')\n    }\n\n    if (conditionsSelectorRegex.test(path)){\n      return `[${withoutSpace(path.trim())}]`\n    }\n\n    return path\n  })}\n\n  export function sortConditions(paths){\n    return paths.sort((a, b) => {\n      const aa = isCondition(a)\n      const bb = isCondition(b)\n      if (aa && !bb) return 1\n      if (!aa && bb) return -1\n      return 0\n    })\n  }"],"mappings":";;AAGA,MAAM,aAAa,IAAI,IAAI,40DAAc,MAAM,GAAG,CAAC;AAEnD,MAAM,iBAAiB;AAEvB,SAAgB,YAAY,OAAM;CAChC,OAAO,WAAW,IAAI,KAAK,KAAK,eAAe,KAAK,KAAK;AAC3D;AAEA,MAAM,kBAAkB;AACxB,MAAM,0BAA0B;AAEhC,SAAgB,mBAAmB,OAAM;CACvC,OAAO,MAAM,KAAK,SAAS;EACzB,IAAI,WAAW,IAAI,IAAI,GACrB,OAAO,KAAK,QAAQ,iBAAiB,EAAE;EAGzC,IAAI,wBAAwB,KAAK,IAAI,GACnC,OAAO,IAAI,aAAa,KAAK,KAAK,CAAC,EAAE;EAGvC,OAAO;CACT,CAAC;AAAC;AAEF,SAAgB,eAAe,OAAM;CACnC,OAAO,MAAM,MAAM,GAAG,MAAM;EAC1B,MAAM,KAAK,YAAY,CAAC;EACxB,MAAM,KAAK,YAAY,CAAC;EACxB,IAAI,MAAM,CAAC,IAAI,OAAO;EACtB,IAAI,CAAC,MAAM,IAAI,OAAO;EACtB,OAAO;CACT,CAAC;AACH"}