!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}(function(l){"use strict";var p={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};l.registerHelper("hint","css",function(e){var r=e.getCursor(),t=e.getTokenAt(r),o=l.innerMode(e.getMode(),t.state);if("css"==o.mode.name){if("keyword"==t.type&&0=="!important".indexOf(t.string))return{list:["!important"],from:l.Pos(r.line,t.start),to:l.Pos(r.line,t.end)};var s=t.start,i=r.ch,n=t.string.slice(0,i-s);/[^\w$_-]/.test(n)&&(n="",s=i=r.ch);var a=l.resolveMode("text/css"),d=[],c=o.state.state;return"pseudo"==c||"variable-3"==t.type?f(p):"block"==c||"maybeprop"==c?f(a.propertyKeywords):"prop"==c||"parens"==c||"at"==c||"params"==c?(f(a.valueKeywords),f(a.colorKeywords)):"media"!=c&&"media_parens"!=c||(f(a.mediaTypes),f(a.mediaFeatures)),d.length?{list:d,from:l.Pos(r.line,s),to:l.Pos(r.line,i)}:void 0}function f(e){for(var r in e)n&&0!=r.lastIndexOf(n,0)||d.push(r)}})});