"use strict"; (self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[2552],{ /***/ 12552: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { globalCompletion: () => (/* binding */ globalCompletion), localCompletionSource: () => (/* binding */ localCompletionSource), python: () => (/* binding */ python), pythonLanguage: () => (/* binding */ pythonLanguage) }); // 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/python/dist/index.js // This file was generated by lezer-generator. You probably shouldn't edit it. const printKeyword = 1, indent = 196, dedent = 197, newline$1 = 198, blankLineStart = 199, newlineBracketed = 200, eof = 201, formatString1Content = 202, formatString1Brace = 2, formatString1End = 203, formatString2Content = 204, formatString2Brace = 3, formatString2End = 205, formatString1lContent = 206, formatString1lBrace = 4, formatString1lEnd = 207, formatString2lContent = 208, formatString2lBrace = 5, formatString2lEnd = 209, ParenL = 26, ParenthesizedExpression = 27, TupleExpression = 51, ComprehensionExpression = 52, BracketL = 57, ArrayExpression = 58, ArrayComprehensionExpression = 59, BraceL = 61, DictionaryExpression = 62, DictionaryComprehensionExpression = 63, SetExpression = 64, SetComprehensionExpression = 65, ArgList = 67, subscript = 246, FormatString = 74, importList = 265, ParamList = 129, SequencePattern = 150, MappingPattern = 151, PatternArgList = 154; const newline = 10, carriageReturn = 13, space = 32, tab = 9, hash = 35, parenOpen = 40, dot = 46, braceOpen = 123, singleQuote = 39, doubleQuote = 34, backslash = 92; const bracketed = new Set([ ParenthesizedExpression, TupleExpression, ComprehensionExpression, importList, ArgList, ParamList, ArrayExpression, ArrayComprehensionExpression, subscript, SetExpression, SetComprehensionExpression, FormatString, DictionaryExpression, DictionaryComprehensionExpression, SequencePattern, MappingPattern, PatternArgList ]); function isLineBreak(ch) { return ch == newline || ch == carriageReturn } const newlines = new dist/* ExternalTokenizer */.Jq((input, stack) => { let prev; if (input.next < 0) { input.acceptToken(eof); } else if (stack.context.depth < 0) { if (isLineBreak(input.next)) input.acceptToken(newlineBracketed, 1); } else if (((prev = input.peek(-1)) < 0 || isLineBreak(prev)) && stack.canShift(blankLineStart)) { let spaces = 0; while (input.next == space || input.next == tab) { input.advance(); spaces++; } if (input.next == newline || input.next == carriageReturn || input.next == hash) input.acceptToken(blankLineStart, -spaces); } else if (isLineBreak(input.next)) { input.acceptToken(newline$1, 1); } }, {contextual: true}); const indentation = new dist/* ExternalTokenizer */.Jq((input, stack) => { let cDepth = stack.context.depth; if (cDepth < 0) return let prev = input.peek(-1); if (prev == newline || prev == carriageReturn) { let depth = 0, chars = 0; for (;;) { if (input.next == space) depth++; else if (input.next == tab) depth += 8 - (depth % 8); else break input.advance(); chars++; } if (depth != cDepth && input.next != newline && input.next != carriageReturn && input.next != hash) { if (depth < cDepth) input.acceptToken(dedent, -chars); else input.acceptToken(indent); } } }); function IndentLevel(parent, depth) { this.parent = parent; // -1 means this is not an actual indent level but a set of brackets this.depth = depth; this.hash = (parent ? parent.hash + parent.hash << 8 : 0) + depth + (depth << 4); } const topIndent = new IndentLevel(null, 0); function countIndent(space) { let depth = 0; for (let i = 0; i < space.length; i++) depth += space.charCodeAt(i) == tab ? 8 - (depth % 8) : 1; return depth } const trackIndent = new dist/* ContextTracker */.IK({ start: topIndent, reduce(context, term) { return context.depth < 0 && bracketed.has(term) ? context.parent : context }, shift(context, term, stack, input) { if (term == indent) return new IndentLevel(context, countIndent(input.read(input.pos, stack.pos))) if (term == dedent) return context.parent if (term == ParenL || term == BracketL || term == BraceL) return new IndentLevel(context, -1) return context }, hash(context) { return context.hash } }); const legacyPrint = new dist/* ExternalTokenizer */.Jq(input => { for (let i = 0; i < 5; i++) { if (input.next != "print".charCodeAt(i)) return input.advance(); } if (/\w/.test(String.fromCharCode(input.next))) return for (let off = 0;; off++) { let next = input.peek(off); if (next == space || next == tab) continue if (next != parenOpen && next != dot && next != newline && next != carriageReturn && next != hash) input.acceptToken(printKeyword); return } }); function formatString(quote, len, content, brace, end) { return new dist/* ExternalTokenizer */.Jq(input => { let start = input.pos; for (;;) { if (input.next < 0) { break } else if (input.next == braceOpen) { if (input.peek(1) == braceOpen) { input.advance(2); } else { if (input.pos == start) { input.acceptToken(brace, 1); return } break } } else if (input.next == backslash) { input.advance(); if (input.next >= 0) input.advance(); } else if (input.next == quote && (len == 1 || input.peek(1) == quote && input.peek(2) == quote)) { if (input.pos == start) { input.acceptToken(end, len); return } break } else { input.advance(); } } if (input.pos > start) input.acceptToken(content); }) } const formatString1 = formatString(singleQuote, 1, formatString1Content, formatString1Brace, formatString1End); const formatString2 = formatString(doubleQuote, 1, formatString2Content, formatString2Brace, formatString2End); const formatString1l = formatString(singleQuote, 3, formatString1lContent, formatString1lBrace, formatString1lEnd); const formatString2l = formatString(doubleQuote, 3, formatString2lContent, formatString2lBrace, formatString2lEnd); const pythonHighlighting = (0,index_js_.styleTags)({ "async \"*\" \"**\" FormatConversion FormatSpec": index_js_.tags.modifier, "for while if elif else try except finally return raise break continue with pass assert await yield match case": index_js_.tags.controlKeyword, "in not and or is del": index_js_.tags.operatorKeyword, "from def class global nonlocal lambda": index_js_.tags.definitionKeyword, import: index_js_.tags.moduleKeyword, "with as print": index_js_.tags.keyword, Boolean: index_js_.tags.bool, None: index_js_.tags.null, VariableName: index_js_.tags.variableName, "CallExpression/VariableName": index_js_.tags.function(index_js_.tags.variableName), "FunctionDefinition/VariableName": index_js_.tags.function(index_js_.tags.definition(index_js_.tags.variableName)), "ClassDefinition/VariableName": index_js_.tags.definition(index_js_.tags.className), PropertyName: index_js_.tags.propertyName, "CallExpression/MemberExpression/PropertyName": index_js_.tags.function(index_js_.tags.propertyName), Comment: index_js_.tags.lineComment, Number: index_js_.tags.number, String: index_js_.tags.string, FormatString: index_js_.tags.special(index_js_.tags.string), UpdateOp: index_js_.tags.updateOperator, "ArithOp!": index_js_.tags.arithmeticOperator, BitOp: index_js_.tags.bitwiseOperator, CompareOp: index_js_.tags.compareOperator, AssignOp: index_js_.tags.definitionOperator, Ellipsis: index_js_.tags.punctuation, At: index_js_.tags.meta, "( )": index_js_.tags.paren, "[ ]": index_js_.tags.squareBracket, "{ }": index_js_.tags.brace, ".": index_js_.tags.derefOperator, ", ;": index_js_.tags.separator }); // This file was generated by lezer-generator. You probably shouldn't edit it. const spec_identifier = {__proto__:null,await:48, or:58, and:60, in:64, not:66, is:68, if:74, else:76, lambda:80, yield:98, from:100, async:106, for:108, None:168, True:170, False:170, del:184, pass:188, break:192, continue:196, return:200, raise:208, import:212, as:214, global:218, nonlocal:220, assert:224, elif:234, while:238, try:244, except:246, finally:248, with:252, def:256, class:266, match:277, case:283}; const parser = dist/* LRParser */.WQ.deserialize({ version: 14, states: "#!OO`Q#yOOP$_OSOOO%hQ&nO'#H^OOQS'#Cq'#CqOOQS'#Cr'#CrO'WQ#xO'#CpO(yQ&nO'#H]OOQS'#H^'#H^OOQS'#DW'#DWOOQS'#H]'#H]O)gQ#xO'#DaO)zQ#xO'#DhO*[Q#xO'#DlOOQS'#Dw'#DwO*oO,UO'#DwO*wO7[O'#DwO+POWO'#DxO+[O`O'#DxO+gOpO'#DxO+rO!bO'#DxO-tQ&nO'#G}OOQS'#G}'#G}O'WQ#xO'#G|O/WQ&nO'#G|OOQS'#Ee'#EeO/oQ#xO'#EfOOQS'#G{'#G{O/yQ#xO'#GzOOQV'#Gz'#GzO0UQ#xO'#FXOOQS'#G`'#G`O0ZQ#xO'#FWOOQV'#IS'#ISOOQV'#Gy'#GyOOQV'#Fp'#FpQ`Q#yOOO'WQ#xO'#CsO0iQ#xO'#DPO0pQ#xO'#DTO1OQ#xO'#HbO1`Q&nO'#EYO'WQ#xO'#EZOOQS'#E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T]^8^^r!GTrs!HVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!H^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!IVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!I^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!5wsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!J^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!KVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!K^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!Agx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!L[WU!TOY!GTYZ8^Z]!GT]^8^^;'S!GT;'S;=`!Lt;=`<%l8^<%lO!GT!a!L{Y&eS&hWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`Q<%lO$TP;=`<%l$ei&m!b&eS&hW&b`%}sOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$Q<%lO$Q<%lO$Q<%lO$Q<%lO$Q<%lO$ spec_identifier[value] || -1}], tokenPrec: 7205 }); // 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); // EXTERNAL MODULE: ../node_modules/@codemirror/autocomplete/dist/index.js var autocomplete_dist = __webpack_require__(56318); ;// CONCATENATED MODULE: ../node_modules/@codemirror/lang-python/dist/index.js const cache = /*@__PURE__*/new common_dist_index_js_.NodeWeakMap(); const ScopeNodes = /*@__PURE__*/new Set([ "Script", "Body", "FunctionDefinition", "ClassDefinition", "LambdaExpression", "ForStatement", "MatchClause" ]); function defID(type) { return (node, def, outer) => { if (outer) return false; let id = node.node.getChild("VariableName"); if (id) def(id, type); return true; }; } const gatherCompletions = { FunctionDefinition: /*@__PURE__*/defID("function"), ClassDefinition: /*@__PURE__*/defID("class"), ForStatement(node, def, outer) { if (outer) for (let child = node.node.firstChild; child; child = child.nextSibling) { if (child.name == "VariableName") def(child, "variable"); else if (child.name == "in") break; } }, ImportStatement(_node, def) { var _a, _b; let { node } = _node; let isFrom = ((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.name) == "from"; for (let ch = node.getChild("import"); ch; ch = ch.nextSibling) { if (ch.name == "VariableName" && ((_b = ch.nextSibling) === null || _b === void 0 ? void 0 : _b.name) != "as") def(ch, isFrom ? "variable" : "namespace"); } }, AssignStatement(node, def) { for (let child = node.node.firstChild; child; child = child.nextSibling) { if (child.name == "VariableName") def(child, "variable"); else if (child.name == ":" || child.name == "AssignOp") break; } }, ParamList(node, def) { for (let prev = null, child = node.node.firstChild; child; child = child.nextSibling) { if (child.name == "VariableName" && (!prev || !/\*|AssignOp/.test(prev.name))) def(child, "variable"); prev = child; } }, CapturePattern: /*@__PURE__*/defID("variable"), AsPattern: /*@__PURE__*/defID("variable"), __proto__: null }; function getScope(doc, node) { let cached = cache.get(node); if (cached) return cached; let completions = [], top = true; function def(node, type) { let name = doc.sliceString(node.from, node.to); completions.push({ label: name, type }); } node.cursor(common_dist_index_js_.IterMode.IncludeAnonymous).iterate(node => { if (node.name) { let gather = gatherCompletions[node.name]; if (gather && gather(node, def, top) || !top && ScopeNodes.has(node.name)) return false; top = false; } else if (node.to - node.from > 8192) { // Allow caching for bigger internal nodes for (let c of getScope(doc, node.node)) completions.push(c); return false; } }); cache.set(node, completions); return completions; } const Identifier = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/; const dontComplete = ["String", "FormatString", "Comment", "PropertyName"]; /** Completion source that looks up locally defined names in Python code. */ function localCompletionSource(context) { let inner = (0,dist_index_js_.syntaxTree)(context.state).resolveInner(context.pos, -1); if (dontComplete.indexOf(inner.name) > -1) return null; let isWord = inner.name == "VariableName" || inner.to - inner.from < 20 && Identifier.test(context.state.sliceDoc(inner.from, inner.to)); if (!isWord && !context.explicit) return null; let options = []; for (let pos = inner; pos; pos = pos.parent) { if (ScopeNodes.has(pos.name)) options = options.concat(getScope(context.state.doc, pos)); } return { options, from: isWord ? inner.from : context.pos, validFor: Identifier }; } const globals = /*@__PURE__*/[ "__annotations__", "__builtins__", "__debug__", "__doc__", "__import__", "__name__", "__loader__", "__package__", "__spec__", "False", "None", "True" ].map(n => ({ label: n, type: "constant" })).concat(/*@__PURE__*/[ "ArithmeticError", "AssertionError", "AttributeError", "BaseException", "BlockingIOError", "BrokenPipeError", "BufferError", "BytesWarning", "ChildProcessError", "ConnectionAbortedError", "ConnectionError", "ConnectionRefusedError", "ConnectionResetError", "DeprecationWarning", "EOFError", "Ellipsis", "EncodingWarning", "EnvironmentError", "Exception", "FileExistsError", "FileNotFoundError", "FloatingPointError", "FutureWarning", "GeneratorExit", "IOError", "ImportError", "ImportWarning", "IndentationError", "IndexError", "InterruptedError", "IsADirectoryError", "KeyError", "KeyboardInterrupt", "LookupError", "MemoryError", "ModuleNotFoundError", "NameError", "NotADirectoryError", "NotImplemented", "NotImplementedError", "OSError", "OverflowError", "PendingDeprecationWarning", "PermissionError", "ProcessLookupError", "RecursionError", "ReferenceError", "ResourceWarning", "RuntimeError", "RuntimeWarning", "StopAsyncIteration", "StopIteration", "SyntaxError", "SyntaxWarning", "SystemError", "SystemExit", "TabError", "TimeoutError", "TypeError", "UnboundLocalError", "UnicodeDecodeError", "UnicodeEncodeError", "UnicodeError", "UnicodeTranslateError", "UnicodeWarning", "UserWarning", "ValueError", "Warning", "ZeroDivisionError" ].map(n => ({ label: n, type: "type" }))).concat(/*@__PURE__*/[ "bool", "bytearray", "bytes", "classmethod", "complex", "float", "frozenset", "int", "list", "map", "memoryview", "object", "range", "set", "staticmethod", "str", "super", "tuple", "type" ].map(n => ({ label: n, type: "class" }))).concat(/*@__PURE__*/[ "abs", "aiter", "all", "anext", "any", "ascii", "bin", "breakpoint", "callable", "chr", "compile", "delattr", "dict", "dir", "divmod", "enumerate", "eval", "exec", "exit", "filter", "format", "getattr", "globals", "hasattr", "hash", "help", "hex", "id", "input", "isinstance", "issubclass", "iter", "len", "license", "locals", "max", "min", "next", "oct", "open", "ord", "pow", "print", "property", "quit", "repr", "reversed", "round", "setattr", "slice", "sorted", "sum", "vars", "zip" ].map(n => ({ label: n, type: "function" }))); const snippets = [ /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("def ${name}(${params}):\n\t${}", { label: "def", detail: "function", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("for ${name} in ${collection}:\n\t${}", { label: "for", detail: "loop", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("while ${}:\n\t${}", { label: "while", detail: "loop", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("try:\n\t${}\nexcept ${error}:\n\t${}", { label: "try", detail: "/ except block", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("if ${}:\n\t\n", { label: "if", detail: "block", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("if ${}:\n\t${}\nelse:\n\t${}", { label: "if", detail: "/ else block", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("class ${name}:\n\tdef __init__(self, ${params}):\n\t\t\t${}", { label: "class", detail: "definition", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("import ${module}", { label: "import", detail: "statement", type: "keyword" }), /*@__PURE__*/(0,autocomplete_dist/* snippetCompletion */.Gn)("from ${module} import ${names}", { label: "from", detail: "import", type: "keyword" }) ]; /** Autocompletion for built-in Python globals and keywords. */ const globalCompletion = /*@__PURE__*/(0,autocomplete_dist/* ifNotIn */.eC)(dontComplete, /*@__PURE__*/(0,autocomplete_dist/* completeFromList */.Mb)(/*@__PURE__*/globals.concat(snippets))); function innerBody(context) { let { node, pos } = context; let lineIndent = context.lineIndent(pos, -1); let found = null; for (;;) { let before = node.childBefore(pos); if (!before) { break; } else if (before.name == "Comment") { pos = before.from; } else if (before.name == "Body" || before.name == "MatchBody") { if (context.baseIndentFor(before) + context.unit <= lineIndent) found = before; node = before; } else if (before.name == "MatchClause") { node = before; } else if (before.type.is("Statement")) { node = before; } else { break; } } return found; } function indentBody(context, node) { let base = context.baseIndentFor(node); let line = context.lineAt(context.pos, -1), to = line.from + line.text.length; // Don't consider blank, deindented lines at the end of the // block part of the block if (/^\s*($|#)/.test(line.text) && context.node.to < to + 100 && !/\S/.test(context.state.sliceDoc(to, context.node.to)) && context.lineIndent(context.pos, -1) <= base) return null; // A normally deindenting keyword that appears at a higher // indentation than the block should probably be handled by the next // level if (/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(context.textAfter) && context.lineIndent(context.pos, -1) > base) return null; return base + context.unit; } /** A language provider based on the [Lezer Python parser](https://github.com/lezer-parser/python), extended with highlighting and indentation information. */ const pythonLanguage = /*@__PURE__*/dist_index_js_.LRLanguage.define({ name: "python", parser: /*@__PURE__*/parser.configure({ props: [ /*@__PURE__*/dist_index_js_.indentNodeProp.add({ Body: context => { var _a; let inner = innerBody(context); return (_a = indentBody(context, inner || context.node)) !== null && _a !== void 0 ? _a : context.continue(); }, MatchBody: context => { var _a; let inner = innerBody(context); return (_a = indentBody(context, inner || context.node)) !== null && _a !== void 0 ? _a : context.continue(); }, IfStatement: cx => /^\s*(else:|elif )/.test(cx.textAfter) ? cx.baseIndent : cx.continue(), "ForStatement WhileStatement": cx => /^\s*else:/.test(cx.textAfter) ? cx.baseIndent : cx.continue(), TryStatement: cx => /^\s*(except |finally:|else:)/.test(cx.textAfter) ? cx.baseIndent : cx.continue(), MatchStatement: cx => { if (/^\s*case /.test(cx.textAfter)) return cx.baseIndent + cx.unit; return cx.continue(); }, "TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": /*@__PURE__*/(0,dist_index_js_.delimitedIndent)({ closing: ")" }), "DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": /*@__PURE__*/(0,dist_index_js_.delimitedIndent)({ closing: "}" }), "ArrayExpression ArrayComprehensionExpression": /*@__PURE__*/(0,dist_index_js_.delimitedIndent)({ closing: "]" }), MemberExpression: cx => cx.baseIndent + cx.unit, "String FormatString": () => null, Script: context => { var _a; let inner = innerBody(context); return (_a = (inner && indentBody(context, inner))) !== null && _a !== void 0 ? _a : context.continue(); }, }), /*@__PURE__*/dist_index_js_.foldNodeProp.add({ "ArrayExpression DictionaryExpression SetExpression TupleExpression": dist_index_js_.foldInside, Body: (node, state) => ({ from: node.from + 1, to: node.to - (node.to == state.doc.length ? 0 : 1) }), "String FormatString": (node, state) => ({ from: state.doc.lineAt(node.from).to, to: node.to }) }) ], }), languageData: { closeBrackets: { brackets: ["(", "[", "{", "'", '"', "'''", '"""'], stringPrefixes: ["f", "fr", "rf", "r", "u", "b", "br", "rb", "F", "FR", "RF", "R", "U", "B", "BR", "RB"] }, commentTokens: { line: "#" }, // Indent logic logic are triggered upon below input patterns indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/, } }); /** Python language support. */ function python() { return new dist_index_js_.LanguageSupport(pythonLanguage, [ pythonLanguage.data.of({ autocomplete: localCompletionSource }), pythonLanguage.data.of({ autocomplete: globalCompletion }), ]); } /***/ }) }]); //# sourceMappingURL=2552.e56002ba65105afb9b18.js.map?v=e56002ba65105afb9b18