"use strict"; (self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[9239],{ /***/ 59239: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { css: () => (/* binding */ css), cssCompletionSource: () => (/* binding */ cssCompletionSource), cssLanguage: () => (/* binding */ cssLanguage), defineCSSCompletionSource: () => (/* binding */ defineCSSCompletionSource) }); // EXTERNAL MODULE: ../node_modules/@lezer/lr/dist/index.js var dist = __webpack_require__(49906); // EXTERNAL MODULE: consume shared module (default) @lezer/highlight@~1.2.0 (singleton) (fallback: ../node_modules/@lezer/highlight/dist/index.js) var index_js_ = __webpack_require__(92209); ;// CONCATENATED MODULE: ../node_modules/@lezer/css/dist/index.js // This file was generated by lezer-generator. You probably shouldn't edit it. const descendantOp = 99, Unit = 1, callee = 100, identifier = 101, VariableName = 2; /* Hand-written tokenizers for CSS tokens that can't be expressed by Lezer's built-in tokenizer. */ const space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288]; const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46, hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10; function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 } function isDigit(ch) { return ch >= 48 && ch <= 57 } const identifiers = new dist/* ExternalTokenizer */.Jq((input, stack) => { for (let inside = false, dashes = 0, i = 0;; i++) { let {next} = input; if (isAlpha(next) || next == dash || next == underscore || (inside && isDigit(next))) { if (!inside && (next != dash || i > 0)) inside = true; if (dashes === i && next == dash) dashes++; input.advance(); } else if (next == backslash && input.peek(1) != newline) { input.advance(); if (input.next > -1) input.advance(); inside = true; } else { if (inside) input.acceptToken(next == parenL ? callee : dashes == 2 && stack.canShift(VariableName) ? VariableName : identifier); break } } }); const descendant = new dist/* ExternalTokenizer */.Jq(input => { if (space.includes(input.peek(-1))) { let {next} = input; if (isAlpha(next) || next == underscore || next == hash || next == period || next == bracketL || next == colon && isAlpha(input.peek(1)) || next == dash || next == ampersand) input.acceptToken(descendantOp); } }); const unitToken = new dist/* ExternalTokenizer */.Jq(input => { if (!space.includes(input.peek(-1))) { let {next} = input; if (next == percent) { input.advance(); input.acceptToken(Unit); } if (isAlpha(next)) { do { input.advance(); } while (isAlpha(input.next) || isDigit(input.next)) input.acceptToken(Unit); } } }); const cssHighlighting = (0,index_js_.styleTags)({ "AtKeyword import charset namespace keyframes media supports": index_js_.tags.definitionKeyword, "from to selector": index_js_.tags.keyword, NamespaceName: index_js_.tags.namespace, KeyframeName: index_js_.tags.labelName, KeyframeRangeName: index_js_.tags.operatorKeyword, TagName: index_js_.tags.tagName, ClassName: index_js_.tags.className, PseudoClassName: index_js_.tags.constant(index_js_.tags.className), IdName: index_js_.tags.labelName, "FeatureName PropertyName": index_js_.tags.propertyName, AttributeName: index_js_.tags.attributeName, NumberLiteral: index_js_.tags.number, KeywordQuery: index_js_.tags.keyword, UnaryQueryOp: index_js_.tags.operatorKeyword, "CallTag ValueName": index_js_.tags.atom, VariableName: index_js_.tags.variableName, Callee: index_js_.tags.operatorKeyword, Unit: index_js_.tags.unit, "UniversalSelector NestingSelector": index_js_.tags.definitionOperator, MatchOp: index_js_.tags.compareOperator, "ChildOp SiblingOp, LogicOp": index_js_.tags.logicOperator, BinOp: index_js_.tags.arithmeticOperator, Important: index_js_.tags.modifier, Comment: index_js_.tags.blockComment, ColorLiteral: index_js_.tags.color, "ParenthesizedContent StringLiteral": index_js_.tags.string, ":": index_js_.tags.punctuation, "PseudoOp #": index_js_.tags.derefOperator, "; ,": index_js_.tags.separator, "( )": index_js_.tags.paren, "[ ]": index_js_.tags.squareBracket, "{ }": index_js_.tags.brace }); // This file was generated by lezer-generator. You probably shouldn't edit it. const spec_callee = {__proto__:null,lang:32, "nth-child":32, "nth-last-child":32, "nth-of-type":32, "nth-last-of-type":32, dir:32, "host-context":32, url:60, "url-prefix":60, domain:60, regexp:60, selector:138}; const spec_AtKeyword = {__proto__:null,"@import":118, "@media":142, "@charset":146, "@namespace":150, "@keyframes":156, "@supports":168}; const spec_identifier = {__proto__:null,not:132, only:132}; const parser = dist/* LRParser */.WQ.deserialize({ version: 14, states: ":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8U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O%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}", tokenizers: [descendant, unitToken, identifiers, 1, 2, 3, 4, new dist/* LocalTokenGroup */.RA("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~", 28, 105)], topRules: {"StyleSheet":[0,4],"Styles":[1,86]}, specialized: [{term: 100, get: (value) => spec_callee[value] || -1},{term: 58, get: (value) => spec_AtKeyword[value] || -1},{term: 101, get: (value) => spec_identifier[value] || -1}], tokenPrec: 1219 }); // EXTERNAL MODULE: consume shared module (default) @codemirror/language@^6.11.0 (strict) (fallback: ../node_modules/@codemirror/language/dist/index.js) var dist_index_js_ = __webpack_require__(27914); // EXTERNAL MODULE: consume shared module (default) @lezer/common@~1.2.1 (singleton) (fallback: ../node_modules/@lezer/common/dist/index.js) var common_dist_index_js_ = __webpack_require__(79352); ;// CONCATENATED MODULE: ../node_modules/@codemirror/lang-css/dist/index.js let _properties = null; function properties() { if (!_properties && typeof document == "object" && document.body) { let { style } = document.body, names = [], seen = new Set; for (let prop in style) if (prop != "cssText" && prop != "cssFloat") { if (typeof style[prop] == "string") { if (/[A-Z]/.test(prop)) prop = prop.replace(/[A-Z]/g, ch => "-" + ch.toLowerCase()); if (!seen.has(prop)) { names.push(prop); seen.add(prop); } } } _properties = names.sort().map(name => ({ type: "property", label: name, apply: name + ": " })); } return _properties || []; } const pseudoClasses = /*@__PURE__*/[ "active", "after", "any-link", "autofill", "backdrop", "before", "checked", "cue", "default", "defined", "disabled", "empty", "enabled", "file-selector-button", "first", "first-child", "first-letter", "first-line", "first-of-type", "focus", "focus-visible", "focus-within", "fullscreen", "has", "host", "host-context", "hover", "in-range", "indeterminate", "invalid", "is", "lang", "last-child", "last-of-type", "left", "link", "marker", "modal", "not", "nth-child", "nth-last-child", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "part", "placeholder", "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "selection", "slotted", "target", "target-text", "valid", "visited", "where" ].map(name => ({ type: "class", label: name })); const values = /*@__PURE__*/[ "above", "absolute", "activeborder", "additive", "activecaption", "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always", "antialiased", "appworkspace", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page", "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-decimal", "clear", "clip", "close-quote", "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse", "compact", "condensed", "contain", "content", "contents", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal", "decimal-leading-zero", "default", "default-button", "dense", "destination-atop", "destination-in", "destination-out", "destination-over", "difference", "disc", "discard", "disclosure-closed", "disclosure-open", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipse", "ellipsis", "embed", "end", "ethiopic-abegede-gez", "ethiopic-halehame-aa-er", "ethiopic-halehame-gez", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", "forwards", "from", "geometricPrecision", "graytext", "grid", "groove", "hand", "hard-light", "help", "hidden", "hide", "higher", "highlight", "highlighttext", "horizontal", "hsl", "hsla", "hue", "icon", "ignore", "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "keep-all", "landscape", "large", "larger", "left", "level", "lighter", "lighten", "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-hexadecimal", "lower-latin", "lower-norwegian", "lowercase", "ltr", "luminosity", "manipulation", "match", "matrix", "matrix3d", "medium", "menu", "menutext", "message-box", "middle", "min-intrinsic", "mix", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "n-resize", "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "opacity", "open-quote", "optimizeLegibility", "optimizeSpeed", "outset", "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", "painted", "page", "paused", "perspective", "pinch-zoom", "plus-darker", "plus-lighter", "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radial-gradient", "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running", "s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen", "scroll", "scrollbar", "scroll-position", "se-resize", "self-start", "self-end", "semi-condensed", "semi-expanded", "separate", "serif", "show", "single", "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub", "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row", "table-row-group", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "to", "top", "transform", "translate", "translate3d", "translateX", "translateY", "translateZ", "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up", "upper-latin", "uppercase", "url", "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor", "xx-large", "xx-small" ].map(name => ({ type: "keyword", label: name })).concat(/*@__PURE__*/[ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen" ].map(name => ({ type: "constant", label: name }))); const tags = /*@__PURE__*/[ "a", "abbr", "address", "article", "aside", "b", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "figcaption", "figure", "footer", "form", "header", "hgroup", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "meter", "nav", "ol", "output", "p", "pre", "ruby", "section", "select", "small", "source", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "tr", "u", "ul" ].map(name => ({ type: "type", label: name })); const atRules = /*@__PURE__*/[ "@charset", "@color-profile", "@container", "@counter-style", "@font-face", "@font-feature-values", "@font-palette-values", "@import", "@keyframes", "@layer", "@media", "@namespace", "@page", "@position-try", "@property", "@scope", "@starting-style", "@supports", "@view-transition" ].map(label => ({ type: "keyword", label })); const dist_identifier = /^(\w[\w-]*|-\w[\w-]*|)$/, variable = /^-(-[\w-]*)?$/; function isVarArg(node, doc) { var _a; if (node.name == "(" || node.type.isError) node = node.parent || node; if (node.name != "ArgList") return false; let callee = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.firstChild; if ((callee === null || callee === void 0 ? void 0 : callee.name) != "Callee") return false; return doc.sliceString(callee.from, callee.to) == "var"; } const VariablesByNode = /*@__PURE__*/new common_dist_index_js_.NodeWeakMap(); const declSelector = ["Declaration"]; function astTop(node) { for (let cur = node;;) { if (cur.type.isTop) return cur; if (!(cur = cur.parent)) return node; } } function variableNames(doc, node, isVariable) { if (node.to - node.from > 4096) { let known = VariablesByNode.get(node); if (known) return known; let result = [], seen = new Set, cursor = node.cursor(common_dist_index_js_.IterMode.IncludeAnonymous); if (cursor.firstChild()) do { for (let option of variableNames(doc, cursor.node, isVariable)) if (!seen.has(option.label)) { seen.add(option.label); result.push(option); } } while (cursor.nextSibling()); VariablesByNode.set(node, result); return result; } else { let result = [], seen = new Set; node.cursor().iterate(node => { var _a; if (isVariable(node) && node.matchContext(declSelector) && ((_a = node.node.nextSibling) === null || _a === void 0 ? void 0 : _a.name) == ":") { let name = doc.sliceString(node.from, node.to); if (!seen.has(name)) { seen.add(name); result.push({ label: name, type: "variable" }); } } }); return result; } } /** Create a completion source for a CSS dialect, providing a predicate for determining what kind of syntax node can act as a completable variable. This is used by language modes like Sass and Less to reuse this package's completion logic. */ const defineCSSCompletionSource = (isVariable) => context => { let { state, pos } = context, node = (0,dist_index_js_.syntaxTree)(state).resolveInner(pos, -1); let isDash = node.type.isError && node.from == node.to - 1 && state.doc.sliceString(node.from, node.to) == "-"; if (node.name == "PropertyName" || (isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name)) return { from: node.from, options: properties(), validFor: dist_identifier }; if (node.name == "ValueName") return { from: node.from, options: values, validFor: dist_identifier }; if (node.name == "PseudoClassName") return { from: node.from, options: pseudoClasses, validFor: dist_identifier }; if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc)) return { from: isVariable(node) || isDash ? node.from : pos, options: variableNames(state.doc, astTop(node), isVariable), validFor: variable }; if (node.name == "TagName") { for (let { parent } = node; parent; parent = parent.parent) if (parent.name == "Block") return { from: node.from, options: properties(), validFor: dist_identifier }; return { from: node.from, options: tags, validFor: dist_identifier }; } if (node.name == "AtKeyword") return { from: node.from, options: atRules, validFor: dist_identifier }; if (!context.explicit) return null; let above = node.resolve(pos), before = above.childBefore(pos); if (before && before.name == ":" && above.name == "PseudoClassSelector") return { from: pos, options: pseudoClasses, validFor: dist_identifier }; if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList") return { from: pos, options: values, validFor: dist_identifier }; if (above.name == "Block" || above.name == "Styles") return { from: pos, options: properties(), validFor: dist_identifier }; return null; }; /** CSS property, variable, and value keyword completion source. */ const cssCompletionSource = /*@__PURE__*/defineCSSCompletionSource(n => n.name == "VariableName"); /** A language provider based on the [Lezer CSS parser](https://github.com/lezer-parser/css), extended with highlighting and indentation information. */ const cssLanguage = /*@__PURE__*/dist_index_js_.LRLanguage.define({ name: "css", parser: /*@__PURE__*/parser.configure({ props: [ /*@__PURE__*/dist_index_js_.indentNodeProp.add({ Declaration: /*@__PURE__*/(0,dist_index_js_.continuedIndent)() }), /*@__PURE__*/dist_index_js_.foldNodeProp.add({ "Block KeyframeList": dist_index_js_.foldInside }) ] }), languageData: { commentTokens: { block: { open: "/*", close: "*/" } }, indentOnInput: /^\s*\}$/, wordChars: "-" } }); /** Language support for CSS. */ function css() { return new dist_index_js_.LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource })); } /***/ }) }]); //# sourceMappingURL=9239.8802747dd58982052b99.js.map?v=8802747dd58982052b99