/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
var HtmlUtils=require("./HtmlUtils");const NAMED_COLORS={"transparent":true,"black":true,"silver":true,"gray":true,"white":true,"maroon":true,"red":true,"purple":true,"fuchsia":true,"green":true,"lime":true,"olive":true,"yellow":true,"navy":true,"blue":true,"teal":true,"aqua":true,"orange":true,"aliceblue":true,"antiquewhite":true,"aquamarine":true,"azure":true,"beige":true,"bisque":true,"blanchedalmond":true,"blueviolet":true,"brown":true,"burlywood":true,"cadetblue":true,"chartreuse":true,"chocolate":true,"coral":true,"cornflowerblue":true,"cornsilk":true,"crimson":true,"cyan":true,"darkblue":true,"darkcyan":true,"darkgoldenrod":true,"darkgray":true,"darkgreen":true,"darkgrey":true,"darkkhaki":true,"darkmagenta":true,"darkolivegreen":true,"darkorange":true,"darkorchid":true,"darkred":true,"darksalmon":true,"darkseagreen":true,"darkslateblue":true,"darkslategray":true,"darkslategrey":true,"darkturquoise":true,"darkviolet":true,"deeppink":true,"deepskyblue":true,"dimgray":true,"dimgrey":true,"dodgerblue":true,"firebrick":true,"floralwhite":true,"forestgreen":true,"gainsboro":true,"ghostwhite":true,"gold":true,"goldenrod":true,"greenyellow":true,"grey":true,"honeydew":true,"hotpink":true,"indianred":true,"indigo":true,"ivory":true,"khaki":true,"lavender":true,"lavenderblush":true,"lawngreen":true,"lemonchiffon":true,"lightblue":true,"lightcoral":true,"lightcyan":true,"lightgoldenrodyellow":true,"lightgray":true,"lightgreen":true,"lightgrey":true,"lightpink":true,"lightsalmon":true,"lightseagreen":true,"lightskyblue":true,"lightslategray":true,"lightslategrey":true,"lightsteelblue":true,"lightyellow":true,"limegreen":true,"linen":true,"magenta":true,"mediumaquamarine":true,"mediumblue":true,"mediumorchid":true,"mediumpurple":true,"mediumseagreen":true,"mediumslateblue":true,"mediumspringgreen":true,"mediumturquoise":true,"mediumvioletred":true,"midnightblue":true,"mintcream":true,"mistyrose":true,"moccasin":true,"navajowhite":true,"oldlace":true,"olivedrab":true,"orangered":true,"orchid":true,"palegoldenrod":true,"palegreen":true,"paleturquoise":true,"palevioletred":true,"papayawhip":true,"peachpuff":true,"peru":true,"pink":true,"plum":true,"powderblue":true,"rosybrown":true,"royalblue":true,"saddlebrown":true,"salmon":true,"sandybrown":true,"seagreen":true,"seashell":true,"sienna":true,"skyblue":true,"slateblue":true,"slategray":true,"slategrey":true,"snow":true,"springgreen":true,"steelblue":true,"tan":true,"thistle":true,"tomato":true,"turquoise":true,"violet":true,"wheat":true,"whitesmoke":true,"yellowgreen":true,"rebeccapurple":true};const MARKER_STYLES={"oj-visited":true,"oj-disabled":true,"oj-enabled":true,"oj-read-only":true,"oj-invalid":true,"oj-warning":true,"oj-info":true,"oj-confirmation":true,"oj-required":true,"oj-indeterminate":true,"oj-active":true,"oj-selected":true,"oj-hover":true,"oj-focus":true,"oj-focus-only":true,"oj-focus-highlight":true,"oj-default":true,"oj-draggable":true,"oj-drag":true,"oj-drop":true,"oj-active-drop":true,"oj-valid-drop":true,"oj-invalid-drop":true,"oj-expanded":true,"oj-collapsed":true,"oj-right":true,"oj-center":true,"oj-left":true,"oj-start":true,"oj-end":true,"oj-top":true,"oj-middle":true,"oj-bottom":true,"oj-full-width":true,"oj-hicontrast":true,"oj-component":true,"oj-component-initnode":true,"oj-complete":true,"oj-animate-open":true,"oj-animate-open-active":true,"oj-animate-close":true,"oj-animate-close-active":true,"oj-animate-add":true,"oj-animate-add-active":true,"oj-animate-remove":true,"oj-animate-remove-active":true,"oj-animate-update":true,"oj-animate-update-active":true};function isColorName(s){return!!NAMED_COLORS[s.toLowerCase()]};function isMarkerStyle(style){return!!MARKER_STYLES[style]};function getPosition(ruleCtx,loc){var pos={};var start=loc.start;pos.line=start.line;pos.col=start.column;pos.startIndex=start.offset;pos.endIndex=loc.end.offset;pos.line+=ruleCtx.offset.row-1;pos.startIndex+=ruleCtx.offset.index;pos.endIndex+=ruleCtx.offset.index;return pos};function isCommonElem(tag){return HtmlUtils.isCommonElem(tag)}module.exports={isColorName,isMarkerStyle,getPosition,isCommonElem};